cpu: add default io_regions to CPUNone (all address range can be used as IO)

This commit is contained in:
Florent Kermarrec 2019-10-09 12:05:10 +02:00
parent cc245fc8ec
commit b627a8fe71
2 changed files with 3 additions and 0 deletions

View 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 ---------------------------------------------------------------------------------------------

View 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():