cvt_V792.c File Reference

V792 VME board implementation. More...

#include <memory.h>
#include <string.h>
#include "cvt_V792.h"

Go to the source code of this file.

Defines

#define V792_DATA_TYPE_MSK   0x07000000
 Data type bit masks.
#define V792_HEADER   0x02000000
 Header data type.
#define V792_EOB   0x04000000
 End of block data type.
#define V792_DATUM   0x00000000
 Datum data type.
#define V792_NOT_VALID_DATUM   0x06000000
 Not valid datum data type.
#define IS_HEADER(data)   ((data& V792_DATA_TYPE_MSK)== V792_HEADER)
 Check if Header data type.
#define IS_EOB(data)   ((data& V792_DATA_TYPE_MSK)== V792_EOB)
 Check if End of block data type.
#define IS_DATUM(data)   ((data& V792_DATA_TYPE_MSK)== V792_DATUM)
 Check if Datum data type.
#define IS_NOT_VALID_DATUM(data)   ((data& V792_DATA_TYPE_MSK)== V792_NOT_VALID_DATUM)
 Check if Not valid datum data type.
#define GET_CH_COUNT(data)   ((UINT32)((((UINT32)data)>> 8)& 0x0000003f))
#define GET_EVENT_COUNT(data)   ((UINT32)(((UINT32)data)& 0x00ffffff))

Functions

BOOL cvt_V792_open (cvt_V792_data *p_data, UINT16 base_address, long vme_handle, CVT_V792_TYPES type)
 V792 VME boards data initialization.
BOOL cvt_V792_close (cvt_V792_data *p_data)
 V792 VME boards closing and resource free.
BOOL cvt_V792_set_geo_address (cvt_V792_data *p_data, UINT8 value)
 Sets the geographical address.
BOOL cvt_V792_get_geo_address (cvt_V792_data *p_data, UINT8 *p_value)
 Gets the geographical address.
BOOL cvt_V792_set_MCST_CBLT_address (cvt_V792_data *p_data, UINT8 value)
 Sets the MCST\CBLT address.
BOOL cvt_V792_get_MCST_CBLT_address (cvt_V792_data *p_data, UINT8 *p_value)
 Gets the MCST\CBLT address.
BOOL cvt_V792_set_bit_set_1 (cvt_V792_data *p_data, UINT16 value)
 Set the bit set 1 register.
BOOL cvt_V792_set_bit_clear_1 (cvt_V792_data *p_data, UINT16 value)
 Set the bit clear 1 register.
BOOL cvt_V792_set_interrupt_level (cvt_V792_data *p_data, UINT8 value)
 Set the interrupt level register.
BOOL cvt_V792_get_interrupt_level (cvt_V792_data *p_data, UINT8 *p_value)
 Set the interrupt level register.
BOOL cvt_V792_set_interrupt_vector (cvt_V792_data *p_data, UINT8 value)
 Set the interrupt level register.
BOOL cvt_V792_get_interrupt_vector (cvt_V792_data *p_data, UINT8 *p_value)
 Get the interrupt vector register.
BOOL cvt_V792_get_status_1 (cvt_V792_data *p_data, UINT16 *p_value)
 Get the status 1 register.
BOOL cvt_V792_set_control_1 (cvt_V792_data *p_data, UINT16 value)
 Set to control 1 register.
BOOL cvt_V792_get_control_1 (cvt_V792_data *p_data, UINT16 *p_value)
 Get the control 1 register.
BOOL cvt_V792_set_bitmask_control_1 (cvt_V792_data *p_data, CVT_V792_CONTROL_1_MSK value)
 Set a bitmask to control 1 register.
BOOL cvt_V792_clear_bitmask_control_1 (cvt_V792_data *p_data, CVT_V792_CONTROL_1_MSK value)
 Clear a bitmask to control 1 register.
BOOL cvt_V792_set_ader_high (cvt_V792_data *p_data, UINT8 value)
 Set the address decoder high register.
BOOL cvt_V792_get_ader_high (cvt_V792_data *p_data, UINT8 *p_value)
 Get the address decoder high register.
BOOL cvt_V792_set_ader_low (cvt_V792_data *p_data, UINT8 value)
 Set the address decoder low register.
BOOL cvt_V792_get_ader_low (cvt_V792_data *p_data, UINT8 *p_value)
 Get the address decoder high register.
BOOL cvt_V792_single_shot_reset (cvt_V792_data *p_data)
 Perfoms a single shot reset.
BOOL cvt_V792_set_MCST_CBLT_control (cvt_V792_data *p_data, UINT8 value)
 Set the MCST/CBLT Control register.
