aboutsummaryrefslogtreecommitdiffstats
path: root/usrp1/sdr_lib/gen_cordic_consts.py
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-22 11:46:58 -0800
committerJosh Blum <josh@joshknows.com>2010-01-22 11:46:58 -0800
commita170b9b42345794429486dd4f3316e84ea2cc871 (patch)
tree2483dfa9eb239e3c2cec5701da6f2f5b5940d7ad /usrp1/sdr_lib/gen_cordic_consts.py
parent320c70016f8798cb73c8d02eaa3728df48b5b3ab (diff)
downloaduhd-a170b9b42345794429486dd4f3316e84ea2cc871.tar.gz
uhd-a170b9b42345794429486dd4f3316e84ea2cc871.tar.bz2
uhd-a170b9b42345794429486dd4f3316e84ea2cc871.zip
Moved usrp1 fpga files into usrp1 subdir.
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))
+