Skip to content

Commit

Permalink
[SW] Add cached region for L2.
Browse files Browse the repository at this point in the history
  • Loading branch information
DiyouS committed Dec 12, 2024
1 parent 1f19e33 commit 6450d7f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 4 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,10 @@
length: 2147483648
},
l2: {
address: 1367343104, // 0x5180_0000
length: 8388608 // 0x5200_0000
// 0x5180_0000
address: 1367343104,
// 0x5200_0000
length: 8388608
},
peripherals: {
},
Expand Down
1 change: 1 addition & 0 deletions sw/snRuntime/link/common.ld.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ENTRY(_start)

MEMORY
{
/* DRAM (rwxa) : ORIGIN = @MEM_DRAM_ORIGIN@, LENGTH = @MEM_DRAM_SIZE@ */
DRAM (rwxa) : ORIGIN = @L2_ORIGIN@, LENGTH = @L2_SIZE@
}

Expand Down
8 changes: 7 additions & 1 deletion util/clustergen/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def calc_cache_sizes(self):

def parse_pma_cfg(self, pma_cfg):
self.cfg["pmas"] = dict()
# print(pma_cfg.regions)
print(pma_cfg.regions)
self.cfg["pmas"]["cached"] = list()
for pma in pma_cfg.regions:
if pma[0] == PMA.CACHED:
Expand Down Expand Up @@ -392,6 +392,12 @@ def __init__(self, cfg):
self.cfg["dram"]["length"],
self.cfg["cluster"]["addr_width"],
)
pma_cfg.add_region_length(
PMA.CACHED,
self.cfg["l2"]["address"],
self.cfg["l2"]["length"],
self.cfg["cluster"]["addr_width"],
)
self.cfg["cluster"]["tie_ports"] = True
# Store Snitch cluster config in separate variable
self.cluster = SnitchCluster(cfg["cluster"], pma_cfg)
Expand Down

0 comments on commit 6450d7f

Please sign in to comment.