mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-17 15:47:15 +00:00
Merge branch 'fpga_extended_coherent_integration' of https://github.com/mmajoral/gnss-sdr into mmajoral-fpga_extended_coherent_integration
This commit is contained in:
@@ -40,11 +40,6 @@
|
||||
#include <iostream> // for cout, endl
|
||||
#include <sys/mman.h> // for mmap
|
||||
|
||||
|
||||
// constants
|
||||
const size_t PAGE_SIZE = 0x10000;
|
||||
const uint32_t TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
|
||||
|
||||
Fpga_Switch::Fpga_Switch(const std::string &device_name)
|
||||
{
|
||||
if ((d_device_descriptor = open(device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
||||
|
||||
@@ -39,16 +39,33 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#define MAX_LENGTH_DEVICEIO_NAME 50
|
||||
|
||||
/*!
|
||||
* \brief Class that controls the switch in the FPGA, which connects the FPGA acquisition and multicorrelator modules to
|
||||
* either the DMA or the Analog Front-End.
|
||||
*/
|
||||
class Fpga_Switch
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Constructor
|
||||
*/
|
||||
Fpga_Switch(const std::string& device_name);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~Fpga_Switch();
|
||||
|
||||
/*!
|
||||
* \brief This function configures the switch in th eFPGA
|
||||
*/
|
||||
void set_switch_position(int32_t switch_position);
|
||||
|
||||
private:
|
||||
static const size_t PAGE_SIZE = 0x10000;
|
||||
static const uint32_t TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
|
||||
static const uint32_t MAX_LENGTH_DEVICEIO_NAME = 50;
|
||||
|
||||
int d_device_descriptor; // driver descriptor
|
||||
volatile unsigned* d_map_base; // driver memory map
|
||||
|
||||
|
||||
Reference in New Issue
Block a user