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.

  • 1
    \$\begingroup\$ Isn't this called a thumb drive? \$\endgroup\$ – JonnyBoats Dec 21 '11 at 19:14
  • 2
    \$\begingroup\$ No, a thumb drive uses flash memories which are very slow (~20 MB/s). DDR SDRAM can reach over 30 gigabytes/s. So they're more than a thousand times faster :-) \$\endgroup\$ – mikabytes Dec 21 '11 at 19:56
  • 1
    \$\begingroup\$ Have you considered something like this: edn.com/article/… \$\endgroup\$ – Kellenjb Dec 21 '11 at 20:53
  • 6
    \$\begingroup\$ You won't get near 5Gbit transfer with a PIC. This seems like FPGA territory to me. \$\endgroup\$ – markrages Dec 21 '11 at 22:29
  • 1
    \$\begingroup\$ Has anyone got an idea for how a PC could be exposed as a USB slave? Perhaps by using a PCI port? That could make a viable solution! \$\endgroup\$ – mikabytes Dec 22 '11 at 14:30

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.

  • 7
    \$\begingroup\$ @Majenko <Facepalm> Oh, where to start. The best option for a fast scratch drive would be to install more SDRAM in your PC and run some software for a RAM-Disk. That is the cheapest and fastest option. Using RAM-Disk (USB or otherwise) as a swap-drive is just silly. Add that same RAM to your PC's main memory so it doesn't have to swap at all! \$\endgroup\$ – user3624 Dec 21 '11 at 23:44
  • 3
    \$\begingroup\$ @Majenko In that case you have to ask yourself: should I spend money to make the swap/scratch space faster, or would my money be better spent upgrading the entire computer? A fast USB3.0 RAM-Disk will speed up Photoshop, but a new computer will speed up everything. Keep in mind that today a USB3 RAM-Disk doesn't exist and will cost much more than US$2,000 to build (parts + labor + whatever). This would be a much different issue if it cost $100, but it will never be that cheap. \$\endgroup\$ – user3624 Dec 22 '11 at 0:00
  • 1
    \$\begingroup\$ Yes, but a new computer doesn't have the geek factor that a super-fast external ram disk would have. And geek factor is important in a thing like this. \$\endgroup\$ – Majenko Dec 22 '11 at 0:02
  • 2
    \$\begingroup\$ @Mika - Booting from a live CD already caches and buffers the information in RAM. Or, again, copy the CD to a RAM disk on the PC, and run it from there. That way, your CPU will avoid the overhead of translating everything to USB 3 (an overhead which you've thus far ignored) and directly access the memory (which has been noted already to be much faster). USB 3 has three differential pairs over which which you can push 5 gigabits/s, and requires protocol overhead. A stick of DDR3 has 64 data pins plus addressing pins, and can hit 17 gigabytes/s, or 136 gigabits/s (27 times faster!) \$\endgroup\$ – Kevin Vermeer Dec 22 '11 at 15:29
  • 1
    \$\begingroup\$ @Majenko - Performance always trumps geek factor IMO. Besides, having absurd amounts of RAM in your laptop or PC carries plenty of geek cred. \$\endgroup\$ – Kevin Vermeer Dec 22 '11 at 15:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.