작성일: 1999.06.02

Using the Java API for Boundary-Scan...

Introduction

Using the Java API for Boundary-Scan is easy. In order to set up your system to run it, you will need to download a Java Run-Time Environment appropriate for your platform. In this document we will describe the steps required to set your system up to run a sample application or develop your own boundary-scan programs.

The Java Run-Time Environment (JRE)

The multiplicity of different providers of Java tools allow you to pick and choose you run-time environment according to your specific needs. In this document we will assume that you are targeting a PC running Windows (95/98/NT). We will also use the JRE supplied by Sun Microsystems as the example.

The Java API for Boundary-Scan that you have access to will work with any available JRE. For the purposes of this example we will use the latest version (JRE 1.2). To download this, point your browser to http://java.sun.com/products/jdk/1.2/jre/download-windows.html. Follow the instructions to download and install JRE 1.2.

The installed Java Virtual Machine will be invoked by typing Java and the application class file name along with any run time switches in a DOS window.

The Java API for Boundary-Scan

In order to run the sample algorithms included to program and test Xilinx XC9500/XL/XV CPLD's you are presumed to have already downloaded and installed the parallel port driver associated with Xilinx’s parallel download cable. If you have not already installed this driver you may do so by installing Xilinx's JTAGProgrammer download tool. To do this, point your browser to: http://www.xilinx.com/isp/toolbox.htm - JTAG Programmer Software and and follow the instructions. Remember to reboot your PC after installation to start the driver.

Install the javascanhwif.dll file in your <win root>\system or <win root>\system32 directory to facilitate access from the Java application to the Xilinx Parallel Download Cable.

The Java API for Boundary-Scan reference implementation and javadoc hypertext documentation is contained in the jscan.zip file included in this package. You can leave this file intact and make certain that your CLASSPATH variable includes the full path name to this zip file. If you want, you may unzip the file to review the API documentation in your browser as well as examine the source code for the reference implementation.

Note that all Java API for Boundary-Scan classes are part of the com.scan package. In any application developed using the Java API for Boundary-Scan always include the following import statements:

Applications Using the Java API for Boundary-Scan

Included with this package are two sample applications. One (xc9500) will allow erase, programming and verification of XC9500 devices in a boundary-scan chain. The other (xc9500x) will allow erase, programming and verification of XC9500XL and XC9500XV devices in a boundary-scan chain. These stand-alone applications are meant to serve as examples of the type of the operations that can be executed using the Java API for Boundary-Scan.

The xc9500 Application

This application allows access to the any number of xc9500 devices in a boundary-scan chain. To invoke the application type:

The xc9500x Application

This application allows access to the any number of xc9500xl or xc9500xv devices in a boundary-scan chain. To invoke the application type:

java xc9500x <-erase|-program|-verify> <dat file1|-bypass N> <dat file2|-bypass M> ...

Either a <dat file> or a specification of the boundary-scan instruction register length in bits (-bypass <Register length> must specify each device in the boundary-scan chain. The order of the specification is from system TDI to system TDO.

  • -erase : erase all xc9500xl or xc9500xv devices in the chain
  • -program: program all xc9500xl or xc9500xv in the chain
  • -verify: readback the contents of all xc9500xl or xc9500xv devices in the chain and compare against the specified data file(s)

Example Invocation

java xc9500 –erase –program sample1.dat –bypass 3 sample2.dat –bypass 8

The above command line specifies that there are four devices in the boundary-scan chain. The first device uses the sample1.dat file for its programming data; the second device has an instruction register length of 3 and is bypassed. The third device uses the programming data specified in sample2.dat and the fourth device is bypassed using an instruction register of length 8. The two PLD's will be erased and then programmed.

Generating a dat File

In order to use the sample boundary-scan applications, it is necessary to generate the input data file known as the dat file. Taking the intermediate xbt file generated by the JTAGProgrammer and processing it using a translator generates this dat file.

The translator is called xbt2dat and is invoked as follows:

java xbt2data <device type> <xbt file name> <dat file name>

The <device type> is the exact CPLD type (i.e., xc9536, xc95144xl, xc9572xv, etc.). Note that this data cannot be verified so you must be careful when specifying this information. The <xbt file name> is the full path name to the xbt file that you wish to translate. The <dat file name> is the name of the resulting dat file that should be created.

Example Invocation

java xbt2dat xc9536xl design1.xbt design1.dat

The above command line specifies that programming data from design1.xbt describing an xc9536xl CPLD should be translated and reformatted into the file design1.dat for use with the xc9500x application.


** - simply better informations - **

** send mail ** Send to a colleague | ** print icon ** Print this document