simplify cpuif base cls
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING
|
||||||
import inspect
|
import inspect
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@@ -8,16 +8,15 @@ from ..utils import get_always_ff_event, clog2, is_pow2, roundup_pow2
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ..exporter import RegblockExporter
|
from ..exporter import RegblockExporter
|
||||||
from systemrdl import SignalNode
|
|
||||||
|
|
||||||
class CpuifBase:
|
class CpuifBase:
|
||||||
|
|
||||||
# Path is relative to the location of the class that assigns this variable
|
# Path is relative to the location of the class that assigns this variable
|
||||||
template_path = ""
|
template_path = ""
|
||||||
|
|
||||||
def __init__(self, exp:'RegblockExporter', cpuif_reset:Optional['SignalNode'], data_width:int=32, addr_width:int=32):
|
def __init__(self, exp:'RegblockExporter', data_width:int=32, addr_width:int=32):
|
||||||
self.exp = exp
|
self.exp = exp
|
||||||
self.reset = cpuif_reset
|
self.reset = exp.top_node.cpuif_reset
|
||||||
self.data_width = data_width
|
self.data_width = data_width
|
||||||
self.addr_width = addr_width
|
self.addr_width = addr_width
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ class RegblockExporter:
|
|||||||
# Construct exporter components
|
# Construct exporter components
|
||||||
self.cpuif = cpuif_cls(
|
self.cpuif = cpuif_cls(
|
||||||
self,
|
self,
|
||||||
cpuif_reset=self.top_node.cpuif_reset,
|
|
||||||
data_width=scanner.cpuif_data_width,
|
data_width=scanner.cpuif_data_width,
|
||||||
addr_width=addr_width
|
addr_width=addr_width
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user