soc/SoCBusHandler: Add io_regions_check attribute and and disable IO region check with CPUNone.
This commit is contained in:
parent
e0961d7cb1
commit
f404877353
|
@ -151,6 +151,7 @@ class SoCBusHandler(Module):
|
|||
self.slaves = {}
|
||||
self.regions = {}
|
||||
self.io_regions = {}
|
||||
self.io_regions_check = True
|
||||
self.timeout = timeout
|
||||
self.logger.info("{}-bit {} Bus, {}GiB Address Space.".format(
|
||||
colorer(data_width), colorer(standard), colorer(2**address_width/2**30)))
|
||||
|
@ -197,6 +198,7 @@ class SoCBusHandler(Module):
|
|||
self.regions[name] = region
|
||||
# Else add Region.
|
||||
else:
|
||||
if self.io_regions_check:
|
||||
if self.check_region_is_io(region):
|
||||
# If Region is an IO Region it is not cached.
|
||||
if region.cached:
|
||||
|
@ -919,6 +921,8 @@ class SoC(Module):
|
|||
if isinstance(self.cpu, cpu.CPUNone):
|
||||
# With CPUNone, give priority to User's mapping.
|
||||
self.mem_map = {**self.cpu.mem_map, **self.mem_map}
|
||||
# With CPUNone, disable IO regions check.
|
||||
self.bus.io_regions_check = False
|
||||
else:
|
||||
# Override User's mapping with CPU constrainted mapping (and warn User).
|
||||
for n, origin in self.cpu.mem_map.items():
|
||||
|
|
Loading…
Reference in New Issue