Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CSIS3300 Class Reference

#include <sis3300.h>

List of all members.

Public Types

enum  _ClockSource {
  Internal100Mhz = 0, Internal50Mhz = 1, Internal25Mhz = 2, Internal12_5Mhz = 3,
  Internal6_25Mhz = 4, Internal3_125Mhz = 5, ExternalFp = 6, ExternalP2 = 7
}
enum  _SampleSize {
  Sample128K = 0, Sample16K = 1, Sample4K = 2, Sample2K = 3,
  Sample1K = 4, Sample512 = 5, Sample256 = 6, Sample128 = 7
}

Public Methods

 CSIS3300 (unsigned long nBaseAddress)
 ~CSIS3300 ()
volatile unsigned long * getModuleBase ()
string getModuleId () const
volatile unsigned long * getCsr ()
volatile unsigned long * getAcquisitionRegister ()
volatile unsigned long * getResetKeyRegister ()
volatile unsigned long * getStartKeyRegister ()
volatile unsigned long * getEventConfigRegister ()
volatile unsigned long * getStartDelayRegister ()
volatile unsigned long * getStopDelayRegister ()
volatile unsigned long * getEventDirectory ()
volatile unsigned long * getGroup1Pointer ()
volatile unsigned long * getGroup2Pointer ()
volatile unsigned long * getGroup3Pointer ()
volatile unsigned long * getGroup4Pointer ()
void SetClock (ClockSource eSource)
void SetStartDelay (bool Enable=false, unsigned int nClocks=0)
void SetStopDelay (bool Enable=false, unsigned int nClocks=0)
void GateMode (bool Enable=false)
void TriggerOnStop (bool Enable=true)
void SetSampleSize (SampleSize eSamples)
void EnableWrap (bool Enable=true)
void SetThresholds (bool *pLessThan, unsigned int *pValues)
enum CSIS3300::ClockSource getCurrentClockSource ()
bool isStartDelayEnabled ()
unsigned int getStartDelayClocks ()
bool isStopDelayEnabled ()
unsigned int getStopDelayClocks ()
unsigned int getThresholdValue (unsigned int channel) const
bool isLtThreshold (unsigned int channel) const
void InitDaq ()
void StartSampling ()
void WaitUntilDone ()
unsigned int ReadGroup1 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup2 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup3 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup4 (DAQWordBufferPtr &pBuffer)
unsigned int ReadAllGroups (DAQWordBufferPtr &pBuffer)
void ClearDaq ()

Public Attributes

enum CSIS3300::_ClockSource ClockSource
 the enum values match the bit field values.

enum CSIS3300::_SampleSize SampleSize

Protected Methods

unsigned int ReadAGroup (DAQWordBufferPtr &pBuffer, volatile unsigned long *pAddressReg, volatile unsigned long *pBase)


Detailed Description

Preliminary class to setup and read the SIS3300 flash adc. Supported functions are to:

Initialize the module to work in external trigger: Start or stop mode, single event mode with specified Clock source and sample size, and pre/post trigger delays.

This class does not support ADC thresholds, or multievent mode but they can be added later.


Constructor & Destructor Documentation

CSIS3300::CSIS3300 unsigned long nBaseAddress
 

Constructs an object which provides access to the SIS3300. The initial configuration of the module will be:

  • Clock source: Internal 100Mhz
  • Start/stop delay disabled
  • Gate mode disabled
  • Start is trigger
  • Acquisition size is 128K
  • Page wrap disabled.
Parameters:
nBaseAddress   - The VME base address of the module.

CSIS3300::~CSIS3300
 

Destroys the current sis3300. We do the following: 1. munmap 2. Ask the driver to forget the map.


Member Function Documentation

void CSIS3300::ClearDaq
 

Clears the Module. This case that means re-enabling the Bank 1 sampling bit in the DAQ register.

void CSIS3300::EnableWrap bool Enable = true
 

Enable the page wrap. In page wrap mode, there is no implied stop when an event page is full. The event just wraps around to the start of the event in the event buffer. This is used in post trigger mode: In that mode, you manually start acquisition and let the samples come in until the delayed stop stops acquisition. At that time the module contains a set of points prior to and after the actual stop time.

Parameters:
Enable   [true] - If true enables the wrap, if false, disables.

void CSIS3300::GateMode bool Enable = false
 

Enables or disables gate mode. In gate mode, the module will start on the falling edge of Start and stop on the rising edge. Note that the pre-post trigger modes are pretty useless in gatemode.

Parameters:
Enable   [false] - If true gate mode is enabled.

void CSIS3300::InitDaq
 

Initializes the data module for data acquisition. Until this member is called, none of the modules registeres have been touched. This member examines the member data and programs the module accordingly.

unsigned int CSIS3300::ReadAGroup DAQWordBufferPtr & pBuffer,
volatile unsigned long * pAddressReg,
volatile unsigned long * pBase
[protected]
 

Utility function to read a Group. The data for a group is in a circular buffer. The address register indexes just past the end of the event. Our job is to compute the location of the star of the event and read the entire event. In general, the event comes in two chunks. A part from the start of the event to the end of the memory, and a part from the beginning of the event memory to the event pointer -1.

Parameters:
pBuffer   - Points to the target buffer.
pAddressReg   - Pointer to the address index register.
pBase   - Pointer to the start of event memory.

