From 856cbf01e41f02f5e25ecf727aca7704fa0f24be Mon Sep 17 00:00:00 2001 From: Kareem Farid Date: Tue, 14 Jan 2025 14:06:51 +0200 Subject: [PATCH] feat!: quit on hold violations on all corners (#587) Causes hold violations to raise an error on any corner, not just typical corners. --------- Signed-off-by: Kareem Farid --- Changelog.md | 18 ++++++++++++++++++ openlane/steps/checker.py | 2 ++ pyproject.toml | 2 +- test/steps/test_all_steps.py | 17 ++++++++++++++++- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5a8ecdbc2..a81ae9606 100644 --- a/Changelog.md +++ b/Changelog.md @@ -18,6 +18,11 @@ ## Steps +* `Checker.HoldViolations` + + * Changed default value of `HOLD_VIOLATION_CORNERS` to `['*']`, which will + raise an error for hold violations on *any* corners. + * `Odb.AddPDNObstructions`, `Odb.AddRoutingObstructions` * `PDN_OBSTRUCTIONS` and `ROUTING_OBSTRUCTIONS` are now lists of tuples @@ -108,6 +113,13 @@ * Updated OpenROAD to `1d61007` * Updated OpenSTA to `aa598a2` +## Testing + +* Step unit tests now load the PDK configs first before overriding them. This + has a minor performance penalty compared to the previous "raw" load, but + allows unit tests to be updated less frequently (especially to work with new + PDK variables.) + ## Misc. Enhancements/Bugfixes * `openlane.state` @@ -143,6 +155,12 @@ ## API Breaks +* `Checker.HoldViolations` + + * `HOLD_VIOLATION_CORNERS` now defaulting to all corners will require designs + that have hold violations at non-typical corners to set its value explicitly + to `["*tt*"]`. + * `Odb.AddRoutingObstructions`, `Odb.AddPDNObstructions` * Typing for representation of obstructions has been changed. Designs with a diff --git a/openlane/steps/checker.py b/openlane/steps/checker.py index a0fe3cc53..e264cfda1 100644 --- a/openlane/steps/checker.py +++ b/openlane/steps/checker.py @@ -486,6 +486,7 @@ def get_corner_variable(cls) -> Variable: cls.base_corner_var_name.replace("TIMING", replace_by), Optional[List[str]], f"A list of wildcards matching IPVT corners to use during checking for {cls.violation_type} violations.", + pdk=True, ) if cls.corner_override: variable.default = cls.corner_override @@ -644,3 +645,4 @@ class HoldViolations(TimingViolations): violation_type = "hold" metric_name = "timing__hold_vio__count" + corner_override = ["*"] diff --git a/pyproject.toml b/pyproject.toml index fd36212cc..14bb36881 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openlane" -version = "3.0.0.dev8" +version = "3.0.0.dev9" description = "An infrastructure for implementing chip design flows" authors = ["Efabless Corporation and Contributors "] readme = "Readme.md" diff --git a/test/steps/test_all_steps.py b/test/steps/test_all_steps.py index 13fbb9c76..12fcba1e1 100644 --- a/test/steps/test_all_steps.py +++ b/test/steps/test_all_steps.py @@ -75,8 +75,11 @@ def attribute_from_file(file: str, attribute: str): def test_step_folder(test: str, pdk_root: str, caplog: pytest.LogCaptureFixture): from openlane.steps import Step from openlane.state import State + from openlane.config import Config from openlane.common import Toolbox, get_script_dir from openlane.steps.openroad_alerts import SupportsOpenROADAlerts + from decimal import Decimal + import json sys.path.insert(0, os.getcwd()) @@ -134,7 +137,19 @@ def on_alert(self, alert): state_in = State() # 2. Load and Launch Step - target = Target.load(config, state_in, pdk_root) + + if not isinstance(config, Config): + config_object, _ = Config.load( + config_in=json.loads(open(config).read(), parse_float=Decimal), + flow_config_vars=Target.get_all_config_variables(), + design_dir=".", + pdk_root=pdk_root, + _load_pdk_configs=True, + ) + else: + config_object = config + + target = Target.load(config_object, state_in, pdk_root) exception: Optional[Exception] = None try: