mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-06 14:55:14 +00:00
refactor: refactor Yosys synthesis flow to support multiple recipes
- Introduced SYNTH_RECIPE variable to select between balanced, area, and speed synthesis recipes. - Updated Makefile to handle new SYNTH_RECIPE variable and its validation. - Modified synthesis scripts to utilize the selected recipe, ensuring outputs are directed to the appropriate directories. - Enhanced documentation to reflect changes in synthesis flow and directory structure. - Added tests to verify correct behavior of new synthesis recipes and their integration into the regression suite. - Removed obsolete scripts and configurations related to previous synthesis methods.
This commit is contained in:
23 files changed
+391
-232
No files matched your search
@@ -858,10 +858,60 @@ def test_pdk_pr_regressions_cover_firmware_rtl_and_netlist() -> None:
|
||||
)
|
||||
assert any("SIMU=IVERILOG" in values and "sim-asm" in values for values in command_values)
|
||||
assert any("SYNTH=YOSYS" in values and "synth" in values for values in command_values)
|
||||
assert not any(
|
||||
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)
|
||||
|
||||
|
||||
def test_nightly_regression_runs_optional_yosys_recipes() -> None:
|
||||
commands, profiles = select_regression("nightly", "IHP130")
|
||||
|
||||
assert commands == NIGHTLY_COMMANDS
|
||||
assert profiles == ("configs/ci/ihp130.mk",)
|
||||
assert (
|
||||
"configs/ci/ihp130.mk",
|
||||
("SYNTH=YOSYS", "SYNTH_RECIPE=area", "synth"),
|
||||
) in NIGHTLY_COMMANDS
|
||||
assert (
|
||||
"configs/ci/ihp130.mk",
|
||||
("SYNTH=YOSYS", "SYNTH_RECIPE=speed", "synth"),
|
||||
) in NIGHTLY_COMMANDS
|
||||
assert not any(
|
||||
any(value.startswith("SYNTH_RECIPE=") for value in values) for _, values in PR_COMMANDS
|
||||
)
|
||||
|
||||
nightly = run(
|
||||
sys.executable,
|
||||
str(ROOT / "scripts/regress.py"),
|
||||
"--root",
|
||||
str(ROOT),
|
||||
"--suite",
|
||||
"nightly",
|
||||
"--pdk",
|
||||
"IHP130",
|
||||
"--dry-run",
|
||||
)
|
||||
assert "+ make CONFIG=configs/ci/ihp130.mk SYNTH=YOSYS SYNTH_RECIPE=area synth" in nightly.stdout
|
||||
assert "+ make CONFIG=configs/ci/ihp130.mk SYNTH=YOSYS SYNTH_RECIPE=speed synth" in nightly.stdout
|
||||
|
||||
pr = run(
|
||||
sys.executable,
|
||||
str(ROOT / "scripts/regress.py"),
|
||||
"--root",
|
||||
str(ROOT),
|
||||
"--suite",
|
||||
"pr",
|
||||
"--pdk",
|
||||
"IHP130",
|
||||
"--dry-run",
|
||||
)
|
||||
assert "+ make CONFIG=configs/ci/ihp130.mk SYNTH=YOSYS synth" in pr.stdout
|
||||
assert "SYNTH_RECIPE=area" not in pr.stdout
|
||||
assert "SYNTH_RECIPE=speed" not in pr.stdout
|
||||
|
||||
|
||||
def test_regression_observations_do_not_block_or_skip_metrics(
|
||||
monkeypatch, tmp_path: Path, capsys
|
||||
) -> None:
|
||||
|
||||
Reference in new issue
Block a user