Hello Everybody,
I am looking for hints to solve a convergence issue, what I face when I run a post-layout spectre simulation with a veriloga block.
Spectre oscillates between solutions at many points, and after a while it throws an error:
Code:
iter = 56, convergence failed at solution: SIM_CONTROL:Out_vss_flow (Soln = -5.97066 mA Delta = -3.04431 A), residue: SIM_CONTROL:Out_vss_flow (RESIDUE= -43.7835 mV REF = 692.316 mV)
iter = 57, convergence failed at solution: SIM_CONTROL:Out_vss_flow (Soln = 3.03834 A Delta = 3.04431 A), residue: SIM_CONTROL:Out_vss_flow (RESIDUE= 43.7835 mV REF = 692.316 mV)
iter = 58, convergence failed at solution: SIM_CONTROL:Out_vss_flow (Soln = -5.97066 mA Delta = -3.04431 A), residue: SIM_CONTROL:Out_vss_flow (RESIDUE= -43.7835 mV REF = 692.316 mV)
iter = 59, convergence failed at solution: SIM_CONTROL:Out_vss_flow (Soln = 3.03834 A Delta = 3.04431 A), residue: SIM_CONTROL:Out_vss_flow (RESIDUE= 43.7835 mV REF = 692.316 mV)
So it points me towards bad modelling like the case of abs(sqrt(x)) function. In a pre-layout (=schematic) simulation everything is fine, but using an RCC or CC extraction I got these errors.
SIM_CONTROL is the name of the veriloga instance, what I use to adaptively control the simulation. Its output signal is Out and vss is the ground. The error is that the current going out this terminal can not be determined with Nweton-raphson. The code for setting the output is:
Code:phase = `M_TWO_PI*idtmod(fc,0,1,0);
V(Out,vss) <+ out_DC + vout*cos(phase);
The value "vout" and fc is swept adaptively in the code. I've used the transition() filter on vout, but it did not help changed the convergence.
Is there anything wrong with this verilogA code snippet? Could it cause the linked error? I am no verilogA expert, but either this, or the parasitic extraction add something to the circuit what drives the simulator in that state or something in the PDK models is the culprit. How could I reduce the scope and find a correct diagnoses?
PS: I've tried different PDK/model versions as well as different MMSIM versions. The latest was MMSIM18.10.077.