diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/examples/rx_ascii_art_dft.cpp | 2 | ||||
-rw-r--r-- | host/examples/rx_samples_to_file.cpp | 2 | ||||
-rw-r--r-- | host/examples/rx_samples_to_udp.cpp | 2 | ||||
-rw-r--r-- | host/examples/tx_samples_from_file.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 24 | ||||
-rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 6 |
8 files changed, 28 insertions, 17 deletions
diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index 85cf8b50c..564a9e749 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -55,7 +55,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("frame-rate", po::value<double>(&frame_rate)->default_value(5), "frame rate of the display (fps)") ("ref-lvl", po::value<float>(&ref_lvl)->default_value(0), "reference level for the display (dB)") ("dyn-rng", po::value<float>(&dyn_rng)->default_value(60), "dynamic range for the display (dB)") - ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ("int-n", "tune USRP with integer-N tuning") ; po::variables_map vm; diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index de3640794..e196b8592 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -231,7 +231,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("ant", po::value<std::string>(&ant), "daughterboard antenna selection") ("subdev", po::value<std::string>(&subdev), "daughterboard subdevice specification") ("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz") - ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)") ("setup", po::value<double>(&setup_time)->default_value(1.0), "seconds of setup time") ("progress", "periodically display short-term bandwidth") diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp index 2f62652e0..e397dbbf9 100644 --- a/host/examples/rx_samples_to_udp.cpp +++ b/host/examples/rx_samples_to_udp.cpp @@ -52,7 +52,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz") ("port", po::value<std::string>(&port)->default_value("7124"), "server udp port") ("addr", po::value<std::string>(&addr)->default_value("192.168.1.10"), "resolvable server address") - ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ("int-n", "tune USRP with integer-N tuning") ; po::variables_map vm; diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index f911c446e..3293f8bd4 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -88,7 +88,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("ant", po::value<std::string>(&ant), "daughterboard antenna selection") ("subdev", po::value<std::string>(&subdev), "daughterboard subdevice specification") ("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz") - ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)") ("delay", po::value<double>(&delay)->default_value(0.0), "specify a delay between repeated transmission of file") ("repeat", "repeatedly transmit file") diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index d8c8db9ae..bf5fdd251 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -427,7 +427,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr) //setup time source props _tree->create<std::string>(mb_path / "time_source" / "value") .subscribe(boost::bind(&b200_impl::update_time_source, this, _1)); - static const std::vector<std::string> time_sources = boost::assign::list_of("none")("external")("gpsdo"); + static const std::vector<std::string> time_sources = boost::assign::list_of("none")("internal")("external")("gpsdo"); _tree->create<std::vector<std::string> >(mb_path / "time_source" / "options").set(time_sources); //setup reference source props _tree->create<std::string>(mb_path / "clock_source" / "value") @@ -464,10 +464,6 @@ b200_impl::b200_impl(const device_addr_t &device_addr) _tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(rx_spec); _tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(tx_spec); - //init to internal clock and time source - _tree->access<std::string>(mb_path / "clock_source/value").set("internal"); - _tree->access<std::string>(mb_path / "time_source/value").set("none"); - //GPS installed: use external ref, time, and init time spec if (_gps and _gps->gps_detected()) { @@ -477,6 +473,10 @@ b200_impl::b200_impl(const device_addr_t &device_addr) UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl; const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1); _tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp)); + } else { + //init to internal clock and time source + _tree->access<std::string>(mb_path / "clock_source/value").set("internal"); + _tree->access<std::string>(mb_path / "time_source/value").set("internal"); } } @@ -786,11 +786,17 @@ void b200_impl::update_clock_source(const std::string &source) void b200_impl::update_time_source(const std::string &source) { - if (source == "none"){} - else if (source == "external"){} - else if (source == "gpsdo"){} + boost::uint32_t value = 0; + if (source == "none") + value = 3; + else if (source == "internal") + value = 2; + else if (source == "external") + value = 1; + else if (source == "gpsdo") + value = 0; else throw uhd::key_error("update_time_source: unknown source: " + source); - _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), (source == "external")? 1 : 0); + _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), value); } /*********************************************************************** diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index 2fdc220b5..2e5ca8e7a 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -176,7 +176,8 @@ public: //determine which half-band filters are activated int hb0 = 0, hb1 = 0; - if (decim % 2 == 0){ + // hb0 can only be enabled if the rate will be decimated by at least 2 between the CIC and hb1 + if (decim >= 4 && decim % 2 == 0){ hb0 = 1; decim /= 2; } diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 2c291f422..a624ebf6b 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1129,12 +1129,12 @@ x300_impl::both_xports_t x300_impl::make_transport( if (mb.xport_path == "nirio") { default_buff_args.send_frame_size = (prefix == X300_RADIO_DEST_PREFIX_TX) - ? X300_PCIE_DATA_FRAME_SIZE + ? X300_PCIE_TX_DATA_FRAME_SIZE : X300_PCIE_MSG_FRAME_SIZE; default_buff_args.recv_frame_size = (prefix == X300_RADIO_DEST_PREFIX_RX) - ? X300_PCIE_DATA_FRAME_SIZE + ? X300_PCIE_RX_DATA_FRAME_SIZE : X300_PCIE_MSG_FRAME_SIZE; default_buff_args.num_send_frames = diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index 80f3e8faa..27f20fbd9 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -63,7 +63,11 @@ static const size_t X300_RX_SW_BUFF_SIZE_ETH_MACOS = 0x100000; //1Mib static const double X300_RX_SW_BUFF_FULL_FACTOR = 0.90; //Buffer should ideally be 90% full. static const size_t X300_RX_FC_REQUEST_FREQ = 32; //per flow-control window -static const size_t X300_PCIE_DATA_FRAME_SIZE = 8192; //bytes +//The FIFO closest to the DMA controller is 1023 elements deep for RX and 1029 elements deep for TX +//where an element is 8 bytes. For best throughput ensure that the data frame fits in these buffers. +//Also ensure that the kernel has enough frames to hold buffered TX and RX data +static const size_t X300_PCIE_RX_DATA_FRAME_SIZE = 8184; //bytes +static const size_t X300_PCIE_TX_DATA_FRAME_SIZE = 8192; //bytes static const size_t X300_PCIE_DATA_NUM_FRAMES = 2048; static const size_t X300_PCIE_MSG_FRAME_SIZE = 256; //bytes static const size_t X300_PCIE_MSG_NUM_FRAMES = 32; |