targets/hyperram: Switch Hyperram memory mode to rwx (required with VexiiRiscv).
This commit is contained in:
parent
185f8d5da4
commit
c8603bebe4
|
@ -118,7 +118,7 @@ class BaseSoC(SoCCore):
|
||||||
# HyperRAM ---------------------------------------------------------------------------------
|
# HyperRAM ---------------------------------------------------------------------------------
|
||||||
if with_hyperram:
|
if with_hyperram:
|
||||||
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE))
|
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE, mode="rwx"))
|
||||||
|
|
||||||
# SD Card ----------------------------------------------------------------------------------
|
# SD Card ----------------------------------------------------------------------------------
|
||||||
if with_sdcard:
|
if with_sdcard:
|
||||||
|
|
|
@ -81,7 +81,7 @@ class BaseSoC(SoCCore):
|
||||||
# HyperRAM ---------------------------------------------------------------------------------
|
# HyperRAM ---------------------------------------------------------------------------------
|
||||||
if with_hyperram:
|
if with_hyperram:
|
||||||
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE))
|
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE, mode="rwx"))
|
||||||
|
|
||||||
# SD Card ----------------------------------------------------------------------------------
|
# SD Card ----------------------------------------------------------------------------------
|
||||||
if with_sdcard:
|
if with_sdcard:
|
||||||
|
|
|
@ -84,7 +84,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# HyperRAM Bus/Slave Interface.
|
# HyperRAM Bus/Slave Interface.
|
||||||
hyperram_bus = wishbone.Interface(data_width=32, address_width=32, addressing="word")
|
hyperram_bus = wishbone.Interface(data_width=32, address_width=32, addressing="word")
|
||||||
self.bus.add_slave(name="main_ram", slave=hyperram_bus, region=SoCRegion(origin=0x40000000, size=hyperram_size))
|
self.bus.add_slave(name="main_ram", slave=hyperram_bus, region=SoCRegion(origin=0x40000000, size=hyperram_size, mode="rwx"))
|
||||||
|
|
||||||
# HyperRAM L2 Cache.
|
# HyperRAM L2 Cache.
|
||||||
hyperram_cache = wishbone.Cache(
|
hyperram_cache = wishbone.Cache(
|
||||||
|
|
|
@ -87,8 +87,7 @@ class BaseSoC(SoCCore):
|
||||||
size = 8 * MEGABYTE
|
size = 8 * MEGABYTE
|
||||||
hr_pads = platform.request("hyperram", int(hyperram))
|
hr_pads = platform.request("hyperram", int(hyperram))
|
||||||
self.hyperram = HyperRAM(hr_pads, sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(hr_pads, sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("sram", slave=self.hyperram.bus, region=SoCRegion(origin=self.mem_map["sram"],
|
self.bus.add_slave("sram", slave=self.hyperram.bus, region=SoCRegion(origin=self.mem_map["sram"], size=size, mode="rwx"))
|
||||||
size=size))
|
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
if with_led_chaser:
|
if with_led_chaser:
|
||||||
|
|
|
@ -125,7 +125,7 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += platform.request("O_hpram_ck").eq(hyperram_pads.clk)
|
self.comb += platform.request("O_hpram_ck").eq(hyperram_pads.clk)
|
||||||
self.comb += platform.request("O_hpram_ck_n").eq(~hyperram_pads.clk)
|
self.comb += platform.request("O_hpram_ck_n").eq(~hyperram_pads.clk)
|
||||||
self.hyperram = HyperRAM(hyperram_pads, sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(hyperram_pads, sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("main_ram", slave=self.hyperram.bus, region=SoCRegion(origin=0x40000000, size=8 * MEGABYTE))
|
self.bus.add_slave("main_ram", slave=self.hyperram.bus, region=SoCRegion(origin=0x40000000, size=8 * MEGABYTE, mode="rwx"))
|
||||||
|
|
||||||
# Video ------------------------------------------------------------------------------------
|
# Video ------------------------------------------------------------------------------------
|
||||||
if with_video_terminal:
|
if with_video_terminal:
|
||||||
|
|
|
@ -112,7 +112,7 @@ class BaseSoC(SoCCore):
|
||||||
os.system("mv hyperbus.py.txt hyperbus.py")
|
os.system("mv hyperbus.py.txt hyperbus.py")
|
||||||
from hyperbus import HyperRAM
|
from hyperbus import HyperRAM
|
||||||
self.hyperram = HyperRAM(hyperram_pads)
|
self.hyperram = HyperRAM(hyperram_pads)
|
||||||
self.bus.add_slave("main_ram", slave=self.hyperram.bus, region=SoCRegion(origin=self.mem_map["main_ram"], size=4 * MEGABYTE))
|
self.bus.add_slave("main_ram", slave=self.hyperram.bus, region=SoCRegion(origin=self.mem_map["main_ram"], size=4 * MEGABYTE, mode="rwx"))
|
||||||
|
|
||||||
# Video ------------------------------------------------------------------------------------
|
# Video ------------------------------------------------------------------------------------
|
||||||
if with_video_terminal:
|
if with_video_terminal:
|
||||||
|
|
|
@ -73,7 +73,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# HyperRam ---------------------------------------------------------------------------------
|
# HyperRam ---------------------------------------------------------------------------------
|
||||||
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(platform.request("hyperram"), sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE))
|
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=8 * MEGABYTE, mode="rwx"))
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
|
|
|
@ -48,7 +48,7 @@ class BaseSoC(SoCCore):
|
||||||
size = int((64 * MEGABYTE) / 8)
|
size = int((64 * MEGABYTE) / 8)
|
||||||
hr_pads = platform.request("hyperram", 0)
|
hr_pads = platform.request("hyperram", 0)
|
||||||
self.hyperram = HyperRAM(hr_pads, sys_clk_freq=sys_clk_freq)
|
self.hyperram = HyperRAM(hr_pads, sys_clk_freq=sys_clk_freq)
|
||||||
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=size))
|
self.bus.add_slave("hyperram", slave=self.hyperram.bus, region=SoCRegion(origin=0x20000000, size=size, mode="rwx"))
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
if with_led_chaser:
|
if with_led_chaser:
|
||||||
|
|
Loading…
Reference in New Issue