/*
  Register definitions for slave core: 10 MHz Output Aligner Unit

  * File           : 10mhz_align_unit.h
  * Author         : auto-generated by wbgen2 from 10mhz_align_unit_wb.wb
  * Created        : Sun Sep  8 01:41:43 2019
  * Standard       : ANSI C

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

*/

#ifndef __WBGEN2_REGDEFS_10MHZ_ALIGN_UNIT_WB_WB
#define __WBGEN2_REGDEFS_10MHZ_ALIGN_UNIT_WB_WB

#ifdef __KERNEL__
#include <linux/types.h>
#else
#include <inttypes.h>
#endif

#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: Control/Status Register */

/* definitions for field: Measurement trigger in reg: Control/Status Register */
#define TAU_CSR_TRIG                          WBGEN2_GEN_MASK(0, 1)

/* definitions for field: Measurement complete in reg: Control/Status Register */
#define TAU_CSR_DONE                          WBGEN2_GEN_MASK(1, 1)

/* definitions for field: Measured offset in reg: Control/Status Register */
#define TAU_CSR_OFFSET_MASK                   WBGEN2_GEN_MASK(2, 12)
#define TAU_CSR_OFFSET_SHIFT                  2
#define TAU_CSR_OFFSET_W(value)               WBGEN2_GEN_WRITE(value, 2, 12)
#define TAU_CSR_OFFSET_R(reg)                 WBGEN2_GEN_READ(reg, 2, 12)

/* definitions for register: IDELAY Control */

/* definitions for field: Load in reg: IDELAY Control */
#define TAU_IDELAY_CR_LOAD                    WBGEN2_GEN_MASK(0, 1)

/* definitions for field: Delay Taps in reg: IDELAY Control */
#define TAU_IDELAY_CR_TAPS_MASK               WBGEN2_GEN_MASK(1, 5)
#define TAU_IDELAY_CR_TAPS_SHIFT              1
#define TAU_IDELAY_CR_TAPS_W(value)           WBGEN2_GEN_WRITE(value, 1, 5)
#define TAU_IDELAY_CR_TAPS_R(reg)             WBGEN2_GEN_READ(reg, 1, 5)

/* definitions for register: Dummy */

/* definitions for field: Load in reg: Dummy */
#define TAU_DUMMY_LOAD                        WBGEN2_GEN_MASK(0, 1)
/* [0x0]: REG Control/Status Register */
#define TAU_REG_CSR 0x00000000
/* [0x4]: REG IDELAY Control */
#define TAU_REG_IDELAY_CR 0x00000004
/* [0x8]: REG Dummy */
#define TAU_REG_DUMMY 0x00000008
#endif
