Revisiting this topic, since it's been 3 weeks and I've heard back
nothing ... which probably means that everyone is too busy trying to
get release 3.1 out the door to deal with this issue? Should I just
enter this as a bug to be fixed?
My original observation is that the USRP's TX interp rate doesn't
seem to work when changed dynamically. Brian and Eric and others
replied back that the FPGA code looks OK, but that it's never really
been tested for that purpose (the RX decim does work, and has been
tested). I have followed the TX path in software to the point where
data is transferred to the USRP, and the data looks OK to that
point. It is possible that the USB transport is messing with the
data, but I think that's unlikely. It's much more likely that the
FPGA code has a bug. Unfortunately I do not "do" FPGA code yet,
though I'm trying to learn, so I can't debug past where the data
leaves the host computer.
Thus I created a -very- simple python script to test this issue. My
example code creates a sig_source with sinusoid and connects that to
a USRP sink, set to 455 MHz at maximum gain and a given interp_rate.
It starts the TB/FG running, then sleeps for 15 seconds. It sets up
a USRP for TX at a given interp_rate, then starts the FG running
(which will be a separate thread) and sleeps for 15 seconds. It then
resets the interp_rate to -the same value-, and waits for the FG to
finish (via user-interrupt).
I simultaneously run a waterfall scope on another computer, and can
see the sinusoid as a "vertical line" on the scope (which is as
expected). After 15 seconds, the code sets the interp rate to the -
same value- as before, and the waterfall scope changes
dramatically ... most of the energy is "near" DC, but it looks
somewhat like a time-sinusoid-modulated frequency-sinc.
Something is going on with the TX interp rate, most likely on the
FPGA in my experimenting thus far (and/or: tell me what I'm doing
incorrectly in my python script). Please try out the example script,
and see for yourselves. - MLD
#!/usr/bin/env python
#
# Copyright 2007 University of Notre Dame
from gnuradio import gr
from gnuradio import usrp
import time
class my_graph (gr.top_block):
def __init__ (self, tx_interp, freq):
gr.top_block.__init__ (self, "my_graph")
self.sig_src = gr.sig_source_c (1e+6, gr.GR_SIN_WAVE, 1e+3, 100.0)
self.usrp_tx = usrp.sink_c (0, tx_interp)
subdev_spec = (0,0) # usrp.pick_tx_subdevice (self.usrp_tx)
print "subdev_spec is", subdev_spec
self.subdev = usrp.selected_subdev (self.usrp_tx, subdev_spec)
print "Using TX d'board %s" % (self.subdev.side_and_name(),)
self.usrp_tx.set_mux (usrp.determine_tx_mux_value (
self.usrp_tx, subdev_spec))
r = usrp.tune (self.usrp_tx, 0, self.subdev, freq)
if r:
print "Tuned to", freq, "MHz center frequency"
else:
print "Error tuning to", freq, "MHz center frequency"
self.connect (self.sig_src, self.usrp_tx)
self.subdev.set_auto_tr (False)
gg = self.subdev.gain_range ()
try:
self.subdev.set_gain (gg[1])
except:
pass
self.subdev.set_enable (True)
def main ():
new_interp = 64
init_interp = 64
wait_time = 15
init_freq = 455e+6
tb = my_graph (init_interp, init_freq)
try:
print "Init Interp rate is", tb.usrp_tx.interp_rate ()
print "Starting TB"
tb.start ()
print "Sleeping for", wait_time, "seconds"
time.sleep (wait_time)
tb.usrp_tx.set_interp_rate (new_interp)
print "Interp rate is now", tb.usrp_tx.interp_rate ()
print "Waiting for user to interrupt execution"
tb.wait ()
except KeyboardInterrupt:
pass
if __name__ == '__main__':
main ()
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio