Files
retroSoC/tests/publication_history.py
T
maksyuki 952b060a70 feat(tiny): integrate P6 shared IP and eight-channel DMA
Integrate RNG, CRC, WS2812, Crypto, I2S master and the SDIO private AXI owner on SAFE24. Preserve the 128 KiB main SRAM and six private Crypto macros, add product-specific DMA assignments and reject unsupported SDK operations.

Correct APB read strobes, I2S receive assembly and SDIO command timing, backpressure and descriptor retirement. Add pin-level workloads, source-bound evidence checks and publication/commercial consumer compatibility.

Validation of the final P6 worktree: 1726 pytest tests passed with one optional pypdf skip (exit 0, 4021.61 seconds; terminal session 36439). Both PDKs passed both RTL simulators, netlist boot and 38-macro binding checks. Shared formal, Mini compatibility and software/source quality gates passed.

Evidence remains attributed to the retained dirty-worktree snapshots based on b3b30a72cd under build/ics55-tiny-2026-10-12-11-50-2eb98c0e1fae/meta/tiny-r2-p6/. Timing is negative and warning observations are not promoted. This commit does not accept P6, qualify physical operation or enable P7.
2026-10-12 21:43:30 +08:00

41 lines
1.8 KiB
Python

"""Materialize immutable, locally available publication test inputs.
This is a test fixture, never a publication promotion or a current-RTL verdict.
Each exported tree keeps its own adapter, technical contract, tests and lock.
"""
from __future__ import annotations
import io
import json
import subprocess
import tarfile
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
ORIGINAL_BOOK = "2805ea91833a6bede32f3a82df3d17d20eb5ec77"
P5_CONTRACT = "b3b30a72cd6ef5340c28e5044c96cd13258ec5a6"
def export(repository: Path, revision: str, destination: Path, paths: list[str] = ()) -> None:
data = subprocess.check_output(["git", "-C", str(repository), "archive", revision, *paths])
destination.mkdir(parents=True, exist_ok=True)
with tarfile.open(fileobj=io.BytesIO(data)) as archive:
for member in archive.getmembers():
target = (destination / member.name).resolve()
if not target.is_relative_to(destination.resolve()) or member.issym() or member.islnk():
raise ValueError("unsafe publication fixture archive member")
archive.extractall(destination)
def snapshot(destination: Path, revision: str) -> Path:
export(ROOT, revision, destination, ["publications", "scripts", "rtl", "crt", "app",
"configs", "docs", "dependencies", "LICENSE",
"Makefile", "README.md", "tests"])
lock = json.loads((destination / "dependencies/dependencies.lock.json").read_text())
for name in ("cluster_common", "cluster_archinfo", "cluster_pwm", "cluster_rtc",
"cluster_wdg", "hazard3"):
source = lock["sources"][name]
export(ROOT / source["destination"], source["revision"], destination / source["destination"],
["hdl"] if name == "hazard3" else [])
return destination