In mos_pcell.il, derived geometry variables are computed
before any layout objects are created. This stage converts abstract
PCell parameters into concrete dimensions that will be reused
consistently throughout the layout generation.
(gatePitch (+ l polySpace (* 2 gateExt)))
This expression defines the center-to-center spacing between adjacent
poly gates. The inclusion of gateExt ensures that poly
extends beyond active diffusion symmetrically on both sides.
(activeLen
(+ (* nf l)
(* (max 0 (- nf 1)) polySpace)
(* 2 gateExt)))
For multi-finger devices, the active length scales linearly with
the number of fingers. The (max 0 (- nf 1)) term
automatically suppresses poly spacing when nf = 1.
(odLen (+ activeLen (* 2 sdExt)))
(odWid w)
The final OD rectangle fully encloses the active region and source/drain extensions. All downstream shapes reference these values.