diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-15 13:53:29 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | cae618a8df892aeb4cb9b8ee89fb49a0412fe4a6 (patch) | |
tree | e5c1db3494cc660ec1004036e347134ed5522700 /host | |
parent | c0a528394d44d2e4792e801908e005a1dd73d6b2 (diff) | |
download | uhd-cae618a8df892aeb4cb9b8ee89fb49a0412fe4a6.tar.gz uhd-cae618a8df892aeb4cb9b8ee89fb49a0412fe4a6.tar.bz2 uhd-cae618a8df892aeb4cb9b8ee89fb49a0412fe4a6.zip |
eiscat: Added more properties, other minor fixes
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 34 | ||||
-rw-r--r-- | host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp | 5 |
2 files changed, 38 insertions, 1 deletions
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<std::string>(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<std::string>(fe_path / fe_idx / "connection") .set("I") @@ -107,6 +107,18 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) _tree->create<meta_range_t>(fe_path / fe_idx / "bandwidth" / "range") .set(meta_range_t(EISCAT_DEFAULT_BANDWIDTH, EISCAT_DEFAULT_BANDWIDTH)) ; + _tree->create<bool>(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<std::string>(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<std::string>(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<<enb.first); + } + } + UHD_LOG_TRACE("EISCAT", str(boost::format("check_radio_config(): Setting channel enables to 0x%02X") % chan_enables)); + sr_write("SR_RX_STREAM_ENABLE", chan_enables); + + return true; +} + UHD_RFNOC_BLOCK_REGISTER(eiscat_radio_ctrl, "EISCATRadio"); diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp index f90e15c8b..5bfbbc035 100644 --- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp +++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.hpp @@ -25,6 +25,8 @@ namespace uhd { namespace rfnoc { /*! \brief Provide access to an eiscat radio. + * + * Note: This will control both daughterboards. */ class eiscat_radio_ctrl_impl : public radio_ctrl_impl { @@ -59,6 +61,9 @@ public: double get_output_samp_rate(size_t port); +protected: + virtual bool check_radio_config(); + private: }; /* class radio_ctrl_impl */ |