Scope
scope::FPGAAnalogDemultiplexerResonance Class Reference

#include <FPGAAnalogDemultiplexerResonance.h>

Inherits scope::FPGAInterface, and scope::FPGAIO5771.

Public Member Functions

 FPGAAnalogDemultiplexerResonance ()
 
 ~FPGAAnalogDemultiplexerResonance ()
 
void Initialize (parameters::InputsFPGA *_parameters) override
 
double SetPixeltime (const uint32_t &_area, const double &_pixeltime) override
 
double SetLinetime (const uint32_t &_area, const double &_linetime) override
 
void SetTriggering (const bool &_waitfortrigger) override
 
void SetContinuousAcquisition (const bool &_cont) override
 
void SetRequestedPixels (const uint32_t &_area, const uint32_t &_reqpixels) override
 
void StartAcquisition () override
 
void StopAcquisition () override
 
int32_t ReadPixels (DaqChunk &_chunk, const double &_timeout, bool &_timedout) override
 
void CheckFPGADiagnosis ()
 
void SetChannelProps ()
 
void ClearFIFOs ()
 
- Public Member Functions inherited from scope::FPGAInterface
virtual ~FPGAInterface ()
 
virtual void SetScannerdelay (const uint32_t &_scannerdelay)
 
FPGAStatusSafe CurrentStatus () const
 
- Public Member Functions inherited from scope::FPGAIO5771
 FPGAIO5771 (const uint32_t &_user_command_idle, const uint32_t &_pll_locked, const uint32_t &_configured, const uint32_t &_user_error, const uint32_t &_user_command_status, const uint32_t &_user_command_control, const uint32_t &_user_data_0_control, const uint32_t &_user_data_1_control, const uint32_t &_user_command_commit)
 
void SetClockSource (NiFpga_Session _session, const uint8_t &_clock_source=0)
 
bool CheckIOModule (NiFpga_Session _session)
 

Protected Attributes

parameters::InputsFPGAAnalogDemultiplexerparameters
 
std::array< NiFpga_AnalogDemultiplexer_NI5771_Resonance_TargetToHostFifoU64, 2 > fifos
 
std::array< NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU32, 2 > reqpixels
 
NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU16 smplsperpixel
 
- Protected Attributes inherited from scope::FPGAInterface
FPGAStatusSafe status
 
NiFpga_Session session
 
bool initialized
 
- Protected Attributes inherited from scope::FPGAIO5771
const uint32_t user_command_idle_indicator
 
const uint32_t pll_locked_indicator
 
const uint32_t configured_indicator
 
const uint32_t user_error_indicator
 
const uint32_t user_command_status_indicator
 
const uint32_t user_command_control
 
const uint32_t user_data_0_control
 
const uint32_t user_data_1_control
 
const uint32_t user_command_commit_control
 
FPGAStatusSafe iostatus
 

Additional Inherited Members

- Protected Member Functions inherited from scope::FPGAIO5771
void WaitForIdle (NiFpga_Session _session)
 

Detailed Description

Wraps an FPGA that does two area demultiplexing and analog integration with the NI 5771 FlexRio adapter module on the NI 7962R FPGA.

Definition at line 18 of file FPGAAnalogDemultiplexerResonance.h.

Constructor & Destructor Documentation

scope::FPGAAnalogDemultiplexerResonance::FPGAAnalogDemultiplexerResonance ( )

Load the FPGA bitfile, set the IO module's onboard clock and initialize the acquisition.

Definition at line 8 of file FPGAAnalogDemultiplexerResonance.cpp.

scope::FPGAAnalogDemultiplexerResonance::~FPGAAnalogDemultiplexerResonance ( void  )

Close FPGA session.

Definition at line 47 of file FPGAAnalogDemultiplexerResonance.cpp.

Member Function Documentation

void scope::FPGAAnalogDemultiplexerResonance::Initialize ( parameters::InputsFPGA _parameters)
overridevirtual

Set initial parameters.

Derived classes override this and cast _parameters to the appropriate derived type. Derived functions should check if already initialized.

Reimplemented from scope::FPGAInterface.

Definition at line 53 of file FPGAAnalogDemultiplexerResonance.cpp.

double scope::FPGAAnalogDemultiplexerResonance::SetPixeltime ( const uint32_t &  _area,
const double &  _pixeltime 
)
overridevirtual

