I was integrating my schematic with the `user_anal...
# caravan
a
I was integrating my schematic with the
user_analog_project_wrapper.sch
, but am getting the following error:
Copy code
Too few parameters for subcircuit type "user_analog_project_wrapper" (instance xx2)
What could be the reason for this error? I have cross checked all my connections too.
t
"Too few parameters" would mean that your subcircuit definition and the instance have different numbers of pins. One reason for this is that if you directly wire pins together, such as grounding signals by tying them to power or ground, then all but one of the pins on a single net will get optimized out of the netlist. The preferred method is to place a metal resistor between the wire and pin for all pin-to-pin connections (in both the schematic and layout). I'm sorry to say that I did not handle this correctly in my example analog layout in the caravel_user_project_analog repository, and I'm now working on fixing that. (On the other hand, I am not certain that this is your issue, but it seems a likely possibility.)
a
Untitled.txt
@User I tried doing what you said, i.e., connected m1 resistors between all pin to pin connections. However, the error still persists. I have attached my netlist above for your reference. I am interfacing with user_analog_project_wrapper using io_analog[0:6] pins and a self-made ESD.
t
What tool is generating the error message you originally posted? I have no trouble running the posted netlist in ngspice.
a
Ngspice. I have attached a screenshot of the Ngspice window.
t
I have no idea, then. I see the same parameter count on both subcircuit and instance (663), and when I run ngspice it doesn't complain about it. I see other issues, such as that you have both a
.lib
statement to include the typical corner models from open_pdks, and a bunch of
.include
statements (incorrect) that try to include the same models from skywater-pdk (these have many errors that are corrected by the open_pdks installation, and anyway, it's an error to try to include the models twice).
a
I removed all
.include
statements, but it seems Ngspice can't find the lvt models now. I will try to replace these models with their open_pdks counterparts, in case that helps.
t
You are getting the same result as me, now. I see a very odd thing in the error message which is
l = x2.xm29.  1.000000000e+00
. This is the only indication of what the underlying error might be. If so, then ngspice has become confused by the device syntax, maybe with the equations for as=, ad=, ps=, and pd= produced by xschem, although they look correct to me.
a
I changed the number of fingers to 1 and the multiplicity to 20, and it worked without any errors. I am not sure what the difference would have been with multi-fingered transistors.
t
If there isn't a bin corresponding to the total width, then you will get a model error in ngspice. The device in question has W=5 nf=20, so the width of each device is 5 / 20 = 0.25um, but the minimum width of LVT devices is 0.35um.
a
@User Adding metal resistors to pin-to-pin connections in my top-level layout adds some additional floating capacitances to vssa1 in the generated spice netlist in my case (as in the picture below). Am I missing something?
t
@User: Don't read too much into that. The metal resistors have to be treated as "unconnected" to the surrounding metal so that they can be treated as devices. So the metal is "floating" as far as the extraction is concerned. You can avoid the issue by running the command
ext2spice resistor tee on
, which will divide the resistor into two parts and apply the capacitance to the node in the middle, where it will no longer be floating (and when it's floating, it's missing from the simulation, although the typical metal resistor cut is very small and does not have much capacitance to add to the total).