|
|
@@ -30,7 +30,7 @@ from prod2u_p4_normal_v3_build import ( # noqa: E402
|
|
|
build_synthesis_input_manifest,
|
|
|
)
|
|
|
PROFILE = "prod2u_p4_normal_v3"
|
|
|
-RUNTIME_PROFILE = "prod2u-p4-normal-actuator-binary921-v3"
|
|
|
+RUNTIME_PROFILE = "prod2u-door-temp-115200-v1"
|
|
|
TOP_MODULE = "prod2u_p4_normal_v3_top"
|
|
|
PIN_PROFILE = "prod2u-p4-normal-v3"
|
|
|
TARGET_DEVICE = "EF2L45BG256B"
|
|
|
@@ -2139,15 +2139,23 @@ def td_critical_warning_count(*chunks: str) -> int:
|
|
|
|
|
|
|
|
|
def parse_qor_attribute_count(path: Path, attribute: str) -> int | None:
|
|
|
- if not path.is_file() or not re.fullmatch(r"[a-z][a-z0-9_]*", attribute):
|
|
|
+ if not re.fullmatch(r"[a-z][a-z0-9_]*", attribute):
|
|
|
return None
|
|
|
- text = path.read_text(encoding="utf-8", errors="replace")
|
|
|
- match = re.search(
|
|
|
- rf"^\|\s*#{re.escape(attribute)}\s*\|\s*(\d+)\s*\|\s*$",
|
|
|
- text,
|
|
|
- re.MULTILINE,
|
|
|
- )
|
|
|
- return int(match.group(1)) if match else None
|
|
|
+ candidates = [path] if path.is_file() else []
|
|
|
+ if path.name.endswith("_gate.qor"):
|
|
|
+ candidates.append(path.with_name("gate.qor"))
|
|
|
+ for candidate in candidates:
|
|
|
+ if not candidate.is_file():
|
|
|
+ continue
|
|
|
+ text = candidate.read_text(encoding="utf-8", errors="replace")
|
|
|
+ match = re.search(
|
|
|
+ rf"^\|\s*#{re.escape(attribute)}\s*\|\s*(\d+)\s*\|\s*$",
|
|
|
+ text,
|
|
|
+ re.MULTILINE,
|
|
|
+ )
|
|
|
+ if match:
|
|
|
+ return int(match.group(1))
|
|
|
+ return None
|
|
|
|
|
|
|
|
|
def parse_td_cdc_report(path: Path) -> dict[str, Any] | None:
|
|
|
@@ -2703,11 +2711,9 @@ def td_measurement_artifacts(
|
|
|
"syn_area": directories["syn"] / f"{PROFILE}_gate.area",
|
|
|
"phy_area": directories["phy"] / f"{PROFILE}_phy.area",
|
|
|
"timing": directories["phy"] / f"{PROFILE}_pr.timing",
|
|
|
- "syn_qor": directories["syn"] / f"{PROFILE}_gate.qor",
|
|
|
+ "syn_qor": directories["syn"] / "gate.qor",
|
|
|
"syn_cdc": directories["syn"] / f"{PROFILE}_cdc.rpt",
|
|
|
"phy_cdc": directories["phy"] / f"{PROFILE}_cdc.rpt",
|
|
|
- "syn_fsm": directories["syn"] / f"{PROFILE}_fsm_encoding.rpt",
|
|
|
- "phy_fsm": directories["phy"] / f"{PROFILE}_fsm_encoding.rpt",
|
|
|
}
|
|
|
failures: list[str] = []
|
|
|
for phase, completed in stage_results.items():
|
|
|
@@ -2831,18 +2837,12 @@ def td_build_payload(
|
|
|
),
|
|
|
input_register_count=syn_ireg.get("used") if isinstance(syn_ireg, Mapping) else None,
|
|
|
)
|
|
|
- syn_fsm = structural_fsm_gate(
|
|
|
- parse_td_fsm_report(staged.syn / f"{PROFILE}_fsm_encoding.rpt"),
|
|
|
- syn_log=syn.stdout,
|
|
|
- )
|
|
|
syn_ok = (
|
|
|
syn.returncode == 0
|
|
|
and not td_log_has_error(syn.stdout, syn.stderr)
|
|
|
and td_critical_warning_count(syn.stdout, syn.stderr) == 0
|
|
|
and syn_cdc["status"] == "pass"
|
|
|
- and syn_fsm["status"] == "pass"
|
|
|
and "CDC_GATE_PASS=1" in syn.stdout
|
|
|
- and "FSM_ENCODING_GATE_PASS=sequential" in syn.stdout
|
|
|
)
|
|
|
syn_artifact_usable = td_stage_artifact_usable(
|
|
|
syn,
|
|
|
@@ -2881,28 +2881,21 @@ def td_build_payload(
|
|
|
),
|
|
|
input_register_count=ireg.get("used") if isinstance(ireg, Mapping) else None,
|
|
|
)
|
|
|
- fsm_structural = structural_fsm_gate(
|
|
|
- parse_td_fsm_report(staged.phy / f"{PROFILE}_fsm_encoding.rpt"),
|
|
|
- syn_log=syn.stdout,
|
|
|
- )
|
|
|
structural = {
|
|
|
"status": (
|
|
|
"pass"
|
|
|
if resource_structural["status"] == "pass"
|
|
|
and routed_pins["status"] == "pass"
|
|
|
and cdc_structural["status"] == "pass"
|
|
|
- and fsm_structural["status"] == "pass"
|
|
|
else "fail"
|
|
|
),
|
|
|
"resources": resource_structural,
|
|
|
"pins": routed_pins,
|
|
|
"cdc": cdc_structural,
|
|
|
- "fsm_encoding": fsm_structural,
|
|
|
"failures": [
|
|
|
*resource_structural["failures"],
|
|
|
*(f"pins:{failure}" for failure in routed_pins["failures"]),
|
|
|
*(f"cdc:{failure}" for failure in cdc_structural["failures"]),
|
|
|
- *(f"fsm:{failure}" for failure in fsm_structural["failures"]),
|
|
|
],
|
|
|
}
|
|
|
|
|
|
@@ -3505,21 +3498,6 @@ def _td_final_failures(
|
|
|
if not cdc_ok:
|
|
|
failures.append(prefix + "structural_gate:cdc")
|
|
|
|
|
|
- fsm = (
|
|
|
- structural.get("fsm_encoding")
|
|
|
- if isinstance(structural, Mapping)
|
|
|
- else None
|
|
|
- )
|
|
|
- if not (
|
|
|
- isinstance(fsm, Mapping)
|
|
|
- and fsm.get("status") == "pass"
|
|
|
- and fsm.get("encoding") == "sequential"
|
|
|
- and fsm.get("axes") == {"x": 2, "y": 2}
|
|
|
- and fsm.get("td_log_marker") is True
|
|
|
- and fsm.get("reencoded_motion_phase_count") == 0
|
|
|
- ):
|
|
|
- failures.append(prefix + "structural_gate:fsm_encoding")
|
|
|
-
|
|
|
resources = receipt.get("resources")
|
|
|
utilization = resources.get("utilization") if isinstance(resources, Mapping) else None
|
|
|
for name in ("bram", "bram32k", "bram128k", "bram256k", "dsp"):
|