Skip to content

Commit

Permalink
Merge branch 'master' into ant-python
Browse files Browse the repository at this point in the history
  • Loading branch information
macd committed Oct 18, 2022
2 parents 429ee23 + e3addb4 commit 12eeedd
Show file tree
Hide file tree
Showing 170 changed files with 11,827 additions and 3,030 deletions.
92 changes: 92 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!--
This issue template is REQUIRED for all bug reports. It helps us more
quickly track, narrow down, and address bugs.
Bug reports not adhering to this template will be likely marked invalid and
closed as there is very little we can do without the requisite information.
Thank you for understanding!
-->

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**Expected Behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Environment**
<!--
This part is incredibly important:
Please run the following shell command in the OpenROAD root folder:
./etc/Env.sh
If you are an OpenLane user, please run the following shell command in the OpenLane root folder:
python3 ./env.py issue-survey
Then copy and paste the ENTIRE output between the triple-backticks below. (```)
If the command does not succeed, you are using an out-of-date version of
OpenROAD, and it is recommended that you update.
-->
```
YOUR SURVEY HERE
```

**To Reproduce**
<!--
If you are running from OpenLane, please run the following shell command in the OpenLane root folder:
python3 ./scripts/or_issue.py\
--tool openroad\
--script ./scripts/openroad/<script-name>\
<run-path> # e.g designs/spm/runs/RUN_2022.03.01_19.21.10/tmp/routing/17-fill.def
# run path is implicitly specified by input def
For more information, follow this link https://openlane.readthedocs.io/en/latest/for_developers/using_or_issue.html
Otherwise, you have two options here:
A. Use `make <SCRIPT_NAME>_issue` to create a tar file with all the files to reproduce the bug(s).
Steps:
1. Clone/Use [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-
flow-scripts.git) and make sure it is using the corresponding version of OpenROAD in path
"OpenROAD-flow-scripts/tools/OpenROAD"
2. Set the ISSUE_TAG variable to rename the generated tar file
3. Run the following shell command in this directory "OpenROAD-flow-scripts/flow"
`make {script}_issue`
where script is wildcarded from the "OpenROAD-flow-scripts/scripts" directory
# e.g "make cts_issue"
4. Upload the generated tar file
B. Upload relevant files
* Upload a tar file containing the relevant files (.def, .lef and flow.tcl).
* List the commands used.
-->


**Logs**
<!--
Feel free to add any relevant log snippets to this section.
Please do ensure they're inside the triple-backticks. (```)
-->
```
YOUR LOGS HERE
```

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem.-->

