You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to separate the ORFS variable support and make
variables and ORFS agnostic to build systems, even if
make is used to evaluate variables.
ORFS contains an implementation of a flow using make,
bazel-orfs implements a flow using Bazel.
Sometimes make is preferable, keep things simple, but for more advanced
flows, the simplicity of make introduces more problems than it solves
Signed-off-by: Øyvind Harboe <[email protected]>
Copy file name to clipboardExpand all lines: flow/scripts/README.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,61 @@
2
2
3
3
Various scripts to support flow as well as utilities.
4
4
5
+
## variables.mk
6
+
7
+
ORFS defines tcl scripts and variables that can be used to implement a flow. Variables in EDA flows is an idiomatic domain feature: placement density, list of .lib, .lef files, etc.
8
+
9
+
The variables are implemented using the `make` language, which ORFS makes no effort to hide. See examples below for usage. Beyond `make`, ORFS uses Python and bash to implement the variables.
10
+
11
+
The choice of `make` to implement the ORFS variables is historical and technical. Technically, the `make` language implements features such as default values, forward references, conditional evaluation of variables, environment variables support and specifying variables on the command line. `make` itself is an uncomplicated dependency, even if depending on and sharing makefiles can be trickier. There is no simple and obviously better choice than `make` to support these features and the use-cases.
12
+
13
+
ORFS avoids the [inversion of control](https://en.wikipedia.org/wiki/Inversion_of_control) trap where the user wants to be in control of the flow and also ORFS wants to be in the flow. To ORFS all build systems are first class citizens and the user can choose if it wants to let ORFS run the flow or if the user wants to be in control of the flow. The job of ORFS is to define and support an interface such that the user can pick a flow implementation that balances simplicity and required features for their project.
14
+
15
+
`make`'s simplicity reduces the cognitive load when getting started with simple OpenROAD examples, but its simplicity eventually causes more problems than it solves when the flow gets complicated enough. MegaBoom illustrates a how a more complicated flow is better implemented in bazel-orfs.
16
+
17
+
Some use-cases for `variables.mk`:
18
+
19
+
- ORFS has a Makefile that implements a flow on top of the variables implemented in `variables.mk` and the ORFS scripts. This is used for CI and local regression testing.
20
+
- The has his own Makefile where ORFS is part of the user's flow where they can include and use only `variables.mk` or the ORFS `makefile`, while remaining in charge.
21
+
- bazel-orfs currently uses the ORFS `makefile` do- targets where no dependency checking is done to implement an ORFS flow. bazel-orfs may switch to using `variables.mk` to evaluate the variables and invoking OpenROAD directly.
22
+
23
+
### Variables hello world
24
+
25
+
It can be useful to run simple experiments to see what variables evaluate to:
26
+
27
+
$ make --file=scripts/variables.mk PLATFORM=asap7 DESIGN_NAME=gcd print-OBJECTS_DIR
28
+
OBJECTS_DIR = ./objects/asap7/gcd/base
29
+
30
+
### Creating and using a bash sourceable script to set up variables
31
+
32
+
As an example of evaluating ORFS variables and invoking OpenROAD directly, first run synthesis on an existing design, set up variables, source the environment variables, then invoke floorplan directly:
33
+
34
+
$ cd .../OpenROAD-flow-scripts/flow
35
+
$ make DESIGN_CONFIG=designs/asap7/gcd/config.mk synth
36
+
$ make DESIGN_CONFIG=designs/asap7/gcd/config.mk vars
### Creating a bash sourcable script to set up variables using `variables.mk` directly
47
+
48
+
It is also possible to evaluate the variables without using the ORFS `Makefile`, but using `variables.mk` directly. In this example we copy the variables set in `designs/asap7/gcd/config.mk` onto the command line:
49
+
50
+
$ make PLATFORM=asap7 DESIGN_NAME=gcd VERILOG_FILES=$(ls designs/src/gcd/*.v) SDC_FILE=designs/asap7/gcd/constraint.sdc "DIE_AREA=0 0 16.2 16.2" "CORE_AREA=1.08 1.08 15.12 15.12" PLACE_DENSITY=0.35 SKIP_LAST_GASP=1 --file=scripts/variables.mk vars
0 commit comments