BOOL cvt_V792_get_MCST_CBLT_control (cvt_V792_data *p_data, UINT8 *p_value)
 Get the MCST/CBLT Control register.
BOOL cvt_V792_set_event_trigger (cvt_V792_data *p_data, UINT8 value)
 Set the Event trigger register.
BOOL cvt_V792_get_event_trigger (cvt_V792_data *p_data, UINT8 *p_value)
 Get the Event trigger register.
BOOL cvt_V792_get_status_2 (cvt_V792_data *p_data, UINT16 *p_value)
 Get the status 1 register.
BOOL cvt_V792_set_threshold (cvt_V792_data *p_data, cvt_V792_threshold_id threshold_id, UINT16 value)
 Set the specified threshold register.
BOOL cvt_V792_set_bit_set_2 (cvt_V792_data *p_data, UINT16 value)
 Set the bit set 2 register.
BOOL cvt_V792_set_bit_clear_2 (cvt_V792_data *p_data, UINT16 value)
 Set the bit clear 2 register.
BOOL cvt_V792_set_sliding_scale (cvt_V792_data *p_data, BOOL enable, UINT8 sliding_constant)
 Setups the sliding scale feature.
BOOL cvt_V792_set_zero_suppression (cvt_V792_data *p_data, BOOL enable, BOOL step_threshold, const UINT16 *thresholds_buff)
 Setups the zero suppression feature.
BOOL cvt_V792_set_overflow_suppression (cvt_V792_data *p_data, BOOL enable)
 Setups the overflow suppression feature.
BOOL cvt_V792_set_MEB (cvt_V792_data *p_data, BOOL empty_enable, BOOL auto_incr_enable)
 Setups the Multiple Event Buffer.
BOOL cvt_V792_set_event_counter (cvt_V792_data *p_data, BOOL count_all_events, BOOL reset_count)
 Setups the event counter.
BOOL cvt_V792_read_MEB (cvt_V792_data *p_data, void *p_buff, UINT32 *p_buff_size)
 Reads data from Multiple event buffer and stores to user buffer.
BOOL cvt_V792_set_fast_clear_window (cvt_V792_data *p_data, UINT16 value)
 Set the fast clear window register.
BOOL cvt_V792_set_acquisition_mode (cvt_V792_data *p_data, BOOL sliding_scale_enable, BOOL zero_suppression_enable, BOOL overflow_suppression_enable, BOOL empty_enable, BOOL count_all_events)
 Setups the acquisition mode parameters.
BOOL cvt_V792_set_interrupt (cvt_V792_data *p_data, UINT8 level, UINT8 vector, UINT8 event_number)
 Setups interrupt parameters.
BOOL cvt_V792_set_readout_mode (cvt_V792_data *p_data, BOOL bus_error_enable, BOOL block_end_enable, BOOL align64_enable)
 Setups data readout mode parameters.
BOOL cvt_V792_get_status (cvt_V792_data *p_data, BOOL *p_is_data_ready, BOOL *p_is_busy, BOOL *p_is_term_on, BOOL *p_is_buffer_full)
 Gets information about board status.
BOOL cvt_V792_set_thresholds (cvt_V792_data *p_data, BOOL step_threshold, const UINT8 *thresholds_value_buff)
 Setups the thresholds.
BOOL cvt_V792_set_channel_enable (cvt_V792_data *p_data, UINT32 enable_msk)
 Sets the channel enabled mask.
BOOL cvt_V792_set_crate_number (cvt_V792_data *p_data, UINT8 crate_number)
 Setups the crate number.
BOOL cvt_V792_set_pedestal (cvt_V792_data *p_data, UINT8 value)
 Set the pedestal value.
BOOL cvt_V792_get_event_counter (cvt_V792_data *p_data, UINT32 *p_counter)
 Gets the event counter value.
BOOL cvt_V792_get_system_info (cvt_V792_data *p_data, UINT16 *p_firmware_rev, UINT8 *p_piggy_back_type, UINT16 *p_serial_number)
 Gets board's system information.
BOOL cvt_V792_software_reset (cvt_V792_data *p_data)
 Performs a software reset.
BOOL cvt_V792_data_clear (cvt_V792_data *p_data)
 Performs a data clear.
BOOL cvt_V792_peek_event (cvt_V792_data *p_data, UINT32 *out_buff, long *p_out_buff_size, UINT32 *p_event_count)
 Tries to peek (i.e. copy but not removing) an event from queue and save data to output buffer.
BOOL cvt_V792_inqueue (cvt_V792_data *p_data, const UINT32 *in_buff, UINT32 in_buff_size)
 Tries to put in_buff_size data word to queue.
