Skip to content

JeffersonLab/vld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VME LED Driver library

How to use

  • For use with JLab compiled gefvme kernel driver.

jvme

compilation

  • with the environment defined from the jvme install (LINUXVME_LIB, LINUXVME_INC) build and install the library
    make install
        

test program

  • In the test directory, there’s a program to show the status of a VLD at a specified slot
  • compile with
    cd test
    make
        
  • execute
    ./vldStatus <slotnumber>
        

William’s examples

  • The examples VLDtest5, VLDtest6, VLDtest7, cited in the VLD Manual, were ported for use with this library
    • VLDtest5: VLD calibration pulse shape loading
    • VLDtest6: VLD test, channel by channel calibration, and connector by connector Bleaching test
    • VLDtest7: VLD clock source switching and trigger source switching
  • compile with
    cd examples
    make
        
  • execute with
    ./VLDtest5 <slotnumber>
    ./VLDtest6 <slotnumber>
    ./VLDtest7 <slotnumber>
        

firmware update

  • The VLDtest2: VLD firmware update, was ported for use with this library.
  • compile with
    cd firmware
    make
        
  • execute with
    ./vldFirmwareUpdate <slotnumber> <firmware svf file>
        

Shared Memory and Readout Data

  • a shared memory file is created at
    /dev/shm/vld
        
  • The channel enable mask it is written to shared memory with any successful call to
    int32_t  vldSetChannelMask(int32_t id, uint32_t connector, uint32_t lochanEnableMask, uint32_t hichanEnableMask);
        
  • This data is shared memory mutex protected and is obtained using the call
    int32_t vldShmReadBlock(volatile uint32_t *data, uint32_t nwords);
        

vldShmReadBlock Data Format

Block Header

  • Type: 0x0
  • Size: 1 word
  • Description: Indicates the beginning of a block of VLD data.

pics/vld_blockheader.png

NUM_VLD:
  • Number of VLD that are readout in this block
READ_COUNT:
  • Number of times data has been read from VLD shared memory
WRITE_COUNT:
  • Number of times data has been written to VLD shared memory

Block Trailer

  • Type: 0x1
  • Size: 1 word
  • Description: Indicates the end of a block of VLD data. The data words in a block are bracketed by the block header and trailer

pics/vld_blocktrailer.png

NUM_WORDS:
  • Total number of words in block

Slot Header

  • Type: 0x2
  • Size: 1 word
  • Description: Indicates the start of a VLD slot data. NUM_CONNECTOR_WORDS provides the number of words to follow (e.g. 8 connector words for 4 connectors)

pics/vld_slotheader.png

SLOT_ID:
  • Slot ID (set by VME64x backplane)
NUM_CONNECTOR_WORDS:
  • Number of connector data words to follow (4 x 2 = current)

Connector Data

  • Type: 0x2 continuation
  • Size: 8 words (2 words per connector)
  • Description: Shows the state of the VLD channel enable mask for indicated CONNECTOR_ID, with LO_HI channel mask flag

pics/vld_connectordata.png

CONNECTOR_ID:
  • ID of VLD connector [0, 3]
LO_HI:
  • The Low (0) or High (1) 18 channels of the connector
CHANNEL_MASK:
  • Mask of channels with VLD pulse enabled

About

VME LED Driver Library

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published