Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16597 Discussions

4 USB-Blasters keep getting assigned different indexes when using quartus_jli.exe (system power cycle or not). How can I programmatically find out the correct index to use for each device?

MUmbr2
Beginner
1,225 Views

We are developing an automated test system that needs to run JTAG scripts using 4 USB-Blasters (1 per product). We are running scripts using quartus_jli.exe and we need to specify the correct device index, in order to use the right hardware. Problem is that the indexes seem to be changing after system power cycles or just while running testing.

 

We have tried obtaining the Device ID values, which seem unique in Windows. But the order the Device ID values appear seems consistent, while the quartus_jli.exe device enumeration keeps changing.

 

Is there a better property to be used for this? What does quartus_jli.exe use to enumerate the devices?

 

We are running scripts using CMD:

<quartus_jli.exe path> -c N <JAM file path> -a p

 

Where N is the device index (1 to 4 in our case).

 

We can obtain the list of devices by running in CMD:

<quartus_jli.exe path> -n

 

But this gives very little information on what devices is which index. Any pointers would be highly appreciated!

0 Kudos
8 Replies
ShafiqY_Intel
Employee
1,093 Views

Hi MUmbr2,

 

May you can try command "jtagconfig" first to understand more details about device index.

 

jtagconfig - Copy.JPG

 

 

 

Cheers

0 Kudos
MUmbr2
Beginner
1,093 Views

Hi ShafiqY,

 

Thank you for the pointer, however your screenshot shows that both devices have the same ID. I get the exact same on my machine, i.e. no unique identifier for each cable. Do you happen to know where I can find a list of properties for the JTAG Cable? If there is a blank field, such as, "description", I could maybe apply a unique identifier myself? Using --setparam

 

The other option would be to try and remove all of the cables programmatically and then add the in the order I need them in. I'm also running Windows, which might make it difficult to go very low level.

0 Kudos
ShafiqY_Intel
Employee
1,093 Views

Hi MUmbr2,

 

If you have similar ID for x4 JTAG cable with devices, I think the best option is as you idea above. Remove all the cables, then add them one by one, and identify their specific device index number (jtagconfig).

 

This is the best option you can do.

 

Thanks

0 Kudos
MUmbr2
Beginner
1,093 Views

Hi ShafiqY,

 

The only problem is that I don't know what to specify for the USB port. All the JTAG commands above specify ports as USB-0, USB-1 in sequence, which matches the indexes.

 

Is there definitely no one at Intel that could explain how this indexing works? Or could I call up for support?

 

Kind Regards,

0 Kudos
ShafiqY_Intel
Employee
1,093 Views
0 Kudos
MUmbr2
Beginner
1,093 Views

Hi ShafiqY,

 

Those examples don't seem to run, as the "external_memif_toolkit" seems to not be present (sld_emitt.dll?). I found resources online that indicate it should be available for loading withing the quartus_sh.exe. For example, I try to run the tcl script from command lines as:

 

"C:\altera\12.1\qprogrammer\bin\quartus_sh.exe" -t "C:\Users\<Specific User>\Desktop\Test\JTAG Test.tcl"

 

It gives me the error:

 

ERROR: Quartus II Tcl command "get_hardware_names" belongs to the "::quartus::external_memif_toolkit" package which is currently not loaded. Please type "load_package external_memif_toolkit" to load the package before using this command.

 

   while executing

"get_hardware_names"

   invoked from within

"foreach hardware_name [get_hardware_names]"

 

After that I add the line "load_package external_memif_toolkit" to the begining of the script and get the following error:

 

ERROR: Can't load library: c:\altera\12.1\qprogrammer\bin\sld_emitt.dll. The operating system reports the following error: The specified module could not be found.

 

 

   while executing

"load [file join $::quartus(binpath) sld_emitt] emitt"

   invoked from within

"if [ catch { load "" emitt } load_result ] {

               # If static load fails, load dynamic lib

               set_dll_loading -dynamic

               load [file join $::quartus(binpat..."

   ("package ifneeded ::quartus::external_memif_toolkit 1.0" script)

   invoked from within

"package require ::quartus::external_memif_toolkit"

   invoked from within

"load_package external_memif_toolkit"

 

Tried searching for the .dll with Search Everything and it's not present on my machine. It's worth noting, that I'm using the Lite version, to have a very basic solution to simply run .JAM files. Software version was chosen based on what my customers used (who gave me the .JAM files to run on their products). I really hope this is not a paid for feature, as we have purchased 4 USB Blaster Cables simply for running scripts and nothing more.

 

Kind Regards,

0 Kudos
ShafiqY_Intel
Employee
1,093 Views

Hi MUmbr2,

 

Do you want to program a different design in x4 board? if not, why do you concern too much regarding to index number?

 

Can you explain more (if you can include screenshot, it would help)? maybe I did not understand better regarding your  automated test system .

 

Thanks

0 Kudos
MUmbr2
Beginner
1,093 Views

Hi ShafiqY,

 

It can be a different design or the same design on all 4x products. To illustrate the problem, I made a couple of diagrams:

 

Let's say I run tests on all 4 Units Under Test (UUT) at the same time in parallel. I know that physically, JTAG1 is connected to the same UUT1, as all of my instruments under "Instruments1". I.e. I found through testing, that JTAG1 is USB-Blaster Index 1. And I can run the following setup 20 times without issues:

 

JTAG Good Setup.PNG

But let's say I run the setup for the 21st time and bam, this happens (there is no specific number of runs or system power cycles):

 

JTAG Bad Setup.PNG

My USB Blaster Indexes get shuffled for some unknown reason to me. So my software ends up trying to use "Instruments1" with JTAG1, but actually the JTAG device connected to UUT1 is now indexed as "JTAG3". Obviously tests fail because of that, although physically the devices did not move. What's the only way to figure out the correct JTAG indexing? Switch on the the instruments for each UUT at a time and try running a script - if it runs, it's the correct index, if it errors - try another JTAG index.

 

This is absolutely unacceptable in a production environment.

 

For some reason you can set addresses/aliases/etc on any kind of COTS instruments, such as, LXI/GPIB/Serial/National Instruments/PLCs/etc, so I am hopping that the same is possible with Intel hardware... I either need a way to set the indexes myself so that the USB Blasters retain them or to be able to query the USB Blasters for some sort of unique identifiers. That way I could programmatically ensure I'm using the correct JTAG index for each UUT.

 

I have absolutely no clue how Quartus works in the background, but there must be documentation that describes how it indexes USB devices.

 

Kind Regards

0 Kudos
Reply