diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.cc b/src/algorithms/acquisition/libs/fpga_acquisition.cc index 822e02d3c..00b1b65b3 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.cc +++ b/src/algorithms/acquisition/libs/fpga_acquisition.cc @@ -53,7 +53,6 @@ #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_31 2147483648 // 2^31 (used for the conversion of floating point numbers to integers) -#define ENABLE_INT_ON_RESET 2 // flag that causes the acquisition to trigger an interrupt when it is reset. #define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word #define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word @@ -304,9 +303,8 @@ void Fpga_Acquisition::close_device() void Fpga_Acquisition::reset_acquisition(void) { - d_map_base[8] = RESET_ACQUISITION; // writing a 2 to d_map_base[8] resets the acquisition. This causes a reset of all - // the FPGA HW modules including the multicorrelators - d_map_base[14] = ENABLE_INT_ON_RESET; // enable int on reset + d_map_base[8] = RESET_ACQUISITION; // writing a 2 to d_map_base[8] resets the acquisition. This causes a reset of all + // the FPGA HW modules including the multicorrelators } diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator.cc b/src/algorithms/tracking/libs/fpga_multicorrelator.cc index e1c9dc4b3..8299ba0ff 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator.cc +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.cc @@ -58,8 +58,6 @@ #define LOCAL_CODE_FPGA_CLEAR_ADDRESS_COUNTER 0x10000000 #define LOCAL_CODE_FPGA_ENABLE_WRITE_MEMORY 0x0C000000 #define TEST_REGISTER_TRACK_WRITEVAL 0x55AA -//#define ENABLE_TRK_INT_ON_RESET 1 /* flag that causes the tracking HW accelerator to trigger an interrupt when it is reset. It is used \ -// to avoid a potential deadlock caused by the SW waiting for an interrupt from the FPGA when the HW is reset */ #ifndef TEMP_FAILURE_RETRY #define TEMP_FAILURE_RETRY(exp) \ ({ \ @@ -283,16 +281,6 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel) { LOG(INFO) << "Test register sanity check success !"; } - - //d_map_base[INT_ON_RST_REG_ADDR] = ENABLE_TRK_INT_ON_RESET; // enable interrupts on reset to prevent deadlock - - // enable interrupts - int32_t reenable = 1; - ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_device_descriptor, reinterpret_cast(&reenable), sizeof(int32_t))); - if (nbytes != sizeof(int32_t)) - { - std::cerr << "Error launching the FPGA multicorrelator" << std::endl; - } } @@ -434,13 +422,13 @@ void Fpga_Multicorrelator_8sc::fpga_configure_signal_parameters_in_fpga(void) void Fpga_Multicorrelator_8sc::fpga_launch_multicorrelator_fpga(void) { - // // enable interrupts - // int32_t reenable = 1; - // ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_device_descriptor, reinterpret_cast(&reenable), sizeof(int32_t))); - // if (nbytes != sizeof(int32_t)) - // { - // std::cerr << "Error launching the FPGA multicorrelator" << std::endl; - // } + // enable interrupts + int32_t reenable = 1; + ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_device_descriptor, reinterpret_cast(&reenable), sizeof(int32_t))); + if (nbytes != sizeof(int32_t)) + { + std::cerr << "Error launching the FPGA multicorrelator" << std::endl; + } // writing 1 to reg 14 launches the tracking d_map_base[START_FLAG_ADDR] = 1; }