- added cordic
git-svn-id: http://moon:8086/svn/vhdl/trunk@1412 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
% function eval_cordic(x0,y0,z0, mode)
|
||||
function eval_cordic(x0,y0,z0, mode)
|
||||
|
||||
if (mode == 'rot')
|
||||
Xn = x0*cos(z0) - y0*sin(z0)
|
||||
Yn = y0*cos(z0) + x0*sin(z0)
|
||||
else
|
||||
Xn = sqrt(x0^2 + y0^2)
|
||||
Yn = z0 + atan(y0/x0)
|
||||
end;
|
||||
Reference in New Issue
Block a user