Hi everyone,
having a look at the Sample flashloader in the FrontPanel distribution I think I figured out how the flashloader.bit configuration file can be used to write something into the FPGA flash.
I’d like to know if there’s any example of how the FPGA flash could also be read (by the PC, not by the FPGA itself), or if the WireIns in the flashloader.bit FW can also be configured to read data from the flash.
Something like:
xem->SetWireInValue(0x00, j, 0xffff); // Send starting address
xem->SetWireInValue(0x01, (MAX_TRANSFER_SIZE/FLASH_PAGE_SIZE)-1, 0xffff); // Send the number of pages to read
xem->UpdateWireIns(); // Update Wire Ins
xem->UpdateTriggerOuts(); // Makes sure that there are no pending triggers back
xem->ActivateTriggerIn(0x40, 4); // Trigger the beginning of the sector read routine
xem->ReadFromPipeOut(0x80, MAX_TRANSFER_SIZE, buf);
To give a bit of context, I want to write onto the system flash the FPGA configuration file, so that the device is configured automatically at start up and then I want to be able to write some data for the FW to use onto the FPGA flash. However, while I’m developing all of this I’d like to be able to check if and what I write on the FPGA flash, just to be sure what I’m doing makes sense before I try to use the data on the FPGA flash directly in the final FPGA FW.
Thanks in advance,
Filippo