Virtual Signal Expressions in the Waveform


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.


The benefits of using expressions in the waveform are:

  • The ability to combine multiple signals and observe the result directly on the waveform without changing the source code

  • The ability to browse the relationship between signals i.e. recurring values on a changing bus

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


    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

Ask Us a Question
Ask Us a Question
Captcha ImageReload Captcha
Incorrect data entered.
Thank you! Your question has been submitted. Please allow 1-3 business days for someone to respond to your question.
Internal error occurred. Your question was not submitted. Please contact us using Feedback form.
We use cookies to ensure we give you the best user experience and to provide you with content we believe will be of relevance to you. If you continue to use our site, you consent to our use of cookies. A detailed overview on the use of cookies and other website information is located in our Privacy Policy.