So I was noodling around different devices in this...
# gf180mcu
c
So I was noodling around different devices in this PDK, and when I was trying to run some simple tests with PNP
vpbp_10x10
(I also wonder why its called
pbp
, and I assume
10x10
that is the emitter area? In addition, why its name is different to NPN which is called
npn_10p00x10p00
), it says this subckt is unknown. Noted that I included the BJT model in my
.LIB
statement.
t
@Chris: There has not been complete support in magic for the primitive devices in GF180MCU. I had not finished updating the primitive device names for the bipolar transistors. I did an update yesterday which got mirrored to github about five hours after your post which corrects the issue you mentioned. The correct PNP device name is
pnp_10p00x10p00
. Please note, however, that there is currently an issue in Magic's device generator code where it does not handle a layout cell filename that is different from the device name. It is throwing some errors, although I was able to create the layout. Getting access to the updates requires pulling the most recent version of open_pdks, which will also require pulling and compiling the most recent version of magic.
c
Thanks, @Tim Edwards, I will get those updated later. In addition to this, I might notice something else that is also a possible issue: the multiplier
m
in the transistor model. First, I think in the xschem test example
test_nfet_03v3.sch
, the attribute
mult=1
is not the correct keyword and I think it should be corrected to
m
; possibly @Amro Tork could elaborate this a bit, as I assume you guys created these testbenches (correct me if I am wrong). Second, even if you correct the keyword name, I do not think this parameter
m
is passed to the actual device spice model and taking any effect at all. For example, if I change
m
from 1 to 2, I should expect my Id current to double in the saturation region, whereas with the current model, it doesn't (see pictures 2 and 3). What it should generate, is something equivalent to picture 4.
t
@Chris: The use of
m
and
mult
is due to the fact that according to the long-standing syntax of SPICE,
m
can be used to specify the number of devices in parallel but cannot itself be used as a parameter name inside the device model. That leads to most people using the tactic of creating another parameter, typically
mult
, which is set to the same value as
m
but can be used within the model. The reason that the multiplier shows up in the model is specifically for device mismatch. Mismatch is averaged over
m
devices, so the mismatch equation needs to account for the total area of
m
devices, or else you cannot simulate the effect of using an array of devices to reduce the total mismatch. Since by definition
m
and
mult
must equal the same number, often a tool like xschem will set up the symbol so that only one appears (so that it is impossible for the end user to incorrectly give them different values), but will output both parameter names in the output netlist.
c
I see thanks @Tim Edwards, but the core issue is that
m
is not taking any effect here (unlike SKY130). Noted that yes the exported netlist has only
m
defined through xschem (no
mult
)
t
Okay, looking at what's in the GF180MCU PDK, I see for example
Copy code
.subckt nmos_3p3 d g s b w=1e-5 l=2.8e-7
+ as=0 ad=0 ps=0 pd=0 nrd=0 nrs=0 par=1 dtemp=0
+ sa=0 sb=0 nf=1 sd=0 m=1
In fact,
m
is not supposed to be passed as a parameter to a subcircuit because it shadows the normal use of the
m
parameter as a device multiplier. This is something that comes from the original Hspice sources from GF, so it might be something that is allowed in Hspice but not in ngspice, which means that the parameter must be removed from the subcircuit definitions (I recall we did something like that when converting the sky130 models, but I didn't do the gf180mcu model conversion). @Amro Tork: This looks like your issue to handle. . .
@Chris: But I also agree that
mult
is not a parameter that is used in the GF models (and I can't see that they handle multiplicity at all within the models), and that the schematic should define and use
m
and not
mult
.
Please note that the first MPW tapeout on GF was digital only because we had not converted the device models at the time. So the ngspice models have not been thoroughly vetted.
c
OK, thanks @Tim Edwards for the clarifications!
t
I think I just clarified that I have a lot of work to do. . .
🙂 1
a
@Tim Edwards will take a look
c
Hi @Amro Tork, any updates on this? Thanks.
a
@Farag Elsayed Could you please take a look?
f
@Chris I have updated model card to support using
m
parameter for FETs. You could use models in Mabrains PR repo https://github.com/mabrains/globalfoundries-pdk-libs-gf180mcu_fd_pr
a
@Chris I'll push the updates to efabless repo soon and it will be released to the updated PDK soon.
@Tim Edwards @donn PDK in efabless updated. Could you please update the volare build?
d
This is a multi-step process, the PDK commit hashes need to be updated in
open_pdks
first. Otherwise, volare builds are going to be the same.
t
I will update the PDK repository hashes in open_pdks today.
c
@Farag Elsayed @Amro Tork I have applied the new library and run the test example with the expected simulation results shown. Thanks! Also, thanks @Tim Edwards for the follow-up!
t
I did, by the way, update the hashes, although I am going to let it run the overnight cron job which mirrors the repo to github at 3:00am EDT. So it will be available on github in five hours.
s
@Chris (@Tim Edwards) There is indeed a problem in the gf180mcu xschem symbols.
mult=#
is given on the instance but the symbol expects a
m
. The correction is to change the symbols to use for multiplier the
mult
instance parameter (as is done also in sky130). Currently the symbol has the following
format
and
lvs_format
netlist rules:
Copy code
format="@spiceprefix@name @pinlist @model L=@L W=@W
+ nf=@nf ad=@ad as=@as pd=@pd ps=@ps
+ nrd=@nrd nrs=@nrs sa=@sa sb=@sb sd=@sd
+ m=@m"
lvs_format="@name @pinlist @model L=@L W=@W nf=@nf m=@m"
You see m=@m, it means set the
m
parameter to the instance given
m
parameter. The correct definition is:
Copy code
format="@spiceprefix@name @pinlist @model L=@L W=@W
+ nf=@nf ad=@ad as=@as pd=@pd ps=@ps
+ nrd=@nrd nrs=@nrs sa=@sa sb=@sb sd=@sd
+ m=@mult"
lvs_format="@name @pinlist @model L=@L W=@W nf=@nf m=@mult"
I tried the correction locally but even with the fix no change was observed in simulation. So I will update my open_pdks install for the updatedd spice models and if there are still issues and if needed I will submit a correction to the xschem FET symbols.
d
Volare builds have commenced.
s
I have updated and tested
open_pdks
and giving '`m=2`' (or whatever other multiplier) on
gf180mcu
FET instances now works. ( @Tim Edwards, @Amro Tork) there is no
mult
parameter in xschem
gf180mcu
symbols. we will probably need that if we plan to evaluate mismatch parameters inside the FET models. If this is the case I will submit a pull request and add mult instance parameters in test circuits. FET Models will get
m
and
mult
from instance
mult
. If there is not such a plan the current xschem symbols are just fine. Give
m=<number>
on instances and you get multiplied devices.
t
@Stefan Schippers: I haven't seen
mult
used in any of the models. . . I'm not sure how mismatch analysis is supposed to work in the GF PDK. @Amro Tork might know the answer to that.