Product Documentation
Spectre AMS Designer and Xcelium Simulator Mixed-Signal User Guide
Product Version 22.09, September 2022

Values Associated with an Analog Object

You can use the function cds_get_analog_value to fetch the voltage, current, input, output, or power values associated with an analog object. This function is especially useful while writing testbenches and assertions for a design.

The cds_get_analog_value function is meant to be used only on objects belonging to a continuous domain. It can be called from within Verilog, Verilog-A, SystemVerilog (SV), or Verilog-AMS scope, and always returns a real number.

Following is the syntax of the cds_get_analog_value function.

real $cds_get_analog_value (hierarchical_name, [optional index, [optional quantity qualifier]])

Or

real $cgav (hierarchical_name, [optional index, [optional quantity qualifier]])

where,

If any of the above conditions is not satisfied, the behavior of the cds_get_analog_value function will be undefined. To test that these conditions are satisfied by the analog object being referenced and to create more reusable testbench code with failsafe behavior, you can use the following helper functions:




 ⠀
X