I have testbench setup to do AMS simulation. The simulation runs fine when I use the regular simulation models. When I replace the regular models with those meant for OCC simulation, I get the following error message -
" ncsim: *E,RNALER: Simulation terminated due to analog error."
Is OCC simulation supported by AMS simulator? If yes, can someone help me debug this error.
Assuming you're talking about "asserts" in spectre when you mention "OCC", then that should work (unless you're using ultrasim as the solver - but in that case, you still shouldn't have this error but a warning telling you that "assert" is not supported).
For example, if I use this VerilogAMS code:
`include "disciplines.vams"module testassert;electrical vd,vg;electrical gnd;ground gnd;vsource #(.dc(3.0)) V1(vd,gnd);nch #(.w(1e-6),.l(1e-6)) M1(vd,vg,gnd,gnd);vsource #(.type("pulse"),.val0(0.0),.val1(3.0),.rise(1u)) VG(vg,gnd);endmodule
and this file (models.scs):
inline subckt nch (d g s b)parameters w=1u l=1umodel nch bsim4 type=nnch (d g s b) nch w=w l=lass1 assert dev=nch param=vgs min=1 max=2ass2 assert expr="v(g)-v(s)" min=1 max=2ends nchtran tran stop=1u
And then I run "irun asserttest.vams models.scs" and I get:
Warning from spectre at time = 1 ns during transient analysis `tran'. WARNING (SPECTRE-4105): testassert.M1.ass2, instance testassert.M1: Expression `v(g)-v(s)' having value 3e-03 has exceeded its lower bound `1'. WARNING (SPECTRE-4004): testassert.M1.ass1: Instance testassert.M1, Parameter `vgs' having value 3 mV has exceeded its lower bound `1'.Warning from spectre at time = 352.138 ns during transient analysis `tran'. WARNING (SPECTRE-4108): testassert.M1.ass2, instance testassert.M1: Expression `v(g)-v(s)' having value 1.05641 has returned to within bounds [1, 2]. Peak value was 3e-03 at time 1e-09. Total duration of overshoot was 351.138e-09. WARNING (SPECTRE-4020): testassert.M1.ass1: Instance testassert.M1, Parameter `vgs' having value 1.05641 V has returned to within bounds [1, 2].Warning from spectre at time = 672.138 ns during transient analysis `tran'. WARNING (SPECTRE-4106): testassert.M1.ass2, instance testassert.M1: Expression `v(g)-v(s)' having value 2.01641 has exceeded its upper bound `2'. WARNING (SPECTRE-4014): testassert.M1.ass1: Instance testassert.M1, Parameter `vgs' having value 2.01641 V has exceeded its upper bound `2'.
In reply to Andrew Beckett:
Thank you for the quick response. I think there is some confusion.
By OCC simulation, I mean the kind of simulation that tells you if all terminal voltages for the devices are within device specification. See the attached document. [Moderator: Removed because it contained confidential information that the poster was not entitled to post]
The simulator (/solver) that I chose in ADE-L is 'ams' because my digital block is a verilog code.
In reply to Ashwathmp:
That's what I was doing - I was running with AMS (just from the command line). There is no confusion (from my part). When you simulate with AMS, you are using a mixed-signal simulator which has an analog solver (spectre, aps or ultrasim) to handle the analog parts, and the ncsim engine for the digital parts (all integrated into the same simulator).
From the document you posted, it appears (by reading between the lines) that this is not using spectre's assert capability but has been implemented using VerilogA models to do the device checks. Perhaps it is so old that it pre-dates assert? That said, spectre has supported "assert" for at least 11 years (I forget exactly when it was introduced, but the oldest version I have handy, partly due to OS/platforms I have available, is IC5033, and it's in that...)
That said, even if VerilogA models are used to do this, it ought to work. If it doesn't, we'll need to see it (I would suggest you check first with the latest simulator version, which is INCISIV141 - or if you have INCISIV132 that's recent enough to get a good test). If it's still broken, go to customer support.