From e1b49ac0ece4c1cef3a6108ff42781c9e97d60b9 Mon Sep 17 00:00:00 2001 From: maksyuki Date: Mon, 24 Aug 2026 09:31:08 +0800 Subject: [PATCH] feat: update netsim target handling in PDK PR commands and adjust corresponding test --- scripts/regress.py | 6 +++++- tests/test_script_tools.py | 13 ++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/regress.py b/scripts/regress.py index 7c2a43bd..9f812133 100644 --- a/scripts/regress.py +++ b/scripts/regress.py @@ -85,9 +85,13 @@ PDK_PR_PROFILES = { "ICS55": "configs/ci/ics55.mk", "SKY130": "configs/ci/sky130.mk", } +NETSIM_BOOT_PROFILES = frozenset( + ("configs/ci/gf180.mk", "configs/ci/ics55.mk") +) def pdk_pr_commands(profile: str) -> tuple[tuple[str, tuple[str, ...]], ...]: + netsim_target = "netsim-boot" if profile in NETSIM_BOOT_PROFILES else "netsim" return ( (profile, RTL_LINT_VALUES), (profile, (CI_SMOKE_APP_VALUE, "firmware")), @@ -104,7 +108,7 @@ def pdk_pr_commands(profile: str) -> tuple[tuple[str, tuple[str, ...]], ...]: "SIMU=IVERILOG", "SIM_FIRMWARE_NAME=retrosoc_asm", "RTL_SIM_TIMEOUT=5200000", - "netsim", + netsim_target, ), ), ) diff --git a/tests/test_script_tools.py b/tests/test_script_tools.py index d0ce241c..065af560 100644 --- a/tests/test_script_tools.py +++ b/tests/test_script_tools.py @@ -1076,9 +1076,9 @@ def test_smoke_regression_uses_ihp130_behavioral_coverage_only() -> None: assert "smoke regression supports only --pdk IHP130" in invalid.stderr -def test_pdk_pr_regressions_cover_firmware_rtl_and_netlist() -> None: +def test_pdk_pr_regressions_cover_firmware_rtl_and_selected_netlist_target() -> None: assert set(PDK_PR_PROFILES) == {"GF180", "IHP130", "ICS55", "SKY130"} - for profile in PDK_PR_PROFILES.values(): + for pdk, profile in PDK_PR_PROFILES.items(): commands = pdk_pr_commands(profile) command_values = [values for _, values in commands] assert command_values[0] == RTL_LINT_VALUES @@ -1093,7 +1093,14 @@ def test_pdk_pr_regressions_cover_firmware_rtl_and_netlist() -> None: any(value.startswith("SYNTH_RECIPE=") for value in values) for values in command_values ) assert ("STA=OPENSTA", "sta") in command_values - assert any("SIMU=IVERILOG" in values and "netsim" in values for values in command_values) + netlist_targets = { + value + for values in command_values + for value in values + if value in {"netsim", "netsim-boot"} + } + expected_target = "netsim-boot" if pdk in {"GF180", "ICS55"} else "netsim" + assert netlist_targets == {expected_target} def test_nightly_regression_runs_optional_yosys_recipes() -> None: