cpu中进行i++;运算,cla中进行n++运算,只要实现i++与n++是同步的,就可说明两者是并行的。
但是这样的想法如何观察,据我所知,Expressions里变量的变化并不是实时的。
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.
cpu中进行i++;运算,cla中进行n++运算,只要实现i++与n++是同步的,就可说明两者是并行的。
但是这样的想法如何观察,据我所知,Expressions里变量的变化并不是实时的。
我仿真CLA的时候也出现该错误:
CLA_0: Can't Single Step Target Program: (Error -2060 @ 0x0) Requested operation cannot be done while device is running. Halt the device, and retry the operation. (Emulation package 8.3.0.00003)
程序停在:
__mdebugstop();
按F5或者F6单步执行,就会出现上面错误,好像是CLA不让单步仿真似的。
这时候应该CLA的程序还没执行完吧,
__interrupt void Cla1Task1 ( void )
{
//Local Variables
int xTblIdx; //integer valued Table index
float A0,A1,A2; //Table coefficients
float *entry;
float result;
//Preprocessing
__mdebugstop();
xTblIdx = fVal * TABLE_SIZE_M_1; //convert table index to u16-bits
xTblIdx = xTblIdx * 3; //Table is ordered as 3 32-bit coefficients, the
//index points to these triplets, hence the *3*sizeof(float)
entry = &CLAacosinTable[xTblIdx];
A0 = *entry++;
A1 = *entry++;
A2 = *entry;
result = A0 + fVal*(A1 + A2*fVal);
//Post processing
if(fVal < 0){
result = PI - result;
}
fResult = result;
}