diff --git a/.github/scripts/add_openroad_overrides.py b/.github/scripts/add_openroad_overrides.py new file mode 100644 index 000000000..39c42754d --- /dev/null +++ b/.github/scripts/add_openroad_overrides.py @@ -0,0 +1,99 @@ +# Copyright 2024 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import re +import argparse +import subprocess +import sys +import json +import os + + +def get_submodule_revs(filter, repository, commit): + api_result = None + filter = re.compile(filter) + + try: + api_result = subprocess.check_output( + [ + "curl", + "--fail", + "-s", + "-L", + "-H", + "Accept: application/vnd.github.v3+json", + f"https://api.github.com/repos/{repository}/git/trees/{commit}?recursive=True", + ] + ) + except Exception as e: + print(e, file=sys.stderr) + sys.exit(os.EX_DATAERR) + + api_result_parsed = json.loads(api_result) + api_result_tree = api_result_parsed["tree"] + submodules = [element for element in api_result_tree if element["type"] == "commit"] + return { + submodule["path"]: submodule["sha"] + for submodule in submodules + if filter.search(submodule["path"]) + } + + +def override_openroad_versions(commit): + info = { + "openroad": { + "rev": commit, + "repo": "The-OpenROAD-Project/OpenROAD", + } + } + submodule_revs = get_submodule_revs(r"sta|abc", info["openroad"]["repo"], commit) + info["opensta"] = { + "rev": submodule_revs["src/sta"], + "repo": "The-OpenROAD-Project/OpenSTA", + } + info["openroad-abc"] = { + "rev": submodule_revs["third-party/abc"], + "repo": "The-OpenROAD-Project/abc", + } + for derivation, info in info.items(): + prefetch_info = subprocess.check_output( + [ + "nix", + "run", + "github:seppeljordan/nix-prefetch-github", + "--", + "--rev", + info["rev"], + ] + + info["repo"].split("/"), + encoding="utf8", + ) + prefetch_info_json = json.loads(prefetch_info) + hash = prefetch_info_json["hash"] + subprocess.check_call( + [ + "sed", + "-i.bak", + f"s/# {derivation}-rev-sha/rev = \"{info['rev']}\"; sha256 = \"{hash}\";/", + "flake.nix", + ] + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Adds overrides for a given OpenROAD commit hash to flake.nix. Requires Nix with Flakes+Nix-Command enabled as well as curl and GNU sed." + ) + parser.add_argument("commit", help="commit hash") + args = parser.parse_args() + override_openroad_versions(args.commit) diff --git a/.github/scripts/update_tools.py b/.github/scripts/update_tools.py index 78988953a..e1b2ce442 100644 --- a/.github/scripts/update_tools.py +++ b/.github/scripts/update_tools.py @@ -32,6 +32,7 @@ tools = Tool.from_metadata_yaml(open(metadata_path).read()) + # Handle Multiline Strings Properly / https://stackoverflow.com/a/33300001 def represent_str(dumper: yaml.Dumper, data: str): if "\n" in data: diff --git a/.gitignore b/.gitignore index ec3c5d0b8..1506bcd8e 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,6 @@ pdks/ /install # Venv -/venv \ No newline at end of file +/venv + +sandbox diff --git a/README.md b/README.md index 54adea6f2..68046fb62 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +

+ + Banner explaining that OpenLane is currently only for hardening Caravel User Project-based designs targeting chipIgnite + +

+

OpenLane

