/*
  Register definitions for slave core: DDS/PLL Sync Pulse Generator Unit

  * File           : wb_dds_sync_unit.h
  * Author         : auto-generated by wbgen2 from dds_sync_unit_wb.wb
  * Created        : Sun Sep 22 19:43:55 2019
  * Standard       : ANSI C

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

*/

#ifndef __WBGEN2_REGDEFS_DDS_SYNC_UNIT_WB_WB
#define __WBGEN2_REGDEFS_DDS_SYNC_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: Trigger Sync Pulse 0 in reg: Control/Status Register */
#define DS_CSR_TRIG0                          WBGEN2_GEN_MASK(0, 1)

/* definitions for field: Trigger Sync Pulse 1 in reg: Control/Status Register */
#define DS_CSR_TRIG1                          WBGEN2_GEN_MASK(1, 1)

/* definitions for field: Trigger Sync Pulse 2 in reg: Control/Status Register */
#define DS_CSR_TRIG2                          WBGEN2_GEN_MASK(2, 1)

/* definitions for field: Trigger Sync Pulse 3 in reg: Control/Status Register */
#define DS_CSR_TRIG3                          WBGEN2_GEN_MASK(3, 1)

/* definitions for field: Trigger Sync Pulse 4 in reg: Control/Status Register */
#define DS_CSR_TRIG4                          WBGEN2_GEN_MASK(4, 1)

/* definitions for field: Trigger Sync Pulse 5 in reg: Control/Status Register */
#define DS_CSR_TRIG5                          WBGEN2_GEN_MASK(5, 1)

/* definitions for field: Trigger Sync Pulse 6 in reg: Control/Status Register */
#define DS_CSR_TRIG6                          WBGEN2_GEN_MASK(6, 1)

/* definitions for field: Trigger Sync Pulse 7 in reg: Control/Status Register */
#define DS_CSR_TRIG7                          WBGEN2_GEN_MASK(7, 1)

/* definitions for field: Immediately Force Sync Pulse 0 in reg: Control/Status Register */
#define DS_CSR_FORCE0                         WBGEN2_GEN_MASK(8, 1)

/* definitions for field: Immediately Force Sync Pulse 1 in reg: Control/Status Register */
#define DS_CSR_FORCE1                         WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Immediately Force Sync Pulse 2 in reg: Control/Status Register */
#define DS_CSR_FORCE2                         WBGEN2_GEN_MASK(10, 1)

/* definitions for field: Immediately Force Sync Pulse 3 in reg: Control/Status Register */
#define DS_CSR_FORCE3                         WBGEN2_GEN_MASK(11, 1)

/* definitions for field: Immediately Force Sync Pulse 4 in reg: Control/Status Register */
#define DS_CSR_FORCE4                         WBGEN2_GEN_MASK(12, 1)

/* definitions for field: Immediately Force Sync Pulse 5 in reg: Control/Status Register */
#define DS_CSR_FORCE5                         WBGEN2_GEN_MASK(13, 1)

/* definitions for field: Sync Pulse Ready in reg: Control/Status Register */
#define DS_CSR_READY_MASK                     WBGEN2_GEN_MASK(14, 6)
#define DS_CSR_READY_SHIFT                    14
#define DS_CSR_READY_W(value)                 WBGEN2_GEN_WRITE(value, 14, 6)
#define DS_CSR_READY_R(reg)                   WBGEN2_GEN_READ(reg, 14, 6)

/* definitions for field: PLL Reset in reg: Control/Status Register */
#define DS_CSR_PLL_RST                        WBGEN2_GEN_MASK(20, 1)

/* definitions for register: Output 0 Control */

/* definitions for field: WR PPS offset in reg: Output 0 Control */
#define DS_OCR0_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR0_PPS_OFFS_SHIFT                0
#define DS_OCR0_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR0_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 0 Control */
#define DS_OCR0_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR0_FINE_SHIFT                    4
#define DS_OCR0_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR0_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 0 Control */
#define DS_OCR0_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 0 Control */
#define DS_OCR0_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR0_MASK_SHIFT                    10
#define DS_OCR0_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR0_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 0 Control */
#define DS_OCR0_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 1 Control */

/* definitions for field: WR PPS offset in reg: Output 1 Control */
#define DS_OCR1_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR1_PPS_OFFS_SHIFT                0
#define DS_OCR1_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR1_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 1 Control */
#define DS_OCR1_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR1_FINE_SHIFT                    4
#define DS_OCR1_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR1_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 1 Control */
#define DS_OCR1_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 1 Control */
#define DS_OCR1_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR1_MASK_SHIFT                    10
#define DS_OCR1_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR1_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 1 Control */
#define DS_OCR1_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 2 Control */

/* definitions for field: WR PPS offset in reg: Output 2 Control */
#define DS_OCR2_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR2_PPS_OFFS_SHIFT                0
#define DS_OCR2_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR2_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 2 Control */
#define DS_OCR2_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR2_FINE_SHIFT                    4
#define DS_OCR2_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR2_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 2 Control */
#define DS_OCR2_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 2 Control */
#define DS_OCR2_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR2_MASK_SHIFT                    10
#define DS_OCR2_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR2_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 2 Control */
#define DS_OCR2_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 3 Control */

