If someone could take a look at this and point out...
# analog-design
j
If someone could take a look at this and point out where I've gone wrong, I'd appreciate it. I'm trying to layout 39 parallel PNP devices and 1 PNP on its own (total of 40). All base and collectors are connected to ground. I run locali through the base & collector zones throughout the array (while not touching the emitter). I run metal1 over the emitters. In principle, is this how parallel PNPs are laid out? When I extract a netlist from this layout, netgen reports 40 individual PNP devices, while I expect 2 total PNPs. I'm going to include pictures in a thread to show the connections I've made. Any help is appreciated 🙂
emitter areas connected together by metal1
base & collectors connected via locali. jump up to metal connection to ground is in top right.
the 40th PNP does not have its emitter connected to the rest of the array.
if sharing the
.mag
files makes helping easier, I'm happy to do that.
w
have you checked the netlist it generates after extraction?
j
yeah. i get a bunch of of instances of the form
Copy code
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
If this helps, here's the entire generated netlist. If you look through it, let me know if you find anything off
Copy code
* NGSPICE file created from bandgapCoreCombined.ext - technology: sky130A

.subckt sky130_fd_pr__res_xhigh_po_0p35_BNSLGU VSUBS a_n35_n808# a_n35_376#
X0 a_n35_n808# a_n35_376# VSUBS sky130_fd_pr__res_xhigh_po_0p35 l=3.76e+06u
.ends

.subckt sky130_fd_pr__pnp_05v5_W3p40L3p40 Emitter Collector Base m=1
X0 Emitter Base Collector sky130_fd_pr__pnp_05v0 area=1.156e+13p
.ends

