mirror of
https://github.com/The-OpenROAD-Project/OpenLane.git
synced 2026-05-29 00:23:55 +08:00
Upgrade to nix-eda (#2135)
~ Avoid using `/dev/null` for writing DEF files (it tries to create a temp file and fail) ~ PDK now has a default value of sky130A even outside the Makefile ~ PDK_ROOT now set automatically if Volare is installed ~ Upgrade to a newer version of OpenLane 2, which in turns uses `nix-eda` ~ Format nix packages using Alejandra ~ OpenROAD scripts now read liberty files before database files (they are linked together when the database is read) ~ Update Readme to remove Colab and add banner directing people to OpenLane 2
This commit is contained in:
99
.github/scripts/add_openroad_overrides.py
vendored
Normal file
99
.github/scripts/add_openroad_overrides.py
vendored
Normal file
@@ -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)
|
||||
1
.github/scripts/update_tools.py
vendored
1
.github/scripts/update_tools.py
vendored
@@ -32,6 +32,7 @@ args = parser.parse_args()
|
||||
|
||||
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:
|
||||
|
||||
12
README.md
12
README.md
@@ -1,3 +1,9 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/efabless/openlane2">
|
||||
<img src="./docs/_static/ol2_banner.svg" alt="Banner explaining that OpenLane is currently only for hardening Caravel User Project-based designs targeting chipIgnite"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h1 align="center">OpenLane</h1>
|
||||
<p align="center">
|
||||
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0"/></a>
|
||||
@@ -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/).
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/efabless/openlane2">
|
||||
<img src="./docs/_static/ol2_banner.svg" alt="Banner promoting OpenLane 2"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Installation, the short version
|
||||
The short version is, to install the OpenLane environment...
|
||||
|
||||
|
||||
74
default.nix
74
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";
|
||||
|
||||
3
dependencies/verify_versions.py
vendored
3
dependencies/verify_versions.py
vendored
@@ -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:
|
||||
|
||||
1
dependencies/version.py
vendored
1
dependencies/version.py
vendored
@@ -401,7 +401,6 @@ VERSION_PATTERN = r"""
|
||||
|
||||
|
||||
class Version(_BaseVersion):
|
||||
|
||||
_regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
|
||||
|
||||
def __init__(self, version):
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
})
|
||||
|
||||
74
docs/_static/ol2_banner.svg
vendored
74
docs/_static/ol2_banner.svg
vendored
@@ -12,7 +12,7 @@
|
||||
inkscape:export-filename="banner.svg"
|
||||
inkscape:export-xdpi="200"
|
||||
inkscape:export-ydpi="200"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -28,19 +28,19 @@
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.5877449"
|
||||
inkscape:cx="259.29912"
|
||||
inkscape:cy="-44.247019"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1287"
|
||||
inkscape:cx="237.07901"
|
||||
inkscape:cy="51.009665"
|
||||
inkscape:window-width="2296"
|
||||
inkscape:window-height="1039"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="32"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" /><defs
|
||||
id="defs2" /><g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"><rect
|
||||
style="opacity:0.98;fill:#87aade;stroke:#214478;stroke-width:0.108762"
|
||||
style="opacity:0.98;fill:#ffc873;stroke:#c17500;stroke-width:0.108762;fill-opacity:1;stroke-opacity:1"
|
||||
id="rect290"
|
||||
width="129.89124"
|
||||
height="24.891237"
|
||||
@@ -48,32 +48,40 @@
|
||||
y="0.054380815"
|
||||
ry="2.5819879" /><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52778px;font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';opacity:0.98;fill:#ffffff;stroke:none;stroke-width:0.11173"
|
||||
x="20.133711"
|
||||
y="11.181113"
|
||||
id="text3649"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';stroke-width:0.11173"
|
||||
x="20.133711"
|
||||
y="11.181113"
|
||||
id="tspan3651"
|
||||
sodipodi:role="line">Feeling adventurous? Take a sneak peek at the</tspan><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';-inkscape-font-specification:'-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji';stroke-width:0.11173"
|
||||
x="20.133711"
|
||||
y="15.590838"
|
||||
sodipodi:role="line"
|
||||
id="tspan4608">next generation of OpenLane, rebuilt from the ground</tspan><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';-inkscape-font-specification:'-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji';stroke-width:0.11173"
|
||||
x="20.133711"
|
||||
y="20.000563"
|
||||
sodipodi:role="line"
|
||||
id="tspan4654">up for customizability.</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:4.23333px;font-family:monospace;-inkscape-font-specification:monospace;opacity:0.98;fill:#87aade;stroke:#214478;stroke-width:0.11173"
|
||||
x="38.196682"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:'Open Sans', Helvetica, Arial, '-sans-serif';-inkscape-font-specification:'Open Sans, Helvetica, Arial, -sans-serif';opacity:0.98;fill:#87aade;stroke:#214478;stroke-width:0.11173"
|
||||
x="49.292446"
|
||||
y="5.2173305"
|
||||
id="text1061"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1059"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';-inkscape-font-specification:'-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji Bold';fill:#ffffff;stroke:none;stroke-width:0.11173"
|
||||
x="38.196682"
|
||||
y="5.2173305">Introducing: OpenLane 2!</tspan></text></g></svg>
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';fill:#000000;stroke:none;stroke-width:0.11173"
|
||||
x="49.292446"
|
||||
y="5.2173305">Try OpenLane 2!</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';opacity:0.98;fill:#ffffff;stroke:none;stroke-width:0.11173"
|
||||
x="65.065453"
|
||||
y="11.165885"
|
||||
id="text3649"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.11173"
|
||||
x="65.065453"
|
||||
y="11.165885"
|
||||
sodipodi:role="line"
|
||||
id="tspan2">While OpenLane 1 remains the primary stable version for designs targeting Efabless</tspan><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.11173"
|
||||
x="65.065453"
|
||||
y="14.69366"
|
||||
sodipodi:role="line"
|
||||
dy="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2044895"
|
||||
id="tspan1"
|
||||
dx="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2044895">chipIgnite, we are no longer actively adding new features.</tspan><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.11173"
|
||||
x="65.065453"
|
||||
y="18.221436"
|
||||
sodipodi:role="line"
|
||||
id="tspan3" /><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Helvetica, 'Open Sans', Arial, sans-serif;-inkscape-font-specification:'Helvetica, Open Sans, Arial, sans-serif';text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.11173"
|
||||
x="65.065453"
|
||||
y="21.74921"
|
||||
sodipodi:role="line"
|
||||
id="tspan4"
|
||||
dx="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2044895">Click here to go to the current version, OpenLane 2.</tspan></text></g></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.9 KiB |
105
flake.lock
generated
105
flake.lock
generated
@@ -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": {
|
||||
|
||||
57
flake.nix
57
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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -57,6 +57,7 @@ def magic_to_rdb(
|
||||
1800 2200
|
||||
1800 2200
|
||||
"""
|
||||
|
||||
# Developed by @ganeshgore
|
||||
class State(IntEnum):
|
||||
drc = 0
|
||||
@@ -81,7 +82,6 @@ def magic_to_rdb(
|
||||
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(" ")
|
||||
]
|
||||
|
||||
@@ -322,7 +322,6 @@ def place(
|
||||
port_protect,
|
||||
threshold_microns,
|
||||
):
|
||||
|
||||
print(f"Design name: {reader.name}")
|
||||
|
||||
pp_val = {
|
||||
|
||||
@@ -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)."
|
||||
)
|
||||
|
||||
@@ -159,24 +159,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)]} {
|
||||
@@ -197,6 +179,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)] } {
|
||||
|
||||
@@ -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 @@ class Dialog(tkinter.Toplevel):
|
||||
# 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 @@ class Dialog(tkinter.Toplevel):
|
||||
self.cancel()
|
||||
|
||||
def cancel(self, event=None):
|
||||
|
||||
# Put focus back to the parent window
|
||||
self.parent.focus_set()
|
||||
self.destroy()
|
||||
@@ -378,7 +375,6 @@ class SoCFloorplanner(ttk.Frame):
|
||||
pane.paneconfig(self.toppane, stretch="first")
|
||||
|
||||
def init_data(self):
|
||||
|
||||
self.vlogpads = []
|
||||
self.corecells = []
|
||||
self.Npads = []
|
||||
@@ -965,7 +961,6 @@ class SoCFloorplanner(ttk.Frame):
|
||||
|
||||
height = self.ury - self.lly
|
||||
for pad in allpads:
|
||||
|
||||
llx = pad["llx"]
|
||||
lly = height - pad["lly"]
|
||||
urx = pad["urx"]
|
||||
@@ -1123,7 +1118,6 @@ class SoCFloorplanner(ttk.Frame):
|
||||
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 @@ class SoCFloorplanner(ttk.Frame):
|
||||
# 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 @@ class SoCFloorplanner(ttk.Frame):
|
||||
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 @@ class SoCFloorplanner(ttk.Frame):
|
||||
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 @@ class SoCFloorplanner(ttk.Frame):
|
||||
nextlly = corelly
|
||||
|
||||
for cell in self.corecells:
|
||||
|
||||
testllx = locllx + cell["width"]
|
||||
if testllx > coreurx:
|
||||
locllx = corellx
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)] } {
|
||||
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)
|
||||
set ::env(PDK) "sky130A"
|
||||
}
|
||||
puts_info "Process Design Kit: $::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)] } {
|
||||
|
||||
@@ -116,6 +116,8 @@ padFrameModule = ""
|
||||
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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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"
|
||||
@@ -1 +0,0 @@
|
||||
../../designs/ci/reproducibles/1935/
|
||||
Reference in New Issue
Block a user