Skip to content

Commit

Permalink
[cfg] update address map for L2 looking from spatz
Browse files Browse the repository at this point in the history
  • Loading branch information
Navaneeth-KunhiPurayil committed Dec 9, 2024
1 parent 2dc8c8e commit f6ced8a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions hw/system/spatz_cluster/cfg/flamingo.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
length: 2147483648
},
l2: {
address: 2013265920, // 0x78000000
length: 8388608 // 0x800000
address: 1367343104, // 0x5180_0000
length: 8388608 // 0x5200_0000
},
peripherals: {
},
Expand Down
8 changes: 3 additions & 5 deletions hw/system/spatz_cluster/src/spatz_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module spatz_cluster
parameter logic [31:0] BootAddr = 32'h0,
/// Address to indicate start of L2
parameter logic [AxiAddrWidth-1:0] L2Addr = 48'h0,
parameter logic [AxiAddrWidth-1:0] L2Size = 48'h0,
/// The total amount of cores.
parameter int unsigned NrCores = 8,
/// Data/TCDM memory depth per cut (in words).
Expand Down Expand Up @@ -402,11 +403,8 @@ module spatz_cluster
localparam int unsigned ClusterReserve = 4096; // 4 MiB
localparam int unsigned ClusterL2Size = 8192; // 8 MiB
addr_t cluster_l2_start_address, cluster_l2_end_address;
// assign cluster_l2_start_address = cluster_periph_end_address + ClusterReserve * 1024;
// assign cluster_l2_end_address = cluster_l2_start_address + ClusterL2Size * 1024;
// TODO: change to calc base on cluster_base_addr_i
assign cluster_l2_start_address = L2Addr; //48'h5180_0000;
assign cluster_l2_end_address = 48'h7880_0000; //48'h5200_0000;
assign cluster_l2_start_address = L2Addr;
assign cluster_l2_end_address = L2Addr + L2Size;

// ----------------
// Wire Definitions
Expand Down
3 changes: 2 additions & 1 deletion hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ module ${cfg['name']}_wrapper
.AxiIdWidthOut (spatz_cluster_pkg::IwcAxiIdOutWidth),
.AxiUserWidth (AxiUserWidth),
.BootAddr (${to_sv_hex(cfg['boot_addr'], 32)}),
.L2Addr (48'h78000000),
.L2Addr (48'h5180_0000),
.L2Size (48'h80_0000),
.ClusterPeriphSize (${cfg['cluster_periph_size']}),
.NrCores (${cfg['nr_cores']}),
.TCDMDepth (${cfg['tcdm']['depth']}),
Expand Down
4 changes: 2 additions & 2 deletions sw/snRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ add_compile_options(-O3 -g -ffunction-sections)
if(SNITCH_RUNTIME STREQUAL "snRuntime-cluster")
set(MEM_DRAM_ORIGIN "0x80000000" CACHE STRING "Base address of external memory")
set(MEM_DRAM_SIZE "0x80000000" CACHE STRING "Size of external memory")
set(L2_ORIGIN "0x78000000" CACHE STRING "Base address of L2 memory")
set(L2_SIZE "0x78800000" CACHE STRING "Size of L2 memory")
set(L2_ORIGIN "0x51800000" CACHE STRING "Base address of L2 memory")
set(L2_SIZE "0x800000" CACHE STRING "Size of L2 memory")
else()
set(MEM_DRAM_ORIGIN "0x80000000" CACHE STRING "Base address of external memory")
set(MEM_DRAM_SIZE "256M" CACHE STRING "Size of external memory")
Expand Down

0 comments on commit f6ced8a

Please sign in to comment.