Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SD Memory Interface in Spartan 6

Status
Not open for further replies.

am85

Member level 2
Joined
May 30, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,661
Hi,
I am using a Spartan 6 FPGA. I am reading from an ADC (18 bit 1 MHz) and I want to process the data on the FPGA then write it to an external SD Memory card at a rate of 10 MB/s to 20 MB/s (the ADC data + the results). I wanted to use a core from Xilinx to facilitate the interface implementation and not to have to write it all by myself. The SATA interface (using Spartan 6 GTP transceiver wizard) would provide a high data rate but then i will need to buy a more expensive FPGA with embedded transceivers and the interface is complicated and will consume high resources utilization. On the other hand SPI might be too slow. Does anyone know what is the maximum data rate (read and write) I can achieve with Xilinx SPI core to SD Memory? How can I overcome the SPI bottleneck? Are there any other interfaces available as xilinx cores i can use to interface the SD Memory?

Thanks a lot.
 
Last edited:

The problem isn't in the SPI interface but the write speed of flash devices. It's simply unsuitable for your project. You can also use the generic 4-bit SD interface rather than SPI, but it won't help.

Why don't you use a PATA drive instead. It can be easily interfaced by 3.3V logic level. You can also use a PATA-to-SATA bridge, if you prefer SATA drives. The intended data rate should be achievable by newer harddisk drives as sustained write speed.
 

Thanks for your reply. so what other than SD (flash) Memory can i use? If i used PATA, do i still need a faster memory or SD would achieve the required rate ?
 

I don't understand your question. PATA interface means hard disk data storage, no flash would be used then.
 

sorry, what i meant to say is : can't the SD memory achieve 10 MB/s or more even if I used SATA instead of SPI? the point is i prefered to use SPI as it is less complicated, and SD memory because i think it is smaller and cheaper.
 

I don't understand how SATA would be related to SD cards? I reviewed the data of recent SD cards. The fastest types (dedicated for HD camcorders) are said to achieve up to 20 MB/s write speed. There are some prerequisites however. They surely need to use the 4-bit generic SD card interface instead of 1-bit SPI. And they need to write multiple blocks at once according to the internal physical sector size of the flash memory.
 

sorry I got confused here. yeah of course you are right SATA could be used with SSD and not SD. I think the max. SPI data rate is 50 Mbps. OK do you know how can I interface the SD memory to the FPGA? do I have to implement the interface by myself on the FPGA or there is an external SD interface available with the SD card, I read that there is an SD card that has an embedded controller so i only need to send the address and data without caring how to write or read. Please excuse me but I am not experienced in this area.
 

I don't think that different levels of control intelligency for SD cards are in use. SD cards (very similar to PATA hard disk drives by the way) are accessed through read and write sectors commands. Partitions (optional) and file systems are implemented on top of the sector enumerations. The most simple way to write data from a FPGA design would be to write sectors of known absolute adress within a predefined file. So you don't have to care for directories or file allocation tables.

The low level physical layer, SPI respectively generic SD card interface has to be implemented in the FPGA design. Besides providing a read and write sector function, some initialization has to be performed.
 

I don't understand your question. PATA interface means hard disk data storage, no flash would be used then.


Hi ,,,
I am developing Micro SD Card Controller,,, One side Using SD 1 bit mode interface and other side Avalon interface...

From Avalon interface we are getting address and control signals as inputs,,, address represents what? how can i map that in to sd memory card memory location???

I have a doubts like by using CSD register parameter values we can find out how many sectors, capacity of card and block length,,, but how many blocks are present?? and how can we know the address of each block while reading or writing from/into the memory card???

please help on this????

Thank you... :)
 

I fear, there's no other way than studying SD card specifications in detail. Or analyse existing software.

Most FPGA/SD card solutions I have seen are managing most SD card operations in soft processor.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top