Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDDR2 and Ethernet
Hi friends,
I want to control DDR2 and Ethernet with NIOS II on my board. ADC results are read from LVDS_rx module and store on DDR2 and then stream out via Ethernet. On my board, there is no SDRAM except for a DDR2, so I want to use on-chip memory for Nios ii . Can I get it? Any advice and guidance will be appreciated.13 Replies
- Altera_Forum
Honored Contributor
I use cyclone III ep3c25f324. Is there enough on-chip memory for my project ?
Need your help , thanks. - Altera_Forum
Honored Contributor
Why not using DDR2 memory? It doesn't matter what memory type it is, since You need to use either DMA (better SGDMA for faster transfers) or write Your own Avalon Memory Master controller. How fast ADC is?
- Altera_Forum
Honored Contributor
You can put your code+data into internal memory (probably tightly coupled) while still using the external DDR2 memory for large items (like the ethernel buffers).
However you may have to be careful about the size of the code. I don't know how small the TCP/IP stack can be, but even the 'hello world' program pulls in enough stuff from libc to be a little large for internal memory. My suspicion is that the IP stack won't be that concise! Enough code to send IPv4 UDP packets should be quite small, but you'll need something to give the system it's IP address. OTOH if you avoid all of libc, you can do quite useful stuff using internal memory. - Altera_Forum
Honored Contributor
--- Quote Start --- Why not using DDR2 memory? It doesn't matter what memory type it is, since You need to use either DMA (better SGDMA for faster transfers) or write Your own Avalon Memory Master controller. How fast ADC is? --- Quote End --- 400Msps ADC. DDR2 memory is used to store ADC result . if it's used for nios II ,what about the ADC ? - Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
--- Quote Start --- You can put your code+data into internal memory (probably tightly coupled) while still using the external DDR2 memory for large items (like the ethernel buffers). However you may have to be careful about the size of the code. I don't know how small the TCP/IP stack can be, but even the 'hello world' program pulls in enough stuff from libc to be a little large for internal memory. My suspicion is that the IP stack won't be that concise! Enough code to send IPv4 UDP packets should be quite small, but you'll need something to give the system it's IP address. OTOH if you avoid all of libc, you can do quite useful stuff using internal memory. --- Quote End --- hi, dsl: you mean I can use the on-chip memory if ....? Could you give me more guidance according the spec. of cyciii and my project ? - Altera_Forum
Honored Contributor
I doubt You'll be able to run Nios on on-chip memory... Nios II/e probably worth trying, but that Cyclone III You use is kinda small.
- Altera_Forum
Honored Contributor
--- Quote Start --- Why not using DDR2 memory? It doesn't matter what memory type it is, since You need to use either DMA (better SGDMA for faster transfers) or write Your own Avalon Memory Master controller. How fast ADC is? --- Quote End --- If I use the DDR2 memory for nios ii cpu and buffer several thousands bytes of adc results , now how to control the DDR2 ? - Altera_Forum
Honored Contributor
It's done by DDR2 controller in SOPC. I've already mentioned that You need either DMA or own memory master core.
- Altera_Forum
Honored Contributor
--- Quote Start --- It's done by DDR2 controller in SOPC. I've already mentioned that You need either DMA or own memory master core. --- Quote End --- oh, i see... Can I use the DDR2 memory as two separate blocks ,one for nios ii cpu and the other fo adc result ?