License: Apache 2.0 @@ -10,12 +16,6 @@ OpenLane is an automated RTL to GDSII flow based on several components including You can check out the documentation, including in-depth guides and reference manuals at [ReadTheDocs](https://openlane.readthedocs.io/). -

- - Banner promoting OpenLane 2 - -

- ## Installation, the short version The short version is, to install the OpenLane environment... diff --git a/default.nix b/default.nix index d1cb214ad..d14b661cf 100644 --- a/default.nix +++ b/default.nix @@ -31,31 +31,33 @@ openroad, klayout, netgen, - magic, + magic-vlsi, verilog, verilator, + volare, tclFull, -}: -let - pyenv = (python3.withPackages (ps: with ps; [ - libparse - click - pyyaml - XlsxWriter - klayout-pymod - ])); +}: let + pyenv = python3.withPackages (ps: + with ps; [ + libparse + click + pyyaml + XlsxWriter + klayout-pymod + volare + ]); pyenv-sitepackages = "${pyenv}/${pyenv.sitePackages}"; in stdenv.mkDerivation rec { name = "openlane1"; - + src = [ ./flow.tcl ./scripts ./configuration ./dependencies ]; - + unpackPhase = '' echo $src for file in $src; do @@ -64,49 +66,51 @@ in done ls -lah ''; - + passthru = { pyenv = pyenv; }; - + includedTools = [ yosys opensta openroad klayout netgen - magic + magic-vlsi verilog verilator tclFull ]; - - propagatedBuildInputs = includedTools ++ [ - pyenv - ncurses - coreutils-full - gnugrep - gnused - bash - gnutar - gzip - git - ]; - + + propagatedBuildInputs = + includedTools + ++ [ + pyenv + ncurses + coreutils-full + gnugrep + gnused + bash + gnutar + gzip + git + ]; + nativeBuildInputs = [makeWrapper]; - + installPhase = '' mkdir -p $out/bin cp -r * $out/bin wrapProgram $out/bin/flow.tcl\ - --set PATH ${lib.makeBinPath (propagatedBuildInputs)}\ - --set PYTHONPATH ${pyenv-sitepackages} + --set PATH ${lib.makeBinPath propagatedBuildInputs}\ + --set PYTHONPATH ${pyenv-sitepackages} ''; - + doCheck = true; - - computed_PATH = lib.makeBinPath (propagatedBuildInputs); - + + computed_PATH = lib.makeBinPath propagatedBuildInputs; + meta = with lib; { description = "RTL-to-GDSII flow for application-specific integrated circuits (ASIC)s"; homepage = "https://efabless.com/openlane"; diff --git a/dependencies/includedyaml/__init__.py b/dependencies/includedyaml/__init__.py index 9bd754e9a..3ab3c4649 100644 --- a/dependencies/includedyaml/__init__.py +++ b/dependencies/includedyaml/__init__.py @@ -17,6 +17,7 @@ import io + # ------------------------------------------------------------------------------ # XXX "Warnings control" is now deprecated. Leaving in the API function to not # break code that uses it. diff --git a/dependencies/includedyaml/constructor.py b/dependencies/includedyaml/constructor.py index 1de226faf..e7514be94 100644 --- a/dependencies/includedyaml/constructor.py +++ b/dependencies/includedyaml/constructor.py @@ -856,6 +856,7 @@ def set_python_instance_state(self, instance, state): UnsafeConstructor.construct_python_object_apply, ) + # Constructor is same as UnsafeConstructor. Need to leave this in place in case # people have extended it directly. class Constructor(UnsafeConstructor): diff --git a/dependencies/includedyaml/emitter.py b/dependencies/includedyaml/emitter.py index 2f6311cbe..e4700f86f 100644 --- a/dependencies/includedyaml/emitter.py +++ b/dependencies/includedyaml/emitter.py @@ -834,9 +834,9 @@ def analyze_scalar(self, scalar): # Spaces followed by breaks, as well as special character are only # allowed for double quoted scalars. if space_break or special_characters: - allow_flow_plain = ( - allow_block_plain - ) = allow_single_quoted = allow_block = False + allow_flow_plain = allow_block_plain = allow_single_quoted = allow_block = ( + False + ) # Although the plain scalar writer supports breaks, we never emit # multiline plain scalars. diff --git a/dependencies/tool.py b/dependencies/tool.py index d8c30c721..599cf9d0f 100644 --- a/dependencies/tool.py +++ b/dependencies/tool.py @@ -84,12 +84,14 @@ def from_metadata_yaml(metadata_yaml: str) -> Dict[str, "Tool"]: commit=tool["commit"], build_script=tool.get("build") or "", default_branch=tool.get("default_branch") or None, - in_container=tool["in_container"] - if tool.get("in_container") is not None - else True, - in_install=tool["in_install"] - if tool.get("in_install") is not None - else True, + in_container=( + tool["in_container"] + if tool.get("in_container") is not None + else True + ), + in_install=( + tool["in_install"] if tool.get("in_install") is not None else True + ), pdk=tool.get("pdk") or False, ) return final_dict diff --git a/dependencies/verify_versions.py b/dependencies/verify_versions.py index 07dfc4add..c7958d8bf 100644 --- a/dependencies/verify_versions.py +++ b/dependencies/verify_versions.py @@ -128,7 +128,8 @@ def verify_versions( ) for name, commit in tool_versions: - print(name, commit) + if name not in manifest_dict: + continue manifest_commit = manifest_dict[name]["commit"] if commit != manifest_commit: diff --git a/dependencies/version.py b/dependencies/version.py index 191f61a34..dfb83e90d 100644 --- a/dependencies/version.py +++ b/dependencies/version.py @@ -401,7 +401,6 @@ def _legacy_cmpkey(version): class Version(_BaseVersion): - _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) def __init__(self, version): diff --git a/docker/docker.nix b/docker/docker.nix index fd2793e27..25c6090bb 100644 --- a/docker/docker.nix +++ b/docker/docker.nix @@ -25,15 +25,11 @@ silver-searcher, coreutils, }: - -assert builtins.elem system ["x86_64-linux" "aarch64-linux"]; - -let - docker-arch-name = if system == "x86_64-linux" then - "amd64" - else - "arm64v8" - ; +assert builtins.elem system ["x86_64-linux" "aarch64-linux"]; let + docker-arch-name = + if system == "x86_64-linux" + then "amd64" + else "arm64v8"; in (createDockerImage { inherit pkgs; inherit lib; @@ -53,7 +49,7 @@ in (createDockerImage { }; maxLayers = 2; channelURL = "https://nixos.org/channels/nixos-23.11"; - + image-created = "now"; image-extraCommands = '' mkdir -p ./etc @@ -63,7 +59,7 @@ in (createDockerImage { autoload -U compinit && compinit autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp autoload -U colors && colors - + export PS1=$'%{\033[31m%}OpenLane Container%{\033[0m%}:%{\033[32m%}%~%{\033[0m%}%% '; HEREDOC ''; @@ -74,10 +70,10 @@ in (createDockerImage { openlane1.computed_PATH ]; image-config-extra-env = [ - "LANG=C.UTF-8" - "LC_ALL=C.UTF-8" - "LC_CTYPE=C.UTF-8" - "EDITOR=nvim" - "TMPDIR=/tmp" + "LANG=C.UTF-8" + "LC_ALL=C.UTF-8" + "LC_CTYPE=C.UTF-8" + "EDITOR=nvim" + "TMPDIR=/tmp" ]; }) diff --git a/docs/_static/eco_flow.png b/docs/_static/eco_flow.png deleted file mode 100644 index 5986d7fcb..000000000 Binary files a/docs/_static/eco_flow.png and /dev/null differ diff --git a/docs/_static/eco_results.png b/docs/_static/eco_results.png deleted file mode 100644 index 6da1a239f..000000000 Binary files a/docs/_static/eco_results.png and /dev/null differ diff --git a/docs/_static/flow.png b/docs/_static/flow.png new file mode 100644 index 000000000..e3df01f6b Binary files /dev/null and b/docs/_static/flow.png differ diff --git a/docs/_static/flow_v1.png b/docs/_static/flow_v1.png deleted file mode 100644 index a93f71520..000000000 Binary files a/docs/_static/flow_v1.png and /dev/null differ diff --git a/docs/_static/ol2_banner.png b/docs/_static/ol2_banner.png new file mode 100644 index 000000000..47ac2b49c Binary files /dev/null and b/docs/_static/ol2_banner.png differ diff --git a/docs/_static/ol2_banner.svg b/docs/_static/ol2_banner.svg index 2ab3ce2a6..080642eb8 100644 --- a/docs/_static/ol2_banner.svg +++ b/docs/_static/ol2_banner.svg @@ -2,19 +2,20 @@ Try OpenLane 2!Feeling adventurous? Take a sneak peek at thenext generation of OpenLane, rebuilt from the groundWhile OpenLane 1 remains the primary stable version for designs targeting Efablessup for customizability.chipIgnite, we are no longer actively adding new features.Introducing: OpenLane 2! + id="tspan3" />Click here to go to the current version, OpenLane 2. diff --git a/docs/_static/striVe.jpeg b/docs/_static/striVe.jpeg deleted file mode 100644 index 6f0066e8b..000000000 Binary files a/docs/_static/striVe.jpeg and /dev/null differ diff --git a/docs/source/flow_overview.md b/docs/source/flow_overview.md index 85cb4fd59..77e973d92 100644 --- a/docs/source/flow_overview.md +++ b/docs/source/flow_overview.md @@ -1,55 +1,44 @@ # OpenLane Architecture -![A diagram showing the general stages of the OpenLane flow as a series of blocks](../_static/flow_v1.png) +![A diagram showing the general stages of the OpenLane flow as a series of blocks](../_static/flow.png) - -## OpenLane Design Stages +## OpenLane Flow Stages OpenLane flow consists of several stages. By default all flow steps are run in sequence. Each stage may consist of multiple sub-stages. OpenLane can also be run interactively as shown [here][25]. 1. **Synthesis** - 1. `yosys/abc` - Perform RTL synthesis and technology mapping. - 2. `OpenSTA` - Performs static timing analysis on the resulting netlist to generate timing reports + 1. [Yosys](https://github.com/yosyshq/yosys) - Perform RTL synthesis and technology mapping. + 2. [OpenSTA](https://github.com/the-openroad-project/opensta) - Performs static timing analysis on the resulting netlist to generate timing reports 2. **Floorplaning** - 1. `init_fp` - Defines the core area for the macro as well as the rows (used for placement) and the tracks (used for routing) - 2. `ioplacer` - Places the macro input and output ports - 3. `pdngen` - Generates the power distribution network - 4. `tapcell` - Inserts welltap and decap cells in the floorplan + 1. [OpenROAD/Initialize Floorplan](https://github.com/the-openroad-project/openroad/tree/master/src/ifp) - Defines the core area for the macro as well as the rows (used for placement) and the tracks (used for routing) + 2. OpenLane IO Placer - Places the macro input and output ports + 3. [OpenROAD/PDN Generator](https://github.com/the-openroad-project/openroad/tree/master/src/pdn) - Generates the power distribution network + 4. [OpenROAD/Tapcell](https://github.com/the-openroad-project/openroad/tree/master/src/tap) - Inserts welltap and endcap cells in the floorplan 3. **Placement** - 1. `RePLace` - Performs global placement - 2. `Resizer` - Performs optional optimizations on the design - 3. `OpenDP` - Performs detailed placement to legalize the globally placed components + 1. [OpenROAD/RePlace](https://github.com/the-openroad-project/openroad/tree/master/src/gpl) - Performs global placement + 2. [OpenROAD/Resizer](https://github.com/the-openroad-project/openroad/tree/master/src/rsz) - Performs optional optimizations on the design + 3. [OpenROAD/OpenDP](https://github.com/the-openroad-project/openroad/tree/master/src/dpl) - Performs detailed placement to legalize the globally placed components 4. **CTS** - 1. `TritonCTS` - Synthesizes the clock distribution network (the clock tree) + 1. [OpenROAD/TritonCTS](https://github.com/the-openroad-project/openroad/tree/master/src/cts) - Synthesizes the clock distribution network (the clock tree) 5. **Routing** - 1. `FastRoute` - Performs global routing to generate a guide file for the detailed router - 2. `TritonRoute` - Performs detailed routing - 3. `OpenRCX` - Performs SPEF extraction + 1. [OpenROAD/FastRoute](https://github.com/the-openroad-project/openroad/tree/master/src/grt) - Performs global routing to generate a guide file for the detailed router + 2. [OpenROAD/TritonRoute](https://github.com/the-openroad-project/openroad/tree/master/src/drt) - Performs detailed routing + 3. [OpenROAD/OpenRCX](https://github.com/the-openroad-project/openroad/tree/master/src/rcx) - Performs SPEF extraction 6. **Tapeout** - 1. `Magic` - Streams out the final GDSII layout file from the routed def - 2. `KLayout` - Streams out the final GDSII layout file from the routed def as a back-up + 1. [Magic](https://github.com/rtimothyedwards/magic) - Streams out the final GDSII layout file from the routed def + 2. [KLayout](https://github.com/klayout/klayout) - Streams out the final GDSII layout file from the routed def as a back-up 7. **Signoff** - 1. `Magic` - Performs DRC Checks & Antenna Checks - 2. `KLayout` - Performs DRC Checks - 3. `Netgen` - Performs LVS Checks - 4. `CVC` - Performs Circuit Validity Checks - -OpenLane integrated several key open source tools over the execution stages: -- RTL Synthesis, Technology Mapping, and Formal Verification : [yosys + abc][4] -- Static Timing Analysis: [OpenSTA][8] -- Floor Planning: [init_fp][5], [ioPlacer][6], [pdn][16] and [tapcell][7] -- Placement: [RePLace][9] (Global), [Resizer][15] and [OpenPhySyn][28] (formerly), and [OpenDP][10] (Detailed) -- Clock Tree Synthesis: [TritonCTS][11] -- Fill Insertion: [OpenDP/filler_placement][10] -- Routing: [FastRoute][12] or [CU-GR][36] (formerly) and [TritonRoute][13] (Detailed) or [DR-CU][36] -- SPEF Extraction: [OpenRCX][37] or [SPEF-Extractor][27] (formerly) -- GDSII Streaming out: [Magic][14] and [KLayout][35] -- DRC Checks: [Magic][14] and [KLayout][35] -- LVS check: [Netgen][22] -- Antenna Checks: [Magic][14] -- Circuit Validity Checker: [CVC][31] - -> Everything in Floorplanning through Routing is done using [OpenROAD](https://github.com/The-OpenROAD-Project/OpenROAD) and its various sub-utilities. + 1. [Magic](https://github.com/rtimothyedwards/magic) - Performs DRC Checks & Antenna Checks + 2. [Magic](https://github.com/klayout/klayout) - Performs DRC Checks & an XOR sanity-check between the two generated GDS-II files + 3. [Netgen](https://github.com/rtimothyedwards/netgen) - Performs LVS Checks + +All tools in the OpenLane flow are free, libre and open-source software. While +OpenLane itself as a script (and its associated build scripts) are under the +Apache License, version 2.0, tools may fall under stricter licenses. + +> Everything in Floorplanning through Routing is done using +> [OpenROAD](https://github.com/The-OpenROAD-Project/OpenROAD) and its various +> sub-utilities, hence the name "OpenLane." ## OpenLane Output @@ -79,40 +68,4 @@ All output run data is placed by default under ./designs/design_name/runs. Each ``` To delete all generated runs under all designs: -`make clean_runs` - -[1]: ../for_developers/docker.md -[4]: https://github.com/YosysHQ/yosys -[5]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/ifp -[6]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/ppl -[7]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/tap -[8]: https://github.com/The-OpenROAD-Project/OpenSTA -[9]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/replace -[10]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/dpl -[11]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/cts -[12]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/grt -[13]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/TritonRoute -[14]: https://github.com/RTimothyEdwards/magic -[15]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/rsz -[16]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/pdn -[18]: https://github.com/RTimothyEdwards/qflow/blob/master/src/addspacers.c -[19]: https://github.com/The-OpenROAD-Project/ -[20]: https://github.com/git-lfs/git-lfs/wiki/Installation -[21]: /usage/exploration_script.md -[22]: https://github.com/RTimothyEdwards/netgen -[24]: ./for_developers/pdk_structure.md -[25]: ./reference/interactive_mode.md -[26]: ./usage/chip_integration.md -[27]: https://github.com/AUCOHL/spef-extractor -[28]: https://github.com/scale-lab/OpenPhySyn -[29]: ./usage/hardening_macros.md -[30]: ./usage/building_the_pdk.md -[31]: https://github.com/d-m-bailey/cvc -[32]: ./for_developers/code_contribution.md -[33]: ./authors.md -[34]: ./reference/openlane_commands.md -[35]: https://github.com/KLayout/klayout -[36]: https://github.com/cuhk-eda/cu-gr -[37]: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/rcx -[38]: ./for_developers/issue_regression_tests.md -[39]: https://github.com/cuhk-eda/dr-cu \ No newline at end of file +`make clean_runs`. diff --git a/flake.lock b/flake.lock index 507b273d3..06fcfc675 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "devshell": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "openlane2", + "nix-eda", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "locked": { "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -13,18 +36,38 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "ioplace-parser": { "inputs": { "nixpkgs": [ "openlane2", + "nix-eda", "nixpkgs" ] }, "locked": { - "narHash": "sha256-0Lt3DVImH3TpwUh7sDW/6Cxsrmo5DDG+SCuirBFquXs=", + "lastModified": 1719837045, + "narHash": "sha256-ya2KEXKAIn8oYUi9G9TaUcQAEfGkbENCgXF/V0d/kws=", "owner": "efabless", "repo": "ioplace_parser", - "rev": "f1c163e8184fbce2676a19a1d28c3e6c0b5ddaf2", + "rev": "570fd3e352926f57e6eecbb8bd3892a5dec375b7", "type": "github" }, "original": { @@ -37,10 +80,12 @@ "inputs": { "nixpkgs": [ "openlane2", + "nix-eda", "nixpkgs" ] }, "locked": { + "lastModified": 1713178934, "narHash": "sha256-1w6HBBE2bWAD0GM98O8WZRmZDW9+EzD0KFvnnH2ho/k=", "owner": "efabless", "repo": "libparse-python", @@ -53,35 +98,55 @@ "type": "github" } }, + "nix-eda": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1719830786, + "narHash": "sha256-meVPi2d6TI44FjuqQc57Ve3UV1GP12uDVrRfHcACBdg=", + "owner": "efabless", + "repo": "nix-eda", + "rev": "8fd46e08259a761d5078c6c3b8b19dd58bb69e75", + "type": "github" + }, + "original": { + "owner": "efabless", + "repo": "nix-eda", + "type": "github" + } + }, "nixpkgs": { "locked": { - "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", + "lastModified": 1717144377, + "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", + "rev": "805a384895c696f802a9bf5bf4720f37385df547", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "openlane2": { "inputs": { + "devshell": "devshell", "flake-compat": "flake-compat", "ioplace-parser": "ioplace-parser", "libparse": "libparse", - "nixpkgs": "nixpkgs", + "nix-eda": "nix-eda", "volare": "volare" }, "locked": { - "lastModified": 1715082706, - "narHash": "sha256-OUaDO8RtK76NN3yuJZIwtel4kuRVmALkXJnTdMIeT8U=", + "lastModified": 1719911213, + "narHash": "sha256-rd4nqjpwNwqcpKGMx6QN6cX/2MjVt24I5CL9/QE45iM=", "owner": "efabless", "repo": "openlane2", - "rev": "058a93dfacf5352abd06931c3e45fec08cfa468e", + "rev": "315e8a220fc7327c4d146b9101b5dc5325862d58", "type": "github" }, "original": { @@ -96,19 +161,35 @@ "openlane2": "openlane2" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "volare": { "inputs": { "nixpkgs": [ "openlane2", + "nix-eda", "nixpkgs" ] }, "locked": { - "lastModified": 1715078431, - "narHash": "sha256-w4NLYQwvE/UFgPZDOnKDpagTjKb8FwKWOp3wV/RvPFM=", + "lastModified": 1715167549, + "narHash": "sha256-QzMKToqiDQzMjBM2TW1VGMUxSLj70Uk4IdJVjIdkd5c=", "owner": "efabless", "repo": "volare", - "rev": "13ccef8de5d8b27311ffd458ac629953784b5224", + "rev": "b72ce150b80f67278d4c6b025183fb3941cab993", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 019b71e21..e25e3b57f 100644 --- a/flake.nix +++ b/flake.nix @@ -30,36 +30,39 @@ openlane2, ... }: let + nix-eda = openlane2.inputs.nix-eda; nixpkgs = openlane2.inputs.nixpkgs; in { - # Helper functions - forAllSystems = function: - nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ] ( - system: - function (import nixpkgs { - inherit system; - overlays = []; - }) - ); - # Outputs - packages = self.forAllSystems (pkgs: let - callPackage = pkgs.lib.callPackageWith (pkgs // openlane2.packages."${pkgs.system}" // self.packages.${pkgs.system} ); - callPythonPackage = pkgs.lib.callPackageWith (pkgs // pkgs.python3.pkgs // openlane2.packages."${pkgs.system}" // openlane2.inputs.libparse.packages."${pkgs.system}" // openlane2.inputs.volare.packages."${pkgs.system}" // self.packages.${pkgs.system}); - in - rec { - # ADD OVERRIDES HERE - openlane1 = callPythonPackage ./default.nix {}; - default = openlane1; - } - // (pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux) {openlane1-docker = callPackage ./docker/docker.nix { - createDockerImage = openlane2.createDockerImage; - };})); + packages = + nix-eda.forAllSystems { + current = self; + withInputs = [nix-eda openlane2.inputs.libparse openlane2.inputs.volare openlane2]; + } (util: + with util; let + self = + { + openroad-abc = pkgs.openroad-abc.override { + # openroad-abc-rev-sha + }; + opensta = pkgs.opensta.override { + # opensta-rev-sha + }; + openroad = pkgs.openroad.override { + # openroad-rev-sha + openroad-abc = self.openroad-abc; + opensta = self.opensta; + }; + openlane1 = callPythonPackage ./default.nix {}; + default = self.openlane1; + } + // (pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux) { + openlane1-docker = callPackage ./docker/docker.nix { + createDockerImage = nix-eda.createDockerImage; + }; + }); + in + self); # devShells = self.forAllSystems ( # pkgs: let diff --git a/gui.py b/gui.py index 26fdaee8d..bc9fde256 100755 --- a/gui.py +++ b/gui.py @@ -109,6 +109,14 @@ def gui(viewer, format, run_dir, stage): layout, ] ) + pythonpath = subprocess.check_output( + [ + "python3", + "-c", + "import click; import os; print(os.path.dirname(click.__path__[0])); print(1)", + ] + ).decode() + run_env["PYTHONPATH"] = pythonpath subprocess.check_call( [ "klayout", diff --git a/regression_results/benchmark_results/sky130A/sky130_fd_sc_hd.csv b/regression_results/benchmark_results/sky130A/sky130_fd_sc_hd.csv index 5233711f0..23602c7f4 100644 --- a/regression_results/benchmark_results/sky130A/sky130_fd_sc_hd.csv +++ b/regression_results/benchmark_results/sky130A/sky130_fd_sc_hd.csv @@ -1,22 +1,22 @@ -design,design_name,config,flow_status,total_runtime,routed_runtime,DIEAREA_mm^2,CellPer_mm^2,OpenDP_Util,Final_Util,Peak_Memory_Usage_MB,synth_cell_count,tritonRoute_violations,Short_violations,MetSpc_violations,OffGrid_violations,MinHole_violations,Other_violations,Magic_violations,pin_antenna_violations,net_antenna_violations,lvs_total_errors,cvc_total_errors,klayout_violations,wire_length,vias,wns,pl_wns,optimized_wns,fastroute_wns,spef_wns,tns,pl_tns,optimized_tns,fastroute_tns,spef_tns,HPWL,routing_layer1_pct,routing_layer2_pct,routing_layer3_pct,routing_layer4_pct,routing_layer5_pct,routing_layer6_pct,wires_count,wire_bits,public_wires_count,public_wire_bits,memories_count,memory_bits,processes_count,cells_pre_abc,AND,DFF,NAND,NOR,OR,XOR,XNOR,MUX,inputs,outputs,level,DecapCells,WelltapCells,DiodeCells,FillCells,NonPhysCells,TotalCells,CoreArea_um^2,power_slowest_internal_uW,power_slowest_switching_uW,power_slowest_leakage_uW,power_typical_internal_uW,power_typical_switching_uW,power_typical_leakage_uW,power_fastest_internal_uW,power_fastest_switching_uW,power_fastest_leakage_uW,critical_path_ns,CLOCK_PERIOD,FP_ASPECT_RATIO,FP_CORE_UTIL,FP_PDN_HPITCH,FP_PDN_VPITCH,GRT_ADJUSTMENT,GRT_REPAIR_ANTENNAS,PL_TARGET_DENSITY,RUN_HEURISTIC_DIODE_INSERTION,STD_CELL_LIBRARY,MAX_FANOUT_CONSTRAINT,SYNTH_STRATEGY -./designs/ci/APU,APU,run_config,flow completed,0h4m26s0ms,0h3m1s0ms,0.0983350472999999,34484.144698225005,36.06,36.0,792.03,3253,0,0,0,0,0,0,0,3,3,0,-1,-1,140372,25964,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,106197908.0,0.0,42.45,43.9,6.23,12.61,0.0,2847,3426,183,703,0,0,0,3120,89,40,102,150,274,250,56,1024,432,424,23,5671,1221,33,2252,3391,12568,88101.99680000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,4.76,17.0,1,35,153.18,153.6,0.3,1,0.4,0,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/PPU,PPU,run_config,flow completed,0h13m54s0ms,0h6m31s0ms,0.733195271625,18162.9649226804,20.49,25.0,2077.11,12649,0,0,0,0,0,0,0,72,65,0,-1,-1,914385,99369,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,640716798.0,0.0,36.57,38.6,7.09,12.5,0.17,5308,8922,576,4178,0,0,0,7674,52,8,53,75,466,113,21,3014,2918,2927,21,43486,10075,708,14399,13317,81985,703299.52,-1,-1,-1,-1,-1,-1,-1,-1,-1,9.05,18.0,1,20,153.18,153.6,0.3,1,0.25,0,sky130_fd_sc_hd,8,AREA 0 -./designs/ci/aes,aes,run_config,flow completed,0h31m18s0ms,0h16m12s0ms,1.5614589344249998,13835.778529747611,15.32,19.0,3995.48,20122,0,0,0,0,0,0,0,75,70,0,-1,-1,1906160,185725,-26.68,-45.4,-1,0.0,0.0,-77174.7,-129120.43,-1,0.0,0.0,1421600626.0,0.0,34.34,35.77,9.34,16.27,0.15,21918,39764,1376,19222,0,0,0,24130,219,143,88,346,8958,2179,691,1414,3037,3024,24,98615,21612,1617,28611,21604,172059,1519006.8479999998,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.91,25.0,1,15,153.18,153.6,0.3,1,0.25,0,sky130_fd_sc_hd,8,AREA 0 -./designs/ci/aes_core,aes_core,run_config,flow completed,0h38m54s0ms,0h17m41s0ms,0.8670581510250001,24200.22229788714,25.56,36.0,3197.34,19301,0,0,0,0,0,0,0,10,10,0,-1,-1,1995431,218062,-20.25,-33.48,-1,0.0,0.0,-47470.02,-78096.02,-1,0.0,0.0,1553775824.0,0.0,54.68,59.5,32.22,50.36,2.92,21779,38579,1339,18139,0,0,0,23475,303,11,176,343,8963,2035,834,1198,2865,2604,25,50614,11830,22472,31654,20983,137553,835761.5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.9899999999999998,22.0,1,25,153.18,153.6,0.3,1,0.3,1,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/aes_user_project_wrapper,aes_user_project_wrapper,run_config,flow completed,0h9m31s0ms,0h0m56s0ms,10.2784,0.09729140722291407,-1,6.44782,514.45,1,0,0,0,0,0,0,0,0,0,0,-1,-1,13328,214,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,-1,0.0,0.02,0.01,0.08,0.0,-1,19,637,19,637,0,0,0,1,0,0,0,0,0,0,0,0,-1,-1,-1,0,0,0,0,1,1,10173980.1536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,25,1,50,81.6,81.6,0.3,0,10,0.6,0,sky130_fd_sc_hd,AREA 0 -./designs/ci/blabla,blabla,run_config,flow completed,0h37m16s0ms,0h9m39s0ms,1.44,9359.027777777776,8.74,14.0,2878.57,11696,0,0,0,0,0,0,0,118,111,0,-1,-1,2328661,115651,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,2126108228.0,0.0,46.54,44.08,12.63,29.41,0.0,10117,21673,226,11782,0,0,0,12090,654,5,575,813,507,2076,906,1434,2004,1100,50,92567,20010,5285,28187,13477,159526,1399932.6464000002,-1,-1,-1,-1,-1,-1,-1,-1,-1,8.7,65.0,1,11,153.18,153.6,0.3,1,0.16,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/caravel_upw,user_project_wrapper,run_config,flow completed,0h6m23s0ms,0h1m58s0ms,-1.0,-1.0,-1.0,11.0,755.36,2,0,0,0,0,0,0,0,0,0,0,-1,-1,1803198,5162,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,3.56,7.04,0.84,2.89,-1.0,19,637,19,637,0,0,0,2,0,0,0,0,0,0,0,0,-1,-1,-1,0,0,0,0,2,2,10173980.1536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,10.0,1,50,180.0,180.0,0.3,1,0.55,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/gcd,gcd,run_config,flow completed,0h1m34s0ms,0h1m4s0ms,0.0784251948,4743.373617989407,5.25,7.0,562.96,313,0,0,0,0,0,0,0,0,0,0,-1,-1,19936,2738,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,17027897.0,0.0,7.09,7.52,1.69,3.98,0.0,347,1106,140,899,0,0,0,293,6,3,2,6,41,25,6,32,70,52,11,4823,970,14,1092,372,7271,67039.29599999999,-1,-1,-1,-1,-1,-1,-1,-1,-1,3.48,10.0,1,50,27.2,27.14,0.3,1,0.55,0,sky130_fd_sc_hd,10,DELAY 4 -./designs/ci/inverter,inverter,run_config,flow completed,0h0m23s0ms,0h0m12s0ms,0.00197064,1522.3480696626475,-1.0,3.0,479.06,1,0,0,0,0,0,0,0,0,0,0,-1,-1,77,14,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,1.0,1.83,0.0,0.0,0.0,2,2,2,2,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,77,7,0,23,3,110,829.5456,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.3500000000000001,10.0,1,50,25.0,25.0,0.3,1,0.75,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/manual_macro_placement_test,manual_macro_placement_test,run_config,flow completed,0h0m46s0ms,0h0m17s0ms,0.1007267267999999,724.7331698263823,-1.0,37.0,512.96,2,0,0,0,0,0,0,0,0,0,0,-1,-1,20029,500,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,6.4,7.26,2.58,7.14,0.1,10,72,10,72,0,0,0,2,0,0,0,0,0,0,0,0,-1,-1,-1,3641,713,4,689,73,5120,90011.32800000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,100.0,1,35,153.18,30.0,0.3,1,0.35,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/picorv32a,picorv32,run_config,flow completed,0h12m9s0ms,0h7m18s0ms,0.3030545513,32970.96168705519,35.9,40.0,1365.14,9470,0,0,0,0,0,0,0,32,24,0,-1,-1,665045,82637,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,520806623.0,0.0,52.74,59.12,25.99,46.05,6.23,6209,8782,179,2304,0,0,0,8024,399,91,208,212,1016,370,100,2711,1630,1656,22,16482,4059,671,7929,9992,39133,284718.06720000005,-1,-1,-1,-1,-1,-1,-1,-1,-1,1.5499999999999998,24.0,1,35,153.18,153.6,0.3,1,0.4,0,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/s44,lut_s44,run_config,flow completed,0h1m10s0ms,0h0m50s0ms,0.043010922,3510.7361799870278,4.15,7.0,531.9,121,0,0,0,0,0,0,0,0,0,0,-1,-1,8322,1048,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,7096590.0,0.0,5.64,7.12,0.11,0.0,0.0,49,140,20,111,0,0,0,62,0,0,0,0,0,0,0,30,48,33,6,2648,504,8,603,151,3914,36347.35999999999,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.039999999999999,30.0,1,4,153.18,153.6,0.3,1,0.5,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/salsa20,salsa20,run_config,flow completed,0h30m6s0ms,0h16m6s0ms,1.2177938729000002,20405.752199116683,20.45,25.0,3386.25,22965,0,0,0,0,0,0,0,171,157,0,-1,-1,2147090,196715,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,1822593739.0,0.0,45.76,45.64,21.0,34.13,5.38,12472,21091,252,8871,0,0,0,17446,488,5,592,642,1679,2296,741,1288,3720,3710,51,74068,16842,2694,26166,24850,144620,1179677.6544,-1,-1,-1,-1,-1,-1,-1,-1,-1,4.57,38.0,1,20,153.18,153.6,0.3,1,0.25,0,sky130_fd_sc_hd,6,AREA 0 -spm,spm,run_config,flow completed,0h1m10s0ms,0h0m52s0ms,0.0114652544999999,30090.91512098576,47.85,45.0,521.98,301,0,0,0,0,0,0,0,0,0,0,-1,-1,10140,2035,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,8701631.0,0.0,21.21,38.83,1.2,4.41,0.0,354,415,196,257,0,0,0,253,32,64,31,31,1,63,31,0,97,128,4,539,105,0,227,345,1216,8134.051200000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.5899999999999999,10.0,1,45,22.44,22.655,0.3,1,0.5,0,sky130_fd_sc_hd,10,AREA 0 -./designs/ci/tt05_i2c_bert,tt_um_dlmiles_tt05_i2c_bert,run_config,flow completed,0h2m1s0ms,0h1m38s0ms,0.0187755072,56563.052528349275,58.15,72.5264,563.35,976,0,0,0,0,0,0,0,0,0,0,-1,-1,27417,7556,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,20810646.0,0.0,52.59,39.65,14.91,5.06,-1,1497,1999,250,727,0,0,0,1445,45,10,49,60,354,57,13,128,156,123,16,802,246,3,449,1062,2562,17274.0672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,15,1,50,26.520,40.710,0.3,1,10,0.6,0,sky130_fd_sc_hd,AREA 0 -./designs/ci/usb,usb,run_config,flow completed,0h1m54s0ms,0h1m22s0ms,0.0327793473,31239.182117576816,41.81,41.0,574.89,929,0,0,0,0,0,0,0,1,1,0,-1,-1,29931,7401,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,20708179.0,0.0,30.4,30.25,0.89,0.63,0.0,830,1083,140,374,0,0,0,927,27,24,33,34,200,47,8,79,214,193,8,1629,372,3,771,1024,3799,26875.776,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.16,15.0,1,40,40.8,41.165,0.3,1,0.45,0,sky130_fd_sc_hd,6,DELAY 0 -./designs/ci/usb_cdc_core,usb_cdc_core,run_config,flow completed,0h2m33s0ms,0h1m40s0ms,0.0754478433,27250.613272334587,31.22,32.0,644.57,1953,0,0,0,0,0,0,0,2,2,0,-1,-1,67456,14023,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,51889425.0,0.0,29.21,29.69,1.5,1.46,0.0,2046,2771,265,943,0,0,0,2150,100,47,109,89,681,130,41,60,325,605,14,4182,912,15,1617,2056,8782,65980.78080000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.91,15.6,1,30,153.18,153.6,0.3,1,0.32,0,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/wbqspiflash,wbqspiflash,run_config,flow completed,0h4m42s0ms,0h3m26s0ms,0.0673063305,41749.4161266153,41.39,53.0,724.34,2671,0,0,0,0,0,0,0,0,0,0,-1,-1,141899,25584,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,105133202.0,0.0,54.18,62.0,18.33,28.05,0.0,2873,3297,70,485,0,0,0,3100,55,1,142,148,796,79,6,744,340,288,18,3605,819,1255,2411,2810,10900,58796.3904,-1,-1,-1,-1,-1,-1,-1,-1,-1,3.63,20.0,1,40,153.18,153.6,0.3,1,0.45,1,sky130_fd_sc_hd,4,DELAY 0 -./designs/ci/xtea,xtea,run_config,flow completed,0h4m26s0ms,0h2m31s0ms,0.061274554425,45141.08712753809,46.96,46.0,674.95,2490,0,0,0,0,0,0,0,3,3,0,-1,-1,114238,19667,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,92447830.0,0.0,50.66,54.84,14.0,25.1,0.0,2187,2686,18,405,0,0,0,2452,16,5,54,226,390,436,121,160,373,358,30,3375,731,37,1699,2766,8608,52760.6016,-1,-1,-1,-1,-1,-1,-1,-1,-1,1.04,26.03,1,45,153.18,153.6,0.3,1,0.5,0,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/y_huff,y_huff,run_config,flow completed,0h21m28s0ms,0h10m11s0ms,0.49,27240.81632653061,28.22,31.0,1854.35,12229,0,0,0,0,0,0,0,15,15,0,-1,-1,922399,107296,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,790843468.0,0.0,45.42,49.31,23.72,40.38,0.0,7387,15309,1038,8787,0,0,0,8840,236,0,145,386,1308,575,87,1864,3057,2351,12,29134,6651,516,11768,13348,61417,466388.5536,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.55,11.35,1,40,153.18,153.6,0.3,1,0.45,0,sky130_fd_sc_hd,6,AREA 0 -./designs/ci/zipdiv,zipdiv,run_config,flow completed,0h2m35s0ms,0h1m57s0ms,0.0368352704,37654.128364970544,41.82,40.0,601.88,1254,0,0,0,0,0,0,0,0,0,0,-1,-1,55369,11102,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,43513884.0,0.0,41.69,45.86,11.63,10.95,0.0,936,1137,22,215,0,0,0,1059,46,0,3,43,165,146,14,158,207,142,16,1970,429,8,965,1387,4759,30509.2608,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.4400000000000004,20.0,1,40,153.18,153.6,0.3,1,0.45,0,sky130_fd_sc_hd,6,DELAY 2 +design,design_name,config,flow_status,total_runtime,routed_runtime,DIEAREA_mm^2,CellPer_mm^2,OpenDP_Util,Final_Util,Peak_Memory_Usage_MB,synth_cell_count,tritonRoute_violations,Short_violations,MetSpc_violations,OffGrid_violations,MinHole_violations,Other_violations,Magic_violations,pin_antenna_violations,net_antenna_violations,lvs_total_errors,klayout_violations,wire_length,vias,wns,pl_wns,optimized_wns,fastroute_wns,spef_wns,tns,pl_tns,optimized_tns,fastroute_tns,spef_tns,HPWL,routing_layer1_pct,routing_layer2_pct,routing_layer3_pct,routing_layer4_pct,routing_layer5_pct,routing_layer6_pct,wires_count,wire_bits,public_wires_count,public_wire_bits,memories_count,memory_bits,processes_count,cells_pre_abc,AND,DFF,NAND,NOR,OR,XOR,XNOR,MUX,inputs,outputs,level,DecapCells,WelltapCells,DiodeCells,FillCells,NonPhysCells,TotalCells,CoreArea_um^2,power_slowest_internal_uW,power_slowest_switching_uW,power_slowest_leakage_uW,power_typical_internal_uW,power_typical_switching_uW,power_typical_leakage_uW,power_fastest_internal_uW,power_fastest_switching_uW,power_fastest_leakage_uW,critical_path_ns,CLOCK_PERIOD,FP_ASPECT_RATIO,FP_CORE_UTIL,FP_PDN_HPITCH,FP_PDN_VPITCH,GRT_ADJUSTMENT,GRT_REPAIR_ANTENNAS,PL_TARGET_DENSITY,RUN_HEURISTIC_DIODE_INSERTION,STD_CELL_LIBRARY,MAX_FANOUT_CONSTRAINT,SYNTH_STRATEGY +./designs/ci/APU,APU,run_config,flow completed,0h4m26s0ms,0h3m1s0ms,0.0983350472999999,34484.144698225005,36.06,36.0,792.03,3253,0,0,0,0,0,0,0,3,3,0,-1,140372,25964,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,106197908.0,0.0,42.45,43.9,6.23,12.61,0.0,2847,3426,183,703,0,0,0,3120,89,40,102,150,274,250,56,1024,432,424,23,5671,1221,33,2252,3391,12568,88101.99680000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,4.76,17.0,1,35,153.18,153.6,0.3,1,0.4,0.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/PPU,PPU,run_config,flow completed,0h13m54s0ms,0h6m31s0ms,0.733195271625,18162.9649226804,20.49,25.0,2077.11,12649,0,0,0,0,0,0,0,72,65,0,-1,914385,99369,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,640716798.0,0.0,36.57,38.6,7.09,12.5,0.17,5308,8922,576,4178,0,0,0,7674,52,8,53,75,466,113,21,3014,2918,2927,21,43486,10075,708,14399,13317,81985,703299.52,-1,-1,-1,-1,-1,-1,-1,-1,-1,9.05,18.0,1,20,153.18,153.6,0.3,1,0.25,0.0,sky130_fd_sc_hd,8,AREA 0 +./designs/ci/aes,aes,run_config,flow completed,0h31m18s0ms,0h16m12s0ms,1.5614589344249998,13835.778529747611,15.32,19.0,3995.48,20122,0,0,0,0,0,0,0,75,70,0,-1,1906160,185725,-26.68,-45.4,-1,0.0,0.0,-77174.7,-129120.43,-1,0.0,0.0,1421600626.0,0.0,34.34,35.77,9.34,16.27,0.15,21918,39764,1376,19222,0,0,0,24130,219,143,88,346,8958,2179,691,1414,3037,3024,24,98615,21612,1617,28611,21604,172059,1519006.8479999998,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.91,25.0,1,15,153.18,153.6,0.3,1,0.25,0.0,sky130_fd_sc_hd,8,AREA 0 +./designs/ci/aes_core,aes_core,run_config,flow completed,0h38m54s0ms,0h17m41s0ms,0.8670581510250001,24200.22229788714,25.56,36.0,3197.34,19301,0,0,0,0,0,0,0,10,10,0,-1,1995431,218062,-20.25,-33.48,-1,0.0,0.0,-47470.02,-78096.02,-1,0.0,0.0,1553775824.0,0.0,54.68,59.5,32.22,50.36,2.92,21779,38579,1339,18139,0,0,0,23475,303,11,176,343,8963,2035,834,1198,2865,2604,25,50614,11830,22472,31654,20983,137553,835761.5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.99,22.0,1,25,153.18,153.6,0.3,1,0.3,1.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/aes_user_project_wrapper,aes_user_project_wrapper,run_config,flow completed,0h9m31s0ms,0h0m56s0ms,10.2784,0.097291407222914,-1.0,6.44782,514.45,1,0,0,0,0,0,0,0,0,0,0,-1,13328,214,0.0,-1.0,-1,-1.0,-1.0,0.0,-1.0,-1,-1.0,-1.0,-1.0,0.0,0.02,0.01,0.08,0.0,-1.0,19,637,19,637,0,0,0,1,0,0,0,0,0,0,0,0,-1,-1,-1,0,0,0,0,1,1,10173980.1536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,25.0,1,50,81.6,81.6,0.3,0,10.0,0.6,0,sky130_fd_sc_hd,AREA 0 +./designs/ci/blabla,blabla,run_config,flow completed,0h37m16s0ms,0h9m39s0ms,1.44,9359.027777777776,8.74,14.0,2878.57,11696,0,0,0,0,0,0,0,118,111,0,-1,2328661,115651,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,2126108228.0,0.0,46.54,44.08,12.63,29.41,0.0,10117,21673,226,11782,0,0,0,12090,654,5,575,813,507,2076,906,1434,2004,1100,50,92567,20010,5285,28187,13477,159526,1399932.6464000002,-1,-1,-1,-1,-1,-1,-1,-1,-1,8.7,65.0,1,11,153.18,153.6,0.3,1,0.16,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/caravel_upw,user_project_wrapper,run_config,flow completed,0h6m23s0ms,0h1m58s0ms,-1.0,-1.0,-1.0,11.0,755.36,2,0,0,0,0,0,0,0,0,0,0,-1,1803198,5162,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,3.56,7.04,0.84,2.89,-1.0,19,637,19,637,0,0,0,2,0,0,0,0,0,0,0,0,-1,-1,-1,0,0,0,0,2,2,10173980.1536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,10.0,1,50,180.0,180.0,0.3,1,0.55,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/gcd,gcd,run_config,flow completed,0h1m34s0ms,0h1m4s0ms,0.0784251948,4743.373617989407,5.25,7.0,562.96,313,0,0,0,0,0,0,0,0,0,0,-1,19936,2738,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,17027897.0,0.0,7.09,7.52,1.69,3.98,0.0,347,1106,140,899,0,0,0,293,6,3,2,6,41,25,6,32,70,52,11,4823,970,14,1092,372,7271,67039.29599999999,-1,-1,-1,-1,-1,-1,-1,-1,-1,3.48,10.0,1,50,27.2,27.14,0.3,1,0.55,0.0,sky130_fd_sc_hd,10,DELAY 4 +./designs/ci/inverter,inverter,run_config,flow completed,0h0m23s0ms,0h0m12s0ms,0.00197064,1522.3480696626475,-1.0,3.0,479.06,1,0,0,0,0,0,0,0,0,0,0,-1,77,14,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,1.0,1.83,0.0,0.0,0.0,2,2,2,2,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,77,7,0,23,3,110,829.5456,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.3500000000000001,10.0,1,50,25.0,25.0,0.3,1,0.75,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/manual_macro_placement_test,manual_macro_placement_test,run_config,flow completed,0h0m46s0ms,0h0m17s0ms,0.1007267267999999,724.7331698263823,-1.0,37.0,512.96,2,0,0,0,0,0,0,0,0,0,0,-1,20029,500,0.0,-1.0,-1,0.0,0.0,0.0,-1.0,-1,0.0,0.0,-1.0,0.0,6.4,7.26,2.58,7.14,0.1,10,72,10,72,0,0,0,2,0,0,0,0,0,0,0,0,-1,-1,-1,3641,713,4,689,73,5120,90011.32800000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,100.0,1,35,153.18,30.0,0.3,1,0.35,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/picorv32a,picorv32,run_config,flow completed,0h12m9s0ms,0h7m18s0ms,0.3030545513,32970.96168705519,35.9,40.0,1365.14,9470,0,0,0,0,0,0,0,32,24,0,-1,665045,82637,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,520806623.0,0.0,52.74,59.12,25.99,46.05,6.23,6209,8782,179,2304,0,0,0,8024,399,91,208,212,1016,370,100,2711,1630,1656,22,16482,4059,671,7929,9992,39133,284718.06720000005,-1,-1,-1,-1,-1,-1,-1,-1,-1,1.5499999999999998,24.0,1,35,153.18,153.6,0.3,1,0.4,0.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/s44,lut_s44,run_config,flow completed,0h1m10s0ms,0h0m50s0ms,0.043010922,3510.736179987028,4.15,7.0,531.9,121,0,0,0,0,0,0,0,0,0,0,-1,8322,1048,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,7096590.0,0.0,5.64,7.12,0.11,0.0,0.0,49,140,20,111,0,0,0,62,0,0,0,0,0,0,0,30,48,33,6,2648,504,8,603,151,3914,36347.35999999999,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.039999999999999,30.0,1,4,153.18,153.6,0.3,1,0.5,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/salsa20,salsa20,run_config,flow completed,0h30m6s0ms,0h16m6s0ms,1.2177938729000002,20405.752199116683,20.45,25.0,3386.25,22965,0,0,0,0,0,0,0,171,157,0,-1,2147090,196715,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,1822593739.0,0.0,45.76,45.64,21.0,34.13,5.38,12472,21091,252,8871,0,0,0,17446,488,5,592,642,1679,2296,741,1288,3720,3710,51,74068,16842,2694,26166,24850,144620,1179677.6544,-1,-1,-1,-1,-1,-1,-1,-1,-1,4.57,38.0,1,20,153.18,153.6,0.3,1,0.25,0.0,sky130_fd_sc_hd,6,AREA 0 +spm,spm,run_config,flow completed,0h1m10s0ms,0h0m52s0ms,0.0114652544999999,30090.91512098576,47.85,45.0,521.98,301,0,0,0,0,0,0,0,0,0,0,-1,10140,2035,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,8701631.0,0.0,21.21,38.83,1.2,4.41,0.0,354,415,196,257,0,0,0,253,32,64,31,31,1,63,31,0,97,128,4,539,105,0,227,345,1216,8134.051200000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.5899999999999999,10.0,1,45,22.44,22.655,0.3,1,0.5,0.0,sky130_fd_sc_hd,10,AREA 0 +./designs/ci/tt05_i2c_bert,tt_um_dlmiles_tt05_i2c_bert,run_config,flow completed,0h2m1s0ms,0h1m38s0ms,0.0187755072,56563.05252834928,58.15,72.5264,563.35,976,0,0,0,0,0,0,0,0,0,0,-1,27417,7556,0.0,-1.0,-1,-1.0,-1.0,0.0,-1.0,-1,-1.0,-1.0,20810646.0,0.0,52.59,39.65,14.91,5.06,-1.0,1497,1999,250,727,0,0,0,1445,45,10,49,60,354,57,13,128,156,123,16,802,246,3,449,1062,2562,17274.0672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.0,15.0,1,50,26.52,40.71,0.3,1,10.0,0.6,0,sky130_fd_sc_hd,AREA 0 +./designs/ci/usb,usb,run_config,flow completed,0h1m54s0ms,0h1m22s0ms,0.0327793473,31239.182117576816,41.81,41.0,574.89,929,0,0,0,0,0,0,0,1,1,0,-1,29931,7401,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,20708179.0,0.0,30.4,30.25,0.89,0.63,0.0,830,1083,140,374,0,0,0,927,27,24,33,34,200,47,8,79,214,193,8,1629,372,3,771,1024,3799,26875.776,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.16,15.0,1,40,40.8,41.165,0.3,1,0.45,0.0,sky130_fd_sc_hd,6,DELAY 0 +./designs/ci/usb_cdc_core,usb_cdc_core,run_config,flow completed,0h2m33s0ms,0h1m40s0ms,0.0754478433,27250.613272334587,31.22,32.0,644.57,1953,0,0,0,0,0,0,0,2,2,0,-1,67456,14023,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,51889425.0,0.0,29.21,29.69,1.5,1.46,0.0,2046,2771,265,943,0,0,0,2150,100,47,109,89,681,130,41,60,325,605,14,4182,912,15,1617,2056,8782,65980.78080000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,0.91,15.6,1,30,153.18,153.6,0.3,1,0.32,0.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/wbqspiflash,wbqspiflash,run_config,flow completed,0h4m42s0ms,0h3m26s0ms,0.0673063305,41749.4161266153,41.39,53.0,724.34,2671,0,0,0,0,0,0,0,0,0,0,-1,141899,25584,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,105133202.0,0.0,54.18,62.0,18.33,28.05,0.0,2873,3297,70,485,0,0,0,3100,55,1,142,148,796,79,6,744,340,288,18,3605,819,1255,2411,2810,10900,58796.3904,-1,-1,-1,-1,-1,-1,-1,-1,-1,3.63,20.0,1,40,153.18,153.6,0.3,1,0.45,1.0,sky130_fd_sc_hd,4,DELAY 0 +./designs/ci/xtea,xtea,run_config,flow completed,0h4m26s0ms,0h2m31s0ms,0.061274554425,45141.08712753809,46.96,46.0,674.95,2490,0,0,0,0,0,0,0,3,3,0,-1,114238,19667,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,92447830.0,0.0,50.66,54.84,14.0,25.1,0.0,2187,2686,18,405,0,0,0,2452,16,5,54,226,390,436,121,160,373,358,30,3375,731,37,1699,2766,8608,52760.6016,-1,-1,-1,-1,-1,-1,-1,-1,-1,1.04,26.03,1,45,153.18,153.6,0.3,1,0.5,0.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/y_huff,y_huff,run_config,flow completed,0h21m28s0ms,0h10m11s0ms,0.49,27240.81632653061,28.22,31.0,1854.35,12229,0,0,0,0,0,0,0,15,15,0,-1,922399,107296,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,790843468.0,0.0,45.42,49.31,23.72,40.38,0.0,7387,15309,1038,8787,0,0,0,8840,236,0,145,386,1308,575,87,1864,3057,2351,12,29134,6651,516,11768,13348,61417,466388.5536,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.55,11.35,1,40,153.18,153.6,0.3,1,0.45,0.0,sky130_fd_sc_hd,6,AREA 0 +./designs/ci/zipdiv,zipdiv,run_config,flow completed,0h2m35s0ms,0h1m57s0ms,0.0368352704,37654.128364970544,41.82,40.0,601.88,1254,0,0,0,0,0,0,0,0,0,0,-1,55369,11102,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,43513884.0,0.0,41.69,45.86,11.63,10.95,0.0,936,1137,22,215,0,0,0,1059,46,0,3,43,165,146,14,158,207,142,16,1970,429,8,965,1387,4759,30509.2608,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.4400000000000004,20.0,1,40,153.18,153.6,0.3,1,0.45,0.0,sky130_fd_sc_hd,6,DELAY 2 diff --git a/requirements_lint.txt b/requirements_lint.txt index ccbde4010..65f5c3882 100644 --- a/requirements_lint.txt +++ b/requirements_lint.txt @@ -1,3 +1,3 @@ -black~=22.3.0 +black~=24.3.0 flake8~=4.0.1 flake8-no-implicit-concat==0.3.3 diff --git a/scripts/config/tcl.py b/scripts/config/tcl.py index 416591a63..9f4b0519c 100755 --- a/scripts/config/tcl.py +++ b/scripts/config/tcl.py @@ -313,7 +313,7 @@ def process_config_dict_recursive(config_in: Dict[str, Any], state: State): whitespace_found = False comma_found = False processed = [] - for (i, item) in enumerate(value): + for i, item in enumerate(value): current_key = f"{key}[{i}]" result = process_scalar(current_key, item, state) if whitespace_rx.search(result) is not None: diff --git a/scripts/count_lvs.py b/scripts/count_lvs.py index 69564b0bf..7dca57abd 100755 --- a/scripts/count_lvs.py +++ b/scripts/count_lvs.py @@ -111,7 +111,6 @@ def count_LVS_failures(filename): if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Parses netgen lvs") parser.add_argument("--file", "-f", required=True) args = parser.parse_args() diff --git a/scripts/drc_rosetta.py b/scripts/drc_rosetta.py index 2ae38df45..46902d42f 100644 --- a/scripts/drc_rosetta.py +++ b/scripts/drc_rosetta.py @@ -57,6 +57,7 @@ def magic_to_rdb( 1800 2200 1800 2200 """ + # Developed by @ganeshgore class State(IntEnum): drc = 0 @@ -81,7 +82,6 @@ class State(IntEnum): output.write(f"{drcRule[1][:-1]}: {drcRule[0]}\n") drcNumber = 1 elif state == State.data: - cord = [ int(float(i)) * 100 for i in line.strip().replace("um", "").split(" ") ] diff --git a/scripts/odbpy/diodes.py b/scripts/odbpy/diodes.py index 066ad54b0..518aba6f1 100644 --- a/scripts/odbpy/diodes.py +++ b/scripts/odbpy/diodes.py @@ -322,7 +322,6 @@ def place( port_protect, threshold_microns, ): - print(f"Design name: {reader.name}") pp_val = { diff --git a/scripts/odbpy/wire_lengths.py b/scripts/odbpy/wire_lengths.py index ea0feb2ee..4ca1a30ec 100644 --- a/scripts/odbpy/wire_lengths.py +++ b/scripts/odbpy/wire_lengths.py @@ -83,7 +83,7 @@ def main(report_out, threshold, fail, human_readable, input_db, reader: OdbReade length_printable = str(to_si(length_microns)) print(f"{net.getName()},{length_printable}", file=f) - for (net, length_microns) in above_threshold: + for net, length_microns in above_threshold: print( f"Net {net.getName()} is above the length threshold ({length_microns}/{threshold} μm)." ) diff --git a/scripts/openroad/common/io.tcl b/scripts/openroad/common/io.tcl index 045ca45e0..d917819bc 100644 --- a/scripts/openroad/common/io.tcl +++ b/scripts/openroad/common/io.tcl @@ -167,24 +167,6 @@ proc read {args} { sta::parse_key_args "read" args \ keys {-lib_fastest -lib_typical -lib_slowest} \ flags {-no_spefs -set_lib_operating_conditions} - - if { [info exists ::env(IO_READ_DEF)] && $::env(IO_READ_DEF) } { - if { [ catch {read_lef $::env(MERGED_LEF)} errmsg ]} { - puts stderr $errmsg - exit 1 - } - if { [ catch {read_def $::env(CURRENT_DEF)} errmsg ]} { - puts stderr $errmsg - exit 1 - } - } else { - puts "\[INFO\]: Reading ODB at '$::env(CURRENT_ODB)'…" - if { [ catch {read_db $::env(CURRENT_ODB)} errmsg ]} { - puts stderr $errmsg - exit 1 - } - } - set read_libs_args [list] if { [info exists keys(-lib_typical)]} { @@ -205,6 +187,23 @@ proc read {args} { read_libs {*}$read_libs_args + if { [info exists ::env(IO_READ_DEF)] && $::env(IO_READ_DEF) } { + if { [ catch {read_lef $::env(MERGED_LEF)} errmsg ]} { + puts stderr $errmsg + exit 1 + } + if { [ catch {read_def $::env(CURRENT_DEF)} errmsg ]} { + puts stderr $errmsg + exit 1 + } + } else { + puts "\[INFO\]: Reading ODB at '$::env(CURRENT_ODB)'…" + if { [ catch {read_db $::env(CURRENT_ODB)} errmsg ]} { + puts stderr $errmsg + exit 1 + } + } + read_sdc_wrapper if { ![info exist flags(-no_spefs)] } { diff --git a/scripts/padframe_generator.py b/scripts/padframe_generator.py index 6020bae8f..14af85df1 100755 --- a/scripts/padframe_generator.py +++ b/scripts/padframe_generator.py @@ -99,7 +99,6 @@ class Dialog(tkinter.Toplevel): def __init__( self, parent, message=None, title=None, seed=None, border="blue", **kwargs ): - tkinter.Toplevel.__init__(self, parent) self.transient(parent) @@ -154,7 +153,6 @@ def buttonbox(self): # Standard button semantics def ok(self, event=None): - if not self.validate(): self.initial_focus.focus_set() # put focus back return @@ -165,7 +163,6 @@ def ok(self, event=None): self.cancel() def cancel(self, event=None): - # Put focus back to the parent window self.parent.focus_set() self.destroy() @@ -378,7 +375,6 @@ def init_gui(self): pane.paneconfig(self.toppane, stretch="first") def init_data(self): - self.vlogpads = [] self.corecells = [] self.Npads = [] @@ -965,7 +961,6 @@ def populate(self, level): height = self.ury - self.lly for pad in allpads: - llx = pad["llx"] lly = height - pad["lly"] urx = pad["urx"] @@ -1123,7 +1118,6 @@ def populate(self, level): coreury = self.ury for cell in self.coregroup: - if "llx" not in cell: # Error message for this was handled above continue @@ -2369,7 +2363,6 @@ def writeconfig(self): # height *= 1.4 if self.keep_cfg == False or not os.path.exists(mag_path + "/padframe.cfg"): - if os.path.exists(mag_path + "/padframe.cfg"): # Copy the previous padframe.cfg file to a backup. In case something # goes badly wrong, this should be the only file overwritten, and can @@ -2600,7 +2593,6 @@ def readplacement(self, precheck=False): mag_path = self.projectpath + "/mag" if not os.path.isfile(mag_path + "/" + self.project + ".def"): if os.path.isfile(mag_path + "/" + self.project + ".mag"): - # Create a DEF file from the layout with open(mag_path + "/pfg_write_def.tcl", "w") as ofile: print("drc off", file=ofile) @@ -2623,7 +2615,6 @@ def readplacement(self, precheck=False): os.remove(mag_path + "/pfg_write_def.tcl") elif not os.path.isfile(mag_path + "/core.def"): - # With no other information available, copy the corecells # (from the verilog file) into the coregroup list. # Position all core cells starting at the padframe top left @@ -2651,7 +2642,6 @@ def readplacement(self, precheck=False): nextlly = corelly for cell in self.corecells: - testllx = locllx + cell["width"] if testllx > coreurx: locllx = corellx diff --git a/scripts/report/get_best.py b/scripts/report/get_best.py index a2dbfd3b3..bc955a319 100755 --- a/scripts/report/get_best.py +++ b/scripts/report/get_best.py @@ -218,7 +218,6 @@ def save_top_results(results_dictionary, output_file, header): def findIdx(header, column): - for idx in range(len(header)): if header[idx] == column: return int(idx) diff --git a/scripts/report/report.py b/scripts/report/report.py index 66a2ce41c..dbd17c951 100755 --- a/scripts/report/report.py +++ b/scripts/report/report.py @@ -17,6 +17,7 @@ import json import yaml import fnmatch +import glob from collections import defaultdict from typing import Iterable, Optional, Dict @@ -40,6 +41,7 @@ def __init__( step: str, filename: str, find_by_partial_match: bool = False, + wildcard: bool = False, ): self.run_path = run_path self.kind = kind @@ -48,6 +50,17 @@ def __init__( self.pathname = os.path.join(self.run_path, self.kind, self.step) self.filename = filename + if wildcard: + matches = glob.glob(self.pathname) + if len(matches) > 1: + print( + f"Too many matches for {self.pathname}", + file=sys.stderr, + ) + exit(1) + else: + self.pathname = matches[0] + self.index, self.path = get_name( self.pathname, self.filename, find_by_partial_match ) @@ -149,7 +162,6 @@ def __init__( "pin_antenna_violations", "net_antenna_violations", "lvs_total_errors", - "cvc_total_errors", "klayout_violations", "wire_length", "vias", @@ -241,7 +253,6 @@ def reports_from_logs(self): ("rsz_design", Artifact(rp, "logs", "routing", "rsz_design_sta.log")), ("rsz_timing", Artifact(rp, "logs", "routing", "rsz_timing_sta.log")), ("grt", Artifact(rp, "logs", "routing", "grt_sta.log")), - ("rcx", Artifact(rp, "logs", "signoff", "rcx_sta.log")), ( "sta-rcx_nom/multi_corner", Artifact(rp, "logs", "signoff", "rcx_mcsta.nom.log"), @@ -345,7 +356,13 @@ def re_get_last_capture(rx, string): # Power after parasitics-extraction, multi-corner STA power_multi_corner_sta = defaultdict(lambda: defaultdict(lambda: -1)) - power_report = Artifact(rp, "reports", "signoff", "rcx_sta.power.rpt") + power_report = Artifact( + rp, + "reports", + "signoff/*sta-rcx_nom", + "multi_corner_sta.power.rpt", + wildcard=True, + ) power_report_content = power_report.get_content() if power_report_content is not None: current_corner = None @@ -381,10 +398,16 @@ def re_get_last_capture(rx, string): power_multi_corner_sta["fastest"]["switching"], power_multi_corner_sta["fastest"]["leakage"], ] - # Critical path critical_path_ns = -1 - critical_path_report = Artifact(rp, "reports", "signoff", "rcx_sta.max.rpt") + critical_path_report = Artifact( + rp, + "reports", + "signoff/*sta-rcx_nom", + "multi_corner_sta.max.rpt", + True, + wildcard=True, + ) critical_path_report_content = critical_path_report.get_content() if critical_path_report_content is not None: start = 0 @@ -497,7 +520,7 @@ def re_get_last_capture(rx, string): magic_violations = (magic_violations_raw + 3) // 4 # KLayout DRC Violations - klayout_drc = Artifact(rp, "reports", "signoff", "magic.lydrc", True) + klayout_drc = Artifact(rp, "reports", "signoff", "drc.klayout.xml", True) klayout_drc_content = klayout_drc.get_content() klayout_violations = -1 @@ -535,10 +558,14 @@ def re_get_last_capture(rx, string): # STA Report Extractions def sta_report_extraction( - sta_report_filename: str, filter: str, kind="reports", step="synthesis" + sta_report_filename: str, + filter: str, + kind="reports", + step="synthesis", + wildcard=False, ): value = -1 - report = Artifact(rp, kind, step, sta_report_filename) + report = Artifact(rp, kind, step, sta_report_filename, wildcard=wildcard) report_content = report.get_content() if report_content is not None: match = re.search(rf"{filter}\s+(-?[\d\.]+)", report_content) @@ -553,20 +580,34 @@ def sta_report_extraction( return value wns = sta_report_extraction("syn_sta.summary.rpt", "wns", step="synthesis") - spef_wns = sta_report_extraction("rcx_sta.summary.rpt", "wns", step="signoff") - opt_wns = sta_report_extraction("rt_rsz_sta.summary.rpt", "wns", step="routing") + spef_wns = sta_report_extraction( + "multi_corner_sta.summary.rpt", + "wns", + step="signoff/*sta-rcx_nom", + wildcard=True, + ) + opt_wns = sta_report_extraction("grt_sta.summary.rpt", "wns", step="routing") pl_wns = sta_report_extraction( - "global.log", "wns", kind="logs", step="placement" + "gpl_sta.log", "wns", kind="logs", step="placement" + ) + fr_wns = sta_report_extraction( + "grt_sta.log", "wns", kind="logs", step="routing" ) - fr_wns = sta_report_extraction("global.log", "wns", kind="logs", step="routing") tns = sta_report_extraction("syn_sta.summary.rpt", "tns", step="synthesis") - spef_tns = sta_report_extraction("rcx_sta.summary.rpt", "tns", step="signoff") - opt_tns = sta_report_extraction("rt_rsz_sta.summary.rpt", "tns", step="routing") + spef_tns = sta_report_extraction( + "multi_corner_sta.summary.rpt", + "tns", + step="signoff/*-sta-rcx_nom", + wildcard=True, + ) + opt_tns = sta_report_extraction("grt_sta.summary.rpt", "tns", step="routing") pl_tns = sta_report_extraction( - "global.log", "tns", kind="logs", step="placement" + "gpl_sta.log", "tns", kind="logs", step="placement" + ) + fr_tns = sta_report_extraction( + "grt_sta.log", "tns", kind="logs", step="routing" ) - fr_tns = sta_report_extraction("global.log", "tns", kind="logs", step="routing") # Yosys Metrics yosys_metrics = [ @@ -710,16 +751,6 @@ def count_cells(cell_wildcards, def_content): if match is not None: lvs_total_errors = int(match[1]) - # CVC Total Errors - cvc_log = Artifact(rp, "logs", "signoff", "erc_screen.log") - cvc_log_content = cvc_log.get_content() - - cvc_total_errors = -1 - if cvc_log_content is not None: - match = re.search(r"CVC:\s*Total:\s*(\d+)", cvc_log_content) - if match is not None: - cvc_total_errors = int(match[1]) - return [ flow_status, total_runtime, @@ -740,7 +771,6 @@ def count_cells(cell_wildcards, def_content): pin_antenna_violations, net_antenna_violations, lvs_total_errors, - cvc_total_errors, klayout_violations, wire_length, vias, diff --git a/scripts/tcl_commands/all.tcl b/scripts/tcl_commands/all.tcl index 28bdb587d..bee91da25 100755 --- a/scripts/tcl_commands/all.tcl +++ b/scripts/tcl_commands/all.tcl @@ -578,21 +578,26 @@ proc prep {args} { load_overrides -process_info_only $arg_values(-override_env) } - if { ! [info exists ::env(PDK_ROOT)] || $::env(PDK_ROOT) == "" } { - puts_err "PDK_ROOT is not specified. Please make sure you have it set." - exit -1 - } else { - puts_info "PDK Root: $::env(PDK_ROOT)" + if { ! [info exists ::env(PDK)] } { + set ::env(PDK) "sky130A" } + puts_info "Process Design Kit: $::env(PDK)" - if { ! [info exists ::env(PDK)] } { - puts_err "PDK is not specified." - exit -1 - } else { - puts_info "Process Design Kit: $::env(PDK)" - puts_verbose "Setting PDKPATH to $::env(PDK_ROOT)/$::env(PDK)" - set ::env(PDKPATH) $::env(PDK_ROOT)/$::env(PDK) + if { ! [info exists ::env(PDK_ROOT)] || $::env(PDK_ROOT) == "" } { + set pdk_family [string range $::env(PDK) 0 [expr [string length $::env(PDK)]-2]] + set opdks_version [exec python3 $::env(OPENLANE_ROOT)/dependencies/tool.py open_pdks -f commit] + if { [catch {exec volare path --pdk $pdk_family $opdks_version} volare_pdk_root] } { + puts_err "PDK_ROOT is not specified. Please make sure you have it set." + exit -1 + } else { + set ::env(PDK_ROOT) $volare_pdk_root + puts_info "Set PDK Root using Volare. If you haven't downloaded it yet, try 'volare fetch'." + } } + puts_info "PDK Root: $::env(PDK_ROOT)" + + puts_verbose "Setting PDKPATH to $::env(PDK_ROOT)/$::env(PDK)" + set ::env(PDKPATH) $::env(PDK_ROOT)/$::env(PDK) ## 3. PDK-Specific Config if { [info exists ::env(STD_CELL_LIBRARY)] } { diff --git a/scripts/topModuleGen/src/TopModuleGen.py b/scripts/topModuleGen/src/TopModuleGen.py index 2dba55797..dbc270ade 100644 --- a/scripts/topModuleGen/src/TopModuleGen.py +++ b/scripts/topModuleGen/src/TopModuleGen.py @@ -116,6 +116,8 @@ padFrameHeader = "chip_io padframe(\n" padFrameHeaderDefinition = "module chip_io(\n" padFrameWires = "" + + # parsePads is responsible for parsing the pads except for power/corner pads def parsePads(): global topModuleHeader diff --git a/scripts/utils/utils.tcl b/scripts/utils/utils.tcl index 5269ff78e..d66b0b973 100755 --- a/scripts/utils/utils.tcl +++ b/scripts/utils/utils.tcl @@ -512,7 +512,7 @@ proc manipulate_layout {args} { set_if_unset arg_values(-indexed_log) /dev/null set_if_unset arg_values(-input) $::env(CURRENT_ODB) set_if_unset arg_values(-output) $arg_values(-input) - set_if_unset arg_values(-output_def) /dev/null + set_if_unset arg_values(-output_def) [file rootname $arg_values(-output)].def run_odbpy_script\ {*}$args \ diff --git a/tests/1935-cts-crash/interactive.tcl b/tests/1935-cts-crash/interactive.tcl deleted file mode 100644 index cab7b4f2c..000000000 --- a/tests/1935-cts-crash/interactive.tcl +++ /dev/null @@ -1,3 +0,0 @@ -exec bash -c "set -e && \ - cd [file dirname [file normalize [info script]]]/reproducible && \ - tar xvf issue.tar.gz && cd issue_reproducible && bash run.sh" diff --git a/tests/1935-cts-crash/reproducible b/tests/1935-cts-crash/reproducible deleted file mode 120000 index d48c95737..000000000 --- a/tests/1935-cts-crash/reproducible +++ /dev/null @@ -1 +0,0 @@ -../../designs/ci/reproducibles/1935/ \ No newline at end of file