i am using c6713dsk with ccs 3.1. i am trying to use foolowing linear assembly written dotproduct function in my c program:-
;Dotp4clasmfunc.sa Linear assembly function to multiply two arrays
.def _DotProd ;ASM func called from C
_DotProd: .cproc ap,bp,count ;start section linear asm
.reg a,b,prod,sum ;asm optimizer directive
zero sum ;init sum of products loop:
ldw *ap++,a ;pointer to 1st array->a
ldw *bp++,b ;pointer to 2nd array->b
nop 4
mpysp a,b,prod ;product= a*b
nop 3
add prod,sum,sum ;sum of products-->sum
sub count,1,count ;decrement counter
[count] b loop ;loop back if count # 0
nop 5
.return sum ;return sum as result
.endproc ;end linear asm function
but every time i rebuild my project it shows disqualifed loop : software pipeline disabled in thw file where i define above program. also output is coming wrong.
But when i use c code for dot product, there is no problem . output is also right.
kindly advise me.
with regards,
ankit kumar