This chapter gives specific information about using jtagprog in a workstation or PC environment to perform JTAG operations. You can use jtagprog to download, read back, verify design configuration data for any device, and to probe internal logic states of an CPLD design.
JTAG Programmer batch software support the following capabilities.
This chapter contains the following sections:
This section describes the JTAG Programmer files and commands.
You must become familiar with the following files, which are used by the JTAG Programmer software.
The design.jed file contains the configuration information for the target design in JEDEC 3-C standard formats. The file is generated by the fitter software. This file may optionally contain functional test vectors to do functional verification of XC9500 devices.
The jtagprogrammer.pro file contains the default values for all JTAG Programmer options: part, design, baud, and port. These option values are updated at the end of every JTAG Programmer session. For JTAG Programmer to recognize a jtagprogrammer.pro file, it must be located in the current working directory.
The batch files are text files used to execute commands in the batch mode, and the extension .cmd is required.
The bsd files contain Boundary Scan Description Language (BSDL) specifications of the operation of the boundary-scan logic of a given device. For any non-XC9500 device in your boundary-scan chain, you are required to supply this file.
You can start JTAG Programmer using interactive commands from the system shell. This mode offers additional commands for download and readback and also allows you to probe the internal logic states of the target system device.
You can download a design after connecting the cable to the host system and target system. To download a design, enter the following command at the operating system prompt.
jtagprog
When you do not specify any options, the JTAG Programmer software selects the port where the cable is connected and sets the baud rate to the maximum allowed by the platform. You can modify the communication port and baud rate by changing the appropriate settings in the xchecker.pro file.
program design_name
After you have properly configured a device, you can verify its configuration and compare it to your original design.
In most applications, verification is not needed, but this feature can be helpful with designs that experience extremely unstable or noisy VCC conditions.
To execute a readback after the device has been in operation, use the interactive commands, as follows:
jtagprog
This command invokes the interactive mode, and the [JTAGProgrammer::(#)] > prompt appears (the # in the prompt string is the current command number).
[JTAGProgrammer::(#)] > part part_type:design_name
The part commands identifies the number the number, type, name and order of devices in the boundary-scan chain. In this case there is one device only. Then to program the device, enter:
[JTAGProgrammer::(#)] > program design_name
The program command downloads design.jed to the target device. If you want a readback after the target device is in operation, you can execute the Verify command.
[JTAGProgrammer::(#)] > verify design_name
This command initiates a readback, and compares the data to the design.jed file.
You may also execute the program and verify operations in one step by typing:
[JTAGProgrammer::(#)] > program -v design_name
This section describes the JTAG Programmer command-line options. The data files are configuration bitstream files in JEDEC format. When you do not specify any options or data files, the system defaults to the interactive mode.
The command-line syntax is as follows:
jtagprog options
You can abbreviate all options to the minimum number of distinctive characters in the option name.
Commands and options are not case-sensitive.
Syntax: -batch bat_file.cmd
Abbreviation : b
The Batch option executes commands in batch mode. The bat_file must have a ".cmd" extension and contain valid JTAG Programmer commands, including interactive commands. You can add comments to files by using the # symbol, either on the command line or on a new line.
Syntax: -help
Abbreviation: h
The Help option displays command line usage information.
Syntax: -log filename.log
Abbreviation: -l
Captures all output to the specified log file.
Syntax: -port portname
Abbreviation: po
The Specify Port Name option identifies the port connection for the XChecker cable. If you do not specify this option, the default option AUTO, searches for the cable connected to any port, parallel or serial. Valid ports for supported platforms are listed in Table E-1.
Platform | Communication Ports | |||
IBM PC | com1 | com2 | lpt1* | lpt2* |
Sun | /dev/ttya** | /dev/ttyb** | ||
HP | /dev/tty00 | /dev/tty01 |
*Use with the parallel download cable only.
**ttya and ttyb must be readable and writable to ensure a proper connection.
This section describes the JTAG Programmer interactive mode commands. To use the interactive mode commands, you enter jtagprog at the system prompt.
You can abbreviate the commands using the least number of distinctive characters, as with the command line options, but you must use at least two characters. You can repeat the previous command using either an equal sign, "=," or an exclamation point, "!."
Syntax: autoconfigure
Abbreviation: autoc
This command queries all the devices in the chain and attempts t o identify the boundary-scan chain composition using the IDCODE instruction. The command returns a list of devices in the chain and their position with device 1 being closest to the system TDI. Parts that have not implemented IDCODE or those parts whose IDCODE is unrecognized will be identified as unknown devices.
Syntax: batch bat_file.cmd
Abbreviation: bat
The Batch command executes commands in a batch mode. The bat_file must have a .cmd extension and contain valid JTAG Programmer commands. Use the pound sign, "#" to precede comment lines in the batch file.
The following examples show two methods of using the Batch command from the JTAG Programmer prompt:
batch bat_file.cmd
< bat_file.cmd
Syntax : baud baud_rate
Abbreviation: bau
The Baud command specifies a communication baud rate. At initialization, the fastest baud rate for your host system is automatically selected. Table E-2 lists the valid baud rates.
Platform | Baud Rate | ||
---|---|---|---|
9600 | 19200 | 38400 | |
IBM PC | X | X | X |
Sun | X | X | X |
HP 700 | X | X | X |
Syntax: dump [-h] part_name -j file_name
Abbreviation
The dump command will read the contents of a part and create a JEDEC file with the results. The file created will default to part_name.jed. Optionally, you may specify your own name using the -j flag. The part_name must have been specified with the part command.
The -h flag specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.
Syntax: erase [-f] [-h] part_name
Abbreviation
This command erases the programmed contents of the specified part. The part_name must have been specified with the part command. The option -f is used to reset write-protect.
The -h flag specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.
Syntax: exit
Abbreviation: exi
The Exit command terminates the current JTAG Programmer session, asks you whether to save current program options in the xchecker.pro file, and returns you to the system shell.
Syntax : functest [-h] part_name [-j file_name]
Abbreviation : no abbreviation
The functest command will run the functional vectors in the associated JEDEC file (file_name) on the specified device (part_name) using the intest command. If the part_name is the same as the JEDEC file_name, then the file_name does not need to be specified. The part_name must have been specified with the part command.
The -h flag specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.
Syntax : help topic
Abbreviation: he
The Help command displays online help for the topic requested in 24-line segments. Enter y to scroll forward to the next 24 lines. Enter n to exit Help.
Syntax: log -out file_name string
Abbreviation: log
The Log command sends the screen output to the file_name file. Use this command to capture the output of a Readback or a Show command.
There is one option for the Log command.
The -out option closes any previous log file, opens a new one, and places the string at the beginning of the file.
There is one variable for the Log command:
Use the variable string to insert your comments into the log file, which normally only captures the screen display.
Syntax: opgroup groupname partname:jedec_file
Abbreviation: none
This command is used to set up groups of devices for concurrent operations. Each group specified must have a unique name and can include any number of devices in the boundary-scan chain. The devices are identified by using the partname specified in the part command. You may optionally specify a full path name to the jedec file for each partname.
The opgroup command can be invoked only after a part command has been issued.
The groupname designated in the opgroup command can be used in place of the partname in the erase, program or verify commands to execute concurrent operations on all devices in that group.
Syntax: part device_type:part_name device_type:part_name ...
Abbreviation : pa
This command must be executed first. It describes the devices in the chain to the software. The device_type is used to find the BSDL file associated with each part. BSDL files must be named device_type.bsd. The part_name is an arbitrary name to associate with the device instance in the chain. It will usually be the proper name (the file name without the extension) of the JEDEC file associated with the device at that location in the boundary-scan chain, although it could be anything. The boundary scan chain order must start with the closest device to TDI, and proceed in order through the chain until it reaches the last device, which is closest to TDO. When multiple "part" commands are issued, the information associated with the very last is maintained.
Syntax: partinfo [-h] -id -signature -checksum part_name -j jedec_file_name
Abbreviation
The partinfo command returns the manufacturer's identification (id), the user signature (-signature) or the device checksum (-checksum) for a particular part_name. Any or all of the three switches may be specified in a single command. The part_name must have been specified in the part command. When calculating the checksum the JEDEC file should be specified as well to indicate the expected checksum.
The -h flag specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.
Syntax: port portname
Abbreviation: po
The port command specifies the download/readback port. Table 3-5 lists the valid entries; the ports listed in bold face are the defaults. If the port is defined as Auto, all ports are scanned to search for a cable.
Platform | Communication Ports | |||
IBM PC | com1 | com2 | lpt1* | lpt2* |
Sun | /dev/ttya** | /dev/ttyb** | ||
HP700 | /dev/tty00 | /dev/tty01 |
*Use with the parallel download cable only.
**ttya and ttyb must be readable and writable to ensure a proper connection.
Syntax: program [-v] [-t] [-s] [-p] [-h] part_name [-j file_name]
Abbreviation
This command programs the specified part. If the part_name is the same as the JEDEC file_name, then the file_name does not need to be specified. The part_name must have been set in the part command. There are four options that may be specified (individually or together):
-v after programming the device reads back the contents and verifies that they agree with the associated JEDEC file.
-t executes a functional test after programming using the vectors contained in the associated JEDEC file.
-s sets data security in the device. This disables readback of the device's programmed contents. The device must be erased to reprogram it.
-p sets data protect in the device. This disables over-write of the device`s programmed contents. The device cannot be erased or re-programmed.
-b skips the erase of the device prior to programming.
-h specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.
Syntax: quit
Abbreviation: qu
The Quit command terminates the current JTAG Programmer session and asks you whether to save current program options in the xchecker.pro file.
Syntax: reset [-cable]
Abbreviation: res
The Reset command resets the boundary-scan TAP state machines or the XChecker cable. The default is to reset the boundary-scan TAP state machines.
There is one option for the Reset command.
The -cable option reprograms the XChecker cable's internal FPGA. It re-initializes the cable, including setting the correct baud rate. This option is useful in the event of power glitches that could affect proper cable operation.
With this option, you could remove power from the target system, then restore power, while running JTAG Programmer; the Reset command re-initializes the cable to the proper settings.
Syntax: save
Abbreviation: sa
The Save command saves the settings of four interactive command results in the jtagprogrammer.pro file; baud rate (Baud command), design name (Load command), device type (Parttype command) and port name (Port command).
Syntax: settings
Abbreviation: se
The Settings command provides a listing of the following information; the port name, the baud rate, the type of cable, the design name, the part type and package type, the clock source, and hardware trigger status. It also lists the number of clocks for the first and subsequent snapshots, the number of signals defined in the probe list, and the number of signals defined in the display list.
Syntax: sys
Abbreviation: none
The Sys command allows you to temporarily exit from JTAG Programmer to the operating system prompt. Enter exit to return to JTAG Programmer.
Syntax: verify [-h] part_name [-j file_name]
Abbreviation: ve
This command reads back the configuration registers of the specified part and compares its contents against the JEDEC file. If the part_name is the same as the JEDEC file_name, the file_name does not need to be specified.
The -h flag specifies that all untargeted parts should use HIGHZ mode as the BYPASS method. This will float all untargeted device output pins and can reduce system noise in active environments.