Tom
06/17/2021, 4:23 AMmagic -rcfile $PDK_ROOT/libs.tech/magic/sky130A.magicrc -noconsole -dnull << EOF
load $MAG_CELL
flatten ${CELL_NAME}_pex
load ${CELL_NAME}_pex
box values 0 0 0 0
extract all
ext2sim labels on
ext2sim
extresist tolerance 10
extresist
ext2spice lvs
ext2spice cthresh 0.01
ext2spice extresist on
ext2spice -o $OUTPUT_FILE_NAME
exit
EOF
The flattening process appends _pex
to the cell name which ends up in the subcircuit name too.