BOOL cvt_V792_dequeue (cvt_V792_data *p_data, UINT32 *out_buff, UINT32 out_buff_size)
 Tries to get out_buff_size data word from the queue.
long cvt_V792_get_queue_free (cvt_V792_data *p_data)
 Gets the number of free queue space (words).
long cvt_V792_get_queue_length (cvt_V792_data *p_data)
 Gets the queue length.
BOOL cvt_V792_set_MCST_CBLT (cvt_V792_data *p_data, UINT8 address, MCST_CBLT_board_pos pos)
 Setups MCST/CBLT parameters this board.


Detailed Description

V792 VME board implementation.

Author:
NDA
Version:
1.0
Date:
03/2006
Provides methods, properties and defines to handle with V792 VME boards

Definition in file cvt_V792.c.


Define Documentation

#define GET_CH_COUNT data   )     ((UINT32)((((UINT32)data)>> 8)& 0x0000003f))
 

Get the number of data channels into this event:

Warning:
Due to V792 bugged firmware this may not be correct !!!

Definition at line 38 of file cvt_V792.c.

#define GET_EVENT_COUNT data   )     ((UINT32)(((UINT32)data)& 0x00ffffff))
 

Get the event counter of this event

Definition at line 39 of file cvt_V792.c.


Function Documentation

BOOL cvt_V792_clear_bitmask_control_1 cvt_V792_data p_data,
CVT_V792_CONTROL_1_MSK  value
 

Clear a bitmask to control 1 register.

Clears the bits of the bitmask into the register. The inverted bitmask is ANDed to the actual regiter content

Parameters:
p_data Pointer to board data
value The bitmask to clear: may be a combination of CVT_V792_CONTROL_1_MSK bitmask
Returns:
TRUE: Procedure successfully executed
See also:
CVT_V792_CONTROL_1_MSK

Definition at line 433 of file cvt_V792.c.

References cvt_clear_bitmask(), CVT_V792_CONTROL_1_ADD, CVT_V792_CONTROL_1_AM, CVT_V792_CONTROL_1_DATA_SIZE, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_close cvt_V792_data p_data  ) 
 

V792 VME boards closing and resource free.

Provides specific handling for V792 boards closing.

Parameters:
p_data Pointer to board data
Returns:
TRUE: board successfully closed
Note:
Must be called when done with any other board specific API.

Definition at line 188 of file cvt_V792.c.

References cvt_board_close(), FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_queue, and TRUE.

BOOL cvt_V792_data_clear cvt_V792_data p_data  ) 
 

Performs a data clear.

Pulses the CVT_V792_BSC2_CLEAR_DATA_MSK bit and clears the event counter.

Parameters:
p_data Pointer to board data
Returns:
TRUE: Procedure successfully executed
See also:
CVT_V792_BSC2_CLEAR_DATA_MSK

Definition at line 1415 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_CLEAR_DATA_MSK, CVT_V792_EVENT_COUNT_RESET_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_dequeue cvt_V792_data p_data,
UINT32 out_buff,
UINT32  out_buff_size
 

Tries to get out_buff_size data word from the queue.

Checks for queue available data words and gets data beginning from m_queue_ini. m_queue_ini will be update: if out_buff!= NULL the data will be stored into it.

Parameters:
p_data Pointer to board data
out_buff Pointer to output buffer (may be NULL)
out_buff_size Size of out_buff (UINT32)
Returns:
TRUE: data removed correctly, FALSE elsewhere (e.g. queue underflow)

Definition at line 1584 of file cvt_V792.c.

References cvt_V792_get_queue_length(), CVT_V792_QUEUE_SIZE_DWORD, FALSE, cvt_V792_data::m_queue, cvt_V792_data::m_queue_ini, and TRUE.

Referenced by cvt_V792_peek_event().

BOOL cvt_V792_get_ader_high cvt_V792_data p_data,
UINT8 p_value
 

Get the address decoder high register.

Reads the address decoder high register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 463 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_ADER_HIGH_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_ader_low cvt_V792_data p_data,
UINT8 p_value
 

Get the address decoder high register.

Reads the address decoder low register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 494 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_ADER_LOW_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_control_1 cvt_V792_data p_data,
UINT16 p_value
 

Get the control 1 register.

Reads the control 1 register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 402 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_CONTROL_1_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_event_counter cvt_V792_data p_data,
UINT32 p_counter
 

Gets the event counter value.

Gets the event counter actual value.

Parameters:
p_data Pointer to board data
p_counter Pointer to the counter value.
Returns:
TRUE: Procedure successfully executed

