summaryrefslogtreecommitdiff
path: root/gr-utils/src
diff options
context:
space:
mode:
authornldudok12007-12-21 04:43:55 +0000
committernldudok12007-12-21 04:43:55 +0000
commit387d6d26a45e1ac037164eea875d87ffae0a1bac (patch)
tree9d9b97acd341c3d23b29233d5979cefdedf694c1 /gr-utils/src
parent836d254439fb08c46edd6f020ab86bd02541baf1 (diff)
downloadgnuradio-387d6d26a45e1ac037164eea875d87ffae0a1bac.tar.gz
gnuradio-387d6d26a45e1ac037164eea875d87ffae0a1bac.tar.bz2
gnuradio-387d6d26a45e1ac037164eea875d87ffae0a1bac.zip
bugfix for low decimation rates (dec<8)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7236 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-utils/src')
-rwxr-xr-xgr-utils/src/python/usrp_fft.py13
-rwxr-xr-xgr-utils/src/python/usrp_oscope.py14
2 files changed, 25 insertions, 2 deletions
diff --git a/gr-utils/src/python/usrp_fft.py b/gr-utils/src/python/usrp_fft.py
index 58da67147..c98f01eb4 100755
--- a/gr-utils/src/python/usrp_fft.py
+++ b/gr-utils/src/python/usrp_fft.py
@@ -69,6 +69,8 @@ class app_top_block(stdgui2.std_top_block):
help="Enable waterfall display")
parser.add_option("-8", "--width-8", action="store_true", default=False,
help="Enable 8-bit samples across USB")
+ parser.add_option( "--no-hb", action="store_true", default=False,
+ help="don't use halfband filter in usrp")
parser.add_option("-S", "--oscilloscope", action="store_true", default=False,
help="Enable oscilloscope display")
(options, args) = parser.parse_args()
@@ -79,8 +81,17 @@ class app_top_block(stdgui2.std_top_block):
self.show_debug_info = True
# build the graph
+ if options.no_hb or (options.decim<8):
+ #Min decimation of this firmware is 4.
+ #contains 4 Rx paths without halfbands and 0 tx paths.
+ self.fpga_filename="std_4rx_0tx.rbf"
+ self.u = usrp.source_c(which=options.which, decim_rate=options.decim, fpga_filename=self.fpga_filename)
+ else:
+ #Min decimation of standard firmware is 8.
+ #standard fpga firmware "std_2rxhb_2tx.rbf"
+ #contains 2 Rx paths with halfband filters and 2 tx paths (the default)
+ self.u = usrp.source_c(which=options.which, decim_rate=options.decim)
- self.u = usrp.source_c(which=options.which, decim_rate=options.decim)
if options.rx_subdev_spec is None:
options.rx_subdev_spec = pick_subdevice(self.u)
self.u.set_mux(usrp.determine_rx_mux_value(self.u, options.rx_subdev_spec))
diff --git a/gr-utils/src/python/usrp_oscope.py b/gr-utils/src/python/usrp_oscope.py
index 25de80526..d3223cba3 100755
--- a/gr-utils/src/python/usrp_oscope.py
+++ b/gr-utils/src/python/usrp_oscope.py
@@ -65,6 +65,8 @@ class app_top_block(stdgui2.std_top_block):
help="set gain in dB (default is midpoint)")
parser.add_option("-8", "--width-8", action="store_true", default=False,
help="Enable 8-bit samples across USB")
+ parser.add_option( "--no-hb", action="store_true", default=False,
+ help="don't use halfband filter in usrp")
parser.add_option("-C", "--basic-complex", action="store_true", default=False,
help="Use both inputs of a basicRX or LFRX as a single Complex input channel")
parser.add_option("-D", "--basic-dualchan", action="store_true", default=False,
@@ -87,7 +89,17 @@ class app_top_block(stdgui2.std_top_block):
self.num_inputs=2
else:
self.num_inputs=1
- self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim)
+ if options.no_hb or (options.decim<8):
+ #Min decimation of this firmware is 4.
+ #contains 4 Rx paths without halfbands and 0 tx paths.
+ self.fpga_filename="std_4rx_0tx.rbf"
+ self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim, fpga_filename=self.fpga_filename)
+ else:
+ #Min decimation of standard firmware is 8.
+ #standard fpga firmware "std_2rxhb_2tx.rbf"
+ #contains 2 Rx paths with halfband filters and 2 tx paths (the default)
+ self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim)
+
if options.rx_subdev_spec is None:
options.rx_subdev_spec = pick_subdevice(self.u)