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

LVS unexpectedly failing #254

Open
stafverhaegen-chipflow opened this issue Nov 7, 2024 · 23 comments
Open

LVS unexpectedly failing #254

stafverhaegen-chipflow opened this issue Nov 7, 2024 · 23 comments

Comments

@stafverhaegen-chipflow
Copy link
Contributor

stafverhaegen-chipflow commented Nov 7, 2024

Environment

python 3.10, Linux Mint 21, klayout 0.29.5, LVS deck from latest dev branch

Expected Behavior

LVS passing

Actual Behavior

LVS failing

Steps to Reproduce the Problem

  1. Unpack lvs_case.tar.gz
  2. cd lvs_case
  3. ./run.sh

One can see that IHP deck reports failing LVS, the PDKMaster generated one reports matching netlists. I also tried with running the IHP deck in flat mode but that did not change anything.

@stafverhaegen-chipflow
Copy link
Contributor Author

stafverhaegen-chipflow commented Nov 7, 2024

Sorry, pressed wrong button (resulted in first empty problem description).

@stafverhaegen-chipflow
Copy link
Contributor Author

Updated the problem description with test case.

@KrzysztofHerman
Copy link
Contributor

@stafverhaegen-chipflow @atorkmabrains @FaragElsayed2
I have just reproduced the testcase and indeed it fails in the command line but it seems to pass in the GUI
using the default settings:
image

The output contains some warnings:
image

The log view:
image

I have used klayout 0.29.0 and python 3.10.12

@sergeiandreyev
Copy link
Contributor

shouldn't the batch-mode deck and GUI-mode deck behave the same? do they share the same implementation?

@sergeiandreyev
Copy link
Contributor

@KrzysztofHerman, could you please share here the error message from the batch mode LVS run?

@KrzysztofHerman
Copy link
Contributor

Here is the output from the command line run:

2024-11-07 13:37:44 +0100: Memory Usage (755784K) : ERROR : Netlists don't match
2024-11-07 13:37:44 +0100: Memory Usage (755784K) : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2024-11-07 13:37:44 +0100: Memory Usage (755784K) : LVS Total Run time 2.634887 seconds
07-Nov-2024 13:37:44 | INFO    | Total execution time 4.176420450210571s

***** C4M deck *****
LVS OK

GUI based run

2024-11-07 13:38:54 +0100: Memory Usage (1472000K) : ==========================================
2024-11-07 13:38:54 +0100: Memory Usage (1472000K) : INFO : Congratulations! Netlists match.
2024-11-07 13:38:54 +0100: Memory Usage (1472000K) : ==========================================
2024-11-07 13:38:54 +0100: Memory Usage (1472000K) : LVS Total Run time 3.395420 seconds

@sergeiandreyev
Copy link
Contributor

:) what is the exact issue in the batch-mode?

@stafverhaegen-chipflow
Copy link
Contributor Author

I tried again with main branch and now for me it does seem to match when running from command line in flat mode; e.g. add --run_mode=flat. Does it work from GUI in hierarchical mode ?

@KrzysztofHerman
Copy link
Contributor

If you use deep mode (I understand is the same as hierarchical) it fails in GUI:

image

@stafverhaegen-chipflow
Copy link
Contributor Author

When I run the C4M deck also in deep mode it also fails. It thus seems that klayout has problems with this layout in deep mode. I don't see immediately something wrong with it.
I changed C4M deck to deep mode by chaging line flat to deep in file c4m_klayout/share/C4M.IHPSG13G2.lvs of test case.

@sergeiandreyev
Copy link
Contributor

sergeiandreyev commented Nov 13, 2024

Hi @stafverhaegen-chipflow, you have connectivity issues..
so if we say the layout is the reference, you should change the netlist from:

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd1 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd2 vss SP6TCCell
.ends SP6TCArray_2X1

to

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd2 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd1 vss SP6TCCell
.ends SP6TCArray_2X1

KLayout LVS should be clean after this update (I would be very surprised if it will not be the case)
p.s. I checked on commercial tools

@sergeiandreyev
Copy link
Contributor

IMHO, from the KLayout LVS reports posted here it's nearly impossible to understand the issue root cause..

@stafverhaegen-chipflow
Copy link
Contributor Author

I was already checking with the change you proposed locally. It does not change anything. I made a new test case: 20241114_lvs_case.tar.gz
Here the spice netlist was updated as you proposed, I updated the run.sh script so it runs both the IHP-Open-PDK LVS in flat and deep mode and also my generated deck. Both are OK in flat mode, both fail in deep mode. The output of the run is in the included run.log file. I'm not sure how I can make the test case more clear.

@sergeiandreyev
Copy link
Contributor

ok, I asked KLayout LVS deck developers to take a look on this

@atorkmabrains
Copy link
Contributor

@stafverhaegen-chipflow Just to confirm my understanding of the issue that you have, there is a test case that pass LVS if you run from GUI and fails if you run from command line.

  • Case 1: Run GUI ----> Pass
  • Case 2: Run cmd ---> Fail
  • Case 3: Run cmd Flat ----> Pass
  • Case 4: Run cmd Deep ---> Fail
  • Case 5: Run GUI Deep ---> Fail

Could you please elaborate on what I mentioned above? If there are more cases, could you please list them the same way I mentioned above. That would really help us review quickly the root cause.

@atorkmabrains
Copy link
Contributor

@stafverhaegen-chipflow

Fundamentally, it will fail if deep run and pass if it's flat regardless of the way of invocation. Is that correct?

@atorkmabrains
Copy link
Contributor

@stafverhaegen-chipflow

One last question, Did you run this test case on other tool (Commercial) and it passed?

@sergeiandreyev
Copy link
Contributor

Hi @stafverhaegen-chipflow, you have connectivity issues.. so if we say the layout is the reference, you should change the netlist from:

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd1 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd2 vss SP6TCCell
.ends SP6TCArray_2X1

to

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd2 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd1 vss SP6TCCell
.ends SP6TCArray_2X1

KLayout LVS should be clean after this update (I would be very surprised if it will not be the case) p.s. I checked on commercial tools

@atorkmabrains, I ran it with commercial tools - there is indeed an LVS issue and I showed how to make it clean

@stafverhaegen-chipflow
Copy link
Contributor Author

@stafverhaegen-chipflow

Fundamentally, it will fail if deep run and pass if it's flat regardless of the way of invocation. Is that correct?

Indeed

@atorkmabrains
Copy link
Contributor

Hi @stafverhaegen-chipflow, you have connectivity issues.. so if we say the layout is the reference, you should change the netlist from:

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd1 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd2 vss SP6TCCell
.ends SP6TCArray_2X1

to

.subckt SP6TCArray_2X1 vss vdd1 vdd2 wl[0] wl[1] bl[0] bl_n[0]
Xinst0x0 wl[0] bl[0] bl_n[0] vdd2 vss SP6TCCell
Xinst1x0 wl[1] bl[0] bl_n[0] vdd1 vss SP6TCCell
.ends SP6TCArray_2X1

KLayout LVS should be clean after this update (I would be very surprised if it will not be the case) p.s. I checked on commercial tools

@atorkmabrains, I ran it with commercial tools - there is indeed an LVS issue and I showed how to make it clean

@sergeiandreyev I presume you ran it hierarchical in the commercial tool, correct? Did you use "Automatch" option in the commercial tool as well to see which exact cell needs changing?

I understand that you have provided a change required for the netlist, @stafverhaegen-chipflow Did you test that change and ran LVS in deep mode?

@sergeiandreyev
Copy link
Contributor

@atorkmabrains, yes, it was w/ default 'Hierarchical' setting
I have 'Match cell by name' switched-on, or should be another option to check on?

@atorkmabrains
Copy link
Contributor

@sergeiandreyev That's automatch switch.

@stafverhaegen-chipflow
Copy link
Contributor Author

I understand that you have provided a change required for the netlist, @stafverhaegen-chipflow Did you test that change and ran LVS in deep mode?

The latest uploaded test case has the change applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants