Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1.         else:
  2.             # LiteDRAM port ------------------------------------------------------------------------
  3.             port = self.sdram.crossbar.get_port()
  4.             port.data_width = 2**int(log2(port.data_width)) # Round to nearest power of 2
  5.  
  6.             # Parameters ---------------------------------------------------------------------------
  7.             main_ram_size = 2**(geom_settings.bankbits +
  8.                                 geom_settings.rowbits +
  9.                                 geom_settings.colbits)*phy.settings.databits//8
  10.             main_ram_size = min(main_ram_size, 0x20000000) # FIXME: limit to 512MB for now
  11.             # Register the memory region (so it shows up in generated .h file):
  12.             self.add_memory_region("main_ram", self.mem_map["main_ram"], main_ram_size)
  13.  
  14.             # LiteDRAM AXI port --------------------------------------------------------------------
  15.             # FIXME: figure out how to specify offset here!!!
  16.             axi2native = LiteDRAMAXI2Native(self.cpu.mem_axi, port)
  17.             self.submodules += axi2native
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement