Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
oharboe committed Apr 18, 2024
2 parents e0ec6bc + 1c47249 commit 55f27b0
Show file tree
Hide file tree
Showing 201 changed files with 16,022 additions and 13,152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-cron-test-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
./etc/DockerHelper.sh create -target=builder -os=${{ matrix.os }}
- name: Test build
run: |
cmd="yosys -help; openroad -help; make -C flow;"
cmd="source ./env.sh ; yosys -help ; openroad -help ; make -C flow ;"
if [[ ${{ matrix.os }} == "centos7" ]]; then
cmd="source /opt/rh/devtoolset-8/enable; ${cmd}"
cmd="source /opt/rh/llvm-toolset-7.0/enable; ${cmd}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-cron-update-OR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
git pull
- if: "steps.remote-update.outputs.has_update != ''"
name: Create Draft PR
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
signoff: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/github-actions-cron-update-yosys.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Create draft PR for updated YOSYS submodule
on:
push:
schedule:
- cron: "0 8 * * MON"
# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -27,15 +28,14 @@ jobs:
git checkout ${latesttag}
- if: "steps.remote-update.outputs.has_update != ''"
name: Create Draft PR
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
signoff: true
delete-branch: true
title: 'Update yosys submodule'
reviewers: |
vvbandeira
maliberty
habibayassin
draft: true
branch: update-yosys
commit-message: |
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/github-actions-update-rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Create draft PR for updated rules
on:
repository_dispatch:
types:
- set-new-golden

jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Check out repository code recursively
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Python Packages
run: |
pip install firebase-admin
- name: Execute Python Script Update
env:
CREDS_FILE: ${{ secrets.CREDS_FILE }}
API_BASE_URL: ${{ secrets.API_BASE_URL }}
run: |
echo ${{ github.event_name }}
echo ${{ github.event.client_payload.type }}
if [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.type }}" == "overwrite" ]]; then
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
else
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
fi
- name: Push updated rules
id: remote-update
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [ -n "$(git status --porcelain)" ]; then
echo "has_update=true" >> "$GITHUB_OUTPUT"
else
echo "has_update=false" >> "$GITHUB_OUTPUT"
fi
git add .
git commit -m "flow: update rules based on new golden reference"
- if: "steps.remote-update.outputs.has_update == 'true'"
name: Create Draft PR
uses: peter-evans/create-pull-request@v5
with:
token: ${{ github.token }}
signoff: true
delete-branch: true
title: "[BOT] Update rules"
reviewers: |
vvbandeira
maliberty
draft: true
branch: bot-update-rules
commit-message: |
[BOT] Update rules
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY --from=openroad/lsoracle /LSOracle/core/test.ini ./tools/build/LSOracle/sha
COPY --from=openroad/lsoracle /LSOracle/build/yosys-plugin/oracle.so /OpenROAD-flow/tools/build/yosys/share/yosys/plugins/

# openroad binary
COPY --from=openroad/centos7-builder-gcc /OpenROAD/build/src/openroad ./tools/install/OpenROAD/bin/openroad
COPY --from=openroad/ubuntu22.04-builder-gcc /OpenROAD/build/src/openroad ./tools/install/OpenROAD/bin/openroad

# flow files
COPY ./env.sh .
Expand Down
4 changes: 2 additions & 2 deletions build_openroad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ LSORACLE_ARGS="\
-D YOSYS_PLUGIN=ON \
"

DOCKER_OS_NAME="centos7"
DOCKER_OS_NAME="ubuntu22.04"
PROC=-1

function usage() {
Expand Down Expand Up @@ -102,7 +102,7 @@ Options:
Options valid only for Docker builds:
-c, --copy-platforms Copy platforms to inside docker image.
--os=DOCKER_OS_NAME Choose beween centos7 (default), ubuntu20.04 and ubuntu22.04.
--os=DOCKER_OS_NAME Choose beween ubuntu22.04 (default), ubuntu20.04.
This script builds the OpenROAD tools: openroad, yosys and yosys plugins.
By default, the tools will be built from the linked submodule hashes.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
},
{
"name": "Email",
"url": "mailto:openroad@eng.ucsd.edu",
"url": "mailto:[email protected]",
"icon": "fa-solid fa-envelope",
},
{
Expand Down
Binary file added docs/images/Autotuner_Table_view.webp
Binary file not shown.
Binary file added docs/images/Autotuner_best_parameter_view.webp
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ We maintain the following channels for communication:
- OpenROAD with OpenROAD Flow Scripts: <https://github.com/The-OpenROAD-Project/OpenROAD/issues/>
- Discussions:
- OpenROAD Flow: <https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/discussions>
- Inquiries: openroad@eng.ucsd.edu
- Inquiries: [email protected]

See also our [FAQs](user/FAQS.md).

Expand Down
11 changes: 5 additions & 6 deletions docs/tutorials/FlowTutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Use the `bash` shell to run commands and scripts.

#### OpenROAD-flow-scripts Installation

To install OpenROAD-flow-scripts, refer to the
To install OpenROAD-flow-scripts, refer to the
[Build or installing ORFS Dependencies](https://openroad-flow-scripts.readthedocs.io/en/latest/#build-or-installing-orfs-dependencies)
documentation.

Expand All @@ -69,11 +69,10 @@ OpenROAD-flow-scripts installation is complete.
Launch the docker with OpenROAD-flow-scripts container as follows:

```shell
export OS_NAME=centos7
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-$OS_NAME-builder
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22-builder
```

:::{seealso}
:::{seealso}
To launch OpenROAD GUI inside the docker, based on the OS, use the command from [here](../user/BuildWithDocker.md#enable-gui-support).
:::

Expand All @@ -93,7 +92,7 @@ OPENROAD: /OpenROAD-flow-scripts/tools/OpenROAD

To verify the installation run the built-in example design as follows:

```shell
```shell
cd flow
make
```
Expand Down Expand Up @@ -348,7 +347,7 @@ abc.constr klayout.lyt klayout_tech.lef lib


- `reports/sky130hd/ibex/base`
Reports directory, which contains congestion report, DRC
Reports directory, which contains congestion report, DRC
report, design statistics and antenna log for reference.

| `reports` | | |
Expand Down
55 changes: 36 additions & 19 deletions docs/user/BuildWithDocker.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- For this method you only need to install
[Docker](https://docs.docker.com/engine/install) on your machine.
- Ensure that you have sufficient memory allocated to the Virtual Machine (VM)
- Ensure that you have sufficient memory allocated to the Virtual Machine (VM)
as per our system [requirements](../index.md#system-requirements). Refer to
this [Docker guide](https://docs.docker.com/config/containers/resource_constraints/) for setting CPU cores and memory limits.

Expand All @@ -24,40 +24,40 @@ docker run --rm ubuntu:22.04 nproc

### Build Using Docker from pre-built binaries

Courtesy of [Precision Innovations](https://precisioninno.com/),
Courtesy of [Precision Innovations](https://precisioninno.com/),
they release `.deb` installers of OpenROAD for Ubuntu
and Debian on a regular basis.
This greatly helps to reduce the compilation time needed.
and Debian on a regular basis.
This greatly helps to reduce the compilation time needed.

We recommend to use a Docker image of a supported OS
and install OpenROAD using the prebuilt binaries from
Precision Innovations.
You can start the container in an interactive mode using
the command below.
Precision Innovations.
You can start the container in an interactive mode using
the command below.

```shell
docker run -it ubuntu:22.04
```

Now you are ready to install the prebuilt binaries.
Please refer to the instructions for installing prebuilt binaries
Now you are ready to install the prebuilt binaries.
Please refer to the instructions for installing prebuilt binaries
[here](./BuildWithPrebuilt.md).

### Build Using Docker from sources

Alternatively, if you would like the latest commits from the OpenROAD repositories,
do follow the instructions below.
do follow the instructions below.


#### Clone and Build

The following instructions build the docker image with CentOS 7 as the base OS:
The following instructions build the docker image with Ubuntu 22.04 as the base OS:


``` shell
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
./build_openroad.sh
./build_openroad.sh
```

You can restrict the number of CPUs with the `-t|--threads N` argument:
Expand All @@ -68,10 +68,10 @@ You can restrict the number of CPUs with the `-t|--threads N` argument:

## Verify Installation

The binaries are only available from inside a Docker container. Here is an example of starting a container from the created Docker image.
The binaries are only available from inside a Docker container. Here is an example of starting a container from the created Docker image.

``` shell
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-centos7-builder
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
```

Then, inside docker:
Expand All @@ -85,12 +85,20 @@ make
exit
```

Alternatively you may also use the `docker_shell` utility as follows.
It is important that you are in the `flow` directory.

```shell
cd flow
util/docker_shell make
```

## Enable GUI support

To use the GUI feature you will need to start the docker with the
following command,

For Ubuntu/Centos/Debian OS users:
For Ubuntu/Debian OS users:

```
docker run --rm -it \
Expand All @@ -112,16 +120,25 @@ Then use:
docker run --rm -it -e DISPLAY=<IP_LIKE_FROM_TUTORIAL>:0 --network host --privileged <IMAGE_NAME>
```

## Docker Shell Utility
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
It is important that you are in the `flow` directory.

Alternatively, use `docker_shell` to automate the above commands using the
user's parameters. Do refer to the documentation [here](./DockerShell.md).
```shell
cd flow
util/docker_shell gui_final
```

```{note}
`docker_shell` is a helpful utility to automate the
aforementioned Docker commands using the user's parameters.
Do refer to the documentation [here](./DockerShell.md).
```

## Build Docker Image for Different OS

The following instructions build the docker image with a parameterized OS
in two stages. These are for CI and developers that wish to use an OS other
than CentOS 7; regular users should use the steps from previous sections.
than Ubuntu 22.04; regular users should use the steps from previous sections.
The dev stage installs all dependencies and packages required to run OpenROAD
and OpenROAD Flow Scripts. The build stage generates all binaries needed to run
the flow (i.e., `openroad` and `yosys`).
Expand Down
60 changes: 59 additions & 1 deletion docs/user/DockerShell.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,62 @@
```{include} ../../flow/util/README.md
Building example design using Docker image
==========================================

The `docker_shell` script is used as a prefix to launch a command using a OpenROAD docker image.

Also, the current working directory is mapped into the Docker image using the current user's credentials.

Build docker image
------------------

First build the docker image:

```
cd OpenROAD-flow-scripts
./build_openroad.sh
```

Build an example design and run the GUI:

```
cd flow
util/docker_shell make
util/docker_shell make gui_final
```

You can also launch an interactive bash session:

```
util/docker_shell bash
```

If you need to use a different Docker image than default, override by using the `docker_shell_IMAGE`
environment variable:

```
OR_IMAGE=openroad/flow-centos7-builder:v1234 util/docker_shell make
```

If you have built your OpenROAD Docker image using prebuilt binaries,
you might want to source custom paths for your modules as follows.

```
OR_IMAGE=openroad_prebuilt_image YOSYS_CMD=/oss-cad-suite/bin/yosys util/docker_shell make
```

Using `docker_shell` from outside of `OpenROAD-flow-scripts/flow` folder
------------------------------------------------------------------------

If you have designs you are keeping in a git source repository that is not
a fork of the OpenROAD-flow-scripts git repository, you can still use
the `docker_shell` script.

Two ways to use `docker_shell`

1. Simply invoke it from the ORFS location.
2. Copy the script into your source folder. This would allow you
to build and publish a Docker image to a private Docker repository
and lock the ORFS version to the version of your source code. This
gives you a way to deploy updates of ORFS
easily, publish a new Docker image, modify the copy of `docker_shell`
and create a pull request to possibly test your upgrade on your private
build serves.
Loading

0 comments on commit 55f27b0

Please sign in to comment.