From cae618a8df892aeb4cb9b8ee89fb49a0412fe4a6 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 15 May 2017 13:53:29 -0700 Subject: eiscat: Added more properties, other minor fixes --- .../usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 34 +++++++++++++++++++++- .../usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp | 5 ++++ 2 files changed, 38 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/dboard') diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp index a8f11b4aa..f78876791 100644 --- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp @@ -69,7 +69,7 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) // nothing is lost here. for (size_t fe_idx = 0; fe_idx < EISCAT_NUM_CHANS; fe_idx++) { _tree->create(fe_path / fe_idx / "name") - .set(str(boost::format("EISCAT Rx %d") % fe_idx)) + .set(str(boost::format("EISCAT Beam Contributions %d") % fe_idx)) ; _tree->create(fe_path / fe_idx / "connection") .set("I") @@ -107,6 +107,18 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) _tree->create(fe_path / fe_idx / "bandwidth" / "range") .set(meta_range_t(EISCAT_DEFAULT_BANDWIDTH, EISCAT_DEFAULT_BANDWIDTH)) ; + _tree->create(fe_path / fe_idx / "use_lo_offset") + .set(false) + ; + } + + // We can actually stream data to an EISCAT board, so it needs some tx + // frontends too: + fe_path = fs_path("dboards") / "A" / "tx_frontends"; + for (size_t fe_idx = 0; fe_idx < EISCAT_NUM_CHANS; fe_idx++) { + _tree->create(fe_path / fe_idx / "name") + .set(str(boost::format("EISCAT Uplink %d") % fe_idx)) + ; } // There is only ever one EISCAT radio per dboard, so this should be unset @@ -117,6 +129,10 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) .set(EISCAT_TICK_RATE) ; + if (not _tree->exists(fs_path("clock_source/value"))) { + _tree->create(fs_path("clock_source/value")).set("external"); + } + UHD_VAR((_tree->exists(fs_path("time/cmd")))); } @@ -200,4 +216,20 @@ double eiscat_radio_ctrl_impl::get_output_samp_rate(size_t /* port */) return EISCAT_RADIO_RATE; } +bool eiscat_radio_ctrl_impl::check_radio_config() +{ + UHD_RFNOC_BLOCK_TRACE() << "x300_radio_ctrl_impl::check_radio_config() " ; + const fs_path rx_fe_path = fs_path("dboards/A/rx_frontends"); + uint32_t chan_enables = 0; + for (const auto &enb: _rx_streamer_active) { + if (enb.second) { + chan_enables |= (1<