beautypg.com

Configuring the jtag user code setting – Altera Virtual JTAG IP Core User Manual

Page 41

background image

Design Example: Offloading Hardwired Revision Information

This example demonstrates how you can use a GUI to offload revision information that is hardwired into
a design. The GUI offloads the time that the design was compiled, the USERCODE from the device, and
compile number that tracks the number of compile iterations that have been performed.

Because the Quartus II software ships with an installation of Tcl/Tk, you can use the Tk package to build a
custom GUI to interact with your design. In many cases, the JTAG port is a convenient interface to use,
since it is present in most designs for debug purposes. By leveraging Tk and the virtual JTAG interface, you
perform rapid prototyping such as creating virtual front panels or creating simple software applications.
The figure below shows the organization of the design.

Figure 22: Design Organization Example

Top-Level Design

JTAG

Version

Control

Information

VJI

USERCODE

A Tcl script creates and updates the verilog file containing the hardcoded version control information every
time the project goes through a full compile. The Tcl script is executed automatically by adding the following
assignment to the project’s .qsf file.

The

USERCODE

value shifted out by this design example is a user-configurable 32-bit JTAG register. This

value is configured in the Quartus II software using the Device and Pin Options dialog box.

Configuring the JTAG User Code Setting

The following steps describe how to configure the JTAG User Code setting. A separate script generates the
GUI and is executed with the

quartus_stp

command line executable. During runtime, the GUI queries the

device for the version information and formats it for display within the message box.

1. On the Assignment menu, click Settings.
2. On the Settings page, in the Category list, click Device.
3. The Device dialog box appears. Click Device and Pin Options.
4. In the Device and Pin Options dialog box, on the General tab, the JTAG user code appears. Type the

user code in 32-bit hexadecimal format.

5. Click OK.

Related Information

Using the MegaWizard Plug-In Manager

on page 22

Tcl Example Scripts: Automatic Version Number

Altera Corporation

Virtual JTAG Megafunction (sld_virtual_jtag)

Send Feedback

41

Design Example: Offloading Hardwired Revision Information

UG-SLDVRTL
2014.03.19