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 the previous blog, Spectre Tech Tips: Spectre APS Save Overview - Part 1, we learned that in SPECTRE17.1 ISR15 and SPECTRE18.1 ISR7 releases, the save options have been consolidated, obsolete options have been eliminated, and the related documentation has been cleaned up in spectre -h. In addition, we reviewed the following important options related to waveform writing: save, nestlvl, currents, subcktprobelvl, and pwr.
In this blog, we'll discuss advanced save features, subcircuit and device terminal current calculation, and index versus name saving in global waveform writing statements.
Advanced Save Features
Spectre supports the following advanced features for saving a waveform:
This can also be enabled for all save statements with the savefilter=rc option.
This can also be defined globally for all subcircuit-based save statements with the saveports=yes option.
The advanced features discussed above can also be combined with one another. For example:
save * subckt=inverter22 ports=yes depth=2 exclude=[*ut]
The above statement will save all nodes inside subcircuit inverter22 and all child subcircuits one level below. It will include the subcircuit ports for these subcircuits and exclude any net which matches the pattern *ut.
Subcircuit Terminal Current Calculation
Spectre provides two methods for calculating subcircuit terminal currents. Both have their values.
While inserting iprobes is the most accurate method, it may significantly increase the size of the matrix, and therefore, decrease the performance for a large number of subcircuit port currents being saved. Summing up the element currents does not increase the matrix; however, it may introduce rounding errors during calculation. In addition, summing may degrade performance when one port, for example, a VDD, is connected to thousands or millions of elements.
The Spectre subcktiprobes option defines which of the above methods is used when calculating subcircuit port currents. For example:
opt8 option subcktiprobes=all
The subcktiprobes option accepts the following possible values:
We recommend that you use the Spectre APS default setting. However, if you experience extreme slowness because of the subckprobelvl option, you may improve the performance by saving the port currents for the power supply nodes individually. For example:
save I0:VDD I0:GND
The above save statement will insert iprobes for the current measurement of I0:VDD and I0:GND instead of summing up the large numbers of currents which is used then I0:VDD and I0:GND are saved with the subcktprobelvl option.
Element/Device Terminal Current Calculation
When saving element or device terminal currents, the current is typically taken from element calculation, and therefore, an iprobe insertion isn’t required. However, there may be devices which don’t calculate the current, or there may be a need for inserting an iprobe for getting better current accuracy. The useprobes option allows you to add iprobes for element and device terminal current measurements. For example:
opt9 options useprobes=yes
useprobes=no, which is the default behavior in Spectre APS, gets the terminal currents from the individual element.
useprobes=yes is required in special cases when devices don’t provide the current, or, if the default method doesn’t provide the required accuracy.
Subcircuit and Device Terminal Naming
Subcircuit and device terminal names can either be referenced by their name, that is, I1:vdd, or by their index, that is, I1:1. However, when global statements are used for element terminal current saving (currents=all), or for subcircuit terminal currents (subcktprobelvl=5), Spectre needs to decide whether to print the terminal name or the terminal index. You can use the useterms option to specify whether terminal name or index needs to be used when using the global save statements.
opt9 options useterms=name
useterms=default, which is the default behavior in Spectre APS, uses the terminal name for element currents, and the terminal index for subcircuit terminals.
useterms=name uses the terminal name for both
useterms=index uses index for both
In the two save overview blogs, we reviewed the following important options related to waveform writing: save, nestlvl, currents, subcktprobelvl, pwr, subckiprobes, useprobes, useterms, savefilter, and saveports, and the following advanced save features: time_window, depth, exclude, filter, subckt, ports. Their spectre -h documentation is updated in Spectre 17.1 ISR15 and Spectre 18.1 ISR7. If you see any other save-related options apart from the ones listed above, these options are obsolete and replaced by the discussed options.
This blog doesn’t discuss the inline subcircuit-related saving options, waveform compression, and element/node preservation. These topics may be discussed in the upcoming blogs.
We recommend that you always save the waveforms that are needed for your analysis, and refrain from saving everything. Especially, the currents=all and the subcktproblvl=n options introduce significant simulation overhead and may degrade your simulation performance significantly.
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.