##############################################################################
## This file is part of 'SLAC Firmware Standard Library'.
## 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 'SLAC Firmware Standard Library', 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 AxiXadc.yaml

AxiXadc: &AxiXadc
  name: AxiXadc
  description: AXI-Lite XADC for Xilinx 7 Series (Refer to PG091 & PG019)
  class: MMIODev
  configPrio: 1
  size: 0x800
  children:
    #########################################################
    SRR:
      at:
        offset: 0x00
      class: IntField
      name: SRR
      mode: WO
      description: Software Reset Register
    #########################################################
    SR:
      at:
        offset: 0x04
      class: IntField
      name: SR
      mode: RO
      description: Status Register
    #########################################################
    AOSR:
      at:
        offset: 0x08
      class: IntField
      name: AOSR
      mode: RO
      description: Alarm Output Status Register
    #########################################################
    CONVSTR:
      at:
        offset: 0x0C
      class: IntField
      name: CONVSTR
      mode: WO
      description: CONVST Register
    #########################################################
    SYSMONRR:
      at:
        offset: 0x10
      class: IntField
      name: SYSMONRR
      mode: WO
      description: XADC Hard Macro Reset Register
    #########################################################
    GIER:
      at:
        offset: 0x5C
      class: IntField
      name: GIER
      mode: RW
      description: Global Interrupt Enable Register
    #########################################################
    IPISR:
      at:
        offset: 0x60
      class: IntField
      name: IPISR
      mode: RO
      description: IP Interrupt Status Register
    #########################################################
    IPIER:
      at:
        offset: 0x68
      class: IntField
      name: IPIER
      mode: RW
      description: IP Interrupt Enable Register
    #########################################################
    Temperature:
      at:
        offset: 0x200
      class: IntField
      name: Temperature
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of the on-chip temperature sensor measurement is \n\
        stored in this location. The data is MSB justified in the \n16-bit register\
        \ (Read Only).  The 12 MSBs correspond to the \ntemperature sensor transfer\
        \ function shown in Figure 2-8, \npage 31 of UG480 (v1.2)\n"
    #########################################################
    VCCINT:
      at:
        offset: 0x204
      class: IntField
      name: VCCINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of the on-chip VccInt supply monitor measurement \n\
        is stored at this location. The data is MSB justified in the \n16-bit register\
        \ (Read Only). The 12 MSBs correspond to the \nsupply sensor transfer function\
        \ shown in Figure 2-9, \npage 32 of UG480 (v1.2)     \n"
    #########################################################
    VCCAUX:
      at:
        offset: 0x208
      class: IntField
      name: VCCAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of the on-chip VccAux supply monitor measurement \n\
        is stored at this location. The data is MSB justified in the \n16-bit register\
        \ (Read Only). The 12 MSBs correspond to the \nsupply sensor transfer function\
        \ shown in Figure 2-9, \npage 32 of UG480 (v1.2)\n"
    #########################################################
    VP_VN:
      at:
        offset: 0x20C
      class: IntField
      name: VP_VN
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the dedicated analog input \nchannel\
        \ is stored in this register. The data is MSB justified \nin the 16-bit register\
        \ (Read Only). The 12 MSBs correspond to the \ntransfer function shown in\
        \ Figure 2-5, page 29 or \nFigure 2-6, page 29 of UG480 (v1.2) depending on\
        \ analog input mode \nsettings.\n"
    #########################################################
    VREFP:
      at:
        offset: 0x210
      class: IntField
      name: VREFP
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the reference input VrefP is \n\
        stored in this register. The 12 MSBs correspond to the ADC \ntransfer function\
        \ shown in Figure 2-9  of UG480 (v1.2). The data is MSB \njustified in the\
        \ 16-bit register (Read Only). The supply sensor is used \nwhen measuring\
        \ VrefP.\n"
    #########################################################
    VREFN:
      at:
        offset: 0x214
      class: IntField
      name: VREFN
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the reference input VREFN is \n\
        stored in this register (Read Only). This channel is measured in bipolar \n\
        mode with a 2's complement output coding as shown in \nFigure 2-2, page 25.\
        \ By measuring in bipolar mode, small \npositive and negative at:
        offset around\
        \ 0V (VrefN) can be \nmeasured. The supply sensor is also used to measure\
        \ \nVrefN, thus 1 LSB = 3V/4096. The data is MSB justified in \nthe 16-bit\
        \ register.      \n"
    #########################################################
    VBRAM:
      at:
        offset: 0x218
      class: IntField
      name: VBRAM
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of the on-chip VccBram supply monitor measurement \n\
        is stored at this location. The data is MSB justified in the \n16-bit register\
        \ (Read Only). The 12 MSBs correspond to the \nsupply sensor transfer function\
        \ shown in Figure 2-9, \npage 32 of UG480 (v1.2)\n"
    SupplyOffset:
      at:
        offset: 0x220
      class: IntField
      name: SupplyOffset
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The calibration coefficient for the supply sensor at:
        offset \nusing\
        \ ADC A is stored at this location (Read Only).\n"
    #########################################################
    ADCOffset:
      at:
        offset: 0x224
      class: IntField
      name: ADCOffset
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The calibration coefficient for the ADC A at:
        offset is stored at\
        \ \nthis location (Read Only).\n"
    #########################################################
    GainError:
      at:
        offset: 0x228
      class: IntField
      name: GainError
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The calibration coefficient for the ADC A gain error is \nstored\
        \ at this location (Read Only).\n"
    #########################################################
    VCCPINT:
      at:
        offset: 0x234
      class: IntField
      name: VCCPINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the PS supply, VccpInt is \nstored\
        \ in this register. The 12 MSBs correspond to the ADC \ntransfer function\
        \ shown in Figure 2-9, page 32 of UG480 (v1.2). The data is \nMSB justified\
        \ in the 16-bit register (Zynq Only and Read Only).\nThe supply sensor is\
        \ used when measuring VccpInt.\n"
    #########################################################
    VCCPAUX:
      at:
        offset: 0x238
      class: IntField
      name: VCCPAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the PS supply, VccpAux is \nstored\
        \ in this register. The 12 MSBs correspond to the ADC \ntransfer function\
        \ shown in Figure 2-9, page 32 of UG480 (v1.2). The data is \nMSB justified\
        \ in the 16-bit register (Zynq Only and Read Only). \nThe supply sensor is\
        \ used when measuring VccpAux.\n"
    #########################################################
    VCCDDRO:
      at:
        offset: 0x23C
      class: IntField
      name: VCCDDRO
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The result of a conversion on the PS supply, VccpDdr is \nstored\
        \ in this register. The 12 MSBs correspond to the ADC \ntransfer function\
        \ shown in Figure 2-9, page 32 of UG480 (v1.2). The data is \nMSB justified\
        \ in the 16-bit register (Zynq Only and Read Only). \nThe supply sensor is\
        \ used when measuring VccpDdr.\n"
    #########################################################
    VAUXP_VAUXN:
      at:
        offset: 0x240
        nelms: 16
      class: IntField
      name: VAUXP_VAUXN
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "The results of the conversions on auxiliary analog input \nchannels\
        \ are stored in this register. The data is MSB \njustified in the 16-bit register\
        \ (Read Only). The 12 MSBs correspond to \nthe transfer function shown in\
        \ Figure 2-1, page 24 or \nFigure 2-2, page 25 of UG480 (v1.2) depending on\
        \ analog input mode \nsettings.\n"
    #########################################################
    MaxTemp:
      at:
        offset: 0x280
      class: IntField
      name: MaxTemp
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum temperature measurement recorded since \npower-up or the\
        \ last AxiXadc reset (Read Only).\n"
    #########################################################
    MaxVCCINT:
      at:
        offset: 0x284
      class: IntField
      name: MaxVCCINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccInt measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MaxVCCAUX:
      at:
        offset: 0x288
      class: IntField
      name: MaxVCCAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccAux measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MaxVBRAM:
      at:
        offset: 0x28C
      class: IntField
      name: MaxVBRAM
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccBram measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MinTemp:
      at:
        offset: 0x290
      class: IntField
      name: MinTemp
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum temperature measurement recorded since power-up \nor the\
        \ last AxiXadc reset (Read Only).\n"
    #########################################################
    MinVCCINT:
      at:
        offset: 0x294
      class: IntField
      name: MinVCCINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccInt measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MinVCCAUX:
      at:
        offset: 0x298
      class: IntField
      name: MinVCCAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccAux measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MinVBRAM:
      at:
        offset: 0x29C
      class: IntField
      name: MinVBRAM
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccBram measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Read Only).\n"
    #########################################################
    MaxVCCPINT:
      at:
        offset: 0x20
      class: IntField
      name: MaxVCCPINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccpInt measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    #########################################################
    MaxVCCPAUX:
      at:
        offset: 0x2A4
      class: IntField
      name: MaxVCCPAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccpAux measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    #########################################################
    MaxVCCDDRO:
      at:
        offset: 0x2A8
      class: IntField
      name: MaxVCCDDRO
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Maximum VccpDdr measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    MinVCCPINT:
      at:
        offset: 0x2B0
      class: IntField
      name: MinVCCPINT
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccpInt measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    #########################################################
    MinVCCPAUX:
      at:
        offset: 0x2B4
      class: IntField
      name: MinVCCPAUX
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccpAux measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    #########################################################
    MinVCCDDRO:
      at:
        offset: 0x2B8
      class: IntField
      name: MinVCCDDRO
      sizeBits: 12
      lsBit: 4
      mode: RO
      description: "Minimum VccpDdr measurement recorded since power-up \nor the last\
        \ AxiXadc reset (Zynq Only and Read Only).\n"
    #########################################################
    FlagRegister:
      at:
        offset: 0x2FC
      class: IntField
      name: FlagRegister
      mode: RO
      description: "This register contains general status information (Read Only). Flag Register Bits are defined in Figure 3-2 and Table 3-2 on page 37 of UG480 (v1.2)"
    #########################################################
    ConfigurationRegister:
      at:
        offset: 0x300
        nelms: 3
      class: IntField
      name: ConfigurationRegister
      mode: RW
      description: "These are AxiXadc configuration registers (see Configuration Registers (40hto 42h)) on page 39 of UG480 (v1.2)"
    #########################################################
    SequenceReg:
      at:
        offset: 0x320
        nelms: 8
      class: IntField
      name: SequenceReg
      mode: RW
      description: "These registers are used to program the channel sequencer function (see Chapter 4, AxiXadc Operating Modes) of UG480 (v1.2)"
    #########################################################
    AlarmThreshold:
      at:
        offset: 0x340
        nelms: 16
      class: IntField
      name: AlarmThreshold
      mode: RW
      description: "These are the alarm threshold registers for the AxiXadc alarm function (see Automatic Alarms, page 59) of UG480 (v1.2)"
     #########################################################
