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 |
|
Great!, thanks @carloscl03 Thanks, |
The requested width never reached the layout. Two roundings stacked: the width floor used max(min_length, active_diff min_width), and min_length is the poly's minimum width, which bounds the channel LENGTH rather than its width; that lifted 0.22 to 0.28. The diffusion was then drawn at comp_w throughout, lifting 0.28 to 0.36. So an nfet asked for 0.22 came out at 0.36 with no warning: it generates, it passes DRC, and it is a different device. With f = 24837*W^-1.076 that is 41% less frequency in a LIF cell. The diffusion is now the dogbone the comment already described: a strip of height width along the device and a comp_w pad at each contact. The poly is sized on the channel again, and if the width still has to be clipped it warns. gf180 nfet and pfet from 0.22 to 3.5 and sky130 from 0.15: channel at the requested width, DRC clean. For width >= comp_min no pad is drawn, so the geometry of normal devices does not change.
Narrowing the channel leaves the contact pads protruding 0.07um, which opens two fronts the wide device did not have: - PL.4: the poly caps 0.22um over the channel but sits 0.17um from the pad corners. End cap is measured against the widest diffusion beside the poly, so it is sized on comp_w again. This does not re-widen the device: the electrical width is poly over COMP, and COMP still measures width under the gate. - DF.3a: the gap between two pads is a notch in the diffusion and owes COMP spacing. It came out at 0.262um against a 0.28 rule. Fixed by widening the gate pitch rather than narrowing the pad, so the device grows in x and keeps the requested width. Going back to uniform diffusion would have changed W silently again. nfet and pfet at W=0.22 with L=0.28 and L=0.30: DRC clean. W=0.50 and W=3.50 still come out 5.600 and 8.600 tall, the same geometry as before the dogbone.
97e2b53 to
f75fc91
Compare
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.