Skip to content

Commit 5f79b79

Browse files
authored
Merge pull request #771 from habibayassin/build-script-doc
add table in docs for build options locally and with docker
2 parents b30bac9 + 86bbde2 commit 5f79b79

File tree

7 files changed

+85
-56
lines changed

7 files changed

+85
-56
lines changed

build_openroad.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Options:
7979
also given, then use N threads.
8080
8181
--yosys-args-overwrite Do not use default flags set by this scrip during
82-
Yosys comilation.
82+
Yosys compilation.
8383
8484
--yosys-args STRING Aditional compilation flags for Yosys compilation.
8585
@@ -94,7 +94,7 @@ Options:
9494
currently used on the flow.
9595
9696
--lsoracle-args-overwrite
97-
Do not use default flags set by this scrip during
97+
Do not use default flags set by this script during
9898
LSOracle compilation.
9999
100100
--lsoracle-args STRING Aditional compilation flags for LSOracle

docs/contrib/DeveloperGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Building
44

5-
Instructions for building are available [here](../user/GettingStarted.md).
5+
Instructions for building are available [here](./Build.md).
66

77
## Logger
88

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ entries:
1717
- file: user/GettingStarted
1818
title: Getting Started with OpenROAD Flow
1919
entries:
20+
- file: user/Build
21+
title: Build OpenROAD Flow
2022
- file: user/BuildWithDocker
2123
title: Build With Docker
2224
- file: user/BuildLocally

docs/tutorials/FlowTutorial.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -920,9 +920,8 @@ openroad -gui
920920
Run [test_gcd.api.tcl](../../src/pdn/test/test_gcd.api.tcl)
921921
to generate power grid for `gcd` design.
922922

923-
:::{warning}
924-
The refernced script is not currently avaiable, it will be addressed in a future pull request
925-
:::
923+
> **Warning:**
924+
> The refernced script is not currently avaiable, it will be addressed in a future pull request
926925
927926
```
928927
source test_gcd.api.tcl
@@ -1108,9 +1107,8 @@ Zoomed view of cell placement:
11081107
Explore macro placement with halo spacing, refer to the example
11091108
[here](../../src/mpl/test/gcd_mem1_02.tcl).
11101109

1111-
:::{warning}
1112-
The refernced script is not currently avaiable, it will be addressed in a future pull request
1113-
:::
1110+
> **Warning:**
1111+
> The refernced script is not currently avaiable, it will be addressed in a future pull request
11141112
11151113
Launch GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
11161114
```
@@ -1165,9 +1163,8 @@ If the design has more than one macro, it is important to provide halo and
11651163
channel spacing to provide enough space for routing. Refer to the
11661164
following example [here](../../src/mpl/test/gcd_mem3_03.tcl).
11671165

1168-
:::{warning}
1169-
The refernced script is not currently avaiable, it will be addressed in a future pull request
1170-
:::
1166+
> **Warning:**
1167+
> The refernced script is not currently avaiable, it will be addressed in a future pull request
11711168
11721169
To view macro placement with channel spacing in OpenROAD GUI run the following command(s) in the terminal in OpenROAD tool root directory:
11731170
```

docs/user/Build.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Build OpenROAD Flow
2+
3+
> **Warning:**
4+
> On CentOS 7 you need to manually make sure the PATH variable includes at
5+
> least one of the new version of GCC/Clang. To enable GCC-8 or Clang-7 you
6+
> need to run:
7+
>
8+
> ```shell
9+
> # to enable gcc-8
10+
> source /opt/rh/devtoolset-8/enable
11+
> # or to enable clang-7
12+
> source /opt/rh/llvm-toolset-7.0/enable
13+
> ```
14+
15+
## Build Command and options
16+
17+
``` shell
18+
./build_openroad.sh
19+
```
20+
21+
Options for `./build_openroad.sh` script
22+
| Argument | Description |
23+
|-------------------------------|---------------------------------------------------------------------------------------|
24+
| `-h` or `--help` | Print help message. |
25+
| `-o` or `--local` | Build locally instead of building a Docker image. |
26+
| `-l` or `--latest` | Use the head of branch --or_branch or 'master' by default for tools/OpenROAD. |
27+
| `--or_branch BRANCH_NAME` | Use the head of branch BRANCH for tools/OpenROAD. |
28+
| `--or_repo REPO_URL` | Use a fork at REPO-URL (https/ssh) for tools/OpenROAD. |
29+
| `--no_init` | Skip initializing submodules. |
30+
| `-t N` or `--threads N` | Use N cpus when compiling software. |
31+
| `-n` or `--nice` | Nice all jobs. Use all cpus unless `--threads` is also given, then use N threads. |
32+
| `--yosys-args-overwrite` | Do not use default flags set by this scrip during Yosys compilation. |
33+
| `--yosys-args STRING` | Aditional compilation flags for Yosys compilation. |
34+
| `--openroad-args-overwrite` | Do not use default flags set by this script during OpenROAD app compilation. |
35+
| `--openroad-args STRING` | Aditional compilation flags for OpenROAD app compilation. |
36+
| `--lsoracle-enable` | Compile LSOracle. Disable by default as it is not currently used on the flow. |
37+
| `--lsoracle-args-overwrite` | Do not use default flags set by this scrip during LSOracle compilation. |
38+
| `--lsoracle-args STRING` | Aditional compilation flags for LSOracle compilation. |
39+
| `--install-path PATH` | Path to install tools. Default is `${INSTALL_PATH}`. |
40+
| `--clean` | Call git clean interactively before compile. Useful to remove old build files. |
41+
| `--clean-force` | Call git clean before compile. WARNING: this option will not ask for confirmation. Useful to remove old build files. |
42+
| `-c` or `--copy-platforms` | Only applicable for docker builds. Copy platforms to inside docker image. |
43+
| `--docker-args-overwrite` | Only applicable for docker builds. Do not use default flags set by this script for Docker builds. |
44+
| `--docker-args STRING` | Only applicable for docker builds. Additional compilation flags for Docker build. |
45+
46+
47+
## Build from sources locally
48+
49+
Build from sources locally, [instructions here](./BuildLocally.md).
50+
51+
## Build from sources using Docker
52+
53+
Build from sources using Docker, [instructions here](./BuildWithDocker.md).

docs/user/BuildWithDocker.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,26 @@
55
For this method you only need to install
66
[Docker](https://docs.docker.com/engine/install) on your machine.
77

8-
---
9-
10-
**WARNING**
11-
12-
The `build_openroad.sh` will use the host number of CPUs to compile `openroad`.
13-
14-
Please check your Docker daemon setup to make sure all host CPUs are
15-
available. If you are not sure, you can check with the command below. If
16-
the output number is different from the number of CPUs from your machine,
17-
then is recommended that you restrict the number of CPUs used by the scripts
18-
(see instructions below).
19-
20-
``` shell
21-
docker run <IMAGE> nproc
22-
# <IMAGE> can be any commonly used OS, e.g., 'centos:centos7'
23-
docker run centos:centos7 nproc
24-
```
25-
26-
You can restrict the number of CPUs with the `-t|--threads N` argument:
27-
28-
``` shell
29-
./build_openroad.sh --threads N
30-
```
31-
32-
---
8+
> **Warning:**
9+
> The `build_openroad.sh` will use the host number of CPUs to compile `openroad`.
10+
>
11+
> Please check your Docker daemon setup to make sure all host CPUs are
12+
> available. If you are not sure, you can check with the command below. If
13+
> the output number is different from the number of CPUs from your machine,
14+
> then is recommended that you restrict the number of CPUs used by the scripts
15+
> (see instructions below).
16+
>
17+
> ``` shell
18+
> docker run <IMAGE> nproc
19+
> # <IMAGE> can be any commonly used OS, e.g., 'centos:centos7'
20+
> docker run centos:centos7 nproc
21+
> ```
22+
>
23+
> You can restrict the number of CPUs with the `-t|--threads N` argument:
24+
>
25+
> ``` shell
26+
> ./build_openroad.sh --threads N
27+
> ```
3328
3429
## Clone and Build
3530

docs/user/GettingStarted.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,7 @@ Larger designs may require better hardware.
2424

2525
### Building and Installing the Software
2626

27-
**WARNING**
28-
29-
On CentOS 7 you need to manually make sure the PATH variable includes at
30-
least one of the new version of GCC/Clang. To enable GCC-8 or Clang-7 you
31-
need to run:
32-
33-
```shell
34-
# to enable gcc-8
35-
source /opt/rh/devtoolset-8/enable
36-
# or to enable clang-7
37-
source /opt/rh/llvm-toolset-7.0/enable
38-
```
39-
40-
---
41-
42-
There are currently two options to set up the OpenROAD Flow:
43-
44-
- Build from sources using Docker, [instructions here](./BuildWithDocker.md).
45-
- Build from sources locally, [instructions here](./BuildLocally.md).
27+
Instructions for building are available [here](./Build.md).
4628

4729

4830
## Running a Design

0 commit comments

Comments
 (0)