XJPack

XJPack refers to both a file format (*.xjp files) and to a command-line utility program.

XJPack Files

XJPack files (*.xjp) contain all the information that XJRunner needs to be able to run tests.

These files can include XJTAG projects and any other additional files that are needed, such as SVF files.

The easiest way to create XJPack files is to use XJDeveloper: simply select Export from the File menu.

XJPack command-line utility

An alternative to using XJDeveloper to create XJPack files is to use the XJPack command-line utility.

To make the best use of XJRunner, an XJEase project file must have a list of tests to run defined.

The XJPack command-line utility can be particularly useful in scenarios where you need to automate the generation of *.xjp files.


Command Line Switches

XJPack can take the following switches.

  • -p <FileName>: The name of the XJPack file to be created. This must end in .xjp.
  • -f <FileName>: The XJEase project file (preferably the Developer .xjd project or alternatively the XJEase Circuit file) to include in the XJPack file. All files referenced by the project necessary to run the code will be automatically added to the XJPack file: e.g. BSDL files, netlist, XJEase device files, etc.
  • -dir <Directory>: A directory to switch to before packing.
  • -a <FileName>: An additional file to add to the XJPack file. This switch can be used multiple times. The switch also accepts wildcards (see below for details).
  • -L or --no-layout: Don't include layout (ODB++) files in the XJPack file.
  • -S or --no-schematic: Don't include any schematic files in the XJPack file.
  • -V <Version>: A version number to add to the XJPack file.
  • -F or --force: Force packing even if there are errors in the project.
  • -y: Overwrite existing XJPack file (if necessary) without prompting.
  • -info: Output information about an XJPack file (see Info switch below).
  • -h: Display the command line switches.

If the name of the XJPack file is not given, then the name of the project file is used with a .xjp extension. If you're not packing a XJEase project file, then the XJPack filename must be given.

Versioning

If the project has XJPack versioning enabled, then a version will be added to the XJPack file. If Auto Increment is enabled, then the version number will also be incremented automatically. Any version number specified on the command-line overrides that defined in the project. Note that the -V switch can be used even if versioning is not enabled in the project.

Wildcards

The -a switch accepts wildcards to select multiple files in one go, e.g. *.bin. The star character represents 0 or more characters in a filename and a question mark represents a single character. For example:

*.bin
Selects all files that have the .bin extension.
file?.txt
Selects file1.txt and fileX.txt, but not file12.txt.
file*.txt
Selects file1.txt, file12.txt and file.txt.

Info switch

The -info switch requires the filename of an XJPack file, about which it prints information to standard output.

Example

Project type: XJTAG project
Project file: XJDemo4.xjd
XJDeveloper version: 3.13.6.19
XJPack file version: 1.2.0
XJTAG compatibility version: 3.12.100.0

XJPack Examples

Create an XJPack file (circuit.xjp) from an XJEase project file (project.xjd), including all reference files:

XJPack project.xjd

As above, but including an FPGA bitfile (fpga.bit):

XJPack -a fpga.bit project.xjd

Create an XJPack file (svf.xjp) from an SVF file (program.svf), including the necessary pin mapping file (map.xjpm):

XJPack -a program.svf -a map.xjpm -p svf.xjp

Points to Note

  1. An XJPack file cannot contain more than one XJEase project.
  2. You can create an XJPack file that only contains an SVF file. However, this cannot be run in XJRunner, but only on the command line using XJRun.
  3. If you specify the name of an XJEase project file, it cannot be added to an existing XJPack file. XJPack will either create a new XJPack file or overwrite an existing one.
  4. If you only specify additional files (no XJEase project file), they will be added to the named XJPack file. XJPack will create a new XJPack file if necessary, but it will not overwrite an existing XJPack file.
  5. XJTAG does not support PIOMAP or PIO commands in SVF files - these commands will be ignored.