Merge pull request #465 from gatecat/vip-fix

nx_vip: Add missing 'origin' to SRAM SocRegions
This commit is contained in:
enjoy-digital 2023-01-04 19:51:11 +01:00 committed by GitHub
commit 6658f20682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -84,13 +84,15 @@ class BaseSoC(SoCCore):
# 128KB LRAM (used as SRAM) ------------------------------------------------------------
size = 128*kB
self.spram = NXLRAM(32, size)
self.bus.add_slave("sram", slave=self.spram.bus, region=SoCRegion(size=size))
self.bus.add_slave("sram", slave=self.spram.bus, region=SoCRegion(origin=self.mem_map["sram"],
size=size))
else:
# Use HyperRAM generic PHY as SRAM -----------------------------------------------------
size = 8*1024*kB
hr_pads = platform.request("hyperram", int(hyperram))
self.hyperram = HyperRAM(hr_pads, sys_clk_freq=sys_clk_freq)
self.bus.add_slave("sram", slave=self.hyperram.bus, region=SoCRegion(size=size))
self.bus.add_slave("sram", slave=self.hyperram.bus, region=SoCRegion(origin=self.mem_map["sram"],
size=size))
# Leds -------------------------------------------------------------------------------------
if with_led_chaser: