Closed topolarity closed 1 year ago
which OpenVAF version did you use?
I compiled from the OpenVAF-v23.5.0 tag, although the problem appears to show on a more recent master build as well
There were quite significant changes on master. Does the problem still reproduce with the latest master build?
These kind of issues can be very hard to debug. If a simulation converges its very unusual for results to just be wrong. Usually compiler bugs lead to convergence issues instead.
The most likely explanation would be some backwards incompatible changes in BSIM paramter names. How did you test with xyce exactly? Sometimes they patch the official Verilog-A files
Does the problem still reproduce with the latest master build?
Yes, it does
How did you test with xyce exactly?
Using this netlist: inverter_cmg_xyce.cir.txt
If you change level = 107
to level = 110
it will warn about a few missing parameters, but it matches the OpenVAF-compiled/ngspice-simulated BSIM-CMG v110 very closely. The ASAP7 PDK that these .model
cards are taken from is based on BSIM-CMG v107, so hopefully it's not a parameter issue.
The problem is not caused by openVAF. The TO didn't show the whole ngspice printout: `** ngspice-41+ : Circuit level simulation program Compiled with Sparse Direct Linear Solver The U. C. Berkeley CAD Group Copyright 1985-1994, Regents of the University of California. Copyright 2001-2023, The ngspice team. Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html Creation Date: Sat Nov 11 19:40:01 UTC 2023
Note: No compatibility mode selected!
Circuit: ** test circuit
Warning: Model issue on line 4 : .model asap7_nmos_lvt bsimcmg type=1 bulkmod=1 igcmod=1 igbmod=0 gidlmod ... unrecognized parameter (type) - ignored
Warning: Model issue on line 58 : .model asap7_pmos_lvt bsimcmg type=0 bulkmod=1 igcmod=1 igbmod=0 gidlmod ... unrecognized parameter (type) - ignored
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Warning: Interpolated raw file data!
Node Voltage
q 1.66259e-06 d 0.5 vss 0 vdd 1 vd#branch -2.8533e-13 vvss#branch 2.47656e-10 vvdd#branch -2.47383e-10
Reference value : 2.88060e-07 No. of Data Rows : 401 ` The very old vacode of the 107 model is using devtype as model parameter for channel type selection. Using that the simulation will show the expected larger amplitude. BTW - it is questionable to user a parameter set for a original 105 version to a version 110 and expect same results in mV range.
Thanks Dietmar! In that case, I will close this issue
Ah-ha. Thank you for the help!
Sorry for the noise here.
BSIM-CMG v107 (http://bsim.berkeley.edu/BSIMCMG/BSIMCMG107.0.0_20130712.tar.gz) successfully compiles with OpenVAF, but it fails to simulate properly:
The output averages about 1.7 μV , which is several orders of magnitude off from what, e.g., Xyce simulates for BSIM-CMG v107.
The same circuit simulated with BSIMCMG v110 (http://bsim.berkeley.edu/BSIMCMG/BSIMCMG110.0.0_20160101.tar.gz) appears to work (and also matches Xyce very closely):
netlist: inverter_cmg_ngspice.cir.txt