Definition at line 1317 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_EVENT_COUNTER_HIGH_INDEX, CVT_V792_EVENT_COUNTER_LOW_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_event_trigger cvt_V792_data p_data,
UINT8 p_value
 

Get the Event trigger register.

Reads the event trigger register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 571 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_EVENT_TRG_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_geo_address cvt_V792_data p_data,
UINT8 p_value
 

Gets the geographical address.

Reads the geographical address register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 232 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_GEO_ADDRESS_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_interrupt_level cvt_V792_data p_data,
UINT8 p_value
 

Set the interrupt level register.

Reads the interrupt level register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 324 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_INT_LEVEL_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_interrupt_vector cvt_V792_data p_data,
UINT8 p_value
 

Get the interrupt vector register.

Reads the interrupt vector register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 355 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_INT_VECTOR_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_MCST_CBLT_address cvt_V792_data p_data,
UINT8 p_value
 

Gets the MCST\CBLT address.

Reads the MCST\CBLT address register. This register contains the most significant bits of the MCST/CBLT address of the module set via VME.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 263 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_MCST_CBLT_ADDRESS_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_MCST_CBLT_control cvt_V792_data p_data,
UINT8 p_value
 

Get the MCST/CBLT Control register.

Reads the MCST/CBLT Control register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 540 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_MCST_CBLT_CTRL_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

long cvt_V792_get_queue_free cvt_V792_data p_data  ) 
 

Gets the number of free queue space (words).

Parameters:
p_data Pointer to board data
Returns:
The number of free queue space (UINT32 words)

Definition at line 1618 of file cvt_V792.c.

References CVT_V792_QUEUE_SIZE_DWORD, cvt_V792_data::m_queue_end, and cvt_V792_data::m_queue_ini.

Referenced by cvt_V792_inqueue().

long cvt_V792_get_queue_length cvt_V792_data p_data  ) 
 

Gets the queue length.

Parameters:
p_data Pointer to board data
Returns:
The queue length (UINT32 words)

Definition at line 1626 of file cvt_V792.c.

References CVT_V792_QUEUE_SIZE_DWORD, cvt_V792_data::m_queue_end, and cvt_V792_data::m_queue_ini.

Referenced by cvt_V792_dequeue().

BOOL cvt_V792_get_status cvt_V792_data p_data,
BOOL p_is_data_ready,
BOOL p_is_busy,
BOOL p_is_term_on,
BOOL p_is_buffer_full
 

Gets information about board status.

Parameters:
p_data Pointer to board data
p_is_data_ready Returns TRUE if data is ready.
p_is_busy Returns TRUE if board is busy.
p_is_term_on Returns TRUE if term bit is on.
p_is_buffer_full Returns TRUE if buffer is full.
Returns:
TRUE: Procedure successfully executed

Definition at line 1132 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_STATUS_1_INDEX, CVT_V792_STATUS_2_INDEX, CVT_V792_STS1_BUSY_MSK, CVT_V792_STS1_DREADY_MSK, CVT_V792_STS1_TERM_ON_MSK, CVT_V792_STS2_BUFFER_FULL_MSK, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_status_1 cvt_V792_data p_data,
UINT16 p_value
 

Get the status 1 register.

Reads the status 1 register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 371 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_STATUS_1_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_status_2 cvt_V792_data p_data,
UINT16 p_value
 

Get the status 1 register.

Reads the status 2 register.

Parameters:
p_data Pointer to board data
p_value The value read
Returns:
TRUE: Procedure successfully executed

Definition at line 587 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_STATUS_2_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_get_system_info cvt_V792_data p_data,
UINT16 p_firmware_rev,
UINT8 p_piggy_back_type,
UINT16 p_serial_number
 

Gets board's system information.

Reads the firmware revision register, the board type and the serial number.

Parameters:
p_data Pointer to board data
p_firmware_rev The firmare release (MSB major release, LSB minor release).
p_piggy_back_type The mounted piggy back type.
p_serial_number The serial number.
Returns:
TRUE: Procedure successfully executed

Definition at line 1342 of file cvt_V792.c.

References cvt_read_reg(), CVT_V792_FW_REV_INDEX, CVT_V792_GET_PIGGY_BACK_TYPE, CVT_V792_ROM_SERIAL_LSB_INDEX, CVT_V792_ROM_SERIAL_MSB_INDEX, CVT_V792_STATUS_2_INDEX, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_inqueue cvt_V792_data p_data,
const UINT32 in_buff,
UINT32  in_buff_size
 

Tries to put in_buff_size data word to queue.

Checks for the queue available free words and stores data beginning from m_queue_end. m_queue_end will be update

