- added cordic

git-svn-id: http://moon:8086/svn/vhdl/trunk@1412 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2021-03-21 10:37:40 +00:00
parent 67d79572d7
commit 00ae5a7810
15 changed files with 3200 additions and 0 deletions
+10
View File
@@ -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;