Article ID: 000078615 Content Type: Product Information & Documentation Last Reviewed: 09/11/2012

How do I modify the Stratix II .ekp.jam design security key programming file to allow Stratix II key programming in a multi-device Joint Test Action Group (JTAG) chain?

Environment

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Description The Quartus II software version 5.1 programmer can only generate .ekp.jam programming files for a single Stratix II device JTAG chain and does not allow other devices to be added to the chain description in the .cdf (chain description file) if the .ekp.jam file is added as a programming file.  However, you can add information within the text of the .ekp.jam to allow programming of Stratix II within a multi-device chain.  To do this,  you must manually modify the .ekp.jam file with specific chain information using Jam STAPL commands. The following lines should be added into your .ekp.jam file, depending on how many devices there are before and/or after the Stratix II device in the JTAG chain:
 

1.) You must know the instruction register length of all non-Stratix devices in the chain.  You must determine the total instruction register lengths from the BSDL files or datasheets for these devices.  Add the following lines after the "PROCEDURE EXECUTE;" line in the .ekp.jam file:

PREIR 10;    '<-- Note 1
POSTIR 10; '<-- Note 2
PREDR 1;    '<-- Note 3
POSTDR 1; '<-- Note 4

Note 1: summation of instruction register lengths AFTER Stratix II in the chain. This shows an example length of 10 bits. Modify number for your chain.

Note 2: summation of instruction register lengths BEFORE Stratix II in the chain. This shows an example length of 10 bits. Modify number for your chain.

Note 3: summation of bypass registers AFTER Stratix II in the chain. This is equivalent to the number of JTAG devices AFTER Stratix II in the chain. Modify number for your chain.

Note 4: summation of bypass registers BEFORE Stratix II in the chain. This is equivalent to the number of JTAG devices BEFORE Stratix II in the chain. Modify number for your chain.

2. ) You also must modify the .ekp.jam JTAG IDCODE check section by placing the IDCODE instruction scan before the DRSCAN statement that checks for the IDCODE.   For example if you are using a EP2S130, by default the .ekp.jam file has the following line:

DRSCAN 32, , COMPARE ./2120950DD, ./21FFFFFFF, compare_status;

You must add in the following line just before the above line:

IRSCAN 10, ./2106;

3. ) Finally, replace the cyclic redundancy check (CRC) value at the end of the file with the correct value. To get the correct CRC value, add the modified .ekp.jam into the Quartus II® programmer. The Quartus II programmer dialog box will tell you the correct CRC value. Edit the file with text editor and save the file. The file can now be used with the Quartus II programmer for multi-device programming. 

If you have multiple Stratix II devices in the chain, this procedure must be repeated for each .ekp.jam file you generate.  One .ekp.jam file is needed for each Stratix II device in the chain that will be security key programmed.

Related Products

This article applies to 1 products

Stratix® II FPGAs