diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-03-25 12:36:16 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-03-25 12:36:16 -0700 |
commit | 70cf1da4bde1358a406ba40aab707643ad6407b9 (patch) | |
tree | 610e4b6bdb560aecfdae3d5d4ee8d008919405af /host | |
parent | c6c7acd8a63244b032d7e59f767f311f9bb0d522 (diff) | |
parent | 8bfc4f541c083a60d27113897b0e7bacbc395717 (diff) | |
download | uhd-70cf1da4bde1358a406ba40aab707643ad6407b9.tar.gz uhd-70cf1da4bde1358a406ba40aab707643ad6407b9.tar.bz2 uhd-70cf1da4bde1358a406ba40aab707643ad6407b9.zip |
Merge branch 'maint'
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/convert/convert_with_neon.cpp | 48 | ||||
-rw-r--r-- | host/utils/CMakeLists.txt | 14 | ||||
-rw-r--r-- | host/utils/query_gpsdo_sensors.cpp | 4 |
3 files changed, 62 insertions, 4 deletions
diff --git a/host/lib/convert/convert_with_neon.cpp b/host/lib/convert/convert_with_neon.cpp index f1c7773ec..a172afb54 100644 --- a/host/lib/convert/convert_with_neon.cpp +++ b/host/lib/convert/convert_with_neon.cpp @@ -34,13 +34,35 @@ DECLARE_CONVERTER(fc32, 1, sc16_item32_le, 1, PRIORITY_SIMD){ size_t i; float32x4_t Q0 = vdupq_n_f32(float(scale_factor)); - for (i=0; i < (nsamps & ~0x03); i+=2) { + for (i=0; i < (nsamps & ~0x0f); i+=8) { float32x4_t Q1 = vld1q_f32(reinterpret_cast<const float *>(&input[i])); + float32x4_t Q4 = vld1q_f32(reinterpret_cast<const float *>(&input[i+2])); + float32x4_t Q7 = vld1q_f32(reinterpret_cast<const float *>(&input[i+4])); + float32x4_t Q10 = vld1q_f32(reinterpret_cast<const float *>(&input[i+6])); + float32x4_t Q2 = vmulq_f32(Q1, Q0); int32x4_t Q3 = vcvtq_s32_f32(Q2); int16x4_t D8 = vmovn_s32(Q3); int16x4_t D9 = vrev32_s16(D8); vst1_s16((reinterpret_cast<int16_t *>(&output[i])), D9); + + float32x4_t Q5 = vmulq_f32(Q4, Q0); + int32x4_t Q6 = vcvtq_s32_f32(Q5); + int16x4_t D10 = vmovn_s32(Q6); + int16x4_t D11 = vrev32_s16(D10); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+2])), D11); + + float32x4_t Q8 = vmulq_f32(Q7, Q0); + int32x4_t Q9 = vcvtq_s32_f32(Q8); + int16x4_t D12 = vmovn_s32(Q9); + int16x4_t D13 = vrev32_s16(D12); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+4])), D13); + + float32x4_t Q11 = vmulq_f32(Q10, Q0); + int32x4_t Q13 = vcvtq_s32_f32(Q11); + int16x4_t D14 = vmovn_s32(Q13); + int16x4_t D15 = vrev32_s16(D14); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+6])), D15); } xx_to_item32_sc16<uhd::htowx>(input+i, output+i, nsamps-i, scale_factor); @@ -53,13 +75,35 @@ DECLARE_CONVERTER(sc16_item32_le, 1, fc32, 1, PRIORITY_SIMD){ size_t i; float32x4_t Q1 = vdupq_n_f32(float(scale_factor)); - for (i=0; i < (nsamps & ~0x03); i+=2) { + for (i=0; i < (nsamps & ~0xf); i+=8) { int16x4_t D0 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i])); + int16x4_t D2 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+2])); + int16x4_t D4 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+4])); + int16x4_t D6 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+6])); + int16x4_t D1 = vrev32_s16(D0); int32x4_t Q2 = vmovl_s16(D1); float32x4_t Q3 = vcvtq_f32_s32(Q2); float32x4_t Q4 = vmulq_f32(Q3, Q1); vst1q_f32((reinterpret_cast<float *>(&output[i])), Q4); + + int16x4_t D3 = vrev32_s16(D2); + int32x4_t Q5 = vmovl_s16(D3); + float32x4_t Q6 = vcvtq_f32_s32(Q5); + float32x4_t Q7 = vmulq_f32(Q6, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+2])), Q7); + + int16x4_t D5 = vrev32_s16(D4); + int32x4_t Q8 = vmovl_s16(D5); + float32x4_t Q9 = vcvtq_f32_s32(Q8); + float32x4_t Q10 = vmulq_f32(Q9, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+4])), Q10); + + int16x4_t D7 = vrev32_s16(D6); + int32x4_t Q11 = vmovl_s16(D7); + float32x4_t Q12 = vcvtq_f32_s32(Q11); + float32x4_t Q13 = vmulq_f32(Q12, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+6])), Q13); } item32_sc16_to_xx<uhd::htowx>(input+i, output+i, nsamps-i, scale_factor); diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt index bf8d88799..6f72c97bc 100644 --- a/host/utils/CMakeLists.txt +++ b/host/utils/CMakeLists.txt @@ -192,4 +192,18 @@ IF(ENABLE_USRP2) ENDIF(ENABLE_USRP2) +######################################################################## +# Other files that are not utilities or executables +######################################################################## +IF(WIN32) + SET(windows_extra_files + FastSendDatagramThreshold.reg + ) + UHD_INSTALL( + FILES ${windows_extra_files} + DESTINATION ${PKG_DATA_DIR} + COMPONENT utilities + ) +ENDIF(WIN32) + ADD_SUBDIRECTORY(latency) diff --git a/host/utils/query_gpsdo_sensors.cpp b/host/utils/query_gpsdo_sensors.cpp index 4c17c6044..21d26e81e 100644 --- a/host/utils/query_gpsdo_sensors.cpp +++ b/host/utils/query_gpsdo_sensors.cpp @@ -1,5 +1,5 @@ // -// Copyright 2012,2014,2015 Ettus Research LLC +// Copyright 2012,2014-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -158,7 +158,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //instruct the USRP to wait for the next PPS edge, then set the new time on the following PPS usrp->set_time_unknown_pps(next_pps_time); //allow some time to make sure the PPS has come… - boost::this_thread::sleep(boost::posix_time::seconds(1.1)); + boost::this_thread::sleep(boost::posix_time::milliseconds(1100)); //…then ask gps_seconds = usrp->get_mboard_sensor("gps_time").to_int(); pps_seconds = usrp->get_time_last_pps().to_ticks(1.0); |