From 40bf8fcb87f8d3c89f88fad728c4ae03921bc329 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Wed, 24 Jan 2024 16:08:31 +0100 Subject: [PATCH] sby_design: Also track fairness assumptions --- sbysrc/sby_design.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sbysrc/sby_design.py b/sbysrc/sby_design.py index a449a9b6..df2977fd 100644 --- a/sbysrc/sby_design.py +++ b/sbysrc/sby_design.py @@ -55,6 +55,7 @@ class Type(Enum): ASSERT = auto() COVER = auto() LIVE = auto() + FAIR = auto() def __str__(self): return self.name @@ -69,6 +70,8 @@ def from_cell(c, name): return c.COVER if name == "$live": return c.LIVE + if name == "$fair": + return c.FAIR raise ValueError("Unknown property type: " + name) @classmethod @@ -81,6 +84,8 @@ def from_flavor(c, name): return c.COVER if name == "live": return c.LIVE + if name == "fair": + return c.FAIR raise ValueError("Unknown property type: " + name) name: str @@ -198,7 +203,7 @@ def make_mod_hier(instance_name, module_name, hierarchy="", path=()): raise ValueError(f"Cannot find module {module_name}") for sort in cell_sorts: - if sort["type"] in ["$assume", "$assert", "$cover", "$live"]: + if sort["type"] in ["$assume", "$assert", "$cover", "$live", "$fair"]: for cell in sort["cells"]: try: location = cell["attributes"]["src"]