sld_virtual_jtag Megafunction User Guide

Size: px
Start display at page:

Download "sld_virtual_jtag Megafunction User Guide"

Transcription

1 sld_virtual_jtag Megafunction User Guide 101 Innovation Drive San Jose, CA (408) Software Version: 6.0 Document Version: 1.0 Document Date: June 2006

2 Copyright 2006 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. Altera products are protected under numerous U.S. and foreign patents and pending applications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera Corporation. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services. UG-SLDVRTL-1.0 ii Altera Corporation sld_virtual_jtag Megafunction User Guide Preliminary May 2006

3 Contents Revision History... v How to Contact Altera... v Typographic Conventions... vi Chapter 1. About This Megafunction Device Family Support Introduction The JTAG Protocol Description of the Virtual JTAG Interface (VJI) Overview Operation Instruction Register Scan Shifts Data Register Scan Shifts Communication with the sld_virtual_jtag Instance Applications Chapter 2. Getting Started System & Software Requirements Using the MegaWizard Plug-In Manager Instantiating the sld_virtual_jtag Megafunction in Your Design Simulation Support Compiling the Design Third-Party Synthesis Support Design Example Introduction Design Files Requirements Generate a sld_virtual_jtag Module Sampling & Updating the Contents of Internal State Machines Simulation Support Design Example Introduction Design Files Requirements Generate a sld_virtual_jtag Module Reading the Contents of a Counter Captured in a RAM Conclusion Chapter 3. Specifications Ports & Parameters Altera Corporation June 2006 iii sld_virtual_jtag Megafunction User Guide

4 Contents sld_virtual_jtag Megafunction User Guide iv Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

5 About This User Guide Revision History The table below displays the revision history for the chapters in this User Guide. Chapter Date Document Version All June Initial release. Changes Made How to Contact Altera For the most up-to-date information about Altera products, go to the Altera world-wide web site at For technical support on this product, go to For additional information about Altera products, consult the sources shown below. Information Type USA & Canada All Other Locations Technical support (800) 800-EPLD (3753) (7:00 a.m. to 5:00 p.m. Pacific Time) (1) 7:00 a.m. to 5:00 p.m. (GMT -8:00) Pacific Time Product literature (1) (1) Altera literature services Non-technical customer service (800) :00 a.m. to 5:00 p.m. (GMT -8:00) Pacific Time FTP site ftp.altera.com ftp.altera.com Note to table: (1) You can also contact your local Altera sales office or sales representative. Altera Corporation June 2006 v sld_virtual_jtag Megafunction User Guide

6 Typographic Conventions Typographic Conventions This document uses the typographic conventions shown below. Visual Cue Bold Type with Initial Capital Letters bold type Italic Type with Initial Capital Letters Italic type Initial Capital Letters Subheading Title Courier type Meaning Command names, dialog box titles, checkbox options, and dialog box options are shown in bold, initial capital letters. Example: Save As dialog box. External timing parameters, directory names, project names, disk drive names, filenames, filename extensions, and software utility names are shown in bold type. Examples: f MAX, \qdesigns directory, d: drive, chiptrip.gdf file. Document titles are shown in italic type with initial capital letters. Example: AN 75: High-Speed Board Design. Internal timing parameters and variables are shown in italic type. Examples: t PIA, n + 1. Variable names are enclosed in angle brackets (< >) and shown in italic type. Example: <file name>, <project name>.pof file. Keyboard keys and menu names are shown with initial capital letters. Examples: Delete key, the Options menu. References to sections within a document and titles of on-line help topics are shown in quotation marks. Example: Typographic Conventions. Signal and port names are shown in lowercase Courier type. Examples: data1, tdi, input. Active-low signals are denoted by suffix n, e.g., resetn. 1., 2., 3., and a., b., c., etc. Anything that must be typed exactly as it appears is shown in Courier type. For example: c:\qdesigns\tutorial\chiptrip.gdf. Also, sections of an actual file, such as a Report File, references to parts of files (e.g., the AHDL keyword SUBDESIGN), as well as logic function names (e.g., TRI) are shown in Courier. Numbered steps are used in a list of items when the sequence of the items is important, such as the steps listed in a procedure. Bullets are used in a list of items when the sequence of the items is not important. v The checkmark indicates a procedure that consists of one step only. 1 The hand points to information that requires special attention. c w r f The caution indicates required information that needs special consideration and understanding and should be read prior to starting or continuing with the procedure or process. The warning indicates information that should be read prior to starting or continuing the procedure or processes. The angled arrow indicates you should press the Enter key. The feet direct you to more information about a particular topic. vi Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

7 1. About This Megafunction Device Family Support Megafunctions provide either full or preliminary support for target Altera device families, as described below: Full support means the megafunction meets all functional and timing requirements for the device family and may be used in production designs Preliminary support means the megafunction meets all functional requirements, but may still be undergoing timing analysis for the device family; it may be used in production designs with caution Table 1 1 shows the level of support offered by the sld_virtual_jtag megafunction for each Altera device family. Table 1 1. Device Family Support Stratix II Stratix Stratix II GX Stratix GX Cyclone II Cyclone MAX II APEX II APEX 20K Device Family Support Full Full Full Full Full Full Full Full Full Introduction As designs grow ever larger, with more and more functions being added, designers need better debugging features and tools. As more design blocks are integrated on a single system-on-a-programmable-chip (SOPC) device, not all of the signal and bus activity can be seen from the ports of the device. In-system debugging tools therefore become necessary. Designers need better verification, monitoring, and updating solutions for qualifying their designs. Altera provides many powerful tools for on-chip debugging in the Quartus II software, where you can look inside the design while it is running at full speed in the system. Tools such as the SignalTap II logic Altera Corporation 1 1 June 2006 sld_virtual_jtag Megafunction User Guide

8 Introduction analyzer, the SignalProbe feature, and the external Logic Analyzer Interface (LAI) are very popular among designers and have been successfully used for debugging their designs. The SignalTap II logic analyzer can probe various signals in the design and capture them in the device s own memory. The data is then retrieved via a JTAG port using an Altera download cable to the PC running the logic analyzer software. The LAI can probe internal signals and send their content outside the device using the device s I/O pins to the external logic analyzer. The JTAG port is used in conjunction with the LAI core to control the selection of signal banks. These signal banks are different sets of internal signals hooked up in multiplexer fashion. Although these tools are very powerful, the complexity of today s systems require additional instrumentation techniques for in-system debugging of your design. These techniques include: Achieving unreachable trigger conditions defined in the SignalTap II logic analyzer Accelerating in-system debugging by loading various registers in your design to achieve trigger conditions that happen very late during debugging Adding virtual input pins to your design Configuring some parts of your design to run in test mode while other parts run in operation mode The sld_virtual_jtag megafunction addresses these needs and requirements of today s in-system debugging. Designers today also build their own system-level debugging infrastructure. This task includes both building their own processor-based debugging solutions and building their own debugging tools in software for system level debugging. The sld_virtual_jtag megafunction can provide one or more transparent communication channels to access different parts of your PLD design using the JTAG interface of the device. The sld_virtual_jtag megafunction can be instantiated in your HDL code directly. The HDL code containing instances of this megafunction can be synthesized with the Quartus II software or with third-party synthesis software. For communication, you can use Tool Command Language (Tcl) commands to communicate with the parts of your design to which these megafunctions are connected. The Tcl commands run on a host computer that has the quartus_stp executable installed on it. You can also use your own custom hardware, such as a microcontroller, to implement the low-level JTAG controls that create a communication channel between your JTAG controller and this megafunction. 1 2 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

9 About This Megafunction f For more information about using the SignalTap II embedded logic analyzer, refer to the Design Debugging Using the SignalTap II Embedded Logic Analyzer chapter in volume 3 of the Quartus II Handbook. For more information about using the Logic Analyzer Interface, refer to the In-System Debugging Using External Logic Analyzers chapter in volume 3 of the Quartus II Handbook. The JTAG Protocol The Joint Action Test Group (JTAG) defines the specification for Boundary Scan Testing (BST), which is also known as IEEE One purpose of the JTAG standard is to test device I/Os and their connections to the board during the board s initial testing. The JTAG architecture consists of a TAP controller, an instruction register (IR), and several data registers (DRs). The input ports to the JTAG circuit are tck, tdi, trst, and tms. The output port from the JTAG circuit is tdo. The TAP controller is a state machine that transitions through different states on every tck clock cycle. The input to the state machine is tms. The JTAG protocol specifies that data is shifted into the PLD device on the tdi port and shifted out on the tdo port. All of the data is shifted in or out as scan shifts. The JTAG operation involves two scan shifts. The first is an instruction register (IR) scan shift during which data is shifted into the IR of the JTAG circuit on the tdi port. The second is a data register (DR) scan shift during which data is shifted into and out of various DRs of the JTAG circuit on the tdo port. The JTAG resource on PLD devices is used to perform both testing and configuration of the device; that is, programming the PLD device with a programming file. The JTAG resource is also used in applications such as in-system debugging. Altera s in-system debugging solutions, including the SignalTap II logic analyzer and In-System Memory Content Editor, use the same JTAG resource on the device to exchange data with the device. f For a detailed specification of JTAG, refer to application note AN 39: IEEE (JTAG) Boundary-Scan Testing in Altera Devices. Altera Corporation 1 3 June 2006 sld_virtual_jtag Megafunction User Guide

10 Description of the Virtual JTAG Interface (VJI) Description of the Virtual JTAG Interface (VJI) 1 The Virtual JTAG Interface (VJI) or sld_virtual_jtag megafunction mean the same thing in this document and are used interchangeably. Overview The Virtual JTAG Interface provides you with an interface that is similar to the JTAG interface in your designs. Figure 1 1 shows the input and output ports of the design. Figure 1 2 shows a device that consists of a counter and multiple instances of the Virtual JTAG Interface. These VJI instances can be connected to parts of the original design (counter in this case) to achieve different applications. Typical applications of using the VJI in a design are discussed in Applications on page 1 9. Figure 1 1. Input and Output Ports of VJI Note for Figure 1 1 (1) These output ports are collectively referred to as out* in Figure Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

