Hey,
I have done C programming for C6000 DSP, can anyone help where i can start for Assembly language Programming ?
Regards
Saad Shuja.
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.
Hey,
I have done C programming for C6000 DSP, can anyone help where i can start for Assembly language Programming ?
Regards
Saad Shuja.
Saad Shuja said:I have done C programming for C6000 DSP, can anyone help where i can start for Assembly language Programming ?
just curiosity... why do you want to programm in assembler? or better - what part in your application requires the use of assembler? if its optimization... it will be quite hard to beat the TI compiler/optimizer from my point of view
Thomas, yes its for optimization. Hey i wanna test the following code written in Assembly
.def _envelope
_envelope:.cproc input,prev_in,output,npts
.reg i,curr_abs,prev_abs,sign,CONST
.reg x,input1,output1,output2
.reg C1_Q14,C2_Q14
MVK -15415,C2_Q14
MVK 31565,C1_Q14
ABS prev_in,prev_abs
ZERO i
LOOP1: LDH *input++,input1
LDH *--output,output1
LDH *--output,output2
ADD output,4,output
ABS input1,curr_abs
SUB curr_abs,prev_abs,x
SSHL x,16,x
SHR x,5,x
SMPY output1,C1_Q14,output1
SMPY output2,C2_Q14,output2
SADD x,output1,x
SADD x,output2,x
SSHL x,1,x
MVK -32768,CONST
MVKH 0x00008000,CONST
SADD x,CONST,x
SHR x,16,x
STH x,*output++
MV curr_abs,prev_abs
ADD i,1,i
CMPLT i,npts,sign
[sign]B LOOP1
.return
.endproc
how can i test it. The question is how can i call this function from a C function call. Because when i try to compile it, all variables defined in this routine show that they are undefined.
Hi...
well - as I said, its just curiosity. I try to avoid assembler if possible (and as I said before - I find it more or less impossible to beat the TI optimizer with hand-tuned inline assembler code). The only inline assembler instruction I like is " nop " ;-)
Did you use the possibilities of pragmas and optimizer switches already? You have a loop and porbably can get a lot of performance if you give details of the loop using #pragma MUST_ITERATE
bye,
Thomas