Altera University Program Secure Data Card IP. Altera University Program Secure Data Card IP Core - FTP - Altera. Text; Altera University Program Secure Data Card IP Core - FTP - Altera. University Program; Documentation Navigator Download Today.
Simple SD Card Interfacing – The Interface. Recently I had to log some data to an SD card using an Altera FPGA on a Terasic DE4, and I was pleasantly surprised at how simple it was. Definitely room for improvement, as I’ll discuss later, but for now this seems good enough! Requirements. First things first, you’ll need your DE board (I was using a DE4, but a DE0 will work just as well), with some recent version of Quartus (I was using Quartus II 1. Nios SBT for Eclipse (coming with the Quartus install), and the University Program files installed. If you don’t have those, you can get them for your version of Quartus. You’ll need your clock (of course), the core itself (e core works fine), a reasonable amount of on- chip memory (if you’re only reading/write to SD 3.
B is sufficient. Alternatively, use the off- chip memory/SDRAM), a JTAG/UART module for STDIN/OUT, an interval timer for timing transfer rates, if you like, and the sys id peripheral (so you know your code is running on the right processor build!). That gives you a basic Nios II system. On top of this, add the SD Card Interface (University Program > Memory > SD Card Interface), Wire up the avalon.
Finally, export the conduit (you might want to change the name to something a little shorter. Save yours system and generate. Your system should look like this: Well that was easy! Now to create our top level file, instantiate the system, and write a little C code (and I do mean a little!) to get our SD access going. The HDLFor demo purposes, the top level file only instantiates the Nios processor. If all goes well, program your board.
- Lesson 09: SD Card Interface 1. We will introduce a method to access data on a SD card using the Altera University Program (UP) SD Card IP. SD Card IP Core The Altera University Program.
- International Journal Of Scientific Research And Education. Altera University Program Secure Data Card IPCore. Ravindrakumar, “Design and Implementation of SD Host Controller IP Core
- The current version of the altera
University Program; Documentation.
The Software. The final step is to take your system and write some software in Eclipse. Once again you’ll be using the Altera UP header file for SD Card access. Here’s a sample C file that does just that, and shows off a couple extra function calls to get some information about the card. Just launch (run as Nios II hardware), and once it finishes, you should be able to remove the card and see the textfile test. Cool! Common Problems.
I said “assuming everything else is set up correctly” . Well, for one thing, you need the SD card pre- formatted as FAT1. Archaic, I suppose, but that’s what is implemented in the UP header files. You can have directories in the filename, but a leading \\ or / will cause the code to fail. Root directory by default doesn’t have a /. For subdirectories, write something like “root/sub.
Also, make sure your filename is at most 8 characters long. There’s a hard 8. B limit here, so watch out for long file names.
Other problems might be the fopen command returning an integer less than 0. Two possibilities are - 1 and - 2; - 1 means the file cannot be opened or created, - 2 means it’s already open. For more info, refer to the SD IP Core documentation. Don’t expect much speed out of the built- in subroutines. The read function returns a byte of data at the current file position.
The core itself supports a variety of commands, including reading a 5. TX/RX buffer in the SD card), so only one command needs to be issued for a cluster, instead of for each byte. That’ll take a little more work, and may be the subject of future blog posts, if the project requires it : ).
Finally, remember you’ve got a 2. GB limit here. The cards must be formatted FAT1.
I said, but the cluster size is 3. B. With 1. 6 address bits, you have 6. B = 2. GB. I imagine this will be sufficient for most embedded applications. I’ve seen some neat photoviewers using this SD access technique on the NEEK. Maybe I’ll save up for it (actually, $4. Overall a painless process.
Took under an hour to figure out and get working. For once, the documentation was actually clear!
That being said, Eclipse does have its quirks. Maybe I’ll write about those later.
Free. BSD 1. 1. 0 - man page for altera. Perhaps most critically. The time now is 0.