01-03-2009 08:21 PM
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.
01-04-2009 10:32 AM
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
01-06-2009 07:40 PM
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.