Просмотр исходного кода

Route legacy replay selectors through the actual current source closure

codex 2 месяцев назад
Родитель
Сommit
6e59cebf39
2 измененных файлов с 6 добавлено и 27 удалено
  1. 2 0
      tests/unit/test_6400_canonical_packages.py
  2. 4 27
      tools/package_6400_canonical.py

+ 2 - 0
tests/unit/test_6400_canonical_packages.py

@@ -89,6 +89,8 @@ def test_active_sets_exclude_old_profiles_and_scratch() -> None:
     assert "tools/resource_scheduler.py" in canonical.base_paths()
     assert "tools/overlay_6400_packages.py" in canonical.base_paths()
     assert "docs/generated/6400-channel-map.md" in canonical.current_paths()
+    assert "src/top/prod2u_mrdimm_top.v" in selected
+    assert "products/6400-front-rear/analysis-replay-closure.json" not in selected
 
 
 def test_fake_marker_cannot_satisfy_current(tmp_path: Path) -> None:

+ 4 - 27
tools/package_6400_canonical.py

@@ -102,8 +102,9 @@ def production_sources() -> list[str]:
 
 
 def replay_paths() -> list[str]:
-    payload = json.loads((ROOT / "products/6400-front-rear/analysis-replay-closure.json").read_text())
-    return list(payload["paths"])
+    # Compatibility name for the one active CPLD replay selector.
+    from tools.source_package_closure import current_cpld_paths
+    return current_cpld_paths(ROOT)
 
 
 def base_paths() -> list[str]:
@@ -138,31 +139,7 @@ def base_paths() -> list[str]:
 
 def current_paths() -> list[str]:
     base = set(base_paths())
-    product = [
-        "contracts/6400-snapshot.yaml", "contracts/6400-wire.yaml",
-        "products/6400-front-rear/project.json", "products/6400-front-rear/source-closure.json",
-        "products/6400-front-rear/analysis-replay-closure.json", "projects/registry.json",
-        "constraints/prod2u_6400_front_back.adc", "constraints/prod2u_6400_front_back.sdc",
-        "td/prod2u_6400_front_back.prj", "td/syn/prod2u_6400_front_back.tcl",
-        "td/phy/prod2u_6400_front_back.tcl", "td/bitgen/prod2u_6400_front_back.tcl",
-    ]
-    generated_names = {
-        "host-contract.json", "manual-uart-contract.json", "host-i2c-register-map.json",
-        "golden-vectors.json", "snapshot-layout.json", "channel-map.json",
-        "fan-control-parameters.json", "contract-sha256.txt", "prod2u_6400_v1_params.vh",
-        "host-i2c-pin-evidence.json",
-    }
-    generated = [
-        (ROOT / "generated/6400" / name).relative_to(ROOT).as_posix()
-        for name in sorted(generated_names)
-        if (ROOT / "generated/6400" / name).is_file()
-    ]
-    generated.append("docs/electrical/host-i2c-pin-evidence-lock.md")
-    generated.append("docs/generated/6400-channel-map.md")
-    specific_sources = [p for p in production_sources() if p not in base]
-    focused = [p for p in replay_paths() if p not in base]
-    focused.append("tests/unit/test_6400_canonical_packages.py")
-    return sorted(set(product + generated + specific_sources + focused))
+    return sorted(path for path in replay_paths() if path not in base)
 
 
 def fingerprint(files: dict[str, bytes]) -> str: