Electronic – Expose SDRAM as a USB 3 mass storage device

microcontrollersdramusb

Challenge:
Build a device that can host one or more SDRAMs (e.g DDR2, DDR3) and expose them as a USB 3 (slave) mass storage device.

Goal:
Allow a USB 3 host to mount the device and allow near 5Gbit transfer rates.

Attempt 1:
Use a PC to build the device – fail – PC doesn't come with hardware necessary to use USB in slave mode.

Attempt 2:
Use a micro controller, such as PIC or ARM. SAM9 has support for DDR2, but lacks support for USB 3. Perhaps there're other micro controllers out there which would be suitable?

What other configurations can you think of that might help in solving the challenge?

Note: Please disregard the fact that SDRAM is volatile and somewhat unsuitable for storage.. Also, I'm aware of the existence of i-RAM or HyperDrive, which basically does the same thing but connected over PCI.

Best Answer

Ok, I can disregard the sanity of this project. It is insane, by the way, with little or no practical value beyond "doing it"-- but that never stopped me before and it shouldn't stop you.

In my opinion, you need several things: A CPU, an FPGA, some SDRAM, and a USB interface. Cypress makes the EX USB FX3 that does 2 of the 4 things. It has an ARM 9 CPU and USB 3.0 interface. What it doesn't have is an SDRAM interface-- which is why you want an FPGA. The FPGA does both the SDRAM interface as well as the high-speed data interface to the USB3 logic.

What you absolutely do NOT want is for the CPU to do the bulk of the data transfer! A 100 MHz ARM 9 isn't going to be able to handle that kind of data throughput. For that matter, just about any 2 GHz CPU isn't going to be able to handle that amount of data either. The ARM9 is just there for the housekeeping, while the FPGA does the heavy-lifting.

The ideal FPGA for this project is a Xilinx Spartan-6. Relatively low-cost, easy to program, and has built-in hard cores for the DDR2 SDRAM interface.