Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to nixos 24.11 #617

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fa02faa
more synthesis options (wip)
donn Oct 27, 2024
acb8e2b
extra env
donn Oct 28, 2024
04ea84a
fix synth elab only bug
donn Nov 6, 2024
0531281
update nix-eda, ioplace parser
donn Nov 7, 2024
e294b24
add --initial-state-element-override/-e option
donn Nov 19, 2024
4ef5756
add `yosys.resynthesis`
donn Nov 20, 2024
9720e82
SYNTH_HIERARCHY_MODE
donn Nov 20, 2024
5f90f57
Merge remote-tracking branch 'origin/main' into more_synth_options
donn Nov 25, 2024
66dd57d
Merge remote-tracking branch 'origin/main' into more_synth_options
donn Nov 25, 2024
22547b1
fix resynthesis class name
donn Nov 25, 2024
f8ca843
changelog & version
donn Nov 25, 2024
1b23955
Merge branch 'main' into more_synth_options
donn Dec 4, 2024
1310eb7
gpl: add `PL_ROUTABILITY_OVERFLOW_THRESHOLD`
donn Dec 4, 2024
d5b8565
feat: update to nixos 24.11
donn Dec 5, 2024
6e276a8
See https://github.com/The-OpenROAD-Project/OpenROAD/pull/6308
donn Dec 6, 2024
b6ec7d1
or-tools: use gcc on linux to avoid https://github.com/abseil/abseil-…
donn Dec 8, 2024
4387d73
fetch changes from branch new-openroad
kareefardi Dec 8, 2024
3ba16e5
update openroad and remove openroad patches
kareefardi Dec 9, 2024
9348b0d
Revert "update openroad and remove openroad patches"
kareefardi Dec 9, 2024
914ad54
remove uneeded patch
kareefardi Dec 9, 2024
19752b8
update unit tests
kareefardi Dec 9, 2024
b483f8d
Merge branch 'main' into more_synth_options
kareefardi Dec 9, 2024
9edf4a3
Merge remote-tracking branch 'origin/more_synth_options' into upgrade…
kareefardi Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,36 @@
## Documentation
-->

# 2.3.0

## Steps

* `OpenROAD.GlobalPlacement`

* Exposed `-routability_check_overflow` argument as new variable
`PL_ROUTABILITY_OVERFLOW_THRESHOLD`.

* `Yosys.*Synthesis`

* Created new variable `SYNTH_HIERARCHY_MODE`, replacing `SYNTH_NO_FLAT`.
There are three options, `flatten`, `deferred_flatten` and `keep`. The first
two correspond to `SYNTH_NO_FLAT` being false and true respectively. The
third keeps the hierarchy in the final netlist.
* Created new variable `SYNTH_TIE_UNDEFINED` to customize whether undefined
and undriven values are tied low, high, or left as-is.
* Created new variable `SYNTH_WRITE_NOATTR` to allow attributes to be
propagated to the final netlist.

* Created `Yosys.Resynthesis`

* Like `Yosys.Synthesis`, but uses the current input state netlist as an input
instead of RTL files

## CLI

* Added new option: `-e`/`--initial-state-element-override`: allows an element
in the initial state to be overridden straight from the commandline.

# 2.2.9

