|
From: | w w |
Subject: | Re: [Discuss-gnuradio] /gnuradio-examples/python/digital/transmit_path.py and bitrate Question? |
Date: | Thu, 19 Mar 2009 14:28:08 -0400 |
On Thu, Mar 19, 2009 at 09:27:03AM -0700, Johnathan Corgan wrote:The possibly confusing part is that if the user specifies the bitrate,
> 2009/3/19 w w <address@hidden>:
>
> > I've been trying to analyse the transmit_path.py script and stumped with the
> > bitrate value. I see bitrate being brought in from the options and also
> > derived from pick_bitrate but I don't see where somthing is being done with
> > it.
>
> It is assigned in transmit_path.py, line 119.
>
> It is used in tunnel.py, line 255.
>
> The bitrate is a derived variable, mostly for display to the user,
> though tunnel.py warns if the TX and RX sides don't match.
we'll derive the other related values. It's basically a constraint
satisfaction problem.
Eric
From pick_bitrate.py:
def pick_tx_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
interp_rate, converter_rate=128e6):
"""
Given the 4 input parameters, return at configuration that matches
address@hidden bitrate: desired bitrate or None
address@hidden bitrate: number or None
address@hidden bits_per_symbol: E.g., BPSK -> 1, QPSK -> 2, 8-PSK -> 3
address@hidden bits_per_symbol: integer >= 1
address@hidden samples_per_symbol: samples/baud (aka samples/symbol)
address@hidden samples_per_symbol: number or None
address@hidden interp_rate: USRP interpolation factor
address@hidden interp_rate: integer or None
address@hidden converter_rate: converter sample rate in Hz
address@hidden converter_rate: number
address@hidden tuple (bitrate, samples_per_symbol, interp_rate)
"""
return _pick_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
interp_rate, converter_rate, _gen_tx_info)
def pick_rx_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
decim_rate, converter_rate=64e6):
"""
Given the 4 input parameters, return at configuration that matches
address@hidden bitrate: desired bitrate or None
address@hidden bitrate: number or None
address@hidden bits_per_symbol: E.g., BPSK -> 1, QPSK -> 2, 8-PSK -> 3
address@hidden bits_per_symbol: integer >= 1
address@hidden samples_per_symbol: samples/baud (aka samples/symbol)
address@hidden samples_per_symbol: number or None
address@hidden decim_rate: USRP decimation factor
address@hidden decim_rate: integer or None
address@hidden converter_rate: converter sample rate in Hz
address@hidden converter_rate: number
address@hidden tuple (bitrate, samples_per_symbol, decim_rate)
"""
return _pick_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
decim_rate, converter_rate, _gen_rx_info)
[Prev in Thread] | Current Thread | [Next in Thread] |