- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I use DE2 SDRAM with SDR_SDRAM ALTERA controller(vhdl files). I try to write 640*480 *16 bits data to SDRAM. Wich commands have I to write to controller and in wich order? Thank you.Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can try to make a pointer that points to the start address you want to write to (somewhere in the address span of the SDRAM).
Then issue memcpy with source and destination pointers. See documentation of memcpy. Or, you can do a loop manually : short* psrc = xxxx //location of the source data short* pdst= yyyy //some address in the SDRAM address space you need to write to for (int k=0; k < 640*480; k++) *pdst++ = *pscr++ If you don't understand this, please try to get some experience on C/C++ first. Stefaan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's unclear, if you want to access the SDRAM from NIOS II C code or VHDL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed Frank, I made the (maybe wrong) assumption that rprag used the NIOS processor to transfer the data.
Stefaan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,thank you for replying.
I make a project ,using vhdl code.I found an ALTERA code for SDR SDRAM controller, and I try to write into DE2 SDRAM, data from camera of 640*480 resolution, each pixel is 16 bits. My question is in vich order and vich commands to use , in order to write data to SDRAM.I don't know, if I should give the adresses,or they promote automaticly. I'l apreciate if YOU could send me an example of the orders for writung this data length and/or some explanation. Thank YOU, Roman.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page