diff --git a/hw/system/spatz_cluster/cfg/flamingo.hjson b/hw/system/spatz_cluster/cfg/flamingo.hjson index bf89d9d..9039f1e 100644 --- a/hw/system/spatz_cluster/cfg/flamingo.hjson +++ b/hw/system/spatz_cluster/cfg/flamingo.hjson @@ -68,8 +68,8 @@ length: 2147483648 }, l2: { - address: 2013265920, // 0x78000000 - length: 8388608 // 0x800000 + address: 1367343104, // 0x5180_0000 + length: 8388608 // 0x5200_0000 }, peripherals: { }, diff --git a/hw/system/spatz_cluster/src/spatz_cluster.sv b/hw/system/spatz_cluster/src/spatz_cluster.sv index fa73f6b..14c9e7a 100644 --- a/hw/system/spatz_cluster/src/spatz_cluster.sv +++ b/hw/system/spatz_cluster/src/spatz_cluster.sv @@ -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). @@ -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 diff --git a/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl b/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl index 3105d45..593c2f4 100644 --- a/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl +++ b/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl @@ -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']}), diff --git a/sw/snRuntime/CMakeLists.txt b/sw/snRuntime/CMakeLists.txt index cdd166c..4c184ef 100644 --- a/sw/snRuntime/CMakeLists.txt +++ b/sw/snRuntime/CMakeLists.txt @@ -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")