mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-06 14:55:14 +00:00
feat: update netsim target handling in PDK PR commands and adjust corresponding test
This commit is contained in:
2 files changed
+15
-4
No files matched your search
+5
-1
@@ -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,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user