Parameters:
p_data Pointer to board data
in_buff Pointer to input buffer
in_buff_size Size of in_buff (UINT32)
Returns:
TRUE: data stored correctly FALSE elsewhere (e.g. queue overflow)

Definition at line 1556 of file cvt_V792.c.

References cvt_V792_get_queue_free(), CVT_V792_QUEUE_SIZE_DWORD, FALSE, cvt_V792_data::m_queue, cvt_V792_data::m_queue_end, and TRUE.

BOOL cvt_V792_open cvt_V792_data p_data,
UINT16  base_address,
long  vme_handle,
CVT_V792_TYPES  type
 

V792 VME boards data initialization.

< The board is V792AA or V792AC

< The board is V792NA or V792NC

Definition at line 151 of file cvt_V792.c.

References cvt_board_open(), CVT_V792_QUEUE_SIZE_DWORD, cvt_V792_set_MCST_CBLT(), CVT_V792_TYPE_A, CVT_V792_TYPE_N, FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_queue, cvt_V792_data::m_type, cvt_board_data::set_MCST_CBLT, TRACE, TRACE1, and TRUE.

BOOL cvt_V792_peek_event cvt_V792_data p_data,
UINT32 out_buff,
long *  p_out_buff_size,
UINT32 p_event_count
 

Tries to peek (i.e. copy but not removing) an event from queue and save data to output buffer.

Scans the queue beginning from m_queue_ini, searching for an event block: spurious data will be skipped. If first available event count matches requested event_count, data will be saved to output stream. If first available event count is minor than requested event_count event will be skipped and procedure repeated. If first available event count is major than requested event_count no data will be saved on out_stream (in_stream pointer not affected).

Parameters:
p_data Pointer to board data
out_buff Pointer to output buffer
p_out_buff_size Size of out_buff (UINT32). The number of data written into out_buff (UINT32) on exit.
p_event_count Requested event count. The found event count, on exit
Returns:
TRUE: some event found (even if not saved to out_stream) FALSE elsewhere
Warning:
To be compliant with other the board, event_count must be wrapper to CVT_BOARD_EVENT_COUNT_MSK+ 1
See also:
CVT_BOARD_EVENT_COUNT_MSK

Definition at line 1447 of file cvt_V792.c.

References CVT_BOARD_EVENT_COUNT_MSK, cvt_V792_dequeue(), CVT_V792_QUEUE_SIZE_DWORD, FALSE, GET_EVENT_COUNT, IS_EOB, IS_HEADER, cvt_V792_data::m_queue, cvt_V792_data::m_queue_end, cvt_V792_data::m_queue_ini, TRACE1, and TRUE.

BOOL cvt_V792_read_MEB cvt_V792_data p_data,
void *  p_buff,
UINT32 p_buff_size
 

Reads data from Multiple event buffer and stores to user buffer.

Call cvt_FIFO_BLT_read for Multiple Event Buffer and stores data into user buffer. If the returned data is just a V792 not valid datum, this is discarded.

Parameters:
p_data Pointer to board data
p_buff The target buffer: caller allocated
p_buff_size The buffer size (bytes). On exit will holds the number of bytes really read.
Returns:
TRUE: Procedure successfully executed
See also:
cvt_FIFO_BLT_read

Definition at line 960 of file cvt_V792.c.

References cvt_FIFO_BLT_read(), CVT_V792_OUT_BUFFER_ADD, CVT_V792_OUT_BUFFER_AM, CVT_V792_OUT_BUFFER_DATA_SIZE, FALSE, IS_NOT_VALID_DATUM, cvt_V792_data::m_common_data, and TRUE.

BOOL cvt_V792_set_acquisition_mode cvt_V792_data p_data,
BOOL  sliding_scale_enable,
BOOL  zero_suppression_enable,
BOOL  overflow_suppression_enable,
BOOL  empty_enable,
BOOL  count_all_events
 

Setups the acquisition mode parameters.

Setups the relevant parameters for the acquisition mode.

Parameters:
p_data Pointer to board data
sliding_scale_enable Enable/Disable the sliding scale feature.
zero_suppression_enable Enable/Disable the zero suppression feature.
overflow_suppression_enable Enable/Disable the overflow suppression feature.
empty_enable Enable/Disable empty event storing feature.
count_all_events Enable counting all triggers or accepted one only.
Returns:
TRUE: Procedure successfully executed

Definition at line 993 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_ALL_TRG_MSK, CVT_V792_BSC2_EMPTY_EN_MSK, CVT_V792_BSC2_LOW_THR_DIS_MSK, CVT_V792_BSC2_OVER_RANGE_DIS_MSK, CVT_V792_BSC2_SLIDE_EN_MSK, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_ader_high cvt_V792_data p_data,
UINT8  value
 

