GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
fpga_switch.h
Go to the documentation of this file.
1/*!
2 * \file fpga_switch.h
3 * \brief Switch that connects the HW accelerator queues to the analog front end or the DMA.
4 * \authors <ul>
5 * <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
6 * <li> Javier Arribas, 2016. jarribas(at)cttc.es
7 * </ul>
8 *
9 * Class that controls a switch in the FPGA
10 *
11 *
12 * -----------------------------------------------------------------------------
13 *
14 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
15 * This file is part of GNSS-SDR.
16 *
17 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
18 * SPDX-License-Identifier: GPL-3.0-or-later
19 *
20 * -----------------------------------------------------------------------------
21 */
22
23#ifndef GNSS_SDR_FPGA_SWITCH_H
24#define GNSS_SDR_FPGA_SWITCH_H
25
26#include <cstdint>
27#include <string>
28
29/** \addtogroup Signal_Source
30 * \{ */
31/** \addtogroup Signal_Source_libs
32 * \{ */
33
34
35/*!
36 * \brief Class that controls the switch in the FPGA, which connects the FPGA acquisition and multicorrelator modules to
37 * either the DMA or the Analog Front-End.
38 */
40{
41public:
42 /*!
43 * \brief Constructor
44 */
46 /*!
47 * \brief Destructor
48 */
50
51 /*!
52 * \brief This function configures the switch in th eFPGA
53 */
54 void set_switch_position(int32_t switch_position);
55
56private:
57 const std::string SWITCH_DEVICE_NAME = std::string("AXIS_Switch_v1_0_0"); // Switch UIO device name
58 static const size_t FPGA_PAGE_SIZE = 0x1000;
59 static const uint32_t TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
60 static const uint32_t MAX_LENGTH_DEVICEIO_NAME = 50;
61
62 // private functions
63 unsigned fpga_switch_test_register(unsigned writeval);
64 void close_device(void);
65
66 volatile unsigned* d_map_base; // driver memory map
67 int d_device_descriptor; // driver descriptor
68};
69
70
71/** \} */
72/** \} */
73#endif // GNSS_SDR_FPGA_SWITCH_H
Fpga_Switch(void)
Constructor.
~Fpga_Switch()
Destructor.
void set_switch_position(int32_t switch_position)
This function configures the switch in th eFPGA.