Forum Discussion
Altera_Forum
Honored Contributor
10 years agohow many cycles does each command take in nios?
in my project, i make a loop to blink a led: int main(void) { int i=0; for(i=0;i<100;i++) { IOWR_ALTERA_AVALON_PIO_DATA(QD_PIO_0_BASE,0xff); delay(); ...
Altera_Forum
Honored Contributor
10 years agothanks for your reply.
i am not worried about it, i just want to know how long NIOS instructions take, this may be helpful. i read the objdump file, i looks like a assembly language, about the i++, it shows: void delay(void) { alt_u32 i =0; while(i < 100000) 80031c: e0ffff17 ldw r3,-4(fp) 800320: 008000b4 movhi r2,2 800324: 10a1a7c4 addi r2,r2,-31073 800328: 10fff92e bgeu r2,r3,800310 <__reset+0xff7f8310> { i++; } } 80032c: e037883a mov sp,fp 800330: df000017 ldw fp,0(sp) 800334: dec00104 addi sp,sp,4 800338: f800283a ret does each line cost one clock?