Remove dangerous usage of non-public parts of the systemrdl-compiler API

This commit is contained in:
Alex Mykyta
2025-11-04 23:05:50 -08:00
parent 17465e5f97
commit 543bf2be9a
11 changed files with 26 additions and 28 deletions

View File

@@ -51,16 +51,14 @@ class Hwif:
def get_extra_package_params(self) -> str:
lines = [""]
for param in self.top_node.inst.parameters:
value = param.get_value()
for name, value in self.top_node.parameters.items():
if isinstance(value, int):
lines.append(
f"localparam {param.name} = {SVInt(value)};"
f"localparam {name} = {SVInt(value)};"
)
elif isinstance(value, str):
lines.append(
f"localparam {param.name} = {value};"
f"localparam {name} = {value};"
)
return "\n".join(lines)