mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-06 07:20:34 +00:00
Merge branch 'mmajoral-fpga' into fpga
This commit is contained in:
commit
21a6d8ac61
@ -75,7 +75,7 @@ the actual username of your GitHub account):
|
||||
|
||||
4. Your forked repository https://github.com/YOUR_USERNAME/gnss-sdr
|
||||
will receive the default name of `origin`. You can also add the original
|
||||
gnss-sdr repository, which is usually called `upstream`:
|
||||
gnss-sdr repository, which is usually referred to as `upstream`:
|
||||
|
||||
$ cd gnss-sdr
|
||||
$ git remote add upstream https://github.com/gnss-sdr/gnss-sdr.git
|
||||
|
@ -185,9 +185,9 @@ or manually as explained below, and then please follow instructions on how to [d
|
||||
$ sudo apt-get install libopenblas-dev liblapack-dev # For Debian/Ubuntu/LinuxMint
|
||||
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
|
||||
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
|
||||
$ wget http://sourceforge.net/projects/arma/files/armadillo-8.200.2.tar.xz
|
||||
$ tar xvfz armadillo-8.200.2.tar.xz
|
||||
$ cd armadillo-8.200.2
|
||||
$ wget http://sourceforge.net/projects/arma/files/armadillo-8.500.0.tar.xz
|
||||
$ tar xvfz armadillo-8.500.0.tar.xz
|
||||
$ cd armadillo-8.500.0
|
||||
$ cmake .
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
@ -1,3 +1,19 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
find_library(GFORTRAN NAMES gfortran
|
||||
PATHS /usr/lib
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# - Try to find GFlags
|
||||
#
|
||||
# The following variables are optionally searched for defaults
|
||||
@ -9,14 +26,6 @@
|
||||
# GFlags_LIBS
|
||||
# GFlags_LIBRARY_DIRS
|
||||
|
||||
# - Try to find GFlags
|
||||
#
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
# GFlags_FOUND
|
||||
# GFlags_INCLUDE_DIRS
|
||||
# GFlags_LIBS
|
||||
# GFlags_LIBRARY_DIRS
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
if(APPLE)
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# - Try to find the Google Glog library
|
||||
#
|
||||
# This module defines the following variables
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# - Find gpstk library
|
||||
# Find the native gpstk includes and library
|
||||
# This module defines
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find GNU Radio
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Tries to find Gperftools.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find GR-DBFCTTC Module
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find GR-GN3S Module
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Tries to find gr-osmosdr.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Tries to find libosmosdr.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# - Find Log4cpp
|
||||
# Find the native LOG4CPP includes and library
|
||||
#
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# FindMATIO
|
||||
#
|
||||
# Try to find MATIO library
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.22")
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# - Try to find OpenBLAS library (not headers!)
|
||||
#
|
||||
# The following environment variable is optionally searched
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# This file taken from FindOpenCL project @ http://gitorious.com/findopencl
|
||||
#
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_TELEORBIT teleorbit)
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find the library for the USRP Hardware Driver
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find VOLK (Vector-Optimized Library of Kernels)
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
|
||||
########################################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_IIO gnuradio-iio)
|
||||
|
||||
@ -22,6 +39,28 @@ FIND_LIBRARY(
|
||||
/usr/local/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i686-gnu
|
||||
/usr/lib/i686-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i686-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/sh4-linux-gnu
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
@ -1,9 +1,26 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBIIO libiio)
|
||||
|
||||
FIND_PATH(
|
||||
LIBIIO_INCLUDE_DIRS
|
||||
NAMES gnuradio/iio/api.h
|
||||
NAMES iio.h
|
||||
HINTS $ENV{LIBIIO_DIR}/include
|
||||
${PC_LIBIIO_INCLUDEDIR}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/include
|
||||
@ -14,7 +31,7 @@ FIND_PATH(
|
||||
|
||||
FIND_LIBRARY(
|
||||
LIBIIO_LIBRARIES
|
||||
NAMES libiio.so iio
|
||||
NAMES iio libiio.so.0
|
||||
HINTS $ENV{LIBIIO_DIR}/lib
|
||||
${PC_LIBIIO_LIBDIR}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
@ -24,27 +41,27 @@ FIND_LIBRARY(
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/gcc/alpha-linux-gnu
|
||||
/usr/lib/gcc/aarch64-linux-gnu
|
||||
/usr/lib/gcc/arm-linux-gnueabi
|
||||
/usr/lib/gcc/arm-linux-gnueabihf
|
||||
/usr/lib/gcc/hppa-linux-gnu
|
||||
/usr/lib/gcc/i686-gnu
|
||||
/usr/lib/gcc/i686-linux-gnu
|
||||
/usr/lib/gcc/x86_64-kfreebsd-gnu
|
||||
/usr/lib/gcc/i686-kfreebsd-gnu
|
||||
/usr/lib/gcc/m68k-linux-gnu
|
||||
/usr/lib/gcc/mips-linux-gnu
|
||||
/usr/lib/gcc/mips64el-linux-gnuabi64
|
||||
/usr/lib/gcc/mipsel-linux-gnu
|
||||
/usr/lib/gcc/powerpc-linux-gnu
|
||||
/usr/lib/gcc/powerpc-linux-gnuspe
|
||||
/usr/lib/gcc/powerpc64-linux-gnu
|
||||
/usr/lib/gcc/powerpc64le-linux-gnu
|
||||
/usr/lib/gcc/s390x-linux-gnu
|
||||
/usr/lib/gcc/sparc64-linux-gnu
|
||||
/usr/lib/gcc/x86_64-linux-gnux32
|
||||
/usr/lib/gcc/sh4-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i686-gnu
|
||||
/usr/lib/i686-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i686-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/Library/Frameworks/iio.framework/
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Setup the python interpreter:
|
||||
# This allows the user to specify a specific interpreter,
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
##############################################################################
|
||||
# check if the compiler defines the architecture as ARM and set the
|
||||
# version, if found.
|
||||
|
@ -1,3 +1,21 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Test for availability of SSE
|
||||
#
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
##########################################################
|
||||
# Toolchain file for Open Embedded
|
||||
##########################################################
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
##########################################################
|
||||
# Toolchain file for Zynq-7000 devices
|
||||
##########################################################
|
||||
@ -23,4 +40,4 @@ set(CMAKE_CXX_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_SYSROOT}/usr/lib
|
||||
${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_SYSROOT}/usr CACHE STRING "" FORCE)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_SYSROOT}/usr CACHE STRING "" FORCE)
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
@ -18,4 +35,4 @@ foreach(file ${files})
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
||||
endforeach(file)
|
||||
|
@ -1,14 +1,17 @@
|
||||
/*!
|
||||
* \file gps_l1_ca_pcps_acquisition_fpga.cc
|
||||
* \brief Adapts a PCPS acquisition block to an FPGA Acquisition Interface for
|
||||
* GPS L1 C/A signals. This file is based on the file gps_l1_ca_pcps_acquisition.cc
|
||||
* \brief Adapts a PCPS acquisition block to an FPGA AcquisitionInterface
|
||||
* for GPS L1 C/A signals
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* <li> Marc Majoral, 2018. mmajoral(at)cttc.es
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* <li> Marc Molina, 2013. marc.molina.pena(at)gmail.com
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -30,88 +33,109 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_acquisition_fpga.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <new>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <volk/volk.h>
|
||||
#include <glog/logging.h>
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gps_l1_ca_pcps_acquisition_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
unsigned int code_length;
|
||||
bool bit_transition_flag;
|
||||
bool use_CFAR_algorithm_flag;
|
||||
unsigned int sampled_ms;
|
||||
long fs_in;
|
||||
long ifreq;
|
||||
bool dump;
|
||||
std::string dump_filename;
|
||||
unsigned int nsamples_total;
|
||||
unsigned int select_queue_Fpga;
|
||||
std::string device_name;
|
||||
pcpsconf_fpga_t acq_parameters;
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "cshort";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
std::string default_item_type = "gr_complex";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
item_type_ = configuration_->property(role + ".item_type",
|
||||
default_item_type);
|
||||
fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", 2048000);
|
||||
ifreq = configuration_->property(role + ".if", 0);
|
||||
dump = configuration_->property(role + ".dump", false);
|
||||
|
||||
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in;
|
||||
long ifreq = configuration_->property(role + ".if", 0);
|
||||
acq_parameters.freq = ifreq;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
sampled_ms = configuration_->property(
|
||||
role + ".coherent_integration_time_ms", 1);
|
||||
// note : the FPGA is implemented according to bit transition flag = 0. Setting bit transition flag to 1 has no effect.
|
||||
bit_transition_flag = configuration_->property(
|
||||
role + ".bit_transition_flag", false);
|
||||
// note : the FPGA is implemented according to use_CFAR_algorithm = 0. Setting use_CFAR_algorithm to 1 has no effect.
|
||||
use_CFAR_algorithm_flag = configuration_->property(
|
||||
role + ".use_CFAR_algorithm", false);
|
||||
// note : the FPGA does not use the max_dwells variable.
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
dump_filename = configuration_->property(role + ".dump_filename",
|
||||
default_dump_filename);
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length = round(
|
||||
fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
// code length has the same value as d_fft_size
|
||||
float nbits;
|
||||
nbits = ceilf(log2f(code_length));
|
||||
nsamples_total = pow(2, nbits);
|
||||
//vector_length_ = code_length_ * sampled_ms_;
|
||||
vector_length_ = nsamples_total * sampled_ms;
|
||||
// if( bit_transition_flag_ )
|
||||
// {
|
||||
// vector_length_ *= 2;
|
||||
// }
|
||||
select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga",
|
||||
0);
|
||||
std::string default_device_name = "/dev/uio0";
|
||||
device_name = configuration_->property(role + ".devicename",
|
||||
default_device_name);
|
||||
if (item_type_.compare("cshort") == 0)
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
unsigned int sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms;
|
||||
unsigned int code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f((float) code_length));
|
||||
unsigned int nsamples_total = pow(2, nbits);
|
||||
unsigned int vector_length = nsamples_total * sampled_ms;
|
||||
unsigned int select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga",0);
|
||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||
std::string default_device_name = "/dev/uio0";
|
||||
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
|
||||
acq_parameters.device_name = device_name;
|
||||
acq_parameters.samples_per_ms = nsamples_total;
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
|
||||
// compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
||||
gr::fft::fft_complex* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT
|
||||
// allocate memory to compute all the PRNs and compute all the possible codes
|
||||
std::complex<float>* code = new std::complex<float>[nsamples_total]; // buffer for the local code
|
||||
gr_complex* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * NUM_PRNs]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
float max; // temporary maxima search
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
gps_acquisition_fpga_sc_ = gps_pcps_make_acquisition_fpga_sc(
|
||||
sampled_ms, max_dwells_, doppler_max_, ifreq, fs_in,
|
||||
code_length, code_length, vector_length_, nsamples_total,
|
||||
bit_transition_flag, use_CFAR_algorithm_flag,
|
||||
select_queue_Fpga, device_name, dump, dump_filename);
|
||||
DLOG(INFO) << "acquisition("
|
||||
<< gps_acquisition_fpga_sc_->unique_id() << ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(FATAL) << item_type_ << " FPGA only accepts chsort";
|
||||
}
|
||||
gps_l1_ca_code_gen_complex_sampled(code, PRN, fs_in, 0); // generate PRN code
|
||||
// fill in zero padding
|
||||
for (int s=code_length;s<nsamples_total;s++)
|
||||
{
|
||||
code[s] = 0;
|
||||
}
|
||||
int offset = 0;
|
||||
memcpy(fft_if->get_inbuf() + offset, code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
||||
fft_if->execute(); // Run the FFT of local code
|
||||
volk_32fc_conjugate_32fc(fft_codes_padded, fft_if->get_outbuf(), nsamples_total); // conjugate values
|
||||
max = 0; // initialize maximum value
|
||||
for (unsigned int i = 0; i < nsamples_total; i++) // search for maxima
|
||||
{
|
||||
if (std::abs(fft_codes_padded[i].real()) > max)
|
||||
{
|
||||
max = std::abs(fft_codes_padded[i].real());
|
||||
}
|
||||
if (std::abs(fft_codes_padded[i].imag()) > max)
|
||||
{
|
||||
max = std::abs(fft_codes_padded[i].imag());
|
||||
}
|
||||
}
|
||||
for (unsigned int i = 0; i < nsamples_total; i++) // map the FFT to the dynamic range of the fixed point values an copy to buffer containing all FFTs
|
||||
{
|
||||
d_all_fft_codes_[i + nsamples_total * (PRN -1)] = lv_16sc_t(static_cast<int>(floor(fft_codes_padded[i].real() * (pow(2, 7) - 1) / max)),
|
||||
static_cast<int>(floor(fft_codes_padded[i].imag() * (pow(2, 7) - 1) / max)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//acq_parameters
|
||||
|
||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete fft_if;
|
||||
delete[] fft_codes_padded;
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
}
|
||||
@ -119,123 +143,93 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
|
||||
GpsL1CaPcpsAcquisitionFpga::~GpsL1CaPcpsAcquisitionFpga()
|
||||
{
|
||||
delete[] d_all_fft_codes_;
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
gps_acquisition_fpga_sc_->set_channel(channel_);
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
}
|
||||
else
|
||||
{
|
||||
threshold_ = calculate_threshold(pfa);
|
||||
}
|
||||
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
|
||||
gps_acquisition_fpga_sc_->set_threshold(threshold_);
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
|
||||
acquisition_fpga_->set_threshold(threshold);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_doppler_max(unsigned int doppler_max)
|
||||
{
|
||||
doppler_max_ = doppler_max;
|
||||
gps_acquisition_fpga_sc_->set_doppler_max(doppler_max_);
|
||||
acquisition_fpga_->set_doppler_max(doppler_max_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
{
|
||||
doppler_step_ = doppler_step;
|
||||
gps_acquisition_fpga_sc_->set_doppler_step(doppler_step_);
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
gps_acquisition_fpga_sc_->set_gnss_synchro(gnss_synchro_);
|
||||
acquisition_fpga_->set_gnss_synchro(gnss_synchro_);
|
||||
}
|
||||
|
||||
|
||||
signed int GpsL1CaPcpsAcquisitionFpga::mag()
|
||||
{
|
||||
return gps_acquisition_fpga_sc_->mag();
|
||||
return acquisition_fpga_->mag();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::init()
|
||||
{
|
||||
gps_acquisition_fpga_sc_->init();
|
||||
acquisition_fpga_->init();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_local_code()
|
||||
{
|
||||
gps_acquisition_fpga_sc_->set_local_code();
|
||||
acquisition_fpga_->set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::reset()
|
||||
{
|
||||
gps_acquisition_fpga_sc_->set_active(true);
|
||||
acquisition_fpga_->set_active(true);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_state(int state)
|
||||
{
|
||||
gps_acquisition_fpga_sc_->set_state(state);
|
||||
}
|
||||
|
||||
|
||||
float GpsL1CaPcpsAcquisitionFpga::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_);
|
||||
doppler += doppler_step_)
|
||||
{
|
||||
frequency_bins++;
|
||||
}
|
||||
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
return threshold;
|
||||
acquisition_fpga_->set_state(state);
|
||||
}
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
//nothing to connect
|
||||
// nothing to connect
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
//nothing to disconnect
|
||||
// nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block()
|
||||
{
|
||||
return gps_acquisition_fpga_sc_;
|
||||
return acquisition_fpga_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return gps_acquisition_fpga_sc_;
|
||||
return acquisition_fpga_;
|
||||
}
|
||||
|
@ -1,14 +1,17 @@
|
||||
/*!
|
||||
* \file gps_l1_ca_pcps_acquisition_fpga.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* GPS L1 C/A signals. This file is based on the file gps_l1_ca_pcps_acquisition.h
|
||||
* \brief Adapts a PCPS acquisition block that uses the FPGA to
|
||||
* an AcquisitionInterface for GPS L1 C/A signals
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* <li> Marc Majoral, 2018. mmajoral(at)cttc.es
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* <li> Marc Molina, 2013. marc.molina.pena(at)gmail.com
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -35,13 +38,10 @@
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include <string>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gps_pcps_acquisition_fpga_sc.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
@ -68,12 +68,13 @@ public:
|
||||
*/
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "GPS_L1_CA_PCPS_Acquisition_Fpga";
|
||||
return "GPS_L1_CA_PCPS_Acquisition";
|
||||
}
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return item_size_;
|
||||
size_t item_size = sizeof(lv_16sc_t);
|
||||
return item_size;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
@ -135,21 +136,16 @@ public:
|
||||
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
gps_pcps_acquisition_fpga_sc_sptr gps_acquisition_fpga_sc_;
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
unsigned int channel_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
unsigned int max_dwells_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
lv_16sc_t *d_all_fft_codes_; // memory that contains all the code ffts
|
||||
|
||||
float calculate_threshold(float pfa);
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ */
|
||||
#endif /* GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_ */
|
||||
|
@ -29,7 +29,7 @@ set(ACQ_GR_BLOCKS_SOURCES
|
||||
)
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} gps_pcps_acquisition_fpga_sc.cc)
|
||||
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
|
@ -36,12 +36,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
|
||||
#include <sstream>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include <sstream>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -62,11 +62,15 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_));
|
||||
}
|
||||
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
unsigned int doppler_max,
|
||||
long freq,
|
||||
long fs_in,
|
||||
int samples_per_ms,
|
||||
int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@ -167,6 +171,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
d_gr_stream_buffer = 0;
|
||||
}
|
||||
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc::~galileo_e5a_noncoherentIQ_acquisition_caf_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
@ -267,6 +272,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
|
@ -1,298 +0,0 @@
|
||||
/*!
|
||||
* \file gps_pcps_acquisition_fpga_sc.cc
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition in the FPGA.
|
||||
* This file is based on the file gps_pcps_acquisition_sc.cc
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "gps_pcps_acquisition_fpga_sc.h"
|
||||
#include <sstream>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void wait3(int seconds)
|
||||
{
|
||||
boost::this_thread::sleep_for(boost::chrono::seconds
|
||||
{ seconds });
|
||||
}
|
||||
|
||||
|
||||
gps_pcps_acquisition_fpga_sc_sptr gps_pcps_make_acquisition_fpga_sc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in, int samples_per_ms,
|
||||
int samples_per_code, int vector_length, unsigned int nsamples_total,
|
||||
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
|
||||
unsigned int select_queue_Fpga, std::string device_name, bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return gps_pcps_acquisition_fpga_sc_sptr(
|
||||
new gps_pcps_acquisition_fpga_sc(sampled_ms, max_dwells,
|
||||
doppler_max, freq, fs_in, samples_per_ms, samples_per_code,
|
||||
vector_length, nsamples_total, bit_transition_flag,
|
||||
use_CFAR_algorithm_flag, select_queue_Fpga, device_name,
|
||||
dump, dump_filename));
|
||||
}
|
||||
|
||||
|
||||
gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in, int samples_per_ms,
|
||||
int samples_per_code, int vector_length, unsigned int nsamples_total,
|
||||
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
|
||||
unsigned int select_queue_Fpga, std::string device_name, bool dump,
|
||||
std::string dump_filename) :
|
||||
|
||||
//gr::block("pcps_acquisition_fpga_sc",
|
||||
gr::block("gps_pcps_acquisition_fpga_sc",
|
||||
gr::io_signature::make(0, 0, sizeof(lv_16sc_t)),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0; // sample counter
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_samples_per_code = samples_per_code;
|
||||
d_max_dwells = max_dwells; // Note : d_max_dwells is not used in the FPGA implementation
|
||||
d_well_count = 0;
|
||||
d_doppler_max = doppler_max;
|
||||
d_fft_size = sampled_ms * samples_per_ms;
|
||||
d_mag = 0;
|
||||
d_num_doppler_bins = 0;
|
||||
d_bit_transition_flag = bit_transition_flag; // Note : bit transition flag is ignored and assumed 0 in the FPGA implementation
|
||||
d_use_CFAR_algorithm_flag = use_CFAR_algorithm_flag; // Note : user CFAR algorithm flag is ignored and assumed 0 in the FPGA implementation
|
||||
d_threshold = 0.0;
|
||||
d_doppler_step = 250;
|
||||
d_channel = 0;
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_gnss_synchro = 0;
|
||||
// instantiate HW accelerator class
|
||||
acquisition_fpga_8sc = std::make_shared < gps_fpga_acquisition_8sc>
|
||||
(device_name, vector_length, d_fft_size, doppler_max, nsamples_total, fs_in, freq, sampled_ms, select_queue_Fpga);
|
||||
}
|
||||
|
||||
|
||||
gps_pcps_acquisition_fpga_sc::~gps_pcps_acquisition_fpga_sc()
|
||||
{
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
acquisition_fpga_8sc->free();
|
||||
}
|
||||
|
||||
|
||||
void gps_pcps_acquisition_fpga_sc::set_local_code()
|
||||
{
|
||||
acquisition_fpga_8sc->set_local_code(d_gnss_synchro->PRN);
|
||||
}
|
||||
|
||||
|
||||
void gps_pcps_acquisition_fpga_sc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
d_gnss_synchro->Flag_valid_symbol_output = false;
|
||||
d_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
d_gnss_synchro->Flag_valid_word = false;
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_mag = 0.0;
|
||||
d_num_doppler_bins = ceil(
|
||||
static_cast<double>(static_cast<int>(d_doppler_max)
|
||||
- static_cast<int>(-d_doppler_max))
|
||||
/ static_cast<double>(d_doppler_step));
|
||||
//acquisition_fpga_8sc->open_device();
|
||||
acquisition_fpga_8sc->init();
|
||||
}
|
||||
|
||||
|
||||
void gps_pcps_acquisition_fpga_sc::set_state(int state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
{
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_well_count = 0;
|
||||
d_mag = 0.0;
|
||||
}
|
||||
else if (d_state == 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "State can only be set to 0 or 1";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void gps_pcps_acquisition_fpga_sc::set_active(bool active)
|
||||
{
|
||||
float temp_peak_to_noise_level = 0.0;
|
||||
float peak_to_noise_level = 0.0;
|
||||
float input_power;
|
||||
float test_statistics = 0.0;
|
||||
//printf("ACQ : Block samples for PRN %d\n", d_gnss_synchro->PRN);
|
||||
// acquisition_fpga_8sc->block_samples(); // block the samples to run the acquisition this is only necessary for the tests
|
||||
d_active = active;
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
d_state = 1;
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
//int effective_fft_size = ( d_bit_transition_flag ? d_fft_size/2 : d_fft_size );
|
||||
int effective_fft_size = d_fft_size;
|
||||
d_mag = 0.0;
|
||||
unsigned int initial_sample;
|
||||
d_well_count++;
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System
|
||||
<< " " << d_gnss_synchro->PRN << " ,sample stamp: "
|
||||
<< d_sample_counter << ", threshold: " << ", threshold: "
|
||||
<< d_threshold << ", doppler_max: " << d_doppler_max
|
||||
<< ", doppler_step: " << d_doppler_step;
|
||||
|
||||
// Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins;
|
||||
doppler_index++)
|
||||
{
|
||||
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
acquisition_fpga_8sc->set_phase_step(doppler_index);
|
||||
acquisition_fpga_8sc->run_acquisition(); // runs acquisition and waits until it is finished
|
||||
acquisition_fpga_8sc->read_acquisition_results(&indext, &magt,
|
||||
&initial_sample, &input_power);
|
||||
d_sample_counter = initial_sample;
|
||||
temp_peak_to_noise_level = static_cast<float>(magt) / static_cast<float>(input_power);
|
||||
if (peak_to_noise_level < temp_peak_to_noise_level)
|
||||
{
|
||||
peak_to_noise_level = temp_peak_to_noise_level;
|
||||
d_mag = magt;
|
||||
input_power = (input_power - d_mag)
|
||||
/ (effective_fft_size - 1);
|
||||
d_gnss_synchro->Acq_delay_samples =
|
||||
static_cast<double>(indext % d_samples_per_code);
|
||||
d_gnss_synchro->Acq_doppler_hz =
|
||||
static_cast<double>(doppler);
|
||||
d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter;
|
||||
test_statistics = d_mag / input_power;
|
||||
}
|
||||
// Record results to file if required
|
||||
if (d_dump)
|
||||
{
|
||||
std::stringstream filename;
|
||||
//std::streamsize n = 2 * sizeof(float) * (d_fft_size); // complex file write
|
||||
filename.str("");
|
||||
boost::filesystem::path p = d_dump_filename;
|
||||
filename << p.parent_path().string()
|
||||
<< boost::filesystem::path::preferred_separator
|
||||
<< p.stem().string() << "_"
|
||||
<< d_gnss_synchro->System << "_"
|
||||
<< d_gnss_synchro->Signal << "_sat_"
|
||||
<< d_gnss_synchro->PRN << "_doppler_" << doppler
|
||||
<< p.extension().string();
|
||||
DLOG(INFO) << "Writing ACQ out to " << filename.str();
|
||||
d_dump_file.open(filename.str().c_str(),
|
||||
std::ios::out | std::ios::binary);
|
||||
d_dump_file.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//printf("ACQ : unblocking samples for satellite %d\n", d_gnss_synchro->PRN);
|
||||
// acquisition_fpga_8sc->unblock_samples(); // unblock samples before sending positive or negative acquisition message to let the samples flow when the
|
||||
// set local code function is called
|
||||
if (test_statistics > d_threshold)
|
||||
{
|
||||
d_state = 2; // Positive acquisition
|
||||
// 6.1- Declare positive acquisition using a message port
|
||||
DLOG(INFO) << "positive acquisition";
|
||||
DLOG(INFO) << "satellite " << d_gnss_synchro->System << " "
|
||||
<< d_gnss_synchro->PRN;
|
||||
DLOG(INFO) << "sample_stamp " << d_sample_counter;
|
||||
DLOG(INFO) << "test statistics value " << test_statistics;
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude " << d_mag;
|
||||
DLOG(INFO) << "input signal power " << input_power;
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"),
|
||||
pmt::from_long(acquisition_message));
|
||||
}
|
||||
else
|
||||
{
|
||||
d_state = 3; // Negative acquisition
|
||||
// 6.2- Declare negative acquisition using a message port
|
||||
DLOG(INFO) << "negative acquisition";
|
||||
DLOG(INFO) << "satellite " << d_gnss_synchro->System << " "
|
||||
<< d_gnss_synchro->PRN;
|
||||
DLOG(INFO) << "sample_stamp " << d_sample_counter;
|
||||
DLOG(INFO) << "test statistics value " << test_statistics;
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude " << d_mag;
|
||||
DLOG(INFO) << "input signal power " << input_power;
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
acquisition_message = 2;
|
||||
this->message_port_pub(pmt::mp("events"),
|
||||
pmt::from_long(acquisition_message));
|
||||
}
|
||||
DLOG(INFO) << "Done. Consumed 1 item.";
|
||||
}
|
||||
|
||||
|
||||
int gps_pcps_acquisition_fpga_sc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items __attribute__((unused)),
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
// general work not used with the acquisition
|
||||
return noutput_items;
|
||||
}
|
@ -1,219 +0,0 @@
|
||||
/*!
|
||||
* \file gps_pcps_acquisition_fpga_sc.h
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition in the FPGA.
|
||||
* This file is based on the file gps_pcps_acquisition_sc.h
|
||||
*
|
||||
* Acquisition strategy (Kay Borre book + CFAR threshold).
|
||||
* <ol>
|
||||
* <li> Compute the input signal power estimation
|
||||
* <li> Doppler serial search loop
|
||||
* <li> Perform the FFT-based circular convolution (parallel time search)
|
||||
* <li> Record the maximum peak and the associated synchronization parameters
|
||||
* <li> Compute the test statistics and compare to the threshold
|
||||
* <li> Declare positive or negative acquisition using a message port
|
||||
* </ol>
|
||||
*
|
||||
* Kay Borre book: K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
|
||||
* "A Software-Defined GPS and Galileo Receiver. A Single-Frequency
|
||||
* Approach", Birkhauser, 2007. pp 81-84
|
||||
*
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_PCPS_ACQUISITION_FPGA_SC_H_
|
||||
#define GNSS_SDR_GPS_PCPS_ACQUISITION_FPGA_SC_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_fpga_acquisition_8sc.h"
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
class gps_pcps_acquisition_fpga_sc;
|
||||
|
||||
typedef boost::shared_ptr<gps_pcps_acquisition_fpga_sc> gps_pcps_acquisition_fpga_sc_sptr;
|
||||
|
||||
gps_pcps_acquisition_fpga_sc_sptr
|
||||
gps_pcps_make_acquisition_fpga_sc(unsigned int sampled_ms,
|
||||
unsigned int max_dwells, unsigned int doppler_max, long freq,
|
||||
long fs_in, int samples_per_ms, int samples_per_code,
|
||||
int vector_length_, unsigned int nsamples_total_,
|
||||
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
|
||||
unsigned int select_queue_Fpga, std::string device_name, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition.
|
||||
*
|
||||
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
|
||||
* Algorithm 1, for a pseudocode description of this implementation.
|
||||
*/
|
||||
class gps_pcps_acquisition_fpga_sc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend gps_pcps_acquisition_fpga_sc_sptr
|
||||
gps_pcps_make_acquisition_fpga_sc(unsigned int sampled_ms,
|
||||
unsigned int max_dwells, unsigned int doppler_max, long freq,
|
||||
long fs_in, int samples_per_ms, int samples_per_code,
|
||||
int vector_length, unsigned int nsamples_total,
|
||||
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
|
||||
unsigned int select_queue_Fpga, std::string device_name, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
gps_pcps_acquisition_fpga_sc(unsigned int sampled_ms,
|
||||
unsigned int max_dwells, unsigned int doppler_max, long freq,
|
||||
long fs_in, int samples_per_ms, int samples_per_code,
|
||||
int vector_length, unsigned int nsamples_total,
|
||||
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
|
||||
unsigned int select_queue_Fpga, std::string device_name, bool dump,
|
||||
std::string dump_filename);
|
||||
int d_samples_per_code;
|
||||
float d_threshold;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned int d_num_doppler_bins;
|
||||
Gnss_Synchro *d_gnss_synchro;
|
||||
float d_mag;bool d_bit_transition_flag;bool d_use_CFAR_algorithm_flag;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;bool d_dump;
|
||||
unsigned int d_channel;
|
||||
std::string d_dump_filename;
|
||||
std::shared_ptr<gps_fpga_acquisition_8sc> acquisition_fpga_8sc;
|
||||
//void set_active2(bool active);
|
||||
boost::thread d_acq_thread;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Default destructor.
|
||||
*/
|
||||
~gps_pcps_acquisition_fpga_sc();
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to exchange synchronization data between acquisition and tracking blocks.
|
||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||
*/
|
||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
d_gnss_synchro = p_gnss_synchro;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
void init();
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for PCPS acquisition algorithm.
|
||||
* \param code - Pointer to the PRN code.
|
||||
*/
|
||||
void set_local_code();
|
||||
|
||||
/*!
|
||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||
* active mode
|
||||
* \param active - bool that activates/deactivates the block.
|
||||
*/
|
||||
|
||||
|
||||
void set_active(bool active);
|
||||
|
||||
/*!
|
||||
* \brief If set to 1, ensures that acquisition starts at the
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
* Algorithm 1, for a definition of this threshold).
|
||||
*/
|
||||
inline void set_threshold(float threshold)
|
||||
{
|
||||
d_threshold = threshold;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
acquisition_fpga_8sc->set_doppler_max(doppler_max);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
acquisition_fpga_8sc->set_doppler_step(doppler_step);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
*/
|
||||
int general_work(int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_GPS_PCPS_ACQUISITION_SC_H_*/
|
@ -39,7 +39,7 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@ -335,84 +335,6 @@ void pcps_acquisition::send_negative_acquisition()
|
||||
}
|
||||
|
||||
|
||||
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
/*
|
||||
* By J.Arribas, L.Esteve and M.Molina
|
||||
* Acquisition strategy (Kay Borre book + CFAR threshold):
|
||||
* 1. Compute the input signal power estimation
|
||||
* 2. Doppler serial search loop
|
||||
* 3. Perform the FFT-based circular convolution (parallel time search)
|
||||
* 4. Record the maximum peak and the associated synchronization parameters
|
||||
* 5. Compute the test statistics and compare to the threshold
|
||||
* 6. Declare positive or negative acquisition using a message port
|
||||
*/
|
||||
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
if (!d_active or d_worker_active)
|
||||
{
|
||||
d_sample_counter += d_fft_size * ninput_items[0];
|
||||
consume_each(ninput_items[0]);
|
||||
if (d_step_two)
|
||||
{
|
||||
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
update_grid_doppler_wipeoffs_step2();
|
||||
d_state = 0;
|
||||
d_active = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//restart acquisition variables
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_well_count = 0;
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
d_state = 1;
|
||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
// Copy the data to the core and let it know that new data is available
|
||||
if (d_cshort)
|
||||
{
|
||||
memcpy(d_data_buffer_sc, input_items[0], d_fft_size * sizeof(lv_16sc_t));
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(d_data_buffer, input_items[0], d_fft_size * sizeof(gr_complex));
|
||||
}
|
||||
if (acq_parameters.blocking)
|
||||
{
|
||||
lk.unlock();
|
||||
acquisition_core(d_sample_counter);
|
||||
}
|
||||
else
|
||||
{
|
||||
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
||||
d_worker_active = true;
|
||||
}
|
||||
d_sample_counter += d_fft_size;
|
||||
consume_each(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
{
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
@ -686,3 +608,81 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
}
|
||||
d_worker_active = false;
|
||||
}
|
||||
|
||||
|
||||
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
/*
|
||||
* By J.Arribas, L.Esteve and M.Molina
|
||||
* Acquisition strategy (Kay Borre book + CFAR threshold):
|
||||
* 1. Compute the input signal power estimation
|
||||
* 2. Doppler serial search loop
|
||||
* 3. Perform the FFT-based circular convolution (parallel time search)
|
||||
* 4. Record the maximum peak and the associated synchronization parameters
|
||||
* 5. Compute the test statistics and compare to the threshold
|
||||
* 6. Declare positive or negative acquisition using a message port
|
||||
*/
|
||||
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
if (!d_active or d_worker_active)
|
||||
{
|
||||
d_sample_counter += d_fft_size * ninput_items[0];
|
||||
consume_each(ninput_items[0]);
|
||||
if (d_step_two)
|
||||
{
|
||||
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
update_grid_doppler_wipeoffs_step2();
|
||||
d_state = 0;
|
||||
d_active = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//restart acquisition variables
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_well_count = 0;
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
d_state = 1;
|
||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
// Copy the data to the core and let it know that new data is available
|
||||
if (d_cshort)
|
||||
{
|
||||
memcpy(d_data_buffer_sc, input_items[0], d_fft_size * sizeof(lv_16sc_t));
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(d_data_buffer, input_items[0], d_fft_size * sizeof(gr_complex));
|
||||
}
|
||||
if (acq_parameters.blocking)
|
||||
{
|
||||
lk.unlock();
|
||||
acquisition_core(d_sample_counter);
|
||||
}
|
||||
else
|
||||
{
|
||||
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
||||
d_worker_active = true;
|
||||
}
|
||||
d_sample_counter += d_fft_size;
|
||||
consume_each(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk/volk.h>
|
||||
#include <string>
|
||||
|
||||
typedef struct
|
||||
|
@ -0,0 +1,244 @@
|
||||
/*!
|
||||
* \file pcps_acquisition_fpga.cc
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition in the FPGA
|
||||
*
|
||||
* Note: The CFAR algorithm is not implemented in the FPGA.
|
||||
* Note 2: The bit transition flag is not implemented in the FPGA
|
||||
*
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* <li> Marc Molina, 2013. marc.molina.pena@gmail.com
|
||||
* <li> Cillian O'Driscoll, 2017. cillian(at)ieee.org
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_acquisition_fpga_sptr pcps_make_acquisition(pcpsconf_fpga_t conf_)
|
||||
{
|
||||
return pcps_acquisition_fpga_sptr(new pcps_acquisition_fpga(conf_));
|
||||
}
|
||||
|
||||
|
||||
pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block("pcps_acquisition_fpga",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
acq_parameters = conf_;
|
||||
d_sample_counter = 0; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
d_fft_size = acq_parameters.sampled_ms * acq_parameters.samples_per_ms;
|
||||
d_mag = 0;
|
||||
d_input_power = 0.0;
|
||||
d_num_doppler_bins = 0;
|
||||
d_threshold = 0.0;
|
||||
d_doppler_step = 0;
|
||||
d_test_statistics = 0.0;
|
||||
d_channel = 0;
|
||||
d_gnss_synchro = 0;
|
||||
|
||||
acquisition_fpga = std::make_shared <fpga_acquisition>
|
||||
(acq_parameters.device_name, d_fft_size, acq_parameters.doppler_max, acq_parameters.samples_per_ms,
|
||||
acq_parameters.fs_in, acq_parameters.freq, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
pcps_acquisition_fpga::~pcps_acquisition_fpga()
|
||||
{
|
||||
acquisition_fpga->free();
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::set_local_code()
|
||||
{
|
||||
acquisition_fpga->set_local_code(d_gnss_synchro->PRN);
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
d_gnss_synchro->Flag_valid_symbol_output = false;
|
||||
d_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
d_gnss_synchro->Flag_valid_word = false;
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
d_num_doppler_bins = static_cast<unsigned int>(std::ceil(static_cast<double>(static_cast<int>(acq_parameters.doppler_max) - static_cast<int>(-acq_parameters.doppler_max)) / static_cast<double>(d_doppler_step)));
|
||||
|
||||
acquisition_fpga->init();
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::set_state(int state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
{
|
||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
//d_well_count = 0;
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
d_active = true;
|
||||
}
|
||||
else if (d_state == 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "State can only be set to 0 or 1";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::send_positive_acquisition()
|
||||
{
|
||||
// 6.1- Declare positive acquisition using a message port
|
||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
DLOG(INFO) << "positive acquisition"
|
||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
<< ", sample_stamp " << d_sample_counter
|
||||
<< ", test statistics value " << d_test_statistics
|
||||
<< ", test statistics threshold " << d_threshold
|
||||
<< ", code phase " << d_gnss_synchro->Acq_delay_samples
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::send_negative_acquisition()
|
||||
{
|
||||
// 6.2- Declare negative acquisition using a message port
|
||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
DLOG(INFO) << "negative acquisition"
|
||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
<< ", sample_stamp " << d_sample_counter
|
||||
<< ", test statistics value " << d_test_statistics
|
||||
<< ", test statistics threshold " << d_threshold
|
||||
<< ", code phase " << d_gnss_synchro->Acq_delay_samples
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(2));
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::set_active(bool active)
|
||||
{
|
||||
d_active = active;
|
||||
|
||||
// initialize acquisition algorithm
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
<< " ,sample stamp: " << d_sample_counter << ", threshold: "
|
||||
<< d_threshold << ", doppler_max: " << acq_parameters.doppler_max
|
||||
<< ", doppler_step: " << d_doppler_step
|
||||
// no CFAR algorithm in the FPGA
|
||||
<< ", use_CFAR_algorithm_flag: false";
|
||||
|
||||
unsigned int initial_sample;
|
||||
float input_power_all = 0.0;
|
||||
float input_power_computed = 0.0;
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
int doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
acquisition_fpga->set_phase_step(doppler_index);
|
||||
acquisition_fpga->run_acquisition(); // runs acquisition and waits until it is finished
|
||||
acquisition_fpga->read_acquisition_results(&indext, &magt,
|
||||
&initial_sample, &d_input_power);
|
||||
d_sample_counter = initial_sample;
|
||||
|
||||
if (d_mag < magt)
|
||||
{
|
||||
d_mag = magt;
|
||||
|
||||
input_power_all = d_input_power / (d_fft_size - 1);
|
||||
input_power_computed = (d_input_power - d_mag) / (d_fft_size - 1);
|
||||
d_input_power = (d_input_power - d_mag) / (d_fft_size - 1);
|
||||
|
||||
d_gnss_synchro->Acq_delay_samples = static_cast<double>(indext % acq_parameters.samples_per_code);
|
||||
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(doppler);
|
||||
d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter;
|
||||
|
||||
d_test_statistics = (d_mag / d_input_power); //* correction_factor;
|
||||
}
|
||||
|
||||
// In the case of the FPGA the option of dumping the results of the acquisition to a file is not available
|
||||
// because the IFFT vector is not available
|
||||
}
|
||||
|
||||
if (d_test_statistics > d_threshold)
|
||||
{
|
||||
d_active = false;
|
||||
send_positive_acquisition();
|
||||
d_state = 0; // Positive acquisition
|
||||
}
|
||||
else
|
||||
{
|
||||
d_state = 0;
|
||||
d_active = false;
|
||||
send_negative_acquisition();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
// the general work is not used with the acquisition that uses the FPGA
|
||||
return noutput_items;
|
||||
}
|
@ -0,0 +1,213 @@
|
||||
/*!
|
||||
* \file pcps_acquisition_fpga.h
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition in the FPGA.
|
||||
*
|
||||
* Note: The CFAR algorithm is not implemented in the FPGA.
|
||||
* Note 2: The bit transition flag is not implemented in the FPGA
|
||||
*
|
||||
* Acquisition strategy (Kay Borre book + CFAR threshold).
|
||||
* <ol>
|
||||
* <li> Compute the input signal power estimation
|
||||
* <li> Doppler serial search loop
|
||||
* <li> Perform the FFT-based circular convolution (parallel time search)
|
||||
* <li> Record the maximum peak and the associated synchronization parameters
|
||||
* <li> Compute the test statistics and compare to the threshold
|
||||
* <li> Declare positive or negative acquisition using a message queue
|
||||
* </ol>
|
||||
*
|
||||
* Kay Borre book: K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
|
||||
* "A Software-Defined GPS and Galileo Receiver. A Single-Frequency
|
||||
* Approach", Birkhauser, 2007. pp 81-84
|
||||
*
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* <li> Marc Molina, 2013. marc.molina.pena@gmail.com
|
||||
* <li> Cillian O'Driscoll, 2017. cillian(at)ieee.org
|
||||
* <li> Antonio Ramos, 2017. antonio.ramos@cttc.es
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_PCPS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
|
||||
#include <gnuradio/block.h>
|
||||
#include "fpga_acquisition.h"
|
||||
#include "gnss_synchro.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* pcps acquisition configuration */
|
||||
unsigned int sampled_ms;
|
||||
unsigned int doppler_max;
|
||||
long freq;
|
||||
long fs_in;
|
||||
int samples_per_ms;
|
||||
int samples_per_code;
|
||||
unsigned int select_queue_Fpga;
|
||||
std::string device_name;
|
||||
lv_16sc_t *all_fft_codes; // memory that contains all the code ffts
|
||||
|
||||
} pcpsconf_fpga_t;
|
||||
|
||||
class pcps_acquisition_fpga;
|
||||
|
||||
typedef boost::shared_ptr<pcps_acquisition_fpga> pcps_acquisition_fpga_sptr;
|
||||
|
||||
pcps_acquisition_fpga_sptr
|
||||
pcps_make_acquisition(pcpsconf_fpga_t conf_);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition that uses the FPGA.
|
||||
*
|
||||
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
|
||||
* Algorithm 1, for a pseudocode description of this implementation.
|
||||
*/
|
||||
class pcps_acquisition_fpga : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_acquisition_fpga_sptr
|
||||
|
||||
pcps_make_acquisition(pcpsconf_fpga_t conf_);
|
||||
|
||||
pcps_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
|
||||
void send_negative_acquisition();
|
||||
|
||||
void send_positive_acquisition();
|
||||
|
||||
pcpsconf_fpga_t acq_parameters;
|
||||
bool d_active;
|
||||
float d_threshold;
|
||||
float d_mag;
|
||||
float d_input_power;
|
||||
float d_test_statistics;
|
||||
int d_state;
|
||||
unsigned int d_channel;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_fft_size;
|
||||
unsigned int d_num_doppler_bins;
|
||||
unsigned long int d_sample_counter;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
std::shared_ptr<fpga_acquisition> acquisition_fpga;
|
||||
|
||||
public:
|
||||
~pcps_acquisition_fpga();
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to exchange synchronization data between acquisition and tracking blocks.
|
||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||
*/
|
||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
d_gnss_synchro = p_gnss_synchro;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
void init();
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for PCPS acquisition algorithm.
|
||||
* \param code - Pointer to the PRN code.
|
||||
*/
|
||||
void set_local_code();
|
||||
|
||||
/*!
|
||||
* \brief If set to 1, ensures that acquisition starts at the
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
|
||||
/*!
|
||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||
* active mode
|
||||
* \param active - bool that activates/deactivates the block.
|
||||
*/
|
||||
void set_active(bool active);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
* Algorithm 1, for a definition of this threshold).
|
||||
*/
|
||||
inline void set_threshold(float threshold)
|
||||
{
|
||||
d_threshold = threshold;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
{
|
||||
acq_parameters.doppler_max = doppler_max;
|
||||
acquisition_fpga->set_doppler_max(doppler_max);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
acquisition_fpga->set_doppler_step(doppler_step);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
*/
|
||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||
gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items);
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
@ -49,18 +49,18 @@
|
||||
*/
|
||||
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "opencl/fft_base_kernels.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@ -78,10 +78,15 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename));
|
||||
}
|
||||
|
||||
|
||||
pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long freq, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max,
|
||||
long freq,
|
||||
long fs_in,
|
||||
int samples_per_ms,
|
||||
int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_opencl_acquisition_cc",
|
||||
@ -339,6 +344,7 @@ void pcps_opencl_acquisition_cc::init()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_opencl_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
if (d_opencl == 0)
|
||||
@ -374,6 +380,7 @@ void pcps_opencl_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_opencl_acquisition_cc::acquisition_core_volk()
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
@ -496,6 +503,7 @@ void pcps_opencl_acquisition_cc::acquisition_core_volk()
|
||||
d_core_working = false;
|
||||
}
|
||||
|
||||
|
||||
void pcps_opencl_acquisition_cc::acquisition_core_opencl()
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
@ -687,6 +695,7 @@ void pcps_opencl_acquisition_cc::set_state(int state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
|
@ -51,14 +51,14 @@
|
||||
#ifndef GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "gnss_synchro.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "opencl/fft_internal.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "opencl/cl.hpp"
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
set(ACQUISITION_LIB_SOURCES
|
||||
gps_fpga_acquisition_8sc.cc
|
||||
fpga_acquisition.cc
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
258
src/algorithms/acquisition/libs/fpga_acquisition.cc
Normal file
258
src/algorithms/acquisition/libs/fpga_acquisition.cc
Normal file
@ -0,0 +1,258 @@
|
||||
/*!
|
||||
* \file fpga_acquisition.cc
|
||||
* \brief High optimized FPGA vector correlator class
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2018. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* Class that controls and executes a high optimized acquisition HW
|
||||
* accelerator in the FPGA
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// libraries used by the GIPO
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
// logging
|
||||
#include <glog/logging.h>
|
||||
|
||||
// GPS L1
|
||||
#include "GPS_L1_CA.h"
|
||||
|
||||
#include "fpga_acquisition.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
|
||||
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
||||
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
|
||||
#define RESET_ACQUISITION 2 // command to reset the multicorrelator
|
||||
#define LAUNCH_ACQUISITION 1 // command to launch the multicorrelator
|
||||
#define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw)
|
||||
#define LOCAL_CODE_CLEAR_MEM 0x10000000 // command to clear the internal memory of the multicorrelator
|
||||
#define MEM_LOCAL_CODE_WR_ENABLE 0x0C000000 // command to enable the ENA and WR pins of the internal memory of the multicorrelator
|
||||
#define POW_2_2 4 // 2^2 (used for the conversion of floating point numbers to integers)
|
||||
#define POW_2_29 536870912 // 2^29 (used for the conversion of floating point numbers to integers)
|
||||
#define SELECT_LSB 0x00FF // value to select the least significant byte
|
||||
#define SELECT_MSB 0XFF00 // value to select the most significant byte
|
||||
#define SELECT_16_BITS 0xFFFF // value to select 16 bits
|
||||
#define SHL_8_BITS 256 // value used to shift a value 8 bits to the left
|
||||
|
||||
|
||||
bool fpga_acquisition::init()
|
||||
{
|
||||
// configure the acquisition with the main initialization values
|
||||
fpga_acquisition::configure_acquisition();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fpga_acquisition::set_local_code(unsigned int PRN)
|
||||
{
|
||||
// select the code with the chosen PRN
|
||||
fpga_acquisition::fpga_configure_acquisition_local_code(
|
||||
&d_all_fft_codes[d_nsamples_total * (PRN - 1)]);
|
||||
return true;
|
||||
}
|
||||
|
||||
fpga_acquisition::fpga_acquisition(std::string device_name,
|
||||
unsigned int nsamples,
|
||||
unsigned int doppler_max,
|
||||
unsigned int nsamples_total, long fs_in, long freq,
|
||||
unsigned int sampled_ms, unsigned select_queue,
|
||||
lv_16sc_t *all_fft_codes)
|
||||
{
|
||||
unsigned int vector_length = nsamples_total*sampled_ms;
|
||||
// initial values
|
||||
d_device_name = device_name;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_nsamples = nsamples; // number of samples not including padding
|
||||
d_select_queue = select_queue;
|
||||
d_nsamples_total = nsamples_total;
|
||||
d_doppler_max = doppler_max;
|
||||
d_doppler_step = 0;
|
||||
d_fd = 0; // driver descriptor
|
||||
d_map_base = nullptr; // driver memory map
|
||||
d_all_fft_codes = all_fft_codes;
|
||||
|
||||
// open communication with HW accelerator
|
||||
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
||||
{
|
||||
LOG(WARNING) << "Cannot open deviceio" << d_device_name;
|
||||
}
|
||||
d_map_base = reinterpret_cast<volatile unsigned *>(mmap(NULL, PAGE_SIZE,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
|
||||
|
||||
if (d_map_base == reinterpret_cast<void*>(-1))
|
||||
{
|
||||
LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory";
|
||||
}
|
||||
|
||||
// sanity check : check test register
|
||||
unsigned writeval = TEST_REG_SANITY_CHECK;
|
||||
unsigned readval;
|
||||
readval = fpga_acquisition::fpga_acquisition_test_register(writeval);
|
||||
if (writeval != readval)
|
||||
{
|
||||
LOG(WARNING) << "Acquisition test register sanity check failed";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(INFO) << "Acquisition test register sanity check success !";
|
||||
}
|
||||
fpga_acquisition::reset_acquisition();
|
||||
DLOG(INFO) << "Acquisition FPGA class created";
|
||||
|
||||
}
|
||||
|
||||
fpga_acquisition::~fpga_acquisition()
|
||||
{
|
||||
close_device();
|
||||
}
|
||||
|
||||
bool fpga_acquisition::free()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned fpga_acquisition::fpga_acquisition_test_register(unsigned writeval)
|
||||
{
|
||||
unsigned readval;
|
||||
// write value to test register
|
||||
d_map_base[15] = writeval;
|
||||
// read value from test register
|
||||
readval = d_map_base[15];
|
||||
// return read value
|
||||
return readval;
|
||||
}
|
||||
|
||||
void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
||||
{
|
||||
unsigned short local_code;
|
||||
unsigned int k, tmp, tmp2;
|
||||
unsigned int fft_data;
|
||||
// clear memory address counter
|
||||
d_map_base[4] = LOCAL_CODE_CLEAR_MEM;
|
||||
// write local code
|
||||
for (k = 0; k < d_vector_length; k++)
|
||||
{
|
||||
tmp = fft_local_code[k].real();
|
||||
tmp2 = fft_local_code[k].imag();
|
||||
local_code = (tmp & SELECT_LSB) | ((tmp2 * SHL_8_BITS) & SELECT_MSB); // put together the real part and the imaginary part
|
||||
fft_data = MEM_LOCAL_CODE_WR_ENABLE | (local_code & SELECT_16_BITS);
|
||||
d_map_base[4] = fft_data;
|
||||
}
|
||||
}
|
||||
|
||||
void fpga_acquisition::run_acquisition(void)
|
||||
{
|
||||
// enable interrupts
|
||||
int reenable = 1;
|
||||
write(d_fd, reinterpret_cast<void*>(&reenable), sizeof(int));
|
||||
// launch the acquisition process
|
||||
d_map_base[6] = LAUNCH_ACQUISITION; // writing anything to reg 6 launches the acquisition process
|
||||
|
||||
int irq_count;
|
||||
ssize_t nb;
|
||||
// wait for interrupt
|
||||
nb = read(d_fd, &irq_count, sizeof(irq_count));
|
||||
if (nb != sizeof(irq_count))
|
||||
{
|
||||
printf("acquisition module Read failed to retrieve 4 bytes!\n");
|
||||
printf("acquisition module Interrupt number %d\n", irq_count);
|
||||
}
|
||||
}
|
||||
|
||||
void fpga_acquisition::configure_acquisition()
|
||||
{
|
||||
d_map_base[0] = d_select_queue;
|
||||
d_map_base[1] = d_vector_length;
|
||||
d_map_base[2] = d_nsamples;
|
||||
d_map_base[5] = (int) log2((float) d_vector_length); // log2 FFTlength
|
||||
}
|
||||
|
||||
void fpga_acquisition::set_phase_step(unsigned int doppler_index)
|
||||
{
|
||||
float phase_step_rad_real;
|
||||
float phase_step_rad_int_temp;
|
||||
int32_t phase_step_rad_int;
|
||||
int doppler = static_cast<int>(-d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
// The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
||||
// The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
||||
// The FPGA also expects the phase to be negative since it produces cos(x) -j*sin(x)
|
||||
// while the gnss-sdr software (volk_gnsssdr_s32f_sincos_32fc) generates cos(x) + j*sin(x)
|
||||
phase_step_rad_real = phase_step_rad / (GPS_TWO_PI / 2);
|
||||
// avoid saturation of the fixed point representation in the fpga
|
||||
// (only the positive value can saturate due to the 2's complement representation)
|
||||
if (phase_step_rad_real >= 1.0)
|
||||
{
|
||||
phase_step_rad_real = MAX_PHASE_STEP_RAD;
|
||||
}
|
||||
phase_step_rad_int_temp = phase_step_rad_real * POW_2_2; // * 2^2
|
||||
phase_step_rad_int = (int32_t) (phase_step_rad_int_temp * (POW_2_29)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
|
||||
d_map_base[3] = phase_step_rad_int;
|
||||
}
|
||||
|
||||
void fpga_acquisition::read_acquisition_results(uint32_t* max_index,
|
||||
float* max_magnitude, unsigned *initial_sample, float *power_sum)
|
||||
{
|
||||
unsigned readval = 0;
|
||||
readval = d_map_base[1];
|
||||
*initial_sample = readval;
|
||||
readval = d_map_base[2];
|
||||
*max_magnitude = static_cast<float>(readval);
|
||||
readval = d_map_base[4];
|
||||
*power_sum = static_cast<float>(readval);
|
||||
readval = d_map_base[3];
|
||||
*max_index = readval;
|
||||
}
|
||||
|
||||
void fpga_acquisition::block_samples()
|
||||
{
|
||||
d_map_base[14] = 1; // block the samples
|
||||
}
|
||||
|
||||
|
||||
void fpga_acquisition::unblock_samples()
|
||||
{
|
||||
d_map_base[14] = 0; // unblock the samples
|
||||
}
|
||||
|
||||
void fpga_acquisition::close_device()
|
||||
{
|
||||
unsigned * aux = const_cast<unsigned*>(d_map_base);
|
||||
if (munmap(static_cast<void*>(aux), PAGE_SIZE) == -1)
|
||||
{
|
||||
printf("Failed to unmap memory uio\n");
|
||||
}
|
||||
close(d_fd);
|
||||
}
|
||||
|
||||
void fpga_acquisition::reset_acquisition(void)
|
||||
{
|
||||
d_map_base[6] = RESET_ACQUISITION; // writing a 2 to d_map_base[6] resets the multicorrelator
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
/*!
|
||||
* \file fpga_acquisition_8sc.h
|
||||
* \brief High optimized FPGA vector correlator class for lv_16sc_t (short int complex).
|
||||
* \file fpga_acquisition.h
|
||||
* \brief High optimized FPGA vector correlator class
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* <li> Marc Majoral, 2018. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* Class that controls and executes a high optimized vector correlator
|
||||
* class in the FPGA
|
||||
* Class that controls and executes a high optimized acquisition HW
|
||||
* accelerator in the FPGA
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
@ -33,26 +33,26 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_GPS_SDR_FPGA_ACQUISITION_8SC_H_
|
||||
#define GNSS_GPS_SDR_FPGA_ACQUISITION_8SC_H_
|
||||
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
|
||||
/*!
|
||||
* \brief Class that implements carrier wipe-off and correlators.
|
||||
*/
|
||||
class gps_fpga_acquisition_8sc
|
||||
class fpga_acquisition
|
||||
{
|
||||
public:
|
||||
gps_fpga_acquisition_8sc(std::string device_name,
|
||||
unsigned int vector_length, unsigned int nsamples,
|
||||
fpga_acquisition(std::string device_name,
|
||||
unsigned int nsamples,
|
||||
unsigned int doppler_max,
|
||||
unsigned int nsamples_total, long fs_in, long freq,
|
||||
unsigned int sampled_ms, unsigned select_queue);
|
||||
~gps_fpga_acquisition_8sc();bool init();bool set_local_code(
|
||||
unsigned int PRN); //int code_length_chips, const lv_16sc_t* local_code_in, float *shifts_chips);
|
||||
unsigned int sampled_ms, unsigned select_queue,
|
||||
lv_16sc_t *all_fft_codes);
|
||||
~fpga_acquisition();bool init();bool set_local_code(
|
||||
unsigned int PRN);
|
||||
bool free();
|
||||
void run_acquisition(void);
|
||||
void set_phase_step(unsigned int doppler_index);
|
||||
@ -60,7 +60,7 @@ public:
|
||||
unsigned *initial_sample, float *power_sum);
|
||||
void block_samples();
|
||||
void unblock_samples();
|
||||
//void open_device();
|
||||
|
||||
/*!
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
@ -69,6 +69,7 @@ public:
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
@ -102,4 +103,4 @@ private:
|
||||
void close_device();
|
||||
};
|
||||
|
||||
#endif /* GNSS_GPS_SDR_FPGA_MULTICORRELATOR_H_ */
|
||||
#endif /* GNSS_SDR_FPGA_ACQUISITION_H_ */
|
@ -1,315 +0,0 @@
|
||||
/*!
|
||||
* \file gps_fpga_acquisition_8sc.cc
|
||||
* \brief High optimized FPGA vector correlator class
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* Class that controls and executes a high optimized vector correlator
|
||||
* class in the FPGA
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "gps_fpga_acquisition_8sc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <cmath>
|
||||
|
||||
// allocate memory dynamically
|
||||
#include <new>
|
||||
|
||||
// libraries used by DMA test code and GIPO test code
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
// libraries used by DMA test code
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
// libraries used by GPIO test code
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
// logging
|
||||
#include <glog/logging.h>
|
||||
|
||||
// volk
|
||||
#include <volk/volk.h>
|
||||
|
||||
// GPS L1
|
||||
#include "GPS_L1_CA.h"
|
||||
|
||||
#define PAGE_SIZE 0x10000
|
||||
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
|
||||
#define NUM_PRNs 32
|
||||
#define TEST_REGISTER_ACQ_WRITEVAL 0x55AA
|
||||
|
||||
bool gps_fpga_acquisition_8sc::init()
|
||||
{
|
||||
// configure the acquisition with the main initialization values
|
||||
gps_fpga_acquisition_8sc::configure_acquisition();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gps_fpga_acquisition_8sc::set_local_code(unsigned int PRN)
|
||||
{
|
||||
// select the code with the chosen PRN
|
||||
gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(
|
||||
&d_all_fft_codes[d_nsamples_total * (PRN - 1)]);
|
||||
return true;
|
||||
}
|
||||
|
||||
gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc(std::string device_name,
|
||||
unsigned int vector_length, unsigned int nsamples,
|
||||
unsigned int doppler_max,
|
||||
unsigned int nsamples_total, long fs_in, long freq,
|
||||
unsigned int sampled_ms, unsigned select_queue)
|
||||
{
|
||||
// initial values
|
||||
d_device_name = device_name;
|
||||
d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_nsamples = nsamples; // number of samples not including padding
|
||||
d_select_queue = select_queue;
|
||||
d_nsamples_total = nsamples_total;
|
||||
d_doppler_max = doppler_max;
|
||||
d_doppler_step = 0;
|
||||
d_fd = 0; // driver descriptor
|
||||
d_map_base = nullptr; // driver memory map
|
||||
// Direct FFT
|
||||
d_fft_if = new gr::fft::fft_complex(vector_length, true);
|
||||
// allocate memory to compute all the PRNs
|
||||
// and compute all the possible codes
|
||||
std::complex<float>* code = new std::complex<float>[nsamples_total]; // buffer for the local code
|
||||
gr_complex* d_fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_all_fft_codes = new lv_16sc_t[nsamples_total * NUM_PRNs]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
float max; // temporary maxima search
|
||||
for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(code, PRN, fs_in, 0); // generate PRN code
|
||||
// fill in zero padding
|
||||
for (int s=nsamples;s<nsamples_total;s++)
|
||||
{
|
||||
code[s] = 0;
|
||||
}
|
||||
int offset = 0;
|
||||
memcpy(d_fft_if->get_inbuf() + offset, code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
||||
d_fft_if->execute(); // Run the FFT of local code
|
||||
volk_32fc_conjugate_32fc(d_fft_codes_padded, d_fft_if->get_outbuf(), nsamples_total); // conjugate values
|
||||
max = 0; // initialize maximum value
|
||||
for (unsigned int i = 0; i < nsamples_total; i++) // search for maxima
|
||||
{
|
||||
if (std::abs(d_fft_codes_padded[i].real()) > max)
|
||||
{
|
||||
max = std::abs(d_fft_codes_padded[i].real());
|
||||
}
|
||||
if (std::abs(d_fft_codes_padded[i].imag()) > max)
|
||||
{
|
||||
max = std::abs(d_fft_codes_padded[i].imag());
|
||||
}
|
||||
}
|
||||
for (unsigned int i = 0; i < nsamples_total; i++) // map the FFT to the dynamic range of the fixed point values an copy to buffer containing all FFTs
|
||||
{
|
||||
d_all_fft_codes[i + nsamples_total * (PRN -1)] = lv_16sc_t(static_cast<int>(d_fft_codes_padded[i].real() * (pow(2, 7) - 1) / max),
|
||||
static_cast<int>(d_fft_codes_padded[i].imag() * (pow(2, 7) - 1) / max));
|
||||
|
||||
}
|
||||
}
|
||||
// open communication with HW accelerator
|
||||
//printf("opening device %s\n", d_device_name.c_str());
|
||||
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
||||
{
|
||||
LOG(WARNING) << "Cannot open deviceio" << d_device_name;
|
||||
//std::cout << "acquisition cannot open deviceio";
|
||||
}
|
||||
d_map_base = reinterpret_cast<volatile unsigned *>(mmap(NULL, PAGE_SIZE,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
|
||||
if (d_map_base == reinterpret_cast<void*>(-1))
|
||||
{
|
||||
LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory";
|
||||
//std::cout << "acquisition : could not map the fpga registers to the driver" << std::endl;
|
||||
}
|
||||
// sanity check : check test register
|
||||
// we only nee to do this when the class is created
|
||||
// but the device is not opened yet when the class is create
|
||||
// because we need to open and close the device every time we run an acquisition
|
||||
// since the same device may be used by more than one class (gps acquisition, galileo
|
||||
// acquisition, etc ..)
|
||||
unsigned writeval = TEST_REGISTER_ACQ_WRITEVAL;
|
||||
unsigned readval;
|
||||
readval = gps_fpga_acquisition_8sc::fpga_acquisition_test_register(writeval);
|
||||
if (writeval != readval)
|
||||
{
|
||||
LOG(WARNING) << "Acquisition test register sanity check failed";
|
||||
//std:: cout << "Acquisition test register sanity check failed" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
//std::cout << "Acquisition test register sanity check success !" << std::endl;
|
||||
LOG(INFO) << "Acquisition test register sanity check success !";
|
||||
}
|
||||
gps_fpga_acquisition_8sc::reset_acquisition();
|
||||
DLOG(INFO) << "Acquisition FPGA class created";
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete d_fft_if;
|
||||
delete[] d_fft_codes_padded;
|
||||
}
|
||||
|
||||
gps_fpga_acquisition_8sc::~gps_fpga_acquisition_8sc()
|
||||
{
|
||||
close_device();
|
||||
delete[] d_all_fft_codes;
|
||||
}
|
||||
|
||||
bool gps_fpga_acquisition_8sc::free()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned writeval)
|
||||
{
|
||||
unsigned readval;
|
||||
// write value to test register
|
||||
d_map_base[15] = writeval;
|
||||
// read value from test register
|
||||
readval = d_map_base[15];
|
||||
// return read value
|
||||
return readval;
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
||||
{
|
||||
unsigned short local_code;
|
||||
unsigned int k, tmp, tmp2;
|
||||
unsigned int fft_data;
|
||||
// clear memory address counter
|
||||
d_map_base[4] = 0x10000000;
|
||||
// write local code
|
||||
for (k = 0; k < d_vector_length; k++)
|
||||
{
|
||||
tmp = fft_local_code[k].real();
|
||||
tmp2 = fft_local_code[k].imag();
|
||||
local_code = (tmp & 0xFF) | ((tmp2 * 256) & 0xFF00); // put together the real part and the imaginary part
|
||||
fft_data = 0x0C000000 | (local_code & 0xFFFF);
|
||||
d_map_base[4] = fft_data;
|
||||
}
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::run_acquisition(void)
|
||||
{
|
||||
// enable interrupts
|
||||
int reenable = 1;
|
||||
write(d_fd, reinterpret_cast<void*>(&reenable), sizeof(int));
|
||||
// launch the acquisition process
|
||||
d_map_base[6] = 1; // writing anything to reg 6 launches the acquisition process
|
||||
|
||||
int irq_count;
|
||||
ssize_t nb;
|
||||
// wait for interrupt
|
||||
nb = read(d_fd, &irq_count, sizeof(irq_count));
|
||||
if (nb != sizeof(irq_count))
|
||||
{
|
||||
printf("acquisition module Read failed to retrieve 4 bytes!\n");
|
||||
printf("acquisition module Interrupt number %d\n", irq_count);
|
||||
}
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::configure_acquisition()
|
||||
{
|
||||
d_map_base[0] = d_select_queue;
|
||||
d_map_base[1] = d_vector_length;
|
||||
d_map_base[2] = d_nsamples;
|
||||
d_map_base[5] = (int) log2((float) d_vector_length); // log2 FFTlength
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index)
|
||||
{
|
||||
float phase_step_rad_real;
|
||||
float phase_step_rad_int_temp;
|
||||
int32_t phase_step_rad_int;
|
||||
int doppler = static_cast<int>(-d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * (d_freq + doppler) / static_cast<float>(d_fs_in);
|
||||
// The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
||||
// The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
||||
// The FPGA also expects the phase to be negative since it produces cos(x) -j*sin(x)
|
||||
// while the gnss-sdr software (volk_gnsssdr_s32f_sincos_32fc) generates cos(x) + j*sin(x)
|
||||
phase_step_rad_real = phase_step_rad / (GPS_TWO_PI / 2);
|
||||
// avoid saturation of the fixed point representation in the fpga
|
||||
// (only the positive value can saturate due to the 2's complement representation)
|
||||
if (phase_step_rad_real >= 1.0)
|
||||
{
|
||||
phase_step_rad_real = MAX_PHASE_STEP_RAD;
|
||||
}
|
||||
phase_step_rad_int_temp = phase_step_rad_real * 4; // * 2^2
|
||||
phase_step_rad_int = (int32_t) (phase_step_rad_int_temp * (536870912)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
|
||||
d_map_base[3] = phase_step_rad_int;
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::read_acquisition_results(uint32_t* max_index,
|
||||
float* max_magnitude, unsigned *initial_sample, float *power_sum)
|
||||
{
|
||||
unsigned readval = 0;
|
||||
readval = d_map_base[1];
|
||||
*initial_sample = readval;
|
||||
readval = d_map_base[2];
|
||||
*max_magnitude = static_cast<float>(readval);
|
||||
readval = d_map_base[4];
|
||||
*power_sum = static_cast<float>(readval);
|
||||
readval = d_map_base[3];
|
||||
*max_index = readval;
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::block_samples()
|
||||
{
|
||||
d_map_base[14] = 1; // block the samples
|
||||
}
|
||||
|
||||
|
||||
void gps_fpga_acquisition_8sc::unblock_samples()
|
||||
{
|
||||
d_map_base[14] = 0; // unblock the samples
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::close_device()
|
||||
{
|
||||
unsigned * aux = const_cast<unsigned*>(d_map_base);
|
||||
if (munmap(static_cast<void*>(aux), PAGE_SIZE) == -1)
|
||||
{
|
||||
printf("Failed to unmap memory uio\n");
|
||||
}
|
||||
close(d_fd);
|
||||
}
|
||||
|
||||
void gps_fpga_acquisition_8sc::reset_acquisition(void)
|
||||
{
|
||||
d_map_base[6] = 2; // writing a 2 to d_map_base[6] resets the multicorrelator
|
||||
}
|
@ -33,6 +33,7 @@
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
ChannelFsm::ChannelFsm()
|
||||
{
|
||||
@ -135,35 +136,41 @@ bool ChannelFsm::Event_failed_tracking_standby()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
acq_ = acquisition;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
trk_ = tracking;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
queue_ = queue;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_channel(unsigned int channel)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
channel_ = channel;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::start_acquisition()
|
||||
{
|
||||
acq_->reset();
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::start_tracking()
|
||||
{
|
||||
trk_->start_tracking();
|
||||
@ -174,6 +181,7 @@ void ChannelFsm::start_tracking()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::request_satellite()
|
||||
{
|
||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||
@ -183,6 +191,7 @@ void ChannelFsm::request_satellite()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::notify_stop_tracking()
|
||||
{
|
||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||
|
@ -42,6 +42,7 @@ channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<Channe
|
||||
return channel_msg_receiver_cc_sptr(new channel_msg_receiver_cc(channel_fsm, repeat));
|
||||
}
|
||||
|
||||
|
||||
void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
bool result = false;
|
||||
@ -50,10 +51,10 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
long int message = pmt::to_long(msg);
|
||||
switch (message)
|
||||
{
|
||||
case 1: //positive acquisition
|
||||
case 1: // positive acquisition
|
||||
result = d_channel_fsm->Event_valid_acquisition();
|
||||
break;
|
||||
case 2: //negative acquisition
|
||||
case 2: // negative acquisition
|
||||
if (d_repeat == true)
|
||||
{
|
||||
result = d_channel_fsm->Event_failed_acquisition_repeat();
|
||||
|
@ -37,12 +37,15 @@ using google::LogMessage;
|
||||
|
||||
// Constructor
|
||||
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res,
|
||||
std::string role,
|
||||
std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
{
|
||||
connected_ = false;
|
||||
if (configuration)
|
||||
|
@ -37,12 +37,15 @@ using google::LogMessage;
|
||||
|
||||
// Constructor
|
||||
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res,
|
||||
std::string role,
|
||||
std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
{
|
||||
connected_ = false;
|
||||
if (configuration)
|
||||
@ -101,6 +104,7 @@ gr::basic_block_sptr SignalConditioner::get_left_block()
|
||||
return data_type_adapt_->get_left_block();
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr SignalConditioner::get_right_block()
|
||||
{
|
||||
return res_->get_right_block();
|
||||
|
@ -45,9 +45,13 @@ notch_sptr make_notch_filter(float pfa, float p_c_factor,
|
||||
}
|
||||
|
||||
|
||||
Notch::Notch(float pfa, float p_c_factor, int length_, int n_segments_est, int n_segments_reset) : gr::block("Notch",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
Notch::Notch(float pfa,
|
||||
float p_c_factor,
|
||||
int length_,
|
||||
int n_segments_est,
|
||||
int n_segments_reset) : gr::block("Notch",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
{
|
||||
const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex);
|
||||
set_alignment(std::max(1, alignment_multiple));
|
||||
@ -79,6 +83,7 @@ Notch::~Notch()
|
||||
volk_free(power_spect);
|
||||
}
|
||||
|
||||
|
||||
void Notch::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (unsigned int aux = 0; aux < ninput_items_required.size(); aux++)
|
||||
@ -87,6 +92,7 @@ void Notch::forecast(int noutput_items __attribute__((unused)), gr_vector_int &n
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int Notch::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
|
@ -43,9 +43,15 @@ notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int length_,
|
||||
return notch_lite_sptr(new NotchLite(p_c_factor, pfa, length_, n_segments_est, n_segments_reset, n_segments_coeff));
|
||||
}
|
||||
|
||||
NotchLite::NotchLite(float p_c_factor, float pfa, int length_, int n_segments_est, int n_segments_reset, int n_segments_coeff) : gr::block("NotchLite",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
|
||||
NotchLite::NotchLite(float p_c_factor,
|
||||
float pfa,
|
||||
int length_,
|
||||
int n_segments_est,
|
||||
int n_segments_reset,
|
||||
int n_segments_coeff) : gr::block("NotchLite",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
{
|
||||
const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex);
|
||||
set_alignment(std::max(1, alignment_multiple));
|
||||
@ -74,11 +80,13 @@ NotchLite::NotchLite(float p_c_factor, float pfa, int length_, int n_segments_es
|
||||
d_fft = std::unique_ptr<gr::fft::fft_complex>(new gr::fft::fft_complex(length_, true));
|
||||
}
|
||||
|
||||
|
||||
NotchLite::~NotchLite()
|
||||
{
|
||||
volk_free(power_spect);
|
||||
}
|
||||
|
||||
|
||||
void NotchLite::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (unsigned int aux = 0; aux < ninput_items_required.size(); aux++)
|
||||
@ -87,6 +95,7 @@ void NotchLite::forecast(int noutput_items __attribute__((unused)), gr_vector_in
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int NotchLite::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
|
@ -44,9 +44,12 @@ pulse_blanking_cc_sptr make_pulse_blanking_cc(float pfa, int length_,
|
||||
}
|
||||
|
||||
|
||||
pulse_blanking_cc::pulse_blanking_cc(float pfa, int length_, int n_segments_est, int n_segments_reset) : gr::block("pulse_blanking_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
pulse_blanking_cc::pulse_blanking_cc(float pfa,
|
||||
int length_,
|
||||
int n_segments_est,
|
||||
int n_segments_reset) : gr::block("pulse_blanking_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)))
|
||||
{
|
||||
const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex);
|
||||
set_alignment(std::max(1, alignment_multiple));
|
||||
@ -73,6 +76,7 @@ pulse_blanking_cc::~pulse_blanking_cc()
|
||||
volk_free(zeros_);
|
||||
}
|
||||
|
||||
|
||||
void pulse_blanking_cc::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (unsigned int aux = 0; aux < ninput_items_required.size(); aux++)
|
||||
@ -81,6 +85,7 @@ void pulse_blanking_cc::forecast(int noutput_items __attribute__((unused)), gr_v
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int pulse_blanking_cc::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimat
|
||||
|
||||
DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz).");
|
||||
|
||||
DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite.");
|
||||
DEFINE_int32(max_lock_fail, 50, "Maximum number of lock failures before dropping a satellite.");
|
||||
|
||||
DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad).");
|
||||
|
||||
|
@ -50,7 +50,7 @@ DECLARE_int32(doppler_step); //<! If defined, sets the frequency step in the se
|
||||
// Declare flags for tracking blocks
|
||||
DECLARE_int32(cn0_samples); //<! Number of correlator outputs used for CN0 estimation.
|
||||
DECLARE_int32(cn0_min); //<! Minimum valid CN0 (in dB-Hz).
|
||||
DECLARE_int32(max_lock_fail); //<! Number number of lock failures before dropping satellite.
|
||||
DECLARE_int32(max_lock_fail); //<! Maximum number of lock failures before dropping a satellite.
|
||||
DECLARE_double(carrier_lock_th); //<! Carrier lock threshold (in rad).
|
||||
DECLARE_double(dll_bw_hz); //<! Bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).
|
||||
DECLARE_double(pll_bw_hz); //<! Bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).
|
||||
|
@ -1,9 +1,24 @@
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.22")
|
||||
|
||||
|
||||
|
||||
|
||||
FIND_PROGRAM(ORCC_EXECUTABLE orcc
|
||||
HINTS ${PC_ORC_TOOLSDIR}
|
||||
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of Volk
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# Volk is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Volk is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
# License for more details.
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Volk; see the file COPYING. If not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(DEFINED __INCLUDED_VOLK_ADD_TEST)
|
||||
return()
|
||||
@ -176,20 +174,19 @@ function(VOLK_ADD_TEST test_name executable_name)
|
||||
#set them in the PATH to run tests. The following appends the
|
||||
#path of a target dependency.
|
||||
#
|
||||
#NOTE: get_target_property LOCATION is being deprecated as of
|
||||
#CMake 3.2.0, which just prints a warning & notes that this
|
||||
#functionality will be removed in the future. Leave it here for
|
||||
#now until someone can figure out how to do this in Windows.
|
||||
foreach(target ${test_name} ${VOLK_TEST_TARGET_DEPS})
|
||||
get_target_property(location "${target}" LOCATION)
|
||||
if(location)
|
||||
get_filename_component(path ${location} PATH)
|
||||
string(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path})
|
||||
list(APPEND libpath ${path})
|
||||
endif(location)
|
||||
endforeach(target)
|
||||
#create a list of target directories to be determined by the
|
||||
#"add_test" command, via the $<FOO:BAR> operator; make sure the
|
||||
#test's directory is first, since it ($1) is prepended to PATH.
|
||||
unset(TARGET_DIR_LIST)
|
||||
foreach(target ${executable_name} ${VOLK_TEST_TARGET_DEPS})
|
||||
list(APPEND TARGET_DIR_LIST "$<TARGET_FILE_DIR:${target}>")
|
||||
endforeach()
|
||||
#replace list separator with the path separator (escaped)
|
||||
string(REPLACE ";" "\\\\;" TARGET_DIR_LIST "${TARGET_DIR_LIST}")
|
||||
|
||||
list(APPEND libpath ${DLL_PATHS} "%PATH%")
|
||||
#add command line argument (TARGET_DIR_LIST) to path and append current path
|
||||
list(INSERT libpath 0 "%1")
|
||||
list(APPEND libpath "%PATH%")
|
||||
|
||||
#replace list separator with the path separator (escaped)
|
||||
string(REPLACE ";" "\\;" libpath "${libpath}")
|
||||
@ -204,14 +201,18 @@ function(VOLK_ADD_TEST test_name executable_name)
|
||||
file(APPEND ${bat_file} "SET ${environ}\n")
|
||||
endforeach(environ)
|
||||
|
||||
set(VOLK_TEST_ARGS "${test_name}")
|
||||
|
||||
#redo the test args to have a space between each
|
||||
string(REPLACE ";" " " VOLK_TEST_ARGS "${VOLK_TEST_ARGS}")
|
||||
|
||||
#finally: append the test name to execute
|
||||
file(APPEND ${bat_file} ${test_name} " " ${VOLK_TEST_ARGS} "\n")
|
||||
file(APPEND ${bat_file} "${executable_name} ${VOLK_TEST_ARGS}\n")
|
||||
file(APPEND ${bat_file} "\n")
|
||||
|
||||
add_test(${test_name} ${bat_file})
|
||||
add_test(NAME qa_${test_name}
|
||||
COMMAND ${bat_file} ${TARGET_DIR_LIST}
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
endfunction(VOLK_ADD_TEST)
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2010-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNU Radio
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNU Radio is free software; you can redistribute it and/or modify
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNU Radio is distributed in the hope that it will be useful,
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Radio; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(DEFINED __INCLUDED_VOLK_BOOST_CMAKE)
|
||||
return()
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2014-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of VOLK
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# VOLK is free software; you can redistribute it and/or modify
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# VOLK is distributed in the hope that it will be useful,
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Radio; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(DEFINED __INCLUDED_VOLK_BUILD_TYPES_CMAKE)
|
||||
return()
|
||||
|
@ -1,3 +1,20 @@
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_VOLK_GNSSSDR volk_gnsssdr)
|
||||
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of VOLK.
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# VOLK is free software; you can redistribute it and/or modify
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# VOLK is distributed in the hope that it will be useful,
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with VOLK; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(MAJOR_VERSION @VERSION_INFO_MAJOR_VERSION@)
|
||||
set(MINOR_VERSION @VERSION_INFO_MINOR_VERSION@)
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2010-2011,2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2015-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNU Radio
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNU Radio is free software; you can redistribute it and/or modify
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNU Radio is distributed in the hope that it will be useful,
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Radio; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(DEFINED __INCLUDED_VOLK_PYTHON_CMAKE)
|
||||
return()
|
||||
|
@ -1,21 +1,19 @@
|
||||
# Copyright 2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2014-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of VOLK.
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# VOLK is free software; you can redistribute it and/or modify
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# VOLK is distributed in the hope that it will be useful,
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with VOLK; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(DEFINED __INCLUDED_VOLK_VERSION_CMAKE)
|
||||
return()
|
||||
|
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||
########################################################################
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) #same flags for C sources
|
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
########################################################################
|
||||
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||
########################################################################
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) #same flags for C sources
|
@ -1,3 +1,21 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
@ -0,0 +1,72 @@
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_SYS_TIME_H_
|
||||
#define _MSC_SYS_TIME_H_
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
//http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/430449b3-f6dd-4e18-84de-eebd26a8d668
|
||||
#include < time.h >
|
||||
#include <windows.h> //I've omitted this line.
|
||||
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
|
||||
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
|
||||
#else
|
||||
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1900
|
||||
struct timespec
|
||||
{
|
||||
time_t tv_sec; /* Seconds since 00:00:00 GMT, */
|
||||
|
||||
/* 1 January 1970 */
|
||||
|
||||
long tv_nsec; /* Additional nanoseconds since */
|
||||
|
||||
/* tv_sec */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct timezone
|
||||
{
|
||||
int tz_minuteswest; /* minutes W of Greenwich */
|
||||
int tz_dsttime; /* type of dst correction */
|
||||
};
|
||||
|
||||
static inline int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
FILETIME ft;
|
||||
unsigned __int64 tmpres = 0;
|
||||
static int tzflag;
|
||||
|
||||
if (NULL != tv)
|
||||
{
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
tmpres |= ft.dwHighDateTime;
|
||||
tmpres <<= 32;
|
||||
tmpres |= ft.dwLowDateTime;
|
||||
|
||||
/*converting file time to unix epoch*/
|
||||
tmpres -= DELTA_EPOCH_IN_MICROSECS;
|
||||
tv->tv_sec = (long)(tmpres / 1000000UL);
|
||||
tv->tv_usec = (long)(tmpres % 1000000UL);
|
||||
}
|
||||
|
||||
if (NULL != tz)
|
||||
{
|
||||
if (!tzflag)
|
||||
{
|
||||
_tzset();
|
||||
tzflag++;
|
||||
}
|
||||
tz->tz_minuteswest = _timezone / 60;
|
||||
tz->tz_dsttime = _daylight;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -13,12 +13,24 @@
|
||||
</arch>
|
||||
|
||||
<arch name="neon">
|
||||
<flag compiler="gnu">-mfpu=neon</flag>
|
||||
<flag compiler="gnu">-funsafe-math-optimizations</flag>
|
||||
<alignment>16</alignment>
|
||||
<check name="has_neon"></check>
|
||||
</arch>
|
||||
|
||||
<arch name="neonv7">
|
||||
<flag compiler="gnu">-mfpu=neon</flag>
|
||||
<flag compiler="gnu">-funsafe-math-optimizations</flag>
|
||||
<alignment>16</alignment>
|
||||
<check name="has_neonv7"></check>
|
||||
</arch>
|
||||
|
||||
<arch name="neonv8">
|
||||
<flag compiler="gnu">-funsafe-math-optimizations</flag>
|
||||
<alignment>16</alignment>
|
||||
<check name="has_neonv8"></check>
|
||||
</arch>
|
||||
|
||||
<arch name="32">
|
||||
<flag compiler="gnu">-m32</flag>
|
||||
</arch>
|
||||
|
@ -5,7 +5,15 @@
|
||||
</machine>
|
||||
|
||||
<machine name="neon">
|
||||
<archs>generic neon softfp|hardfp orc|</archs>
|
||||
<archs>generic neon orc|</archs>
|
||||
</machine>
|
||||
|
||||
<machine name="neonv7">
|
||||
<archs>generic neon neonv7 softfp|hardfp orc|</archs>
|
||||
</machine>
|
||||
|
||||
<machine name="neonv8">
|
||||
<archs>generic neon neonv8</archs>
|
||||
</machine>
|
||||
|
||||
<!-- trailing | bar means generate without either for MSVC -->
|
||||
|
@ -249,7 +249,7 @@ static inline void volk_gnsssdr_16i_resamplerxnpuppet_16i_a_avx(int16_t* result,
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16i_resamplerxnpuppet_16i_neon(int16_t* result, const int16_t* local_code, unsigned int num_points)
|
||||
{
|
||||
int code_length_chips = 2046;
|
||||
|
@ -526,7 +526,7 @@ static inline void volk_gnsssdr_16i_xn_resampler_16i_xn_u_avx(int16_t** result,
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
static inline void volk_gnsssdr_16i_xn_resampler_16i_xn_neon(int16_t** result, const int16_t* local_code, float rem_code_phase_chips, float code_phase_step_chips, float* shifts_chips, unsigned int code_length_chips, int num_out_vectors, unsigned int num_points)
|
||||
{
|
||||
|
@ -1049,7 +1049,7 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_avx2(lv_16sc
|
||||
}
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//#include <arm_neon.h>
|
||||
|
||||
//static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_neon(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const int16_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -1228,10 +1228,10 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_avx2(lv_16sc
|
||||
//}
|
||||
//}
|
||||
|
||||
//#endif [> LV_HAVE_NEON <]
|
||||
//#endif [> LV_HAVE_NEONV7 <]
|
||||
|
||||
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//#include <arm_neon.h>
|
||||
//#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
|
||||
@ -1419,10 +1419,10 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_avx2(lv_16sc
|
||||
//}
|
||||
//}
|
||||
|
||||
//#endif [> LV_HAVE_NEON <]
|
||||
//#endif [> LV_HAVE_NEONV7 <]
|
||||
|
||||
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//#include <arm_neon.h>
|
||||
//#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
|
||||
@ -1601,6 +1601,6 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_avx2(lv_16sc
|
||||
//}
|
||||
//}
|
||||
|
||||
//#endif [> LV_HAVE_NEON <]
|
||||
//#endif [> LV_HAVE_NEONV7 <]
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_16i_dot_prod_16ic_xn_H*/
|
||||
|
@ -317,7 +317,7 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic_u_avx2(lv_
|
||||
//#endif // AVX2
|
||||
|
||||
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//static inline void volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
//{
|
||||
//// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
@ -348,7 +348,7 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic_u_avx2(lv_
|
||||
//#endif // NEON
|
||||
|
||||
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//static inline void volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic_neon_vma(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
//{
|
||||
//// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
|
@ -202,7 +202,7 @@ static inline void volk_gnsssdr_16ic_conjugate_16ic_u_avx2(lv_16sc_t* cVector, c
|
||||
|
||||
//
|
||||
//
|
||||
//#ifdef LV_HAVE_NEON
|
||||
//#ifdef LV_HAVE_NEONV7
|
||||
//#include <arm_neon.h>
|
||||
//
|
||||
//static inline void volk_gnsssdr_16ic_conjugate_16ic_neon(lv_16sc_t* cVector, const lv_16sc_t* aVector, unsigned int num_points)
|
||||
@ -228,6 +228,6 @@ static inline void volk_gnsssdr_16ic_conjugate_16ic_u_avx2(lv_16sc_t* cVector, c
|
||||
// *c++ = lv_conj(*a++);
|
||||
// }
|
||||
//}
|
||||
//#endif /* LV_HAVE_NEON */
|
||||
//#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_16ic_conjugate_16ic_H */
|
||||
|
@ -180,7 +180,7 @@ static inline void volk_gnsssdr_16ic_convert_32fc_a_axv(lv_32fc_t* outputVector,
|
||||
#endif /* LV_HAVE_AVX */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_convert_32fc_neon(lv_32fc_t* outputVector, const lv_16sc_t* inputVector, unsigned int num_points)
|
||||
@ -210,6 +210,6 @@ static inline void volk_gnsssdr_16ic_convert_32fc_neon(lv_32fc_t* outputVector,
|
||||
_in++;
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_32fc_convert_16ic_H */
|
||||
|
@ -256,7 +256,7 @@ static inline void volk_gnsssdr_16ic_resampler_fast_16ic_u_sse2(lv_16sc_t* resul
|
||||
#endif /* LV_HAVE_SSE2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_resampler_fast_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, float rem_code_phase_chips, float code_phase_step_chips, int code_length_chips, unsigned int num_output_samples) //, int* scratch_buffer, float* scratch_buffer_float)
|
||||
@ -342,6 +342,6 @@ static inline void volk_gnsssdr_16ic_resampler_fast_16ic_neon(lv_16sc_t* result,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_resampler_fast_16ic_H*/
|
||||
|
@ -72,7 +72,7 @@ static inline void volk_gnsssdr_16ic_resamplerfastpuppet_16ic_u_sse2(lv_16sc_t*
|
||||
|
||||
#endif /* LV_HAVE_SSE2 */
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
|
||||
static inline void volk_gnsssdr_16ic_resamplerfastpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
|
||||
{
|
||||
@ -82,6 +82,6 @@ static inline void volk_gnsssdr_16ic_resamplerfastpuppet_16ic_neon(lv_16sc_t* re
|
||||
volk_gnsssdr_16ic_resampler_fast_16ic_neon(result, local_code, rem_code_phase_chips, code_phase_step_chips, code_length_chips, num_points);
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif // INCLUDED_volk_gnsssdr_16ic_resamplerfastpuppet_16ic_H
|
||||
|
@ -128,7 +128,7 @@ static inline void volk_gnsssdr_16ic_resamplerfastxnpuppet_16ic_u_sse2(lv_16sc_t
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_resamplerfastxnpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
|
||||
{
|
||||
float code_phase_step_chips = 0.1;
|
||||
|
@ -250,7 +250,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet_16ic_a_avx(lv_16sc_t* res
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_resamplerxnpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
|
||||
{
|
||||
int code_length_chips = 2046;
|
||||
|
@ -137,7 +137,7 @@ static inline void volk_gnsssdr_16ic_rotatorpuppet_16ic_u_sse3_reload(lv_16sc_t*
|
||||
#endif /* LV_HAVE_SSE3 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_rotatorpuppet_16ic_neon(lv_16sc_t* outVector, const lv_16sc_t* inVector, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
@ -150,10 +150,10 @@ static inline void volk_gnsssdr_16ic_rotatorpuppet_16ic_neon(lv_16sc_t* outVecto
|
||||
volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon(outVector, inVector, phase_inc[0], phase, num_points);
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_rotatorpuppet_16ic_neon_reload(lv_16sc_t* outVector, const lv_16sc_t* inVector, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
@ -166,7 +166,7 @@ static inline void volk_gnsssdr_16ic_rotatorpuppet_16ic_neon_reload(lv_16sc_t* o
|
||||
volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon_reload(outVector, inVector, phase_inc[0], phase, num_points);
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_16ic_rotatorpuppet_16ic_H */
|
||||
|
@ -645,7 +645,7 @@ static inline void volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_u_sse3_reload(lv_16sc
|
||||
#endif /* LV_HAVE_SSE3 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon(lv_16sc_t* outVector, const lv_16sc_t* inVector, const lv_32fc_t phase_inc, lv_32fc_t* phase, unsigned int num_points)
|
||||
@ -778,10 +778,10 @@ static inline void volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon(lv_16sc_t* outVe
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon_reload(lv_16sc_t* outVector, const lv_16sc_t* inVector, const lv_32fc_t phase_inc, lv_32fc_t* phase, unsigned int num_points)
|
||||
@ -972,6 +972,6 @@ static inline void volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_neon_reload(lv_16sc_t
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_16ic_s32fc_x2_rotator_16ic_H */
|
||||
|
@ -393,7 +393,7 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_a_axv2(lv_16sc_t* out, con
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon(lv_16sc_t* out, const lv_16sc_t* in_a, const lv_16sc_t* in_b, unsigned int num_points)
|
||||
@ -462,10 +462,10 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon(lv_16sc_t* out, const
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon_vma(lv_16sc_t* out, const lv_16sc_t* in_a, const lv_16sc_t* in_b, unsigned int num_points)
|
||||
@ -515,10 +515,10 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon_vma(lv_16sc_t* out, c
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon_optvma(lv_16sc_t* out, const lv_16sc_t* in_a, const lv_16sc_t* in_b, unsigned int num_points)
|
||||
@ -569,6 +569,6 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_neon_optvma(lv_16sc_t* out
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_x2_dot_prod_16ic_H*/
|
||||
|
@ -489,7 +489,7 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_u_avx2(lv_16sc_t* resul
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -575,10 +575,10 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon(lv_16sc_t* result,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon_vma(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -653,10 +653,10 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon_vma(lv_16sc_t* res
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon_optvma(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -736,6 +736,6 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_neon_optvma(lv_16sc_t*
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_xn_dot_prod_16ic_xn_H*/
|
||||
|
@ -188,7 +188,7 @@ static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_u_avx2(lv_16sc_t* r
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
{
|
||||
@ -213,7 +213,7 @@ static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_neon(lv_16sc_t* res
|
||||
#endif // NEON
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_neon_vma(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
{
|
||||
@ -237,7 +237,7 @@ static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_neon_vma(lv_16sc_t*
|
||||
|
||||
#endif // NEON
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_neon_optvma(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_a_avx2(lv_16sc_t* out, con
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_multiply_16ic_neon(lv_16sc_t* out, const lv_16sc_t* in_a, const lv_16sc_t* in_b, unsigned int num_points)
|
||||
@ -338,6 +338,6 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_neon(lv_16sc_t* out, const
|
||||
*out++ = (*a_ptr++) * (*b_ptr++);
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7*/
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_x2_multiply_16ic_H*/
|
||||
|
@ -1300,7 +1300,7 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_a_avx2_reload(l
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -1486,10 +1486,10 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon(lv_16sc_t*
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
|
||||
@ -1683,10 +1683,10 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon_vma(lv_16s
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
|
||||
@ -1872,6 +1872,6 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon_optvma(lv_
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_H*/
|
||||
|
@ -317,7 +317,7 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic_u_avx2_relo
|
||||
#endif // AVX2
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
@ -348,7 +348,7 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic_neon(lv_16s
|
||||
#endif // NEON
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic_neon_vma(lv_16sc_t* result, const lv_16sc_t* local_code, const lv_16sc_t* in, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
|
@ -525,7 +525,7 @@ static inline void volk_gnsssdr_16ic_xn_resampler_16ic_xn_u_avx(lv_16sc_t** resu
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
static inline void volk_gnsssdr_16ic_xn_resampler_16ic_xn_neon(lv_16sc_t** result, const lv_16sc_t* local_code, float rem_code_phase_chips, float code_phase_step_chips, float* shifts_chips, unsigned int code_length_chips, int num_out_vectors, unsigned int num_points)
|
||||
{
|
||||
|
@ -285,7 +285,7 @@ static inline void volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_u_sse2(lv_16sc_t*
|
||||
#endif /* LV_HAVE_SSE2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_neon(lv_16sc_t** result, const lv_16sc_t* local_code, float* rem_code_phase_chips, float code_phase_step_chips, unsigned int code_length_chips, int num_out_vectors, unsigned int num_output_samples)
|
||||
@ -384,6 +384,6 @@ static inline void volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_neon(lv_16sc_t**
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_H*/
|
||||
|
@ -481,7 +481,7 @@ static inline void volk_gnsssdr_32f_index_max_32u_generic(uint32_t* target, cons
|
||||
#endif /*LV_HAVE_GENERIC*/
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32f_index_max_32u_neon(uint32_t* target, const float* src0, uint32_t num_points)
|
||||
@ -546,6 +546,6 @@ static inline void volk_gnsssdr_32f_index_max_32u_neon(uint32_t* target, const f
|
||||
}
|
||||
}
|
||||
|
||||
#endif /*LV_HAVE_NEON*/
|
||||
#endif /*LV_HAVE_NEONV7*/
|
||||
|
||||
#endif /*INCLUDED_volk_gnsssdr_32f_index_max_32u_H*/
|
||||
|
@ -246,7 +246,7 @@ static inline void volk_gnsssdr_32f_resamplerxnpuppet_32f_u_avx(float* result, c
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_32f_resamplerxnpuppet_32f_neon(float* result, const float* local_code, unsigned int num_points)
|
||||
{
|
||||
int code_length_chips = 2046;
|
||||
|
@ -642,7 +642,7 @@ static inline void volk_gnsssdr_32f_sincos_32fc_generic_fxpt(lv_32fc_t* out, con
|
||||
#endif /* LV_HAVE_GENERIC */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
/* Adapted from http://gruntthepeon.free.fr/ssemath/neon_mathfun.h, original code from Julien Pommier */
|
||||
/* Based on algorithms from the cephes library http://www.netlib.org/cephes/ */
|
||||
@ -747,7 +747,7 @@ static inline void volk_gnsssdr_32f_sincos_32fc_neon(lv_32fc_t* out, const float
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_32f_sincos_32fc_H */
|
||||
|
@ -527,7 +527,7 @@ static inline void volk_gnsssdr_32f_xn_resampler_32f_xn_u_avx(float** result, co
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32f_xn_resampler_32f_xn_neon(float** result, const float* local_code, float rem_code_phase_chips, float code_phase_step_chips, float* shifts_chips, unsigned int code_length_chips, int num_out_vectors, unsigned int num_points)
|
||||
|
@ -386,7 +386,7 @@ static inline void volk_gnsssdr_32fc_convert_16ic_a_avx2(lv_16sc_t* outputVector
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32fc_convert_16ic_neon(lv_16sc_t* outputVector, const lv_32fc_t* inputVector, unsigned int num_points)
|
||||
@ -450,7 +450,7 @@ static inline void volk_gnsssdr_32fc_convert_16ic_neon(lv_16sc_t* outputVector,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
@ -373,7 +373,7 @@ static inline void volk_gnsssdr_32fc_convert_8ic_a_sse2(lv_8sc_t* outputVector,
|
||||
#endif /* LV_HAVE_SSE2 */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32fc_convert_8ic_neon(lv_8sc_t* outputVector, const lv_32fc_t* inputVector, unsigned int num_points)
|
||||
@ -464,6 +464,6 @@ static inline void volk_gnsssdr_32fc_convert_8ic_neon(lv_8sc_t* outputVector, co
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_32fc_convert_8ic_H */
|
||||
|
@ -306,7 +306,7 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_avx2(lv_32fc_t* re
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_neon(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
|
||||
{
|
||||
int code_length_chips = 2046;
|
||||
|
@ -647,7 +647,7 @@ static inline void volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn_a_avx(lv_32fc_t
|
||||
#endif /* LV_HAVE_AVX */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn_neon(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const lv_32fc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
@ -800,6 +800,6 @@ static inline void volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn_neon(lv_32fc_t*
|
||||
(*phase) = _phase;
|
||||
}
|
||||
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn_H */
|
||||
|
@ -220,7 +220,7 @@ static inline void volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc_a_avx(lv_32
|
||||
#endif // AVX
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
static inline void volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc_neon(lv_32fc_t* result, const lv_32fc_t* local_code, const lv_32fc_t* in, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
|
@ -682,7 +682,7 @@ static inline void volk_gnsssdr_32fc_xn_resampler_32fc_xn_a_avx2(lv_32fc_t** res
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_32fc_xn_resampler_32fc_xn_neon(lv_32fc_t** result, const lv_32fc_t* local_code, float rem_code_phase_chips, float code_phase_step_chips, float* shifts_chips, unsigned int code_length_chips, int num_out_vectors, unsigned int num_points)
|
||||
|
@ -348,7 +348,7 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_u_orc(lv_8sc_t* cVector, const
|
||||
#endif /* LV_HAVE_ORC */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEON
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_8ic_conjugate_8ic_neon(lv_8sc_t* cVector, const lv_8sc_t* aVector, unsigned int num_points)
|
||||
@ -374,6 +374,6 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_neon(lv_8sc_t* cVector, const
|
||||
*c++ = lv_conj(*a++);
|
||||
}
|
||||
}
|
||||
#endif /* LV_HAVE_NEON */
|
||||
#endif /* LV_HAVE_NEONV7 */
|
||||
|
||||
#endif /* INCLUDED_volk_gnsssdr_8ic_conjugate_8ic_H */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user