mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-23 05:15:30 +00:00
fix induction
This commit is contained in:
parent
7d3545dc86
commit
7ee357fcc8
10 changed files with 15 additions and 11 deletions
|
@ -773,7 +773,7 @@ class SbyTask:
|
|||
junit_skipped = 0
|
||||
print(f'<?xml version="1.0" encoding="UTF-8"?>', file=f)
|
||||
print(f'<testsuites>', file=f)
|
||||
print(f'<testsuite timestamp="{junit_time}" hostname="{platform.node()}" package="{junit_ts_name}" id="1" name="{junit_tc_name}" tests="{junit_tests}" errors="{junit_errors}" failures="{junit_failures}" time="{self.total_time}" skipped="{junit_skipped}">', file=f)
|
||||
print(f'<testsuite timestamp="{junit_time}" hostname="{platform.node()}" package="{junit_ts_name}" id="0" name="{junit_tc_name}" tests="{junit_tests}" errors="{junit_errors}" failures="{junit_failures}" time="{self.total_time}" skipped="{junit_skipped}">', file=f)
|
||||
print(f'<properties>', file=f)
|
||||
print(f'<property name="os" value="{platform.system()}"/>', file=f)
|
||||
print(f'</properties>', file=f)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -273,6 +273,9 @@ def run(mode, task, engine_idx, engine):
|
|||
assert False
|
||||
|
||||
if task.basecase_pass and task.induction_pass:
|
||||
for prop in task.design_hierarchy:
|
||||
if prop.type == prop.Type.ASSERT and prop.status == "UNKNOWN":
|
||||
prop.status = "PASS"
|
||||
task.update_status("PASS")
|
||||
task.summary.append("successful proof by k-induction.")
|
||||
task.terminate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue