DRUC(1)
πΈ DRUC(1) β the design rule checker that eats π
okay bestie so you've opened the manual page for druc, short for Design Rule Checker, and honestly? slay. this one's the ALLIANCE user command you've been looking for. let's get into it β¨
β¨ SYNOPSIS β¨
druc input_name [ -v ] [ -h ]
that's it. that's the whole incantation. input_name is your cell, and then you get to sprinkle optional flags on top like little fairy dust π§
π ORIGIN π
okay so this software is not just some random thing off the internet β it belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. very "study abroad semester in Paris but make it EDA" energy π₯π
the links, in case you want to send them a little thank-you note:
- Web:
http://asim.lip6.fr/recherche/alliance/ - E-mail:
alliance-users@asim.lip6.fr
π¦ DESCRIPTION π¦
DRuC is a general parametrized VLSI design rule checker. like, a general one. parametrized and everything. it checks your design rules, which is literally the whole point, and it does it for VLSI layouts π«Ά
real talk though: this tool replaces the VERSATIL tool, which β and I'm gonna be gentle about this β is not anymore supported. so if you were clinging to VERSATIL, bestie, it's giving retired. move on. DRuC is the main character now π
π the layout rules π
this manual presents the layout rules for the ALLIANCE symbolic layout approach π and the important thing is where those rules live: they're described in a technology file, and that technology file is defined by the environment variable RDS_TECHNO_NAME (see below). so yeah β that env var is doing a lot of heavy lifting. set it. love it. respect it.
π where your files have to be π
- the root cell must be in the current directory
- all the instantiated cells must be in the current directory too
- with one exception: the instantiated libraries cells β those get a pass π
so like, current directory is the vibe. don't go wandering πΆββοΈ
π the default mode (read this part) π
the default mode of DRuC is (currently) full flat. and what that means is it first flattens all the hierarchy in order to obtain a flat, rectangle level description.
literally all of it. the whole hierarchy. gone. flattened. into rectangles. no cap π so if you were expecting hierarchy to be respected, it's not β not by default anyway, and definitely not "currently". noted in the manual with a casual "(currently)" like that isn't going to change your whole life π
π OPTIONS π
-vβ verbosity: ON. every single step of the DRC gets output on the standard output, so you can watch the whole thing happen in real time like a little reality show π₯ obsessed.-hβ hierarchical design rule checking. fair warning: this one generates lots of files locally, and those files exist to be used by future invocation ofdruc. so it's not a one-and-done situation, it's a whole ongoing relationship π and as for whether it actually works and how? the manual itself says, and I quote, "Don't ask me if and how this works, but since you also fetched the sources, ..." β so like. the docs have decided not to answer that one. deeply iconic of them. if you want the tea you're gonna have to read the source π«π
ngl the-hflag leaving us on a cliffhanger with a literal trailing...is the most mysterious thing in this entire page and I respect it π
π DESIGN RULES DESCRIPTION π
0: LAYER NAME
Bestie, before we get into the rules, here's the cast of characters β this little bit spells out exactly which layer name means what in everything that follows π
NWELLβ N wellNTIEβ N well polarisationPTIEβ P substrat polarisationNDIFβ N diffusionPDIFβ P diffusionGATEβ transistor gatePOLYβ polysilicon wireALU1β first level of metalALU2β second level of metalCONTβ contact betweenALU1andPOLYorDIFFVIAβ contact betweenALU1andALU2
I: LAYER WIDTH
Okay so this whole category is about how thin a layer is allowed to get πΈ β the width limits of a layer β plus the conditions for equipotentiality between two segments that overlap or abut. Not me being obsessed with the exact numbers, but like, the exact numbers matter.
- rule 1 β the minimum width for a segment of
NWELLis4. corresponding error codes are:100101 - rule 2 β the minimum width for a segment of
NTIEis2. corresponding error code is:119 - rule 3 β the minimum width for a segment of
PTIEis2. corresponding error codes are:122123 - rule 4 β the minimum width for a segment of
NDIFis2. corresponding error codes are:140141 - rule 5 β the minimum width for a segment of
PDIFis2. corresponding error codes are:165166 - rule 6 β the minimum width for a segment of
GATEis1. corresponding error codes are:234235 - rule 7 β the minimum width for a segment of
POLYis1. corresponding error codes are:234235 - rule 8 β the minimum width for a segment of
ALU1is1. corresponding error codes are:238239 - rule 9 β the minimum width for a segment of
ALU2is2. corresponding error codes are:242243 - rule 10 β the width of a
CONTmust be equal to1. corresponding error codes are:246247 - rule 11 β the width of a
VIAmust be equal to1. corresponding error codes are:261262
II: FORBIDDEN OVERLAP
This class of rules is the "do NOT let these two layers touch" list π β it specifies the forbidden overlaps between two layers. And when we say forbidden, we mean the distance between them must be strictly positive, no cap, not even a little kiss.
- rule 12 β contact between
PTIEandNWELLis forbidden. corresponding error codes are:126127128129130131 - rule 13 β contact between
PTIEandNTIEis forbidden. corresponding error codes are:133134135136137138 - rule 14 β contact between
NDIFandNWELLis forbidden. corresponding error codes are:144145146147148149 - rule 15 β contact between
NDIFandNTIEis forbidden. corresponding error codes are:151152153154155156 - rule 16 β contact between
NDIFandPTIEis forbidden. corresponding error codes are:158159160161162163 - rule 17 β contact between
PDIFandNTIEis forbidden. corresponding error codes are:169170171172173174 - rule 18 β contact between
PDIFandPTIEis forbidden. corresponding error codes are:176177178179180181 - rule 19 β contact between
PDIFandNDIFis forbidden. corresponding error codes are:183184185186187188 - rule 20 β contact between
GATEandNTIEis forbidden. corresponding error codes are:191192193194195196 - rule 21 β contact between
GATEandPTIEis forbidden. corresponding error codes are:198199200201202203 - rule 22 β contact between
POLYandNTIEis forbidden. corresponding error codes are:207208209210211212 - rule 23 β contact between
POLYandPTIEis forbidden. corresponding error codes are:214215216217218219 - rule 24 β contact between
POLYandNDIFis forbidden. corresponding error codes are:221222223224225226 - rule 25 β contact between
POLYandPDIFis forbidden. corresponding error codes are:228229230231232233 - rule 26 β contact between
CONTandGATEorPOLYis forbidden. corresponding error codes are:249250251252253 - rule 27 β contact between
VIAandGATEis forbidden. corresponding error codes are:264265266267268269 - rule 28 β contact between
VIAandPOLYis forbidden. corresponding error codes are:271272273274275276 - rule 29 β contact between
VIAandCONTis forbidden. corresponding error codes are:278279280281282283 - rule 30 β contact between
NTIEandNWELLis forbidden. corresponding error code is:109 - rule 31 β contact between
PDIFandNWELLis forbidden. corresponding error code is:117
III: LAYER NOTCH
Notches, bestie β the little inner corners π¦. This class of rules deals with the notch limits of a layer.
- rule 32 β the minimum notch for a segment of
NWELLis4. corresponding error code is:102 - rule 33 β the minimum notch for a segment of
NTIEis2. corresponding error code is:120 - rule 34 β the minimum notch for a segment of
PTIEis2. corresponding error code is:124 - rule 35 β the minimum notch for a segment of
NDIFis2. corresponding error code is:142 - rule 36 β the minimum notch for a segment of
PDIFis2. corresponding error code is:167 - rule 37 β the minimum notch for a segment of
POLYis1. corresponding error code is:236 - rule 38 β the minimum notch for a segment of
ALU1is2.5. corresponding error code is:240 - rule 39 β the minimum notch for a segment of
ALU2is2. corresponding error code is:244
IV: MINIMUM SPACING
Distance makes the heart grow fonder π β this class of rules specifies the minimum edge-to-edge distance allowed between two layers.
heads up: the rule numbers in this list do a little hop-skip β41and50just aren't here in the original, that's genuinely how it's written, not me dropping anything π«Ά
- rule 40 β the minimum distance between
NWELLandNWELLis12. corresponding error code is:118 - rule 42 β the minimum distance between
NTIEandNTIEis3. corresponding error code is:121 - rule 43 β the minimum distance between
PTIEandNWELLis7.5. corresponding error code is:125 - rule 44 β the minimum distance between
PTIEandNTIEis8. corresponding error code is:132 - rule 45 β the minimum distance between
PTIEandPTIEis3. corresponding error code is:139 - rule 46 β the minimum distance between
NDIFandNWELLis7.5. corresponding error code is:143 - rule 47 β the minimum distance between
NDIFandNTIEis8. corresponding error code is:150 - rule 48 β the minimum distance between
NDIFandPTIEis3. corresponding error code is:157 - rule 49 β the minimum distance between
NDIFandNDIFis3. corresponding error code is:164 - rule 51 β the minimum distance between
PDIFandNTIEis3. corresponding error code is:168 - rule 52 β the minimum distance between
PDIFandPTIEis8. corresponding error code is:175 - rule 53 β the minimum distance between
PDIFandNDIFis8. corresponding error code is:182 - rule 54 β the minimum distance between
PDIFandPDIFis3. corresponding error code is:189 - rule 55 β the minimum distance between
GATEandNTIEis1. corresponding error code is:190 - rule 56 β the minimum distance between
GATEandPTIEis1. corresponding error code is:197 - rule 57 β the minimum distance between
GATEandNDIFis1. corresponding error code is:204 - rule 58 β the minimum distance between
GATEandPDIFis1. corresponding error code is:205 - rule 59 β the minimum distance between
GATEandGATEis2. corresponding error code is:237 - rule 60 β the minimum distance between
POLYandNTIEis1. corresponding error code is:206 - rule 61 β the minimum distance between
POLYandPTIEis1. corresponding error code is:213 - rule 62 β the minimum distance between
POLYandNDIFis1. corresponding error code is:220 - rule 63 β the minimum distance between
POLYandPDIFis1. corresponding error code is:227 - rule 64 β the minimum distance between
POLYandGATEis2. corresponding error code is:237 - rule 65 β the minimum distance between
POLYandPOLYis2. corresponding error code is:237 - rule 66 β the minimum distance between
ALU1andALU1is2.5. corresponding error code is:241 - rule 67 β the minimum distance between
ALU2andALU2is2. corresponding error code is:245 - rule 68 β the minimum distance between
CONTandCONTis3. corresponding error code is:254 - rule 69 β the minimum distance between
VIAandGATEis2. corresponding error code is:263 - rule 70 β the minimum distance between
VIAandPOLYis2. corresponding error code is:270 - rule 71 β the minimum distance between
VIAandCONTis2. corresponding error code is:277 - rule 72 β the minimum distance between
VIAandVIAis3. corresponding error code is:284 - rule 73 β the minimum distance between
CONTandGATEorPOLYis1.5. corresponding error code is:248
V: TOTAL INCLUSION
Last class, bestie β this one is all about one layer being fully included inside another one, like a lil nesting moment π§
- rule 74 β
NTIEmust be included inNWELLwith a minimun margin of0.5. corresponding error code is:103 - rule 75 β
PDIFmust be included inNWELLwith a minimun margin of0.5. corresponding error code is:110
π FILES π
If design errors are found, DRuC produces the list of them in two files, and honestly that's iconic of it:
<root_name.drc>: This ascii file contains the list of DRC violations.<root_name.iii>: This gds ro cif file contains only rectangles detected in violation. ( suffixiiiis defined with the environment )
RDS_OUT_PH is default setted to gds.
β¨ ENVIRONMENT VARIABLES β¨
DRuC uses several environment variables, so keep these besties in mind:
MBK_IN_PHβ defines the layout input format.RDS_OUT_PHβ defines the layout output format.RDS_TECHNO_NAMEβ defines the technology file.MBK_CATA_LIBβ defines the catalog directory.
See the corresponding manual pages for further information π
π EXAMPLE π
druc register
π BUG REPORT π
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools π«Ά
and that's the whole page, bestie β no crumbs left π
the footer energy is all ASIM/LIP6, and the page is dated October 1, 1997, living as DRUC(1). go off, run that DRC, and remember: strictly positive distances only πβ¨
π¦ where this page comes from
- nixos 26.05: alliance 5.1.1-unstable-2025-02-24
- nixpkgs unstable: alliance 5.1.1-unstable-2025-02-24
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms