mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-18 19:02:21 +00:00
fix induction
This commit is contained in:
parent
7d3545dc86
commit
7ee357fcc8
10 changed files with 15 additions and 11 deletions
|
@ -51,7 +51,7 @@ class SbyProperty:
|
|||
tracefile: str = field(default="")
|
||||
|
||||
def __repr__(self):
|
||||
return f"SbyProperty<{self.type} {self.name} at {self.location}: status={self.status}, tracefile=\"{self.tracefile}\""
|
||||
return f"SbyProperty<{self.type} {self.name} at {self.location}: status={self.status}, tracefile=\"{self.tracefile}\">"
|
||||
|
||||
@dataclass
|
||||
class SbyModule:
|
||||
|
@ -105,14 +105,15 @@ 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] != '$':
|
||||
mod.submodules[cell_name] = make_mod_hier(cell_name, cell["type"], hierarchy=f"{hierarchy}/{instance_name}")
|
||||
mod.submodules[cell_name] = make_mod_hier(cell_name, cell["type"], hierarchy=sub_hierarchy)
|
||||
if cell["type"] in ["$assume", "$assert", "$cover", "$live"]:
|
||||
try:
|
||||
location = cell["attributes"]["src"]
|
||||
except KeyError:
|
||||
location = ""
|
||||
p = SbyProperty(name=cell_name, type=SbyProperty.Type.from_cell(cell["type"]), location=location, hierarchy=f"{hierarchy}/{instance_name}")
|
||||
p = SbyProperty(name=cell_name, type=SbyProperty.Type.from_cell(cell["type"]), location=location, hierarchy=sub_hierarchy)
|
||||
mod.properties.append(p)
|
||||
return mod
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue