The-OpenROAD-Project / OpenLane

OpenLane is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen and custom methodology scripts for design exploration and optimization.
https://openlane.readthedocs.io/
Apache License 2.0
1.31k stars 368 forks source link

unable to view the floorplan def files in klayout of oprn lane #2095

Closed Ashutosh-3107 closed 2 weeks ago

Ashutosh-3107 commented 7 months ago

Description

ERROR: Unable to open file: /home/ashutosh_anand/OpenLane/designs/Pipeline_top/runs/run1/results/floorplan/Pipeline_top.def/merged.lef (errno=20)

Expected Behavior

to be able to view the intermediate lef / def files

Environment report

open_pdks cd1748bb197f9b7af62a54507de6624e30363943
Kernel: Linux v5.15.133.1-microsoft-standard-WSL2
Distribution: ubuntu 22.04
Python: v3.10.12 (OK)
Container Engine: docker v24.0.5 (OK)
OpenLane Git Version: 9dbd8b5ea2bd891bed4dcc97df5c7439083f0368
python-venv: INSTALLED
---
PDK Version Verification Status: OK
---
Git Log (Last 3 Commits)

9dbd8b5 2024-01-11T15:26:56+02:00 Fix `-synth_explore` crash (#2085) - Kareem Farid -  (grafted, HEAD -> master, tag: 2024.01.12, origin/master, origin/HEAD)
---
Git Remotes

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

Reproduction material

Pipeline_top.zip

Relevant log output

ERROR: Unable to open file: /home/ashutosh_anand/OpenLane/designs/Pipeline_top/runs/run1/results/floorplan/Pipeline_top.def/merged.lef (errno=20)
d-m-bailey commented 7 months ago

@Ashutosh-3107 You can not directly open a DEF file by itself. https://www.klayout.de/doc/about/lef_def_import.html Try using the File -> Import -> DEF/LEF dialog.

d-m-bailey commented 7 months ago

Looks like you can also specify the LEF file in Tools -> Manage Technologies -> Reader Options -> LEF/DEF.

Ashutosh-3107 commented 7 months ago

Looks like you can also specify the LEF file in Tools -> Manage Technologies -> Reader Options -> LEF/DEF.

tried both the methods still the same error pops

d-m-bailey commented 7 months ago

@Ashutosh-3107 What LEF file are you using?

Ashutosh-3107 commented 7 months ago

@Ashutosh-3107 What LEF file are you using?

I have uploaded in the Reproduction material

d-m-bailey commented 7 months ago

Pipeline_top.zip only contains the DEF data. What LEF file are you using?

Ashutosh-3107 commented 7 months ago

I am unsure which lef file to use

only contains the DEF data. What LEF file are you using?

d-m-bailey commented 7 months ago

I don't know for sure, but you could start with libs.ref/sky130_fd_sc_hd/lef/sky130_fd_sc_hd.lef from the pdk.

Ashutosh-3107 commented 7 months ago

But i am importing the sky130 A technology in klayout in the reader option , it is not displaying the layout

d-m-bailey commented 7 months ago

Can you send a screen shot of your reader options?

The DEF file contains routing information and cell references. The data for the actual cells is in the LEF file. There are different types of LEF files. A technology LEF file will only contain wire sizes, spacing, etc. - it probably doesn't have the LEF data for cells that you'll need to view in klayout.

maliberty commented 7 months ago

Fwiw ORFS defines a target to open the layout in klayout with all the necessary options; OL might want to do the same.

Ashutosh-3107 commented 7 months ago

Screenshot 2024-02-27 221946 Screenshot 2024-02-27 222011 Screenshot 2024-02-27 222024

d-m-bailey commented 7 months ago

I doubt you need all 3 files, but I don't know if it causes a problem.

Can you grep sky130_fd_sc_hd__dfrtp_2 <lef_file>?

Ashutosh-3107 commented 7 months ago

I doubt you need all 3 files, but I don't know if it causes a problem.

Can you grep sky130_fd_sc_hd__dfrtp_2 <lef_file>?

Screenshot 2024-02-27 225400 Screenshot 2024-02-27 225415 Screenshot 2024-02-27 230359 I have included all the related files still it is popping the same error

d-m-bailey commented 7 months ago

@Ashutosh-3107 I'm using a different pdk version, but I'm able to open the def file with only specifying the one lef file from the pdk. Can you try with just the sky130_fd_sc_hd.lef file from the pdk?

I wonder if the klayout version makes a difference. I'm using 0.28.15.

Are you using docker for either klayout or file references?

Ashutosh-3107 commented 7 months ago

@Ashutosh-3107 I'm using a different pdk version, but I'm able to open the def file with only specifying the one lef file from the pdk. Can you try with just the sky130_fd_sc_hd.lef file from the pdk?

I wonder if the klayout version makes a difference. I'm using 0.28.15.

Are you using docker for either klayout or file references?

I am using the docker, may be there is bug in the klayout app, do you have any idea how to fix this klayout. I am currently using 0.28.2

d-m-bailey commented 7 months ago

You might try installing klayout locally and see if you can open the def file there. I don’t know how to update the docker version.

vijayank88 commented 7 months ago

@Ashutosh-3107

I tried for spm design with floorplan spm.def with KLayout loading properly. Load_def_with_KLayout

You can try adding in LEF files space only with merged.nom.lef and remove other lef files and try to load it.

Ashutosh-3107 commented 7 months ago

@Ashutosh-3107

I tried for spm design with floorplan spm.def with KLayout loading properly. Load_def_with_KLayout

You can try adding in LEF files space only with merged.nom.lef and remove other lef files and try to load it.

Screenshot 2024-02-28 174037 Screenshot 2024-02-28 174050

I guess there is a bug in the klayout of the openlane. If there is any method to remove the bug or update klayout please recommend.

kareefardi commented 7 months ago

@Ashutosh-3107 you may want to try and use gui.py. See https://openlane.readthedocs.io/en/latest/reference/gui.html for more information. Otherwise, I believe there is a bug in KLayout where LEF files needs to be in the same folder as the DEF file in order for it to import properly. This is an old bug that I know about and I am not aware if this has been fixed yet.

stefanottili commented 7 months ago

I'm using klayout with lef+def without any issues, but what's the point ? Openroad is much better at viewing/debugging lef/def files then klayout. You have netlist and timing information and placement/routing/power maps. And if you want to convert lef+def to gds/oasis, use the klayout buddy tool strm2gds/oas.

openroad -gui load_design.or

with load_design.or containing

read_lef tech.lef
read_lef macro.lef
read_def design.lef
donn commented 2 weeks ago

Staled out.