11 About This Megafunction Figure 1 2. VJI and JTAG Block Diagram Note (1) Notes for Figure 1 2: (1) The outputs of VJI, other than those specified here, are collectively called out*, as shown in Figure 1 1. (2) The trst input to the JTAG circuit is optional on some devices. The VJI uses the TAP controller of the JTAG device as its state machine. Each VJI instance in a design consists of an instruction register (IR) and logic gates. Each VJI instance in your design provides tck, tdi, and tms output ports and a tdo input port. In addition, each instance has multiple output ports, collectively called out* in Figure 1 2. The out* ports are active high outputs. They are asserted high to show various states of the JTAG TAP controller and internal states of VJI during scan shift operations. There is also an ir_in output port. The width of this port depends on the IR width of VJI and reflects the contents of the IR. Each VJI's IR can be 1 bit to 32 bits in width. There is an ir_out input port that has the same width as the ir_in port. The ir_out input port is used to pass any user data from your design to the addressing application. Refer to Instruction Register Scan Shifts on page 1 6 for more information about passing data using the ir_out port. f For more details about the sld_virtual_jtag megafunction s ports and parameters, refer to Chapter 3, Specifications. Altera Corporation 1 5 June 2006 sld_virtual_jtag Megafunction User Guide

12 Description of the Virtual JTAG Interface (VJI) Figure 1 2 shows how a VJI instance connects to your design on one side and to the JTAG circuit of the device through the JTAG hub on the other. The connections through the hub to the JTAG circuit are transparent. They are set up automatically when your design is compiled with the Quartus II software. The Virtual JTAG Interface can be used in your design to help implement various applications. For example, one application might be to load a counter in a design through the device s JTAG circuit. The VJI is connected with the counter in this design. For more details about how this design can be achieved in Verilog HDL code, refer to Instantiating the sld_virtual_jtag Megafunction in Your Design on page More applications of VJI are described in Applications on page 1 9. Operation The VJI supports two types of scan shifts that are very similar to the scan shifts used in the JTAG protocol. These two scan shifts are instruction register (IR) scan shifts and data register (DR) scan shifts. Consider an application that drives the JTAG port of the device. This application could be a software application running on a host computer or it could be some custom hardware that can initiate scan shifts for the JTAG. To realize IR and DR scan shifts for the VJI, the application communicates with the JTAG hardware on the device, which in turn communicates with the VJI instances inside the design. More details about methods of communicating with VJI instances can be found in Communication with the sld_virtual_jtag Instance on page 1 7. Instruction Register Scan Shifts During an IR scan shift, data is shifted into the IR of the VJI instance. The VJI ports involved in this operation are ir_in and ir_out. During an IR scan shift, the flow of data is from the JTAG ports of the device into the IR of the VJI. The ir_in output port reflects the contents of the IR. The ir_out port is used during this scan shift to pass any data from the design to the JTAG circuit and finally to the addressing application. If there are multiple instances of the VJI in a design, separate IR scan shifts must be used to configure the IR in each VJI instance. Data Register Scan Shifts Similar to the JTAG circuit architecture, various DRs can be defined in your design for each VJI instance. These data registers are shift registers that capture the data from the VJI's tdi output port during a DR scan shift operation. VJI ports involved in a DR shift are tck, tdi, and tdo. During this shift, data is shifted into DRs associated with the VJI. At the 1 6 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

13 About This Megafunction same time, data is shifted out from the same DRs on the VJI's tdo pin. All the transitions on the VJI's tdi and tdo ports are synchronous with the VJI's tck clock. During both IR and DR scan shifts, the JTAG TAP controller transitions through various states. These transitions are reflected on the output ports named out* in Figure 1 2 on page 1 5. Communication with the sld_virtual_jtag Instance The sld_virtual_jtag megafunction is one of the system-level debugging (SLD) modules provided with the Quartus II software. Other SLD modules include the SignalTap II logic analyzer and the external Logic Analyzer Interface (LAI). The VJI is part of the SLD infrastructure that is supported by the quartus_stp executable. The quartus_stp executable is part of the Quartus II software. It can be installed as a stand-alone program on any host computer that is running the Windows operating system. This software is used to send data to and receive data from the VJI instances inside your design. All communication between the application and the sld_virtual_jtag megafunction is through the JTAG ports of the device. You can use the quartus_stp executable to send and receive data from the sld_virtual_jtag megafunction using the following Tcl commands: get_hardware_names get_device_names open_device close_device device_lock device_unlock device_dr_shift device_ir_shift device_virtual_dr_shift device_virtual_ir_shift The Tcl command used to perform an IR scan shift with the VJI is device_virtual_ir_shift. The underlying JTAG commands used during the IR scan shift are device_ir_shift and device_dr_shift. During this shift, the IR of a particular VJI instance is loaded with the data. The Tcl command used to perform a DR scan shift for the VJI is device_virtual_dr_shift. The underlying JTAG commands used during this operation are device_ir_shift and device_dr_shift. Altera Corporation 1 7 June 2006 sld_virtual_jtag Megafunction User Guide

14 Description of the Virtual JTAG Interface (VJI) The following Tcl commands show the usage of these commands: device_virtual_ir_shift -instance_index 0 -ir_value 2 \ -no_captured_ir_value device_virtual_dr_shift -instance_index 0 -length 4 -dr_value \ $update_value -value_in_hex -no_captured_dr_value f For detailed information about these commands, consult the Quartus II Scripting Reference Manual on the Quartus II Literature page on the Altera website. You can put these Tcl commands in a script and run them by typing the following command at the system prompt: quartus_stp -t <file_name>.tcl r For examples that use these commands, refer to Design Example 1 on page 2 20 and Design Example 2 on page The data can be transferred to the VJI instance by two methods. One is to use the quartus_stp executable and Tcl commands. The other is to use your own hardware that behaves like a JTAG port controller. For example, a microcontroller can be used to send and receive data from VJI instances through the JTAG port of the device. You must understand the underlying JTAG commands that the quartus_stp executable uses. These underlying JTAG commands must be converted to appropriate device driver commands. These device drivers are then used by your custom hardware (microcontroller) for driving the JTAG port or the device. To see the underlying JTAG commands that are called during IR and DR scan shifts, use the show_equivalent_device_ir_dr_shift option with the device_virtual_ir_shift or device_virtual_dr_shift commands. The following Tcl commands show their usage: device_virtual_ir_shift -instance_index 0 -ir_value 2 \ -no_captured_ir_value -show_equivalent_device_ir_dr_shift device_virtual_dr_shift -instance_index 0 -length 4 -dr_value \ $update_value -value_in_hex -no_captured_dr_value \ -show_equivalent_device_ir_dr_shift Figure 1 3 shows a block diagram of the hardware setup where a host computer with the quartus_stp executable communicates with the FPGA device. 1 8 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

15 About This Megafunction Figure 1 3. Block Diagram Showing a Hardware Communication Setup You can replace the quartus_stp executable and download cable with an appropriate microcontroller. Applications Single or multiple instances of the VJI can be instantiated in your HDL code. During synthesis, the Quartus II software assigns unique IDs to each instance so each instance can be accessed individually. The maximum number of VJI instances you can use in a design is 128. Figure 1 4 shows a typical application in a design with multiple instances of the sld_virtual_jtag megafunction. Altera Corporation 1 9 June 2006 sld_virtual_jtag Megafunction User Guide

16 Applications Figure 1 4. Application Example Behavioral simulation is supported for this megafunction. The simulation is supported by all Altera-supported simulators such as VCS, ModelSim, and NC-Sim. More information about simulation can be found in Simulation Support on page The VJI and the quartus_stp executable can operate simultaneously with other debugging applications, such as the SignalTap II logic analyzer and the In-System Memory Content Editor. No conflicts are created when these different utilities are run simultaneously. This feature provides more productivity, efficiency, and flexibility to create solutions that meet your debugging needs. The VJI can be used in many applications, including the following: The megafunction can be used to diagnose, sample, and update the values of internal parts of your logic. With this megafunction, you can easily sample and update the values of the internal counters and state machines in your hardware device. You can build your own custom software debugging IP using the Tcl commands listed above to debug your hardware. This IP communicates with the instances of the sld_virtual_jtag megafunction inside your design. You can instrument your design to achieve virtual inputs and outputs in your design Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

17 About This Megafunction If you are building a debugging solution for a system where a microprocessor controls the JTAG chain, the SignalTap II embedded logic analyzer cannot be used because the JTAG control has to be with the microprocessor. By learning the low level controls for the JTAG port from the Tcl commands, you can program microprocessors to communicate with the sld_virtual_jtag megafunction inside the device core. Altera Corporation 1 11 June 2006 sld_virtual_jtag Megafunction User Guide

18 Applications 1 12 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

19 2. Getting Started System & Software Requirements The instructions in this section require the following hardware and software: A PC running Windows 2000/XP/XP 64-bit, or Red Hat Enterprise Linux 3.0 or 4.0 or A Sun workstation running the Solaris 8 or 9 operating system The Quartus II software beginning with version 6.0 An Altera download cable, such as a USB-Blaster cable 1 Windows XP 64-bit supports only the 32-bit version of the Quartus II software, not the 64-bit version. Additionally, Windows XP 64-bit does not support programming cable drivers for the Quartus II software. You must use another supported operating system to program devices The download cable is required to communicate with the sld_virtual_jtag megafunction from a host running the quartus_stp executable. The quartus_stp executable runs only on Windows machines. Using the MegaWizard Plug-In Manager To create the sld_virtual_jtag megafunction in your design, you must use the MegaWizard Plug-In Manager within the Quartus II software. Perform the following steps to generate the megafunction. 1. On the Tools menu, click MegaWizard Plug-In Manager. The MegaWizard Plug-In Manager dialog box appears (Figure 2 1). Altera Corporation 2 1 June 2006 sld_virtual_jtag Megafunction User Guide

20 Using the MegaWizard Plug-In Manager Figure 2 1. MegaWizard Plug-In Manager, Page 1 2. Select Create a new custom megafunction variation. 3. Click Next. Page 2a of the MegaWizard Plug-In Manager appears (Figure 2 2). 2 2 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

21 Getting Started Figure 2 2. MegaWizard Plug-In Manager, Page 2a 4. On the list of megafunctions, click Virtual JTAG. 5. Select the device family you are using. 6. Select the type of output file you want to create: Verilog HDL, VHDL, or AHDL. 7. Specify the name of the output file and its location, as shown in Figure Click Next. Page 3 of the MegaWizard Plug-In Manager appears (Figure 2 3). Altera Corporation 2 3 June 2006 sld_virtual_jtag Megafunction User Guide