## Steps
Expand Down
31 changes: 15 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
{
description = "open-source infrastructure for implementing chip design flows";

nixConfig = {
extra-substituters = [
"https://openlane.cachix.org"
Expand All @@ -33,7 +33,7 @@
};

inputs.libparse.inputs.nixpkgs.follows = "nix-eda/nixpkgs";
inputs.ioplace-parser.inputs.nixpkgs.follows = "nix-eda/nixpkgs";
inputs.ioplace-parser.inputs.nix-eda.follows = "nix-eda";
inputs.volare.inputs.nixpkgs.follows = "nix-eda/nixpkgs";
inputs.devshell.inputs.nixpkgs.follows = "nix-eda/nixpkgs";

Expand All @@ -54,13 +54,17 @@
default = lib.composeManyExtensions [
(import ./nix/overlay.nix)
(nix-eda.flakesToOverlay [libparse ioplace-parser volare])
(pkgs': pkgs: {
yosys-sby = (pkgs.yosys-sby.override { sha256 = "sha256-Il2pXw2doaoZrVme2p0dSUUa8dCQtJJrmYitn1MkTD4="; });
})
(
pkgs': pkgs: let
callPackage = lib.callPackageWith pkgs';
in {
or-tools_9_11 = callPackage ./nix/or-tools_9_11.nix {
inherit (pkgs'.darwin) DarwinTools;
stdenv =
if pkgs'.system == "x86_64-darwin"
then (pkgs'.overrideSDK pkgs'.stdenv "11.0")
else pkgs'.stdenv;
};
colab-env = callPackage ./nix/colab-env.nix {};
opensta = callPackage ./nix/opensta.nix {};
openroad-abc = callPackage ./nix/openroad-abc.nix {};
Expand Down Expand Up @@ -112,8 +116,9 @@

packages = nix-eda.forAllSystems (
system: let
pkgs = (self.legacyPackages."${system}");
in {
pkgs = self.legacyPackages."${system}";
in
{
inherit (pkgs) colab-env opensta openroad-abc openroad;
inherit (pkgs.python3.pkgs) openlane;
default = pkgs.python3.pkgs.openlane;
Expand Down
15 changes: 10 additions & 5 deletions nix/create-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
{
extra-packages ? [],
extra-python-packages ? [],
extra-env ? [],
openlane-plugins ? [],
include-openlane ? true
include-openlane ? true,
}: ({
lib,
git,
Expand All @@ -31,9 +32,13 @@
openlane = python3.pkgs.openlane;
openlane-env = (
python3.withPackages (pp:
(if include-openlane then [openlane] else openlane.propagatedBuildInputs)
++ extra-python-packages
++ openlane-plugins)
(
if include-openlane
then [openlane]
else openlane.propagatedBuildInputs
)
++ extra-python-packages
++ openlane-plugins)
);
openlane-env-sitepackages = "${openlane-env}/${openlane-env.sitePackages}";
pluginIncludedTools = lib.lists.flatten (map (n: n.includedTools) openlane-plugins);
Expand Down Expand Up @@ -62,7 +67,7 @@ in
name = "NIX_PYTHONPATH";
value = "${openlane-env-sitepackages}";
}
];
] ++ extra-env;
devshell.interactive.PS1 = {
text = ''PS1="${prompt}"'';
};
Expand Down
53 changes: 30 additions & 23 deletions nix/openroad.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Efabless Corporation
# Copyright 2023-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.
Expand All @@ -13,23 +13,23 @@
# limitations under the License.
{
lib,
clangStdenv,
llvmPackages_17,
fetchFromGitHub,
openroad-abc,
libsForQt5,
opensta,
boost183,
boost186,
eigen,
cudd,
tcl,
python3,
readline,
tclreadline,
spdlog-internal-fmt,
spdlog,
libffi,
llvmPackages,
lemon-graph,
or-tools,
or-tools_9_11,
glpk,
zlib,
clp,
Expand All @@ -40,18 +40,23 @@
gnumake,
flex,
bison,
clang-tools_14,
buildEnv,
makeBinaryWrapper,
rev ? "edf00dff99f6c40d67a30c0e22a8191c5d2ed9d6",
sha256 ? "sha256-J649SIC/IHtiKiMvY8XrteyFkNM0WeQ6hfKIYdtE81g=",
cmake,
ninja,
git,
# environments,
rev ? "87af90f72f3f9be1fdfa1d886f0dd8d8b8f34694",
rev-date ? "2024-12-08",
sha256 ? "sha256-GS8DLpAtC5gJfQeP+YOCImVXaAPQNzVbdDjdiB7Aovc=",
openroad,
buildPythonEnvForInterpreter,
}: let
self = clangStdenv.mkDerivation (finalAttrs: {
name = "openroad";
inherit rev;
stdenv = llvmPackages_17.stdenv;
in
stdenv.mkDerivation (finalAttrs: {
pname = "openroad";
version = rev-date;

src = fetchFromGitHub {
owner = "The-OpenROAD-Project";
Expand All @@ -60,8 +65,10 @@
inherit sha256;
};

patches = [./patches/openroad/patches.diff];

cmakeFlagsAll = [
"-DTCL_LIBRARY=${tcl}/lib/libtcl${clangStdenv.hostPlatform.extensions.sharedLibrary}"
"-DTCL_LIBRARY=${tcl}/lib/libtcl${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DTCL_HEADER=${tcl}/include/tcl.h"
"-DUSE_SYSTEM_BOOST:BOOL=ON"
"-DCMAKE_CXX_FLAGS=-I${openroad-abc}/include"
Expand All @@ -86,48 +93,50 @@
sed -i 's@#include "base/abc/abc.h"@#include <base/abc/abc.h>@' src/rmp/src/Restructure.cpp
sed -i 's@#include "base/main/abcapis.h"@#include <base/main/abcapis.h>@' src/rmp/src/Restructure.cpp
sed -i 's@# tclReadline@target_link_libraries(openroad readline)@' src/CMakeLists.txt
sed -i 's@%include "../../src/Exception.i"@%include "../../Exception.i"@' src/dbSta/src/dbSta.i
sed -i 's@''${TCL_LIBRARY}@''${TCL_LIBRARY}\n${cudd}/lib/libcudd.a@' src/CMakeLists.txt
'';

buildInputs = [
openroad-abc
boost183
boost186
eigen
cudd
tcl
python3
readline
tclreadline
spdlog-internal-fmt
spdlog
libffi
libsForQt5.qtbase
libsForQt5.qt5.qtcharts
llvmPackages.openmp

lemon-graph
or-tools
opensta
glpk
zlib
clp
cbc
re2

or-tools_9_11
];

nativeBuildInputs = [
swig4
pkg-config
python3.pkgs.cmake # TODO: Replace with top-level cmake, I'm just doing this to avoid a rebuild
cmake
gnumake
flex
bison
ninja
libsForQt5.wrapQtAppsHook
clang-tools_14
llvmPackages_17.clang-tools
];

shellHook = ''
export DEVSHELL_CMAKE_FLAGS="${builtins.concatStringsSep " " finalAttrs.cmakeFlagsAll}"
alias ord-format-changed="${git}/bin/git diff --name-only | grep -E '\.(cpp|cc|c|h|hh)$' | xargs clang-format -i -style=file:.clang-format";
alias ord-cmake-debug="cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g" -G Ninja $cmakeFlags .."
alias ord-cmake-release="cmake -DCMAKE_BUILD_TYPE=Release -G Ninja $cmakeFlags .."
'';

passthru = {
Expand All @@ -148,6 +157,4 @@
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
};
});
in
self
})
4 changes: 2 additions & 2 deletions nix/opensta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
cudd,
zlib,
eigen,
rev ? "b5f3a02b33b8ae1739ace8a329fde94434711dd6",
sha256 ? "sha256-s9Qn8Hkxuzvx7sZdaa/RX8X4Rp4w/kTVdnrmsRvC8wo=",
rev ? "aa598a2f14c5c142e90391a69988523505e7db3d",
sha256 ? "sha256-vrOZ7fHp3g5eylL4o6IKuBXug8iz58xgF6Zaf9LYnHg=",
}:
clangStdenv.mkDerivation (finalAttrs: {
name = "opensta";
Expand Down
Loading
Loading