Changeset 7236

Show
Ignore:
Timestamp:
12/20/07 21:43:55
Author:
nldudok1
Message:

bugfix for low decimation rates (dec<8)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/gr-utils/src/python/usrp_fft.py

    r6839 r7236  
    7070        parser.add_option("-8", "--width-8", action="store_true", default=False, 
    7171                          help="Enable 8-bit samples across USB") 
     72        parser.add_option( "--no-hb", action="store_true", default=False, 
     73                          help="don't use halfband filter in usrp") 
    7274        parser.add_option("-S", "--oscilloscope", action="store_true", default=False, 
    7375                          help="Enable oscilloscope display") 
     
    8082         
    8183        # build the graph 
    82  
    83         self.u = usrp.source_c(which=options.which, decim_rate=options.decim) 
     84        if options.no_hb or (options.decim<8): 
     85          #Min decimation of this firmware is 4.  
     86          #contains 4 Rx paths without halfbands and 0 tx paths. 
     87          self.fpga_filename="std_4rx_0tx.rbf" 
     88          self.u = usrp.source_c(which=options.which, decim_rate=options.decim, fpga_filename=self.fpga_filename) 
     89        else: 
     90          #Min decimation of standard firmware is 8.  
     91          #standard fpga firmware "std_2rxhb_2tx.rbf"  
     92          #contains 2 Rx paths with halfband filters and 2 tx paths (the default) 
     93          self.u = usrp.source_c(which=options.which, decim_rate=options.decim) 
     94 
    8495        if options.rx_subdev_spec is None: 
    8596            options.rx_subdev_spec = pick_subdevice(self.u) 
  • gnuradio/trunk/gr-utils/src/python/usrp_oscope.py

    r6732 r7236  
    6666        parser.add_option("-8", "--width-8", action="store_true", default=False, 
    6767                          help="Enable 8-bit samples across USB") 
     68        parser.add_option( "--no-hb", action="store_true", default=False, 
     69                          help="don't use halfband filter in usrp") 
    6870        parser.add_option("-C", "--basic-complex", action="store_true", default=False, 
    6971                          help="Use both inputs of a basicRX or LFRX as a single Complex input channel") 
     
    8890        else: 
    8991          self.num_inputs=1 
    90         self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim) 
     92        if options.no_hb or (options.decim<8): 
     93          #Min decimation of this firmware is 4.  
     94          #contains 4 Rx paths without halfbands and 0 tx paths. 
     95          self.fpga_filename="std_4rx_0tx.rbf" 
     96          self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim, fpga_filename=self.fpga_filename) 
     97        else: 
     98          #Min decimation of standard firmware is 8.  
     99          #standard fpga firmware "std_2rxhb_2tx.rbf"  
     100          #contains 2 Rx paths with halfband filters and 2 tx paths (the default) 
     101          self.u = usrp.source_c(nchan=self.num_inputs,decim_rate=options.decim) 
     102 
    91103        if options.rx_subdev_spec is None: 
    92104            options.rx_subdev_spec = pick_subdevice(self.u)