/* definitions for field: WR PPS offset in reg: Output 3 Control */
#define DS_OCR3_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR3_PPS_OFFS_SHIFT                0
#define DS_OCR3_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR3_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 3 Control */
#define DS_OCR3_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR3_FINE_SHIFT                    4
#define DS_OCR3_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR3_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 3 Control */
#define DS_OCR3_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 3 Control */
#define DS_OCR3_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR3_MASK_SHIFT                    10
#define DS_OCR3_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR3_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 3 Control */
#define DS_OCR3_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 4 Control */

/* definitions for field: WR PPS offset in reg: Output 4 Control */
#define DS_OCR4_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR4_PPS_OFFS_SHIFT                0
#define DS_OCR4_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR4_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 4 Control */
#define DS_OCR4_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR4_FINE_SHIFT                    4
#define DS_OCR4_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR4_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 4 Control */
#define DS_OCR4_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 4 Control */
#define DS_OCR4_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR4_MASK_SHIFT                    10
#define DS_OCR4_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR4_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 4 Control */
#define DS_OCR4_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 5 Control */

/* definitions for field: WR PPS offset in reg: Output 5 Control */
#define DS_OCR5_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR5_PPS_OFFS_SHIFT                0
#define DS_OCR5_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR5_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 5 Control */
#define DS_OCR5_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR5_FINE_SHIFT                    4
#define DS_OCR5_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR5_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 5 Control */
#define DS_OCR5_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 5 Control */
#define DS_OCR5_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR5_MASK_SHIFT                    10
#define DS_OCR5_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR5_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 5 Control */
#define DS_OCR5_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 6 Control */

/* definitions for field: WR PPS offset in reg: Output 6 Control */
#define DS_OCR6_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR6_PPS_OFFS_SHIFT                0
#define DS_OCR6_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR6_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 6 Control */
#define DS_OCR6_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR6_FINE_SHIFT                    4
#define DS_OCR6_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR6_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 6 Control */
#define DS_OCR6_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 6 Control */
#define DS_OCR6_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR6_MASK_SHIFT                    10
#define DS_OCR6_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR6_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 6 Control */
#define DS_OCR6_CONT                          WBGEN2_GEN_MASK(18, 1)

/* definitions for register: Output 7 Control */

/* definitions for field: WR PPS offset in reg: Output 7 Control */
#define DS_OCR7_PPS_OFFS_MASK                 WBGEN2_GEN_MASK(0, 4)
#define DS_OCR7_PPS_OFFS_SHIFT                0
#define DS_OCR7_PPS_OFFS_W(value)             WBGEN2_GEN_WRITE(value, 0, 4)
#define DS_OCR7_PPS_OFFS_R(reg)               WBGEN2_GEN_READ(reg, 0, 4)

/* definitions for field: Fine delay adjust in reg: Output 7 Control */
#define DS_OCR7_FINE_MASK                     WBGEN2_GEN_MASK(4, 5)
#define DS_OCR7_FINE_SHIFT                    4
#define DS_OCR7_FINE_W(value)                 WBGEN2_GEN_WRITE(value, 4, 5)
#define DS_OCR7_FINE_R(reg)                   WBGEN2_GEN_READ(reg, 4, 5)

/* definitions for field: Polarity in reg: Output 7 Control */
#define DS_OCR7_POL                           WBGEN2_GEN_MASK(9, 1)

/* definitions for field: Serdes Bitmask in reg: Output 7 Control */
#define DS_OCR7_MASK_MASK                     WBGEN2_GEN_MASK(10, 8)
#define DS_OCR7_MASK_SHIFT                    10
#define DS_OCR7_MASK_W(value)                 WBGEN2_GEN_WRITE(value, 10, 8)
#define DS_OCR7_MASK_R(reg)                   WBGEN2_GEN_READ(reg, 10, 8)

/* definitions for field: Continuous mode select in reg: Output 7 Control */
#define DS_OCR7_CONT                          WBGEN2_GEN_MASK(18, 1)
/* [0x0]: REG Control/Status Register */
#define DS_REG_CSR 0x00000000
/* [0x4]: REG Output 0 Control */
#define DS_REG_OCR0 0x00000004
/* [0x8]: REG Output 1 Control */
#define DS_REG_OCR1 0x00000008
/* [0xc]: REG Output 2 Control */
#define DS_REG_OCR2 0x0000000c
/* [0x10]: REG Output 3 Control */
#define DS_REG_OCR3 0x00000010
/* [0x14]: REG Output 4 Control */
#define DS_REG_OCR4 0x00000014
/* [0x18]: REG Output 5 Control */
#define DS_REG_OCR5 0x00000018
/* [0x1c]: REG Output 6 Control */
#define DS_REG_OCR6 0x0000001c
/* [0x20]: REG Output 7 Control */
#define DS_REG_OCR7 0x00000020
#endif
