Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into couple_openroad_goodies
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Dec 16, 2024
2 parents 67ae717 + 77aae99 commit 8109f33
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 78 deletions.
13 changes: 12 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,19 @@
* Added flags `CTS_OBSTRUCTION_AWARE` and `CTS_BALANCE_LEVELS`
* Added `CTS_SINK_BUFFER_MAX_CAP_DERATE_PCT`
* Added `CTS_DELAY_BUFFER_DERATE_PCT`

## Tool Updates

## Misc Enhancements/Bugfixes
* Updated nix-eda
* Updated nixpkgs to nixos-24.11 (@ `3c53b4b`)
* Updated KLayout to `0.29.9`
* Updated Magic to `8.3.503`
* Updated Netgen to `1.5.287`
* Updated ioplace-parser to`0.4.0`
* Updated OpenROAD to `1d61007`
* Updated OpenSTA to `aa598a2`

## Misc. Enhancements/Bugfixes

* `openlane.state`
* `DesignFormat`
Expand Down
14 changes: 7 additions & 7 deletions flake.lock

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

17 changes: 11 additions & 6 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 Down Expand Up @@ -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
10 changes: 7 additions & 3 deletions nix/create-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,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
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

0 comments on commit 8109f33

Please sign in to comment.