Part Number: TMS320F28377S
I have just started working on the CLA system. To validate if I have setup everything correctly for the CLA, I did some calculations using test vectors. The calculations were done on C28x processor and the CLA processor. It is observed that there is some error between the results obtained from both processors. To have a reference for comparison the same calculations were done in the excel sheet. The formula is as given below:
Dout =( ((Var1 - Var2)*(70/6.25))-Var3)/360; where var1,var2 and var3 are test vectors of 500 values each.
The C28x code implementation is as below:
D_C28[i]= (((Iref[i]-Iinv[i])*11.2)-Van[i])/360;
The same computation is performed in the CLA task as shown below:
Out1 =(((IBatt-V_batt)*(11.2))-Vbus)/360.0;
The CLA task is called 500 times from the main loop by passing values of IBatt (same as Iref),V_batt (same as Iinv)and Vbus (same as Van) defined in CPU to CLA message RAM. The output Out1 ,defined in CLA to CPU message RAM is read and stored in an array D_CLA[500] for comparing with D_C28[500].
The difference between the C28x and excel results is as below:
The difference between the CLA and excel results is as below:
The actual output as computed by excel is as below:
Apparently there is significant error in the CLA calculations. Please guide if I might be doing something incorrectly or if there is logical explanation to this error.
Note: I am using the CLAmath library: cla1_math_library_datarom_fpu32_eabi.lib & C2000Ware4.1.0.0. The processor options in the project are as below:

