Forum Discussion
Altera_Forum
Honored Contributor
20 years agohello,my code is like this
word1=1; word2=2; word3=3; word4=4; word5=5; //from this check_sum=(word1&0x0000ffff)+(word1>>16) +(word2&0x0000ffff)+(word2>>16) +(word3&0x0000ffff)+(word3>>16) +(word4&0x0000ffff)+(word4>>16) (word5&0x0000ffff)+(word5>>16); while(check_sum>>16) check_sum=(check_sum&0x0000ffff)+(check_sum>>16); if(check_sum==0x0000ffff) errflag=0; else errflag=1; //end this I had found do check_sum need about 100 cycles with Nios/f and _g3 .is it true ? In addition £¬if a=3,the data isn't in cache ,how many cycles will spend?