Skip to content

Commit

Permalink
[HW]: Bugs Fix (#48)
Browse files Browse the repository at this point in the history
Fix Bugs:
- [HW]: Fix typo in chimera_clu_domain Cfg struct refrence
- [TB:] Delay JTAG start
- [SW]: Fix define declaration
  • Loading branch information
Lore0599 authored Oct 9, 2024
1 parent db49a85 commit 9e001ed
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions bender.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Moritz Scherer <scheremo@iis.ee.ethz.ch>
# Lorenzo Leone <lleone@iis.ee.ethz.ch>

COMMON_TARGS ?=
COMMON_TARGS += -t snitch_cluster -t cv32a6_convolve -t cva6 -t rtl
Expand Down
1 change: 1 addition & 0 deletions chimera.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Moritz Scherer <scheremo@iis.ee.ethz.ch>
# Lorenzo Leone <lleone@iis.ee.ethz.ch>


CLINTCORES = 46
Expand Down
3 changes: 2 additions & 1 deletion hw/chimera_clu_domain.sv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: SHL-0.51
//
// Moritz Scherer <scheremo@iis.ee.ethz.ch>
// Lorenzo Leone <lleone@iis.ee.ethz.ch>

`define NRCORES(extClusterIdx) ChimeraClusterCfg.NrCores[extClusterIdx]
`define PREVNRCORES(extClusterIdx) \
Expand Down Expand Up @@ -57,7 +58,7 @@ module chimera_clu_domain
localparam int unsigned AxiWideDataWidth = Cfg.ChsCfg.AxiDataWidth * Cfg.MemIslNarrowToWideFactor;
localparam int unsigned AxiWideSlvIdWidth = Cfg.MemIslAxiMstIdWidth + $clog2(Cfg.MemIslWidePorts);
localparam int unsigned AxiSlvIdWidth = Cfg.ChsCfg.AxiMstIdWidth + $clog2(
cheshire_pkg::gen_axi_in(Cfg).num_in
cheshire_pkg::gen_axi_in(Cfg.ChsCfg).num_in
);

// Isolated AXI signals
Expand Down
5 changes: 3 additions & 2 deletions hw/chimera_memisland_domain.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ module chimera_memisland_domain
);

// Define needed parameters
localparam axi_in_t AxiIn = gen_axi_in(Cfg.ChsCfg); // lleone: TODO: find a better solution
localparam int unsigned AxiSlvIdWidth = Cfg.ChsCfg.AxiMstIdWidth + $clog2(AxiIn.num_in);
localparam int unsigned AxiSlvIdWidth = Cfg.ChsCfg.AxiMstIdWidth + $clog2(
cheshire_pkg::gen_axi_in(Cfg.ChsCfg).num_in
);
localparam int unsigned WideSlaveIdWidth = $clog2(Cfg.MemIslWidePorts);
localparam int unsigned WideDataWidth = Cfg.ChsCfg.AxiDataWidth * Cfg.MemIslNarrowToWideFactor;

Expand Down
1 change: 1 addition & 0 deletions hw/chimera_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: SHL-0.51
//
// Moritz Scherer <scheremo@iis.ee.ethz.ch>
// Lorenzo Leone <lleone@iis.ee.ethz.ch>

package chimera_pkg;

Expand Down
2 changes: 2 additions & 0 deletions hw/chimera_top_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// SPDX-License-Identifier: SHL-0.51
//
// Moritz Scherer <scheremo@iis.ee.ethz.ch>
// Lorenzo Leone <lleone@iis.ee.ethz.ch>


module chimera_top_wrapper
import cheshire_pkg::*;
Expand Down
2 changes: 2 additions & 0 deletions sw/sw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0
#
# Moritz Scherer <scheremo@iis.ee.ethz.ch>
# Lorenzo Leone <lleone@iis.ee.ethz.ch>


ifndef chim_sw_mk
chim_sw_mk=1
Expand Down
2 changes: 1 addition & 1 deletion sw/tests/testCluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <stdint.h>

#define CLUSTERMEMORYSTART CLUSTER_0_BASE
#define CLUSTERDISTANCE CLUSTER_1_BASE - CLUSTER_0_BASE
#define CLUSTERDISTANCE (CLUSTER_1_BASE - CLUSTER_0_BASE)
#define NUMCLUSTERS 5

#define TESTVAL 0x00E0D0C0
Expand Down
2 changes: 1 addition & 1 deletion target/sim/src/vip_chimera_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ module vip_chimera_soc
jtag_idcode_t idcode;
dm::dmcontrol_t dmcontrol = '{dmactive: 1, default: '0};
// Check ID code
repeat (100) @(posedge jtag_tck);
repeat (10000) @(posedge jtag_tck);
jtag_dbg.get_idcode(idcode);
if (idcode != DutCfg.DbgIdCode)
$fatal(1, "[JTAG] Unexpected ID code: expected 0x%h, got 0x%h!", DutCfg.DbgIdCode, idcode);
Expand Down

0 comments on commit 9e001ed

Please sign in to comment.