Refactor exporter class to clean up the mess of random variables

This commit is contained in:
Alex Mykyta
2023-05-12 23:44:09 -07:00
parent 5b3cdd9d7a
commit 5e76956618
19 changed files with 210 additions and 217 deletions

View File

@@ -12,7 +12,7 @@ class AXI4Lite_Cpuif(CpuifBase):
@property
def regblock_latency(self) -> int:
return max(self.exp.min_read_latency, self.exp.min_write_latency)
return max(self.exp.ds.min_read_latency, self.exp.ds.min_write_latency)
@property
def max_outstanding(self) -> int:

View File

@@ -14,11 +14,17 @@ class CpuifBase:
# Path is relative to the location of the class that assigns this variable
template_path = ""
def __init__(self, exp:'RegblockExporter', data_width:int=32, addr_width:int=32):
def __init__(self, exp:'RegblockExporter'):
self.exp = exp
self.reset = exp.top_node.cpuif_reset
self.data_width = data_width
self.addr_width = addr_width
self.reset = exp.ds.top_node.cpuif_reset
@property
def addr_width(self) -> int:
return self.exp.ds.addr_width
@property
def data_width(self) -> int:
return self.exp.ds.cpuif_data_width
@property
def data_width_bytes(self) -> int: