diff options
author | Mark Meserve <mark.meserve@ni.com> | 2017-09-01 15:18:39 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:01 -0800 |
commit | 04b0f414b9235d36e7572b8c6644630d77de4aab (patch) | |
tree | b3ae594a9fc272b558e2dfc4464e318bbdf4b1e6 /mpm/lib/mykonos/config | |
parent | 01ddd50e55fae3382c1300616747fc9aebb39523 (diff) | |
download | uhd-04b0f414b9235d36e7572b8c6644630d77de4aab.tar.gz uhd-04b0f414b9235d36e7572b8c6644630d77de4aab.tar.bz2 uhd-04b0f414b9235d36e7572b8c6644630d77de4aab.zip |
mpm: ad937x: Updated controls
Diffstat (limited to 'mpm/lib/mykonos/config')
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.cpp | 24 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.hpp | 9 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_default_config.hpp | 4 |
3 files changed, 31 insertions, 6 deletions
diff --git a/mpm/lib/mykonos/config/ad937x_config_t.cpp b/mpm/lib/mykonos/config/ad937x_config_t.cpp index 0e6d499e6..97d0a91d5 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.cpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.cpp @@ -18,6 +18,22 @@ #include "ad937x_config_t.hpp" #include "ad937x_default_config.hpp" +const int16_t ad937x_config_t::DEFAULT_TX_FIR[DEFAULT_TX_FIR_SIZE] = + { -94, -26, 282, 177, -438, -368, 756, 732,-1170,-1337, 1758, 2479,-2648,-5088, 4064,16760, + 16759, 4110,-4881,-2247, 2888, 1917,-1440,-1296, 745, 828, -358, -474, 164, 298, -16, -94 }; +const int16_t ad937x_config_t::DEFAULT_RX_FIR[DEFAULT_RX_FIR_SIZE] = + { -20, 6, 66, 22, -128, -54, 240, 126, -402, -248, 634, 444, -956, -756, 1400, 1244, + -2028,-2050, 2978, 3538,-4646,-7046, 9536,30880,30880, 9536,-7046,-4646, 3538, 2978,-2050,-2028, + 1244, 1400, -756, -956, 444, 634, -248, -402, 126, 240, -54, -128, 22, 66, 6, -20 }; +const int16_t ad937x_config_t::DEFAULT_OBSRX_FIR[DEFAULT_RX_FIR_SIZE] = + { -14, -19, 44, 41, -89, -95, 175, 178, -303, -317, 499, 527, -779, -843, 1184, 1317, + -1781,-2059, 2760, 3350,-4962,-7433, 9822,32154,32154, 9822,-7433,-4962, 3350, 2760,-2059,-1781, + 1317, 1184, -843, -779, 527, 499, -317, -303, 178, 175, -95, -89, 41, 44, -19, -14 }; +const int16_t ad937x_config_t::DEFAULT_SNIFFER_FIR[DEFAULT_RX_FIR_SIZE] = + { -1, -5, -14, -23, -16, 24, 92, 137, 80, -120, -378, -471, -174, 507, 1174, 1183, + 98,-1771,-3216,-2641, 942, 7027,13533,17738,17738,13533, 7027, 942,-2641,-3216,-1771, 98, + 1183, 1174, 507, -174, -471, -378, -120, 80, 137, 92, 24, -16, -23, -14, -5, -1 }; + ad937x_config_t::ad937x_config_t(spiSettings_t* sps) { _device.spiSettings = sps; @@ -125,9 +141,9 @@ void ad937x_config_t::_init_pointers() void ad937x_config_t::_assign_firs() { // TODO: get default filters here - tx_fir_config.set_fir(6, std::vector<int16_t>(48, 0)); - rx_fir_config.set_fir(-6, std::vector<int16_t>(48, 0)); - _orx_fir_config.set_fir(-6, std::vector<int16_t>(48, 0)); - _sniffer_rx_fir_config.set_fir(-6, std::vector<int16_t>(48, 0)); + tx_fir_config.set_fir(6, std::vector<int16_t>(DEFAULT_TX_FIR, DEFAULT_TX_FIR + DEFAULT_TX_FIR_SIZE)); + rx_fir_config.set_fir(-6, std::vector<int16_t>(DEFAULT_RX_FIR, DEFAULT_RX_FIR + DEFAULT_RX_FIR_SIZE)); + _orx_fir_config.set_fir(-6, std::vector<int16_t>(DEFAULT_OBSRX_FIR, DEFAULT_OBSRX_FIR + DEFAULT_RX_FIR_SIZE)); + _sniffer_rx_fir_config.set_fir(-6, std::vector<int16_t>(DEFAULT_SNIFFER_FIR, DEFAULT_SNIFFER_FIR + DEFAULT_RX_FIR_SIZE)); } diff --git a/mpm/lib/mykonos/config/ad937x_config_t.hpp b/mpm/lib/mykonos/config/ad937x_config_t.hpp index 94d14c733..9613132e7 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.hpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.hpp @@ -33,6 +33,15 @@ public: ad937x_fir rx_fir_config; ad937x_fir tx_fir_config; + + static const size_t DEFAULT_TX_FIR_SIZE = 32; + static const size_t DEFAULT_RX_FIR_SIZE = 48; + + static const int16_t DEFAULT_TX_FIR[DEFAULT_TX_FIR_SIZE]; + static const int16_t DEFAULT_RX_FIR[DEFAULT_RX_FIR_SIZE]; + static const int16_t DEFAULT_OBSRX_FIR[DEFAULT_RX_FIR_SIZE]; + static const int16_t DEFAULT_SNIFFER_FIR[DEFAULT_RX_FIR_SIZE]; + private: mykonosDevice_t _device; diff --git a/mpm/lib/mykonos/config/ad937x_default_config.hpp b/mpm/lib/mykonos/config/ad937x_default_config.hpp index fdf777795..614d50d55 100644 --- a/mpm/lib/mykonos/config/ad937x_default_config.hpp +++ b/mpm/lib/mykonos/config/ad937x_default_config.hpp @@ -66,7 +66,7 @@ static const mykonosJesd204bFramerConfig_t DEFAULT_FRAMER = 0, // Flag for determining if SYSREF on relink should be set. Where, if > 0 = set, 0 = not set 0, // Flag for determining if auto channel select for the xbar should be set. Where, if > 0 = set, '0' = not set 0, // Selects SYNCb input source. Where, 0 = use RXSYNCB for this framer, 1 = use OBSRX_SYNCB for this framer - 0, // Flag for determining if CMOS mode for RX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS + 1, // Flag for determining if CMOS mode for RX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS 0 // Selects framer bit repeat or oversampling mode for lane rate matching. Where, 0 = bitRepeat mode (changes effective lanerate), 1 = overSample (maintains same lane rate between ObsRx framer and Rx framer and oversamples the ADC samples) }; @@ -188,7 +188,7 @@ static const mykonosJesd204bDeframerConfig_t DEFAULT_DEFRAMER = 0, // LMFC offset value to adjust deterministic latency. Range is 0..31 0, // Flag for determining if SYSREF on relink should be set. Where, if > 0 = set, '0' = not set 0, // Flag for determining if auto channel select for the xbar should be set. Where, if > 0 = set, '0' = not set - 0 // Flag for determining if CMOS mode for TX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS + 1 // Flag for determining if CMOS mode for TX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS }; static const mykonosObsRxSettings_t DEFAULT_ORX_SETTINGS = |