Jump to content
  • 0

Reading data from SD card using ZYNQ PS and storing it in DRAM


fpga_123

Question

Hello,

I have a file containing pre-computed decimal values in SD card and I want ZYNQ PS to read this file and store it in the DRAM on ZYBO board.

I do know that the processing_system IP has an SD0 interface present. But, how do I start with this? What exactly will be in my block design when working in Vivado Design Suite? What changes needs to be done when exporting the hardware into SDK?

The text file that will be present in the SD card is attached for the reference.

I read some of the forum discussions on Xilinx but didn't figure out the exact procedure on how to get this working.

Any help will be greatly appreciated.

 

Thank you,

Shyama.

occ_matrix.txt

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Hi @jpeyron,

I went through the forum but I see the discussion is based on the QSPI flash memory. No doubt there is a discussion on booting from the SD card but I am not able to figure it out how!

I also read the xsdps.h file to see how is the SD card code being written. However, I have to first create a block design in Vivado Design Suite and the export it to the SDK!

Is there any tutorial or any reference that will help me get started with this?

 

Best regards,

Shyama

Link to comment
Share on other sites

Hi @sgandhi,

The ZYNQ processor is tied to the SD card reader. 

Are you using a Digilent ZYNQ development board?

If you are using a Digilent Board you should be using the Digilent board files which will handle constraining the SD card. 

The zedboard programming guide tutorial covers how to make a BOOT.BIN and how to use it with the SD card reader.

best regards,

Jon

image.png

Link to comment
Share on other sites

Hi @jpeyron,

I see that the PS has direct connection to the DDR so when I made the block design in the Vivado, I added the SD_0 enabling the pins 40-45 and 47. After the generation of the bit stream, I imported the hardware design in the SDK and further created a new application project (Empty Application Project). 

Next, I used the examples provided in the SDK/2016.4/embeddedsw folder named "xilffs_polled_example.c". I also modified the BSP settings to include "xilffs" library. 

I am also able to program the FPGA now. But how do I create a .bin in sd card and what care is to be taken when creating a file in sd card? I just want to read a .txt file which is present in the sd card. 

I am using ZYBO Z7 board from the digilent.

The file which I want to read from the sd card is attached below for your reference.

Also, I am just reading a file from the SD card. I am not booting from the SD card so the jumper is suppose to be in JTAG mode. Right?

There is a link which you shared above. But isn't that for creating a boot image? How will that help me in my requirements?

 

Thanks for the help,

Shyama.

 

occ_matrix.txt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...