aboutsummaryrefslogtreecommitdiffstats
path: root/usrp1/sdr_lib/gen_cordic_consts.py
diff options
context:
space:
mode:
Diffstat (limited to 'usrp1/sdr_lib/gen_cordic_consts.py')
-rwxr-xr-xusrp1/sdr_lib/gen_cordic_consts.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/usrp1/sdr_lib/gen_cordic_consts.py b/usrp1/sdr_lib/gen_cordic_consts.py
new file mode 100755
index 000000000..ab66cfe01
--- /dev/null
+++ b/usrp1/sdr_lib/gen_cordic_consts.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import math
+
+zwidth = 16
+
+for i in range(17):
+ c = math.atan (1.0/(2**i)) / (2 * math.pi) * (1 << zwidth)
+ print "`define c%02d %d'd%d" % (i, zwidth, round (c))
+