Pulpissimo: Using JTAG and Flash for larger sets of data
Thank you for your reply.

Quote:Do you want to use readmemh on the L2 or on the flash memory? Readmemh and L2 is not supported because its quite annoying to properly split the executable among the memory banks we have, but certainly doable.

The idea is to simulate the following scenario: I have some data for the accelerator on some external memory device. This could be the weights, the actual program, etc. Now i want to load that data to the internal flash memory. After that i want to boot from the internal flash memory (STANDALONE). This would also need a linker script later on so that my weights, etc. are loaded into L2 at the correct addresses. So in a nutshell create an image (program+weights, etc.) and load it into flash using JTAG.

It seems that i can't do [Source] -> [JTAG] -> [SPI] -> [Flash Memoy] but rather [Source] -> [JTAG] -> [L2] -> [SPI] -> [Flash Memoy] or at least in the way i'm currently trying to simulate the scenario.

The steps i am taking at the moment are the following:
1) Create an image file, lets call it example_image.txt which is in the same format as the other JTAG stimulus files.
2) In the testbench: Set the UserPreload of the SPI flash model to 0.
3) In the testbench: Create another array for the flash image (simlar to the array for the stimulus vectors).
4) In the testbench: Use readmemh to load the example_image.txt into the array for the flash image.
5) In the testbench: Use debug_mode_if.load_L2 to load the array into L2 via JTAG (choose the address so that i won't interfere with the address of other potential data).
6) Create a C program which uses the rt_spim_send function to load the data from L2 to the flash memory.
7) Run that program with boot from JTAG.
8) ToDo: After the program has finished "boot" from rom to run the program that has been loaded into the flash memory.

Now there are a few steps where i'm unsure if this idea even makes sense.
Step 1) I would rather load the image in .slm format into flash but i can't use readmemh to load it into the array, therefore i can't use JTAG to load it into the L2.
Step 6) This requires the core do to work. I'd rather load the flash image while the core is halted if that is possible.

I hope my intentions are clear, if not please tell me so i can try to go into more detail.
My biggest worry is that this won't work at all because i'm not loading the correct image (.txt vs .sml).

Thank you for your help,

Messages In This Thread
RE: Pulpissimo: Using JTAG and Flash for larger sets of data - by LPLA - 03-09-2020, 12:15 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)