Forum Discussion
Altera_Forum
Honored Contributor
14 years agoJTAG chain debugger tools scripts & JTAG clock management
Hi everyone,
For a design tests, I'm planning to implement this design to a Cyclone II FPGA (integrated to a DE1 board). I then would like to apply stimuli on DUT inputs via the JTAG chain and to read outputs too. I found the JTAG chain debugger tool in Quartus which would allow me to read and write data via JTAG on DUT I/Os. However, I would like to use this tool via scripts, in order to automate those tests and to integrate this system to a full testbench.- Does anyone have documentation about how to write JTAG chain debugger scripts? Is it possible? Which scripting language is available?
- Are the Cyclone II clock pins integrated to the JTAG chain?
- If the JTAG clock is slower than the DUT's clock (which is often the case I guess), how can we catch an output corresponding to an input previously applyed? And how can we deal with metastability?
23 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- I then would like to apply stimuli on DUT inputs via the JTAG chain and to read outputs too. I found the JTAG chain debugger tool in Quartus which would allow me to read and write data via JTAG on DUT I/Os. --- Quote End --- A higher-level of abstraction already exists to perform this type of testing. I've created a tutorial that walks you through the basics: http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial Cheers, Dave - Altera_Forum
Honored Contributor
Hello,
Thank you for the information, it can be a useful feature. However I'm not using any Avalon bus as my system validates different modules which will be integrated to an ASIC. Thank you for your answer and do not hesitate to share some answers to my questions or any other clues... Regards, J-B - Altera_Forum
Honored Contributor
--- Quote Start --- Thank you for the information, it can be a useful feature. However I'm not using any Avalon bus as my system validates different modules which will be integrated to an ASIC. --- Quote End --- You've got a couple of options; 1) Build an Avalon bridge to whatever bus protocol your ASIC works from. Ignore the fact that this example uses the Avalon protocol, use it to design a JTAG-to-programmable I/O. The main advantage is that the logic is debugged, working, and supported by Altera. 2) Use the low-level JTAG interface to design your own test logic. See these two documents: http://www.ovro.caltech.edu/~dwh/correlator/pdf/altera_jtag_to_avalon_analysis.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/altera_jtag_to_avalon_analysis.pdf) http://www.ovro.caltech.edu/~dwh/correlator/pdf/altera_jtag_to_avalon_analysis.zip http://www.ovro.caltech.edu/~dwh/correlator/pdf/vjtag.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/vjtag.pdf) The first shows the protocol of the JTAG-to-Avalon-ST component, from which you could construct whatever bridge you like. The second shows the lowest-level JTAG interface. The zip file contains Modelsim simulations, so you can use those to develop your debug logic and decide what interface you like. Cheers, Dave - Altera_Forum
Honored Contributor
Hi,
I'm trying to compile jtag_client and get the following error. I'm using quartus 11.1sp2, running on windows7 64-bit machine. Any suggestion what might be the problem here. Thanks, Evgeni >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> bash-3.1$ gcc -wall -o jtag_client jtag_client.c 0 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 1033558 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 3058904 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 7083601 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 collect2: fork: Resource temporarily unavailable 0 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 1033558 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 3058904 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 7083601 [main] collect2 2980 fork: child -1 - died waiting for longjmp before in itialization, retry 0, exit code 0xC0000135, errno 11 - Altera_Forum
Honored Contributor
--- Quote Start --- I'm trying to compile jtag_client and get the following error. I'm using quartus 11.1sp2, running on windows7 64-bit machine. Any suggestion what might be the problem here. --- Quote End --- Nothing obvious. I'll try on my Win7/64-bit machine tomorrow and let you know if I can figure it out. Cheers, Dave - Altera_Forum
Honored Contributor
I downloaded the zip file to my c:/Temp folder on Win7/64-bit, unzipped it, started the Quartus/NIOS II command shell, and it compiled fine, i.e.,
What is the initial message from your NIOS II shell? Cheers, Dave------------------------------------------------ Altera Nios2 Command Shell Version 11.1sp2, Build 259 ------------------------------------------------ bash-3.1$ cd "C:\Temp\altera_jtag_to_avalon_mm_tutorial\tcl\jtag_client_server" bash-3.1$ gcc -Wall -o jtag_client jtag_client.c bash-3.1$ - Altera_Forum
Honored Contributor
C:\altera\11.1\nios2eds>"Nios II Command Shell.bat" ------------------------------------------------ Altera Nios2 Command Shell Version 11.1sp2, Build 259 ------------------------------------------------ bash-3.1$ cd "C:\evgeni\temp\altera_jtag_to_avalon_mm_tutorial\tcl\jtag_client_server" bash-3.1$ gcc -Wall -o jtag_client jtag_client.c 0 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 1034268 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 3058996 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 7085880 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 collect2: fork: Resource temporarily unavailable 0 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 1034268 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 3058996 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 7085880 collect2 8876 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000135, errno 11 - Altera_Forum
Honored Contributor
Well, the solution to this turned out to be very unexpected. Searching for "died waiting for longjmp before initialization" suggested a problem with Nvidia driver and Cygwin. I gave it a try: updated Nvidia driver in my laptop (see attached screenshots).
The issue has gone away. Thanks, Evgeni - Altera_Forum
Honored Contributor
--- Quote Start --- Well, the solution to this turned out to be very unexpected ... --- Quote End --- That is definitely not what I would have expected :) --- Quote Start --- The issue has gone away. --- Quote End --- Great! Cheers, Dave - Altera_Forum
Honored Contributor
Hi everyone,
Sorry for the delay in my answers, I was quite busy trying to understand how the JTAG chain debugger works. This message is an answer to [email protected] and its 30th May post concerning the low level JTAG interface and the Avalon-to-xxx bridge. I will provide more details about my testing philosophy because your solutions are not adapted to it:- It's prefered to only implement the logic to be tested inside the FPGA in order to be as close as possible as the final ASIC configuration.
- I'm using QUartus and a Cyclone II FPGA at the moment, but it could change in the future, I don't want my testbench to be dependant of Altera's tools as the Avalon bus.
- If you could give me information about how to use the JTAG chain debugger with scripts, I would appreciate.
- If it's not possible, is there any other way to manage the JTAG chain via the USB Blaster cable on a DE1 development board?