|
|
@@ -203,15 +203,16 @@ def compiled_property_ids(workdir: Path) -> tuple[list[str], list[str], str, lis
|
|
|
for module in modules if isinstance(modules, list) else []:
|
|
|
module_name = str(module.get("name", ""))
|
|
|
for cell_sort in module.get("cell_sorts", []):
|
|
|
+ sort_type = str(cell_sort.get("type", ""))
|
|
|
for cell in cell_sort.get("cells", []):
|
|
|
name = str(cell.get("name", ""))
|
|
|
flavor = cell.get("parameters", {}).get("FLAVOR")
|
|
|
if not module_name or not name:
|
|
|
continue
|
|
|
identifier = f"{module_name}.{name}"
|
|
|
- if flavor == "assert":
|
|
|
+ if sort_type == "$assert" or flavor == "assert":
|
|
|
assertions.add(identifier)
|
|
|
- elif flavor == "cover":
|
|
|
+ elif sort_type == "$cover" or flavor == "cover":
|
|
|
covers.add(identifier)
|
|
|
except (OSError, UnicodeError, json.JSONDecodeError, AttributeError, TypeError) as exc:
|
|
|
failures.append(f"compiled_properties_unavailable:{type(exc).__name__}")
|
|
|
@@ -231,6 +232,16 @@ def cover_hit_ids(workdir: Path) -> list[str]:
|
|
|
return sorted(hits)
|
|
|
|
|
|
|
|
|
+def property_cell_ids(values: Iterable[str]) -> set[str]:
|
|
|
+ """Normalize JNY module IDs and SBY hierarchical IDs to cell names."""
|
|
|
+ normalized: set[str] = set()
|
|
|
+ for value in values:
|
|
|
+ positions = [value.rfind(marker) for marker in ("$assert$", "$cover$")]
|
|
|
+ start = max(positions)
|
|
|
+ normalized.add(value[start:] if start >= 0 else value)
|
|
|
+ return normalized
|
|
|
+
|
|
|
+
|
|
|
def relative_artifacts(workdir: Path, pattern: str) -> list[dict[str, str]]:
|
|
|
return [
|
|
|
{"path": path.relative_to(ROOT).as_posix(), "sha256": sha256_file(path)}
|
|
|
@@ -298,7 +309,7 @@ def run_job(job: dict[str, Any], run_root: Path, timeout: int) -> dict[str, Any]
|
|
|
hits = cover_hit_ids(workdir)
|
|
|
if not covers:
|
|
|
failures.append("compiled_covers_missing")
|
|
|
- if set(hits) != set(covers):
|
|
|
+ if property_cell_ids(hits) != property_cell_ids(covers):
|
|
|
failures.append(f"cover_hit_set_mismatch:{len(hits)}/{len(covers)}")
|
|
|
if not relative_artifacts(workdir, "*.vcd"):
|
|
|
failures.append("cover_trace_missing")
|
|
|
@@ -321,6 +332,8 @@ def run_job(job: dict[str, Any], run_root: Path, timeout: int) -> dict[str, Any]
|
|
|
"compiled_design_sha256": design_hash,
|
|
|
"compiled_assertion_count": len(assertions),
|
|
|
"compiled_cover_count": len(covers),
|
|
|
+ "compiled_assertion_ids": assertions,
|
|
|
+ "compiled_cover_ids": covers,
|
|
|
"cover_hit_ids": cover_hit_ids(workdir) if target["mode"] == "cover" else [],
|
|
|
"traces": relative_artifacts(workdir, "*.vcd") if target["mode"] == "cover" else [],
|
|
|
"evidence_failures": failures,
|