Set the address decoder high register.

Writes the specified value to the address decoder high register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 448 of file cvt_V792.c.

References CVT_V792_ADER_HIGH_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_ader_low cvt_V792_data p_data,
UINT8  value
 

Set the address decoder low register.

Writes the specified value to the address decoder low register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 479 of file cvt_V792.c.

References CVT_V792_ADER_LOW_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_bit_clear_1 cvt_V792_data p_data,
UINT16  value
 

Set the bit clear 1 register.

Writes the specified value to the bit clear 1 register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 294 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_1_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_bit_clear_2 cvt_V792_data p_data,
UINT16  value
 

Set the bit clear 2 register.

Writes the specified value to the bit clear 2 register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 703 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_bit_set_1 cvt_V792_data p_data,
UINT16  value
 

Set the bit set 1 register.

Writes the specified value to the bit set 1 register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 279 of file cvt_V792.c.

References CVT_V792_BIT_SET_1_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_bit_set_2 cvt_V792_data p_data,
UINT16  value
 

Set the bit set 2 register.

Writes the specified value to the bit set 2 register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 688 of file cvt_V792.c.

References CVT_V792_BIT_SET_2_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_bitmask_control_1 cvt_V792_data p_data,
CVT_V792_CONTROL_1_MSK  value
 

Set a bitmask to control 1 register.

Sets the bits of the bitmask into the register. The bitmask is ORed to the actual regiter content

Parameters:
p_data Pointer to board data
value The bitmask to set : may be a combination of CVT_V792_CONTROL_1_MSK bitmask
Returns:
TRUE: Procedure successfully executed
See also:
CVT_V792_CONTROL_1_MSK

Definition at line 418 of file cvt_V792.c.

References cvt_set_bitmask(), CVT_V792_CONTROL_1_ADD, CVT_V792_CONTROL_1_AM, CVT_V792_CONTROL_1_DATA_SIZE, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_channel_enable cvt_V792_data p_data,
UINT32  enable_msk
 

Sets the channel enabled mask.

< The board is V792AA or V792AC

< The board is V792NA or V792NC

Definition at line 1236 of file cvt_V792.c.

References cvt_clear_bitmask_reg(), CVT_V792_MAX_THRESHOLD_A, CVT_V792_MAX_THRESHOLD_N, CVT_V792_THRESHOLD_0, CVT_V792_THRESHOLD_0_INDEX, CVT_V792_THRESHOLD_KILL_MSK, CVT_V792_TYPE_A, CVT_V792_TYPE_N, FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_type, and TRACE1.

BOOL cvt_V792_set_control_1 cvt_V792_data p_data,
UINT16  value
 

Set to control 1 register.

Writes the specified value to the control 1 register.

Parameters:
p_data Pointer to board data
value The value to write
Returns:
TRUE: Procedure successfully executed
See also:
CVT_V792_CONTROL_1_MSK

Definition at line 387 of file cvt_V792.c.

References CVT_V792_CONTROL_1_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_crate_number cvt_V792_data p_data,
UINT8  crate_number
 

Setups the crate number.

Parameters:
p_data Pointer to board data
crate_number The crate number.
Returns:
TRUE: Procedure successfully executed

Definition at line 1283 of file cvt_V792.c.

References CVT_V792_CRATE_SELECT_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_event_counter cvt_V792_data p_data,
BOOL  count_all_events,
BOOL  reset_count
 

Setups the event counter.

Setups the relevant parameters for the event counter.

Parameters:
p_data Pointer to board data
count_all_events Enable counting all events or accepted ones only.
reset_count If TRUE resets the event counter.
Returns:
TRUE: Procedure successfully executed

Definition at line 918 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_ALL_TRG_MSK, CVT_V792_EVENT_COUNT_RESET_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_event_trigger cvt_V792_data p_data,
UINT8  value
 

Set the Event trigger register.

Writes the specified value to the Event trigger register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 556 of file cvt_V792.c.

References CVT_V792_EVENT_TRG_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_fast_clear_window cvt_V792_data p_data,
UINT16  value
 

Set the fast clear window register.

Writes the specified value to the fast clear window register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 978 of file cvt_V792.c.

References CVT_V792_FCLR_WND_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_geo_address cvt_V792_data p_data,
UINT8  value
 

Sets the geographical address.

Writes the geographical address register.

Parameters:
p_data Pointer to board data
value The value to write
Returns:
TRUE: Procedure successfully executed

