JTAG and Stimulifile
#1
Hi,

I am very new to JTAG and have worked with pulpissimo by running test cases mostly via the Linux terminal, which has Questasimulation. 

I wanted to ask that how can I either create or locate an existing stimulifile, and further use it for JTAG programming? Also, which software would be good for JTAG programming?

Usually, when I make and run C-based test cases in the terminal, I am checking whether basic functions are working or not (since we are dealing with a constrained system and also my background is not very strong when it comes to architecture design-based projects). So if I run a test.c file using makefile, when using the command 'make clean all run' does this automatically create a stimulifile for this test.c somewhere in the directory? If yes, how can I locate it?
 
If not, how can create one for this test.c?



Thanks!
Reply
#2
Hi @ufsahu,

For JTAG booting, you don't need a special stimuli file. Although if you simulate an application in RTL (e.g. using Questasim) the pulp-runtime/pulp-sdk creates a stimuli file for the testbench (I believe in build/pulpissimo/vectors). However, for JTAG booting we usually just use OpenOCD and GDB to directly load an ELF binary into PULPissimo's main memory. This binary can be found in the build directory. So the general steps are to connect to use OpenOCD to connect to the debug module within PULPissimo via JTAG, then locally connect to OpenOCD with GDB and load the binary (which in the background will instruct OpenOCD to write the binary Data to L2 memory using the risc-v jtag debug protocol. The steps are documented in the FPGA section in the PULPissimo readme on github.

Best,
Manuel
Reply
#3
Hi Manuel,

Thank you for replying. Yes! Actually, that is exactly what we are doing at the moment on the FPGA Genesys2 board, working around the GDB tool to upload ELF files and further using certain GDB commands to try to read and write to memory locations. And alongside, we have OpenOCD as well. For now, we are using GDB commands such as the following to see minor operations

info all-registers    
print $esi

and these seem to be working. In addition, we used the following command to see instruction set registers, if I am not wrong,

print $mm1

so then the above command shows the following 

( gdb ) print $ mm1 
$ 5 = { uint64 = 32768 , v2 int32 = { 32768 , 0 } , v4 int16 = { -32768 , 0 , 0 , 0 ) . V8 int8 = { 0 , -128 , 0 , 0 , 0 , 0 , 0 , 0 } } 


and here I am trying to manipulate certain register values,

( gdb ) set $ mml.uint64 = 0x00000001 
Remote connection closed 
( gdb ) print $ mm1 
$ 6 = { uint64 = 1 , v2_int32 = { 1 , 0 } . v4_int16 = { 1 , 0 , 0 , 0 ) , V8 int8 = { 1 , 2 , 0 , 0 , 0 , 0 , 0 , 0 } } 


is there any other GDB approach or maybe commands we should focus on, in order to directly write and read to memory locations? I am trying to study and search more, but maybe I am not sure how put the commands together or something?

Thanks again!



Uruj
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)