Test Device Files and Circuit Code Files
The Distinction Between Test Device Files and Circuit Code Files
A device file is effectively a model of the type of device it is describing, and any test code in that file is intended to test that type of device in whatever circuit it is used. It is therefore circuit-agnostic. This simplifies the creation of boundary scan tests because these generic files can be used in different projects without having to be edited. If it is ever necessary to test something that’s specific to a particular design, a "circuit code file" should be used instead.
Circuit code files are also written in the XJEase language but, whereas test device files are related to the device type, circuit code files are specific to the circuit being tested. They often call test functions from test device files and are used in two scenarios:
- When creating tests that use more than one device: for example, if a test is to be performed that includes a loopback between a transmitter and a receiver, a circuit code file will be needed to perform the overall test. The transmitter and receiver will each have their own test device file containing generic functions for their device type, and the circuit code file will call those functions.
- When creating circuit-specific tests: for example, a test may need to read a hardware ID from the board and then test a device differently depending on the value. Such tests should be written as circuit code files but will call functions from test device files.
Existing XJEase Files and Where to Find Them
The XJEase files being used in the project can be viewed and edited in the Test Device Files and Circuit Code Files screens, listed under the Setup header:

Figure 1: Locating Used Test Device and Circuit Code Files
To view all available XJEase files rather than just those in the open project, use the XJEase library Browser as described below.
Test Device Files Being Used in the Project
To open a test device file that is being used in the project, go to the Test Device Files screen and double-click a filename from the list of available files as shown below in Figure 2 (1) below. When multiple files are open, they appear in tabs along the top (2):

Figure 2: Viewing Device Files
The file can now be viewed and edited in the right-hand pane.
Circuit Code Files Being Used in the Project
In a similar fashion, circuit code files being used in the project can be viewed and edited in the Circuit Code Files screen.
Viewing all Available XJEase Library Files
To view all available XJEase device files, select XJEase Library... from the Tools menu at the top of XJDeveloper’s screen. This opens the library browser (figure 3):

Figure 3: Finding Device Files Using the XJEase Library Browser
If the Categories view is selected (3), the device categories will be displayed on the left (1), and the files within the selected category will be listed to the right (5). Clicking on a device file will display its details in the lower pane (4). The Search: box (2) allows you to find device files that match a part number, description or filename.
Test device files are identified by the icon.
Files containing XJEase code that can be called from a test device file are identified by the icon and are known as additional code Files. These are files that typically contain common code used by many different test device files.
The XJTAG library includes the Globals.xje circuit code file, which contains standard constants and some general functions used for testing.
XJTAG v4.1.101