#include <usrp_standard.h>


Public Types | |
| enum | coarse_mod_t { CM_NEG_FDAC_OVER_4, CM_NEG_FDAC_OVER_8, CM_OFF, CM_POS_FDAC_OVER_8, CM_POS_FDAC_OVER_4 } |
Public Member Functions | |
| ~usrp_standard_tx () | |
| virtual bool | set_interp_rate (unsigned int rate) |
Set interpolator rate. rate must be in [4, 512] and a multiple of 4. | |
| bool | set_nchannels (int nchannels) |
Set number of active channels. nchannels must be 1 or 2. | |
| bool | set_mux (int mux) |
| Set output mux configuration. | |
| virtual bool | set_tx_freq (int channel, double freq) |
| set the frequency of the digital up converter. | |
| unsigned int | interp_rate () const |
| double | tx_freq (int channel) const |
| int | nchannels () const |
| int | mux () const |
| bool | start () |
| Start data transfers. Called in base class to derived class order. | |
| bool | stop () |
| Stop data transfers. Called in base class to derived class order. | |
Static Public Member Functions | |
| static usrp_standard_tx * | make (int which_board, unsigned int interp_rate, int nchan=1, int mux=-1, int fusb_block_size=0, int fusb_nblocks=0, const std::string fpga_filename="", const std::string firmware_filename="") |
| invokes constructor, returns instance or 0 if trouble | |
Protected Member Functions | |
| virtual bool | set_coarse_modulator (int channel, coarse_mod_t cm) |
| usrp_standard_tx::coarse_mod_t | coarse_modulator (int channel) const |
| usrp_standard_tx (int which_board, unsigned int interp_rate, int nchan=1, int mux=-1, int fusb_block_size=0, int fusb_nblocks=0, const std::string fpga_filename="", const std::string firmware_filename="") | |
| bool | write_hw_mux_reg () |
Protected Attributes | |
| unsigned int | d_interp_rate |
| int | d_nchan |
| int | d_sw_mux |
| int | d_hw_mux |
| double | d_tx_freq [MAX_CHAN] |
| coarse_mod_t | d_coarse_mod [MAX_CHAN] |
| unsigned char | d_tx_modulator_shadow [MAX_CHAN] |
Static Protected Attributes | |
| static const int | MAX_CHAN = 2 |
Uses digital upconverter (coarse & fine modulators) in AD9862...
| usrp_standard_tx::usrp_standard_tx | ( | int | which_board, | |
| unsigned int | interp_rate, | |||
| int | nchan = 1, |
|||
| int | mux = -1, |
|||
| int | fusb_block_size = 0, |
|||
| int | fusb_nblocks = 0, |
|||
| const std::string | fpga_filename = "", |
|||
| const std::string | firmware_filename = "" | |||
| ) | [protected] |
| usrp_standard_tx::~usrp_standard_tx | ( | ) |
| usrp_standard_tx::coarse_mod_t usrp_standard_tx::coarse_modulator | ( | int | channel | ) | const [protected] |
| unsigned int usrp_standard_tx::interp_rate | ( | ) | const |
| static usrp_standard_tx* usrp_standard_tx::make | ( | int | which_board, | |
| unsigned int | interp_rate, | |||
| int | nchan = 1, |
|||
| int | mux = -1, |
|||
| int | fusb_block_size = 0, |
|||
| int | fusb_nblocks = 0, |
|||
| const std::string | fpga_filename = "", |
|||
| const std::string | firmware_filename = "" | |||
| ) | [static] |
invokes constructor, returns instance or 0 if trouble
| which_board | Which USRP board on usb (not particularly useful; use 0) | |
| fusb_block_size | fast usb xfer block size. Must be a multiple of 512. Use zero for a reasonable default. | |
| fusb_nblocks | number of fast usb URBs to allocate. Use zero for a reasonable default. |
| int usrp_standard_tx::mux | ( | ) | const |
| int usrp_standard_tx::nchannels | ( | ) | const |
| virtual bool usrp_standard_tx::set_coarse_modulator | ( | int | channel, | |
| coarse_mod_t | cm | |||
| ) | [protected, virtual] |
| virtual bool usrp_standard_tx::set_interp_rate | ( | unsigned int | rate | ) | [virtual] |
Set interpolator rate. rate must be in [4, 512] and a multiple of 4.
The final complex sample rate across the USB is dac_freq () / interp_rate () * nchannels ()
| bool usrp_standard_tx::set_mux | ( | int | mux | ) |
Set output mux configuration.
3 2 1
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+-------------------------------+-------+-------+-------+-------+
| | DAC3 | DAC2 | DAC1 | DAC0 |
+-------------------------------+-------+-------+-------+-------+
There are two interpolators with complex inputs and outputs. There are four DACs.
Each 4-bit DACx field specifies the source for the DAC and whether or not that DAC is enabled. Each subfield is coded like this:
3 2 1 0
+-+-----+
|E| N |
+-+-----+
Where E is set if the DAC is enabled, and N specifies which interpolator output is connected to this DAC.
N which interp output --- ------------------- 0 chan 0 I 1 chan 0 Q 2 chan 1 I 3 chan 1 Q
| bool usrp_standard_tx::set_nchannels | ( | int | nchannels | ) |
Set number of active channels. nchannels must be 1 or 2.
The final complex sample rate across the USB is dac_freq () / decim_rate () * nchannels ()
| virtual bool usrp_standard_tx::set_tx_freq | ( | int | channel, | |
| double | freq | |||
| ) | [virtual] |
set the frequency of the digital up converter.
channel must be in the range [0,1]. freq is the center frequency in Hz. It must be in the range [-44M, 44M]. The frequency specified is quantized. Use tx_freq to retrieve the actual value used.
| bool usrp_standard_tx::start | ( | ) |
Start data transfers. Called in base class to derived class order.
Reimplemented from usrp_basic_tx.
| bool usrp_standard_tx::stop | ( | ) |
| double usrp_standard_tx::tx_freq | ( | int | channel | ) | const |
| bool usrp_standard_tx::write_hw_mux_reg | ( | ) | [protected] |
coarse_mod_t usrp_standard_tx::d_coarse_mod[MAX_CHAN] [protected] |
int usrp_standard_tx::d_hw_mux [protected] |
unsigned int usrp_standard_tx::d_interp_rate [protected] |
int usrp_standard_tx::d_nchan [protected] |
int usrp_standard_tx::d_sw_mux [protected] |
double usrp_standard_tx::d_tx_freq[MAX_CHAN] [protected] |
unsigned char usrp_standard_tx::d_tx_modulator_shadow[MAX_CHAN] [protected] |
const int usrp_standard_tx::MAX_CHAN = 2 [static, protected] |
1.5.8