Scope
|
#include <FPGAIO6587.h>
Inherited by scope::FPGADigitalDemultiplexer, and scope::FPGAPhotonCounter.
Public Member Functions | |
FPGAIO6587 (const uint32_t &_clock_ready, const uint32_t &_clock_write_data, const uint32_t &_clock_write, const uint32_t &_xpoint_ready, const uint32_t &_clock_source, const uint32_t &_xpoint_write, const uint32_t &_commit_control, const uint32_t &_acquisition_reset_control) | |
bool | CheckIOModule (NiFpga_Session _session) |
void | WriteOnboardClockFrequency (NiFpga_Session _session, const double &_clock_freq) |
void | SetClockSource (NiFpga_Session _session, const uint8_t &_clock_source=3) |
void | InitializeAcquisition (NiFpga_Session _session) |
Protected Member Functions | |
void | ClockFrequencySetup (const double &_clock_freq) |
Protected Attributes | |
const uint32_t | onboard_clock_ready_indicator |
const uint32_t | onboard_clock_write_data_control |
const uint32_t | onboard_clock_write_control |
const uint32_t | xpoint_switch_ready_indicator |
const uint32_t | clock_source_control |
const uint32_t | xpoint_switch_write_control |
const uint32_t | commit_control |
const uint32_t | acquisition_reset_control |
std::array< uint16_t, 9 > | regndata |
FPGAStatusSafe | iostatus |
Handels the NI FlexRIO adapter module IO-6587.
Definition at line 11 of file FPGAIO6587.h.
scope::FPGAIO6587::FPGAIO6587 | ( | const uint32_t & | _clock_ready, |
const uint32_t & | _clock_write_data, | ||
const uint32_t & | _clock_write, | ||
const uint32_t & | _xpoint_ready, | ||
const uint32_t & | _clock_source, | ||
const uint32_t & | _xpoint_write, | ||
const uint32_t & | _commit_control, | ||
const uint32_t & | _acquisition_reset_control | ||
) |
[in] | _clock_ready | id of the clock_ready indicator |
[in] | _clock_write_data | id of the clock_write_data control |
[in] | _clock_write | id of the clock_write control |
[in] | _xpoint_ready | id of the xpoint_ready indicator |
[in] | _clock_source | id of the clock_source control |
[in] | _xpoint_write | id of the xpoint_write control |
[in] | _commit_control | id of the commit control |
[in] | _acquisition_reset_control | id of the acquisition_reset control |
Definition at line 8 of file FPGAIO6587.cpp.
|
protected |
Generates value for programming the Si570 clock chip.
Code translated from NI's 'Clock Frequency Setup.vi' from e.g. examples/FlexRIO/IO Modules/NI 6587/SerialGenExportClk. See also here: http://digital.ni.com/public.nsf/allkb/D8F9352F85E7FFE18625780A007A3345. See also the Si570 datasheet.
[in] | _clock_freq | the IO module adapter clock frequency (100-800 MHz), since samples are acquired with double data rate, the subsequent sampling rate is (200-1600 MHz). |
Definition at line 31 of file FPGAIO6587.cpp.
bool scope::FPGAIO6587::CheckIOModule | ( | NiFpga_Session | _session | ) |
Necessary calls at the moment not supported by NI FPGA API 12.0, see CheckIOModule.vi for what to do.
Definition at line 27 of file FPGAIO6587.cpp.
void scope::FPGAIO6587::WriteOnboardClockFrequency | ( | NiFpga_Session | _session, |
const double & | _clock_freq | ||
) |
Writes the program for the Si570 clock chip to the device.
Times out after 2 seconds and throws
[in] | _session | current handle of the connection to the FPGA |
[in] | _clock_freq | the desired clock frequency (100-800E6 Hz) |
Definition at line 67 of file FPGAIO6587.cpp.
void scope::FPGAIO6587::SetClockSource | ( | NiFpga_Session | _session, |
const uint8_t & | _clock_source = 3 |
||
) |
Possible clock sources (see SetClockSource.vi from NI examples)
.
[in] | _session | current handle of the connection to the FPGA |
[in] | _clock_source | the new clock source to use |
Definition at line 93 of file FPGAIO6587.cpp.
void scope::FPGAIO6587::InitializeAcquisition | ( | NiFpga_Session | _session | ) |
Commits the clock frequency and clock source writings and resets the IO module acquisition circuit.
After this, the IO module is good to go
[in] | _session | current handle of the connection to the FPGA |
Definition at line 116 of file FPGAIO6587.cpp.
|
protected |
the clock ready indicator on the FPGA vi
Definition at line 15 of file FPGAIO6587.h.
|
protected |
the clock write data control on the FPGA vi
Definition at line 18 of file FPGAIO6587.h.
|
protected |
the clock write control on the FPGA vi
Definition at line 21 of file FPGAIO6587.h.
|
protected |
the xpoint switch ready indicator on the FPGA vi
Definition at line 24 of file FPGAIO6587.h.
|
protected |
the clocksource control on the FPGA vi
Definition at line 27 of file FPGAIO6587.h.
|
protected |
the xpoint switch write control on the FPGA vi
Definition at line 30 of file FPGAIO6587.h.
|
protected |
the commit control on the FPGA vi
Definition at line 33 of file FPGAIO6587.h.
|
protected |
the acquisition reset control on the FPGA vi
Definition at line 36 of file FPGAIO6587.h.
|
protected |
register data for writing to the clock chip
Definition at line 39 of file FPGAIO6587.h.
|
protected |
Current status of the module.
We need the Safe (non-throwing) version here, because exceptions can crash (total computer freeze) the NI FPGA library during debug runs (probably a problem with the stack unwindinw?).
Definition at line 43 of file FPGAIO6587.h.