Dec 16, 2010 #1 F fahmi87 Newbie level 2 Joined Nov 9, 2009 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Location tunisia Activity points 1,292 Hi, plz the following matlab code calculate the sin & cos of an angle using cordic algorithm. Can you plz translate this using assembly language for Blackfin processor ai=[0.7854,0.46365,0.24498,0.12435,0.06242,0.03124,0.01562,0.00781,0.00391,0.00195,9.8E-4,4.9E-4,2.4E-4,1.2E-4,6E-5]; x=0.60725; y=0; r=pi/4; b=r; for k =0:14 s=sign(r); temps=x-s*y*2^(-k); y=y+s*x*2^(-k); x=temps; r=r-s*ai(k+1); end cosinus=x sinus=y
Hi, plz the following matlab code calculate the sin & cos of an angle using cordic algorithm. Can you plz translate this using assembly language for Blackfin processor ai=[0.7854,0.46365,0.24498,0.12435,0.06242,0.03124,0.01562,0.00781,0.00391,0.00195,9.8E-4,4.9E-4,2.4E-4,1.2E-4,6E-5]; x=0.60725; y=0; r=pi/4; b=r; for k =0:14 s=sign(r); temps=x-s*y*2^(-k); y=y+s*x*2^(-k); x=temps; r=r-s*ai(k+1); end cosinus=x sinus=y