Kalpitha Posted May 9, 2019 Share Posted May 9, 2019 I managed to find the function to transfer partial .bin files from SD card to DDR. int SD_TransferPartial(char *FileName, u32 DestinationAddress, u32 ByteLength) { FIL fil; FRESULT rc; UINT br; rc = f_open(&fil, FileName, FA_READ); if (rc) { xil_printf(" ERROR : f_open returned %d\r\n", rc); return XST_FAILURE; } rc = f_lseek(&fil, 0); if (rc) { xil_printf(" ERROR : f_lseek returned %d\r\n", rc); return XST_FAILURE; } rc = f_read(&fil, (void*) DestinationAddress, ByteLength, &br); if (rc) { xil_printf(" ERROR : f_read returned %d\r\n", rc); return XST_FAILURE; } rc = f_close(&fil); if (rc) { xil_printf(" ERROR : f_close returned %d\r\n", rc); return XST_FAILURE; } return XST_SUCCESS; } Is there any similar function to transfer the fullbitstream .bin from SD card to DDR? Link to comment Share on other sites More sharing options...
jpeyron Posted May 10, 2019 Share Posted May 10, 2019 Hi @Kalpitha, Welcome to the Digilent Forums! 1) What is your overall project goal? 2) Are you wanting to boot a project from the SD card? 3) Are you wanting to facilitate partial reconfiguration? 4) What development board are you using? best regards, Jon Link to comment Share on other sites More sharing options...
Kalpitha Posted May 15, 2019 Author Share Posted May 15, 2019 Hello Jon, Thank you for replying. I am a final year Master Student working on my thesis. working on Ultrascale+mpSOC ZCU102 evaluation kitboard. Main goal of my project is to perform some readback attacks through PCAP or ICAP configuration ports. But before performing a readback, I should first configure the FPGA. I have worked quite a lot on Partial Reconfiguration. And I am successfull in performing partial reconfiguration on ZCU102 evaluation kitboard. Later when I tried to perform a readback of partial bitstreams through PCAP mode. I was reading all 0's. One of the Xilinx member wrote me that readback of partial bitstreams through PCAP mode on baremetal application is not possible. Only readback of FullBitstreams is possible. Now that I want to readback the FullBitstream. I am trying to configure the FPGA with full bitstream. Since previously I was storing the Partial *.bin files in SD card and transfering to the memory. later , PCAP was used to configure. I now want to do the same steps for Fullbistream. For that I first have to transfer my FULL *.bin filesfrom SD card to memory. This is where I am stuck. I am using the same funtion as I have mentioned in the above SD_TransferPartia() funtion to do the transfer. But I am unable. Link to comment Share on other sites More sharing options...
jpeyron Posted May 16, 2019 Share Posted May 16, 2019 Hi @Kalpitha, Unfortunately, I have not worked with partial or full reconfiguration. Hopefully one of the more experienced community members will have some input for you. I would also suggest reaching out to Xilinx for more input as well. best regards, Jon Link to comment Share on other sites More sharing options...
Question
Kalpitha
I managed to find the function to transfer partial .bin files from SD card to DDR.
int SD_TransferPartial(char *FileName, u32 DestinationAddress, u32 ByteLength)
{
FIL fil;
FRESULT rc;
UINT br;
rc = f_open(&fil, FileName, FA_READ);
if (rc) {
xil_printf(" ERROR : f_open returned %d\r\n", rc);
return XST_FAILURE;
}
rc = f_lseek(&fil, 0);
if (rc) {
xil_printf(" ERROR : f_lseek returned %d\r\n", rc);
return XST_FAILURE;
}
rc = f_read(&fil, (void*) DestinationAddress, ByteLength, &br);
if (rc) {
xil_printf(" ERROR : f_read returned %d\r\n", rc);
return XST_FAILURE;
}
rc = f_close(&fil);
if (rc) {
xil_printf(" ERROR : f_close returned %d\r\n", rc);
return XST_FAILURE;
}
return XST_SUCCESS;
}
Is there any similar function to transfer the fullbitstream .bin from SD card to DDR?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.