Get email delivery of the Cadence blog featured here
As an analog/mixed-signal designer, verification engineer, or CAD expert, you use Spectre® APS for analyzing your designs. Saving node voltages, element, and subcircuit port currents and power is an essential part when simulating your designs. Over the years, incremental additions to the Spectre waveform writing functionality have made it more complex. In SPECTRE17.1 ISR15, and SPECTRE18.1 ISR7 releases, we’ve consolidated the save options, eliminated obsolete options, and cleaned up the related documentation in spectre -h. This blog provides an overview of the essential Spectre save functionality.
Spectre High-Level Simulation Options
Compared to other simulators, Spectre has a more complex way of saving waveforms because it combines the higher-level save options with the lower-level individual save statements. Spectre provides the following four high-level options for creating waveforms:
Be cautious about saving a large number of waveforms, or all waveforms, because waveform calculation and writing may significantly slow down the simulation and increase the waveform file size. Especially, currents=all and subcktprobelvl=n options significantly degrade Spectre simulation performance.
Individual Save Statement
If save=selected and currents=selected options are enabled, which is also the default behavior of Spectre APS, you can define individual save statements, as shown below.
You can also define individual subcircuit terminal currents, or element/subcircuit power, as shown below.
Individual Save Statement with Wildcarding
Individual save statements support wildcarding in instance and net names. Wildcarding isn’t supported for device and subcircuit terminal names in the current save statements. In the examples below, wildcard “*” matches any set of characters, including the delimiter “.”.
save *.n1 sigtype=node
save u_dig.u_clkgen*.n1 sigtype=node
save u_dig.*.n* sigtype=node
save u_dig.u_clkgen*:d sigtype=dev
save u_dig*:inh_VDD sigtype=subckt
save *:pwr sigtype=subckt
save u_di*:pwr sigtype=subckt
Although wildcard matching statements work fine without the sigtype statement, if you find any of your wildcard settings not working, you may add the sigtype statement to specify the type of signal – node voltage, device terminal current, subcircuit terminal current, or power to be saved.
Waveform-Related Information in the Spectre Logfile
Spectre reports the number of save statements defined in the netlist, as shown below.
If save with wildcarding is used, the Spectre logfile provides information about the number of waveforms that match each individual save statement with wildcard. For example, the statements discussed above create the following wildcard match summary.
Wildcard match summary:
save *.n1 nodes: 16069
save u_dig.u_clkgen*.n1 nodes: 154
save u_dig.*.n* nodes: 22129
save u_dig.u_clkgen* d devices: 312
save u_dig* inh_VDD subcircuits: 35405
save * pwr subcircuits: 35406
save u_di* pwr subcircuits: 35405
After parsing, Spectre reports the number of waveforms that are saved. A large number of waveforms may degrade simulation performance. For such cases, Spectre also generates a warning, as shown below.
Output and IC/nodeset summary:
WARNING (SPECTRE-294): Too many saved signals. Slow initialization is expected!
If you see the above warning, we recommend that you reduce the number waveforms being saved.
In this blog, we reviewed the following important options related to waveform writing: save, nestlvl, currents, subcktprobelvl, and pwr. You can find more information about these options in the Output parameters section when using spectre -h options in SPECTRE17.1 ISR15, and SPECTRE18.1 ISR7 releases.
In the second part of the blog (to be published by June end), we'll discuss advanced save features, subcircuit and device terminal current calculation, and index versus name saving in global waveform writing statements.
We also learned that saving a large numbers of voltage and currents may degrade Spectre performance, and therefore, we have to be cautious about what we save.
You may also contact your Cadence support AE for guidance.
For more information on Cadence products and services, visit www.cadence.com.
About Spectre Tech Tips
Spectre Tech Tips is a blog series aimed at exploring the capabilities and potential of Spectre®. In addition to providing insight into the useful features and enhancements in Spectre, this series broadcasts the voice of different bloggers and experts, who share their knowledge and experience on all things related to Spectre. Enter your email address in the Subscriptions box and click SUBSCRIBE NOW to receive notifications about our latest Spectre Tech Tips posts.