Skip to content

Commit

Permalink
Hw: Fix HypNumPhys to 1 (previously was 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sermazz committed Nov 4, 2024
1 parent 4cfacfb commit 2b090dd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
3 changes: 3 additions & 0 deletions hw/chimera_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ ExtClusters
//TODO(smazzola): Correct size of HyperRAM?
localparam doub_bt HyperbusRegionEnd = HyperbusRegionStart + 64'h1000_0000;

localparam int unsigned HypNumPhys = 1;
localparam int unsigned HypNumChips = 2;

localparam int unsigned LogDepth = 3;
localparam int unsigned SyncStages = 3;

Expand Down
4 changes: 1 addition & 3 deletions hw/chimera_top_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ module chimera_top_wrapper
import chimera_pkg::*;
import chimera_reg_pkg::*;
#(
parameter int unsigned SelectedCfg = 0,
parameter int unsigned HypNumPhys = 2,
parameter int unsigned HypNumChips = 2
parameter int unsigned SelectedCfg = 0
) (
input logic soc_clk_i,
input logic clu_clk_i,
Expand Down
2 changes: 0 additions & 2 deletions target/sim/sim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ $(CHIM_SIM_DIR)/models/s27ks0641/s27ks0641.sv:
# Defines for hyperram model preload at time 0
HYP_USER_PRELOAD ?= 0
HYP0_PRELOAD_MEM_FILE ?= ""
HYP1_PRELOAD_MEM_FILE ?= ""

CHIM_VLOG_ARGS += +define+HYP_USER_PRELOAD="$(HYP_USER_PRELOAD)"
CHIM_VLOG_ARGS += +define+HYP0_PRELOAD_MEM_FILE=\"$(HYP0_PRELOAD_MEM_FILE)\"
CHIM_VLOG_ARGS += +define+HYP1_PRELOAD_MEM_FILE=\"$(HYP1_PRELOAD_MEM_FILE)\"
# this path should be kept relative to the vsim directory to avoid CI issues:
# an absolute path produce inter-CI-runner file accesses
CHIM_VLOG_ARGS += +define+PATH_TO_HYP_SDF=\"../models/s27ks0641/s27ks0641.sdf\"
Expand Down
5 changes: 1 addition & 4 deletions target/sim/src/fixture_chimera_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ module fixture_chimera_soc #(
wire [HypNumPhys-1:0][ 7:0] pad_hyper_dq;

chimera_top_wrapper #(
.SelectedCfg(SelectedCfg),
.HypNumPhys (HypNumPhys),
.HypNumChips(HypNumChips)
.SelectedCfg(SelectedCfg)
) dut (
.soc_clk_i (soc_clk),
.clu_clk_i (clu_clk),
Expand Down Expand Up @@ -163,7 +161,6 @@ module fixture_chimera_soc #(
// Mem files for hyperram model. The argument is considered only if HypUserPreload==1 in the
// memory model.
.Hyp0UserPreloadMemFile(`HYP0_PRELOAD_MEM_FILE),
.Hyp1UserPreloadMemFile(`HYP1_PRELOAD_MEM_FILE),
.axi_ext_mst_req_t (axi_mst_req_t),
.axi_ext_mst_rsp_t (axi_mst_rsp_t)
) vip (
Expand Down
4 changes: 0 additions & 4 deletions target/sim/src/tb_chimera_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,4 @@ package tb_chimera_pkg;
DefaultCfg // 0: Default configuration
};

// HyperBus
localparam int HypNumPhys = 2;
localparam int HypNumChips = 2;

endpackage
10 changes: 4 additions & 6 deletions target/sim/src/vip_chimera_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

module vip_chimera_soc
import cheshire_pkg::*;
import chimera_pkg::HypNumPhys;
import chimera_pkg::HypNumChips;
#(
// DUT (must be set)
parameter cheshire_cfg_t DutCfg = '0,
parameter int unsigned HypNumPhys = 2,
parameter int unsigned HypNumChips = 2,

parameter type axi_ext_mst_req_t = logic,
parameter type axi_ext_mst_rsp_t = logic,
Expand Down Expand Up @@ -43,7 +43,6 @@ module vip_chimera_soc
// HyperRAM (hardcoded to HypNumPhys = 2)
parameter int unsigned HypUserPreload = 0,
parameter string Hyp0UserPreloadMemFile = "",
parameter string Hyp1UserPreloadMemFile = "",
// Derived Parameters; *do not override*
parameter int unsigned AxiStrbWidth = DutCfg.AxiDataWidth / 8,
parameter int unsigned AxiStrbBits = $clog2(DutCfg.AxiDataWidth / 8)
Expand Down Expand Up @@ -572,8 +571,7 @@ module vip_chimera_soc
//////////////

localparam string HypUserPreloadMemFiles[HypNumPhys] = '{
Hyp0UserPreloadMemFile,
Hyp1UserPreloadMemFile
Hyp0UserPreloadMemFile
};

for (genvar i = 0; i < HypNumPhys; i++) begin : hyperrams
Expand Down Expand Up @@ -621,7 +619,7 @@ endmodule
module vip_cheshire_soc_tristate
import cheshire_pkg::*;
#(
parameter int unsigned HypNumPhys = 2,
parameter int unsigned HypNumPhys = 1,
parameter int unsigned HypNumChips = 2
) (
// I2C pad IO
Expand Down

0 comments on commit 2b090dd

Please sign in to comment.