/*
  Register definitions for slave core: Time-tagging core registers

  * File           : timetag_core_regs.h
  * Author         : auto-generated by wbgen2 from timetag_core_regs.wb
  * Created        : Mon May  6 17:45:24 2013
  * Standard       : ANSI C

    THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE timetag_core_regs.wb
    DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!

*/

#ifndef __WBGEN2_REGDEFS_TIMETAG_CORE_REGS_WB
#define __WBGEN2_REGDEFS_TIMETAG_CORE_REGS_WB

#include <inttypes.h>

#if defined( __GNUC__)
#define PACKED __attribute__ ((packed))
#else
#error "Unsupported compiler?"
#endif

#ifndef __WBGEN2_MACROS_DEFINED__
#define __WBGEN2_MACROS_DEFINED__
#define WBGEN2_GEN_MASK(offset, size) (((1<<(size))-1) << (offset))
#define WBGEN2_GEN_WRITE(value, offset, size) (((value) & ((1<<(size))-1)) << (offset))
#define WBGEN2_GEN_READ(reg, offset, size) (((reg) >> (offset)) & ((1<<(size))-1))
#define WBGEN2_SIGN_EXTEND(value, bits) (((value) & (1<<bits) ? ~((1<<(bits))-1): 0 ) | (value))
#endif


/* definitions for register: Timetag seconds register */

/* definitions for register: Timetag coarse time register, system clock ticks (125MHz) */

/* definitions for register: Trigger time-tag metadata register */

/* definitions for register: Trigger time-tag seconds register */

/* definitions for register: Trigger time-tag coarse time (system clock ticks 125MHz) register */

/* definitions for register: Trigger time-tag fine time register, always 0 (used for time-tag format compatibility) */

/* definitions for register: Acquisition start time-tag metadata register */

/* definitions for register: Acquisition start time-tag seconds register */

/* definitions for register: Acquisition start time-tag coarse time (system clock ticks 125MHz) register */

/* definitions for register: Acquisition start time-tag fine time register, always 0 (used for time-tag format compatibility) */

/* definitions for register: Acquisition stop time-tag metadata register */

/* definitions for register: Acquisition stop time-tag seconds register */

/* definitions for register: Acquisition stop time-tag coarse time (system clock ticks 125MHz) register */

/* definitions for register: Acquisition stop time-tag fine time register, always 0 (used for time-tag format compatibility) */

/* definitions for register: Acquisition end time-tag metadata register */

/* definitions for register: Acquisition end time-tag seconds register */

/* definitions for register: Acquisition end time-tag coarse time (system clock ticks 125MHz) register */

/* definitions for register: Acquisition end time-tag fine time register, always 0 (used for time-tag format compatibility) */

PACKED struct TIMETAG_CORE_WB {
  /* [0x0]: REG Timetag seconds register */
  uint32_t SECONDS;
  /* [0x4]: REG Timetag coarse time register, system clock ticks (125MHz) */
  uint32_t COARSE;
  /* [0x8]: REG Trigger time-tag metadata register */
  uint32_t TRIG_TAG_META;
  /* [0xc]: REG Trigger time-tag seconds register */
  uint32_t TRIG_TAG_SECONDS;
  /* [0x10]: REG Trigger time-tag coarse time (system clock ticks 125MHz) register */
  uint32_t TRIG_TAG_COARSE;
  /* [0x14]: REG Trigger time-tag fine time register, always 0 (used for time-tag format compatibility) */
  uint32_t TRIG_TAG_FINE;
  /* [0x18]: REG Acquisition start time-tag metadata register */
  uint32_t ACQ_START_TAG_META;
  /* [0x1c]: REG Acquisition start time-tag seconds register */
  uint32_t ACQ_START_TAG_SECONDS;
  /* [0x20]: REG Acquisition start time-tag coarse time (system clock ticks 125MHz) register */
  uint32_t ACQ_START_TAG_COARSE;
  /* [0x24]: REG Acquisition start time-tag fine time register, always 0 (used for time-tag format compatibility) */
  uint32_t ACQ_START_TAG_FINE;
  /* [0x28]: REG Acquisition stop time-tag metadata register */
  uint32_t ACQ_STOP_TAG_META;
  /* [0x2c]: REG Acquisition stop time-tag seconds register */
  uint32_t ACQ_STOP_TAG_SECONDS;
  /* [0x30]: REG Acquisition stop time-tag coarse time (system clock ticks 125MHz) register */
  uint32_t ACQ_STOP_TAG_COARSE;
  /* [0x34]: REG Acquisition stop time-tag fine time register, always 0 (used for time-tag format compatibility) */
  uint32_t ACQ_STOP_TAG_FINE;
  /* [0x38]: REG Acquisition end time-tag metadata register */
  uint32_t ACQ_END_TAG_META;
  /* [0x3c]: REG Acquisition end time-tag seconds register */
  uint32_t ACQ_END_TAG_SECONDS;
  /* [0x40]: REG Acquisition end time-tag coarse time (system clock ticks 125MHz) register */
  uint32_t ACQ_END_TAG_COARSE;
  /* [0x44]: REG Acquisition end time-tag fine time register, always 0 (used for time-tag format compatibility) */
  uint32_t ACQ_END_TAG_FINE;
};

#endif