22 Using the MegaWizard Plug-In Manager Figure 2 3. MegaWizard Plug-In Manager, Page 3 9. Select the width (number of bits) of your instruction register. 10. Assign a unique ID to the instance of your sld_virtual_jtag megafunction. The wizard can assign an ID automatically (recommended) or you can enter one manually. 11. Click Next. Page 4 of the MegaWizard Plug-In Manager appears (Figure 2 4). 2 4 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

23 Getting Started Figure 2 4. MegaWizard Plug-In Manager, Page Page 4 defines the stimuli that are used during the simulation of your megafunction. A stimulus is either a data register shift (DR shift) or an instruction register shift (IR shift). Each stimulus requires a time at which that shift occurs, the number of bits you want to shift in or out, and the data value you want to shift in during a shift-in operation. You can add multiple stimuli by clicking Add Stimulus in the dialog box. The stimuli specified on Page 4 of the wizard are written to the variation file. If you want to change a stimulus after creating the megafunction, you can either edit the variation file or create the megafunction again with a new stimulus. The wizard provides an easy way to generate your stimuli. If you do not want to generate the stimuli, you can skip this step. The stimuli, though, are necessary if you are performing simulation of your design. Altera Corporation 2 5 June 2006 sld_virtual_jtag Megafunction User Guide

24 Using the MegaWizard Plug-In Manager 13. Click Next. Page 5 of the MegaWizard Plug-In Manager appears (Figure 2 5). In this example, the page shows that you need the altera_mf library to simulate the VJI megafunction in your design. There is no input required from you on this page. Figure 2 5. MegaWizard Plug-In Manager, Page Click Next. Page 6 of the MegaWizard Plug-In Manager appears (Figure 2 6). 2 6 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

25 Getting Started Figure 2 6. MegaWizard Plug-In Manager, Page Select any other files you need in addition to the megafunction variation file and the megafunction black box file. 16. Click Finish to create the sld_virtual_jtag megafunction. This action creates the files you need in your project. The output from the MegaWizard Plug-In Manager is a variation file. The following example shows a sld_virtual_jtag megafunction variation file in VHDL. Altera Corporation 2 7 June 2006 sld_virtual_jtag Megafunction User Guide

26 Using the MegaWizard Plug-In Manager LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY altera_mf; USE altera_mf.all; ENTITY my_vji IS PORT ( ir_out : IN STD_LOGIC_VECTOR (1 DOWNTO 0); tdo : IN STD_LOGIC ; ir_in : OUT STD_LOGIC_VECTOR (1 DOWNTO 0); jtag_state_cdr : OUT STD_LOGIC ; jtag_state_cir : OUT STD_LOGIC ; jtag_state_e1dr : OUT STD_LOGIC ; jtag_state_e1ir : OUT STD_LOGIC ; jtag_state_e2dr : OUT STD_LOGIC ; jtag_state_e2ir : OUT STD_LOGIC ; jtag_state_pdr : OUT STD_LOGIC ; jtag_state_pir : OUT STD_LOGIC ; jtag_state_rti : OUT STD_LOGIC ; jtag_state_sdr : OUT STD_LOGIC ; jtag_state_sdrs : OUT STD_LOGIC ; jtag_state_sir : OUT STD_LOGIC ; jtag_state_sirs : OUT STD_LOGIC ; jtag_state_tlr : OUT STD_LOGIC ; jtag_state_udr : OUT STD_LOGIC ; jtag_state_uir : OUT STD_LOGIC ; tck : OUT STD_LOGIC ; tdi : OUT STD_LOGIC ; tms : OUT STD_LOGIC ; virtual_state_cdr : OUT STD_LOGIC ; virtual_state_cir : OUT STD_LOGIC ; virtual_state_e1dr : OUT STD_LOGIC ; virtual_state_e2dr : OUT STD_LOGIC ; virtual_state_pdr : OUT STD_LOGIC ; virtual_state_sdr : OUT STD_LOGIC ; ); END my_vji; virtual_state_udr : OUT STD_LOGIC ; virtual_state_uir : OUT STD_LOGIC ARCHITECTURE SYN OF my_vji IS COMPONENT sld_virtual_jtag GENERIC ( sld_auto_instance_index : STRING; sld_instance_index : NATURAL; sld_ir_width : NATURAL; sld_sim_action : STRING; sld_sim_n_scan : NATURAL; sld_sim_total_length : NATURAL; lpm_type : STRING ); 2 8 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

27 Getting Started PORT ( tdi : OUT STD_LOGIC ; jtag_state_rti_type : OUT STD_LOGIC ; jtag_state_e1dr : OUT STD_LOGIC ; jtag_state_e2dr : OUT STD_LOGIC ; tms : OUT STD_LOGIC ; jtag_state_pir : OUT STD_LOGIC ; jtag_state_tlr : OUT STD_LOGIC ; tck : OUT STD_LOGIC ; jtag_state_sir : OUT STD_LOGIC ; ir_in : OUT STD_LOGIC_VECTOR (1 DOWNTO 0); virtual_state_cir : OUT STD_LOGIC ; virtual_state_pdr : OUT STD_LOGIC ; ir_out : IN STD_LOGIC_VECTOR (1 DOWNTO 0); virtual_state_uir : OUT STD_LOGIC ; jtag_state_cir : OUT STD_LOGIC ; jtag_state_uir : OUT STD_LOGIC ; jtag_state_pdr : OUT STD_LOGIC ; tdo : IN STD_LOGIC ; jtag_state_sdrs : OUT STD_LOGIC ; virtual_state_sdr : OUT STD_LOGIC ; virtual_state_cdr : OUT STD_LOGIC ; jtag_state_sdr : OUT STD_LOGIC ; jtag_state_cdr : OUT STD_LOGIC ; virtual_state_udr : OUT STD_LOGIC ; jtag_state_udr : OUT STD_LOGIC ; jtag_state_sirs : OUT STD_LOGIC ; jtag_state_e1ir : OUT STD_LOGIC ; jtag_state_e2ir : OUT STD_LOGIC ; virtual_state_e1dr : OUT STD_LOGIC ; virtual_state_e2dr : OUT STD_LOGIC ); END COMPONENT; BEGIN sld_virtual_jtag_component : sld_virtual_jtag GENERIC MAP ( sld_auto_instance_index => "YES", sld_instance_index => 0, sld_ir_width => 2, sld_sim_action => "", sld_sim_n_scan => 0, sld_sim_total_length => 0, lpm_type => "sld_virtual_jtag" ) PORT MAP (... ); END SYN; Altera Corporation 2 9 June 2006 sld_virtual_jtag Megafunction User Guide

28 Using the MegaWizard Plug-In Manager The same sld_virtual_jtag megafunction variation file in Verilog HDL is shown below. /* Verilog HDL code showing the input and output ports of the sld_virtual_jtag megafunction*/ module my_vji ( ir_out, tdo, ir_in, jtag_state_cdr, jtag_state_cir, jtag_state_e1dr, jtag_state_e1ir, jtag_state_e2dr, jtag_state_e2ir, jtag_state_pdr, jtag_state_pir, jtag_state_rti, jtag_state_sdr, jtag_state_sdrs, jtag_state_sir, jtag_state_sirs, jtag_state_tlr, jtag_state_udr, jtag_state_uir, tck, tdi, tms, virtual_state_cdr, virtual_state_cir, virtual_state_e1dr, virtual_state_e2dr, virtual_state_pdr, virtual_state_sdr, virtual_state_udr, virtual_state_uir); input [1:0] ir_out; input tdo; output [1:0] ir_in; output tck; output tdi; output tms; output jtag_state_cdr; output jtag_state_cir; output jtag_state_e1dr; output jtag_state_e1ir; output jtag_state_e2dr; output jtag_state_e2ir; output jtag_state_pdr; output jtag_state_pir; output jtag_state_rti; output jtag_state_sdr; 2 10 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

29 Getting Started output output output output output output output output output output output output output output jtag_state_sdrs; jtag_state_sir; jtag_state_sirs; jtag_state_tlr; jtag_state_udr; jtag_state_uir; virtual_state_cdr; virtual_state_cir; virtual_state_e1dr; virtual_state_e2dr; virtual_state_pdr; virtual_state_sdr; virtual_state_udr; virtual_state_uir; endmodule sld_virtual_jtag sld_virtual_jtag_component ( ); defparam sld_virtual_jtag_component.sld_auto_instance_index = "YES", sld_virtual_jtag_component.sld_instance_index = 0, sld_virtual_jtag_component.sld_ir_width = 2, sld_virtual_jtag_component.sld_sim_action = "", sld_virtual_jtag_component.sld_sim_n_scan = 0, sld_virtual_jtag_component.sld_sim_total_length = 0; In the code shown for the variation file, the top module instantiates a sld_virtual_jtag megafunction component. The functional model of this component used for simulation is present in the altera_mf simulation library. The stimuli defined in the MegaWizard Plug-In Manager are passed to this simulation model as parameters. Instantiating the sld_virtual_jtag Megafunction in Your Design To properly connect the sld_virtual_jtag megafunction in your design, you should follow these basic connection rules: The tck output from the VJI is the clock used for shifting the data in and out on the tdi and tdo pins. The tms output of the VJI reflects the tms input to the main JTAG circuit. The ir_in output port of the VJI reflects whatever data gets loaded in the IR of VJI and is used to build some decode logic. Outputs other than tck, tdi, tdo, tms, and ir_in represent various states of the megafunction and JTAG TAP controller. They are available to be used as needed, but they are not required to achieve a serial link between the sld_virtual_jtag instance and the addressing application. Altera Corporation 2 11 June 2006 sld_virtual_jtag Megafunction User Guide