**Additional context**
<!-- Add any other context about the problem here. -->
46 changes: 31 additions & 15 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ set -euo pipefail
_installCommonDev() {
lastDir="$(pwd)"
# tools versions
cmakeVersionBig=3.14
cmakeVersionSmall=${cmakeVersionBig}.0
swigVersion=4.0.1
boostVersionBig=1.76
osName="linux"
cmakeChecksum="b8d86f8c5ee990ae03c486c3631cee05"
cmakeVersionBig=3.24
cmakeVersionSmall=${cmakeVersionBig}.2
swigVersion=4.0.2
swigChecksum="19a61126f0f89c56b2c2e9e39cc33efe"
boostVersionBig=1.80
boostVersionSmall=${boostVersionBig}.0
eigenVersion=3.3
boostChecksum="077f074743ea7b0cb49c6ed43953ae95"
eigenVersion=3.4
lemonVersion=1.3.1
lemonChecksum="e89f887559113b68657eca67cf3329b5"
spdlogVersion=1.8.1

# temp dir to download and compile
Expand All @@ -21,10 +26,10 @@ _installCommonDev() {
# CMake
if [[ -z $(cmake --version | grep ${cmakeVersionBig}) ]]; then
cd "${baseDir}"
wget https://cmake.org/files/v${cmakeVersionBig}/cmake-${cmakeVersionSmall}-Linux-x86_64.sh
md5sum -c <(echo "73041a43d27a30cdcbfdfdb61310d081 cmake-${cmakeVersionSmall}-Linux-x86_64.sh") || exit 1
chmod +x cmake-${cmakeVersionSmall}-Linux-x86_64.sh
./cmake-${cmakeVersionSmall}-Linux-x86_64.sh --skip-license --prefix=/usr/local
wget https://cmake.org/files/v${cmakeVersionBig}/cmake-${cmakeVersionSmall}-${osName}-x86_64.sh
md5sum -c <(echo "${cmakeChecksum} cmake-${cmakeVersionSmall}-${osName}-x86_64.sh") || exit 1
chmod +x cmake-${cmakeVersionSmall}-${osName}-x86_64.sh
./cmake-${cmakeVersionSmall}-${osName}-x86_64.sh --skip-license --prefix=/usr/local
else
echo "CMake already installed."
fi
Expand All @@ -33,7 +38,7 @@ _installCommonDev() {
if [[ -z $(swig -version | grep ${swigVersion}) ]]; then
cd "${baseDir}"
wget https://github.com/swig/swig/archive/rel-${swigVersion}.tar.gz
md5sum -c <(echo "ef6a6d1dec755d867e7f5e860dc961f7 rel-${swigVersion}.tar.gz") || exit 1
md5sum -c <(echo "${swigChecksum} rel-${swigVersion}.tar.gz") || exit 1
tar xfz rel-${swigVersion}.tar.gz
cd swig-rel-${swigVersion}
./autogen.sh
Expand All @@ -49,7 +54,7 @@ _installCommonDev() {
cd "${baseDir}"
boostVersionUnderscore=${boostVersionSmall//./_}
wget https://boostorg.jfrog.io/artifactory/main/release/${boostVersionSmall}/source/boost_${boostVersionUnderscore}.tar.gz
md5sum -c <(echo "e425bf1f1d8c36a3cd464884e74f007a boost_${boostVersionUnderscore}.tar.gz") || exit 1
md5sum -c <(echo "${boostChecksum} boost_${boostVersionUnderscore}.tar.gz") || exit 1
tar -xf boost_${boostVersionUnderscore}.tar.gz
cd boost_${boostVersionUnderscore}
./bootstrap.sh
Expand Down Expand Up @@ -83,7 +88,7 @@ _installCommonDev() {
if [[ -z $(grep "LEMON_VERSION \"${lemonVersion}\"" /usr/local/include/lemon/config.h) ]]; then
cd "${baseDir}"
wget http://lemon.cs.elte.hu/pub/sources/lemon-${lemonVersion}.tar.gz
md5sum -c <(echo "e89f887559113b68657eca67cf3329b5 lemon-${lemonVersion}.tar.gz") || exit 1
md5sum -c <(echo "${lemonChecksum} lemon-${lemonVersion}.tar.gz") || exit 1
tar -xf lemon-${lemonVersion}.tar.gz
cd lemon-${lemonVersion}
cmake -B build .
Expand Down Expand Up @@ -144,9 +149,19 @@ _installUbuntuRuntime() {
libgomp1 \
libpython3.8 \
libtcl \
qt5-default \
qt5-image-formats-plugins \
tcl-tclreadline

if [[ $1 == 22.04 ]]; then
apt-get install -y \
qtbase5-dev \
qtchooser \
qt5-qmake \
qtbase5-dev-tools
else
apt-get install -y qt5-default
fi

# need the strip "hack" above to run on docker
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so
}
Expand Down Expand Up @@ -320,12 +335,13 @@ To enable GCC-8 or Clang-7 you need to run:
EOF
;;
"Ubuntu" )
version=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release | sed 's/"//g')
spdlogFolder="/usr/local/lib/cmake/spdlog/spdlogConfigVersion.cmake"
export spdlogFolder
_installUbuntuRuntime
_installUbuntuRuntime "${version}"
if [[ "${option}" == "dev" ]]; then
_installUbuntuDev
_installCommonDev
_installCommonDev "${version}"
fi
_installUbuntuCleanUp
;;
Expand Down
19 changes: 16 additions & 3 deletions etc/DockerHelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ usage: $0 [CMD] [OPTIONS]
OPTIONS:
-compiler=COMPILER_NAME Choose between gcc (default) and clang. Valid
only if the target is 'builder'.
-os=OS_NAME Choose beween centos7 (default) and ubuntu20.
-os=OS_NAME Choose beween centos7 (default), ubuntu20 and ubuntu22.
-target=TARGET Choose target fo the Docker image:
'dev': os + packages to compile app
'builder': os + packages to compile app +
Expand Down Expand Up @@ -55,6 +55,9 @@ _setup() {
"ubuntu20")
osBaseImage="ubuntu:20.04"
;;
"ubuntu22")
osBaseImage="ubuntu:22.04"
;;
*)
echo "Target OS ${os} not supported" >&2
_help
Expand Down Expand Up @@ -131,7 +134,7 @@ _push() {
if [[ $REPLY =~ ^[Yy]$ ]]; then
mkdir -p build

# create image with sha and latest tag for both os
# create image with sha and latest tag for all os
./etc/DockerHelper.sh create -target=dev \
2>&1 | tee build/create-centos-latest.log
./etc/DockerHelper.sh create -target=dev -sha \
Expand All @@ -140,8 +143,12 @@ _push() {
2>&1 | tee build/create-ubuntu20-latest.log
./etc/DockerHelper.sh create -target=dev -os=ubuntu20 -sha \
2>&1 | tee build/create-ubuntu20-${commitSha}.log
./etc/DockerHelper.sh create -target=dev -os=ubuntu22 \
2>&1 | tee build/create-ubuntu22-latest.log
./etc/DockerHelper.sh create -target=dev -os=ubuntu22 -sha \
2>&1 | tee build/create-ubuntu22-${commitSha}.log

# test image with sha and latest tag for both os and compiler
# test image with sha and latest tag for all os and compiler
./etc/DockerHelper.sh test -target=builder \
2>&1 | tee build/test-centos-gcc-latest.log
./etc/DockerHelper.sh test -target=builder -compiler=clang \
Expand All @@ -150,11 +157,17 @@ _push() {
2>&1 | tee build/test-ubuntu20-gcc-latest.log
./etc/DockerHelper.sh test -target=builder -os=ubuntu20 -compiler=clang \
2>&1 | tee build/test-ubuntu20-clang-latest.log
./etc/DockerHelper.sh test -target=builder -os=ubuntu22 \
2>&1 | tee build/test-ubuntu22-gcc-latest.log
./etc/DockerHelper.sh test -target=builder -os=ubuntu22 -compiler=clang \
2>&1 | tee build/test-ubuntu22-clang-latest.log

echo [DRY-RUN] docker push openroad/centos7-dev:latest
echo [DRY-RUN] docker push openroad/centos7-dev:${commitSha}
echo [DRY-RUN] docker push openroad/ubuntu20-dev:latest
echo [DRY-RUN] docker push openroad/ubuntu20-dev:${commitSha}
echo [DRY-RUN] docker push openroad/ubuntu22-dev:latest
echo [DRY-RUN] docker push openroad/ubuntu22-dev:${commitSha}

else
echo "Will not push."
Expand Down
45 changes: 45 additions & 0 deletions etc/Env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

set -euo pipefail

isGitRepo="$(git -C . rev-parse 2>/dev/null; echo $?)"

if [[ "${isGitRepo}" != 0 ]]; then
printf "git commit: unknown, this is not a git repository.\n(Please make sure that you have the latest code changes and add the commit hash in the description)\n"
else
latestGitCommit="$(git ls-remote https://github.com/The-OpenROAD-Project/OpenROAD.git HEAD | awk '{print $1}')"
currentGitCommit="$(git rev-parse HEAD)"
if [[ ${currentGitCommit} != ${latestGitCommit} ]]; then
echo "Please pull the latest changes and try again, if problem persists file a github issue with the re-producible test case."
exit 1
else
echo "Git commit: ${currentGitCommit}"
fi
fi

platform="$(uname -s)"
echo "kernel: ${platform} $(uname -r)"

case "${platform}" in
"Linux" )
if [[ -f /etc/os-release ]]; then
os=$(awk -F= '/^NAME/{print $2}' /etc/os-release | sed 's/"//g')
version=$(awk -F= '/^VERSION=/{print $2}' /etc/os-release | sed 's/"//g')
else
os="Unidentified OS, could not find /etc/os-release."
version=""
fi
;;
"Darwin" )
os="$(sw_vers | sed -n 's/^ProductName://p')"
version="$(sw_vers | sed -n 's/^ProductVersion://p')"
;;
*)
echo "OS: ${os} ${version}"
;;
esac

echo "os: ${os} ${version}"
echo "$(cmake --version | sed 1q)"
echo "$(gcc --version | sed 1q)"
echo "$(clang --version | sed 1q)"
1 change: 1 addition & 0 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ void dbNetwork::readDbNetlistAfter()
{
makeTopCell();
findConstantNets();
checkLibertyCorners();
}

void dbNetwork::makeTopCell()
Expand Down
3 changes: 1 addition & 2 deletions src/dbSta/src/dbReadVerilog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ dbVerilogNetwork::dbVerilogNetwork() : ConcreteNetwork(), db_network_(nullptr)
void dbVerilogNetwork::init(dbNetwork* db_network)
{
db_network_ = db_network;
report_ = db_network_->report();
debug_ = db_network_->debug();
copyState(db_network_);
}

dbVerilogNetwork* makeDbVerilogNetwork()
Expand Down
20 changes: 10 additions & 10 deletions src/dbSta/test/block_sta1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ Path Type: max
0.0000 0.0000 clock clk1 (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.0000 0.0000 ^ r2/CK (DFF_X1)
0.0779 0.0779 v r2/Q (DFF_X1)
0.0242 0.1020 v u1/Z (BUF_X1)
0.0281 0.1302 v u2/ZN (AND2_X1)
0.0000 0.1302 v r3/D (DFF_X1)
0.1302 data arrival time
0.0772 0.0772 v r2/Q (DFF_X1)
0.0233 0.1006 v u1/Z (BUF_X1)
0.0273 0.1278 v u2/ZN (AND2_X1)
0.0000 0.1278 v r3/D (DFF_X1)
0.1278 data arrival time

10.0000 10.0000 clock clk1 (rise edge)
0.0000 10.0000 clock network delay (ideal)
0.0000 10.0000 clock reconvergence pessimism
10.0000 ^ r3/CK (DFF_X1)
-0.0391 9.9609 library setup time
9.9609 data required time
-0.0390 9.9610 library setup time
9.9610 data required time
-------------------------------------------------------------
9.9609 data required time
-0.1302 data arrival time
9.9610 data required time
-0.1278 data arrival time
-------------------------------------------------------------
9.8307 slack (MET)
9.8332 slack (MET)


2 changes: 1 addition & 1 deletion src/dbSta/test/power1.ok
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
Internal Switching Leakage Total
Power Power Power Power (Watts)
--------------------------------------------
4.56e-07 7.43e-09 7.91e-08 5.42e-07 r1
4.55e-07 5.55e-09 7.91e-08 5.40e-07 r1
1.00000e+07 0.500 propagated
Loading

0 comments on commit 12eeedd

Please sign in to comment.