.subckt bandgapCoreCombined Vb Va GND
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_9 GND m1_10400_6300# m1_11600_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[1|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[5|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[6|0] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|0] Va GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[1|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[5|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[6|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|1] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[1|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[5|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[6|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|2] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[1|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[5|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[6|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|3] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[0|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[1|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[5|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[6|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_10 GND m1_10800_6600# m1_12000_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_11 GND m1_12400_6300# m1_11600_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_12 GND m1_12800_6600# m1_12000_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_14 GND m1_12800_6600# GND sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_13 GND m1_12400_6300# GND sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_15 GND m1_12400_6300# GND sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_16 GND m1_12800_6600# GND sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_1 GND Va m1_8400_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_0 GND Vb m1_8000_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_2 GND m1_8800_6300# m1_8000_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_3 GND m1_9200_6600# m1_8400_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_4 GND m1_8800_6300# m1_9600_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_5 GND m1_9200_6600# m1_10000_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_6 GND m1_10400_6300# m1_9600_7800# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_7 GND m1_10800_6600# m1_10000_7500# sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
Xsky130_fd_pr__res_xhigh_po_0p35_BNSLGU_8 GND sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ Vb sky130_fd_pr__res_xhigh_po_0p35_BNSLGU
.ends
I might not be reading the LVS report correctly. If it helps, here it is
w
whats the schematic for this?
It looks like netgen is reporting a lot more nets in the extracted netlist than the refrence netlist
so its not an issue of not merging devices. Looking at the netlist it looks like the devices are not all connected to the same nets
j
image.png
the other thing I have going on is the way I've laid out the resistors
image.png
so i'd expect some extra nets from these intermediate connections
but this does imply a completely different schematic
i can remedy this by modifying the resistors in the schematic, right? i'm pretty set on this kind of layout for matching concerns
the other thing is that netgen correctly interprets this resistor layout as 3 resistors
w
for example:
Copy code
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[2|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[3|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
Xsky130_fd_pr__pnp_05v5_W3p40L3p40_0[4|4] sky130_fd_pr__pnp_05v5_W3p40L3p40_0[7|4]/Emitter
+ GND GND sky130_fd_pr__pnp_05v5_W3p40L3p40 m=1
j
in which case, if netgen recognizes there are 3 resistors, why do the intermediate nets matter?
what do you see in that snippet
w
oh wait, no. Thats just instance name
j
yeah
all the emitters are connected together, which is good
otherwise the base and collectors are all connected to GND
at the bottom of the netlist is where the intermediate nets of the resistor network are
w
Something else is up because your number of nets do not match
but I see that the bjt model is a subcircuit. That may be impacting the merging?
Copy code
Subcircuit pins:
Circuit 1: sky130_fd_pr__pnp_05v5_W3p40L3p |Circuit 2: sky130_fd_pr__pnp_05v5_W3p40L3p 
-------------------------------------------|-------------------------------------------
(no matching pin)                          |Emitter                                    
(no matching pin)                          |Collector                                  
(no matching pin)                          |Base
can you post the schematic netlist?
Its actually unclear why netgen thinks there are so many nets. going through the netlist I do not see that many
When is the last time you updated netgen?
c
Have you painted a psubdiff and psubcontact to connect the GND to psub? I can't really see it in the layout. Sometimes it matters. @John Kustin
t
@John Kustin: Can you tarball the example and post it to me? I'm suspicous of the PNP device setup because I just pulled the layout for it but things were scrambled between the two PNP devices and I had to untangle it all in the repo. I'm pretty sure that device has never been run through extraction and LVS before.
@John Kustin: Yeah, I'm pretty sure this is caused by the fact that the SkyWater layout for that device has pins labeled "Base", "Emitter", and "Collector", while their SPICE model has pins "c", "b", and "e". It is probably easiest to modify the labels in the GDS file and update open_pdks. That is definitely one issue, probably the main one.
@John Kustin: I just pushed an update to open_pdks on opencircuitdesign.com to correct this issue (which I did the opposite way, by changing the SPICE netlist to "Base", "Emitter", and "Collector", which was even easier because I already had a patch file to mess with those lines). The quick way to update is to cd to open_pdks and do
git pull ; cd sky130 ; make tools-a ; make primitive-a ; sudo make install
; it's not necessary to rebuild everything.
@John Kustin: Actually that fix will make no difference whatsoever to you, because your schematic-side netlist comes from xschem. The xschem symbol for the PNP needs to be changed to have its pins match the layout in the PDK. Also, it needs to have only three pins. The PNP device cannot have a substrate connection because the collector is the substrate. This is SkyWater's error.
@John Kustin: I have asked Stefan Schippers to update the xschem sky130 library, but for now, you can just replace the PNP symbol file with this one. That should cause the schematic netlist output for the PNP to match the layout's.
b
A couple of project groups in my class were interested in using the pnp device to make bandgap references. I made a symbol in xschem that maps the three-terminal pnp device extracted from magic to the model in the pdk. See the tutorial video (

Magic / Xschem Sky130 Vertical PNP Transistor Layout / Simulation / LVS Tutorial

) for an explanation of the set-up. The required files are in the attached zip archive.
t
@Bradley Minch: How does that work for LVS without the pin names matching the layout?
@Bradley Minch: And where does the confusion between 05v0 and 05v5 come from?
b
The subcircuit wrapper name came from the device name that magic used for extraction. The pin ordering came from the pin ordering that magic was using for extraction. This was meant only as a stop-gap measure. I had not intended to make it public, but from this thread, it seems like others may benefit from it.
t
@Bradley Minch: Aaaugh, the wrong name comes from my magic techfile!---Not that it matters all that much, because there is no such model, as you noticed since you made your own netlist to convert back to the SkyWater device model name. To get the extracted PNP to work out-of-the box, I will have to use the same tactic that I did for the poly resistors, with a device identifer for the specific device. I will need to work on that. Thanks for the files.
@John Kustin: Well, that explains even more. . . the device name extracted from magic is wrong so it doesn't match the device in the netgen setup and so everything about it will be wrong.
j
Huh! Well thanks everyone for pitching in. @Tim Edwards the device name extracted from magic is the one found in this subckt definition?
Copy code
.subckt sky130_fd_pr__pnp_05v5_W3p40L3p40 Emitter Collector Base m=1
X0 Emitter Base Collector sky130_fd_pr__pnp_05v0 area=1.156e+13p
.ends
I guess I can edit the
model=
field in the new
pnp_05v5.sym
file you sent to get the size of PNP I want then? @Tim Edwards
This is making sense now 🙂 Thanks @Bradley Minch for sharing those files
t
It's a bit of a hack and probably will continue to be until I make a proper parameterized device generator for the bipolar in magic.
j
Fine by me. Thank you!