##############################################################################
## This file is part of 'LCLS2 Common Carrier Core'.
## It is subject to the license terms in the LICENSE.txt file found in the 
## top-level directory of this distribution and at: 
##    https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 
## No part of 'LCLS2 Common Carrier Core', including this file, 
## may be copied, modified, propagated, or distributed except according to 
## the terms contained in the LICENSE.txt file.
##############################################################################
#schemaversion 3.0.0
#once AppMpsRegBase.yaml

AppMpsRegBase: &AppMpsRegBase
  class: MMIODev
  configPrio: 1
  description: Mps application base registers
  size: 0x10000
  children:
    mpsAppId:
      at:
        offset:     0x00
      class:        IntField
      sizeBits:     10
      lsBit:        0
      mode:         RW
      description:  Application ID
    mpsEnable:
      at:
        offset:     0x02
      class:        IntField
      sizeBits:     1
      lsBit:        0
      mode:         RW
      description:  Mps enable
    lcls1Mode:
      at:
        offset:     0x02
      class:        IntField
      sizeBits:     1
      lsBit:        1
      mode:         RW
      description:  True = LCLS1, False = LCLS2 mode
    mpsVersion:
      at:
        offset:     0x03
      class:        IntField
      sizeBits:     6
      lsBit:        0
      mode:         RW
      description:  MPS Version
    byteCount:
      at:
        offset:     0x04
      class:        IntField
      sizeBits:     8
      lsBit:        0
      mode:         RO
      description:  Number of bytes in MPS message
    digitalEn:
      at:
        offset:     0x05
      class:        IntField
      sizeBits:     1
      lsBit:        0
      mode:         RO
      description:  Application generates digital message
    beamDestMask:
      at:
        offset:     0x08
      class:        IntField
      sizeBits:     16
      lsBit:        0
      mode:         RW
      description:  One bit per destination for BPM or kicker not idle for idelEn=true
    altDestMask:
      at:
        offset:     0x0A
      class:        IntField
      sizeBits:     16
      lsBit:        0
      mode:         RW
      description:  One bit per destination for alternative table for altEn=true
    mpsMsgDropCnt:
      at:
        offset:     0x0C
      class:        IntField
      sizeBits:     32
      lsBit:        0
      mode:         RO
      description:  Mps drop message counter
    mpsMsgCount:
      at:
        offset:     0x10
      class:        IntField
      sizeBits:     32
      lsBit:        0
      mode:         RO
      description:  Mps message counter
    lastMsgAppId:
      at:
        offset:     0x14
      class:        IntField
      sizeBits:     10
      lsBit:        0
      mode:         RO
      description:  APP ID in the last message
    lastMsgLcls:
      at:
        offset:     0x15
      class:        IntField
      sizeBits:     1
      lsBit:        2
      mode:         RO
      description:  LCLS flag in the last message
    lastMsgTimeStamp:
      at:
        offset:     0x16
      class:        IntField
      sizeBits:     16
      lsBit:        0
      mode:         RO
      description:  Timestamp in the last message
    lastMsgByte:
      at:
        offset:     0x18
        nelms:      6
        stride:     1
      class:        IntField
      sizeBits:     8
      mode:         RO
      description:  Bytes from the last message