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

Need clarification on rule LU.c/LU.c1 #343

Open
RTimothyEdwards opened this issue Jan 28, 2025 · 10 comments
Open

Need clarification on rule LU.c/LU.c1 #343

RTimothyEdwards opened this issue Jan 28, 2025 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@RTimothyEdwards
Copy link

I need some clarification of rule LU.c (and similarly LU.c1). According to the drawing and rule description in the IHP open PDK documentation, no part of tap diffusion creating a butted contact can be more than 6um away from the nearest diffusion contact. The drawing shows this measurement being made across the abutment boundary. I have implemented the rule in magic as it is stated. However, by doing so, the standard cell sg13gs_sdfbbp_1 causes a DRC error to be flagged on the substrate contact stripe under the ground rail. The cause is that there is a butted contact to ground in the middle of the cell. Therefore any part of the substrate contact stripe that is more than 6um from the associated diffusion contact gets marked as an error (see attached screenshot). It is obvious to me that the standard cell layout is fine; therefore, I think the rule description and illustration need to be more nuanced, but I'm not sure what the exact intent of the rule is supposed to be. I can think of two ways to make the rule work and not flag an error in situations like the standard cell flip-flop: (1) The maximum distance from any part of a tap to the nearest diffusion contact in the direction perpendicular to the butting edge must be < 6um, or (2) The maximum distance from any uncontacted part of a tap to the nearest diffusion contact must be < 6um. Which interpretation (if either) matches the actual implementation of the rule?

Image

Note: Looking at the klayout rules, the rule implementation contains

sizedA = Abut_NWell_Tie_Cont.ext_enlarge_inside(Act_connect.ext_interacting(Gate), 6.0.um, 0.21.um).ext_interacting(Cont_not_outside_NAct, inverted: true)

The "0.21um" measurement in the rule may be significant, as it does not appear anywhere in the rule description. I am not familiar enough with the klayout DRC rule expressions to know how to interpret ext_enlarge_inside(), especially with two numerical paramters.

@RTimothyEdwards
Copy link
Author

@KrzysztofHerman : Thanks for agreeing to have someone look into this and get back to me.

@RTimothyEdwards
Copy link
Author

I would like to add a side note, that the illustration for LU.c contains a DRC error as drawn; as shown in the attached screenshot, the upper right corner of the pSD shape forming the butted junction violates rule pSD.c1. This is something of a nit-pick, as the error is irrelevant to the latch-up rule being illustrated, but generally it is good form not to suggest that such a layout might be legal.

Image

@akrinke
Copy link
Contributor

akrinke commented Jan 29, 2025

We have implemented the rule by repeatedly enlarging the contact shape by 0.21 µm while staying inside of Active. The 0.21 µm come from the rule Act.b (Minimum Activ space or notch = 0.21). This step size ensures that we do not jump into another Activ polygon.

@sergeiandreyev
Copy link
Contributor

Hi @stefansimon42, could you please also take a look on this issue?

@sergeiandreyev sergeiandreyev added documentation Improvements or additions to documentation question Further information is requested labels Jan 29, 2025
@RTimothyEdwards
Copy link
Author

@akrinke : That makes sense; it's how I implement the latch-up rule in sky130 in the magic DRC deck.

@mole99
Copy link
Contributor

mole99 commented Jan 29, 2025

@akrinke Just out of interest, is there a reason why the builtin sized wasn't used directly?

With size_inside you can keep one shape inside another while enlarging it: ntap.sized(30.um, size_inside(nwell), steps(100))

@akrinke
Copy link
Contributor

akrinke commented Jan 30, 2025

@mole99 If I remember correctly, this command was not available when we implemented this rule. However, we will change the DRC script to use it.

@RTimothyEdwards
Copy link
Author

@akrinke , @sergeiandreyev , @KrzysztofHerman : After analyzing some layouts with Leo, I have come to the conclusion that in my original post, my interpretation (2) is the correct one and matches the DRC rule implementation in klayout:

 "The maximum distance from any _uncontacted_ part of a tap to the nearest diffusion contact must be < 6um"

The word "uncontacted" needs to be in the defintion of rules LU.c and LU.c1 because otherwise, the rule definition is wrong, or at least incomplete.

So I conclude that this is a documentation error. While I'm on the topic of documentation errors, I would like to point out another associated error, which is that in the illustration for the latch-up rules (half of which I posted above), the dimension that is labeled "LU.c" actually refers to rule "LU.c1", and the dimension that is labeled "LU.c1" actually refers to rule "LU.c". That is, the left-hand side drawing shows a substrate tap and is labeled "LU.c", while the rule "LU.c" refers to well taps; the right-hand side drawing shows a well tap and is labeled "LU.c1", while the rule "LU.c1" refers to substrate taps.

@RTimothyEdwards
Copy link
Author

@akrinke : It is worth noting that using sized() produces a slightly different result than ext_enlarge_inside(). I assume this difference is a difference in how to measure the distance when the expansion changes direction. The difference in the specific case of measuring the distance from the butted tap on cell sdfbbp_1 into the substrate tap along the ground rail is 0.12um.

@RTimothyEdwards
Copy link
Author

@akrinke , @sergeiandreyev , @KrzysztofHerman :

I have found additional errors and inconsistencies. One additional error is in the documentation. Rule LU.d1 is clearly the complement of rule LU.d, and LU.d is illustrated in Figure 7.4 as an nwell tie. Therefore the shape illustrated with the dimension d1 is intended to be a substrate tie, and so it should be surrounded by pSD (but isn't).

Image

Attached is a set of example layouts of butted taps. If I number them 1 to 7 from left to right, my reading of the latchup rules says that all of the layouts should be in error except for numbers 4 and 7 (I'm inclined to say that number 7 should also be in error, because in effect all of the tap diffusion is an infinite distance away from a tap contact, since there isn't any tap contact; however, the latchup rule does not specifically state that a tap diffusion must have a contact, and in fact the illustration for LU.c and LU.c1 are both drawn without a tap contact). However, running the klayout DRC deck on that layout, klayout only flags number 5 as an error. Number 6 is a clear violation of rule LU.d1 but does not get flagged by klayout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants