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

strobe

The Tcl strobe command prints the values of specified VHDL, Verilog, or SystemC objects based on one of the following specifications:

The strobe command is a Tcl procedure that uses the stop command to set a condition, object, or time breakpoint and then, when the breakpoint triggers, executes a value command to print out the values of the specified objects in tabular format.

You can apply the strobe command to objects in the SystemC portion of the design that are derived from sc_signal, sc_port, sc_export, sc_in, sc_inout, sc_clock, and ncsc_viewable. You can only set one strobe at a time. Setting a new strobe automatically deletes the previous strobe.

By default, the simulator prints the values of the specified objects using the default format of the value command. You can specify a format for individual objects by enclosing the object-format pair in curly braces. For example:

xcelium> strobe -time 100 clk {data %b}

You can also set the strobeFmt variable to specify a global format. For example:

xcelium> set strobeFmt %b

If you interrupt or stop the simulation (with CTRL/C, an assert statement, or by running the simulation for a specified period of time, for example), and then continue the simulation, the simulator does not print the header in the tabular output. This is done so that if you send the output to a file with the -redirect option, the header does not appear in the output file every time you continue the simulation. However, if you are sending output to the screen, you might want to redisplay the header. To display the header again, set the strobeHeader variable to 1, as follows:

xcelium> set strobeHeader 1

The variable strobeTimeWidth can be used to control how much space is used to print the simulation time in the strobe output. By default, the value is 15. To change this, set the strobeTimeWidth variable before creating the strobe. For example:

xcelium> set strobeTimeWidth 25

The strobe command defines other Tcl variables that are internal to the operation of the command.

The following variables should not be changed:

If a strobe is already set, you must reset the strobe to the change to take effect.

strobe Command Syntax

strobe <strobe_specification> <object_list> [output_file_specification]
       -delete
       -help


strobe Command Options

This section describes the options that you can use with the Tcl strobe command.

<strobe_specification>

Specifies a condition for the strobe. Signal values are displayed when a specified condition is true (-condition), when a specified signal changes value (-object), or at a specified time interval (-time).

When using this command you must choose one of the three available methods to display signal values for simulation objects:


  • -condition <condition_specification>: Displays the values of the specified object(s) when the condition_specification is true.

    Set a breakpoint that triggers when any object referenced in the tcl_expression changes value (wires, signals, registers, and variables) or is written to (memories) and the expression evaluates to true (non-zero, non-x, non-z).


  • -object <object_specification>: Displays the values of the specified object(s) when the object specified by the object_specification argument changes value.

    With -object, you can specify only one object to monitor for a change in value. For example, the following command displays the values of y and z when x changes value.

    xcelium> strobe -object x y z


  • -time <time_specification>: Displays the values of the object(s) at the time interval specified by the time_specification argument.

    xcelium> strobe -time 100ns x y z

    xcelium> strobe -time 100ns x {y %b} z

object_list object

Refers to the signals the strobe is being applied to and the format is basically how to display the object such as in hex format and binary format.

output_file_specification
-redirect filename
[-append]

Saves output to the specified file. By default, the simulator prints the output of the strobe command to the screen.

The -redirect option redirects output to the specified file. By default, the simulator prints the output of the strobe command to the screen.

Include the -append option to append output to the file specified with the -redirect option.

-delete

Deletes the strobe.

-help

Displays help on the strobe command. You can also get help on the strobe command by using the help command.

strobe Command Examples

The following command prints the values of signals clk, clr, data, and q every 100 ns.

xcelium> strobe -time 100 clk clr data q
Setting up strobe time - '100'
xcelium> run
Time |clk |clr |data |q |
-----------------------------------------
100 NS |1'h1 |1'h1 |4'h0 |4'hx |
200 NS |1'h1 |1'h1 |4'h1 |4'h0 |
300 NS |1'h1 |1'h1 |4'h2 |4'h1 |
400 NS |1'h1 |1'h1 |4'h3 |4'h2 |
...

The following command prints the values of signals clk, clr, data (in binary), and q every 100 ns.

xcelium> strobe -time 100ns clk clr {data %b} q
Setting up strobe time - '100ns'

xcelium> run 300 ns
Time |clk |clr |data |q |

