self.drambone = drs(drambone)
self._decoder.add(self.drambone.bus, addr=ddr_addr)
- # additional SRAM at address if DRAM is not also at 0x0
- # (TODO, check Flash, and HyperRAM as well)
- if ddr_addr != 0x0:
- sram_width = 32
- self.bootmem = SRAMPeripheral(size=0x8000,
- data_width=sram_width,
- writable=True)
- self._decoder.add(self.bootmem.bus, addr=0x0) # RAM at 0x0
+ # additional SRAM at address if DRAM is not also at 0x0
+ # (TODO, check Flash, and HyperRAM as well)
+ if ddr_pins is None or ddr_addr != 0x0:
+ print ("SRAM 0x8000 at address 0x0")
+ sram_width = 32
+ self.sram = SRAMPeripheral(size=0x8000,
+ data_width=sram_width,
+ writable=True)
+ self._decoder.add(self.sram.bus, addr=0x0) # RAM at 0x0
# SPI controller
if spi_0_pins is not None and fpga in ['sim',
if platform is not None and hasattr(self, "crg"):
m.submodules.sysclk = self.crg
+ if hasattr(self, "sram"):
+ m.submodules.sram = self.sram
if hasattr(self, "bootmem"):
m.submodules.bootmem = self.bootmem
m.submodules.syscon = self.syscon
if fpga == 'isim':
clk_freq = 55e6 # below 50 mhz, stops DRAM being enabled
if fpga == 'versa_ecp5':
- clk_freq = 55e6 # crank right down to test hyperram
+ clk_freq = 45e6 # crank right down to test hyperram
if fpga == 'versa_ecp5_85':
# 50MHz works. 100MHz works. 55MHz does NOT work.
# Stick with multiples of 50MHz...