aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/sigProcLib.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-05-14Transceiver52M: Add clipping detection on RACH inputTom Tsou1-4/+21
Alert user of overdriven RACH input indicated by a positive threshold detector result. This indication serves as notification that the receive RF gain level is too high for the configured transceiver setup. Signed-off-by: Tom Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Enable all warnings and resolveThomas Tsou1-5/+6
Mainly basic signed vs unsigned comparisons and intializer ordering. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Remove unused codeThomas Tsou1-20/+0
This includes unknown and unused variables, functions, and non-relevant documentation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: sigproc: Wrap internal phase on frequency shiftThomas Tsou1-0/+4
The call into table lookup will loop on values outside of the table range. With continuously increasing phase, this leads to an eventual permanent hard spin. Wrap the phase value to prevent that from happening. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Dynamically allocate correlation vectorsThomas Tsou1-6/+10
Stack allocating the correlation output generates a call to the copy constructor of an zero valued vector. We can avoid this extra copy constructor with a pointer reference and dynamic allocation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Allow separate in/out vectors for delay and decimationThomas Tsou1-51/+62
Allow non-in-place use of the delay setting. Internally, the delay call creates a new vector and copies the contents back into the original. Instead, provide the option to return the computed output vector directly and remove an an extra copy in the process. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Setup sinc() call directly with table lookupThomas Tsou1-2/+23
On Beagle Board the call into the sinc() function is generating a lot of load on the peak interpolation. Simplify the sinc() function with a dedicated table lookup. Eventually, this table may be removed in favour of using a precomputed filterbank for fractional delay determination. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Precompute fractional delay filtersThomas Tsou1-14/+59
Preallocate and compute a bank of fractional sample delay filters. The number of filters to allocate is specified by the DELAYFILTS preprocessor definition with a default value of 64. The filters themselves are sinc pulse generated with 20 taps and Blackman-harris windowed . Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Separate signalVector into it's own fileThomas Tsou1-26/+26
Break out the signalVector object and clean up the interface in the process. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Dynamically allocate convolution input vectorsThomas Tsou1-21/+28
This prevents the use of a copy constructor in the downlink modulator and prevents a secondary memory allocation during the convolution. Avoid both cases by dynamically allocating with preloaded head room. The latter provides enough memory before the first sample in the burst to cover the length of the filter taps. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Add NEON complex-complex multiplyThomas Tsou1-0/+22
Complex-complex block multiples are used for phase rotation of bursts. Optimization targeted from perf profiling. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15Transceiver52M: Add ARM NEON supportThomas Tsou1-2/+15
Similar to the existing Intel SSE cases, add support for NEON vector floating point SIMD processing. In this case, use ARM assembly directly as the NEON intrinsics do not generate preferential code output. Currently support NEON vectorized convolution and floating point integer conversions. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08Transceiver52M: Remove unused files and utilitiesThomas Tsou1-2/+0
USRPping and sigProcLibTest are in an unmaintained state, while the intended functionality remains unknown. Stored filter taps are also unused and should also be removed. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Setup dual sample rate transceiverThomas Tsou1-68/+133
This patch applies oversampling, when selected with 4 sps, to the downlink only, while running the receiver with minimal sampling at 1 sps. These split sample rates allow us to run a highly accurate downlink signal with minimal distortion, while keeping receive path channel filtering on the FPGA. Without this patch, we oversample the receive path and require a steep receive filter to get similar adjacent channel suppression as the FPGA halfband / CIC filter combination, which comes with a high computational cost. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Generate delay filter with SSE memory alignmentThomas Tsou1-24/+41
This requires an additional memcpy() on the signal vector constructor, but allows the interpolation filter to use SSE optimzationed convolution. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Reduce RACH and TSC correlation windowsThomas Tsou1-8/+8
Start the correlation search window at 4 symbols before the expected correlation peak. End the search at 10 symbols and 4 + maximum expected delay for RACH and TSC bursts respectively. This change lowers receive side cpu utilization while maintaining reasonable timing jitter and accuracy tolerance. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Setup dual Laurent pulse shaping filterThomas Tsou1-44/+211
Provides substantially improved transmit phase error performance when enabled. Requires use of 4 samples per symbol, and is enabled by default when set. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Refactor RACH and normal burst detectionThomas Tsou1-117/+137
Both RACH and normal bursts are detected with the same approach of midamble correlation combined with peak-to-average ratio. The difference is the midamble placements and lengths. Thus, there is no reason to have independent implementations. This patch creates a common call burstDetect(), while leaving the correlation window indexing in the original calls. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Add 4 samples-per-symbol Laurent pulse shapeThomas Tsou1-9/+40
When 4 samples-per-symbol operation is selected, replace the existing pulse approximation, which becomes inaccurate with non-unit oversampling, with the primary pulse, C0, from the Laurent linear pulse approximation. Pierre Laurent, "Exact and Approximate Construction of Digital Phase Modulations by Superposition of Amplitude Modulated Pulses", IEEE Transactions of Communications, Vol. 34, No. 2, Feb 1986. Octave pulse generation code for the first three pulses of the linear approximation are included. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Disable energy detectorThomas Tsou1-3/+30
The adaptive energy threshold gating suffers a near-far problem at certain gain levels. This is due to exponential threshold raising, but linear decreases. A large signal level followed by a period low signal level causes (comparatively) weak signals to go undetected. Additionally, the algorithm performs differently at multiple RF gain levels. This patch switches solely to correlation based gating for burst detection. The main computational load with this approach is sub-sample width peak interpolation, which we disable for intial detection and run after threshold passing. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Replace resampler with SSE enabled implementationThomas Tsou1-188/+0
Replace the polyphase filter and resampler with a separate implementation using SSE enabled convolution. The USRP2 (including derived devices N200, N210) are the only supported devices that require sample rate conversion, so set the default resampling parameters for the 100 MHz FPGA clock. This changes the previous resampling ratios. 270.833 kHz -> 400 kHz (65 / 96) 270.833 kHz -> 390.625 kHz (52 / 75) The new resampling factor uses a USRP resampling factor of 256 instead of 250. On the device, this allows two halfband filters to be used rather than one. The end result is reduced distortial and aliasing effecits from CIC filter rolloff. B100 and USRP1 will no be supported at 400 ksps with these changes. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Replace convolve and related calls with SSE implementationThomas Tsou1-349/+295
This large patch replaced the convolve() call with an SSE vector enabled version. The lower C and SSE intrinsic based code operates on fixed and aligned vectors for the filter taps. The storage format of interleaved I/Q for both complex and real vectors is maintained. SSE filter tap values must: 1. Start 16-byte aligned 2. Number with a multiple of 4 between 4 and 20 for real taps 3. Number with a multiple of 4 for complex taps Non-compliant values will fall back to non-SSE usage. Fixed length iterators mean that head and tail cases may require reallocation of the input vector, which is automatically handled by the upper C++ interface. Other calls are affected by these changes and adjusted or rewritten accordingly. The underlying algorithms, however, are unchanged. generateGSMPulse() analyzeTrafficBurst() detectRACHBurst() Intel SSE configuration is automatically detected and configured at build time with Autoconf macros. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Generate RACH correlation sequence at initializationThomas Tsou1-1/+11
There is no temporal dependency on when the RACH sequence is generated, so there is no need for transceiver to create it in response to a command from GSM core. If we power on the transceiver, we will need the RACH sequence, so just allocate it during initialization. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Remove logging from signal processing coreThomas Tsou1-19/+0
The only logging outputs in the the signal processing library are debug lines that generate copious amounts of output while providing little useful information to the user. The relevant information (time-of-arrival, channel gains, etc.) can and should be logged from transceiver instance itself. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Add destructors to correlation seqeunce objectsThomas Tsou1-76/+97
Add destructor calls so we can avoid the nested vector deallocations. Also remove the unnecessary pointer NULL checks prior to destruction. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Make GSM pulse filter internal to implementationThomas Tsou1-68/+67
There is no reason expose the pulse shaping filter outside of the signal processing calls. The main transceiver object makes no use of the filter and there's no reason to pass it around. Initialize the pulse shape with the signal processing library, and maintain an internal static member like many of the other library variables. Similarly destroy the object when the library is closed. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18Transceiver52M: Rename samples-per-symbol variable namesThomas Tsou1-45/+53
Because repeatedly typing mSamplesPerSymbol is giving me carpal tunnel syndrome. Replace with the much shorter, easier to type, and just as clear name of 'sps'. Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-06-16Fix build of the Transceiver.Alexander Chemeris1-0/+2
2013-04-04Transceiver52M: Fix calculation of TS correlation for 2 sps and higherttsou1-2/+2
The correlation starting point for normal burst training sequence calculation should be a scaled value of the same symbol regardless of the samples-per-symbol used. Use of 2 samples-per-symbols double the index values, but yields the following outputs, which results in a late time-of-arrival value at the output of the correlation. This patch modifies the parameter calculation accordingly. 1 sps parameters maxTOA = 3 spanTOA = 5; startIx = 61; endIx = 87; windowLen = 26; corrLen = 7; 2 sps parameters (errant case) maxTOA = 6; spanTOA = 10; startIx = 112; endIx = 184; windowLen = 72; corrLen =13; 2 sps parameters (corrected) maxTOA = 6; spanTOA = 10; startIx = 122; endIx = 174; windowLen = 52; corrLen =13; Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5183 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-11-26transceiver, resamp: insert missing filter valueskurtis.heimerl1-4/+29
With transceiver integration, the resampling filter files were dropped. This created a working resampling implementation for the USRP2 / N200, but with spectrum irregulaties that likely caused issues at longer range operation. Simply reinsert the filter files and modify the filter initialization to use them. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2689 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-12Adding in the missing Transceiver52M directorydburgess1-0/+1486
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2307 19bc5d8c-e614-43d4-8b26-e1612bc8e597