Skip to content

Commit c379f1f

Browse files
committed
[rdl2ot] Remove unused argument
Signed-off-by: Douglas Reis <[email protected]>
1 parent 5f9acfc commit c379f1f

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

rdl2ot/src/rdl2ot/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ def export_rtl(input_file: str, out_dir: str) -> None:
4141
rdlc.compile_file(input_file)
4242
root = rdlc.elaborate()
4343

44-
rtl_exporter.run(rdlc, root, Path(out_dir))
44+
rtl_exporter.run(root, Path(out_dir))
4545

4646
print("Successfully finished!\n")

rdl2ot/src/rdl2ot/rtl_exporter.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pathlib import Path
99

1010
from jinja2 import Environment, FileSystemLoader
11-
from systemrdl import RDLCompiler, node
11+
from systemrdl import node
1212
from systemrdl.rdltypes import OnReadType
1313

1414
from rdl2ot import opentitan
@@ -17,9 +17,9 @@
1717
DEFAULT_INTERFACE_NAME = "regs"
1818

1919

20-
def run(rdlc: RDLCompiler, obj: node.RootNode, out_dir: Path) -> None:
20+
def run(obj: node.RootNode, out_dir: Path) -> None:
2121
"""Export RDL to opentitan RTL."""
22-
factory = OtInterfaceBuilder(rdlc)
22+
factory = OtInterfaceBuilder()
2323
data = factory.parse_root(obj.top)
2424

2525
Path(out_dir / "rdl.json").write_text(json.dumps(data, indent=2), encoding="utf-8")
@@ -54,11 +54,6 @@ class OtInterfaceBuilder:
5454
async_registers: list = [(int, str)] # List of all the (index, register) with async clock
5555
any_shadowed_reg: bool = False
5656
reg_index: int = 0
57-
rdlc: RDLCompiler
58-
59-
def __init__(self, rdlc: RDLCompiler) -> None:
60-
"""Constructor."""
61-
self.rdlc = rdlc
6257

6358
def get_field(self, field: node.FieldNode) -> dict:
6459
"""Parse a field and return a dictionary."""

0 commit comments

Comments
 (0)