-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add targets running OpenROAD GUI with Docker image #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits.
Nice initiative. I was going to request targets for the GUI dependencies. The .lib files are needed for the GUI, they contain timing information and as you point out, synthesis has some other dependencies, .lef files, as I recall.
NOTE! You there is a command line version of the gui_ targets, called open_.
Add automated tests to make sure this works, by running:
echo | make open_synth/floorplan/place/crt/5_1_grt.odb/route/final
The above should load everything for the respective stages without errors.
openroad.bzl
Outdated
name = target_name + "_" + stage + "_gui", | ||
tools = [Label("//:docker_shell")], | ||
srcs = [make_pattern, design_config, stage_config] + base_targets, | ||
cmd = "echo \"chmod -R +w . && \"" + get_entrypoint_cmd(make_pattern, design_config, stage_config, Label("//:docker_shell"), "gui_" + stage, docker_image = docker_image) + " > $@ ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which folder is this chmod -R +w in? It should be the bazel-bin folder, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chmod is changing permissions on the current working folder, it should be bazel-bin.
oyvind@small-cigar:~/bazel-orfs$ bazel run L1MetadataArray_full_final_gui
INFO: Invocation ID: 8364ca15-a6c4-4eaf-b6fa-b1738bccb841
INFO: Analyzed target //:L1MetadataArray_full_final_gui (0 packages loaded, 1 target configured).
INFO: Found 1 target...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> /home/oyvind/.cache/bazel/_bazel_oyvind/6e078b44989a9ce1500a63165a20fd2a/execroot/_main/bazel-out: /home/oyvind/bazel-orfs/bazel-out (File exists)
Target //:L1MetadataArray_full_final_gui up-to-date:
bazel-bin/L1MetadataArray_full_final_gui.sh
INFO: Elapsed time: 0.054s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/L1MetadataArray_full_final_gui.sh
/home/oyvind/.cache/bazel/_bazel_oyvind/6e078b44989a9ce1500a63165a20fd2a/execroot/_main/bazel-out/k8-fastbuild/bin/L1MetadataArray_full_final_gui.sh: line 1: bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/docker_shell: No such file or directory
oyvind@small-cigar:~/bazel-orfs$ cat bazel-bin/L1MetadataArray_full_final_gui.shchmod -R +w . && OR_IMAGE=openroad/flow-ubuntu22.04-builder:latest DESIGN_CONFIG=bazel-out/k8-fastbuild/bin/L1MetadataArray_full_config.mk STAGE_CONFIG=bazel-out/k8-fastbuild/bin/L1MetadataArray_full_final_config.mk MAKE_PATTERN=./final-bazel.mk RULEDIR=bazel-out/k8-fastbuild/bin bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/docker_shell make gui_final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a leftover which should be removed during rebase, now it's gone
I am unable to get this to work from megaboom:
Produces:
|
This is forcing the use of docker for bazel run. I want to be able to choose between docker and a local ORFS. I think it is fine to have _gui launch the docker, but I want to have a _gui_deps target that brings in the dependencies required to launch the gui and then use the _make script to launch the GUI using local ORFS. |
Fails:
|
1dd7282
to
618cfc2
Compare
There were some conflicts with recently merged features, now it should work in both bazel-orfs and MegaBoom. I also added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it and it does not work yet:
oyvind@small-cigar:~/bazel-orfs$ ls bazel-bin/results/asap7/L1MetadataArray/full/
1_1_yosys.v 3_4_place_resized.odb 6_1_fill.sdc
1_synth.sdc 3_5_place_dp.odb 6_1_merged.gds
1_synth.v 3_place.odb 6_final.def
2_1_floorplan.odb 3_place.sdc 6_final.gds
2_2_floorplan_io.odb 4_1_cts.odb 6_final.odb
2_3_floorplan_tdms.odb 4_cts.odb 6_final.sdc
2_4_floorplan_macro.odb 4_cts.sdc 6_final.spef
2_5_floorplan_tapcell.odb 5_1_grt.odb 6_final.v
2_6_floorplan_pdn.odb 5_1_grt.sdc clock_period.txt
2_floorplan.odb 5_2_fillcell.odb grt.ok
2_floorplan.sdc 5_3_route.odb place.ok
3_1_place_gp_skip_io.odb 5_route.odb route.guide
3_2_place_iop.odb 5_route.sdc
3_3_place_gp.odb 6_1_fill.odb
oyvind@small-cigar:~/bazel-orfs$ bazel build L1MetadataArray_full_final
INFO: Invocation ID: d1246f1d-1607-4f39-b57e-6e57f15083c1
INFO: Analyzed target //:L1MetadataArray_full_final (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> /home/oyvind/.cache/bazel/_bazel_oyvind/6e078b44989a9ce1500a63165a20fd2a/execroot/_main/bazel-out: /home/oyvind/bazel-orfs/bazel-out (File exists)
Target //:L1MetadataArray_full_final up-to-date:
bazel-bin/results/asap7/L1MetadataArray/full/6_final.spef
bazel-bin/results/asap7/L1MetadataArray/full/6_final.gds
bazel-bin/results/asap7/L1MetadataArray/full/6_final.sdc
bazel-bin/results/asap7/L1MetadataArray/full/6_final.odb
bazel-bin/logs/asap7/L1MetadataArray/full/6_1_merge.log
bazel-bin/logs/asap7/L1MetadataArray/full/6_report.log
INFO: Elapsed time: 0.110s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
oyvind@small-cigar:~/bazel-orfs$ bazel build L1MetadataArray_full_final_gui_deps
INFO: Invocation ID: a68ce4da-2cb0-4f8d-a4b0-21cae2a14437
INFO: Analyzed target //:L1MetadataArray_full_final_gui_deps (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> /home/oyvind/.cache/bazel/_bazel_oyvind/6e078b44989a9ce1500a63165a20fd2a/execroot/_main/bazel-out: /home/oyvind/bazel-orfs/bazel-out (File exists)
Target //:L1MetadataArray_full_final_gui_deps up-to-date:
bazel-bin/L1MetadataArray_full_config.mk
bazel-bin/L1MetadataArray_full_final_config.mk
bazel-bin/results/asap7/L1MetadataArray/full/6_final.spef
bazel-bin/results/asap7/L1MetadataArray/full/6_final.gds
bazel-bin/results/asap7/L1MetadataArray/full/6_final.sdc
bazel-bin/results/asap7/L1MetadataArray/full/6_final.odb
bazel-bin/logs/asap7/L1MetadataArray/full/6_1_merge.log
bazel-bin/logs/asap7/L1MetadataArray/full/6_report.log
INFO: Elapsed time: 0.048s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
oyvind@small-cigar:~/bazel-orfs$ bazel build L1MetadataArray_full_final_make
INFO: Invocation ID: 37991d3f-6954-42c3-972c-9077d729dc81
INFO: Analyzed target //:L1MetadataArray_full_final_make (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> /home/oyvind/.cache/bazel/_bazel_oyvind/6e078b44989a9ce1500a63165a20fd2a/execroot/_main/bazel-out: /home/oyvind/bazel-orfs/bazel-out (File exists)
Target //:L1MetadataArray_full_final_make up-to-date:
bazel-bin/logs/asap7/L1MetadataArray/full/make_script_final.sh
bazel-bin/L1MetadataArray_full_final_make
INFO: Elapsed time: 0.050s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
oyvind@small-cigar:~/bazel-orfs$ bazel-bin/L1MetadataArray_full_final_make gui_final
+++ dirname /home/oyvind/bazel-orfs/orfs
++ cd /home/oyvind/bazel-orfs
++ pwd
+ WORKSPACE=/home/oyvind/bazel-orfs
+ export ORFS=/home/oyvind/OpenROAD-flow-scripts
+ ORFS=/home/oyvind/OpenROAD-flow-scripts
+ export FLOW_HOME=/home/oyvind/OpenROAD-flow-scripts/flow
+ FLOW_HOME=/home/oyvind/OpenROAD-flow-scripts/flow
+ export MAKEFILES=/home/oyvind/OpenROAD-flow-scripts/flow/Makefile
+ MAKEFILES=/home/oyvind/OpenROAD-flow-scripts/flow/Makefile
+ [[ /home/oyvind/bazel-orfs = * ]]
++ echo /home/oyvind/bazel-orfs
++ sed 's|external/bazel-orfs~override|execroot/_main|'
+ export BUILD_DIR=/home/oyvind/bazel-orfs
+ BUILD_DIR=/home/oyvind/bazel-orfs
+ export WORK_HOME=/home/oyvind/bazel-orfs/bazel-out/k8-fastbuild/bin
+ WORK_HOME=/home/oyvind/bazel-orfs/bazel-out/k8-fastbuild/bin
+ chmod -R +w /home/oyvind/bazel-orfs/bazel-out/k8-fastbuild/bin
+ source /home/oyvind/OpenROAD-flow-scripts/env.sh
++ [[ linux-gnu == \d\a\r\w\i\n* ]]
++++ readlink -f /home/oyvind/OpenROAD-flow-scripts/env.sh
+++ dirname /home/oyvind/OpenROAD-flow-scripts/env.sh
++ DIR=/home/oyvind/OpenROAD-flow-scripts
++ '[' -f /opt/rh/rh-python38/enable ']'
++ export OPENROAD=/home/oyvind/OpenROAD-flow-scripts/tools/OpenROAD
++ OPENROAD=/home/oyvind/OpenROAD-flow-scripts/tools/OpenROAD
++ echo 'OPENROAD: /home/oyvind/OpenROAD-flow-scripts/tools/OpenROAD'
OPENROAD: /home/oyvind/OpenROAD-flow-scripts/tools/OpenROAD
++ export PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ export PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ export PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/LSOracle/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ PATH=/home/oyvind/OpenROAD-flow-scripts/tools/install/LSOracle/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ export PATH=/home/oyvind/OpenROAD-flow-scripts/dependencies/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/LSOracle/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ PATH=/home/oyvind/OpenROAD-flow-scripts/dependencies/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/LSOracle/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/yosys/bin:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/oyvind/.cargo/bin:/home/oyvind/.local/bin:/home/oyvind/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
++ [[ linux-gnu == \d\a\r\w\i\n* ]]
++ export FLOW_HOME=/home/oyvind/OpenROAD-flow-scripts/flow
++ FLOW_HOME=/home/oyvind/OpenROAD-flow-scripts/flow
+ make gui_final
[INFO-FLOW] ASU ASAP7 - version 2
Default PVT selection: BC
make: *** No rule to make target 'gui_6_final.odb', needed by 'gui_final'. Stop.
README.md
Outdated
The exception is CLI and GUI for Synth stage, which requires additional LEF files provided with `_open_synth_make` and `_gui_synth_make` target: | ||
|
||
``` | ||
bazel build L1MetadataArray_full_open_synth_open_deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want bazel-orfs to be a wafer thin layer on top of ORFS, so refer as much as possible to ORFS and don't create an additional user-facing set of commands in bazel-orfs, unless necessary.
Introduce a single _deps target. This target can be used for gui, open or make issue
. It should include dependencies for all the cases. When creating an issue, it might be useful to have .lib & .lef files in there.
remove _gui/_open targets and have only _make targets.
@eszpotanski @lpawelcz What is the motivation behind using We want bazel-orfs to be a wafer thin layer on top of ORFS and hand the job of to ORFS when we can; introduce as few new concepts as possible. The generated
|
The main reason for using
By removing As for single
What do you think? |
@lpawelcz @eszpotanski I want to create a flow that is less Bazel oriented and more ORFS oriented. I want to remove bazel run from the non-bazel use of ORFS. Non-bazel ORFS use is both through docker and locally installed ORFS. We can achieve what we need with only three targets for each stage. Note that the semantics is a bit different than today:
|
@oharboe, CC @eszpotanski
Right, so the baseline is to have scripts that can be executed straight from
Got it, so rename
Not sure if I understand that correctly. New
So this one should basically only depend on Please confirm if that is correct so we can move on with the implementation. |
Comments inline:
Yes.
and third script for running the
Only the immediately preceeding stage.
Yes, but not that not all stages require macros. Search for ADDITIONAL_LIB/LEFS/GDS_FILES to see what files are required for a stage.
Yes. However, if you create a "place" script, then only the immediately preceeding stage, "floorplan" outputs are needed.
Yes.
With the corrections above, please proceed. This is a bit tricky and we can't expect to get all details right on the first try, but I think we have the general direction clearly sorted out and that we can fix all the details when we have a PR to test. |
OK, thanks for clarifying that out. We will now focus on the implementation according to the description above. |
Signed-off-by: Eryk Szpotanski <[email protected]>
@lpawelcz @eszpotanski Are you waiting for me on anything for this PR? |
b0e1f88
to
30cf6ba
Compare
Signed-off-by: Eryk Szpotanski <[email protected]>
…ly for bazel build Signed-off-by: Eryk Szpotanski <[email protected]>
Signed-off-by: Eryk Szpotanski <[email protected]>
30cf6ba
to
193b1e4
Compare
No, we were not waiting for you. Just this PR required some adjustments. Now, as you described, there is one type of targets ( Moreover, tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Will merge when it passes tests as a baseline for further improvements and testing.
This PR adds
*_gui
targets for Docker flow, which has to be called withrun
, e.g.:GUI for local flow works fine, apart from synthesis stage, which requires additional LEF files - new target
*_gui_synth_make
resolves this issue.