Debugging Mixed Signal AMS
Debugging Mixed Signal AMS
Contents
Brief on AMS UNL (Unified NetLister) Flow
What is Slowness and Convergence
Multithreading for performance
Better configuration or partitioning
Modeling Practices
Debugging Techniques
Analog solver based
Linter (VerilogAMS/VerilogA)
Simulation diagnostics (+diagnose)
warnminstep and d2aminstep
Mixed simulator based
Profiler
Tracing the busy nets and optimization of IEs(CMs)
Case studies
Conclusions
ADE
Shadow-free Netlisting
DNA (Dual Netlisting Architecture)
New Binding Engine (AKA BIND2)
Pin-checker
HED v/-y Support
courtesy: cadence
4
Convergence Issues
Solution convergence failure at some transient time point in the
numerical techniques
Excess of LTE check failures
Residue convergence failure (KCL)
Nonlinear discontinuities on models
5
Redundant
Redundant
libraries Libraries
in Lib list
Modeling Practices
Resistive switches
No ideal switch
analog begin
if (V(ps,ns) > 0)
V(p,n) <+ 0;
else
I(p,n) <+ 0;
end
Rswitch_target =
roff*pow((ron/(roff*1.0)),transition(switch_state,0,dt_open,dt_close));
If using above for crossing detection, better to add a +/-delta in case two voltages are the
same .
@(above(V(INP2)-V(INN)-1e-6)) begin
y2 = 1;
end
@(above(V(INN)-V(INP2)+1e-6)) begin
y2 = 0;
end
If using additional condition inside cross/above statement, unless both conditions are
satisfied, crossing wont flag; so need to be sure that is what is intended.
@(cross(V(INP2, INN)-minimum, 1)) begin
y2 = (V(INP2,AVSS)>0.5);
end
courtesy cadence
Note: this will negatively impact the simulation performance, especially if smaller than 2e-15
At times setting a cmin will also help, will speed up the sim as well, especially if you have thousands+ of connect
elements. But these are not recommended for certain designs like charge sharing sensitive designs
Misc
Currently there is a UNL bug: if only a slice of a bus in your schematic comes out as pins, module port declaration
will have the full bus not the slice; This will mess up the connection, you may see missing transition because of
this. Please use node breaker for such bus
9
bsub
bsub
bsub
bsub
-n 4
-n 2
-n 2
-n 4
Environment settings
setenv SPECTRE_DEFAULTS "-ahdllint -ahllint_maxwarn=10
12
Suppress Messages
myoptions options warning_limit=0 warning_id=[AHDLLINT-8004 AHDLLINT-8005]
+diagnose Option
************************************************
Transient Analysis `tran': time = (0 s -> 10 us)
************************************************
15
+diagnose Option
~~~~~~~~~~~~~~~~~
Diagnosis Summary
~~~~~~~~~~~~~~~~~
Number of Accepted steps in (1e-10 ~ 1e-9) :
7 ( 0.23 %)
Number of Accepted steps in (1e-9 ~ 1e-8) : 3002 (99.77 %)
3.333333e-09
8.161593e-10
2982
16
+diagnose Option
If your circuit contains signals of the same quantity that are vastly
different in size (such as high voltage circuitry combined with low
voltage control circuitry), you should consider specifying
`relref=alllocal' on the transient analysis statement.
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Post-Transient Simulation Summary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Top 10 Solution Convergence failure counts accumulated from time = 0 s
to time = 10 us of `tran' analysis
4
26.67 % I3.V2:p
2
13.33 % I12.V_LOAD:p
...
...
Reference : cadence source link Solution ID: 20279078
17
18
19
Others
Use of ams end view instead of spectre end view
results in wrong nelist in some cases
20
Profiler option
-profile does not provide +diagnose results
irun -profile <rest_of_cmds>
Measures where CPU time spend during simulation
Use -profile option to enable profiler
When simulation exits, ncprof.out is created in netlist directory
Header of profiler report provides hints on performance issues
Insufficient physical memory for the size of simulation
Low CPU utilization because of busy machine or I/O
-GATELOOPWARN option which could detect zerodelay loop of gate level models and print details
Zero delay loop among verilog and VHDL can be
detected
23
SV
stimulus
HED config
Gate
level
digital
Struck at
16us for
2 days
sv_error
Take -f sv
files
Internal
error
resolved
Wrapper
around sv
Eliminate sv
blocks and
identify issue
block
Simvision
interactive
C
M
Digital
loop,
where
Unintended
Force in sv
?analog
warnminstep
Internal
error
resolved
ESD blocks
Dummy it
Simulation
Runs
verilog
stimulus
With lots
of
includes
HED config
Is similar
?
CBN vs UNL
May be
not an
issue
Still slow
?
Linter
static &
dynamic
Major options ?
Switches &
transition
filter
Profiler,
EU_EVENT
S
Sw_no
model
change
Not much
inference
ESD blocks
Dummy it
Simulation
perforamnce
improves
Some
test
vectors
conv.
issue
Conclusions
Slowness in simulation and convergence could happen due
to various reasons.
Debugging these issues in AMS is always a challenge and
time consuming most of the times
Options covered in this presentation, aid designer to
provide clues to improve the design, to minimize these
issues
Assertions, device checking etc. do slow down the
simulation performance. Smart usage of these features
recommended.
Please remove all these debug statements during
regressions runs, after design debugs
Thank You.
26
Acknowledgements
TI AMS EDA Team
Robert Stranghoener
TI DV teams
Keith Brouse
<filename> or <session>.<paper>
27
Modeling Tips
Use Resistive switches model in veriloga/ams
Use piecewise constant argument for transition
filter
Use of cross () and above()
@cross(V(in)-0.62,0,1p,0.01));
LSF Options
bsub n 2 irun -R suse11 +mt=lsf <cmd>
ADE: Simulation->Options->AMS Simulator
Debug Options
Check the partition in HED
irun spectre_args -ahdllint=warn ahdllint_maxwarn=10000
irun spectre_args +diagnose
irun profile <cmd>
irun +eu_events -gateloopwarn
28