File size: 3,491 Bytes
198fb2a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | # Build from sources locally
## Clone and Install Dependencies
The `setup.sh` script installs all of the dependencies, including OpenROAD dependencies, if they are not already installed.
Supported configurations are: Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04(aarch64), RHEL 8, RockyLinux 9 and Debian 11.
``` shell
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
sudo ./setup.sh
```
## Using Bazel to build OpenROAD and run the ORFS flow (unsupported)
For ORFS/OpenROAD developers. Most of `./setup.sh` isn't needed when
building OpenROAD with Bazel — this provides the bare minimum to build
OpenROAD and test ORFS flows. No sudo required.
Install [Bazelisk](https://bazel.build/install/bazelisk) first.
``` shell
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
bazelisk run //:install_for_bazel
cd flow && make
```
## Build
``` shell
./build_openroad.sh --local
```
:::{Note}
There is a `build_openroad.log` file that is generated with every
build in the main directory. In case of filing issues, it can be uploaded
in the "Relevant log output" section of OpenROAD-flow-scripts repo
[issue form](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues/new?assignees=&labels=&template=bug_report_with_orfs.yml).
:::
## Verify Installation
The binaries should be available on your `$PATH` after setting
up the environment. The `make` command runs from RTL-GDSII generation for default design `gcd` with `nangate45` PDK.
``` shell
source ./env.sh
yosys -help
yosys -m slang -p "slang_version"
openroad -help
cd flow
make
```
You can view final layout images in OpenROAD GUI using this command.
``` shell
make gui_final
```

## Compiling and debugging in Visual Studio Code
Set up environment variables using `dev_env.sh`, then start Visual Studio Code. Please ensure [CMake plugins](https://code.visualstudio.com/docs/cpp/cmake-linux) are installed.
``` shell
. ./dev_env.sh
code tools/OpenROAD/
```
## Build OpenROAD and run a few ORFS flows with Bazel
Local use case:
- Install Bazelisk and no other dependencies, no need to run `sudo ./setup.sh`
- Modify & build OpenROAD
- Test built OpenROAD with a few ORFS flows
The Bazel support in OpenROAD and ORFS is work in progress and some Bazel experience is recommended before going spelunking in the Bazel builds.
Contributions welcome!
To build `designs/asap7/gcd:gcd_floorplan`:
cd flow
(cd ../tools/OpenROAD && bazel build :openroad -c opt) && bazelisk build designs/asap7/gcd:gcd_floorplan
Or to run all flows currently available in Bazel
cd flow
(cd ../tools/OpenROAD && bazel build :openroad -c opt) && bazelisk build ...
Note! ORFS uses the OpenROAD Bazel built binary in stop-gap way until OpenROAD has been switched to bzlmod, after which to build all flows becomes simpler as ORFS will build the requisite OpenROAD directly:
cd flow
bazelisk build ...
ORFS uses [bazel-orfs](https://github.com/The-OpenROAD-Project/bazel-orfs) to implement the flow and gets some depedencies, like yosys, from the Docker image. Over time, all dependencies should be built with Bazel and the dependency on the ORFS Docker image will be phased out.
### Upgrading MODULE.bazel with the latest bazel-orfs and ORFS Docker image
Run:
bazelisk run @bazel-orfs//:bump
Then commit MODULE.bazel and MODULE.bazel.lock.
|