Skip to content

Commit

Permalink
Timing synthesis (#75)
Browse files Browse the repository at this point in the history
* Add pragma once everywhere.

* Initial cleanup

* Update benchmarks.

* Fix mapping verilog

* Add missing abc techmapping scripts and update github workflow.

* Fix variable substitution in graph makefile target.

* Update build flags in github actions

* Update build image and github action usage.

* Update to even newer ubuntu docker.

* Don't run cmake concurrently to check where the failure is

* Fix path to yosys in github build.

* Fix environment variables for matrix build and fix a test value.

* Copy yosys plugin during actions.

* fix path to artifacts in benchmark run.
  • Loading branch information
yashton committed Mar 29, 2022
1 parent d6d4f0f commit d09b499
Show file tree
Hide file tree
Showing 159 changed files with 181,005 additions and 26,415 deletions.
51 changes: 30 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
runs-on: ubuntu-latest
name: Build LSOracle
container: ghcr.io/lnis-uofu/lsoracle-build:groovy
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
env:
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "6"
Expand All @@ -27,22 +27,27 @@ jobs:
run: |
ccache -p
ccache -z
cmake -DCMAKE_BUILD_TYPE=RELEASE -B build .
cmake --build build -j$(nproc)
cmake -B build . -D CMAKE_BUILD_TYPE=RELEASE -D YOSYS_INCLUDE_DIR=/yosys -D YOSYS_PLUGIN=ON -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON
cmake --build build
ccache -s
- name: Upload artifacts
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-binary
path: build/core/lsoracle
- name: Upload artifacts
- name: Upload plugin artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-plugin
path: build/yosys-plugin/oracle.so
- name: Upload unit test artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-tests
path: build/core/unit_tests
test:
runs-on: ubuntu-latest
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:groovy
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
needs: build
steps:
- name: Check out the repo
Expand All @@ -58,7 +63,7 @@ jobs:
benchmark:
runs-on: ubuntu-latest
name: Benchmarks
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:groovy
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
needs: build
steps:
- name: Checkout the repo
Expand All @@ -67,14 +72,21 @@ jobs:
uses: actions/download-artifact@v2
with:
name: lsoracle-binary
- name: Get plugin
uses: actions/download-artifact@v2
with:
name: lsoracle-plugin
# - name: Prep previous
# run: |
# mkdir -p benchmarks/previous
- name: Run synthesis
run: |
ls
cp lsoracle /usr/local/bin
chmod +x /usr/local/bin/lsoracle
mkdir -p /usr/local/share/lsoracle
mkdir -p /usr/local/share/yosys/plugins
cp oracle.so /usr/local/share/yosys/plugins/
cd benchmarks
make everything.tsv -j $(nproc)
- name: Archive results
Expand All @@ -85,11 +97,10 @@ jobs:
benchmarks/everything.tsv
benchmarks/*/*.log
benchmarks/*/*.rtl
benchmarks/*/*.mapped.v
benchmarks/*/*.synth_report
benchmarks/*/*.timing
benchmarks/*/*.report
benchmarks/*/*.everything
benchmarks/*/*.v
benchmarks/*/*.json
benchmarks/*/*.gates
benchmarks/*/*.sdc
#- name: Get previous results
# uses: dsaltares/fetch-gh-release-asset@master
# with:
Expand All @@ -101,13 +112,13 @@ jobs:
continue-on-error: true
run: |
cd benchmarks
make everything.pdf
make sky130_fd_sc_hd__tt_025C_1v80.pdf
- name: Archive graph
uses: actions/upload-artifact@v2
with:
name: benchmark-graphs
path: |
benchmarks/everything.pdf
benchmarks/sky130_fd_sc_hd__tt_025C_1v80.pdf
- name: Publish results
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master'
Expand All @@ -116,13 +127,11 @@ jobs:
with:
files: |
benchmarks/everything.tsv
benchmarks/everything.png
benchmarks/everything.pdf
benchmarks/sky130_fd_sc_hd__tt_025C_1v80.pdf
benchmarks/*/*.log
benchmarks/*/*.rtl
benchmarks/*/*.mapped.v
benchmarks/*/*.synth_report
benchmarks/*/*.timing
benchmarks/*/*.report
benchmarks/*/*.everything
benchmarks/*/*.v
benchmarks/*/*.json
benchmarks/*/*.gates
benchmarks/*/*.sdc
prerelease: true
6 changes: 3 additions & 3 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: recursive
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=RELEASE -B build .
cmake -B build . -D CMAKE_BUILD_TYPE=RELEASE -D YOSYS_INCLUDE_DIR=/yosys -D YOSYS_PLUGIN=ON -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON
cmake --build build -j$(nproc)
centos-compat:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build
run: |
source ${{ matrix.config.scl }}
cmake -DCMAKE_BUILD_TYPE=RELEASE -B build .
cmake -B build . -D CMAKE_BUILD_TYPE=RELEASE -D YOSYS_INCLUDE_DIR=/yosys -D YOSYS_PLUGIN=ON -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON
cmake --build build -j$(nproc)
ubuntu-compat:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
ccache -z
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=RELEASE -B build .
cmake -B build . -D CMAKE_BUILD_TYPE=RELEASE -D YOSYS_INCLUDE_DIR=/yosys -D YOSYS_PLUGIN=ON -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON
cmake --build build -j$(nproc)
- name: Cache stats
if: ${{ matrix.config.ccache }}
Expand Down
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,12 @@
[submodule "lib/googletest"]
path = lib/googletest
url = https://github.com/google/googletest.git
[submodule "lib/OpenSTA"]
path = lib/OpenSTA
url = https://github.com/The-OpenROAD-Project/OpenSTA.git
[submodule "lib/json"]
path = lib/json
url = https://github.com/nlohmann/json.git
[submodule "benchmarks/techmapping/tigfet/sclib"]
path = benchmarks/techmapping/tigfet/sclib
url = https://github.com/lnis-uofu/TIGFET-10nm-SCLIB.git
24 changes: 9 additions & 15 deletions Dockerfile.actions
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM ubuntu:20.10 as runtime
FROM ubuntu:22.04 as runtime

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --no-install-recommends\
python3 \
python3.9-distutils \
python3-pip \
graphviz \
libffi8ubuntu1 \
swig \
libffi7 \
zlib1g \
libboost-filesystem1.71.0 \
libboost-system1.71.0 \
libboost-python1.71.0 \
libboost-program-options1.71.0 \
libreadline8 \
make \
tcl && \
Expand All @@ -26,8 +23,9 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
apt-get update && \
apt-get install -y tzdata \
bison \
bison \
build-essential \
ccache \
clang \
cmake \
flex \
Expand All @@ -37,16 +35,12 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
gcovr \
git \
lcov \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-system-dev \
libffi-dev \
libpython3.9-dev \
libreadline-dev \
make \
libpython3.9-dev \
libreadline-dev \
make \
pkg-config \
pybind11-dev \
pybind11-dev \
swig \
tcl-dev \
xdot \
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile.debian.testing
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
g++-10 \
cmake \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
python3-distutils \
pybind11-dev \
libreadline-dev \
libpython3-dev \
python3-distutils \
pybind11-dev \
lcov \
gcovr \
git \
bison \
git \
swig \
bison \
flex && \
apt-get clean
ENV CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile.ubuntu.bionic
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
g++-8 \
cmake \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
lcov \
gcovr \
git \
bison \
git \
bison \
swig \
flex && \
apt-get clean
ENV CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8
Expand Down
17 changes: 9 additions & 8 deletions Dockerfile.ubuntu.focal
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
g++-10 \
cmake \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
lcov \
gcovr \
git \
bison \
make \
libpython3.9-dev \
python3.9-distutils \
git \
bison \
make \
libpython3.9-dev \
python3.9-distutils \
swig \
flex && \
apt-get clean
ENV CC=gcc-10 CXX=g++-10
Expand Down
17 changes: 9 additions & 8 deletions Dockerfile.ubuntu.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
cmake \
ccache \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
lcov \
gcovr \
git \
bison \
make \
libpython3.9-dev \
python3.9-distutils \
git \
bison \
make \
libpython3.9-dev \
python3.9-distutils \
swig \
flex && \
apt-get clean
ENV CC=gcc-10 CXX=g++-10
Expand Down
28 changes: 23 additions & 5 deletions benchmarks/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
*_lsoracle.*
*_aigscript.*
*_migscript.*
*_abc.*
*_unoptimized.*
*.lsoracle.*
*.aigscript.*
*.migscript.*
*.abc.*

*.direct_*.*
*.mixed_*.*
*.unoptimized.*
*.xmgscript.*
*.lsoracle_old.*
*.timing_direct*.*
*.timing_yosys*.*
*.mapped.v
*.aig
*.report
Expand All @@ -12,3 +19,14 @@
*.pdf
*.log
*.rtl
*.lsoracle.script
*.yosys.script
*.abc.script
*.blif
*.parts
*.synth.v
*.json
*.gates
formality_workdir
techmapping/gf12/*.lib
techmapping/gf12/*.db
Loading

0 comments on commit d09b499

Please sign in to comment.