Timing Diagram Editing and Analysis

3.6 Symbolic State Names

3.6 Symbolic State Names

Previous topic Next topic  

3.6 Symbolic State Names

Previous topic Next topic  

Buses can display and export symbolic names instead of the normal numeric state values.

Display Symbolic Names with a User Defined Radix:

Select the Bus > Create User-Defined Radix menu to open the Create User-Defined Radix dialog.

CreateUserDefinedRadix_dlg

Add a Radix Name that will define the class of values (like Colors).

Add State Value and Translation pairs (like 3F Purple), and then close the dialog.

Double click on a signal name to open the Signal Properties dialog and set the Radix of the signal to the Radix that you just created. Now all the virtual values that match a state value will display the translation  instead of the numerical state value.

Exporting Symbolic Bus Values:

Symbolic names for bus state values can be exported to Verilog and System Verilog.

Select the ParameterLibs > Macro Substitution List menu to open the Edit Formula Macros dialog and define Name and Value pairs. For Example: Blue 55.

busstate_Edit_Formula_Macros

Next, double click on a waveform segment to open the Edit Bus State dialog and enter the back tick (not the single quote) and macro name into the Virtual box. For Example: `Blue.

When exporting to Verilog, there will be a `define Blue (55) at the top of the file, and down in the stimulus generation section, `Blue will be used instead of 55 state value.