Virtual Signal Expressions in the Waveform

Introduction

Users have the functionality to utilize expressions in the waveform and watch windows. An expression is a formula that combines operands and operators and produces the computation of a formula value. A number of operators are supported as well as the possibility of grouping elements of a formula. This allows users to build composite expressions. An expression can use different operators and operate on different types of operands. For more information about all possible operands and functions, please go to User’s Guide | HDL Debugging | Modifying Signal and Variable Values | Expressions under the Help menu.

Note: Virtual Signal Expression is available in Riviera-PRO only.

Benefits

The benefits of using expressions in the waveform are:

How to create an expression in a waveform

Users can create expressions in the waveform using the GUI or a script file. Users that are creating a large amount of expressions between different signals will find using a script much simpler than the GUI. Creating logical expressions using the GUI requires manual inputs from the user.

To create an expression in the GUI:

  1. Run the simulation

  2. In the Waveform Viewer, right-click in the signal Name column

  3. Select Create and then Expression

  4. Manually type the expression using the signal name and desired operator

  5. After hitting the Enter key, the value will be displayed in the Value column

    NOTES:

    1. If an incorrect syntax is used, the Value column will display an error message:

    2. The value will change with the cursor position

    To create an expression using a script file:

    Users creating a script file will need to add the -expr switch to the wave command. For example:

    wave -expr "in & out"
    wave -expr "in ~& out"
    wave -expr "in | out"
    wave -expr "in ~| out"
    wave -expr "in ^ out"
    wave -expr "in ~^ out"
    wave -expr ~in
    

    This will create signals in the waveform as shown below:

    Signal Properties

    The standard signal properties also apply to the expression signals.

    1. Right-click the expression signal and select Properties

    2. The Object Properties window will pop up

    3. Users can modify the settings, e.g. changing the Representation to Binary

    4. After selecting Apply and OK, the value for the expression signal should now be displayed in binary



Printed version of site: www.aldec.com/en/support/resources/documentation/articles/1643