30 Instantiating the sld_virtual_jtag Megafunction in Your Design You can use the following Verilog HDL template as a guide for instantiating and connecting various signals of the megafunctions in your design. The following code creates a 4-bit counter named my_counter. The input is clock and the output is my_counter. The counter increments synchronously on every clock edge. module input output [3:0] reg [3:0] counter (clock, my_counter); clock; my_counter; my_counter; (posedge clock) my_counter <= my_counter + 1; endmodule The purpose of instantiating a VJI instance in this example is to load my_counter through the JTAG port using a software application built with Tcl commands and the quartus_stp executable. In this design, the VJI instance is called my_vji. Whenever a VJI megafunction is instantiated in a design, three logic blocks are usually needed: a decode logic block, a tdo logic block, and a data register block. The following code takes the code shown above and adds the VJI instance, the decode logic, the tdo logic and the data register blocks. module input output [3:0] reg [3:0] counter (clock, my_counter); clock; my_counter; my_counter; (posedge clock) if (load && e1dr) // decode logic: used to load the counter my_counter my_counter <= tmp_reg; else my_counter <= my_counter + 1; // Signals and registers declared for VJI instance wire tck, tdi; reg tdo; wire cdr, eldr, e2dr, pdr, sdr, udr, uir, cir; wire [1:0] ir_in; // Instantiation of VJI my_vji VJI_INST(.tdo (tdo),.tck (tck),.tdi (tdi),.tms(), 2 12 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

31 Getting Started.ir_in(ir_in),.ir_out(),.virtual_state_cdr (cdr),.virtual_state_e1dr(e1dr),.virtual_state_e2dr(e2dr),.virtual_state_pdr (pdr),.virtual_state_sdr (sdr),.virtual_state_udr (udr),.virtual_state_uir (uir),.virtual_state_cir (cir) ); // Declaration of data register reg [3:0] tmp_reg; // Deocde Logic Block // Making some decode logic from ir_in output port of VJI wire load = ir_in[1] && ~ir_in[0]; // Bypass register used to maintain the scan chain continuity for // tdi and tdo ports (posedge tck) bypass_reg = tdi; // Data Register Block (posedge tck) if ( load && sdr ) tmp_reg <= {tdi, tmp_reg[3:1]}; // tdo Logic Block (posedge tck) if(load) tdo <= tmp_reg[0] else tdo <= bypass_reg; endmodule The decode logic is produced by defining a wire load to be active high whenever the IR of the VJI is 01. The IR scan shift is used to load the data into the IR of the VJI. The ir_in output port reflects the IR contents. The data register logic contains a 4-bit shift register named tmp_reg. The always blocks shown for the data register logic also contains the decode logic consisting of the load and sdr signals. The sdr signal is the output of the VJI that is asserted high during a DR scan shift operation. The time during which the sdr output is asserted high is the time in which the data Altera Corporation 2 13 June 2006 sld_virtual_jtag Megafunction User Guide

32 Simulation Support on tdi is valid. During that time period the data is shifted into the tmp_reg shift register. Thus tmp_reg gets the data from the VJI on the tdi output port during a DR scan operation. There is a 1-bit register named bypass_reg whose output is connected with tdo logic to maintain the continuity of the scan chain during idle or IR scan shift operation of the VJI. The tdo logic consists of outputs coming from tmp_reg and bypass_reg and connecting to the tdo input of the VJI. The tdo logic passes the data from tmp_reg to the VJI during DR scan shift operations. The always block of a 4-bit counter also consists of some decode logic. This decode logic uses the load signal and cdr output signal of the VJI to load the counter with the contents of tmp_reg. The VJI output signal cdr is asserted high during a DR scan shift operation when all the data is completely shifted into the tmp_reg and sdr has been deasserted. In addition to sdr and cdr, there are other outputs from VJI that are asserted high to show various states of the TAP controller and internal states of the VJI. All these signals can be used to perform different logic operations as needed in your design. Figure 1 1 on page 1 4 shows all of the input and output ports of VJI. Simulation Support Virtual JTAG Interface operations can be simulated using all Altera-supported simulators. The simulation support is for DR and IR scan shift operations. For simulation purposes, a behavioral simulation model of the megafunction is provided in both VHDL and Verilog HDL in the altera_mf libraries. The I/O structure of the model is the same as the megafunction. In its implementation, the VJI connects to your design on one side and to the JTAG port through the JTAG hub on other (refer to Figure 1 2 on page 1 5). However, a simulation model connects only to your design. There is no simulation model for the JTAG circuit. Therefore, no stimuli can be provided from the JTAG ports of the device to imitate the scan shift operations of the VJI in simulation. The scan operations in simulation are realized using the simulation model. The simulation model consists of a signal generator, a dummy hub, and the VJI model. The stimuli defined in the wizard are passed as parameters to this simulation model from the variation file. The simulation parameters are listed in Table 2 1. The signal generator then produces the necessary signals for VJI outputs such as tck, tdi, tms, and so forth. The model is parameterized to allow the simulation of an unlimited number of VJI instances. The parameter sld_sim_action defines the strings used for IR and DR scan shifts. Each VJI s variation file passes 2 14 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

33 Getting Started these parameters to the VJI component. The VJI s variation file can always be edited for generating different stimuli, though the preferred way to specify stimuli for DR and IR scan shifts is to use the MegaWizard Plug-In Manager. Table 2 1. Description of Simulation Parameters Parameter SLD_SIM_N_SCAN SLD_SIM_TOTAL_LENGTH SLD_SIM_ACTION Comments Specifies the number of shifts in the simulation model. The total number of bits to be shifted in either an IR shift or a DR shift. This value should be equal to the sum of all the length values specified in the SLD_SIM_ACTION string. The string has the following format: ((time,type,value,length), (time,type,value,length),... (time,type,value,length)) where: time: A 32-bit value in milliseconds that represents the start time of the shift relative to the completion of the previous shift. type: A 4-bit value that determines whether the shift is a DR shift or an IR shift. value: The data associated with the shift. For IR shifts, it is a 32-bit value. For DR shifts, the length is determined by length. length: A 32-bit value that specifies the length of the data being shifted. This value should be equal to SLD_NODE_IR_WIDTH; otherwise, the value field may be padded or truncated. 0 is invalid. Entries are in hexadecimal format. Simulation has the following limitations: Scan shifts (IR or DR) must be at least 1 ms apart in simulation time. Only behavioral or functional level simulation support is present for this megafunction. There is no gate level or timing level simulation support. For behavioral simulation, the stimuli tell the signal generator model in the sld_virtual_jtag model to generate the sequence of signals needed to produce the necessary outputs for tck, tms, tdi, and so forth. You cannot provide the stimulus at the JTAG pins of the device. The tck clock period used in simulation is 10 MHz with a 50% duty cycle. In hardware the period of the tck clock cycle may vary. Altera Corporation 2 15 June 2006 sld_virtual_jtag Megafunction User Guide

34 Simulation Support In a real system, each instance of the VJI works independently. In simulation, multiple instances can work at the same time. For example, if you define a scan shift for VJI instance number 1 to happen at 3 ms and a scan shift for VJI instance number 2 to happen at the same time, the simulation works correctly. If you are using the ModelSim-Altera simulator, the altera_mf.v and altera_mf.vhd libraries are provided in precompiled form with the simulator. The inputs and outputs of the VJI during a typical IR scan shift operation are shown in Figure 2 7. Figure 2 7. IR Shift Waveform The inputs and outputs of VJI during a typical DR scan shift operation are shown in Figure Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

35 Getting Started Figure 2 8. DR Shift Waveform Compiling the Design A design that contains instances of the VJI is no different from a regular compile flow with the Quartus II software. To compile your design, your project must have the variation file of all the different sld_virtual_jtag megafunctions in your HDL code. If your design entry is a netlist synthesized with a third-party synthesis tool, your project must have the Verilog Quartus Mapping (VQM) netlist and all the megafunction variation files that were instantiated in your HDL code. This megafunction cannot be inferred from HDL code. You must instantiate the sld_virtual_jtag megafunction in your design to create the virtual JTAG interface. In a design, you can instantiate a maximum of 128 instances of the sld_virtual_jtag megafunction. After compilation, each instance has a unique ID, as shown on the Virtual JTAG Settings page of the Analysis & Synthesis section of the Compilation Report (Figure 2 9). Altera Corporation 2 17 June 2006 sld_virtual_jtag Megafunction User Guide

36 Compiling the Design Figure 2 9. IDs of sld_virtual_jtag Instances These unique IDs are necessary for addressing applications to properly address each instance of the megafunction. The addition of sld_virtual_jtag megafunctions uses logic resources in your design. The Fitter resource section in the Compilation Report shows how many logic resources are utilized (Figure 2 10) Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

37 Getting Started Figure Logic Resources Utilized f To learn more about compiling designs with the Quartus II software or about compilation flows, refer to volumes 2 and 3 of the Quartus II Handbook. Third-Party Synthesis Support In addition to the variation file, the MegaWizard Plug-In Manager creates a black box file for the VJI megafunction you created. For example, if you create a my_vji.v file, a my_vji_bb.v file is also created. In third-party synthesis, you include this black box file along with your design files to synthesize your project. A VQM file is usually produced by third-party synthesis tools. This VQM netlist and the sld_virtual_jtag megafunction's variation files are input to the Quartus II software for further compilation. Altera Corporation 2 19 June 2006 sld_virtual_jtag Megafunction User Guide

