Guest User

ulx3s memory relocation

a guest
Apr 28th, 2022
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. diff --git a/litex_boards/targets/radiona_ulx3s.py b/litex_boards/targets/radiona_ulx3s.py
  2. index 925a427..2feda33 100755
  3. --- a/litex_boards/targets/radiona_ulx3s.py
  4. +++ b/litex_boards/targets/radiona_ulx3s.py
  5. @@ -86,6 +86,12 @@ class _CRG(Module):
  6. # BaseSoC ------------------------------------------------------------------------------------------
  7.  
  8. class BaseSoC(SoCCore):
  9. + mem_map = {
  10. + "rom" : 0x00000000,
  11. + "sram" : 0x40000000,
  12. + "main_ram" : 0x80000000,
  13. + "csr" : 0xf0000000,
  14. + }
  15. def __init__(self, device="LFE5U-45F", revision="2.0", toolchain="trellis",
  16. sys_clk_freq=int(50e6), sdram_module_cls="MT48LC16M16", sdram_rate="1:1",
  17. with_led_chaser=True, with_video_terminal=False, with_video_framebuffer=False,
  18.  
  19.  
  20. diff --git a/litex/soc/cores/cpu/vexriscv/core.py b/litex/soc/cores/cpu/vexriscv/core.py
  21. index 083e0726..7573c70c 100644
  22. --- a/litex/soc/cores/cpu/vexriscv/core.py
  23. +++ b/litex/soc/cores/cpu/vexriscv/core.py
  24. @@ -105,7 +105,7 @@ class VexRiscv(CPU, AutoCSR):
  25. gcc_triple = CPU_GCC_TRIPLE_RISCV32
  26. linker_output_format = "elf32-littleriscv"
  27. nop = "nop"
  28. - io_regions = {0x80000000: 0x80000000} # Origin, Length
  29. + io_regions = {0xF0000000: 0x10000000} # Origin, Length
  30.  
  31. # Memory Mapping.
  32. @property
  33. @@ -113,7 +113,7 @@ class VexRiscv(CPU, AutoCSR):
  34. return {
  35. "rom": 0x00000000,
  36. "sram": 0x10000000,
  37. - "main_ram": 0x40000000,
  38. + "main_ram": 0x80000000,
  39. "csr": 0xf0000000,
  40. "vexriscv_debug": 0xf00f0000,
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment