Revision 4bcab9c5
| b/host/lib/usrp/b100/b100_impl.cpp | ||
|---|---|---|
| 328 | 328 |
_tree->create<std::vector<std::string> >(mb_path / "time_source/options") |
| 329 | 329 |
.publish(boost::bind(&time64_core_200::get_time_sources, _time64)); |
| 330 | 330 |
//setup reference source props |
| 331 |
_tree->create<std::string>(mb_path / "ref_source/value")
|
|
| 332 |
.subscribe(boost::bind(&b100_impl::update_ref_source, this, _1));
|
|
| 333 |
static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("auto");
|
|
| 334 |
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
|
|
| 331 |
_tree->create<std::string>(mb_path / "clock_source/value")
|
|
| 332 |
.subscribe(boost::bind(&b100_impl::update_clock_source, this, _1));
|
|
| 333 |
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("auto");
|
|
| 334 |
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
|
|
| 335 | 335 |
|
| 336 | 336 |
//////////////////////////////////////////////////////////////////// |
| 337 | 337 |
// create dboard control objects |
| ... | ... | |
| 394 | 394 |
|
| 395 | 395 |
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(subdev_spec_t("A:"+_dboard_manager->get_rx_subdev_names()[0]));
|
| 396 | 396 |
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(subdev_spec_t("A:"+_dboard_manager->get_tx_subdev_names()[0]));
|
| 397 |
_tree->access<std::string>(mb_path / "ref_source/value").set("internal");
|
|
| 397 |
_tree->access<std::string>(mb_path / "clock_source/value").set("internal");
|
|
| 398 | 398 |
_tree->access<std::string>(mb_path / "time_source/value").set("none");
|
| 399 | 399 |
} |
| 400 | 400 |
|
| ... | ... | |
| 444 | 444 |
if (type == "gdb") db_eeprom.store(*_fpga_i2c_ctrl, I2C_ADDR_TX_A ^ 5); |
| 445 | 445 |
} |
| 446 | 446 |
|
| 447 |
void b100_impl::update_ref_source(const std::string &source){
|
|
| 447 |
void b100_impl::update_clock_source(const std::string &source){
|
|
| 448 | 448 |
if (source == "auto") _clock_ctrl->use_auto_ref(); |
| 449 | 449 |
else if (source == "internal") _clock_ctrl->use_internal_ref(); |
| 450 | 450 |
else if (source == "external") _clock_ctrl->use_external_ref(); |
| b/host/lib/usrp/b100/b100_impl.hpp | ||
|---|---|---|
| 123 | 123 |
void update_tx_samp_rate(const double rate); |
| 124 | 124 |
void update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &); |
| 125 | 125 |
void update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &); |
| 126 |
void update_ref_source(const std::string &);
|
|
| 126 |
void update_clock_source(const std::string &);
|
|
| 127 | 127 |
void reset_gpif(const boost::uint16_t); |
| 128 | 128 |
void enable_gpif(const bool); |
| 129 | 129 |
void clear_fpga_fifo(void); |
| b/host/lib/usrp/e100/e100_impl.cpp | ||
|---|---|---|
| 287 | 287 |
_tree->create<std::vector<std::string> >(mb_path / "time_source/options") |
| 288 | 288 |
.publish(boost::bind(&time64_core_200::get_time_sources, _time64)); |
| 289 | 289 |
//setup reference source props |
| 290 |
_tree->create<std::string>(mb_path / "ref_source/value")
|
|
| 291 |
.subscribe(boost::bind(&e100_impl::update_ref_source, this, _1));
|
|
| 292 |
static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("auto");
|
|
| 293 |
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
|
|
| 290 |
_tree->create<std::string>(mb_path / "clock_source/value")
|
|
| 291 |
.subscribe(boost::bind(&e100_impl::update_clock_source, this, _1));
|
|
| 292 |
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("auto");
|
|
| 293 |
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
|
|
| 294 | 294 |
|
| 295 | 295 |
//////////////////////////////////////////////////////////////////// |
| 296 | 296 |
// create dboard control objects |
| ... | ... | |
| 353 | 353 |
|
| 354 | 354 |
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(subdev_spec_t("A:"+_dboard_manager->get_rx_subdev_names()[0]));
|
| 355 | 355 |
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(subdev_spec_t("A:"+_dboard_manager->get_tx_subdev_names()[0]));
|
| 356 |
_tree->access<std::string>(mb_path / "ref_source/value").set("internal");
|
|
| 356 |
_tree->access<std::string>(mb_path / "clock_source/value").set("internal");
|
|
| 357 | 357 |
_tree->access<std::string>(mb_path / "time_source/value").set("none");
|
| 358 | 358 |
|
| 359 | 359 |
} |
| ... | ... | |
| 380 | 380 |
if (type == "gdb") db_eeprom.store(*_fpga_i2c_ctrl, I2C_ADDR_TX_DB ^ 5); |
| 381 | 381 |
} |
| 382 | 382 |
|
| 383 |
void e100_impl::update_ref_source(const std::string &source){
|
|
| 383 |
void e100_impl::update_clock_source(const std::string &source){
|
|
| 384 | 384 |
if (source == "auto") _clock_ctrl->use_auto_ref(); |
| 385 | 385 |
else if (source == "internal") _clock_ctrl->use_internal_ref(); |
| 386 | 386 |
else if (source == "external") _clock_ctrl->use_external_ref(); |
| b/host/lib/usrp/e100/e100_impl.hpp | ||
|---|---|---|
| 121 | 121 |
void update_tx_samp_rate(const double rate); |
| 122 | 122 |
void update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &); |
| 123 | 123 |
void update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &); |
| 124 |
void update_ref_source(const std::string &);
|
|
| 124 |
void update_clock_source(const std::string &);
|
|
| 125 | 125 |
|
| 126 | 126 |
}; |
| 127 | 127 |
|
| b/host/lib/usrp/multi_usrp.cpp | ||
|---|---|---|
| 347 | 347 |
void set_clock_config(const clock_config_t &clock_config, size_t mboard){
|
| 348 | 348 |
if (mboard != ALL_MBOARDS){
|
| 349 | 349 |
//set the reference source... |
| 350 |
std::string ref_source;
|
|
| 350 |
std::string clock_source;
|
|
| 351 | 351 |
switch(clock_config.ref_source){
|
| 352 |
case clock_config_t::REF_INT: ref_source = "internal"; break;
|
|
| 353 |
case clock_config_t::PPS_SMA: ref_source = "external"; break;
|
|
| 354 |
case clock_config_t::PPS_MIMO: ref_source = "mimo"; break;
|
|
| 355 |
default: ref_source = "unknown";
|
|
| 352 |
case clock_config_t::REF_INT: clock_source = "internal"; break;
|
|
| 353 |
case clock_config_t::PPS_SMA: clock_source = "external"; break;
|
|
| 354 |
case clock_config_t::PPS_MIMO: clock_source = "mimo"; break;
|
|
| 355 |
default: clock_source = "unknown";
|
|
| 356 | 356 |
} |
| 357 |
if (ref_source == "external" and clock_config.pps_polarity == clock_config_t::PPS_NEG) ref_source = "_external_";
|
|
| 358 |
_tree->access<std::string>(mb_root(mboard) / "ref_source" / "value").set(ref_source);
|
|
| 357 |
if (clock_source == "external" and clock_config.pps_polarity == clock_config_t::PPS_NEG) clock_source = "_external_";
|
|
| 358 |
_tree->access<std::string>(mb_root(mboard) / "clock_source" / "value").set(clock_source);
|
|
| 359 | 359 |
|
| 360 | 360 |
//set the time source |
| 361 | 361 |
std::string time_source; |
| b/host/lib/usrp/usrp1/usrp1_impl.cpp | ||
|---|---|---|
| 305 | 305 |
.publish(boost::bind(&soft_time_ctrl::get_time, _soft_time_ctrl)) |
| 306 | 306 |
.subscribe(boost::bind(&soft_time_ctrl::set_time, _soft_time_ctrl, _1)); |
| 307 | 307 |
|
| 308 |
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(std::vector<std::string>(1, "internal"));
|
|
| 308 |
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(std::vector<std::string>(1, "internal"));
|
|
| 309 | 309 |
_tree->create<std::vector<std::string> >(mb_path / "time_source/options").set(std::vector<std::string>(1, "none")); |
| 310 |
_tree->create<std::string>(mb_path / "ref_source/value").set("internal");
|
|
| 310 |
_tree->create<std::string>(mb_path / "clock_source/value").set("internal");
|
|
| 311 | 311 |
_tree->create<std::string>(mb_path / "time_source/value").set("none");
|
| 312 | 312 |
|
| 313 | 313 |
//////////////////////////////////////////////////////////////////// |
| b/host/lib/usrp/usrp2/usrp2_impl.cpp | ||
|---|---|---|
| 493 | 493 |
_tree->create<std::vector<std::string> >(mb_path / "time_source/options") |
| 494 | 494 |
.publish(boost::bind(&time64_core_200::get_time_sources, _mbc[mb].time64)); |
| 495 | 495 |
//setup reference source props |
| 496 |
_tree->create<std::string>(mb_path / "ref_source/value")
|
|
| 497 |
.subscribe(boost::bind(&usrp2_impl::update_ref_source, this, mb, _1));
|
|
| 498 |
static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("mimo");
|
|
| 499 |
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
|
|
| 496 |
_tree->create<std::string>(mb_path / "clock_source/value")
|
|
| 497 |
.subscribe(boost::bind(&usrp2_impl::update_clock_source, this, mb, _1));
|
|
| 498 |
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("mimo");
|
|
| 499 |
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
|
|
| 500 | 500 |
|
| 501 | 501 |
//////////////////////////////////////////////////////////////// |
| 502 | 502 |
// create dboard control objects |
| ... | ... | |
| 559 | 559 |
|
| 560 | 560 |
_tree->access<subdev_spec_t>(root / "rx_subdev_spec").set(subdev_spec_t("A:"+_mbc[mb].dboard_manager->get_rx_subdev_names()[0]));
|
| 561 | 561 |
_tree->access<subdev_spec_t>(root / "tx_subdev_spec").set(subdev_spec_t("A:"+_mbc[mb].dboard_manager->get_tx_subdev_names()[0]));
|
| 562 |
_tree->access<std::string>(root / "ref_source/value").set("internal");
|
|
| 562 |
_tree->access<std::string>(root / "clock_source/value").set("internal");
|
|
| 563 | 563 |
_tree->access<std::string>(root / "time_source/value").set("none");
|
| 564 | 564 |
|
| 565 | 565 |
//GPS installed: use external ref, time, and init time spec |
| 566 | 566 |
if (_mbc[mb].gps.get() != NULL){
|
| 567 | 567 |
_tree->access<std::string>(root / "time_source/value").set("external");
|
| 568 |
_tree->access<std::string>(root / "ref_source/value").set("external");
|
|
| 568 |
_tree->access<std::string>(root / "clock_source/value").set("external");
|
|
| 569 | 569 |
_mbc[mb].time64->set_time_next_pps(time_spec_t(time_t(_mbc[mb].gps->get_sensor("gps_time").to_int()+1)));
|
| 570 | 570 |
} |
| 571 | 571 |
} |
| ... | ... | |
| 624 | 624 |
return meta_range_t(dsp_range.start() - tick_rate*2, dsp_range.stop() + tick_rate*2, dsp_range.step()); |
| 625 | 625 |
} |
| 626 | 626 |
|
| 627 |
void usrp2_impl::update_ref_source(const std::string &mb, const std::string &source){
|
|
| 627 |
void usrp2_impl::update_clock_source(const std::string &mb, const std::string &source){
|
|
| 628 | 628 |
//clock source ref 10mhz |
| 629 | 629 |
switch(_mbc[mb].iface->get_rev()){
|
| 630 | 630 |
case usrp2_iface::USRP_N200: |
| b/host/lib/usrp/usrp2/usrp2_impl.hpp | ||
|---|---|---|
| 128 | 128 |
void update_tx_subdev_spec(const std::string &, const uhd::usrp::subdev_spec_t &); |
| 129 | 129 |
double set_tx_dsp_freq(const std::string &, const double); |
| 130 | 130 |
uhd::meta_range_t get_tx_dsp_freq_range(const std::string &); |
| 131 |
void update_ref_source(const std::string &, const std::string &);
|
|
| 131 |
void update_clock_source(const std::string &, const std::string &);
|
|
| 132 | 132 |
}; |
| 133 | 133 |
|
| 134 | 134 |
#endif /* INCLUDED_USRP2_IMPL_HPP */ |
| b/host/utils/uhd_usrp_probe.cpp | ||
|---|---|---|
| 138 | 138 |
} |
| 139 | 139 |
ss << std::endl; |
| 140 | 140 |
ss << "Time sources: " << prop_names_to_pp_string(tree->access<std::vector<std::string> >(path / "time_source" / "options").get()) << std::endl; |
| 141 |
ss << "Ref sources: " << prop_names_to_pp_string(tree->access<std::vector<std::string> >(path / "ref_source" / "options").get()) << std::endl;
|
|
| 141 |
ss << "Clock sources: " << prop_names_to_pp_string(tree->access<std::vector<std::string> >(path / "clock_source" / "options").get()) << std::endl;
|
|
| 142 | 142 |
ss << "Sensors: " << prop_names_to_pp_string(tree->list(path / "sensors")) << std::endl; |
| 143 | 143 |
BOOST_FOREACH(const std::string &name, tree->list(path / "rx_dsps")){
|
| 144 | 144 |
ss << make_border(get_dsp_pp_string("RX", tree, path / "rx_dsps" / name));
|
Also available in: Unified diff