Forum Discussion
Altera_Forum
Honored Contributor
10 years agoNios II DDR SDRAM read latency
Hi, I’m trying to optimize RAM access from Nios II. when reading 10’000 successive words from ram using iord in a for-loop, it takes 25 clock cycles per read (without loop overhead). To...
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- Is the memory controller really so terribly slow --- Quote End --- In short - yes - when you're doing single, random accesses. However, that is not how DDR memory is intended to be used. To get greater, far greater, access bandwidth, you must access multiple consecutive values with a single command. As Thiago suggests, accessing blocks of memory will improve your access bandwidth vastly. So, to use DDR efficiently you need to cache chunks of memory from it and then use the cache. Latency to your cache'd data will be a couple of clock cycles at worst. If you genuinely need single, random access to external memory, then you need to consider SRAM or SSRAM. With 29 clock cycles per access with DDR, I suspect you'll find either of these will be just as quick. Regards, Alex