The-OpenROAD-Project / bazel-orfs

BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

YOSYS_CMD isn't set in dependency generated "make" file #99

Closed jeffng-or closed 2 months ago

jeffng-or commented 2 months ago

The YOSYS_CMD setting in the "make" file should probably be updated to match the ORFS Makefile value of $FLOW_HOME/$FLOW_HOME/../tools/install/yosys/bin/yosys. Otherwise, the user gets:

bash: line 1: V: command not found When trying to execute:

bazel run myDesign_floorplan_deps -- <absolute_path>
<absolute_path>/make floorplan_issue 

The error occurs when ORFS tries to generate version.txt and YOSYS_CMD is empty, which results in the command not found error.

oharboe commented 2 months ago

See https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2249

Also, to create an issue using a local ORFS, you can do:

bazel run BoomTile_floorplan_deps `pwd`/build
build/make do-floorplan

this quickly shows:

Running floorplan.tcl, stage 2_1_floorplan
[INFO ORD-0030] Using 20 thread(s).
[INFO ODB-0227] LEF file: external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7_tech_1x_201209.lef, created 24 layers, 9 vias
[INFO ODB-0227] LEF file: external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7sc7p5t_28_R_1x_220121a.lef, created 212 library cells
[WARNING ODB-0177] error: undefined via (VIA45_1_2_58_58) referenced
[WARNING ODB-0177] error: undefined via (VIA45_1_2_58_58) referenced
[INFO ODB-0227] LEF file: results/asap7/ebtb_128x40/base/ebtb_128x40.lef, created 2 vias, 1 library cells

Leave it running to see if it gets further, but already you can open a new shell an create the first issue:

$ build/make floorplan_issue
mkdir -p .//objects/asap7/BoomTile/base
bash: line 1: V: command not found
make: [external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/Makefile:395: versions.txt] Error 127 (ignored)
external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/util/makeIssue.sh floorplan
bash: line 1: external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/util/makeIssue.sh: No such file or directory
make: *** [external/bazel-orfs~~orfs_repositories~docker_orfs/OpenROAD-flow-scripts/flow/util/utils.mk:98: floorplan_issue] Error 127
$ . ~/OpenROAD-flow-scripts/env.sh 
OPENROAD: /home/oyvind/OpenROAD-flow-scripts/tools/OpenROAD
$ build/make floorplan_issue
[deleted output]

I like to strip down the generated archive more if I can:

mkdir foo
cd foo
tar --strip-components=1 -xzvf ../build/floorplan_BoomTile_asap7_base_2024-08-15_06-40.tar.gz
# Put *only* openroad in the path, the rest should come from the archive when testing, *not* your ORFS install, so *don't* run ". env.sh"
export PATH=$PATH:/home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin
$ ./run-me-BoomTile-asap7-base.sh 
OpenROAD v2.0-15055-gdb7d56e4d 
Features included (+) or not (-): +Charts +GPU +GUI +Python
This program is licensed under the BSD-3 license. See the LICENSE file for details.
Components of this program may be licensed under more restrictive licenses which must be honored.
[INFO ODB-0227] LEF file: /home/oyvind/megaboom/foo/platforms/asap7/lef/asap7_tech_1x_201209.lef, created 24 layers, 9 vias
[INFO ODB-0227] LEF file: /home/oyvind/megaboom/foo/platforms/asap7/lef/asap7sc7p5t_28_R_1x_220121a.lef, created 212 library cells
[WARNING ODB-0177] error: undefined via (VIA45_1_2_58_58) referenced
[WARNING ODB-0177] error: undefined via (VIA45_1_2_58_58) referenced
[rest deleted]

Now trim down what is in this folder to bring down the size of the test case and check that the test still fails.

I can reproduce with 40mByte instead of 800mByte...

Still too big for github, so I upload to google drive and create a shareable link:

https://drive.google.com/file/d/1893fWw-vCFPkQY1swQF68vDPSkCdcIay/view?usp=sharing

oharboe commented 2 months ago

Fixed, waiting for new OpenROAD upgrade in ORFS though.