#!   /usr/bin/env   python
#    coding: utf8

# Copyright CERN, 2013
# Author: Matthieu Cattin (CERN)
# Licence: GPL v2 or later.
# Website: http://www.ohwr.org
# Last modifications: 8/5/2012


# IRQ controller core registers
IRQ_CONTROLLER_REGS=['IRQ controller registers', {
        'DISABLE':[0x00, 'Interrupt disable', {
                'FMC0_ACQ_TRG':[0, 'FMC 1 acquisition triggered', 0x1],
                'FMC0_ACQ_END':[1, 'FMC 1 acquisition finished', 0x1],
                'FMC1_ACQ_TRG':[2, 'FMC 2 acquisition triggered', 0x1],
                'FMC1_ACQ_END':[3, 'FMC 2 acquisition finished', 0x1],
                'RESERVED':[4, 'Reserved', 0xFFFFFFF]}],
        'ENABLE':[0x04, 'Interrupt enable', {
                'FMC0_ACQ_TRG':[0, 'FMC 1 acquisition triggered', 0x1],
                'FMC0_ACQ_END':[1, 'FMC 1 acquisition finished', 0x1],
                'FMC1_ACQ_TRG':[2, 'FMC 2 acquisition triggered', 0x1],
                'FMC1_ACQ_END':[3, 'FMC 2 acquisition finished', 0x1],
                'RESERVED':[4, 'Reserved', 0xFFFFFFF]}],
        'MASK':[0x08, 'Interrupt mask', {
                'FMC0_ACQ_TRG':[0, 'FMC 1 acquisition triggered', 0x1],
                'FMC0_ACQ_END':[1, 'FMC 1 acquisition finished', 0x1],
                'FMC1_ACQ_TRG':[2, 'FMC 2 acquisition triggered', 0x1],
                'FMC1_ACQ_END':[3, 'FMC 2 acquisition finished', 0x1],
                'RESERVED':[4, 'Reserved', 0xFFFFFFF]}],
        'STATUS':[0x0C, 'Interrupt status', {
                'FMC0_ACQ_TRG':[0, 'FMC 1 acquisition triggered', 0x1],
                'FMC0_ACQ_END':[1, 'FMC 1 acquisition finished', 0x1],
                'FMC1_ACQ_TRG':[2, 'FMC 2 acquisition triggered', 0x1],
                'FMC1_ACQ_END':[3, 'FMC 2 acquisition finished', 0x1],
                'RESERVED':[4, 'Reserved', 0xFFFFFFF]}]
        }]
