soc/doc: remove soc.get_csr_regions support.
Now that SoC documentation is integrated in LiteX, this is no longer needed.
This commit is contained in:
parent
6893222cf1
commit
4f935714de
|
@ -80,26 +80,18 @@ def generate_docs(soc, base_dir, project_name="LiteX SoC Project",
|
||||||
# DocumentedCSRs.
|
# DocumentedCSRs.
|
||||||
documented_regions = []
|
documented_regions = []
|
||||||
seen_modules = set()
|
seen_modules = set()
|
||||||
regions = []
|
for name, region in soc.csr.regions.items():
|
||||||
|
|
||||||
# Previously, litex contained a function to gather csr regions.
|
|
||||||
if hasattr(soc, "get_csr_regions"):
|
|
||||||
regions = soc.get_csr_regions()
|
|
||||||
else:
|
|
||||||
# Now we just access the regions directly.
|
|
||||||
for region_name, region in soc.csr_regions.items():
|
|
||||||
regions.append((region_name, region.origin,
|
|
||||||
region.busword, region.obj))
|
|
||||||
|
|
||||||
for csr_region in regions:
|
|
||||||
module = None
|
module = None
|
||||||
if hasattr(soc, csr_region[0]):
|
if hasattr(soc, name):
|
||||||
module = getattr(soc, csr_region[0])
|
module = getattr(soc, name)
|
||||||
seen_modules.add(module)
|
seen_modules.add(module)
|
||||||
submodules = gather_submodules(module)
|
submodules = gather_submodules(module)
|
||||||
|
|
||||||
documented_region = DocumentedCSRRegion(
|
documented_region = DocumentedCSRRegion(
|
||||||
csr_region, module, submodules, csr_data_width=soc.csr_data_width)
|
name = name,
|
||||||
|
region = region,
|
||||||
|
module = module,
|
||||||
|
submodules = submodules,
|
||||||
|
csr_data_width = soc.csr.data_width)
|
||||||
if documented_region.name in interrupts:
|
if documented_region.name in interrupts:
|
||||||
documented_region.document_interrupt(
|
documented_region.document_interrupt(
|
||||||
soc, submodules, interrupts[documented_region.name])
|
soc, submodules, interrupts[documented_region.name])
|
||||||
|
|
|
@ -51,8 +51,11 @@ class DocumentedCSR:
|
||||||
f.description = self.trim(f.description)
|
f.description = self.trim(f.description)
|
||||||
|
|
||||||
class DocumentedCSRRegion:
|
class DocumentedCSRRegion:
|
||||||
def __init__(self, csr_region, module=None, submodules=[], csr_data_width=8):
|
def __init__(self, name, region, module=None, submodules=[], csr_data_width=8):
|
||||||
(self.name, self.origin, self.busword, self.raw_csrs) = csr_region
|
self.name = name
|
||||||
|
self.origin = region.origin
|
||||||
|
self.busword = region.busword
|
||||||
|
self.raw_csrs = region.obj
|
||||||
self.current_address = self.origin
|
self.current_address = self.origin
|
||||||
self.sections = []
|
self.sections = []
|
||||||
self.csrs = []
|
self.csrs = []
|
||||||
|
|
Loading…
Reference in New Issue