diff options
author | Trung N Tran <trung.tran@ettus.com> | 2018-01-11 10:57:07 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-01-12 16:21:15 -0800 |
commit | 7ffea3746be77cf926db946987ee83d48a33c798 (patch) | |
tree | 6266671108fc9c5fad0e75bf4325fe056972d1ab /mpm/lib/mykonos | |
parent | b3e0f60a7b41359e8f7806dc77c402468bf7f444 (diff) | |
download | uhd-7ffea3746be77cf926db946987ee83d48a33c798.tar.gz uhd-7ffea3746be77cf926db946987ee83d48a33c798.tar.bz2 uhd-7ffea3746be77cf926db946987ee83d48a33c798.zip |
mpm: mg: Pass deserializer_lane_xbar to ad937x_config
Slot A and Slot B are different in how the JESD lanes are connected.
We now pass in different deserializer_lane_xbar config values for each slot.
Reviewed-by: Martin Braun <martin.braun@ettus.com>
Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
Reviewed-by: Mark Meserve <mark.meserve@ni.com>
Diffstat (limited to 'mpm/lib/mykonos')
-rw-r--r-- | mpm/lib/mykonos/ad937x_ctrl.cpp | 6 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.cpp | 3 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.hpp | 1 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.cpp | 4 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.hpp | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp index 729d3a6f3..ecb328fc8 100644 --- a/mpm/lib/mykonos/ad937x_ctrl.cpp +++ b/mpm/lib/mykonos/ad937x_ctrl.cpp @@ -172,10 +172,11 @@ class ad937x_ctrl_impl : public ad937x_ctrl public: ad937x_ctrl_impl( std::shared_ptr<std::mutex> spi_mutex, + const size_t deserializer_lane_xbar, mpm::types::regs_iface::sptr iface, mpm::ad937x::gpio::gain_pins_t gain_pins) : spi_mutex(spi_mutex), - device(iface.get(), gain_pins), + device(iface.get(), deserializer_lane_xbar, gain_pins), _iface(iface) { /* nop */ @@ -550,10 +551,11 @@ private: ad937x_ctrl::sptr ad937x_ctrl::make( std::shared_ptr<std::mutex> spi_mutex, + const size_t deserializer_lane_xbar, mpm::types::regs_iface::sptr iface, mpm::ad937x::gpio::gain_pins_t gain_pins ) { - return std::make_shared<ad937x_ctrl_impl>(spi_mutex, iface, gain_pins); + return std::make_shared<ad937x_ctrl_impl>(spi_mutex, deserializer_lane_xbar, iface, gain_pins); } diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index 31fe7a459..e6941b52d 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -257,9 +257,10 @@ Initialization functions ad937x_device::ad937x_device( mpm::types::regs_iface* iface, + const size_t deserializer_lane_xbar, const gain_pins_t gain_pins) : full_spi_settings(iface), - mykonos_config(&full_spi_settings.spi_settings), + mykonos_config(&full_spi_settings.spi_settings, deserializer_lane_xbar), gain_ctrl(gain_pins) { } diff --git a/mpm/lib/mykonos/ad937x_device.hpp b/mpm/lib/mykonos/ad937x_device.hpp index 9219cbf8c..26bb01685 100644 --- a/mpm/lib/mykonos/ad937x_device.hpp +++ b/mpm/lib/mykonos/ad937x_device.hpp @@ -45,6 +45,7 @@ public: ad937x_device( mpm::types::regs_iface* iface, + const size_t deserializer_lane_xbar, mpm::ad937x::gpio::gain_pins_t gain_pins ); diff --git a/mpm/lib/mykonos/config/ad937x_config_t.cpp b/mpm/lib/mykonos/config/ad937x_config_t.cpp index c8e50c33d..b707400c8 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.cpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.cpp @@ -45,7 +45,7 @@ const int16_t ad937x_config_t::DEFAULT_SNIFFER_FIR_15366[DEFAULT_RX_FIR_SIZE] = -3988, -4942,-3512, 958, 8118,16519,23993,28395,28395,23993,16519, 8118, 958,-3512,-4942,-3988, -1871, 198, 1444, 1683, 1192, 440, -175, -466, -456, -283, -92, 30, 71, 59, 31, 10 }; -ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : +ad937x_config_t::ad937x_config_t(spiSettings_t* sps, const size_t deserializer_lane_xbar) : _rx(DEFAULT_RX_SETTINGS), _rxProfile(DEFAULT_RX_PROFILE), _framer(DEFAULT_FRAMER), @@ -57,7 +57,6 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : _tx(DEFAULT_TX_SETTINGS), _txProfile(DEFAULT_TX_PROFILE), _deframer(DEFAULT_DEFRAMER), - // TODO: Remove if ADI ever fixes this // The TX bring up requires a valid ORX profile // https://github.com/EttusResearch/uhddev/blob/f0f8f58471c3fed94279c32f00e9f8da7db40efd/mpm/lib/mykonos/adi/mykonos.c#L16590 @@ -89,6 +88,7 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : _sniffer_rx_fir_config(DEFAULT_RX_FIR_GAIN, std::vector<int16_t>(DEFAULT_SNIFFER_FIR, DEFAULT_SNIFFER_FIR + DEFAULT_RX_FIR_SIZE)) { _device.spiSettings = sps; + _deframer.deserializerLaneCrossbar = deserializer_lane_xbar; _init_pointers(); diff --git a/mpm/lib/mykonos/config/ad937x_config_t.hpp b/mpm/lib/mykonos/config/ad937x_config_t.hpp index c50f5f774..93b08a1df 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.hpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.hpp @@ -13,7 +13,7 @@ class ad937x_config_t : public boost::noncopyable { public: - ad937x_config_t(spiSettings_t* sps); + ad937x_config_t(spiSettings_t* sps, const size_t deserializer_lane_xbar); mykonosDevice_t * device; ad937x_fir rx_fir_config; |