cpu: add default io_regions to CPUNone (all address range can be used as IO)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 9 Oct 2019 10:05:10 +0000 (12:05 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 9 Oct 2019 10:06:21 +0000 (12:06 +0200)
litex/soc/cores/cpu/__init__.py
litex/soc/integration/soc_core.py

index 236dba4b427092e3264b8e9f3e40aa287aa86b21..6aeb6ba5030c218716c79b0c1ffbdd38915fe1ec 100644 (file)
@@ -17,10 +17,12 @@ class CPU(Module):
     linker_output_format = None
     interrupts           = {}
     mem_map              = {}
+    io_regions           = {}
 
 class CPUNone(CPU):
     data_width           = 32
     reset_address        = 0x00000000
+    io_regions           = {0x00000000: 0xf0000000} # origin, length
 
 # CPUS ---------------------------------------------------------------------------------------------
 
index a340e2db4fad89e18f0389e88b38fbcd98d428e3..55278bbc47f0150d996fa59e0b53bb9463bfe1a8 100644 (file)
@@ -198,6 +198,7 @@ class SoCCore(Module):
                 self.comb += self.cpu.reset.eq(self.ctrl.reset)
         else:
             self.add_cpu(cpu.CPUNone())
+            self.soc_io_regions.update(self.cpu.io_regions)
 
         # Add user's interrupts (needs to be done after CPU interrupts are allocated)
         for _name, _id in self.interrupt_map.items():