From a78eaa57db9c8c5aae0f90eafc17c77b1a4d6029 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Thu, 31 Mar 2022 13:12:15 +0200 Subject: [PATCH 1/2] Fix variable name in find_property_by_cellname's error path --- sbysrc/sby_design.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbysrc/sby_design.py b/sbysrc/sby_design.py index 6dfbaec..dc18350 100644 --- a/sbysrc/sby_design.py +++ b/sbysrc/sby_design.py @@ -97,7 +97,7 @@ class SbyModule: for prop in self: if cell_name == prop.name.translate(str.maketrans(trans_dict)): return prop - raise KeyError(f"No such property: {smt2_name}") + raise KeyError(f"No such property: {cell_name}") def design_hierarchy(filename): design_json = json.load(filename) From 4b512668b21613ead9af7f2389eb134c804fc012 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Thu, 31 Mar 2022 15:51:58 +0200 Subject: [PATCH 2/2] Fix design_hierarchy handling of $paramod cells --- sbysrc/sby_design.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbysrc/sby_design.py b/sbysrc/sby_design.py index dc18350..d18d6d9 100644 --- a/sbysrc/sby_design.py +++ b/sbysrc/sby_design.py @@ -108,7 +108,7 @@ def design_hierarchy(filename): cells = design_json["modules"][module_name]["cells"] for cell_name, cell in cells.items(): sub_hierarchy=f"{hierarchy}/{instance_name}" if hierarchy else instance_name - if cell["type"][0] != '$': + if cell["type"][0] != '$' or cell["type"].startswith("$paramod"): mod.submodules[cell_name] = make_mod_hier(cell_name, cell["type"], hierarchy=sub_hierarchy) if cell["type"] in ["$assume", "$assert", "$cover", "$live"]: try: