From 01e33b62098fc66cd33476a86d0ec8fbe3c9dee2 Mon Sep 17 00:00:00 2001 From: maksyuki Date: Wed, 14 Oct 2026 20:21:20 +0800 Subject: [PATCH] feat(tiny): update regression commands for P7 acceptance and adjust quality workflow tools --- .github/workflows/quality.yml | 6 +++++- scripts/regress.py | 12 ++++++++---- tests/test_script_tools.py | 13 ++++++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 2ac97342..c4e9a8c0 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -21,6 +21,10 @@ jobs: steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Historical publication fixtures are materialized with git archive. + # Keep the immutable revisions named by tests available locally. + fetch-depth: 0 - name: Restore pip cache uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 @@ -117,7 +121,7 @@ jobs: - name: Set up locked test tools uses: ./.github/actions/locked-tools with: - tools: verilator sv2v iverilog yosys + tools: verilator sv2v iverilog yosys riscv_gnu - name: Set up locked accelerator references run: make setup-apu-reference setup-apu-kws-reference setup-npu-reference diff --git a/scripts/regress.py b/scripts/regress.py index 51f4f581..6e0d5c5c 100644 --- a/scripts/regress.py +++ b/scripts/regress.py @@ -72,8 +72,8 @@ PR_COMMANDS = ( ) TINY_PR_COMMANDS = ( ("configs/ci/ihp130-tiny.mk", RTL_LINT_VALUES), - ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "LINK_TYPE=ld2_all_sram", "SIMU=VERILATOR", "SOC_SIM_TIME=1800", "HAVE_CSR=YES", "HAVE_SVA=YES", "firmware", "sim")), - ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "SIMU=IVERILOG", "firmware", "sim")), + ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "TINY_P7_ACCEPTANCE=YES", "LINK_TYPE=ld2_all_sram", "SIMU=VERILATOR", "SOC_SIM_TIME=3600", "TINY_SIM_TIMEOUT=6000000", "HAVE_CSR=YES", "HAVE_SVA=YES", "TINY_SIM_ARGS=+p7_monitor", "firmware", "sim")), + ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "TINY_P7_ACCEPTANCE=YES", "SIMU=IVERILOG", "TINY_SIM_TIMEOUT=6000000", "TINY_SIM_ARGS=+p7_monitor", "TINY_RUN=timeout --foreground 14400s $(VVP) $(SIM_BUILD_ROOT)/simv", "firmware", "sim")), ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "SYNTH=YOSYS", "synth")), ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "SIMU=IVERILOG", "netsim-boot")), ("configs/ci/ihp130-tiny.mk", ("APP=ci_smoke", "STA=OPENSTA", "sta")), @@ -83,8 +83,12 @@ TINY_PROFILES = {"IHP130": "configs/ci/ihp130-tiny.mk", "ICS55": "configs/ci/ics def tiny_commands(pdk: str) -> tuple: - return tuple((TINY_PROFILES[pdk], (*values, "TINY_SIM_ARGS=+tiny_jtag_smoke") - if "sim" in values else values) for _, values in TINY_PR_COMMANDS) + commands = [] + for _, values in TINY_PR_COMMANDS: + if "sim" in values and not any(value.startswith("TINY_SIM_ARGS=") for value in values): + values = (*values, "TINY_SIM_ARGS=+tiny_jtag_smoke") + commands.append((TINY_PROFILES[pdk], values)) + return tuple(commands) PR_COMMANDS = (*PR_COMMANDS, *TINY_PR_COMMANDS) diff --git a/tests/test_script_tools.py b/tests/test_script_tools.py index ca9c2206..50ae1065 100644 --- a/tests/test_script_tools.py +++ b/tests/test_script_tools.py @@ -1313,10 +1313,16 @@ def test_verilator_simulations_use_uniform_timeout() -> None: if "SIMU=VERILATOR" in values: simulation_timeout = [value for value in values if value.startswith("SOC_SIM_TIME=")] if "APP=ci_smoke" in values and "sim" in values: - assert simulation_timeout == ["SOC_SIM_TIME=1800"] + if profile == "configs/ci/ihp130-tiny.mk": + assert simulation_timeout == ["SOC_SIM_TIME=3600"] + assert "TINY_P7_ACCEPTANCE=YES" in values + assert "TINY_SIM_TIMEOUT=6000000" in values + assert "TINY_SIM_ARGS=+p7_monitor" in values + else: + assert simulation_timeout == ["SOC_SIM_TIME=1800"] assert "LINK_TYPE=ld2_all_sram" in values if profile == "configs/ci/ihp130-tiny.mk": - assert not any(value.startswith("VERILATOR_SIM_ARGS=") for value in values) + assert "TINY_P7_ACCEPTANCE=YES" in values else: assert "VERILATOR_SIM_ARGS=--fast-flash" in values assert "HAVE_CSR=YES" in values @@ -1776,7 +1782,8 @@ def test_quality_runs_accelerator_tests_with_locked_references_and_simulators() quality = (ROOT / ".github/workflows/quality.yml").read_text() assert "timeout-minutes: 90" in quality - assert "tools: verilator sv2v iverilog yosys" in quality + assert "tools: verilator sv2v iverilog yosys riscv_gnu" in quality + assert "fetch-depth: 0" in quality assert "rtl/managed/third_party" in quality assert "python3 rtl/ip/setup.py" in quality assert "make CONFIG=configs/ci/ihp130.mk setup-pdk" in quality