Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fault-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Oct 24, 2022
2 parents 42fe573 + 3809309 commit 6244298
Show file tree
Hide file tree
Showing 161 changed files with 3,117 additions and 3,228 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For more information about the OpenLane CI/CD, visit https://openlane.readthedocs.io/en/latest/for_developers/gha_workflow.html.
15 changes: 11 additions & 4 deletions .github/workflows/openlane_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
else
echo "::set-output name=design_matrix::$(python3 ./.github/test_sets/get_test_matrix.py fastest_test_set)"
fi
echo "::set-output name=issue_regression_matrix::$(python3 ./run_issue_regressions.py get_matrix)"
echo "::set-output name=issue_regression_matrix::$(python3 -m tests get_matrix)"
docker_build_amd64:
name: Docker Build (amd64)
runs-on: ubuntu-20.04
Expand All @@ -94,7 +94,7 @@ jobs:
dockerhub_user: ${{ secrets.DOCKERHUB_USER }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
issue_regression_test:
name: Regression Test (Issue ${{ matrix.design }})
name: Regression Test (Test ${{ matrix.test }})
needs: [docker_build_amd64, pdk_build]
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -131,7 +131,14 @@ jobs:
run: python3 -m pip install pyyaml

- name: Run Issue Regression Test
run: cd ${GITHUB_WORKSPACE}/ && make run_issue_regression ISSUE_REGRESSION_DESIGN=${{ matrix.design }}
run: cd ${GITHUB_WORKSPACE}/ && make run_issue_regression ISSUE_REGRESSION_DESIGN=${{ matrix.test }}

- name: Upload Logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test_${{ matrix.test }}_logs
path: ./test_logs
# Each test has two components: a fast test set and an extended test set.
# The fast test set is run on all PRs, etc. The extended test set runs on schedule.
test:
Expand Down Expand Up @@ -169,7 +176,7 @@ jobs:
tar -xf /tmp/sky130A.tar -C $PDK_ROOT/sky130A .
- name: Set PDK Variant
run: |
run: |
echo "PDK=sky130A" >> $GITHUB_ENV
- name: Get Pyyaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tool_updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: ./.github/actions/set_env_variables

- name: Update PDK
run: python3 ${GITHUB_WORKSPACE}/.github/scripts/update_tools.py sky130 open_pdks
run: python3 ${GITHUB_WORKSPACE}/.github/scripts/update_tools.py open_pdks

- name: Create Pull Request
if: ${{ env.NO_UPDATE != '1' }}
Expand Down
14 changes: 8 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: conf.py

conda:
environment: docs/environment.yml
build:
os: ubuntu-22.04
tools:
python: "3.10"
commands:
- pip3 install -r ./docs/requirements.txt
- cd docs && python3 -m sphinx.cmd.build -M html "source" "_build"
- mv docs/_build _readthedocs
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to Contribute
# Contributing Code
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.

## Branching
Expand All @@ -18,7 +18,7 @@ Please do not write new shell scripts, no matter how trivial.
### Python
Python code should run on Python 3.6+.

You will need to ensure that your Python code passes linting with the tools and plugins in [`requirements_lint.txt`](./requirements_lint.txt). The commands are simply `black .` and `flake8 .`. Please fix all warnings.
You will need to ensure that your Python code passes linting with the tools and plugins in [`requirements_lint.txt`](https://github.com/The-OpenROAD-Project/OpenLane/tree/master/requirements_lint.txt). The commands are simply `black .` and `flake8 .`. Please fix all warnings.

For new code, please follow [PEP-8 naming conventions](https://peps.python.org/pep-0008/#naming-conventions). The linters do not enforce them just yet because of the corpus of existing code that does not do that, but they will in the future.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ test_design_list:
run_issue_regression:
cd $(OPENLANE_DIR) && \
$(ENV_COMMAND) sh -c "\
python3 -u run_issue_regressions.py run $(ISSUE_REGRESSION_DESIGN)"
python3 -um tests run $(ISSUE_REGRESSION_DESIGN)"

issue_regression_all:
cd $(OPENLANE_DIR) && \
$(ENV_COMMAND) sh -c "\
python3 -u run_issue_regressions.py run_all"
python3 -um tests run_all"

.PHONY: test
test:
Expand Down
409 changes: 42 additions & 367 deletions README.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion configuration/floorplan.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ set ::env(FP_PDN_VPITCH) 153.6
set ::env(FP_PDN_HOFFSET) 16.65
set ::env(FP_PDN_HPITCH) 153.18

set ::env(FP_PDN_SKIPTRIM) 0

set ::env(FP_PDN_AUTO_ADJUST) 1

set ::env(FP_PDN_CORE_RING) 0
Expand Down Expand Up @@ -53,4 +55,4 @@ set ::env(FP_PDN_VERTICAL_HALO) $::env(FP_PDN_HORIZONTAL_HALO)
set ::env(FP_TAP_HORIZONTAL_HALO) 10
set ::env(FP_TAP_VERTICAL_HALO) $::env(FP_TAP_HORIZONTAL_HALO)
set ::env(FP_PDN_ENABLE_GLOBAL_CONNECTIONS) 1
set ::env(FP_PDN_ENABLE_MACROS_GRID) 1
set ::env(FP_PDN_ENABLE_MACROS_GRID) 1
67 changes: 39 additions & 28 deletions configuration/general.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,57 @@
# 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.
set ::env(USE_GPIO_PADS) 0

# General Defaults
set ::env(CLOCK_PERIOD) "10.0"
set ::env(USE_GPIO_PADS) 0
set ::env(RSZ_DONT_TOUCH_RX) "$^"

# Flow Controls
set ::env(RUN_SIMPLE_CTS) 0

# Flow Controls
set ::env(LEC_ENABLE) 0
set ::env(DFT_ENABLE) 0

set ::env(YOSYS_REWRITE_VERILOG) 0
set ::env(FILL_INSERTION) 1
set ::env(TAP_DECAP_INSERTION) 1

## Intentionally Undocumented
set ::env(RSZ_USE_OLD_REMOVER) 0

## STA
set ::env(STA_REPORT_POWER) {1}
set ::env(STA_WRITE_LIB) {1}

## ECO Flow
set ::env(ECO_ENABLE) {0}
set ::env(ECO_ITER) {0}
set ::env(ECO_FINISH) {0}
set ::env(ECO_SKIP_PIN) {1}

## Routing
set ::env(RUN_DRT) 1
set ::env(USE_ARC_ANTENNA_CHECK) 1
set ::env(RUN_SPEF_EXTRACTION) 1
set ::env(RUN_IRDROP_REPORT) 1

# 0: no diodes
# 1: spray inputs with diodes
# 2: spray inputs with fake diodes first then fix up the violators with real ones
# 3: use FR Antenna Avoidance flow
# 4: Spray diodes on design pins, and add diodes where they need to be added for each macro.
# 5: Same as 2 but behaves like 4.
set ::env(DIODE_INSERTION_STRATEGY) {3}

## Signoff
set ::env(RUN_CVC) 1
set ::env(PRIMARY_SIGNOFF_TOOL) magic

### Netgen
set ::env(RUN_LVS) 1
set ::env(LVS_INSERT_POWER_PINS) 1
set ::env(LVS_CONNECT_BY_LABEL) 0

### Magic-Specific
set ::env(RUN_MAGIC) 1
set ::env(RUN_MAGIC_DRC) 1
set ::env(MAGIC_PAD) 0
Expand All @@ -44,7 +75,10 @@ set ::env(MAGIC_EXT_USE_GDS) 0
set ::env(MAGIC_INCLUDE_GDS_POINTERS) 0
set ::env(MAGIC_DISABLE_HIER_GDS) 1
set ::env(MAGIC_CONVERT_DRC_TO_RDB) 1
set ::env(MAGIC_DEF_NO_BLOCKAGES) 1
set ::env(MAGIC_DEF_LABELS) 1

### Klayout-Specific
set ::env(RUN_KLAYOUT) 1
set ::env(RUN_KLAYOUT_DRC) 0
set ::env(KLAYOUT_XOR_GDS) 1
Expand All @@ -53,27 +87,4 @@ set ::env(TAKE_LAYOUT_SCROT) 0
set ::env(KLAYOUT_DRC_KLAYOUT_GDS) 0
set ::env(RUN_KLAYOUT_XOR) 1

set ::env(RUN_CVC) 1
set ::env(RUN_LVS) 1

set ::env(YOSYS_REWRITE_VERILOG) 0
set ::env(LEC_ENABLE) 0

set ::env(GENERATE_FINAL_SUMMARY_REPORT) 1


# 0: no diodes
# 1: spray inputs with diodes
# 2: spray inputs with fake diodes first then fix up the violators with real ones
# 3: use FR Antenna Avoidance flow
# 4: Spray diodes on design pins, and add diodes where they need to be added for each macro.
# 5: Same as 2 but behaves like 4.
set ::env(DIODE_INSERTION_STRATEGY) 3

set ::env(STA_REPORT_POWER) {1}

## ECO Flow
set ::env(ECO_ENABLE) {0}
set ::env(ECO_ITER) {0}
set ::env(ECO_FINISH) {0}
set ::env(ECO_SKIP_PIN) {1}
set ::env(GENERATE_FINAL_SUMMARY_REPORT) {1}
2 changes: 1 addition & 1 deletion configuration/load_order.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
general.tcl checkers.tcl synthesis.tcl dft.tcl floorplan.tcl cts.tcl placement.tcl routing.tcl extraction.tcl lvs.tcl
general.tcl checkers.tcl synthesis.tcl dft.tcl floorplan.tcl cts.tcl placement.tcl routing.tcl extraction.tcl
3 changes: 0 additions & 3 deletions configuration/lvs.tcl

This file was deleted.

3 changes: 1 addition & 2 deletions configuration/placement.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ set ::env(PL_RESIZER_REPAIR_TIE_FANOUT) 1
set ::env(PL_MAX_DISPLACEMENT_X) 500
set ::env(PL_MAX_DISPLACEMENT_Y) 100
set ::env(PL_MACRO_HALO) {0 0}
set ::env(PL_MACRO_CHANNEL) {0 0}
set ::env(UNBUFFER_NETS) "^$"
set ::env(PL_MACRO_CHANNEL) {0 0}
2 changes: 1 addition & 1 deletion configuration/synthesis.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set ::env(SYNTH_STRATEGY) "AREA 0"
set ::env(SYNTH_ADDER_TYPE) "YOSYS"
set ::env(CLOCK_BUFFER_FANOUT) 16
set ::env(SYNTH_READ_BLACKBOX_LIB) 0
set ::env(SYNTH_TOP_LEVEL) 0
set ::env(SYNTH_ELABORATE_ONLY) 0
set ::env(SYNTH_FLAT_TOP) 0
set ::env(IO_PCT) 0.2
set ::env(SYNTH_EXTRA_MAPPING_FILE) ""
Expand Down
14 changes: 7 additions & 7 deletions dependencies/tool_metadata.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: cvc
- name: cvc_rv
repo: https://github.com/d-m-bailey/cvc
commit: d172016a791af3089b28070d80ad92bdfef9c585
commit: df85a637e83da870129c93c8793cad282bb8ddd1
build: |
autoreconf -i
./configure --disable-nls --prefix=$PREFIX
Expand All @@ -9,7 +9,7 @@
make install
- name: magic
repo: https://github.com/rtimothyedwards/magic
commit: 4afc476d928b138a2d7bd709b52d145cce781394
commit: 94daf986ab9aa94a9ae2ac3539fa5def9bd2a1ac
build: |
./configure --prefix=$PREFIX $MAGIC_CONFIG_OPTS
make clean
Expand All @@ -18,7 +18,7 @@
make install
- name: netgen
repo: https://github.com/rtimothyedwards/netgen
commit: 2056b37c95e11ea802f8b06c8948e874a298808a
commit: 3aeea9d1642c8d87911ed13626c77e4888caa9eb
build: |
./configure --prefix=$PREFIX $MAGIC_CONFIG_OPTS
make clean
Expand Down Expand Up @@ -58,7 +58,7 @@
in_install: false
- name: openroad_app
repo: https://github.com/The-OpenROAD-Project/OpenROAD
commit: 4174c3ad802d2ac1d04d387d2c4b883903f6647e
commit: 389a1f09821c0f57e3bf8e88f4ab43c76ec5f5c4
build: ''
in_install: false
- name: git
Expand All @@ -67,8 +67,8 @@
build: ''
in_install: false
- name: open_pdks
repo: https://github.com/efabless/open_pdks
commit: fa87f8f4bbcc7255b6f0c0fb506960f531ae2392
repo: https://github.com/RTimothyEdwards/open_pdks
commit: 0059588eebfc704681dc2368bd1d33d96281d10f
build: ''
in_install: false
pdk: true
Expand Down
2 changes: 1 addition & 1 deletion designs/caravel_upw/config.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ set ::env(RT_MAX_LAYER) {met4}
set ::env(FP_PDN_CHECK_NODES) 0

# The following is because there are no std cells in the example wrapper project.
set ::env(SYNTH_TOP_LEVEL) 1
set ::env(SYNTH_ELABORATE_ONLY) 1
set ::env(PL_RANDOM_GLB_PLACEMENT) 1

set ::env(PL_RESIZER_DESIGN_OPTIMIZATIONS) 0
Expand Down
3 changes: 2 additions & 1 deletion designs/spm/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"FP_PDN_VOFFSET": 7,
"FP_PDN_HOFFSET": 7,
"FP_PIN_ORDER_CFG": "dir::pin_order.cfg",
"DFT_ENABLE": 1,
"DFT_ENABLE": true,
"RESET_PORT": "rst",
"FP_PDN_SKIPTRIM": true,
"pdk::sky130*": {
"FP_CORE_UTIL": 45,
"scl::sky130_fd_sc_hd": {
Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $(TOOL_EXPORT_TARGETS): pull-% : FORCE
rm -rf ./tar/openlane
mkdir -p ./tar/openlane
for file in $(OPENLANE_SKELETON); do\
$(PYTHON_BIN) ./utils.py copy-tree -i */runs/* ../$$file ./tar/openlane/$$file ;\
$(PYTHON_BIN) ./utils.py copy-tree -i '*/runs/*' ../$$file ./tar/openlane/$$file ;\
done

.PHONY: merge openlane
Expand Down
10 changes: 4 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# For developers: Building the Docker Image
Note: You probably shouldn't be here.

# Building and Customizing the Docker Image
## Structure

There are two "families" of images: one is for building tools, and the other is for running tools.
Expand All @@ -11,13 +9,13 @@ The run family has a base image that contains all the running dependencies. Ther

```
openlane-build-base
L cvc **builder**
L cvc_rv **builder**
L openroad_app **builder**
L [...]
openlane-run-base
L openlane
L cvc **runnable**
L cvc_rv **runnable**
L openroad_app **runnable**
```

Expand Down Expand Up @@ -61,7 +59,7 @@ OpenLane scripts depend upon a variety of different shell environment variables
```

## Running as root
* For security reasons, we don't recommend the default root Docker installation. See https://docs.docker.com/engine/security/rootless/ for a safer Docker installation also supported by OpenLane.
* For security reasons, we don't recommend the default root Docker installation on GNU/Linux. See https://docs.docker.com/engine/security/rootless/ for a safer Docker installation also supported by OpenLane.

By default `make mount` logs into the image with the user ID that is currently active. If you are running as an unprivileged user, you can use `make mount` to log in as root to the Docker image, but you will need to use `sudo` to do this. But, if you are depending on shell environment variables that you may have set during the current session they will be dropped by the `sudo` command. One way to pass those on to the sudo shell is to use the `-E` option. The following shows how you can do that:

Expand Down
17 changes: 9 additions & 8 deletions docker/cvc/Dockerfile → docker/cvc_rv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ ARG RUN_BASE_IMAGE=
ARG BUILD_BASE_IMAGE=
FROM ${BUILD_BASE_IMAGE} AS builder

ARG CVC_REPO
ARG CVC_COMMIT
ARG CVC_RV_REPO
ARG CVC_RV_COMMIT

# Build
WORKDIR /cvc
RUN curl -L ${CVC_REPO}/tarball/${CVC_COMMIT} | tar -xzC . --strip-components=1 &&\
WORKDIR /cvc_rv
RUN curl -L ${CVC_RV_REPO}/tarball/${CVC_RV_COMMIT} | tar -xzC . --strip-components=1 &&\
autoreconf -i && \
autoconf && \
./configure --disable-nls --prefix=/build && \
make install

sed -i 's/api.parser.class/parser_class_name/' src/cdlParser.yy && \
make -j$(nproc) install

RUN mkdir -p /build/version/
RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/cvc.version
RUN echo ${CVC_COMMIT} >> /build/version/cvc.version
RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/cvc_rv.version
RUN echo ${CVC_RV_COMMIT} >> /build/version/cvc_rv.version
RUN tar -czf /build.tar.gz /build

# ---
Expand Down
2 changes: 0 additions & 2 deletions docker/klayout/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This file is unused. Building Klayout simply takes too damn long.

# Copyright 2020-2021 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Loading

0 comments on commit 6244298

Please sign in to comment.