Sets the time per pixel/dwell time (in seconds)

Parameters
[in]_areafor which area
[in]_pixeltimethe pixel dwell time in seconds
Returns
the actual pixel dwell time, can be different than requested due to finite clock rate

Reimplemented from scope::FPGAInterface.

Definition at line 69 of file FPGAAnalogDemultiplexerResonance.cpp.

double scope::FPGAAnalogDemultiplexerResonance::SetLinetime ( const uint32_t &  _area,
const double &  _linetime 
)
overridevirtual

Sets the time per line (in seconds) for the generation of the line clock (if implemented)

Parameters
[in]_areafor which area
[in]_linetimethe line time in seconds
Returns
the actual line time, can be different than requested due to finite clock rate

Reimplemented from scope::FPGAInterface.

Definition at line 86 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::SetTriggering ( const bool &  _waitfortrigger)
overridevirtual

Sets if the FPGA should wait for a trigger before starting acquisition.

Parameters
[in]_waitfortriggertrue if wait for trigger

Reimplemented from scope::FPGAInterface.

Definition at line 91 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::SetContinuousAcquisition ( const bool &  _cont)
overridevirtual

Sets if the FPGA should acquire data continuously or acquire the number of pixels per channel set with SetRequestedPixels.

Parameters
[in]_contyes or no

Reimplemented from scope::FPGAInterface.

Definition at line 95 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::SetRequestedPixels ( const uint32_t &  _area,
const uint32_t &  _reqpixels 
)
overridevirtual

Sets the number of pixels per channel the FPGA should acquire, set to -1 for live scanning.

Parameters
[in]_areafor which area
[in]_reqpixelsnumber of pixels the FPGA should acquire before automatically stopping acquisition

Reimplemented from scope::FPGAInterface.

Definition at line 99 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::StartAcquisition ( )
overridevirtual

Starts the acquisition on the FPGA.

Reimplemented from scope::FPGAInterface.

Definition at line 104 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::StopAcquisition ( )
overridevirtual

Stops the acquisition on the FPGA.

Reimplemented from scope::FPGAInterface.

Definition at line 116 of file FPGAAnalogDemultiplexerResonance.cpp.

int32_t scope::FPGAAnalogDemultiplexerResonance::ReadPixels ( DaqChunk _chunk,
const double &  _timeout,
bool &  _timedout 
)
overridevirtual

Read only pixels from the FPGA FIFO.

Parameters
[in,out]_chunkthe daq chunk to read into, inside _chunk is information about the area for wich to retrieve, the number of pixels per channel to read, and the number of channels
[in]_timeouttime out for reading in seconds
[out]_timedoutset to true if reading timed out
Returns
number of read pixels per channel or -1 on error
Precondition
_channels > 0 && _channels <= 2

Implements scope::FPGAInterface.

Definition at line 121 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::CheckFPGADiagnosis ( )

Checks the status of the FIFOs on the FPGA.

Definition at line 191 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::SetChannelProps ( )

Set channel properties as baseline cutoff and bitshift.

Definition at line 183 of file FPGAAnalogDemultiplexerResonance.cpp.

void scope::FPGAAnalogDemultiplexerResonance::ClearFIFOs ( )

Clears the interloop and ToHost FIFOs.

Definition at line 208 of file FPGAAnalogDemultiplexerResonance.cpp.

Member Data Documentation

parameters::InputsFPGAAnalogDemultiplexer* scope::FPGAAnalogDemultiplexerResonance::parameters
protected

the parameter set

Definition at line 24 of file FPGAAnalogDemultiplexerResonance.h.

std::array<NiFpga_AnalogDemultiplexer_NI5771_Resonance_TargetToHostFifoU64, 2> scope::FPGAAnalogDemultiplexerResonance::fifos
protected

all FIFOs for both areas

Definition at line 27 of file FPGAAnalogDemultiplexerResonance.h.

std::array<NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU32, 2> scope::FPGAAnalogDemultiplexerResonance::reqpixels
protected

requested pixels for both areas

Definition at line 30 of file FPGAAnalogDemultiplexerResonance.h.

NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU16 scope::FPGAAnalogDemultiplexerResonance::smplsperpixel
protected

samples per pixel for both areas

Definition at line 33 of file FPGAAnalogDemultiplexerResonance.h.


The documentation for this class was generated from the following files: