This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
TMS320F28335仿真中
RPT #10
|| PREAD *XAR2++,*XAR7
与
RPT #10
|| PREAD *XAR2++,*XAR7
这两个指令执行时间相差3cycle
根据TMS320C28x CPU and Instruction Set (Rev. F)手册的368页描述两者相差1cycle。
仿真结果与手册出现差别的原因是什么
RPT #10
|| PREAD *XAR2++,*XAR7
与
RPT #10
|| PREAD *XAR2++,*XAR7
另外这两个指令看起来是一样的
汇编部分源码为
_ARRAY_MOVE:
CMPB AL, #0x0
MOVL XAR7, @XAR5
SB Exit, EQ
ADDB AL, #-1
MOVZ AR5, @AL
RPT @AR5
|| PREAD *XAR4++, *XAR7
Exit:
LRETR
C语言中
extern void ARRAY_MOVE(Uint16* ARRAY1,Uint16* ARRAY2,Uint16 lenth)
主函数中
ARRAY_MOVE(ARRAY1, ARRAY2,10);
ARRAY_MOVE(ARRAY1, ARRAY2,11);
随着lenth的增大,运行时间增加多少