I'd like to run a post-layout simulation on a desi...
# analog-design
I'd like to run a post-layout simulation on a design including PNPs. The current netlist extraction produces a PNP subcircuit entry ending with 
sky130_fd_pr__pnp_05v5 area=4.79548e+14p
. The area of the parallel devices is absorbed into this single subcircuit. Multiplicity is not extracted. The
device is itself a subcircuit which wraps around
(thanks @User for making the wrapper, since the actual
doesn't seem to exist in the pdk). I don't think that this area parameter does anything to the
SPICE model. Please tell me if I'm wrong. Since the real
doesn't seem to exist I can't tell if area is used as a parameter (additionally, the pdk only provides 2 fixed area devices, so I'm not sure how extracting area instead of multiplicity is useful). I'm thinking I have to convert from area to device multiplicity in order for my extracted design to properly simulate, i.e. use the existing PNP SPICE models. Has anyone run into this? Or have any suggestions on what to do? Another detail I should add is that I've flattened my layout. If I extract from a hierarchical layout then each PNP is extracted w/ endings like:
sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
tldr; when using the PNPs as of now should I avoid flattening the design?
Don't ever flatten a design unless you have to, as it makes everything so much more complicated. I would not normally combine bipolar transistors by area; the SkyWater models are, as you have noted, specific for the two layouts with 0.68um x 0.68um emitter and 3.4um x 3.4um emitter. I can get magic to produce the correct output for each device; it requires adding an ID layer. I did that for the fixed-width poly resistors but I have not yet done that for the bipolar devices. That would get rid of the need for the wrapper subcircuit, and is probably what you want. I'm aware of the issue with the "generic" bipolar model that doesn't actually exist.