38 Design Example 1 Design Example 1 This design example uses the Virtual JTAG Interface megafunction to capture information from internal registers in a design. This example shows you how to implement the VJI in a design and how to use the quartus_stp executable to communicate with instances of the VJI megafunction in a design. The example uses the MegaWizard Plug-In Manager to create the instances used in this design. Introduction In this design example, the state machines consist of two synchronous counters that start counting from zero. The two counters are incremented every clock cycle, based on these expressions: counter1 = counter1 + 1 counter2 = counter1 + counter2 + 2 The design example uses two instances of the VJI and the quartus_stp executable to sample and update the contents of these counters. During their operation, the two counters eventually reach a state where they have the same value. When both counters have the same value, they stop incrementing. You use the quartus_stp executable and the VJI instances in the design to capture the event when both counters have the same value. You then feed a new seed value into both counters so they start incrementing again from that seed value. In this example, you perform the following tasks: Create two sld_virtual_jtag modules in Verilog HDL to be used in the design. The modules are instantiated in Verilog RTL. Compile the design using the Quartus II software version 6.0 or later. Program the target hardware (FPGA) with the programming file. Run the Tcl scripts provided to sample and update contents of the internal state machines. (optional) Simulate the sld_virtual_jtag megafunctions with your design. Design Files The example design files are available in the Quartus II Projects section on the Design Examples page of the Altera website ( Click Examples for sld_virtual_jtag Megafunction User Guide on the examples page to download the design files Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

39 Getting Started Requirements This design example requires the following hardware and software: Quartus II software version 6.0 or later running on a host computer with the Windows operating system on it Any Altera development board or equivalent Altera download cable Generate a sld_virtual_jtag Module You can either create a new megafunction using the MegaWizard Plug-In Manager or use the existing sld_virtual_jtag modules contained in the design files provided at the Design Examples page. To create an instance of the megafunction, perform the following steps: 1. On the Tools menu, click MegaWizard Plug-In Manager. The MegaWizard Plug-In Manager dialog box appears (Figure 2 11). Figure MegaWizard Plug-In Manager, Page 1 2. Select Create a new custom megafunction variation. Click Next. Page 2a of the MegaWizard Plug-In Manager appears (Figure 2 12). Altera Corporation 2 21 June 2006 sld_virtual_jtag Megafunction User Guide

40 Design Example 1 Figure MegaWizard Plug-In Manager, Page 2a 3. From the list of megafunctions, select Virtual JTAG. 4. Under Which device family will you be using?, select Cyclone II. 5. Under Which type of output file do you want to create?, select Verilog HDL. 6. Under What name do you want for the output file?, browse to your project s directory and type my_vji_a.v 7. Click Next. Page 3 of the MegaWizard Plug-In Manager appears (Figure 2 13) Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

41 Getting Started Figure MegaWizard Plug-In Manager, Page 3 8. Set the width of the instruction register to Select Automatic for assigning a unique ID number to the instance of the megafunction. 10. Click Next. Page 4 of the MegaWizard Plug-In Manager appears (Figure 2 14). Altera Corporation 2 23 June 2006 sld_virtual_jtag Megafunction User Guide

42 Design Example 1 Figure MegaWizard Plug-In Manager, Page You specify the stimuli for the megafunction on page 4 of the wizard. Enter the following values: Type of shift: IR-Shift Length of delay: 1 ms Hexadecimal value to shift: 0x1 Click Add Stimulus. 12. Similarly, add other DR and IR stimuli as shown in Figure For DR shifts, set the number of bits you want to shift to Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

43 Getting Started Figure MegaWizard Plug-In Manager, Page 4, With Stimuli Added for Module A 13. Click Next. Page 5 of the MegaWizard Plug-In Manager appears (Figure 2 16). Altera Corporation 2 25 June 2006 sld_virtual_jtag Megafunction User Guide

44 Design Example 1 Figure MegaWizard Plug-In Manager, Page Page 5 tells you that the altera_mf.v library is required to properly simulate the megafunction. There is no input required from you on this page. Click Next. Page 6 of the MegaWizard Plug-In Manager appears (Figure 2 17) Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

45 Getting Started Figure MegaWizard Plug-In Manager, Page Click Finish to create the my_vji_a.v file. The MegaWizard Plug-In Manager will also create the files that are checked on page Repeat steps 1-15 to create the my_vji_b.v file, which is the second module that is used in this design example. The only difference is that on page 4 of the wizard, when setting up the stimuli (step 11), specify time delays of 5, 1, 1, and 1 ms for the four stimuli (Figure 2 18). Altera Corporation 2 27 June 2006 sld_virtual_jtag Megafunction User Guide

46 Design Example 1 Figure MegaWizard Plug-In Manager, Page 4, With Stimuli Added for Module B With the two megafunctions in place and the design files downloaded, the project is ready to be compiled. You can either make a new project or open the project dsgn_exmple_1.qpf. Note that the dsgn_exmple_1.qpf project has constraints for the Nios II Cyclone II development board. If you use another development board or your own board, the constraints file must be regenerated or edited for the target board and hardware. You can either start a new project in the Quartus II software version 6.0 or modify the pin constraints in the existing project. After the project compiles successfully, program the target device with the programming file that was generated. Alternatively, you can use the existing programming file produced for the Nios II Cyclone II development board Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

47 Getting Started When your device is configured, the operation starts and the internal counters begin counting. Sampling & Updating the Contents of Internal State Machines 1 This example runs at about 1 Hz and uses a Nios II Cyclone II development board. Before you proceed, make sure the Altera download cable is still connected to your hardware. Get the Tcl script named my_test.tcl that is provided in the zip file as part of the design example. Run the script by typing the following command at a command prompt (Figure 2 19): quartus_stp t my_test.tcl r Figure Run the Tcl Script for Design 1 The script samples the internal contents of the state machines and displays them on the screen (Figure 2 20). Altera Corporation 2 29 June 2006 sld_virtual_jtag Megafunction User Guide

48 Design Example 1 Figure Display the State Machine Contents Sampling stops when both counters have the same value. The script then asks you to enter a value that is fed to both counters in the design. This seed value now serves as the new starting point for the counters. (When the device started its first operation, both counters started counting from zero.) The 7-segment LED modules on the development board display the contents of the counters during the operation. When you run the Tcl script, the quartus_stp executable generates different sequences of IR and DR scan shift commands for the two VJI instances my_vji_a and my_vji_b. IR scan shifts load values into the IR of each VJI instance and DR scan shifts shift the data out from the counter registers. Note that the IR and DR shift commands for any VJI instance are run consecutively; they cannot happen simultaneously Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

49 Getting Started You can repeat the sequence with different starting values to see different results. The Tcl script provided runs three times. The loop variable in the script can be edited to run the script as many times as you want. You can run the same design on a different development kit with an appropriate constraints file. Simulation Support When the design is communicating with the quartus_stp executable, various IR and DR scan shifts are performed. These scan shifts can also be simulated to see how the data flows inside the design. To simulate this example, you can use any Verilog HDL simulator with an appropriate megafunction library (for example, altera_mf.v) and design files. While creating the Virtual JTAG Interface instances, you entered a few IR and DR scan shift commands for both instances. These IR and DR scan shifts are provided to show how the simulation works. They do not show all the results that you see when running the Tcl script. The Tcl script has many more IR and DR scan shift commands. To see all the hardware results that were generated while running the script, you must add the same sequence of IR and DR scan shift commands in Page 4 of the MegaWizard Plug-In Manager (refer to Figure 2 15 on page 2 25). When simulating the design files with the simulator, be sure to add +define+sim to your run scripts or command line. These options create a clock faster than 1 Hz, so the simulation time does not have to be very long to update the internal state machines (counters). In simulation mode, the internal clock is switched to 3.3 MHz. Additionally, +define+sim initializes the counters to a known value at the start of the simulation. Altera Corporation 2 31 June 2006 sld_virtual_jtag Megafunction User Guide

50 Design Example 2 Design Example 2 This design example shows you how to use the Virtual JTAG Interface megafunction to capture information from internal state machines running at system speed. It shows you how to implement the VJI in a design and how to use the quartus_stp executable to communicate with instances of the Virtual JTAG Interface in a design. Introduction This design example consists of two internal counters and a dual port RAM. The counter counter1 contains the address for the RAM and the counter counter2 contains the data for the RAM. One port of the RAM is used to write to the RAM at system speed. The second port is used by the sld_virtual_jtag instance to read the RAM contents. Both counters increment by predetermined amounts that do not change during the operation. Therefore the RAM contents are written repeatedly with the same values of counter2. The address pointer to this RAM, which is counter1, also does not change. This example demonstrates how the quartus_stp executable and the Virtual JTAG Interface are used to retrieve the data from the RAM and write it to a file system. In this example, you use the quartus_stp executable and VJI instances in the design to read the contents of the RAM inside the design. You will perform the following tasks: Create a sld_virtual_jtag module in Verilog HDL to be used in the design Compile the design using the Quartus II software version 6.0 or later Program the target hardware (FPGA) with the programming file Run the Tcl script provided to read the contents of the RAM Design Files The example design files are available in the Quartus II Projects section on the Design Examples page of the Altera website ( Click Examples for sld_virtual_jtag Megafunction User Guide on the examples page to download the design files from the Altera internet website. Requirements This design example requires the following hardware and software: Quartus II software version 6.0 or later running on a host computer with the Windows operating system on it 2 32 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

51 Getting Started Any Altera development board or equivalent Altera download cable Generate a sld_virtual_jtag Module You can either create a new instance of the megafunction using the MegaWizard Plug-In Manager or use the existing sld_virtual_jtag modules contained in the design files provided at the Design Examples page. To create the instance used in this design example, repeat the steps in Generate a sld_virtual_jtag Module on page 2 21, but name the new instance my_vji.v. Because no simulation is performed in this design example, you can skip the stimulus part of the MegaWizard Plug-In Manager. When prompted to enter the stimulus, click Next to advance to the next page in the wizard. You can either make a new project or open the project dsgn_exmple_2.qpf. Note that the dsgn_exmple_2.qpf project has constraints for the Nios II Cyclone II development board. If you want to use another development board or your own board, the constraints file must be regenerated or edited for the target board and hardware. If you make a new project or open an existing project from the design example directory, you must compile the project. If you do not want to compile the project, you can use the programming file in the design example directory (note that this programming file is for the Nios II Cyclone II development board from Altera). Reading the Contents of a Counter Captured in a RAM After compiling and configuring the device, run the Tcl script by typing the following command at a system command prompt: quartus_stp t my_test.tcl r The Tcl script consists of Tcl commands that communicate over the JTAG port with the sld_virtual_jtag megafunction and the device logic. The loop called LOOP reads and writes the contents of the memory addresses specified by the lower_limit and upper_limit values to a file named dump.hex. By default, the lower limit is 10 and the upper limit is 19. You can change the lower_limit and upper_limit values in the Tcl script with any text editor. When you run the script, the output is as shown in Figure Altera Corporation 2 33 June 2006 sld_virtual_jtag Megafunction User Guide

52 Design Example 2 Figure Capture the RAM Data 2 34 Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

53 Getting Started Conclusion The sld_virtual_jtag megafunction gives you the ability to create your own software solution for monitoring, updating, and debugging your designs through the JTAG port without using any I/O pins on the device. It allows you to instrument your design for efficient, fast, and productive debugging solutions. These debugging solutions can be part of an evaluation test where you use other logic analyzers to debug your design or as part of a production test where you do not have a host running an embedded logic analyzer. In addition to helping in debugging, the sld_virtual_jtag megafunction can be used to provide a single channel or multiple serial channels through the JTAG port of the device. These serial channels can be used in many applications to capture data or to force data to various parts of your logic. Altera Corporation 2 35 June 2006 sld_virtual_jtag Megafunction User Guide

54 Design Example Altera Corporation sld_virtual_jtag Megafunction User Guide June 2006

55 3. Specifications Ports & Parameters The tables in this section describe all of the ports and parameters that are available for the sld_virtual_jtag megafunction. Table 3 1 shows the input ports. Table 3 2 shows the output ports. Table 3 3 shows the parameters for the sld_virtual_jtag megafunction. Table 3 1. sld_virtual_jtag Input Ports Port Name Description Comments tdo Write to the TDO pin on the device when the virtual JTAG is in Shift_DR state. ir_out[] Write to the virtual JTAG instruction register. The value is captured every time when virtual_state_cir is high. ir_out[sld_ir_width 1.. 0] wide Table 3 2. sld_virtual_jtag Output Ports (Part 1 of 3) Port Name Description Comments tck JTAG test clock. This port is connected to the TCK pin on the device directly. Shared among all instances. tdi TDI input data on the device used when the virtual JTAG is in Shift_DR state. Shared among all instances. ir_in[] Virtual JTAG instruction register data. High-level Virtual JTAG State Signal virtual_state_cdr Indicates that virtual JTAG is in Capture_DR state. virtual_state_sdr Indicates that virtual JTAG is in Shift_DR state. virtual_state_e1dr Indicates that virtual JTAG is in Exit1_DR state. virtual_state_pdr Indicates that virtual JTAG is in Pause_DR state. Ir_in[SLD_IR_WIDTH-1..0] The value is available and latched when the virtual JTAG is in Update_IR state. At this state, this instance is required to establish the JTAG chain for this device. Quartus II software does not cycle through this state. Altera Corporation 3 1 June 2006 sld_virtual_jtag Megafunction User Guide

Virtual JTAG Megafunction (sld_virtual_jtag)

Virtual JTAG Megafunction (sld_virtual_jtag) UG-SLDVRTL-3.0 Subscribe The Virtual JTAG ( SLD_VIRTUAL_JTAG) megafunction is an Altera -provided megafunction IP core optimized for Altera device architectures. Using megafunctions in place of coding

More information

SignalTap Analysis in the Quartus II Software Version 2.0

SignalTap Analysis in the Quartus II Software Version 2.0 SignalTap Analysis in the Quartus II Software Version 2.0 September 2002, ver. 2.1 Application Note 175 Introduction As design complexity for programmable logic devices (PLDs) increases, traditional methods

More information

SignalTap Plus System Analyzer

SignalTap Plus System Analyzer SignalTap Plus System Analyzer June 2000, ver. 1 Data Sheet Features Simultaneous internal programmable logic device (PLD) and external (board-level) logic analysis 32-channel external logic analyzer 166

More information

Using SignalTap II in the Quartus II Software

Using SignalTap II in the Quartus II Software White Paper Using SignalTap II in the Quartus II Software Introduction The SignalTap II embedded logic analyzer, available exclusively in the Altera Quartus II software version 2.1, helps reduce verification

More information

12. IEEE (JTAG) Boundary-Scan Testing for the Cyclone III Device Family

12. IEEE (JTAG) Boundary-Scan Testing for the Cyclone III Device Family December 2011 CIII51014-2.3 12. IEEE 1149.1 (JTAG) Boundary-Scan Testing for the Cyclone III Device Family CIII51014-2.3 This chapter provides guidelines on using the IEEE Std. 1149.1 boundary-scan test

More information

Implementing Audio IP in SDI II on Arria V Development Board

Implementing Audio IP in SDI II on Arria V Development Board Implementing Audio IP in SDI II on Arria V Development Board AN-697 Subscribe This document describes a reference design that uses the Audio Embed, Audio Extract, Clocked Audio Input and Clocked Audio

More information

CHAPTER 3 EXPERIMENTAL SETUP

CHAPTER 3 EXPERIMENTAL SETUP CHAPTER 3 EXPERIMENTAL SETUP In this project, the experimental setup comprised of both hardware and software. Hardware components comprised of Altera Education Kit, capacitor and speaker. While software

More information

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer 1 P a g e HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer Objectives: Develop the behavioural style VHDL code for D-Flip Flop using gated,

More information

3. Configuration and Testing

3. Configuration and Testing 3. Configuration and Testing C51003-1.4 IEEE Std. 1149.1 (JTAG) Boundary Scan Support All Cyclone devices provide JTAG BST circuitry that complies with the IEEE Std. 1149.1a-1990 specification. JTAG boundary-scan

More information

2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family

2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family December 2011 CIII51002-2.3 2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family CIII51002-2.3 This chapter contains feature definitions for logic elements (LEs) and logic array blocks

More information

Using the XC9500/XL/XV JTAG Boundary Scan Interface

Using the XC9500/XL/XV JTAG Boundary Scan Interface Application Note: XC95/XL/XV Family XAPP69 (v3.) December, 22 R Using the XC95/XL/XV JTAG Boundary Scan Interface Summary This application note explains the XC95 /XL/XV Boundary Scan interface and demonstrates

More information

Video and Image Processing Suite

Video and Image Processing Suite Video and Image Processing Suite August 2007, Version 7.1 Errata Sheet This document addresses known errata and documentation issues for the MegaCore functions in the Video and Image Processing Suite,

More information

Configuring FLASHlogic Devices

Configuring FLASHlogic Devices Configuring FLASHlogic s April 995, ver. Application Note 45 Introduction The Altera FLASHlogic family of programmable logic devices (PLDs) is based on CMOS technology with SRAM configuration elements.

More information

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project COE758 Xilinx ISE 9.2 Tutorial 2 ChipScope Overview Integrating ChipScope Pro into a project Conventional Signal Sampling Xilinx Spartan 3E FPGA JTAG 2 ChipScope Pro Signal Sampling Xilinx Spartan 3E FPGA

More information

Device 1 Device 2 Device 3 Device 4

Device 1 Device 2 Device 3 Device 4 APPLICATION NOTE 0 The Tagalyzer - A JTAG Boundary Scan Debug Tool XAPP 103 March 1, 2007 (Version 1.1) 0 3* Application Note Summary The Tagalyzer is a diagnostic tool that helps debug long JTAG boundary

More information

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1 Debugging of Verilog Hardware Designs on Altera s DE-Series Boards For Quartus Prime 15.1 1 Introduction This tutorial presents some basic debugging concepts that can be helpful in creating Verilog designs

More information

Upgrading a FIR Compiler v3.1.x Design to v3.2.x

Upgrading a FIR Compiler v3.1.x Design to v3.2.x Upgrading a FIR Compiler v3.1.x Design to v3.2.x May 2005, ver. 1.0 Application Note 387 Introduction This application note is intended for designers who have an FPGA design that uses the Altera FIR Compiler

More information

Laboratory Exercise 4

Laboratory Exercise 4 Laboratory Exercise 4 Polling and Interrupts The purpose of this exercise is to learn how to send and receive data to/from I/O devices. There are two methods used to indicate whether or not data can be

More information

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8 CSCB58 - Lab 4 Clocks and Counters Learning Objectives The purpose of this lab is to learn how to create counters and to be able to control when operations occur when the actual clock rate is much faster.

More information

Debugging of VHDL Hardware Designs on Altera s DE2 Boards

Debugging of VHDL Hardware Designs on Altera s DE2 Boards Debugging of VHDL Hardware Designs on Altera s DE2 Boards This tutorial presents some basic debugging concepts that can be helpful in creating VHDL designs for implementation on Altera s DE2 boards. It

More information

Application Note PG001: Using 36-Channel Logic Analyzer and 36-Channel Digital Pattern Generator for testing a 32-Bit ALU

Application Note PG001: Using 36-Channel Logic Analyzer and 36-Channel Digital Pattern Generator for testing a 32-Bit ALU Application Note PG001: Using 36-Channel Logic Analyzer and 36-Channel Digital Pattern Generator for testing a 32-Bit ALU Version: 1.0 Date: December 14, 2004 Designed and Developed By: System Level Solutions,

More information

SDI Audio IP Cores User Guide

SDI Audio IP Cores User Guide SDI Audio IP Cores User Guide Last updated for Altera Complete Design Suite: 14.0 Subscribe UG-SDI-AUD 101 Innovation Drive San Jose, CA 95134 www.altera.com TOC-2 SDI Audio IP Cores User Guide Contents

More information

Using the Quartus II Chip Editor

Using the Quartus II Chip Editor Using the Quartus II Chip Editor June 2003, ver. 1.0 Application Note 310 Introduction Altera FPGAs have made tremendous advances in capacity and performance. Today, Altera Stratix and Stratix GX devices

More information

SDI Audio IP Cores User Guide

SDI Audio IP Cores User Guide SDI Audio IP Cores User Guide Subscribe Last updated for Quartus Prime Design Suite: 16.0 UG-SDI-AUD 101 Innovation Drive San Jose, CA 95134 www.altera.com TOC-2 Contents SDI Audio IP Cores Overview...1-1

More information

SDI II MegaCore Function User Guide

SDI II MegaCore Function User Guide SDI II MegaCore Function SDI II MegaCore Function 1 Innovation Drive San Jose, CA 95134 www.altera.com UG-01125-1.0 Document last updated for Altera Complete Design Suite version: Document publication

More information

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0.

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0. Entry Level Tool II Reference Manual, Inc. (USA) 14100 Murphy Avenue San Martin, CA 95046 (408) 852-0067 http://www.slscorp.com Version : 1.0.3 Date : October 7, 2005 Copyright 2005-2006,, Inc. (SLS) All

More information

Intel FPGA SDI II IP Core User Guide

Intel FPGA SDI II IP Core User Guide Intel FPGA SDI II IP Core User Guide Updated for Intel Quartus Prime Design Suite: 17.1 Subscribe Send Feedback Latest document on the web: PDF HTML Contents Contents 1 Intel FPGA SDI II IP Core Quick

More information

SERDES Eye/Backplane Demo for the LatticeECP3 Serial Protocol Board User s Guide

SERDES Eye/Backplane Demo for the LatticeECP3 Serial Protocol Board User s Guide for the LatticeECP3 Serial Protocol Board User s Guide March 2011 UG24_01.4 Introduction This document provides technical information and instructions on using the LatticeECP3 SERDES Eye/Backplane Demo

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

Using the XSV Board Xchecker Interface

Using the XSV Board Xchecker Interface Using the XSV Board Xchecker Interface May 1, 2001 (Version 1.0) Application Note by D. Vanden Bout Summary This application note shows how to configure the XC9510 CPLD on the XSV Board to enable the programming

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

11. JTAG Boundary-Scan Testing in Stratix V Devices

11. JTAG Boundary-Scan Testing in Stratix V Devices ecember 2 SV52-.4. JTAG Boundary-Scan Testing in Stratix V evices SV52-.4 This chapter describes the boundary-scan test (BST) features that are supported in Stratix V devices. Stratix V devices support

More information

9. Synopsys PrimeTime Support

9. Synopsys PrimeTime Support 9. Synopsys PrimeTime Support December 2010 QII53005-10.0.1 QII53005-10.0.1 PrimeTime is the Synopsys stand-alone full chip, gate-level static timing analyzer. The Quartus II software makes it easy for

More information

Section 24. Programming and Diagnostics

Section 24. Programming and Diagnostics Section. and Diagnostics HIGHLIGHTS This section of the manual contains the following topics:.1 Introduction... -2.2 In-Circuit Serial... -2.3 Enhanced In-Circuit Serial... -5.4 JTAG Boundary Scan... -6.5

More information

Altera JESD204B IP Core and ADI AD9144 Hardware Checkout Report

Altera JESD204B IP Core and ADI AD9144 Hardware Checkout Report 2015.12.18 Altera JESD204B IP Core and ADI AD9144 Hardware Checkout Report AN-749 Subscribe The Altera JESD204B IP core is a high-speed point-to-point serial interface intellectual property (IP). The JESD204B

More information

Altera JESD204B IP Core and ADI AD6676 Hardware Checkout Report

Altera JESD204B IP Core and ADI AD6676 Hardware Checkout Report 2015.11.02 Altera JESD204B IP Core and ADI AD6676 Hardware Checkout Report AN-753 Subscribe The Altera JESD204B IP Core is a high-speed point-to-point serial interface intellectual property (IP). The JESD204B

More information

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7 California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 322: Digital Design with VHDL Laboratory 7 Rational: The purpose of this lab is to become familiar in using

More information

SignalTap: An In-System Logic Analyzer

SignalTap: An In-System Logic Analyzer SignalTap: An In-System Logic Analyzer I. Introduction In this chapter we will learn 1 how to use SignalTap II (SignalTap) (Altera Corporation 2010). This core is a logic analyzer provided by Altera that

More information

The ASI demonstration uses the Altera ASI MegaCore function and the Cyclone video demonstration board.

The ASI demonstration uses the Altera ASI MegaCore function and the Cyclone video demonstration board. April 2006, version 2.0 Application Note Introduction A digital video broadcast asynchronous serial interace (DVB-) is a serial data transmission protocol that transports MPEG-2 packets over copper-based

More information

DE2-115/FGPA README. 1. Running the DE2-115 for basic operation. 2. The code/project files. Project Files

DE2-115/FGPA README. 1. Running the DE2-115 for basic operation. 2. The code/project files. Project Files DE2-115/FGPA README For questions email: jeff.nicholls.63@gmail.com (do not hesitate!) This document serves the purpose of providing additional information to anyone interested in operating the DE2-115

More information

University Program Design Laboratory Package

University Program Design Laboratory Package University Program Design Laboratory Package November 1999, ver. 1.02 User Guide Introduction The University Program Design Laboratory Package was designed to meet the needs of universities teaching digital

More information

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr Application Note AN2387/D Rev. 0, 11/2002 MPC8xx Using BDM and JTAG Robert McEwan NCSD Applications East Kilbride, Scotland As the technical complexity of microprocessors has increased, so too has the

More information

Serial Digital Interface Demonstration for Stratix II GX Devices

Serial Digital Interface Demonstration for Stratix II GX Devices Serial Digital Interace Demonstration or Stratix II GX Devices May 2007, version 3.3 Application Note 339 Introduction The serial digital interace (SDI) demonstration or the Stratix II GX video development

More information

White Paper Lower Costs in Broadcasting Applications With Integration Using FPGAs

White Paper Lower Costs in Broadcasting Applications With Integration Using FPGAs Introduction White Paper Lower Costs in Broadcasting Applications With Integration Using FPGAs In broadcasting production and delivery systems, digital video data is transported using one of two serial

More information

FPGA TechNote: Asynchronous signals and Metastability

FPGA TechNote: Asynchronous signals and Metastability FPGA TechNote: Asynchronous signals and Metastability This Doulos FPGA TechNote gives a brief overview of metastability as it applies to the design of FPGAs. The first section introduces metastability

More information

Comparing JTAG, SPI, and I2C

Comparing JTAG, SPI, and I2C Comparing JTAG, SPI, and I2C Application by Russell Hanabusa 1. Introduction This paper discusses three popular serial buses: JTAG, SPI, and I2C. A typical electronic product today will have one or more

More information

ECE337 Lab 4 Introduction to State Machines in VHDL

ECE337 Lab 4 Introduction to State Machines in VHDL ECE337 Lab Introduction to State Machines in VHDL In this lab you will: Design, code, and test the functionality of the source version of a Moore model state machine of a sliding window average filter.

More information

FPGA Development for Radar, Radio-Astronomy and Communications

FPGA Development for Radar, Radio-Astronomy and Communications John-Philip Taylor Room 7.03, Department of Electrical Engineering, Menzies Building, University of Cape Town Cape Town, South Africa 7701 Tel: +27 82 354 6741 email: tyljoh010@myuct.ac.za Internet: http://www.uct.ac.za

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Nate Pihlstrom, npihlstr@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

Altera's 28-nm FPGAs Optimized for Broadcast Video Applications

Altera's 28-nm FPGAs Optimized for Broadcast Video Applications Altera's 28-nm FPGAs Optimized for Broadcast Video Applications WP-01163-1.0 White Paper This paper describes how Altera s 40-nm and 28-nm FPGAs are tailored to help deliver highly-integrated, HD studio

More information

Chapter 19 IEEE Test Access Port (JTAG)

Chapter 19 IEEE Test Access Port (JTAG) Chapter 9 IEEE 49. Test Access Port (JTAG) This chapter describes configuration and operation of the MCF537 JTAG test implementation. It describes the use of JTAG instructions and provides information

More information

Testing Sequential Logic. CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Testing Sequential Logic (cont d) Testing Sequential Logic (cont d)

Testing Sequential Logic. CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Testing Sequential Logic (cont d) Testing Sequential Logic (cont d) Testing Sequential Logic CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Electrical and Computer Engineering University of Alabama in Huntsville In general, much more difficult than testing combinational

More information

Experiment: FPGA Design with Verilog (Part 4)

Experiment: FPGA Design with Verilog (Part 4) Department of Electrical & Electronic Engineering 2 nd Year Laboratory Experiment: FPGA Design with Verilog (Part 4) 1.0 Putting everything together PART 4 Real-time Audio Signal Processing In this part

More information

University Program Design Laboratory Package

University Program Design Laboratory Package University Program Design Laboratory Package October 2001, ver. 2.0 User Guide Introduction The University Program (UP) Design Laboratory Package was designed to meet the needs of universities teaching

More information

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

FPGA Laboratory Assignment 4. Due Date: 06/11/2012 FPGA Laboratory Assignment 4 Due Date: 06/11/2012 Aim The purpose of this lab is to help you understanding the fundamentals of designing and testing memory-based processing systems. In this lab, you will

More information

Flip-flop and Registers

Flip-flop and Registers ECE 322 Digital Design with VHDL Flip-flop and Registers Lecture Textbook References n Sequential Logic Review Stephen Brown and Zvonko Vranesic, Fundamentals of Digital Logic with VHDL Design, 2 nd or

More information

OpenXLR8: How to Load Custom FPGA Blocks

OpenXLR8: How to Load Custom FPGA Blocks OpenXLR8: How to Load Custom FPGA Blocks Webinar Breakdown: Introduc*on to pseudorandom number generator (LFSR) code Review of Verilog wrapper interface to microcontroller Simula*on with Mentor Graphics

More information

Serial Digital Interface Reference Design for Stratix IV Devices

Serial Digital Interface Reference Design for Stratix IV Devices Serial Digital Interface Reference Design for Stratix IV Devices AN-600-1.2 Application Note The Serial Digital Interface (SDI) reference design shows how you can transmit and receive video data using

More information

Raspberry Pi debugging with JTAG

Raspberry Pi debugging with JTAG Arseny Kurnikov Aalto University December 13, 2013 Outline JTAG JTAG on RPi Linux kernel debugging JTAG Joint Test Action Group is a standard for a generic transport interface for integrated circuits.

More information

Lab 3: VGA Bouncing Ball I

Lab 3: VGA Bouncing Ball I CpE 487 Digital Design Lab Lab 3: VGA Bouncing Ball I 1. Introduction In this lab, we will program the FPGA on the Nexys2 board to display a bouncing ball on a 640 x 480 VGA monitor connected to the VGA

More information

Section 24. Programming and Diagnostics

Section 24. Programming and Diagnostics Section. Programming and Diagnostics HIGHLIGHTS This section of the manual contains the following topics:.1 Introduction... -2.2 In-Circuit Serial Programming... -3.3 Enhanced In-Circuit Serial Programming...

More information

Design and Implementation of SOC VGA Controller Using Spartan-3E FPGA

Design and Implementation of SOC VGA Controller Using Spartan-3E FPGA Design and Implementation of SOC VGA Controller Using Spartan-3E FPGA 1 ARJUNA RAO UDATHA, 2 B.SUDHAKARA RAO, 3 SUDHAKAR.B. 1 Dept of ECE, PG Scholar, 2 Dept of ECE, Associate Professor, 3 Electronics,

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory Problem Set Issued: March 3, 2006 Problem Set Due: March 15, 2006 Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.111 Introductory Digital Systems Laboratory

More information

Partial Reconfiguration IP Core

Partial Reconfiguration IP Core 2015.05.04 UG-PARTRECON Subscribe Partial reconfiguration (PR) is fully supported in the Stratix V device family, which offers you the ability to reconfigure part of the design's core logic such as LABs,

More information

EECS 578 SVA mini-project Assigned: 10/08/15 Due: 10/27/15

EECS 578 SVA mini-project Assigned: 10/08/15 Due: 10/27/15 EECS578 Prof. Bertacco Fall 2015 EECS 578 SVA mini-project Assigned: 10/08/15 Due: 10/27/15 1. Overview This project focuses on designing a test plan and a set of test programs for a digital reverberation

More information

SDI MegaCore Function User Guide

SDI MegaCore Function User Guide SDI MegaCore Function User Guide 101 Innovation Drive San Jose, CA 95134 www.altera.com MegaCore Version: 8.1 Document Date: November 2008 Copyright 2008 Altera Corporation. All rights reserved. Altera,

More information

University Program Design Laboratory Package

University Program Design Laboratory Package University Program Design Laboratory Package August 1997, ver. 1 User Guide Introduction The University Program Design Laboratory Package was designed to meet the needs of universities teaching digital

More information

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies 8 Nov 25 Testing and Programming PCBA s JTAG Technologies The importance of Testing Don t ship bad products to your customers, find problems before they do. DOA s (Death On Arrival) lead to huge costs

More information

Ilmenau, 9 Dec 2016 Testing and programming PCBA s. 1 JTAG Technologies

Ilmenau, 9 Dec 2016 Testing and programming PCBA s. 1 JTAG Technologies Ilmenau, 9 Dec 206 Testing and programming PCBA s JTAG Technologies The importance of Testing Don t ship bad products to your customers, find problems before they do. DOA s (Death On Arrival) lead to huge

More information

Synchronous Sequential Logic

Synchronous Sequential Logic Synchronous Sequential Logic Ranga Rodrigo August 2, 2009 1 Behavioral Modeling Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to describe sequential

More information

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller XAPP22 (v.) January, 2 R Application Note: Virtex Series, Virtex-II Series and Spartan-II family LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller Summary Linear Feedback

More information

SERDES Eye/Backplane Demo for the LatticeECP3 Versa Evaluation Board User s Guide

SERDES Eye/Backplane Demo for the LatticeECP3 Versa Evaluation Board User s Guide SERDES Eye/Backplane Demo for the LatticeECP3 Versa Evaluation Board User s Guide May 2011 UG44_01.1 Introduction This document provides technical information and instructions on using the LatticeECP3

More information

EEM Digital Systems II

EEM Digital Systems II ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EEM 334 - Digital Systems II LAB 3 FPGA HARDWARE IMPLEMENTATION Purpose In the first experiment, four bit adder design was prepared

More information

ECE 270 Lab Verification / Evaluation Form. Experiment 9

ECE 270 Lab Verification / Evaluation Form. Experiment 9 ECE 270 Lab Verification / Evaluation Form Experiment 9 Evaluation: IMPORTANT! You must complete this experiment during your scheduled lab period. All work for this experiment must be demonstrated to and

More information

BABAR IFR TDC Board (ITB): system design

BABAR IFR TDC Board (ITB): system design BABAR IFR TDC Board (ITB): system design Version 1.1 12 december 1997 G. Crosetti, S. Minutoli, E. Robutti I.N.F.N. Genova 1. Introduction TDC readout of the IFR will be used during BABAR data taking to

More information

AN 823: Intel FPGA JESD204B IP Core and ADI AD9625 Hardware Checkout Report for Intel Stratix 10 Devices

AN 823: Intel FPGA JESD204B IP Core and ADI AD9625 Hardware Checkout Report for Intel Stratix 10 Devices AN 823: Intel FPGA JESD204B IP Core and ADI AD9625 Hardware Checkout Report for Intel Stratix 10 Devices Subscribe Send Feedback Latest document on the web: PDF HTML Contents Contents 1 Intel FPGA JESD204B

More information

Partial Reconfiguration IP Core User Guide

Partial Reconfiguration IP Core User Guide Partial Reconfiguration IP Core User Guide ug-partrecon 2016.10.31 Subscribe Send Feedback Contents Contents 1 Partial Reconfiguration IP Core... 3 1.1 Instantiating the Partial Reconfiguration IP Core

More information

In-System Programmability Guidelines

In-System Programmability Guidelines In-System Programmability Guidelines May 1999, ver. 3 Application Note 100 Introduction As time-to-market pressures increase, design engineers require advanced system-level products to ensure problem-free

More information

VHDL test bench for digital image processing systems using a new image format

VHDL test bench for digital image processing systems using a new image format VHDL test bench for digital image processing systems using a new image format A. Zuloaga, J. L. Martín, U. Bidarte, J. A. Ezquerra Department of Electronics and Telecommunications, University of the Basque

More information

Registers and Counters

Registers and Counters Registers and Counters A register is a group of flip-flops which share a common clock An n-bit register consists of a group of n flip-flops capable of storing n bits of binary information May have combinational

More information

Document Part Number: Copyright 2010, Corelis Inc.

Document Part Number: Copyright 2010, Corelis Inc. CORELIS Low Voltage Adapter Low Voltage Adapter Boundary-Scan Interface User s Manual Document Part Number: 70398 Copyright 2010, Corelis Inc. Corelis, Inc. 12607 Hiddencreek Way Cerritos, CA 90703-2146

More information

Lab 4: Hex Calculator

Lab 4: Hex Calculator CpE 487 Digital Design Lab Lab 4: Hex Calculator 1. Introduction In this lab, we will program the FPGA on the Nexys2 board to function as a simple hexadecimal calculator capable of adding and subtracting

More information

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies 6 Dec 24 Testing and Programming PCBA s JTAG Technologies The importance of Testing Don t ship bad products to your customers, find problems before they do. DOA s (Death On Arrival) lead to huge costs

More information

7 Nov 2017 Testing and programming PCBA s

7 Nov 2017 Testing and programming PCBA s 7 Nov 207 Testing and programming PCBA s Rob Staals JTAG Technologies Email: robstaals@jtag.com JTAG Technologies The importance of Testing Don t ship bad products to your customers, find problems before

More information

LAX_x Logic Analyzer

LAX_x Logic Analyzer Legacy documentation LAX_x Logic Analyzer Summary This core reference describes how to place and use a Logic Analyzer instrument in an FPGA design. Core Reference CR0103 (v2.0) March 17, 2008 The LAX_x

More information

AN 848: Implementing Intel Cyclone 10 GX Triple-Rate SDI II with Nextera FMC Daughter Card Reference Design

AN 848: Implementing Intel Cyclone 10 GX Triple-Rate SDI II with Nextera FMC Daughter Card Reference Design AN 848: Implementing Intel Cyclone 10 GX Triple-Rate SDI II with Nextera FMC Daughter Card Reference Design Updated for Intel Quartus Prime Design Suite: 18.0 Subscribe Send Feedback Latest document on

More information

Altera JESD204B IP Core and ADI AD9250 Hardware Checkout Report

Altera JESD204B IP Core and ADI AD9250 Hardware Checkout Report 2015.06.25 Altera JESD204B IP Core and ADI AD9250 Hardware Checkout Report AN-JESD204B-AV Subscribe The Altera JESD204B IP core is a high-speed point-to-point serial interface intellectual property (IP).

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory Problem Set Issued: March 2, 2007 Problem Set Due: March 14, 2007 Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.111 Introductory Digital Systems Laboratory

More information

SAU510-USB ISO PLUS v.2 JTAG Emulator. User s Guide 2013.

SAU510-USB ISO PLUS v.2 JTAG Emulator. User s Guide 2013. User s Guide 2013. Revision 1.00 JUL 2013 Contents Contents...2 1. Introduction to...4 1.1 Overview of...4 1.2 Key Features of...4 1.3 Key Items of...5 2. Plugging...6 2.1. Equipment required...6 2.2.

More information

Product Update. JTAG Issues and the Use of RT54SX Devices

Product Update. JTAG Issues and the Use of RT54SX Devices Product Update Revision Date: September 2, 999 JTAG Issues and the Use of RT54SX Devices BACKGROUND The attached paper authored by Richard B. Katz of NASA GSFC and J. J. Wang of Actel describes anomalies

More information

Chapter 10 Exercise Solutions

Chapter 10 Exercise Solutions VLSI Test Principles and Architectures Ch. 10 oundary Scan & Core-ased Testing P. 1/10 Chapter 10 Exercise Solutions 10.1 The following is just an example for testing chips and interconnects on a board.

More information

Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG

Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG Titl Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG Application Note March 29, 2012 About this Document This document discusses common problems that are encountered when debugging with a board that

More information

XJTAG DFT Assistant for

XJTAG DFT Assistant for XJTAG DFT Assistant for Installation and User Guide Version 1.0 enquiries@xjtag.com Table of Contents SECTION PAGE 1. Introduction...3 2. Installation...3 3. Quick Start Guide...3 4. User Guide...4 4.1.

More information

8. Stratix GX Built-In Self Test (BIST)

8. Stratix GX Built-In Self Test (BIST) 8. Stratix GX Built-In Self Test (BIST) SGX52008-1.1 Introduction Each Stratix GX channel in the gigabit transceiver block contains embedded built-in self test (BIST) circuitry, which is available for

More information

CoLinkEx JTAG/SWD adapter USER MANUAL

CoLinkEx JTAG/SWD adapter USER MANUAL CoLinkEx JTAG/SWD adapter USER MANUAL rev. A Website: www.bravekit.com Contents Introduction... 3 1. Features of CoLinkEX adapter:... 3 2. Elements of CoLinkEx programmer... 3 2.1. LEDs description....

More information

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018 Petter Källström, Mario Garrido September 10, 2018 Abstract In the initialization of the DE2-115 (after you restart it), an image is copied into the SRAM memory. What you have to do in this lab is to read

More information

Digital Electronics II 2016 Imperial College London Page 1 of 8

Digital Electronics II 2016 Imperial College London Page 1 of 8 Information for Candidates: The following notation is used in this paper: 1. Unless explicitly indicated otherwise, digital circuits are drawn with their inputs on the left and their outputs on the right.

More information

Spartan-II Development System

Spartan-II Development System 2002-May-4 Introduction Dünner Kirchweg 77 32257 Bünde Germany www.trenz-electronic.de The Spartan-II Development System is designed to provide a simple yet powerful platform for FPGA development, which

More information

Programmable Logic Design I

Programmable Logic Design I Programmable Logic Design I Introduction In labs 11 and 12 you built simple logic circuits on breadboards using TTL logic circuits on 7400 series chips. This process is simple and easy for small circuits.

More information

Laboratory Exercise 6

Laboratory Exercise 6 Laboratory Exercise 6 The purpose of this exercise is to investigate latches, flip-flops, and counters. Part I Altera FPGAs include flip-flops that are available for implementing a user s circuit. We will

More information