Definition at line 217 of file cvt_V792.c.

References CVT_V792_GEO_ADDRESS_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_interrupt cvt_V792_data p_data,
UINT8  level,
UINT8  vector,
UINT8  event_number
 

Setups interrupt parameters.

Setups the relevant parameters for interrupt usage.

Parameters:
p_data Pointer to board data
level The interrupt level.
vector The interrupt vector.
event_number The number of events to get an interrupt (setting 0 interrupt feature is disabled).
Returns:
TRUE: Procedure successfully executed

Definition at line 1045 of file cvt_V792.c.

References CVT_V792_EVENT_TRG_INDEX, CVT_V792_INT_LEVEL_INDEX, CVT_V792_INT_VECTOR_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_interrupt_level cvt_V792_data p_data,
UINT8  value
 

Set the interrupt level register.

Writes the specified value to the interrupt level register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 309 of file cvt_V792.c.

References CVT_V792_INT_LEVEL_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_interrupt_vector cvt_V792_data p_data,
UINT8  value
 

Set the interrupt level register.

Writes the specified value to the interrupt vector register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 340 of file cvt_V792.c.

References CVT_V792_INT_VECTOR_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_MCST_CBLT cvt_V792_data p_data,
UINT8  address,
MCST_CBLT_board_pos  pos
 

Setups MCST/CBLT parameters this board.

Setups the relevant parameters for MCST/CBLT usage.

Parameters:
p_data Pointer to board data.
address The MCST/CBLT address.
pos The board position into the MCST / CBLT chain: it must be a MCST_CBLT_board_pos identifier
Returns:
TRUE: Procedure successfully executed
See also:
MCST_CBLT_board_pos

Definition at line 1636 of file cvt_V792.c.

References CVT_V792_MCCTRL_FIRST_BOARD_MSK, CVT_V792_MCCTRL_LAST_BOARD_MSK, CVT_V792_MCCTRL_MID_BOARD_MSK, CVT_V792_MCST_CBLT_ADDRESS_INDEX, CVT_V792_MCST_CBLT_CTRL_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, MCST_CBLT_board_pos_first, MCST_CBLT_board_pos_last, MCST_CBLT_board_pos_mid, TRACE, TRACE1, and TRUE.

Referenced by cvt_V792_open().

BOOL cvt_V792_set_MCST_CBLT_address cvt_V792_data p_data,
UINT8  value
 

Sets the MCST\CBLT address.

Writes the geographical address register. This register contains the most significant bits of the MCST/CBLT address of the module set via VME.

Parameters:
p_data Pointer to board data
value The value to write
Returns:
TRUE: Procedure successfully executed

Definition at line 248 of file cvt_V792.c.

References CVT_V792_MCST_CBLT_ADDRESS_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_MCST_CBLT_control cvt_V792_data p_data,
UINT8  value
 

Set the MCST/CBLT Control register.

Writes the specified value to the MCST/CBLT Control register.

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 525 of file cvt_V792.c.

References CVT_V792_MCST_CBLT_CTRL_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_MEB cvt_V792_data p_data,
BOOL  empty_enable,
BOOL  auto_incr_enable
 

Setups the Multiple Event Buffer.

Setups the relevant parameters for the Multiple Event Buffer.

Parameters:
p_data Pointer to board data
empty_enable Enable/disable storing events with no data (only header and EOB).
auto_incr_enable Enable/disable the event counter autoincrement feature.
Returns:
TRUE: Procedure successfully executed

Definition at line 868 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_AUTO_INC_MSK, CVT_V792_BSC2_EMPTY_EN_MSK, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_overflow_suppression cvt_V792_data p_data,
BOOL  enable
 

Setups the overflow suppression feature.

Enable/ Disable overflow suppression and setups other relevant parameters.

Parameters:
p_data Pointer to board data
enable Enable/disable the overflow suppression.
Returns:
TRUE: Procedure successfully executed

Definition at line 838 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_OVER_RANGE_DIS_MSK, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_pedestal cvt_V792_data p_data,
UINT8  value
 

Set the pedestal value.

Writes the specified value to the Iped register

Parameters:
p_data Pointer to board data
value The value to set
Returns:
TRUE: Procedure successfully executed

Definition at line 1301 of file cvt_V792.c.

References CVT_V792_IPED_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_readout_mode cvt_V792_data p_data,
BOOL  bus_error_enable,
BOOL  block_end_enable,
BOOL  align64_enable
 

Setups data readout mode parameters.

Setups the relevant parameters for data readout.

