Altera_Forum
Honored Contributor
21 years agoCan I accelerate?
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif hello,everyone!
My NiosII's C code is: int main() { unsigned count; while(1) { count=IORD_ALTERA_AVALON_PIO_DATA(PIO_IN_BASE); IOWR_ALTERA_AVALON_PIO_DATA(PIO_OUT_BASE,count); } return 0; } In my project,I use a counter module to count clock numbers.Nios read 32bit PIO data from the counter module,then write the data back.The counter record the back data. After analyse the record,I found each while loop cost 14 clocks .It's too slow! How can I reduce the clock costed? May assemble code do better?