DSPRelated.com
Forums

G.729E Speech Codec onC54x

Started by plgajare April 2, 2002
Hi all! I am implementing G.729E speech codec on TI DSP
TMS320C5402 dsk as my mini project. In the particular
project I am able to run the available standard C code
on the dsk but to implement that in real time, i need
to optimize some of the functions of basic_op.c. so i
tried to write them in assembly language, i have
written assembly code for L_mac which i am pasting
here for your reference. In order to get advantage of
DSP i am using the MAC instruction available for the
chip, but the problem is whenever i used the condition
of overflow ie. ssbx ovm it gives me error, and if i
don't include that condition in the assembly program
then it passes only two test vector correctly, and for
the remaining test vectors it gives error as "DIvision
error var1 = 16384 var2 !938", so can anyone of you
who have already implemented the codec suggest
solution to my problem
the assembly code for L_mac is as below:
===============================================
_L_mac: ssbx sxm
LD #8000h,B
xor 1h,B
AND #65535,B
BC LP2,BNEQ
LD #8000h,B
xor 2h,B
AND #65535,B
BC LP2,BNEQ
ST #1h,*(_Overflow)
LD #7fffh,16,B
OR #65535,B
ADD B,A
RET
LP2: LD 2h,T
SSBX FRCT
ssbx ovm
MAC 1h, A
RSBX FRCT
rsbx ovm
BC LP1,AOV
RET
LP1: ST #1h, *(_Overflow)
RET thanx in advance.
Prashant




Hello,

Why dont you try using intrinsics. It is available in "intrindefs.h".

Santosh

-----Original Message-----
From: plgajare [mailto:]
Sent: Tuesday, April 02, 2002 9:16 AM
To:
Subject: [c54x] G.729E Speech Codec onC54x Hi all! I am implementing G.729E speech codec on TI DSP
TMS320C5402 dsk as my mini project. In the particular
project I am able to run the available standard C code
on the dsk but to implement that in real time, i need
to optimize some of the functions of basic_op.c. so i
tried to write them in assembly language, i have
written assembly code for L_mac which i am pasting
here for your reference. In order to get advantage of
DSP i am using the MAC instruction available for the
chip, but the problem is whenever i used the condition
of overflow ie. ssbx ovm it gives me error, and if i
don't include that condition in the assembly program
then it passes only two test vector correctly, and for
the remaining test vectors it gives error as "DIvision
error var1 = 16384 var2 !938", so can anyone of you
who have already implemented the codec suggest
solution to my problem
the assembly code for L_mac is as below:
===============================================
_L_mac: ssbx sxm
LD #8000h,B
xor 1h,B
AND #65535,B
BC LP2,BNEQ
LD #8000h,B
xor 2h,B
AND #65535,B
BC LP2,BNEQ
ST #1h,*(_Overflow)
LD #7fffh,16,B
OR #65535,B
ADD B,A
RET
LP2: LD 2h,T
SSBX FRCT
ssbx ovm
MAC 1h, A
RSBX FRCT
rsbx ovm
BC LP1,AOV
RET
LP1: ST #1h, *(_Overflow)
RET thanx in advance.
Prashant

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://www.yahoogroups.com/group/c54x

Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/