| 123456789101112131415161718192021222324252627282930 |
- import json
- from pathlib import Path
- ROOT = Path(__file__).resolve().parents[2]
- def test_production_closure_excludes_legacy_and_stimulus_wrapper() -> None:
- closure = json.loads((ROOT / "products/6400-control/source-closure.json").read_text())
- sources = "\n".join(closure["sources"])
- assert "identification" not in sources
- for forbidden in ("door_", "motor", "host_watchdog", "EF2_PHY_PLL"):
- assert forbidden not in sources
- assert closure["top_module"] == "prod2u_6400_v1_top"
- def test_known_pins_are_unique_and_ttl_is_explicitly_unbound() -> None:
- project = json.loads((ROOT / "products/6400-control/project.json").read_text())
- assert project["ttl_pin_status"] == "unbound"
- adc = (ROOT / project["constraints"]).read_text()
- assert "host_ttl" not in adc
- locations = [line.split("LOCATION = ", 1)[1].split(";", 1)[0] for line in adc.splitlines() if "LOCATION = " in line]
- assert len(locations) == len(set(locations))
- def test_no_host_watchdog_or_pll_in_6400_sources() -> None:
- closure = json.loads((ROOT / "products/6400-control/source-closure.json").read_text())
- text = "\n".join((ROOT / source).read_text(errors="ignore") for source in closure["sources"] if source.endswith(".v"))
- assert "host_watchdog" not in text
- assert "EF2_PHY_PLL" not in text
|