Forum Discussion
Altera_Forum
Honored Contributor
15 years agoPorting PIO C-code from ARM-7 to Nios II (SE1-board) + performance issue.
Hi all, I'm having a try at the moment to port my C-code from the arm-7 mcu, LPC-P2148 to Nios II, SE1-board , Cyclon-II, EP2C20F484C7. The arm-none-eabi-gcc compiler was used for the ARM-7 ...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- Let me see ... Nios will do the loop in 6 clocks ... assuming the timing measurement by PDPGY is accurate, then ARM must be doing the loop in 1 clock to get the 7 to 1 timing. This fails the sanity test. --- Quote End --- Actually for the /e it is more likely to be 12 clocks, and 18 if the 'short' causes an additional 'andi rn,rn,0xffff' instruction. Not to mention the Avalon MM delays reading the instructions, I suspect the fastest you'll see (from an M9K memory block) is one wait state. I can't remember the ARM instruction set that well, and don't know the exact timings - the branch cost (particularly mispredicted) will depend very much on the ARM architecture. So one wait state and 6 clocks for 3 instructions is about a 7:1 timing difference against even a nios /f core.