Forum Discussion
Altera_Forum
Honored Contributor
12 years agoTightly Coupled OnChip DMA
Hi, I've got some very strange 'performance behavior' with a tightly coupled on chip memory used as data storage. In order to speed up my design, I've created a tightly coupled on chip memory w...
Altera_Forum
Honored Contributor
12 years agoYou will need to understand the object code generated by the compiler.
Compiling with (IIRC) -S --verbose-asm will give an annotated assembly output. You might either find that you've miscounted the number of instructions, or that there are some pipeline stalls because values read from memory can't be used for the next two clocks (ie there is a stall if either of the next two instructions use the read value). A quick look at your code makes me think that you need to copy some values to locals. I suspect a lot of them are being reread from memory multiple times in the loop.