mirror of
https://github.com/litex-hub/litex-boards.git
synced 2025-01-03 03:43:36 -05:00
icebreaker/fomu: Split PSRAM in half: 64kB SRAM/64kB RAM).
Allows building bare metal demo and running it directly on these boards.
This commit is contained in:
parent
dfa572083a
commit
5addd7f7d8
3 changed files with 24 additions and 6 deletions
|
@ -90,9 +90,15 @@ class BaseSoC(SoCCore):
|
|||
# CRG --------------------------------------------------------------------------------------
|
||||
self.submodules.crg = _CRG(platform, sys_clk_freq)
|
||||
|
||||
# 128KB SPRAM (used as SRAM) ---------------------------------------------------------------
|
||||
# 128KB SPRAM (used as 64kB SRAM / 64kB RAM) -----------------------------------------------
|
||||
self.submodules.spram = Up5kSPRAM(size=128*kB)
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=128*kB))
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=64*kB))
|
||||
if not self.integrated_main_ram_size:
|
||||
self.bus.add_region("main_ram", SoCRegion(
|
||||
origin = self.bus.regions["sram"].origin + 64*kB,
|
||||
size = 64*kB,
|
||||
linker = True)
|
||||
)
|
||||
|
||||
# SPI Flash --------------------------------------------------------------------------------
|
||||
from litespi.modules import W25Q128JV
|
||||
|
|
|
@ -85,9 +85,15 @@ class BaseSoC(SoCCore):
|
|||
# CRG --------------------------------------------------------------------------------------
|
||||
self.submodules.crg = _CRG(platform, sys_clk_freq)
|
||||
|
||||
# 128KB SPRAM (used as SRAM) ---------------------------------------------------------------
|
||||
# 128KB SPRAM (used as 64kB SRAM / 64kB RAM) -----------------------------------------------
|
||||
self.submodules.spram = Up5kSPRAM(size=128*kB)
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=128*kB))
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=64*kB))
|
||||
if not self.integrated_main_ram_size:
|
||||
self.bus.add_region("main_ram", SoCRegion(
|
||||
origin = self.bus.regions["sram"].origin + 64*kB,
|
||||
size = 64*kB,
|
||||
linker = True)
|
||||
)
|
||||
|
||||
# SPI Flash --------------------------------------------------------------------------------
|
||||
from litespi.modules import W25Q128JV
|
||||
|
|
|
@ -95,9 +95,15 @@ class BaseSoC(SoCCore):
|
|||
# CRG --------------------------------------------------------------------------------------
|
||||
self.submodules.crg = _CRG(platform, sys_clk_freq)
|
||||
|
||||
# 128KB SPRAM (used as SRAM) ---------------------------------------------------------------
|
||||
# 128KB SPRAM (used as 64kB SRAM / 64kB RAM) -----------------------------------------------
|
||||
self.submodules.spram = Up5kSPRAM(size=128*kB)
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=128*kB))
|
||||
self.bus.add_slave("sram", self.spram.bus, SoCRegion(size=64*kB))
|
||||
if not self.integrated_main_ram_size:
|
||||
self.bus.add_region("main_ram", SoCRegion(
|
||||
origin = self.bus.regions["sram"].origin + 64*kB,
|
||||
size = 64*kB,
|
||||
linker = True)
|
||||
)
|
||||
|
||||
# SPI Flash --------------------------------------------------------------------------------
|
||||
from litespi.modules import AT25SF161, GD25Q16C, MX25R1635F, W25Q128JV
|
||||
|
|
Loading…
Reference in a new issue