diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-22 19:19:14 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-22 19:19:14 -0800 |
commit | 22ed61f97815856bf74cec25ae6bca88bfbe5f44 (patch) | |
tree | 7d87d49b46f9507ff10486097e6d79e4bee4cb81 /firmware/microblaze/divisors.py | |
parent | 71fc99d006f2347a356c5339905593f64ff902ec (diff) | |
download | uhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.tar.gz uhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.tar.bz2 uhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.zip |
zpu: renamed the directory for the usrp2 fw to zpu to reflect the cpu type
Diffstat (limited to 'firmware/microblaze/divisors.py')
-rwxr-xr-x | firmware/microblaze/divisors.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/firmware/microblaze/divisors.py b/firmware/microblaze/divisors.py deleted file mode 100755 index d31bd4dad..000000000 --- a/firmware/microblaze/divisors.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -speeds = (9600, 19200, 38400, 57600, 115200, 230400) - -master_clk = 100e6 -wb_clk = master_clk / 2 - -def divisor(speed): - div0 = wb_clk // (speed * 16) - div1 = div0 + 1 - actual0 = actual_speed(div0) - actual1 = actual_speed(div1) - if abs(actual0 - speed) < abs(actual1 - speed): - return div0 - else: - return div1 - -def actual_speed(divisor): - return (wb_clk // divisor) / 16 - -def doit(speed): - div = divisor(speed) - actual = actual_speed(div) - rel_error = (actual - speed) / speed - print "target: %6d divisor: %6d actual: %11.4f %6.3f%%" % (speed, div, actual, rel_error*100) - -def main(): - print "wb_clk = %f" % (wb_clk,) - for s in speeds: - doit(s) - -if __name__ == '__main__': - main() - |