Ug908 Vivado Programming Debugging
Ug908 Vivado Programming Debugging
User Guide
Revision History
The following table shows the revision history for this document.
Chapter 1: Introduction
Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Introduction
Getting Started
After successfully implementing your design, the next step is to run it in hardware by
programming the FPGA device and debugging the design in-system. All of the necessary
commands to perform programming of FPGA devices and in-system debugging of the
design are in the Program and Debug section of the Flow Navigator window in the
Vivado® Integrated Design Environment (IDE) (see Figure 1-1)
X-Ref Target - Figure 1-1
Figure 1-1: Program and Debug section of the Flow Navigator panel
Introduction
The hardware programming phase is broken into two steps:
1. Generating the bitstream data programming file from the implemented design.
2. Connecting to hardware and downloading the programming file to the target FPGA
device.
The Bitstream Settings button in the Flow Navigator and the Flow > Bitstream Settings
menu selection opens the Bitstream section in the Project Settings popup window (see
Figure 2-1). Once the bitstream settings are correct, the bitstream data file can be
generated using the write_bistream Tcl command or by using the Generate Bitstream
button in the Flow Navigator.
• -raw_bitfile: (Optional) Causes write_bitstream to write a raw bit file (.rbt) which
contains the same information as the binary bitstream file, but is in ASCII format. The
output file is named filename.rbt
• -mask_file: (Optional) Write a mask file (.msk), which has mask data where the
configuration data is in the bitstream file. This file determines which bits in the
bitstream should be compared to readback data for verification purposes. If a mask bit
is 0, that bit should be verified against the bitstream data. If a mask bit is 1, that bit
should not be verified. The output file is named file.msk.
• -no_binary_bitfile: (Optional) Do not write the binary bitstream file (.bit). Use this
command when you want to generate the ASCII bitstream or mask file, or to generate a
bitstream report, without generating the binary bitstream file.
• -logic_location_file: (Optional) Creates an ASCII logic location file (.ll) that shows the
bitstream position of latches, flip-flops, LUTs, Block RAMs, and I/O block inputs and
outputs. Bits are referenced by frame and bit number in the location file to help you
observe the contents of FPGA registers.
• -bin_file: (Optional) Creates a binary file (.bin) containing only device programming
data, without the header information found in the standard bitstream file (.bit).
• -reference_bitfile <arg>: (Optional) Read a reference bitstream file, and output an
incremental bitstream file containing only the differences from the specified reference
file. This partial bitstream file can be used for incrementally programming an existing
device with an updated design.
1. In the synthesized design, select the top-level design in the Netlist window.
2. In the Properties window, click the green “plus” sign to open the Add Properties dialog
box.
3. In the Add Properties dialog box, type BITSTREAM into the Search text field. Find and
select the desired BITSTREAM properties, then click OK. (see Figure 2-2).
4. In the Properties window, locate the BITSTREAM properties and set them to the desired
values (see Figure 2-3).
You can also set the bitstream properties using the set_property command in an XDC
file. For instance, here is an example on how to change the start-up DONE cycle property:
Additional examples and templates are provided in the Vivado Templates. Appendix A,
Device Configuration Bitstream Settings describes all of the device configuration settings.
5. In the Properties window, locate the BITSTREAM properties and set them to the
desired values (see Figure 2-3).
You can also set the bitstream properties using the set_property command in an XDC
file. For instance, here is an example on how to change the start-up DONE cycle property:
Additional examples and templates are provided in the Vivado Templates. Appendix A,
Device Configuration Bitstream Settings describes all of the device configuration settings.
• If you have a project open, click the Open Hardware Manager button in the Program
and Debug section of the Flow Navigator.
• Select the Flow > Hardware Manager menu option.
• In the Tcl Console window, run the open_hw command
• Use the Open Target selection under Hardware Manager in the Program and Debug
section of the flow navigator of the Vivado IDE to open new or recent hardware targets
(see Figure 2-4).
X-Ref Target - Figure 2-4
• Use the Open recent target or Open a new hardware target selections on the green
user assistance banner across the top of the Hardware Manager window to open
recent or new hardware targets, respectively (see Figure 2-5).
X-Ref Target - Figure 2-5
Figure 2-5: Using the User Assistance Bar to Open a Hardware Target
The Xilinx TCF Agent is called Hardware Server (hw_server). The list of compatible JTAG
download cables and devices that are supported by hw_server are:
• Digilent JTAG-SMT2
• Digilent JTAG-HS1
• Digilent JTAG-SMT1
The hw_server TCF agent is automatically started by vcse_server. However, you can
also start the hw_server manually. For instance, on Windows platforms, at a cmd prompt
run the following command:
C:\Xilinx\Vivado\vivado_release.version\bin\hw_server.bat
IMPORTANT: Vivado and vcse_server automatically try to connect to compatible JTAG targets
using the hw_server TCF agent.
If you want to connect to JTAG targets using the legacy CSE plug-ins, follow these instructions:
• In Vivado: Before using the Open New Hardware Target wizard in the Hardware
Manager, run the following command:
set_param labtools.use_hw_server false
• If launching vcse_server manually, use the following command line to disable the
launching of the hw_server TCF agent:
vcse_server -disable_tcf
Follow the steps in the next section to open a connection to a new hardware target using
this agent.
1. Specify or select the host name and port of the Vivado CSE server (also called
vcse_server) that is managing the hardware targets on the machine to which the target
board is connected (see Figure 2-6).
Note: If you use “localhost” or the hostname/IP address of the machine on which you are
running the Vivado tool as the host name, a vcse_server process automatically be starts on
that machine. This vcse_server is used in the subsequent panels of the wizard.
Note: If one or more of the devices is unknown to Vivado, you can provide the instruction register
(IR) length directly in the Hardware Devices table of the Open New Hardware Target wizard
(Figure 2-8).
X-Ref Target - Figure 2-8
IMPORTANT: Vivado and vcse_server automatically try to connect to compatible JTAG targets
using the hw_server TCF agent.
If you want to connect to JTAG targets using the legacy CSE plug-ins, follow these
instructions:
• In Vivado: Before using the Open New Hardware Target wizard in the Hardware
Manager, run the following command:
set_param labtools.use_hw_server false
• If launching vcse_server manually, use the following command line to disable the
launching of the hw_server TCF agent:
vcse_server -disable_tcf
3. Set the properties of the hardware target, such as the frequency of the TCK clock pin,
etc. Note that each type of hardware target may have different properties. Refer to the
documentation of each hardware target for more information about these properties.
the wizard, you can re-open a connection to a previously connected hardware target by
selecting the Open recent target link in the Hardware Manager window and selecting one
of the recently connected hardware server/target combinations in the list. You can also
access this list of recently used targets through the Open Target selection under Hardware
Manager in the Program and Debug section of the Vivado IDE flow navigator.
Once you finish opening a connection to a hardware target, the Hardware window is
populated with the hardware server, hardware target, and various hardware devices for the
open target (see Figure 2-9).
X-Ref Target - Figure 2-9
Figure 2-9: Hardware View after Opening a Connection to the Hardware Target
Note: As a convenience, Vivado IDE automatically uses the .bit file for the current implemented
design as the value for the Programming File property of the first matching device in the open
hardware target. This feature is only available when using the Vivado IDE in project mode. When
using the Vivado IDE in non-project mode, you need to set this property manually.
You can also use the set_property Tcl command to set the PROGRAM.FILE property of the
hardware device:
Once the progress dialog has indicated that the programming is 100% complete, you can
check that the hardware device has been programmed successfully by examining the DONE
status in the Hardware Device Properties view (see Figure 2-10).
X-Ref Target - Figure 2-10
If you use another means to program the hardware device (for instance, a flash device or
external device programmer such as the iMPACT tool), you can also refresh the status of a
hardware device by right-clicking the Refresh Device menu option or by running the
refresh_hw_device Tcl command. This refreshes the various properties for the device,
including but not limited to the DONE status.
close_hw_target {localhost/xilinx_tcf/Digilent/210203327463A}
disconnect_hw_server localhost
Launching iMPACT
The iMPACT tool lets you perform device configuration and file generation.
• Device Configuration lets you directly configure Xilinx FPGAs and PROMs with the JTAG
download cables (Xilinx Parallel Cable IV, Xilinx Platform Cable USB, Xilinx Platform
Cable USB II, or Digilent JTAG cables).
• Operating in Boundary-Scan mode, iMPACT can configure or program Xilinx FPGAs,
CPLDs, and PROMs.
• File generation enables you to create the following programming file types: System
ACE™ CF, PROM, SVF, STAPL, and XSVF files.
You can launch the iMPACT software tool directly from the Vivado IDE on any implemented
design on which the Generate Bitstream command has been run. To invoke iMPACT, in the
Flow Navigator, select Launch iMPACT.
The BIT bitstream file is passed automatically to iMPACT when launched from the Vivado
tool. For more information on using iMPACT, see the iMPACT Help.
IMPORTANT: To launch the iMPACT tool, the ISE Design Suite or ISE Lab Tools software needs to be
installed on your system and the iMPACT tool needs to be accessible in your PATH environment
variable. If you do not meet these two requirements, you will see the error dialog shown in Figure 2-11
when you try to launch the iMPACT tool.
Introduction
Debugging an FPGA design is a multistep, iterative process. Like most complex problems, it
is best to break the FPGA design debugging process down into smaller parts by focusing on
getting smaller sections of the design working one at a time rather than trying to get the
whole design to work at once. Iterating through the design flow by adding one module at
a time and getting it to function properly in the context of the whole design is one example
of a proven design and debug methodology. You can use this design and debug
methodology in any combination of the following design flow stages:
In general, the Vivado tool provides several different ways to debug your design. You can
use one or more of these methods to debug your design, depending on your needs.
Chapter 4, In-System Logic Design Debugging Flows focuses on the in-system logic
debugging capabilities of the Vivado IDE.
The Vivado tool provides the means to generate the design used to exercise the gigabit
transceiver endpoints as well as the run-time software to take measurements and help you
optimize your high-speed serial I/O channels. Chapter 7, In-System Serial I/O Debugging
Flows guides you through the process of generating the IBERT design. Chapter 8,
Debugging the Serial I/O Design in Hardware guides you through the use of the run time
Vivado serial I/O analyzer feature.
Introduction
The Vivado® tool provides many features to debug a design in-system in an actual
hardware device. The in-system debugging flow has three distinct phases:
1. Probing phase: Identifying what signals in your design you want to probe and how you
want to probe them.
2. Implementation phase: Implementing the design that includes the additional debug IP
that is attached to the probed nets.
3. Analysis phase: Interacting with the debug IP contained in the design to debug and
verify functional issues.
This in-system debug flow is designed to work using the iterative design/debug flow
described in the previous section. If you choose to use the in-system debugging flow, it is
advisable to get a part of your design working in hardware as early in the design cycle as
possible. The rest of this chapter describes the three phases of the in-system debugging
flow and how to use the Vivado® logic debug feature to get your design working in
hardware as quickly as possible.
In many cases, the decision you make on what signals to probe or how to probe them can
affect one another. It helps to start by deciding if you want to manually add the debug IP
component instances to your design source code (called the HDL instantiation probing
flow) or if you want the Vivado tool to automatically insert the debug cores into your
post-synthesis netlist (called the netlist insertion probing flow). Table 4-1 describes some of
the advantages and trade-offs of the different debugging approaches.
• The highest level is a simple wizard that creates and configures Integrated Logic
Analyzer (ILA) cores automatically based on the selected set of nets to debug.
• The next level is the main Debug window allowing control over individual debug cores,
ports and their properties. The Debug window can be displayed when the Synthesized
Design is open by selecting the Debug layout from the Layout Selector or the Layout
menu, or can be opened directly using Window > Debug.
• The lowest level is the set of Tcl XCD debug commands that you can enter manually
into an XDC constraints file or replay as a Tcl script.
You can also use a combination of the modes to insert and customize debug cores.
Note: In the Debug window, the Debug Nets view is a more net-centric view of nets that you have
selected for debug. The Debug Cores view is a more core-centric view where you can view and set
core properties.
The procedure for marking nets for debug depends on whether you are working with an RTL
source-based project or a synthesized netlist-based project. For an RTL netlist-based
project:
• Using the Vivado synthesis feature you can optionally mark HDL signals for debug
using the mark_debug constraint in VHDL and Verilog source files. The valid values for
the mark_debug constraint are “TRUE” or “FALSE”. The Vivado synthesis feature does
not support the “SOFT” value.
• Using Xilinx Synthesis Technology (XST) you can optionally mark nets for debug using
the mark_debug constraint in VHDL and Verilog sources. In addition to the boolean
string values of, “TRUE” or “FALSE,” a value of “SOFT” allows the software to optimize
the specified net, if possible.
• Using the Synopsys® Synplify® synthesis tool, you can optionally mark nets for debug
using the mark_debug and syn_keep constraints in VHDL or Verilog, or using the
mark_debug constraint alone in the Synopsys Design Constraints (SDC) file. Synplify
does not support the “SOFT” value, as this behavior is controlled by the syn_keep
attribute.
• Using the Mentor Graphics® Precision® synthesis tool, you can optionally mark nets
for debug using the mark_debug constraint in VHDL or Verilog.
The following subsections provide syntactical examples for Vivado synthesis, XST, Synplify,
and Precision source files.
IMPORTANT: Net names in an SDC source must be prefixed with the “n:” qualifier.
Note: Synopsys Design Constraints (SDC) is an accepted industry standard for communicating
design intent to tools, particularly for timing analysis. A reference copy of the SDC specification is
available from Synopsys by registering for the TAP-in program at:
http://www.synopsys.com/Community/Interoperability/Pages/TapinSDC.aspx
launch_runs synth_1
wait_on_run synth_1
You can also use the synth_design Tcl command to synthesize the design. Refer to the
Vivado Design Suite User Guide: Synthesis (UG901) [Ref 2] for more details on the various
ways you can synthesize your design.
• Selecting a net in any of the design views (such as the Netlist or Schematic windows),
then right-click select the Mark Debug option.
• Selecting a net in any of the design views, then dragging and dropping the nets into
the Unassigned Debug Nets folder.
• Using the net selector in the Set up Debug wizard (see Using the Set Up Debug Wizard
to Insert Debug Cores for details).
1. Optionally, select a set of nets for debugging either using the unassigned nets list or
direct net selection.
2. Select Tools > Set up Debug from the Vivado IDE main menu.
3. Click Next to get to the Specify Nets to Debug panel (see Figure 4-2).
4. Optionally, click Add/Remove Nets to add more nets or remove existing nets from the
table. You can also right-click a debug net and select Remove Nets to remove nets from
the table.
5. Right-click a debug net and select Select Clock Domain to change the clock domain to
be used to sample value on the net.
Note: The Set up Debug wizard attempts to automatically select the appropriate clock domain for
the debug net by searching the path for synchronous elements. Use the Select Clock Domain dialog
window to modify this selection as needed, but be aware that each clock domain present in the table
results in a separate ILA core instance.
6. Once you are satisfied with the debug net selection, click Next.
Note: The Set up Debug wizard inserts one ILA core per clock domain. The nets that were selected
for debug are assigned automatically to the probe ports of the inserted ILA cores. The last wizard
screen shows the core creation summary displaying the number of clocks found and ILA cores to be
created and/or removed.
7. If you want to enable either advanced trigger mode or basic capture mode, use the
corresponding check boxes to do so. Click Next to move to the last panel.
Note: The advanced trigger mode and basic capture mode features are described in more detail in
Chapter 5, Debugging Logic Designs in Hardware .
8. If you are satisfied with the results, click Finish to insert and connect the ILA cores in
your synthesized design netlist.
• Shows the list of debug cores that are connected to the Debug Hub (dbg_hub) core.
• Maintains the list of unassigned debug nets at the bottom of the window.
You can manipulate debug cores and ports from the popup menu or the toolbar buttons on
the top of the window.
To disconnect nets from the debug core port, select the nets that are connected to the
debug core port, and click Disconnect Net.
You can also change properties on the ILA debug core. For instance, to change the number
of samples captured by the ILA debug core (see Figure 4-6), do the following:
1. In the Debug window, select the desired ILA core (such as u_ila_0).
2. In the Cell Properties window, select the Debug Core Options view.
3. Using the C_DATA_DEPTH pull-down list, select the desired number of samples to be
captured.
1. Open the synthesized design netlist from the synthesis run called synth_1.
open_run synth_1.
IMPORTANT: The XDC commands in the following steps are only valid when a synthesized design
netlist is open.
4. Set the width of the clk port of the ILA core to 1 and connect it to the desired clock net.
set_property port_width 1 [get_debug_ports u_ila_0/clk]
connect_debug_port u_ila_0/clk [get_nets [list clk ]]
Note: You do not have to create the clk port of the ILA core because it is automatically created
by the create_debug_core command.
IMPORTANT: All debug port names of the debug cores are lower case. Using upper-case or mixed-case
debug port names will result in an error.
5. Set the width of the prob0 port to the number of nets you plan to connect to the port.
set_property port_width 1 [get_debug_ports u_ila_0/probe0]
Note: You do not have to create the first probe port (probe0) of the ILA core because it is
automatically created by the create_debug_core command.
6. Connect the probe0 port to the nets you want to attach to that port.
connect_debug_port u_ila_0/probe0 [get_nets [list A_or_B]]
7. Optionally, create more probe ports, set their width, and connect them to the nets you
want to debug.
create_debug_port u_ila_0 probe
set_property port_width 2 [get_debug_ports u_ila_0/probe1]
connect_debug_port u_ila_0/probe1 [get_nets [list {A[0]} {A[1]}]]
8. Optionally, generate and synthesize the debug cores so you can floorplan them with the
rest of your synthesized design.
implement_debug_core [get_debug_cores]
For more information on these and other related Tcl commands, type help –category
ChipScope in the Tcl Console of the Vivado IDE.
• create_debug_core
• create_debug_port
• connect_debug_port
• set_property (on any debug_core or debug_port object)
The corresponding XDC commands are saved to the target constraints file and are used
during implementation to insert and connect the debug cores.
IMPORTANT: Saving constraints to the target constraints file while in project mode causes the synthesis
and implementation steps to go out-of-date. However, you do not need to re-synthesize the design
since the debug XDC constraints are only used during implementation. You can force the synthesis step
up-to-date by selecting the Design Runs window, right-clicking the synthesis run (e.g., synth_1), and
selecting Force up-to-date.
Table 4-3: Debug Cores in Vivado IP Catalog available for use in the HDL Instantiation Probing
Flow
Debug Core Version Description Run Time Analyzer Tool
ILA (Integrated v3.0 Debug core that is used to Vivado logic analyzer
Logic Analyzer) trigger on hardware events
and capture data at system
speeds.
VIO (Virtual v3.0 Debug core that is used to Vivado logic analyzer
Input/Output) monitor or control signals in
a design at JTAG chain scan
rates.
JTAG-to-AXI Master v1.0 Debug core that is used to Vivado logic analyzer
generate AXI transactions to
interact with various AXI full
and AXI lite slave cores in a
system that is running in
hardware.
Table 4-4: Legacy ChipScope Pro Debug Cores available for use in the HDL Instantiation Probing
Flow
Debug Core Version Description Run Time Analyzer Tool
ICON (Integrated v1.06a Debug core hub used to ChipScope Pro Analyzer
Controller) connect the ILA 1.05a and
VIO 1.05a cores to the JTAG
chain.
VIO (Virtual v1.05a Debug core that is used to ChipScope Pro Analyzer
Input/Output) monitor or control signals in
a design at JTAG chain scan
rates. Requires connection to
an ICON core.
ILA (Integrated v1.05a Debug core that is used to ChipScope Pro Analyzer
Logic Analyzer) trigger on hardware events
and capture data at system
speeds. Requires connection
to an ICON core.
However, these cores are not available in the Vivado IP Catalog. You must supply the legacy
debug cores netlist (.ngc) file, synthesis (.v or .vhd) template file, and constraints
(.xdc) file that were previously generated using the Xilinx ISE CORE Generator as source
files in your Vivado project. You must also set properties on these files to make sure they
work properly in the Vivado tool flow. Here is an example of how to add legacy ICON, ILA,
and VIO files to your Vivado project:
• Import the .xdc files and specify that they are not used during synthesis.
import_files -fileset constrs_1 -force -norecurse {./icon_v1_06a.xdc}
import_files -fileset constrs_1 -force -norecurse {./ila_v1_05a.xdc}
import_files -fileset constrs_1 -force -norecurse {./vio_v1_05a.xdc}
set_property used_in_synthesis false [get_files icon_v1_06a.xdc]
set_property used_in_synthesis false [get_files vio_v1_05a.xdc]
set_property used_in_synthesis false [get_files ila_v1_05a.xdc]
• Scope the legacy ILA core's .xdc file to the cell reference for the ILA core module.
set_property SCOPED_TO_REF {ila_v1_05a} [get_files ila_v1_05a.xdc]
The new ILA core has two distinct advantages over the legacy ILA v1.x core:
• Works with the integrated Vivado logic analyzer feature (refer to Debugging Logic
Designs in Hardware, page 43).
• No ICON core instance or connection is required.
1. Customize and generate the ILA and/or VIO debug cores that have the right number of
probe ports for the signals you want to probe.
2. (Optional) Customize and generate the JTAG-to-AXI Master debug core and connect it
to an AXI slave interface of an AXI peripheral or interconnect core in your design.
3. Synthesize the design containing the debug cores.
4. (Optional) Modify debug hub core properties.
5. Implement the design containing the debug cores.
• For more information on customizing the ILA core, refer to LogiCORE IP Integrated
Logic Analyzer (ILA) v3.0 Datasheet (DS875) [Ref 7].
• For more information on customizing the VIO core, refer to LogiCORE IP Virtual
Input/Output (VIO) v3.0 Product Guide (PG159) [Ref 8].
• For more information on customizing the JTAG-to-AXI Master core, refer to LogiCORE
IP JTAG to AXI Master v1.0 Product Guide (PG174) [Ref 12].
After customizing the core, click the Generate button in the IP customization wizard. This
generates the customized debug core and add it to the Sources view of your project.
X-Ref Target - Figure 4-7
ila_v3_0 i_ila
(
.clk(clk),
.probe0(counterA),
.probe1(counterB),
.probe2(counterC),
.probe3(counterD),
.probe4(A_or_B),
.probe5(B_or_C),
.probe6(C_or_D),
.probe(D_or_A)
);
Note: Unlike the l egacy VIO and ILA v1.x cores, the new ILA core instance does not require a connection to
an ICON core instance. Instead, a debug_core_hub debug core is automatically inserted into the synthesized
design netlist to provide connectivity between the new ILA core and the JTAG scan chain.
launch_runs synth_1
wait_on_run synth_1
You can also use the synth_design Tcl command to synthesize the design. Refer to Vivado
Design Suite User Guide: Synthesis (UG901) [Ref 2] for more details on the various ways you
can synthesize your design.
Figure 4-8: Debug Window Showing ILA Core and Debug Core Hub
Changing the BSCAN User Scan Chain of the Debug Core Hub
You can view and change the BSCAN user scan chain index of the debug core hub by
selecting the dbg_hub in the Debug window, selecting the Debug Core Options view in
the Properties window, then changing the value of the C_USER_SCAN_CHAIN property
(see Figure 4-9).
IMPORTANT: If you plan to mix legacy ICON, ILA, and/or VIO v1.x cores with new ILA cores, you need
to set the C_USER_SCAN_CHAIN property of the debug_core_hub to a user scan chain that does not
conflict with the ICON v1.x core’s Boundary Scan Chain setting. Failure to do so results in errors later
in the implementation flow.
Figure 4-9: Changing the User Scan Chain Property of the Debug Core Hub
• Click the Implement Debug Cores icon on the toolbar menu of the Debug window.
• Right-click on any debug core in the Debug window and select the Implement Debug
Cores option from the popup menu.
The Vivado IDE generates and synthesizes each black box debug core. This operation can
take some time. A progress indicator shows that the operation is running. When the debug
core implementation is complete, the debug core black boxes are resolved and you can
access the generated instances.
launch_runs impl_1
wait_on_run impl_1
You can also implement the design using the implementation commands opt_design,
place_design, and route_design. Refer to the Vivado Design Suite User Guide:
Implementation (UG904) [Ref 3] for more details on the various ways you can implement
your design.
Introduction
Once you have the debug cores in your design, you can use the run time logic analyzer
features to debug the design in hardware. Two different tools can be used depending on
the type of debug cores in your design:
• ChipScope™ Pro Analyzer: used with ICON v1.x, ILA v1.x, VIO v1.x, and IBERT v2.x debug
cores.
• Vivado® logic analyzer feature: used with new ILA v3.x, VIO v3.x, JTAG-to-AXI Master,
and IBERT 7 Series GTH/GTP/GTX/GTZ v3.x debug cores.
If you have a mixture of ICON/ILA/VIO v1.x and new ILA/VIO/JTAG-to-AXI Master debug
cores in your design, you can simultaneously use both the ChipScope Pro Analyzer tool and
Vivado logic analyzer feature to debug the same design running on the same hardware
target board (see section called Using Vivado Logic Analyzer to Debug the Design, page 44
for more details).
IMPORTANT: The ChipScope Pro and iMPACT tools are not included in the Vivado Design Suite
installation. However, these tools are available in an installation package called the ISE Design Suite:
Standalone Lab Tools that is freely downloadable from the Xilinx Download site at
http://www.xilinx.com/downloads.
• Use the Flow > Launch ChipScope Analyzer command from the main menu
• Run the launch_chipscope_analyzer Tcl command in the Tcl Console
The Vivado IDE passes the BIT bitstream and CDC net connection name files automatically
to the ChipScope Pro Analyzer tool. For more information about ChipScope Pro Analyzer
see the Xilinx website,http:
http://www.xilinx.com/support/index.html/content/xilinx/en/supportNav/design_tools/chi
pscope_pro.html
The steps to debug your design in hardware using an ILA debug core are:
1. Connect to the hardware target and program the FPGA device with the .bit file
2. Set up the ILA debug core trigger and capture controls.
3. Arm the ILA debug core trigger.
4. View the captured data from the ILA debug core in the Waveform window.
5. Use the VIO debug core to drive control signals and/or view design status signals.
6. Use the JTAG-to-AXI Master debug core to run transactions to interact with various AXI
slave cores in your design.
that were detected when scanning the device (see Figure 5-1).
X-Ref Target - Figure 5-1
Figure 5-1: Hardware Window Showing the ILA and VIO Debug Cores
For more information on using the ILA core, refer to Setting up the ILA Core to Take a
Measurement, page 45. For more information on using the VIO core, refer to Setting up the
ILA Core to Take a Measurement.
Note: If you still do not see the ILA core after programming and/or refreshing the FPGA device,
check to make sure the device was programmed with the appropriate .bit file and check to make
sure the implemented design contains an ILA core. Also, check to make sure the appropriate .ltx
probes file that matches the .bit file is associated with the device.
Click the ILA core (called hw_ila_1 in Figure 5-1) to see its properties in the ILA Core
Properties window. By selecting the ILA core, you should also see the probes
corresponding to the ILA core in the Debug Probes window as well as the corresponding
ILA Dashboard in the Vivado IDE workspace (see, Selection of the ILA Core in Various
ViewsFigure 5-2, page 46).
TIP: Tip: if you right-click on the ILA core object in the Debug Probes or Hardware window and select
one of the Add Probes… options, the selection option will apply to all probes that belong to that ILA
core.
Normally, the debug probes file is automatically created during the implementation
process. However, you can also use the write_debug_probes Tcl command to write out
the debug probes information to a file:
You can also set the location using the following Tcl commands to associate a debug probes
file called C:\myprobes.ltx with the first device on the target board:
You can use the ILA Dashboard to interact with the ILA debug core in several ways:
• Use BASIC and ADVANCED trigger modes to trigger on various events in hardware.
• Enable or disable trigger input and output behavior.
• Use ALWAYS and BASIC capture modes to control filtering of data to be captured.
You can also use the set_property Tcl command to change the trigger mode of the ILA
core. For instance, to change the trigger mode of ILA core hw_ila_1 to BASIC, use the
following command:
Note: You can drag-and-drop the first probe anywhere in the Basic Trigger Setup window, but you
must drop the second and subsequent probes on top of the first probe. The new probe is always
added above the previously added probe in the table. You can also use drag-and-drop operations in
this manner to re-arrange probes in the table.
IMPORTANT: Only probes that are in the Basic Trigger Setup window participate in the trigger
condition. Any probes that are not in the window are set to "don't care" values and are not used as part
of the trigger condition.
You can remove probes from the Basic Trigger Setup window by selecting the probe and
hitting the Delete key or by right-click selecting the Remove option.
1. Operator: This is the comparison operator that you can set to the following values:
° == (equal)
° != (not equal)
2. Radix: This is the radix or base of the Value that you can set to the following values:
° "[B] Binary
° [H] Hexadecimal
° [O] Octal
° [A] ASCII
° Binary
- 0: logical zero
- 1: logical one
- X: don't care
- R: rising or low-to-high transition
- F: falling or high-to-low transition
- B: either low-to-high or high-to-low transitions
- N: no transition (current sample value is the same as the previous value)
° Hexadecimal
- X: All bits corresponding to the value string character are "don't care" values
- 0-9: Values 0 through 9
- A-F: Values 10 through 15
° Octal
- X: All bits corresponding to the value string character are "don't care" values
- 0-7: Values 0 through 7
° ASCII
- Any string made up of ASCII characters
° Unsigned Decimal
- Any non-negative integer value
° Signed Decimal
- Any integer value
IMPORTANT: If the ILA core has two or more debug probes that concatenated together to share a single
physical probe port of the ILA core, then only the "Global AND" (AND) and "Global NAND" (NAND)
trigger condition settings are supported. The "Global OR" (OR) and "Global NOR" (NOR) functions are
not supported due to limitations of the probe port comparator logic. If you want to use the "Global OR"
(OR) or "Global NOR" (NOR) trigger condition settings, then make sure you assign each unique net or
bus net to separate probe ports of the ILA core.
If the ILA core in the design that is running in the hardware device has advanced trigger
capabilities, the advanced trigger mode features can be enabled by setting the Trigger
mode control in the ILA Properties window of the ILA Dashboard to ADVANCED.
1. A new control called Trigger State Machine appears in the ILA Properties window
2. The Basic Trigger Setup window is replaced by a Trigger State Machine code editor
window.
If you are specifying an ILA trigger state machine program for the first time, the Trigger
State Machine code editor window will appear as the one shown in Figure 5-8.
To create a new trigger state machine, click the Create new trigger state machine link,
otherwise click the Open existing trigger state machine link to open a trigger state
machine program file (.tsm extension). You can also open an existing trigger state machine
program file using the Trigger state machine text field and/or browse button in the ILA
Properties window of the ILA Dashboard.
The simple default trigger state machine program is designed to be valid for any ILA core
configuration regardless of debug probe or trigger settings. This means that you can click
the Run Trigger for the ILA core without modifying the trigger state machine program.
However, it is likely that you will want to modify the trigger state machine program to
implement some advanced trigger condition. The comment block at the top of the simple
state machine shown in Figure 5-9 gives some instructions on how to use the built-in
language templates in the Vivado IDE to construct a trigger state machine program (see
Figure 5-10, page 55). A full description of the ILA trigger state machine language,
including examples, is found in the section of this document called Appendix B, Trigger
State Machine Language Description.
• ALWAYS: store a data sample during a given clock cycle regardless of any capture
conditions
• BASIC: store a data sample during a given clock cycle only if the capture condition
evaluates "true"
You can also use the set_property Tcl command to change the capture mode of the ILA
core. For instance, to change the capture mode of ILA core hw_ila_1 to BASIC, use the
following command:
• For information on adding probes to the Basic Capture Setup window, refer to the
section called Adding Probes to Basic Trigger Setup Window, page 49.
• For information on setting the compare values on each probe in the Basic Capture
Setup window, refer to the section called ILA Probe Compare Value Settings, page 50
• For information on setting the basic capture condition in the Basic Capture Setup
window, refer to the section called Setting Basic Trigger Condition, page 52. One key
difference is the ILA core property used to control the capture condition is called
CONTROL.CAPTURE_CONDITION.
• Sample number 0 corresponds to the first (left-most) sample in the captured data
buffer.
• Sample number 1023 corresponds to the last (right-most) sample in the captured data
buffer.
• Samples numbers 511 and 512 correspond to the two "center" samples in the captured
data buffer.
You can also use the set_property Tcl command to change the ILA core trigger position:
Note: Refer to the section called Modifying Properties on the Debug Cores, page 32 for more details
on how to set the maximum capture buffer data depth on ILA cores that are added to the design
using the Netlist Insertion probing flow.
You can also use the set_property Tcl command to change the ILA core data depth:
• Run Trigger: Selecting the ILA core(s) to be armed followed by clicking the Run
Trigger button on the ILA Dashboard or Hardware window toolbar arms the ILA core
to detect the trigger event that is defined by the ILA core basic or advanced trigger
settings.
• Run Trigger Immediate: Selecting the ILA core(s) to be armed followed by clicking the
Run Trigger Immediate button on the ILA Dashboard or Hardware window toolbar
arms the ILA core to trigger immediately regardless of the ILA core trigger settings.
This command is useful for detecting the "aliveness" of the design by capturing any
activity at the probe inputs of the ILA core.
You can also arm the trigger by selecting and right-clicking on the ILA core and selecting
Run Trigger or Run Trigger Immediate from the popup menu (see Figure 5-12).
TIP: You can run or stop the triggers of multiple ILA cores by selecting the desired ILA cores, then using
the Run Trigger, Run Trigger Immediate, or Stop Trigger buttons in the Hardware window toolbar.
You can also run or stop the triggers of all ILA cores in a given device by selecting the device in the
Hardware window and click the appropriate button in the Hardware window toolbar.
• In the Hardware window Status column of the row(s) corresponding to the ILA debug
core(s).
• In the Trigger Capture Status window of the ILA Dashboard.
The Status column in the Hardware window indicates the current state or status of each ILA
core (see Table 5-2, page 59).
The contents of the Trigger Capture Status window in the ILA Dashboard depend on the
Trigger Mode setting of the ILA core.
• Core status: indicates the status of the ILA core trigger/capture engine (see Table 5-2
for a description of the status indicators)
• Capture sample count: indicates the current number of samples captured by the ILA
core. This number is reset to 0 once the ILA core status is Idle.
• Core status: indicates the status of the ILA core trigger/capture engine (see Table 5-2,
page 59 for a description of the status indicators)
• Trigger State Machine Flags: indicates the current state of the four trigger state
machine flags.
• Trigger State: when the core status is Waiting for Trigger, this field indicates the
current state of the trigger state machine.
• Capture sample count: indicates the current number of samples captured by the ILA
core. This number is reset to 0 once the ILA core status is Idle.
Normally, the ILA probe file is automatically created during the implementation process.
However, you can also use the write_debug_probes Tcl command to write out the debug
probes information to a file:
You can also set the location using the set_property Tcl command:
This Tcl command sequence uploads the captured data from the ILA core and writes it to an
archive file called my_hw_ila_data_file.zip. The archive file contains the waveform
database file, the waveform configuration file, a waveform comma separated value file, and
a debug probes file.
This Tcl command sequence reads the previously saved captured data from the ILA core and
displays it in the waveform window.
Note: The waveform configuration settings (dividers, markers, colors, probe radices, etc.) for the ILA
data waveform window is also saved in the ILA captured data archive file. Restoring and displaying
any previously saved ILA data uses these stored waveform configuration settings.
Note: If you still do not see the VIO core after programming and/or refreshing the FPGA device,
check to make sure the device was programmed with the appropriate .bit file and check to make
sure the implemented design contains an VIO core. Also, check to make sure the appropriate .ltx
probes file that matches the .bit file is associated with the device.
Click the VIO core (called hw_vio_1 in Figure 5-15) to see its properties in the VIO Core
Properties window. By selecting the VIO core, you should also see the probes
corresponding to the VIO core in the Debug Probes window as well as the corresponding
VIO Dashboard in the Vivado IDE workspace (see Figure 5-16).
X-Ref Target - Figure 5-15
The VIO core can become out-of-sync with the Vivado IDE. Refer to Viewing the VIO Core
Status, page 63 for more information on how to interpret the VIO status indicators.
The VIO core operates on an object property-based set/commit and refresh/get model:
• To read VIO input probe values, first refresh the hw_vio object with the VIO core values.
Observe the input probe values by getting the property values of the corresponding
hw_probe object. Refer to the section called Interacting with VIO Core Input Probes,
page 66 for more information.
• To write VIO output probe values, first set the desired value as a property on the
hw_probe object. These property values are then committed to the VIO core in
hardware in order to write these values to the output probe ports of the core. Refer to
the section called Interacting with VIO Core Output Probes, page 69 for more
information.
in the Hardware window is used to indicate the current state of the VIO core output probes.
The possible status values and any action that you need to take are described in Table 5-3.
TIP: If you right-click the VIO core object in the Debug Probes or Hardware window and select the
Add Probes to VIO Window option, the selection option will apply to all probes that belong to that
VIO core.
Note: Setting the refresh rate to 0 causes all automatic refreshes from the VIO core to stop. Also
note that very small refresh values may cause your Vivado IDE to become sluggish. Xilinx
recommends a refresh rate of 500 ms or longer.
If you want to manually read a VIO input probe value, you can use Tcl commands to do so.
For instance, if you wanted to refresh and get the value of the input probe called
BUTTON_IBUF of the VIO core hw_vio_1, run the following Tcl commands:
• Text to display the input as a text field. This is the only display type for VIO input probe
vectors (more than one bit wide).
• LED to display the input as a graphical representation of a light-emitting diode (LED).
This display type is only applicable to VIO input probe scalars and individual elements
of VIO input probe vectors. You can set the high and low values to one of four colors:
° Gray (off)
° Red
° Green
° Blue
When the display type of the VIO input probe is set to Text, you can change the radix by
right-clicking a VIO input probe in the VIO Probes window of the VIO Dashboard window
and selecting:
You can also set the radix of the VIO input probe using a Tcl command. For instance, to
change the radix of a VIO input probe called “BUTTON_IBUF”, run the following Tcl
command:
The VIO input probe activity values are shown as arrows in the activity column of the VIO
Probes window of the VIO Dashboard window:
• An up arrow indicates that the input probe value has transitioned from a 0 to a 1 during
the activity persistence interval.
• A down arrow indicates that the input probe value has transitioned from a 1 to a 0
during the activity persistence interval.
• A double-sided arrow indicates that the input probe value has transitioned from a 1 to
a 0 and from a 0 to a 1 at least once during the activity persistence interval.
The persistence of how long the input activity status is displayed can be controlled by
right-clicking a VIO input probe in the VIO Probes window of the VIO Dashboard window
and selecting:
• Activity Persistence > Infinite to accumulate and retain the activity value until you
reset it.
• Activity Persistence > Long (80 samples) to accumulate and retain the activity for a
longer period of time.
• Activity Persistence > Short (8 samples) to accumulate and retain the activity for a
shorter period of time.
You can also set the activity persistence using a Tcl command. For instance, to change the
activity persistence on the VIO input probe called BUTTON_IBUF to a long interval, run the
following Tcl command:
The activity for all input probes for a given core can be reset by right-clicking the VIO core
in the Hardware window and selecting Reset All Input Activity. You can also do this by
running the following Tcl command:
TIP: You can change the type, radix, and/or activity persistence of multiple scalar members of a VIO
input probe vector by right-clicking the whole probe or multiple members of the probe, then making a
menu choice. The menu choice applies to all selected probe scalars.
Figure 5-20: VIO Outputs in the VIO Probes window of the VIO Dashboard
You can also write out a new value to the VIO core using Tcl commands. For instance, if you
wanted to write a binary value of “11111” to the VIO output probe called
vio_slice5_fb_2 whose radix is already set to BINARY, run the following Tcl commands:
• Text to display the output as a text field. This is the only display type for VIO input
probe vectors (more than one bit wide).
When the display type of the VIO output probe is set to “Text”, you can change the radix by
right-clicking a VIO output probe in the VIO Cores tabbed view of the Debug Probes
window and selecting:
You can also set the radix of the VIO output probe using a Tcl command. For instance, to
change the radix of a VIO output probe called “vio_slice5_fb_2” to hexadecimal, run the
following Tcl command:
Note: Resetting the VIO output probes to their initial values may cause the output probe values to
become out-of-sync with the Vivado IDE. Refer to the section called Synchronizing the VIO Core
Output Values to the Vivado IDE on how to handle this situation.
• Write the values from the Vivado IDE to the VIO core by right-clicking the VIO core in
the Hardware window and selecting the Commit VIO Core Outputs option. You can
also do this running a Tcl command:
commit_hw_vio [get_hw_vios {hw_vio_1}]
• Update the Vivado IDE with the current values of the VIO core output probe ports by
right-clicking the VIO core in the Hardware window and selecting the Refresh Input
and Output Values from VIO Core option. You can also do this running a Tcl
command:
refresh_hw_vio -update_output_values 1 [get_hw_vios {hw_vio_1}]
The JTAG-to-AXI Master (JTAG-AXI) cores that you add to your design appear in the
Hardware window under the target device. If you do not see the JTAG-AXI cores appear,
right-click on the device and select Refresh Hardware. This re-scans the FPGA device and
refreshes the Hardware window.
Note: If you still do not see the ILA core after programming and/or refreshing the FPGA device,
check to make sure the device was programmed with the appropriate .bit file and check to make
sure the implemented design contains an ILA core.
Click to select the JTAG-AXI core (called hw_axi_1 in Figure 1) to see its properties in the AXI
Core Properties window.
where:
The next step is to run the transaction that was just created using the run_hw_axi
command. Here is an example on how to do this:
The last step is to get the data that was read as a result of running the transaction. You can
use either the report_hw_axi_txn or report_property commands to print the data to the
screen or you can use the get_property to return the value for use elsewhere.
0 00000000 00000000
8 00000000 00000000
Here is an example on how to create a 4-word AXI write burst transaction from address 0:
create_hw_axi_txn write_txn [get_hw_axis hw_axi_1] -type READ -address 00000000 -len 4 -data
{11111111_22222222_33333333_44444444}
where:
The next step is to run the transaction that was just created using the run_hw_axi
command. Here is an example on how to do this:
• Install and run the full Vivado IDE on your lab machine.
• Install latest version of the Vivado Design Suite on your lab machine, and use the
Vivado logic analyzer feature on your local machine to connect to a remote instance of
the Vivado CSE Server (vcse_server).
IMPORTANT: The Vivado logic analyzer is only compatible with the Vivado CSE server (vcse_server.exe
on Windows platforms or vcse_server on Linux platforms) and is not compatible with the legacy CSE
server (cse_server.exe on Windows platforms or cse_server on Linux platforms) that is installed as part
of the ISE Lab Tools. The legacy CSE server application is only compatible with the legacy ChipScope Pro
Analyzer tool. The Vivado logic analyzer only needs two files from the original project: the bitstream
programming (.bit) file and the probes (.ltx) file.
Here are the steps to use the Vivado logic analyzer feature on a lab machine.
1. Install the latest version of the Vivado Design Suite on the lab machine.
IMPORTANT: You do NOT need any software licenses to run any of the Hardware Manager features of
the Vivado tools (such as the Vivado logic analyzer or Vivado serial I/O analyzer features).
2. Start up the vcse_server application on the remote lab machine. Assuming you installed
the Vivado Design Suite to the default location and your lab machine is a 64-bit
Windows machine, here is the command line:
C:\Xilinx\Vivado\vivado_release.version\bin\vcse_server.bat -port 60001
3. Start Vivado IDE in GUI mode on a different machine than your lab machine.
4. Follow the steps in the Connecting to the Hardware Target and Programming the FPGA
Device section to open a connection to the target board that is connected to your lab
machine. However, instead of connecting to a Vivado CSE server running on localhost,
use the host name of your lab machine.
5. Follow the steps in the Setting up the ILA Core to Take a Measurement section and
beyond to debug your design in hardware.
• You have a design that contains a new ILA debug core and a legacy VIO v1.x debug
core that you need to interact with using the Vivado logic analyzer feature and
ChipScope Pro Analyzer feature, respectively.
• You want to interact with a new ILA debug core in your design using the Vivado logic
analyzer feature and you want to monitor the XADC temperature or voltage sensors
using the ChipScope Pro Analyzer tool’s System Monitor feature.
• You have a 7 series device and a 6 series device that you need to debug at the same
time using the Vivado logic analyzer feature and the ChipScope Pro Analyzer feature,
respectively.
This section covers the first case of having both a new ILA debug core and a legacy VIO v1.x
debug core in the same design. The steps that you need to follow to take advantage of this
capability are:
1. Use two separate BSCAN user scan chains, one for each JTAG controller core.
2. Start two separate CSE servers, one for each run time analyzer applications.
3. Use two different run time analyzer applications, the Vivado logic analyzer feature and
ChipScope Pro Analyzer tool.
1. Make sure the latest version of the Vivado Design Suite and ISE Lab Tools are installed
on the lab machine. This example assumes that ISE Lab Tools and Vivado Design Suite
are both installed in their default locations.
2. Open the first cmd window and run the following to start the Vivado CSE server.
C:\Xilinx\Vivado\vivado_release.version\bin\vcse_server.bat –port 60001
3. Open the second cmd window and run to start the legacy CSE server.
C:\Xilinx\ise_release.version\LabTools\LabTools\bin\nt64\cse_server –port 50001
The Vivado CSE server running on port 60001 and the legacy CSE server running on port
50001 is used by the Vivado logic analyzer feature and ChipScope Pro Analyzer tool,
respectively.
5. In the ChipScope Pro Analyzer tool, select JTAG Chain > Server Host Setting. Change
the server to localhost:50001 (see Figure 5-22 )
X-Ref Target - Figure 5-22
Figure 5-22: Changing the ChipScope Pro Analyzer Server Host Settings
6. In the ChipScope Pro Analyzer, connect to the target board by using the JTAG Chain >
Open Plug-in menu option set to xilinx_tcf (see Figure 5-23).
X-Ref Target - Figure 5-23
IMPORTANT: The ChipScope Pro Analyzer can only handle a single JTAG target plugged into the
machine when using the xilinx_tcf plug-in.
7. Use each of the run time analyzer tools to interact with their respective debug cores (see
Figure 5-24 ).
X-Ref Target - Figure 5-24
Figure 5-24: Using Vivado Logic Analyzer Feature and ChipScope Pro Analyzer
Tool to Debug the Design
For more information about the hardware manager commands, run the help –category
hardware Tcl command in the Tcl Console.
• One KC705 board’s Digilent JTAG-SMT1 cable (serial number 12345) accessible via a
Vivado CSE server running on localhost:60001.
• Single ILA core in a design running in the XC7K325T device on the KC705 board.
• ILA core has a probe called counter[3:0].
# Arm the ILA trigger and wait for it to finish capturing data
run_hw_ila hw_ila_1
wait_on_hw_ila hw_ila_1
# Upload the captured ILA data, display it, and write it to a file
current_hw_ila_data [upload_hw_ila_data hw_ila_1]
display_hw_ila_data [current_hw_ila_data]
write_hw_ila_data my_hw_ila_data [current_hw_ila_data]
Introduction
With the Vivado™ Integrated Design Environment (IDE) simulator open, you can begin
working with the waveform to analyze your design and debug your code. The Vivado®
logic analyzer populates design data in other areas, such as the Hardware and the ILA
Debug Probes windows.
• The wave configuration is an object that is loaded into memory with which you can
work.
• The WCFG file is the saved form of a wave configuration on disk.
A wave configuration can have a name or be "Untitled#". The name shows on the view of
the Wave Configuration window.
IMPORTANT: Before opening a WCFG file, you must have a waveform window open that contains ILA
probes in it, otherwise you get an error.
A new waveform window appears showing the captured ILA probe data using the waveform
configuration contained in the WCFG file that was just opened.
Note: You now have two waveform windows showing the same data: one waveform window that
uses the original waveform configuration, and a second waveform window that uses the newly
opened waveform configuration. The underlying waveform data is the same in both windows. You
can safely close the original waveform window if you want to continue to use the newly opened
waveform configuration.
Note: When you open a WCFG file that contains references to hw_probe objects that are not present
in an ILA core, the Vivado logic analyzer ignores those hw_probe objects and omits them from the
loaded waveform configuration.
IMPORTANT: When saving the waveform configuration to a WCFG file, make sure you select a
directory location other than the <project>/.Xil directory. This is a temporary directory whose
contents are deleted when Vivado exits. You will lose your WCFG file if you store it in this location
The ILA probes display with a corresponding identifying button. You can hover the mouse
over the button for a description. Figure 6-1 is an example of ILA probes in the Waveform
Configuration window.
X-Ref Target - Figure 6-1
The ILA probes display with an ID Number, Name, and Value. The toolbar buttons on the
left give you access to navigation features that are described in the following sections.
1. In the ILA Cores view of the Debug Probes window, expand the desired ILA core, and
select a probe.
2. Right-click, and select Add Probes to Waveform window from the popup menu.
You can add copies of the same signal or bus in a wave configuration for comparing
waveforms. You can place copies of the same signal or bus anywhere in the wave
configuration, such as in groups or virtual buses.
The signal or bus is now copied to the wave configuration. You can move the signal or bus
using drag and drop as needed.
Cursors
Cursors are used primarily for temporary indicators of sample position and are expected to
be moved frequently, as in the case when you are measuring the distance (in samples)
between two waveform edges.
TIP: For more permanent indicators, used in situations such as establishing a time-base for multiple
measurements, add markers to the Wave window instead. See Markers, page 88 for more information.
You can place the main cursor with a single click in the Waveform window.
To place a secondary cursor, Ctrl+Click and hold the waveform, and drag either left or right.
You can see a flag that labels the location at the top of the cursor.
Alternatively, you can hold the SHIFT key and click a point in the waveform. The main cursor
remains the original position, and the other cursor is at the point in the waveform that you
clicked.
Note: To preserve the location of the secondary cursor while positioning the main cursor, hold the
Shift key while clicking. When placing the secondary cursor by dragging, you must drag a minimum
distance before the secondary cursor appears.
To move a cursor, hover over the cursor until you see the grab symbol, and click and drag
the cursor to the new location.
As you drag the cursor in the Waveform window, you see a hollow or filled-in circle if the
Snap to Transition button is selected, which is the default behavior.
• A hollow circle indicates that you are between transitions in the waveform of the
selected signal.
• A filled-in circle indicates that you are hovering over the waveform transition of the
selected signal. A secondary cursor can be hidden by clicking anywhere in the
Waveform window where there is no cursor, marker, or floating ruler.
Markers
Use a marker when you want to mark a significant event within your waveform in a
permanent fashion. Markers allow you to measure distance (in samples) relevant to that
marked event.
• You add markers to the wave configuration at the location of the main cursor.
a. Place the main cursor at the sample number where you want to add the marker by
clicking in the Waveform window at the sample number or on the transition.
b. Select Edit > Markers > Add Marker, or click the Add Marker button.
A marker is placed at the cursor, or slightly offset if a marker already exists at the
location of the cursor. The sample number of the marker displays at the top of the line.
• You can move the marker to another location in the waveform using the drag and drop
method. Click the marker label (at the top of the marker) and drag it to the location.
° The drag symbol indicates that the marker can be moved. As you drag the
marker in the Waveform window, you see a hollow or filled-in circle if the Snap to
Transition button is selected, which is the default behavior.
° A filled-in circle indicates that you are hovering over a transition of the
waveform for the selected signal or over another marker.
° A hollow circle indicates that are you between transitions in the waveform of the
selected signal.
° Release the mouse key to drop the marker to the new location.
• You can delete one or all markers with one command. Right-click over a marker, and do
one of the following:
° Select Delete Marker from the popup menu to delete a single marker.
° Select Delete All Markers from the popup menu to delete all markers.
Note: You can also use the Delete key to delete a selected marker.
Trigger Marker
The red trigger marker (whose label is a red letter 'T') is a special marker that indicates the
occurrence of the trigger event in the capture buffer. The position of the trigger marker in
the buffer directly corresponds to the Trigger Position setting (see Using the ILA Dashboard,
page 48).
Note: The trigger marker is not movable using the same technique as regular markers. Its position
is set using the ILA core's Trigger Position property setting.
Dividers
Dividers create a visual separator between signals. You can add a divider to your wave
configuration to create a visual separator of signals, as follows:
1. In a Name column of the Waveform window, click a signal to add a divider below that
signal.
2. From the popup menu, select Edit > New Divider, or right-click and select New Divider.
The change is visual and nothing is added to the HDL code. The new divider is saved with
the wave configuration file when you save the file.
• Move a Divider to another location in the waveform by dragging and dropping the
divider name.
• To delete a Divider, highlight the divider, and click the Delete key, or right-click and
select Delete from the popup menu.
Using Groups
A Group is a collection of expandable and collapsible categories, to which you can add
signals and buses in the wave configuration to organize related sets of signals. The group
itself displays no waveform data but can be expanded to show its contents or collapsed to
hide them. You can add, change, and remove groups.
To add a Group:
A Group that contains the selected signal or bus is added to the wave configuration.
You can move other signals or buses to the group by dragging and dropping the signal or
bus name.
• Move Groups to another location in the Name column by dragging and dropping the
group name.
• Remove a group, by highlighting it and selecting Edit > Wave Objects > Ungroup, or
right-click and select Ungroup from the popup menu. Signals or buses formerly in the group
are placed at the top-level hierarchy in the wave configuration.
CAUTION! The Delete key removes the group and its nested signals and buses from the wave
configuration.
1. In a wave configuration, select one or more signals or buses you want to add to a virtual
bus.
2. Select Edit > New Virtual Bus, or right-click and select New Virtual Bus from the
popup menu.
You can move other signals or buses to the virtual bus by dragging and dropping the signal
or bus name. The new virtual bus and its nested signals or buses are saved when you save
the wave configuration file. You can also move it to another location in the waveform by
dragging and dropping the virtual bus name.
To remove a virtual bus, and ungroup its contents, highlight the virtual bus, and select
Edit > Wave Objects > Ungroup, or right-click and select Ungroup from the popup menu.
CAUTION! The Delete key removes the virtual bus and its nested signals and buses from the wave
configuration.
Renaming Objects
You can rename any object in the Waveform window, such as signals, dividers, groups, and
virtual buses.
You can also double-click the object name and then type a new name. The change is
effective immediately. Object name changes in the wave configuration do not affect the
names of the nets attached to the ILA core probe inputs.
Displaying Names
You can display the full hierarchical name (long name), the simple signal or bus name (short
name), or a custom name for each signal. The signal or bus name displays in the Name
column of the wave configuration. If the name is hidden:
• Expand the Name column until you see the entire signal name.
• Use the scroll bar in the Name column to view the name.
1. Select one or more signal or bus names. Use Shift+ click or Ctrl+ click to select many
signal names.
2. Right-click, and select Name >:
° Custom to display the custom name given to the signal when renamed.
Radixes
Understanding the type of data on your bus is important. You need to recognize the
relationship between the radix setting and the data type to use the waveform options of
Digital and Analog effectively. See About Radixes and Analog Waveforms, page 94 for more
information about the radix setting and its effect on Analog waveform analysis.
You can change the radix of an individual signal (ILA probe) in the Waveform window as
follows:
IMPORTANT: Changes to the radix of an item in the Objects window do not apply to values in the
Waveform window or the Tcl Console. To change the radix of an individual signal (ILA probe) in
the Waveform window, use the Waveform window popup menu.
• Maximum bus width of 64 bits on real. Incorrect values are possible for buses wider
than 64 bits.
• Floating point supports only 32- and 64-bit arrays.
° Select a marker.
2. Select View > Floating Ruler, or click the Floating Ruler button.
You only need to follow this procedure the first time. The floating ruler displays
each time the secondary cursor is placed or a marker is selected.
1. Select a bus.
2. Right-click and select Reverse Bit Order.
The bus bit order is reversed. The Reverse Bit Order command is marked to show that this
is the current behavior.
• Binary, octal, hexadecimal, ASCII, and unsigned decimal radixes cause the bus values to
be interpreted as unsigned integers. The format of data on the bus must match the
radix setting.
• Any non-0 or -1 bits cause the entire value to be interpreted as 0.
• The signed decimal radix causes the bus values to be interpreted as signed integers.
• Real radixes cause bus values to be interpreted as fixed point or floating point real
numbers, as determined by the settings of the Real Settings dialog box, shown in
Figure 6-3, page 95.
• Fixed Point: Specifies that the bits of the selected bus wave objects is interpreted as a
fixed point, signed, or unsigned real number.
• Binary Point: Specifies how many bits to interpret as being to the right of the binary
point. If Binary Point is larger than the bit width of the wave object, wave object values
cannot be interpreted as fixed point, and when the wave object is shown in Digital
waveform style, all values show as <Bad Radix>. When shown as analog, all values are
interpreted as 0.
• Floating Point: Specifies that the bits of the selected bus wave objects should be
interpreted as an IEEE floating point real number.
Note: Only single precision and double precision (and custom precision with values set to those
of single and double precision) are supported.
1. In the Name area of a Waveform window, right-click on the bus for the popup menu.
2. Select Waveform Style and then Analog Settings to choose an appropriate drawing
setting.
You can adjust the height of either an analog waveform or a digital waveform by selecting
and then dragging the rows.
Figure 6-4 shows the Analog Settings dialog box with the settings for analog waveform
drawing.
X-Ref Target - Figure 6-4
• Row Height: Specifies how tall to make the select wave objects, in pixels. Changing the
row height does not change how much of a waveform is exposed or hidden vertically,
but rather stretches or contracts the height of the waveform.
When switching between Analog and Digital waveform styles, the row height is set to an
appropriate default for the style (20 for digital, 100 for analog).
• Y Range: Specifies the range of numeric values to be shown in the waveform area.
° Auto: Specifies that the range should continually expand whenever values in the
visible time range of the window are discovered to lie outside the current range.
° Min: Specifies the value displays at the bottom of the waveform area.
Both values can be specified as floating point; however, if radix of the wave object
radix is integral, the values are truncated to integers.
• Interpolation Style: Specifies how the line connecting data points is to be drawn.
° Hold: Specifies that of two data points, a horizontal line is drawn from the left point
to the X-coordinate of the right point, then another line is drawn connecting that
line to the right data point, in an L shape.
° Off Scale: Specifies how to draw waveform values that lie outside the Y range of the
waveform area.
° Hide: Specifies that outlying values are not shown, such that a waveform that
reaches the upper or lower bound of the waveform area disappears until values are
again within the range.
° Clip: Specifies that outlying values be altered so that they are at the top or bottom
of the waveform area, such that a waveform that reaches the upper- or lower-bound
of the waveform area follows the bound as a horizontal line until values are again
within the range.
° Overlap: Specifies that the waveform be drawn wherever its values are, even if they
lie outside the bounds of the waveform area and overlap other waveforms, up to
the limits of the wave window itself.
• Horizontal Line: Specifies whether to draw a horizontal rule at the given value. If the
check-box is on, a horizontal grid line is drawn at the vertical position of the specified Y
value, if that value is within the Y range of the waveform.
As with Min and Max, the Y value accepts a floating point number but truncates it to an
integer if the radix of the selected wave objects is integral.
IMPORTANT: Analog settings are saved in a wave configuration; however, because control of zooming
in the Y dimension is highly interactive, unlike other wave object properties such as radix, they do not
affect the modification state of the wave configuration. Consequently, zoom settings are not saved with
the wave configuration.
Zoom Gestures
In addition to the zoom gestures supported for zooming in the X dimension, when over an
analog waveform, additional zoom gestures are available, as shown in Figure 6-5.
X-Ref Target - Figure 6-5
• Zoom Out Y: Zooms out in the Y dimension by a power of 2 determined by how far
away the mouse button is released from the starting point. The zoom is performed
such that the Y value of the starting mouse position remains stationary.
• Zoom Y Range: Draws a vertical curtain which specifies the Y range to display when
the mouse is released.
• Zoom In Y: Zooms in toward the Y dimension by a power of 2 determined by how far
away the mouse button is released from the starting point.
The zoom is performed such that the Y value of the starting mouse position remains
stationary.
• Reset Zoom Y: Resets the Y range to that of the values currently displayed in the wave
window and sets the Y Range mode to Auto.
All zoom gestures in the Y dimension set the Y Range analog settings. Reset Zoom Y sets
the Y Range to Auto, whereas the other gestures set Y Range to Fixed.
Introduction
The Vivado® IDE provides a quick and easy way to generate a design that helps you debug
and verify your system that uses Xilinx 7 Series high-speed gigabit transceiver (GT)
technology. The in-system serial I/O debugging flow has three distinct phases:
1. IBERT Core generation phase: Customizing and generating the IBERT core that best
meets your hardware high-speed serial I/O requirements.
2. IBERT Example Design Generation and Implementation phase: Generating the example
design for the IBERT core generated in the previous step.
3. Serial I/O Analysis phase: Interacting with the IBERT IP contained in the design to debug
and verify issues in your high-speed serial I/O links.
The rest of this chapter shows how to complete the first two phases. The third phase is
covered in the chapter called Debugging the Serial I/O Design in Hardware.
5. Double-click on the IBERT architecture desire to open the Customize IP Wizard for that
core
Customize the IBERT core for your given hardware system requirements. For details on the
various IBERT cores available, see the following IP Documents: LogiCORE IP IBERT for 7 Series
GTX Transceivers (PG132) [Ref 9], LogiCORE IP IBERT for 7 Series GTP Transceivers (PG133) [Ref 10],
LogiCORE IP IBERT for 7 Series GTH Transceivers (PG152) [Ref 11].
on the IBERT IP in the Sources window and select Open IP Example Design, then specify
the desired location of the example design project in the resulting dialog window. This
command opens a new Vivado project window for the example design and adds the proper
top-level wrapper and constraints file to the project, as shown in Figure 7-2.
Once the example design is generated, you can implement the IBERT example design
through bitstream creation core by clicking Generate Bitstream in the Program and
Debug section of the Vivado IDE flow navigator or by running the following Tcl commands:
6. Refer to the Vivado Design Suite User Guide: Design Flows Overview (UG892) [Ref 5] for
more details on the various ways you can implement your design.
X-Ref Target - Figure 7-2
Introduction
Once you have IBERT core implemented, you can use the run time serial I/O analyzer
features to debug the design in hardware. Only IBERT cores version v3.x and later can be
accessed using the serial I/O analyzer feature.
1. Connect to the hardware target and programming the FPGA device with the bit file.
2. Create Links.
3. Modify link settings and examine status.
4. Run scans as needed.
Note: If you still do not see the IBERT core after programming and/or refreshing the FPGA device,
check to make sure the device was programmed with the appropriate .bit file. Also check to make
sure the implemented design contains an IBERT v3.0 core.
The Vivado serial I/O analyzer feature is built around the concept of links. A link is
analogous to a channel on a board, with a transmitter and a receiver. The transmitter and
receiver may or may not be the same GT, on the same device, or be the same architecture.
To create one or more links, go to the Links tab in Vivado, and click either the Create Links
button, or right-click and choose Create Links. This causes the Create Links dialog window
to appear, as shown in Figure 8-2.
When an IBERT core is detected, the Hardware Manager notes that there are no links
present, and show a green banner at the top. Click *Create Links* to open the Create Links
dialog window, as shown in Figure 8-2.
Choose a TX and/or an RX from the list available. Or type in a string into the search field to
narrow down the list. Then click the Add (+) button to add the link to the list. Repeat for all
links desired.
Links can also be a part of a link group. By default, all new links are grouped together. You
can choose not to add the links to a group by unchecking Create link group check box. The
name of the link group is specified in the Link group description field.
Each row in the Links window represents a link. Common and useful status and controls are
enabled by default, so the health of the links can be quickly seen. The various settings that
can be viewed in the Links window’s table columns are shown in Table 8-1.
It is possible to change the values of a given property for all links in a link group by
changing the setting in the link group row. For instance, changing the TX Pattern to "PRBS
7-bit" in the "Link Group 0" row changes the TX Pattern of all the links to "PRBS 7-bit". If not
all the links in the group have the same setting, "Multiple" appears for that column in the
link group row.
A scan runs on a link. To create a scan, select a link in the Link window, and either right-click
and choose Create Scan, or click the Create Scan button in the Link window toolbar. This
brings up the Create Scan dialog (see Figure 8-4). The Create Scan dialog shows the
settings for performing a scan, as shown in Table 8-2.
By default, the scan is run after it is created. If you do not want to run the scan, and only
define it, uncheck the Run Scan checkbox.
If a scan is created, but not run, it can be subsequently run or run by right-clicking on a scan
in the Scans window and choosing Run Scan (see Figure 8-5). While a scan is running, it can
be prematurely stopped by right-clicking on a scan and choosing Stop Scan, or clicking the
Stop Scan button in the Scans window toolbar.
As in other charts and displays within the Vivado IDE, the mouse gestures for zooming in
the eye scan plot window are as follows:
Also, when the mouse cursor is over the Plot, the current horizontal and vertical codes,
along with the scanned BER value is displayed in the tooltip. You can also change the plot
type by clicking the *Plot Type* button in the plot window, and choosing Show Contour
(filled), Show Contour (lines), and Heat Map.
A summary view is present at the bottom of the scan plot, stating the scan settings, along
with basic information like when the scan was performed. During the 2D Eyescan, the
number of pixels in the scan with zero errors is calculated (taking into account the
horizontal and vertical increments), and this result is displayed as Open Area. The *Scan*
window contents are sorted by Open Area by default, so the scans with the largest open
area appear at the top.
Properties Window
Whenever a GT or a COMMON block in the hardware window, a Link in the Links window,
or a scan in the Scans window is selected, the properties of that object shows in the
Properties window. For GTs and COMMONs, these include all the attribute, port, and other
settings of those objects. These settings can be changed in the Properties window (see
Figure 8-7), or by writing Tcl commands to change and commit the properties. Some
properties are read-only and cannot be changed.
For more information about the hardware manager commands, run the help -category
hardware Tcl command in the Tcl Console.
IMPORTANT: Using the get_property or set_property command does not read or write information
to/from the IBERT core. You must use the refresh_hw_sio and commit_hw_sio commands to read and
write information from/to the hardware, respectively.
• One KC705 board's Digilent JTAG-SMT1 cable (serial number 12345) accessible via a
CSE server running on localhost:50001
• Single IBERT core in a design running in the XC7K325T device on the KC705 board
• IBERT core has Quad 117 and Quad 118 enabled
• Up to 16 states.
• One-, two-, and three-way conditional branching used for complex state transitions.
• Four built-in 16-bit counters used to count events, implement timers, etc.
• Four built-in flags used for monitoring trigger state machine execution status.
• Trigger action.
States
Each state machine program can have up to 16 states declared. Each state is composed of
a state declaration and a body:
state <state_name>:
<state_body>
Goto Action
The goto action is used to transition between states. Here is an example of using the goto
action to transition from one state to another before triggering:
state my_state_0:
goto my_state_1;
state my_state_1:
trigger;
Conditional Branching
The trigger state machine language supports one-, two-, and three-way conditional
branching per state.
For more information on how to construct conditional statements represented above with
<condition1> and <condition2>, refer to the section called Conditional Statements,
page 123
Counters
The four built-in 16-bit counters have fixed names and are called $counter0, $counter1,
$counter2, $counter3. The counters can be reset, incremented, and used in conditional
statements.
Flags
Flags can be used to monitor progress of the trigger state machine program as it executes.
The four built-in flags have fixed names and are called $flag0, $flag1, $flag2, and
$flag3. The flags can be set and cleared.
Conditional Statements
Debug Probe Conditions
Debug probe conditions can be used in two-way and three-way branching conditional
statements. Each debug probe condition consumes one trigger comparator on the PROBE
port of the ILA to which the debug probe is attached.
IMPORTANT: Each PROBE port can have from 1 to 4 trigger comparators as configured at compile
time. This means that you can only use a particular debug probe in a debug probe condition up from
1 to 4 times in the entire trigger state machine program, depending on the number of comparators on
the PROBE port. Also, if the debug probe shares a PROBE port of the ILA core with other debug probes,
each debug probe condition will count towards the use of one PROBE comparator.
The debug probe conditions consist of a comparison operator and a value. The valid debug
probe condition comparison operators are:
• == (equals)
• != (not equals)
• > (greater than)
• < (less than)
<bit_width>'<radix><value>
Where:
° b (binary)
° h (hexadecimal)
° u (unsigned decimal)
Counter Conditions
Counter conditions can be used in two-way and three-way branching conditional
statements. Each counter condition consumes one counter comparator.
IMPORTANT: Each counter has only one counter comparator. This means that you can only use a
particular counter in a counter condition once in the entire trigger state machine program.
The probe port conditions consist of a comparison operator and a value. The valid probe
condition comparison operators are:
• == (equals)
• != (not equals)
• All debug probe comparisons must be combined together using the same "||" (OR) or
"&&" (AND) operators.
• The combined debug probe condition can be combined with the counter condition
using either the "||" (OR) or "&&" (AND) operators, regardless of the operator used to
combine the debug probe comparisons together.
• Two debug probe comparisons combined with an "OR" function, then combined with
counter conditional using "AND" function:
if (((xyz >= 23'u456) || (abc == 1'b0)) && ($counter0 == 16'u0023)) then
• Two debug probe comparisons combined with an "AND" function, then combined with
counter conditional using "OR" function:
if (((xyz >= 23'u456) && (abc == 1'b0)) || ($counter0 == 16'u0023)) then
• Three debug probe comparisons combined with an "OR" function, then combined with
counter conditional using "AND" function:
if (((xyz >= 23'u456) || (abc == 1'b0) || (klm != 23'h0000A5)) && ($counter0 ==
16'u0023)) then
• Three debug probe comparisons combined with an "AND" function, then combined
with counter conditional using "OR" function:
if (((xyz >= 23'u456) && (abc == 1'b0) && (klm != 23'h0000A5)) || ($counter0 ==
16'u0023)) then
Additional Resources
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see the
Xilinx Support website at:
www.xilinx.com/support.
www.xilinx.com/company/terms.htm.
Solution Centers
See the Xilinx Solution Centers for support on devices, software tools, and intellectual
property at all stages of the design cycle. Topics include design assistance, advisories, and
troubleshooting tips.
References
These documents provide supplemental material useful with this guide:
6. iMPACT Help
(http://www.xilinx.com/cgi-bin/docs/rdoc?l=en;v=14.7;d=isehelp_start.htm;a=pim_c_ov
erview.htm)
Xilinx IP Documentation
7. LogiCORE IP ChipScope Pro Integrated Logic Analyzer (ILA) (v2) Datasheet (DS875)
8. LogiCORE IP Virtual Input/Output (VIO) v2.0 Product Guide (PG159)
9. LogiCORE IP IBERT for 7 Series GTX Transceivers (PG132)
10. LogiCORE IP IBERT for 7 Series GTP Transceivers (PG133)
11. LogiCORE IP IBERT for 7 Series GTH Transceivers (PG152)
12. LogiCORE IP JTAG to AXI Master v1.0 Product Guide (PG174)