Skip to content
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

RUN_KLAYOUT generates invalid command line #1593

Closed
xobs opened this issue Dec 26, 2022 · 7 comments
Closed

RUN_KLAYOUT generates invalid command line #1593

xobs opened this issue Dec 26, 2022 · 7 comments
Labels
bug Something isn't working Magic/Open PDKs An issue with Magic or the PDK build tool "Open PDKs"

Comments

@xobs
Copy link
Contributor

xobs commented Dec 26, 2022

Description

When magic crashes (e.g. #1587), it can be useful to try using klayout by setting RUN_MAGIC=0 and RUN_KLAYOUT=1 in the config file. However, OpenLane appears to generate invalid command line arguments to klayout, and fails to run.

Expected Behavior

klayout should run normally

Environment report

Kernel: Linux v5.15.79.1-microsoft-standard-WSL2
Distribution: ubuntu 22.04
Python: v3.10.6 (OK)
Container Engine: docker v20.10.21 (OK)
OpenLane Git Version: cb59d1f84deb5cedbb5b0a3e3f3b4129a967c988
pip: INSTALLED
python-venv: INSTALLED
---
PDK Version Verification Status: OK
---
Git Log (Last 3 Commits)

cb59d1f 2022-11-18T18:42:38+02:00 fix return values in `equally_spaced_sequence` (#1503) - Kareem Farid -  (grafted, HEAD, tag: 2022.11.19)
---
Git Remotes

origin  git@github.com:The-OpenROAD-Project/OpenLane (fetch)
origin  git@github.com:The-OpenROAD-Project/OpenLane (push)

Reproduction material

There is no reproduction material (see Relevant log output) -- there is no "Reproducible packaged" message.

Relevant log output

[STEP 23]
[INFO]: Streaming out GDSII with KLayout (log: ../si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/logs/signoff/23-gdsii-klayout.log)...
[ERROR]: during executing: "klayout -b -rm /openlane/scripts/klayout/def2gds.py -rd out_gds=/si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/results/signoff/wb_pio.klayout.gds -rd tech_file=/si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.tech/klayout/gf180mcuC.lyt -rd design_name=wb_pio -rd in_def=/si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/results/routing/wb_pio.def -rd {in_gds=/si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.ref/gf180mcu_fd_sc_mcu7t5v0/gds/gf180mcu_fd_sc_mcu7t5v0.gds } -rd config_file= -rd seal_gds= -rd lef_file=/si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/tmp/merged.nom.lef |& tee /dev/null /si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/logs/signoff/23-gdsii-klayout.log"
[ERROR]: Exit code: 1
[ERROR]: Last 10 lines:

Input: /si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/results/routing/wb_pio.def
Output: /si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/results/signoff/wb_pio.klayout.gds
Design: wb_pio
Technology File: /si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.tech/klayout/gf180mcuC.lyt
GDS File List: ['/si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.ref/gf180mcu_fd_sc_mcu7t5v0/gds/gf180mcu_fd_sc_mcu7t5v0.gds']
LEF File: /si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/tmp/merged.nom.lef

Unable to open file: /si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.tech/klayout/gf180mcuC.lyt (errno=2) in Technology.load
child process exited abnormally

[INFO]: Saving current set of views in '../si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/results/final'...
[INFO]: Generating final set of reports...
[INFO]: Created manufacturability report at '../si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/reports/manufacturability.rpt'.
[INFO]: Created metrics report at '../si/work/caravel-gf180-pio/openlane/wb_pio/runs/gf180mcuC-2022-12-26_16_08/reports/metrics.csv'.
[INFO]: Saving runtime environment...
[ERROR]: Flow failed.
make[1]: *** [Makefile:73: wb_pio] Error 255
make[1]: Leaving directory '/si/work/caravel-gf180-pio/openlane'
make: *** [Makefile:107: wb_pio] Error 2

real    39m51.943s
user    0m0.115s
sys     0m0.348s
$
@xobs
Copy link
Contributor Author

xobs commented Dec 26, 2022

The following changes need to be made, after which klayout runs successfully:

  1. The script passes in_gds as -rd {in_gds=/si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.ref/gf180mcu_fd_sc_mcu7t5v0/gds/gf180mcu_fd_sc_mcu7t5v0.gds }, but the curly braces seem like they should be omitted
  2. The technology file /si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.tech/klayout/gf180mcuC.lyt does not exist -- the path should be /si/work/caravel-gf180-pio/deps/pdks/gf180mcuC/libs.tech/klayout/tech/gf180mcu.lyt (i.e. add a /tech/ directory and remove the C)

@donn
Copy link
Collaborator

donn commented Jan 10, 2023

I think 1 is fixed. 2 is an open_pdks issue which will need its own PR there.

@donn donn added Magic/Open PDKs An issue with Magic or the PDK build tool "Open PDKs" bug Something isn't working labels Jan 10, 2023
@xobs
Copy link
Contributor Author

xobs commented Jan 10, 2023

Is there a standard that should be followed that gf180mcu is not adhering to? Or is it more along the lines of sky130 is the de-facto standard and I should reference that in the issue?

@donn
Copy link
Collaborator

donn commented Jan 10, 2023

It doesn't actually matter: OpenLane looks for the lyt and lyp wherever the libs.tech/openlane/config.tcl variables tell it to. That just means that variable is set incorrectly for gf180.

@proppy
Copy link
Collaborator

proppy commented Jan 10, 2023

I think we also need to make sure that the internal reference from the lyt to the lyp file also conform to the final open_pdks layout, see:
https://github.com/google/globalfoundries-pdk-libs-gf180mcu_fd_pr/blob/74e4ec59b55bcf5be2f153abff8519d15ebe21fa/tech/klayout/gf180mcu.lyt#L23-L24

@donn
Copy link
Collaborator

donn commented Jan 16, 2023

Resolved via #1609

@donn donn closed this as completed Jan 16, 2023
@proppy
Copy link
Collaborator

proppy commented Feb 15, 2023

Related RTimothyEdwards/open_pdks#346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Magic/Open PDKs An issue with Magic or the PDK build tool "Open PDKs"
Projects
None yet
Development

No branches or pull requests

3 participants