--------------------------------------------
100 NS |1'h1 |1'h1 |4'b0000 |4'hx |
200 NS |1'h1 |1'h1 |4'b0001 |4'h0 |
300 NS |1'h1 |1'h1 |4'b0010 |4'h1 |
Ran until 300 NS + 0 

In the following command sequence, the simulation is run for 300 ns. When the simulation is resumed, the strobe header is not displayed. The strobeHeader variable is then set to display the header when the simulation is resumed.

xcelium> strobe -time 100 clk clr data q
Setting up strobe time - '100'

xcelium> run 300
Time |clk |clr |data |q |

-----------------------------------------
100 NS |1'h1 |1'h1 |4'h0 |4'hx |
200 NS |1'h1 |1'h1 |4'h1 |4'h0 |
300 NS |1'h1 |1'h1 |4'h2 |4'h1 |
Ran until 300 NS + 0
xcelium> run 300
400 NS |1'h1 |1'h1 |4'h3 |4'h2 |

500 NS |1'h1 |1'h1 |4'h4 |4'h3 |
600 NS |1'h1 |1'h1 |4'h5 |4'h4 |
Ran until 600 NS + 0
xcelium> set strobeHeader 1
1

xcelium> run 300
Time |clk |clr |data |q |

----------------------------------------
700 NS |1'h1 |1'h1 |4'h6 |4'h5 |
800 NS |1'h1 |1'h1 |4'h7 |4'h6 |
900 NS |1'h1 |1'h1 |4'h8 |4'h7 |
Ran until 900 NS + 0

To change the format globally, you can set the strobeFmt variable, as shown in the following example. You must reset the strobe after setting the strobeFmt variable.

xcelium> strobe -time 100 clk clr data q
Setting up strobe time - '100'

xcelium> run 300
Time |clk |clr |data |q |

-----------------------------------------
100 NS |1'h1 |1'h1 |4'h0 |4'hx |
200 NS |1'h1 |1'h1 |4'h1 |4'h0 |
300 NS |1'h1 |1'h1 |4'h2 |4'h1 |
Ran until 300 NS + 0
xcelium> set strobeFmt %b
%b

xcelium> strobe -time 100 clk clr data q
Setting up strobe time - '100'

xcelium> run 300
Time |clk |clr |data |q |

-----------------------------------------------
400 NS |1'b1 |1'b1 |4'b0011 |4'b0010 |
500 NS |1'b1 |1'b1 |4'b0100 |4'b0011 |
600 NS |1'b1 |1'b1 |4'b0101 |4'b0100 |
Ran until 600 NS + 0

The following command displays the values of clk, clr, and q when data changes value.

xcelium> strobe -object data clk clr q
Setting up strobe object - 'data'
xcelium> run 300 ns
Time |clk |clr |q |
-----------------------------------
0 NS |1'h0 |1'h1 |4'hx |
100 NS |1'h1 |1'h1 |4'hx |
200 NS |1'h1 |1'h1 |4'h0 |
Ran until 300 NS + 0

The following command displays the values of data, clk, clr, and q when data changes value.

xcelium> strobe -object data data clk clr q
Setting up strobe object - 'data'
xcelium> run 300 ns
Time |data |clk |clr |q |
-----------------------------------------
0 NS |4'h0 |1'h0 |1'h1 |4'hx |
100 NS |4'h1 |1'h1 |1'h1 |4'hx |
200 NS |4'h2 |1'h1 |1'h1 |4'h0 |
Ran until 300 NS + 0

The following command displays value of UDN EEnet_net1 when EEnet_bus[0] changes value.

xcelium> strobe -object EEnet_bus[0]  EEnet_net1 
Setting up strobe object - 'EEnet_bus[0]'
xcelium> run 500 ns
Time            |EEnet_net1       |
-----------------------------------
0 NS            |'{V:4.9505, I:0, R:99.0099}    |
100 NS          |'{V:0, I:0.05, R:0}    |
150 NS          |'{V:3.33333, I:0, R:66.6667}   |
250 NS          |'{V:0, I:0.05, R:0}    |
300 NS          |'{V:3.33333, I:0, R:66.6667}   |
400 NS          |'{V:5, I:0, R:100}   |
450 NS          |'{V:0, I:0.05, R:0}    |

The following command displays value of  EEnet_net1  EEnet_bus[0] when EEnet_net1 changes value.

xcelium> strobe -object EEnet_net1  EEnet_net1  EEnet_bus[0]
Setting up strobe object - 'EEnet_net1'
xcelium> run 500 ns
Time    | EEnet_net1                    |{EEnet_bus[0]}   |
-----------------------------------------------------
0 NS    |'{V:4.9505, I:0, R:99.0099}  |'{V:4.85437, I:0, R:97.0874}                            | 
100 NS  |'{V:0, I:0.05, R:0}          |'{V:`wrealXState, I:0, R:`wrealZState}                       |
150 NS  |'{V:3.33333, I:0, R:66.6667} |'{V:2, I:0, R:40}  |
250 NS  |'{V:0, I:0.05, R:0}          |'{V:`wrealXState, I:0, R:`wrealZState}                       |
300 NS  |'{V:3.33333, I:0, R:66.6667} |'{V:2, I:0, R:40}  |
400 NS  |'{V:5, I:0, R:100}           |'{V:5, I:0, R:100  |
450 NS  |'{V:0, I:0.05, R:0}          |'{V:`wrealXState, I:0, R:`wrealZState}                       |

The following command displays the values of data (in binary), clk, clr, and q (in hex) when data changes value. Notice that the object-format pair is enclosed in curly braces.

xcelium> strobe -object data {data %b} clk clr q
Setting up strobe object - 'data'

xcelium> run 300 ns
Time |data |clk |clr |q |

--------------------------------------------
0 NS |4'b0000 |1'h0 |1'h1 |4'hx |
100 NS |4'b0001 |1'h1 |1'h1 |4'hx |
200 NS |4'b0010 |1'h1 |1'h1 |4'h0 |
Ran until 300 NS + 0

The following command displays the values of the specified signals when data has the value 3, decimal. The signal data is available from the top level of the hierarchy.

Verilog:

xcelium> strobe -condition {[value %d top.data] = 3} clk clr data q

VHDL:

xcelium> strobe -condition {[value %d :data] = 3} clk clr data q

If you are currently at the top level, you can omit the hierarchical path specification to data, and write the two commands shown in the previous example as follows:

xcelium> strobe -condition {[value %d data] = 3} clk clr data q

Instead of using the value command to get the value of data into the expression evaluator, you can use #data. Include the format specifier after the # sign.

xcelium> strobe -condition {#%ddata = 3} clk clr data q

The following command displays the values of the specified signals when data has the value 0010 (binary). For VHDL, you must enclose vectors in quotation marks.

Verilog:

xcelium> strobe -condition {#data = 4'b0010} clk clr data q

VHDL:

xcelium> strobe -condition {#data ="0010"} clk clr data q

The following command displays the values of the specified signals when bit 0 of data is 1. The expression is evaluated when any bit of data changes value. For VHDL, you must enclose singlebit entities in single quotation marks.

Verilog:

xcelium> strobe -condition {#data[0] == 1} clk clr data q

VHDL:

xcelium> strobe -condition {#data(0) == `1'} clk clr data q

The following command is identical to the previous command except that it uses an explicit value command to get the value of data (bit 0) into the expression parser.

Verilog:

xcelium> strobe -condition {[value %b data[0]] == 1'b1} clk clr data q

VHDL:

xcelium> strobe -condition {[value %b data(0)] == `1'} clk clr data q

The following command displays the values of the specified signals if the value of top.load has the value x. Notice that in the Tcl expression, the case-equality operator (===) is used.

For this operator, bits that are unknown are included in the comparison, and the result of the expression is always 1 (true) or 0 (false).

xcelium> strobe -condition {#top.load === 1'bx} clk clr data q

In the following command, the logical comparison operator ( = or ==) is used. These operators return the unknown value (x) if either operand is unknown. In a conditional expression, an unknown result is treated as false. Therefore, the following command does not stop the simulation when the signal has the value x.

xcelium> strobe -condition {#top.load == 1'bx} clk clr data q

Related Topic



 ⠀
X