get_value - 2020.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2020-11-18
Version
2020.2 English

Get current value of the selected HDL object (variable, signal, wire, reg)

Syntax

get_value [‑radix <arg>] [‑quiet] [‑verbose] <hdl_object>

Returns

Returns a string representation of value of a hdl_object

Usage

Name Description
[-radix] radix specifies the radix to use for printing the values of the hdl_objects. Allowed values are: default, dec, bin, oct,hex, unsigned, ascii, smag
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<hdl_object> The hdl_object to retrieve the current value

Categories

Simulation

Description

Get the value of a single HDL object at the current simulation run time.
Tip: Use the report_values command to return the values of more than one HDL objects.

HDL objects include HDL signals, variables, or constants as defined in the Verilog or VHDL test bench and source files. An HDL signal includes Verilog wire or reg entities, and VHDL signals. Examples of HDL variables include Verilog real, realtime, time, and event.

HDL constants include Verilog parameters and localparams, and VHDL generic and constants. The HDL scope, or scope, is defined by a declarative region in the HDL code such as a module, function, task, process, or begin-end blocks in Verilog. VHDL scopes include entity/architecture definitions, block, function, procedure, and process blocks.

Arguments

-radix <arg> - (Optional) Specifies the radix to use when returning the value of the specified object. Allowed values are: default, dec, bin, oct, hex, unsigned, ascii, or smag.
Note: The radix dec indicates a signed decimal. Specify the radix unsigned when dealing with unsigned data.
-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

<hdl_object> - (Required) Specifies a single HDL object to get the value of. The object can be specified by name, or can be returned as an object from the get_objects command.

Examples

The following example gets the value of the sysClk signal:
get_value sysClk  
   Z
This example shows the difference between the bin, dec, and unsigned radix on the value returned from the specified bus:
get_value -radix bin /test/bench_VStatus_pad_0_i[7:0]  
   10100101  
get_value -radix unsigned /test/bench_VStatus_pad_0_i[7:0]  
   165  
get_value -radix dec /test/bench_VStatus_pad_0_i[7:0]  
   -91