Parameters:
p_data Pointer to board data
bus_error_enable Enable bus error: the module is enabled to generate a Bus error to finish a block transfer.
block_end_enable Enable block end: the module sends all data to the CPU until the first EOB word (end of first event) is reached;
align64_enable Enable align 64: the module is enabled to add dummy word when the number of words is odd.
Returns:
TRUE: Procedure successfully executed

Definition at line 1088 of file cvt_V792.c.

References cvt_clear_bitmask_reg(), cvt_set_bitmask_reg(), CVT_V792_CONTROL_1_INDEX, CVT_V792_CTRL1_ALIGN64_MSK, CVT_V792_CTRL1_BERR_ENABLE_MSK, CVT_V792_CTRL1_BLKEND_MSK, FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_sliding_scale cvt_V792_data p_data,
BOOL  enable,
UINT8  sliding_constant
 

Setups the sliding scale feature.

Enable/ Disable sliding scale and setups other relevant parameters.

Parameters:
p_data Pointer to board data
enable Enable/disable the sliding scale
sliding_constant The sliding constant used when sliding scale is disabled.
Returns:
TRUE: Procedure successfully executed

Definition at line 724 of file cvt_V792.c.

References CVT_V792_BIT_CLEAR_2_INDEX, CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_SLIDE_EN_MSK, CVT_V792_SLIDE_CONSTANT_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_set_threshold cvt_V792_data p_data,
cvt_V792_threshold_id  threshold_id,
UINT16  value
 

Set the specified threshold register.

< The board is V792AA or V792AC

< The board is V792NA or V792NC

Definition at line 604 of file cvt_V792.c.

References CVT_V792_MAX_THRESHOLD_A, CVT_V792_MAX_THRESHOLD_N, CVT_V792_THRESHOLD_0, CVT_V792_THRESHOLD_0_INDEX, CVT_V792_THRESHOLD_ALL, CVT_V792_TYPE_A, CVT_V792_TYPE_N, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_type, and TRACE1.

BOOL cvt_V792_set_thresholds cvt_V792_data p_data,
BOOL  step_threshold,
const UINT8 thresholds_value_buff
 

Setups the thresholds.

< The board is V792AA or V792AC

< The board is V792NA or V792NC

Definition at line 1160 of file cvt_V792.c.

References cvt_clear_bitmask_reg(), cvt_set_bitmask_reg(), CVT_V792_MAX_THRESHOLD_A, CVT_V792_MAX_THRESHOLD_N, CVT_V792_THRESHOLD_0, CVT_V792_THRESHOLD_0_INDEX, CVT_V792_THRESHOLD_VALUE_MSK, CVT_V792_TYPE_A, CVT_V792_TYPE_N, FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_type, and TRACE1.

BOOL cvt_V792_set_zero_suppression cvt_V792_data p_data,
BOOL  enable,
BOOL  step_threshold,
const UINT16 thresholds_buff
 

Setups the zero suppression feature.

< The board is V792AA or V792AC

< The board is V792NA or V792NC

Definition at line 761 of file cvt_V792.c.

References CVT_V792_BIT_SET_2_INDEX, CVT_V792_BSC2_LOW_THR_DIS_MSK, CVT_V792_MAX_THRESHOLD_A, CVT_V792_MAX_THRESHOLD_N, CVT_V792_THRESHOLD_0, CVT_V792_THRESHOLD_0_INDEX, CVT_V792_TYPE_A, CVT_V792_TYPE_N, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, cvt_V792_data::m_type, TRACE, and TRACE1.

BOOL cvt_V792_single_shot_reset cvt_V792_data p_data  ) 
 

Perfoms a single shot reset.

Writes a dummy value to the single shot reset register.

Parameters:
p_data Pointer to board data
Returns:
TRUE: Procedure successfully executed
Warning:
This register must be used very carefully and for debugging purposes only. In order to reset the board, it is recommended to use the Bit Set 1 Register
See also:
cvt_V792_set_bitmask_control_1

Definition at line 510 of file cvt_V792.c.

References CVT_V792_SINGLE_SHOT_RESET_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.

BOOL cvt_V792_software_reset cvt_V792_data p_data  ) 
 

Performs a software reset.

Writes a dummy value into CVT_V792_SINGLE_SHOT_RESET register.

Parameters:
p_data Pointer to board data
Returns:
TRUE: Procedure successfully executed

Definition at line 1383 of file cvt_V792.c.

References CVT_V792_SINGLE_SHOT_RESET_INDEX, cvt_write_reg(), FALSE, cvt_V792_data::m_common_data, TRACE, and TRUE.


Generated on Wed Oct 18 12:36:56 2006 for CAEVMEToolLib by  doxygen 1.4.6-NO