[USRP-users] FM Transmitter works well, Underruns after adding constant multiply block
josh at ettus.com
Fri Feb 24 20:33:23 EST 2012
On 02/24/2012 05:56 AM, salingle wrote:
> Dear Knowledgeable People,
> Just starting out with an E100 and UHD, have a basic FM transmitter that works nicely (transmitting a wav file, listening on dinosaur FM radio).
> This works nicely:
> Wavfile source (32ksps) -> blks2_wfm_tx(320ksps)->uhd_usrp_sink (interpolation of 400)
> However, adding a simple multiply by constant block results in repeated underruns:
> Wavfile source (32ksps) -> multiply_const->blks2_wfm_tx(320ksps)->uhd_usrp_sink
> All of the above is done with python. Is it as simple as the multiply block takes too long? Would the same path work if coded in C? Or, is some other principal being violated?
There is a "free" floating point scaling operation already happing in
UHD (when you use fc32 or fc64 host type). I have been considering a
hook into uhd to control this via setting a stream arg called "fullscale".
Simply apply this patch and set "fullscale" http://pastebin.com/MdwXd29a
The idea is, if your fullscale amplitude in the host is 100, you dont
have to divide by 100 before sending the samples. You just tell the
device my fullscale is 100 and the UHD scales it appropriately to 16
bits over the wire.
Similarly, you can abuse this as a scalar, suppose your actual fullscale
amplitude from blks2_wfm_tx is 1.0, but you want this to map to 1/2 of
the DAC range. Therefore, you would set fullscale to 2.0
Here is some reference about stream args so it makes more sense, this is
also one of the parameters in GRC.
More information about the USRP-users