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与CLA是并行运行的,可行么

Other Parts Discussed in Thread: CONTROLSUITE

cpu中进行i++;运算,cla中进行n++运算,只要实现i++与n++是同步的,就可说明两者是并行的。

但是这样的想法如何观察,据我所知,Expressions里变量的变化并不是实时的。

  • 将i++放在task触发的语句之后,如果在cla task还没有结束时i的值就变化了,就可以说明两者是并行运行的。

  • 如果基于controlSUITE中的例程DSP2803x_examples_cla_ccsv5\sqrt,应该如何变化,

    我尝试使用在cpu中运行fVal=fResult+1;

    cla中运行fResult=fVal+1;

    只要保证fResult==fVal

    就可说明两者并行

    但是我的程序无法观察出,这是我的程序,希望您能帮助我

    万分感谢!!

  • 利用ti controlSUITE中CLA的sqrt例程,task触发的语句是哪一句,应该怎样在原有的基础上进行修改

  • 触发task的语句是test_run(),你可以将其子函数Cla1ForceTask1andWait()中的 while(Cla1Regs.MIRUN.bit.INT1 == 1)去掉,换成你想要在CPU中执行的语句。

  • 照如是做,调试阶段出现

    CLA_0: Can't Run Target CPU: (Error -2060 @ 0x0) Requested operation cannot be done while device is running. Halt the device, and retry the operation. (Emulation package 5.1.232.0) 

    这样的问题

  • 这是正常现象,CLA程序结束后就不能继续调试。

  • 我仿真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;
    }