fet: allow narrow devices via dogbone diffusion - #100
Conversation
nmos/pmos raise ValueError below W=0.5um in gf180, and forcing the width
through produces 12 CO.4 violations (COMP overlap of contact). The limit is in
the generator, not the technology: the PDK's own pcell declares wmin=0.22 and
lays out a 0.22um device DRC-clean, with the COMP at two heights.
Root cause: the diffusion rectangle is sized with the channel width
diff_dims = (diff_extra_enc + evaluate_bbox(multiplier)[0], width)
so a narrow channel drags the contact diffusion down with it and CO.4 fails.
Electrical width is set by the poly over the channel, not by the diffusion at
the contacts -- they can differ. That is the standard dogbone layout.
Three coordinated changes, since poly_height, the via arrays and the implants
all derive from the same value:
- __comp_min_width(pdk): mcon.width + 2*mcon-active_diff.min_enclosure,
read from the PDK rules rather than hardcoded. Falls back to 0.0, which
preserves previous behaviour if the rules are missing.
- S/D via array and diffusion sized by max(width, comp_min)
- poly_height follows the COMP, otherwise narrow devices trip PL.4_LV
Verified on two technologies, no code changes between them -- the helper picks
up each PDK's own rules:
gf180 comp_min 0.36 (mcon 0.22 + 2x0.07), KLayout deck FEOL+BEOL
W=0.22 ValueError -> 0 violations
W=0.28 ValueError -> 0 violations
W=0.36 ValueError -> 0 violations
W=0.50 0 violations, geometry unchanged
W=1.00 / 1.25 L=50 / 2.00 nf=2 geometry unchanged
sky130 comp_min 0.30 (mcon 0.17 + 2x0.06), Magic DRC
W=0.15 0 errors <- PDK absolute minimum
W=0.29 0 errors
W=0.42 0 errors
W=1.00 0 errors
No regression: at or above the previous minimum the output is identical
polygon by polygon (compared geometry, not file hashes -- cell names change
because no_exception joins the via_array signature).
Note for users: a dogbone device is not electrically equivalent to a
rectangular one of the same W. Source/drain resistance is no longer inversely
proportional to channel width because part of the current flows through the
widened diffusion (Solid-State Electronics 44(1), dogbone geometry in
narrow-width MOSFETs). Re-characterize before relying on models fitted to
rectangular geometry.
The DRC matrix only exercises composite cells at comfortable widths, so
nothing catches a regression in the narrow-device path. Adds nmos/pmos at each
PDK's minimum diffusion width:
gf180 W=0.22 L=0.28 (active_diff min_width)
sky130 W=0.15 L=0.15
Both fail on main with CO.4 (COMP overlap of contact) and pass with the
dogbone fix. Verified locally with tests/drc/run_cell_drc.py:
gf180 2 passed, 0 failed
sky130 2 passed, 0 failed
12c327f to
e5f8518
Compare
|
The notebook check here is unrelated to this change —
It is intermittent rather than broken. Three runs, same container image:
The failing numbers are time-to-abort, not runtime. In the Aug 5 artifact the Reproduced locally with Both DRC jobs pass, including the two narrow-device cells this PR adds. |
|
Follow-up: #102 is not a fix for this timeout, but it removes the headroom That PR unblocks
The cell that intermittently crosses Worth noting |
El ancho pedido no llegaba al layout. Dos recortes se acumulaban: el suelo de width usaba max(min_length, active_diff min_width), y min_length es el ancho minimo del poly, que limita la LONGITUD del canal, no su anchura; eso subia 0.22 a 0.28. Despues la difusion se dibujaba entera a comp_w, subiendo 0.28 a 0.36. Asi que un nfet pedido a 0.22 salia de 0.36 sin ningun aviso: genera, pasa DRC, y es otro dispositivo. Con f = 24837*W^-1.076 eso son 41% de frecuencia de menos en una celda LIF. Ahora la difusion es el dogbone que describia el comentario: una tira de altura width a lo largo del dispositivo y un pad de comp_w en cada contacto. El poly vuelve a dimensionarse sobre el canal. Y si aun asi hay que recortar el ancho, se avisa. gf180 nfet y pfet de 0.22 a 3.5 y sky130 desde 0.15: canal de la anchura pedida presente y DRC 0. Para width >= comp_min no se dibuja ningun pad, asi que la geometria de los dispositivos normales no cambia.
Estrechar el canal deja los pads de contacto sobresaliendo 0.07um, y eso abre dos frentes que el dispositivo ancho no tenia: - PL.4: el poly capea 0.22um sobre el canal pero se queda a 0.17um de las esquinas del pad. El end cap se mide contra la difusion mas ancha que el poly tiene al lado, asi que vuelve a dimensionarse sobre comp_w. No reensancha el dispositivo: la anchura electrica es poly sobre COMP, y COMP sigue midiendo width bajo la puerta. - DF.3a: el hueco entre dos pads es una muesca en la difusion y debe respetar el espaciado de COMP. Salia a 0.262um contra una regla de 0.28. Se resuelve subiendo el paso entre puertas, no estrechando el pad: el dispositivo crece en x y conserva la anchura pedida. Volver a la difusion uniforme habria cambiado W en silencio otra vez. nfet y pfet a W=0.22 con L=0.28 y L=0.30: DRC 0. W=0.50 y W=3.50 siguen dando 5.600 y 8.600 de alto, la misma geometria que antes del dogbone.
Problem
nmos/pmosraiseValueErrorbelow W=0.5 µm on gf180:Forcing the width through produces 12 CO.4 violations (COMP overlap of contact).
The limit is in the generator, not the technology. The PDK's own pcell
(
gf180mcu::nfet_03v3_draw) declareswmin=0.22and lays out a 0.22 µm deviceDRC-clean — its COMP has two different heights.
Root cause
The diffusion rectangle is sized with the channel width:
So a narrow channel drags the contact diffusion down with it, and the COMP no
longer encloses the contact by the 0.07 µm that CO.4 requires:
But electrical width is set by the poly over the channel, not by the
diffusion at the contacts — they may differ. That is the standard dogbone
layout:
Change
Three coordinated edits, since
poly_height, the via arrays and the implantsall derive from the same value:
__comp_min_width(pdk)—mcon.width + 2*mcon-active_diff.min_enclosure,read from the PDK rules rather than hardcoded, so it carries across
technologies. Falls back to
0.0, preserving current behaviour if the rulesare unavailable.
max(width, comp_min)poly_heightfollows the COMP — otherwise narrow devices tripPL.4_LV(poly2 end cap)
~15 effective lines; the rest is comments explaining why.
Verification
Two technologies, no code changes between them — the helper picks up each
PDK's own rules:
comp_minValueErrorValueErrorValueErrorgf180 via the bundled KLayout deck (FEOL+BEOL); sky130 via Magic DRC.
No regression. At or above the previous minimum the output is identical
polygon by polygon. File hashes do change, because
no_exceptionjoins thevia_arraysignature and gdsfactory derives cell names from parameters — sothe comparison was done on geometry, not on hashes.
Tests
The DRC matrix only exercised composite cells at comfortable widths, so nothing
would catch a regression here. Added
nmos/pmosat each PDK's minimumdiffusion width. Both fail on
mainwith CO.4 and pass with this change:Note for users
A dogbone device is not electrically equivalent to a rectangular one of the
same W: source/drain resistance is no longer inversely proportional to channel
width, because part of the current flows through the widened diffusion (see the
Solid-State Electronics reference above). Anyone relying on models fitted to
rectangular geometry should re-characterize before using the newly available
widths.