Intel® provides example .jam files in its application notes and user guides to support error detection and injection features. Since they are created for a single-device JTAG chain, when you use them in a multi-device JTAG chain, you need to manually modify them to add information of instruction and data register lengths for other devices than the target device of those .jam files.
1. Check the instruction register lengths of all other devices than the device targeted by the .jam file. The instruction register length is 10 in Intel FPGA and CPLD devices and 4 in hardware processor system (HPS) of Intel SoC FPGA devices. The data register length of any devices is 1.
2. Add the following descriptions just after "PROCEDURE EXECUTE" line in the .jam file.
When other devices exist after the target device in JTAG chain, add:
PREIR <total instruction register length after the target device>;
PREDR <total data register length after the target device>;
When other devices exist before the target device in JTAG chain, add:
POSTIR <total instruction register length before the target device>;
POSTDR <total data register length before the target device>;
[Example 1]
Download Cable TDI => Target Device => Other Device #1(IR=10) => Download Cable TDO
*IR stands for instruction register length
PREIR 10;
PREDR 1;
[Example 2]
Download Cable TDI => Target Device => Other Device #1(IR=10) => Other Device #2(IR=10) => Download Cable TDO
PREIR 20;
PREDR 2;
[Example 3]
Download Cable TDI => Other Device #1(IR=10) => Target Device => Download Cable TDO
POSTIR 10;
POSTDR 1;
[Example 4]
Download Cable TDI => Other Device #1(IR=4) => Target Device => Other Device #2(IR=10) => Download Cable TDO
POSTIR 4;
POSTDR 1;
PREIR 10;
PREDR 1;