Note:
  • Event memory can only be read as longwords, but the event buffer is a word buffer
  • The event pointer will be updated to reflect the words read in..
Returns the number of words read. This is the event size * sizeof(long)/sizeof(word)

unsigned int CSIS3300::ReadAllGroups DAQWordBufferPtr & pBuffer
 

Reads all data groups. The groups are read in numerical order. Note that within each group, the adc's are interspersed as they are in the event memory.

Parameters:
pBuffer   - a DAQWordBufferPtr passed by reference which describes where the data should be stored.

Note:
pBuffer is updated to reflect the data read in.

Returns:
The number of words read is returned.

unsigned int CSIS3300::ReadGroup1 DAQWordBufferPtr & pBuffer
 

Read the first group of adc's This comprises channel 0, 1

Parameters:
pBuffer   - A DAQWordBufferPtr which points to the buffer.

Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

unsigned int CSIS3300::ReadGroup2 DAQWordBufferPtr & pBuffer
 

Read the second group of adc's This comprises channel 2,3

Parameters:
pBuffer   - A DAQWordBufferPtr which points to the buffer.

Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

unsigned int CSIS3300::ReadGroup3 DAQWordBufferPtr & pBuffer
 

Read the third group of adc's This comprises channel 4,5

Parameters:
pBuffer   - A DAQWordBufferPtr which points to the buffer.

Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

unsigned int CSIS3300::ReadGroup4 DAQWordBufferPtr & pBuffer
 

Read the fourth group of adc's This comprises channel 6,7

Parameters:
pBuffer   - A DAQWordBufferPtr which points to the buffer.

Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

void CSIS3300::SetClock ClockSource eClock
 

Sets the clock sourc. The clock source is determined by the enumerator: ClockSource It can be a range of internal frequencies or it can be an external clock on the front panel or p2 connector.

Parameters:
eSource   - clock source.

void CSIS3300::SetSampleSize SampleSize ePagesize
 

Sets the number of samples in an event. This is reflected by both m_ePagessize and m_nPagesize.

Parameters:
ePagesize   - One of the possible values of the enumerator SampleSize indicating the number of samples in an event.

void CSIS3300::SetStartDelay bool Enable = false,
unsigned int nClocks = 0
 

Sets the start delay: The start pulse is first delayed by a fixed number of clock pulses before being fed to the fadc logic: This allows the adc to be operated in a pre-trigger mode (trigger comes before actual signal).

Parameters:
Enable   [false] - If true the start delay is enabled, by default, or if false, the start delay is disabled.
nClocks   [0] - Number of clocks by which to delay the delivery of the start clock.

void CSIS3300::SetStopDelay bool Enable = false,
unsigned int nClocks = 0
 

Sets the stop delay. The stop pulse is first delayed by a fixed number of clock pulses before being fed into the fadc logic. This allows the adc to be operated in a post trigger mode (trigger comes after the actual signal). To operate in post trigger mode:

  1. Set trigger on stop
  2. enable wrap
  3. Disable gate mode,
  4. Send the trigger into the stop input.
  5. set the stop delay appropriately to sample the segment of the signal you want to see.
  6. programmatically issue the start.

void CSIS3300::SetThresholds bool * pLessthan,
unsigned int * pValues
 

Sets the adc trigger thresholds. Each channel has a threshold register. If the digitized value exceeds the threshold in any channel, a trigger output is generated. This allows the ADC's to operate in free run self triggered mode. For each channel the caller must provide a flag, which if true, indicates the trigger fires for signals less than the threshold, or if false, indicates the trigger fires for signals greater than the threshold. For each channel, the caller must provide a threshold value. Note that for bipolar input adc's zero level is 0x800.

Parameters:
pLessThan   - Array of 8 flages which if true cause the corresponding channel's threshold to be a "less than" trigger.
pValues   - Array of 8 12 bit values which provide the thresholds. the top bites of each value will be discarded.

void CSIS3300::StartSampling
 

Starts sampling. This is used in stop trigger mode. In that case, sampling could be manually started and then stopped due to an external signal (e.g. posttrigger).

void CSIS3300::TriggerOnStop bool Enable = true
 

Sets the trigger mode to trigger on stop.. If enabled, the module triggers when the stop pulse occurs. This is usually only used in a post trigger mode.

Parameters:
Enabel   [true] - If true trigger on stop is used otherwise trigger on start.

void CSIS3300::WaitUntilDone
 

Waits until data taking for an event is done. This happens when the system becomes diarmed, as evidenced by the fact that the memory bank1 sample clock is no longer enabled.

enum CSIS3300::ClockSource CSIS3300::getCurrentClockSource
 

Returns the current clock source as the enumerated value.

unsigned int CSIS3300::getStartDelayClocks
 

Returns the number of clocks in the start delay.

Note:
If the start delay is disabled, this number is meaningless.

unsigned int CSIS3300::getStopDelayClocks
 

Returns the number of clocks in the stop delay.

Note:
If the stop delay is disabled, this number is meaningless.

bool CSIS3300::isStartDelayEnabled
 

Returns:

  • true if the module has start delays enabled.
  • false if start delay is disabled.

bool CSIS3300::isStopDelayEnabled
 

Returns

  • true if the module has stop delays enabled.
  • false if the stop delay is disabled.


The documentation for this class was generated from the following files:
Generated at Fri Dec 7 12:46:10 2001 for SIS3300flashadc. by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001