- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use cyclone III ep3c25f324. Is there enough on-chip memory for my project ?
Need your help , thanks.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached is a snap of cyciii spec. , I use ep3c25 and how many on-chip memory can I use for nios ii cpu?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's done by DDR2 controller in SOPC. I've already mentioned that You need either DMA or own memory master core.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, why not. If You'll use SGDMA, then You can allocate memory using malloc() or use fixed value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK,I'll try it. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what the minimum M9K footprint for a nios cpu is, but it is relatively small!
- 1 M9K for the registers - Remove the dynamic branch prediction logic (this is a 'hidden' option) - Read code from tightly coupled memory - No data cache, data can be in the same M9K as the code - No JTAG debug - Boot directly from the instruction memory (no separate M9K for epcs (etc) boot) - Write small, tight code without any libc bloat and with minimal wrapper layers.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page