Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- The IORD_ALTERA_AVALON_PIO_DATA is translated into a single CPU instruction IIRC, so you will hardly find any faster method of reading a PIO. I see several reasons that could explain what you are seeing. Either the PIO itself is slow (and if it is in a different clock domain, it will stall the CPU for several extra cycles), or there is an unknown bias in your test. It could be a bug in the way you are measuring time, or your test without the macro could be artificially faster because it was somewhat optimized by the compiler. (about the bug in time measurement system, it happened to me not so long ago. I was running a network benchmark, and couldn't understand inconsistent results in bandwidth measurements, until I figured out I had a 32-bit counter that rolled over). Please note that a softcore CPU isn't fast anyway, if you need to read data at a fast rate, you should consider using a DMA instead. --- Quote End --- Hello DaiXiWen,recently I encountered a problem same with what the thread said. I need to read 11 32-bit PIOs in 20us each PIO-interrupt. I don't know whether the time is enough. I wish you could give me some advise. Ps: my nios processor clock is 120MHz and the same to sdram.