###############################################################################
#
# x86_64_cel_redstone_xp Autogeneration Definitions.
#
###############################################################################

cdefs: &cdefs
- X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_LOGGING:
    doc: "Include or exclude logging."
    default: 1
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_OPTIONS_DEFAULT:
    doc: "Default enabled log options."
    default: AIM_LOG_OPTIONS_DEFAULT
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_BITS_DEFAULT:
    doc: "Default enabled log bits."
    default: AIM_LOG_BITS_DEFAULT
- X86_64_CEL_REDSTONE_XP_CONFIG_LOG_CUSTOM_BITS_DEFAULT:
    doc: "Default enabled custom log bits."
    default: 0
- X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB:
    doc: "Default all porting macros to use the C standard libraries."
    default: 1
- X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS:
    doc: "Include standard library headers for stdlib porting macros."
    default: X86_64_CEL_REDSTONE_XP_CONFIG_PORTING_STDLIB
- X86_64_CEL_REDSTONE_XP_CONFIG_INCLUDE_UCLI:
    doc: "Include generic uCli support."
    default: 0


definitions:
  cdefs:
    X86_64_CEL_REDSTONE_XP_CONFIG_HEADER:
      defs: *cdefs
      basename: x86_64_cel_redstone_xp_config

  portingmacro:
    X86_64_CEL_REDSTONE_XP:
      macros:
        - malloc
        - free
        - memset
        - memcpy
        - strncpy
        - vsnprintf
        - snprintf
        - strlen


  enum: &enums
    cpld1_reg:
      members:
        - VERSION:               0x100
        - SCRATCH:               0x101
        - RESET_CONTROL:         0x102
        - RESET_SOURCE:          0x103
        - BOARD_TYPE:            0x104
        - INT_PORT_STATUS:       0x110
        - INT0_SOURCE_STATUS:    0x111
        - INT0_SOURCE_INT:       0x112
        - INT0_SOURCE_MASK:      0x113
        - POWER_SUPPLY_STATUS:   0x120
        - POWER_GOOD_STATUS:     0x121
        - BPP_CONTROL:           0x122
        - WRITE_PROTECT_CONTROL: 0x123
        - MISC_STATUS_CONTROL:   0x124
        - INFO_RAM_ADDR_HIGH:    0x130
        - INFO_RAM_ADDR_LOW:     0x131
        - INFO_RAM_READ_DATA:    0x132
        - INFO_RAM_WRITE_DATA:   0x133

    cpld2_reg:
      members:
        - VERSION:               0x200
        - SCRATCH:               0x201
        - I2C_PORT_ID:           0x210
        - I2C_OP_CODE:           0x211
        - I2C_DEV_ADDR:          0x212
        - I2C_CMD_BYTE0:         0x213
        - I2C_CMD_BYTE1:         0x214
        - I2C_CMD_BYTE2:         0x215
        - I2C_STATUS_RESET:      0x216

        - I2C_WRITE_DATA_BYTE0:  0x220
        - I2C_WRITE_DATA_BYTE1:  0x221
        - I2C_WRITE_DATA_BYTE2:  0x222
        - I2C_WRITE_DATA_BYTE3:  0x223
        - I2C_WRITE_DATA_BYTE4:  0x224
        - I2C_WRITE_DATA_BYTE5:  0x225
        - I2C_WRITE_DATA_BYTE6:  0x226
        - I2C_WRITE_DATA_BYTE7:  0x227

        - I2C_READ_DATA_BYTE0:   0x230
        - I2C_READ_DATA_BYTE1:   0x231
        - I2C_READ_DATA_BYTE2:   0x232
        - I2C_READ_DATA_BYTE3:   0x233
        - I2C_READ_DATA_BYTE4:   0x234
        - I2C_READ_DATA_BYTE5:   0x235
        - I2C_READ_DATA_BYTE6:   0x236
        - I2C_READ_DATA_BYTE7:   0x237

        - SFP_1_8_RX_LOS:        0x240
        - SFP_9_16_RX_LOS:       0x241
        - SFP_17_18_RX_LOS:      0x242

        - SFP_1_8_RX_LOS_INT:    0x243
        - SFP_9_16_RX_LOS_INT:   0x244
        - SFP_17_18_RX_LOS_INT:  0x245

        - SFP_1_8_RX_LOS_MASK:   0x246
        - SFP_9_16_RX_LOS_MASK:  0x247
        - SFP_17_18_RX_LOS_MASK: 0x248

        - SFP_1_8_TX_DISABLE:    0x250
        - SFP_9_16_TX_DISABLE:   0x251
        - SFP_17_18_TX_DISABLE:  0x252

        - SFP_1_8_RS_CONTROL:    0x253
        - SFP_9_16_RS_CONTROL:   0x254
        - SFP_17_18_RS_CONTROL:  0x255

        - SFP_1_8_TX_FAULT:      0x256
        - SFP_9_16_TX_FAULT:     0x257
        - SFP_17_18_TX_FAULT:    0x258

        - SFP_1_8_ABS_STATUS:    0x259
        - SFP_9_16_ABS_STATUS:   0x25A
        - SFP_17_18_ABS_STATUS:  0x25B

    cpld3_reg:
      members:
        - VERSION:               0x280
        - SCRATCH:               0x281
        - I2C_PORT_ID:           0x290
        - I2C_OP_CODE:           0x291
        - I2C_DEV_ADDR:          0x292
        - I2C_CMD_BYTE0:         0x293
        - I2C_CMD_BYTE1:         0x294
        - I2C_CMD_BYTE2:         0x295
        - I2C_STATUS_RESET:      0x296

        - I2C_WRITE_DATA_BYTE0:  0x2A0
        - I2C_WRITE_DATA_BYTE1:  0x2A1
        - I2C_WRITE_DATA_BYTE2:  0x2A2
        - I2C_WRITE_DATA_BYTE3:  0x2A3
        - I2C_WRITE_DATA_BYTE4:  0x2A4
        - I2C_WRITE_DATA_BYTE5:  0x2A5
        - I2C_WRITE_DATA_BYTE6:  0x2A6
        - I2C_WRITE_DATA_BYTE7:  0x2A7

        - I2C_READ_DATA_BYTE0:   0x2B0
        - I2C_READ_DATA_BYTE1:   0x2B1
        - I2C_READ_DATA_BYTE2:   0x2B2
        - I2C_READ_DATA_BYTE3:   0x2B3
        - I2C_READ_DATA_BYTE4:   0x2B4
        - I2C_READ_DATA_BYTE5:   0x2B5
        - I2C_READ_DATA_BYTE6:   0x2B6
        - I2C_READ_DATA_BYTE7:   0x2B7

        - SFP_19_26_RX_LOS:      0x2C0
        - SFP_27_34_RX_LOS:      0x2C1
        - SFP_35_36_RX_LOS:      0x2C2

        - SFP_19_26_RX_LOS_INT:  0x2C3
        - SFP_27_34_RX_LOS_INT:  0x2C4
        - SFP_35_36_RX_LOS_INT:  0x2C5

        - SFP_19_26_RX_LOS_MASK: 0x2C6
        - SFP_27_34_RX_LOS_MASK: 0x2C7
        - SFP_35_36_RX_LOS_MASK: 0x2C8

        - SFP_19_26_TX_DISABLE:  0x2D0
        - SFP_27_34_TX_DISABLE:  0x2D1
        - SFP_35_36_TX_DISABLE:  0x2D2

        - SFP_19_26_RS_CONTROL:  0x2D3
        - SFP_27_34_RS_CONTROL:  0x2D4
        - SFP_35_36_RS_CONTROL:  0x2D5

        - SFP_19_26_TX_FAULT:    0x2D6
        - SFP_27_34_TX_FAULT:    0x2D7
        - SFP_35_36_TX_FAULT:    0x2D8

        - SFP_19_26_ABS_STATUS:  0x2D9
        - SFP_27_34_ABS_STATUS:  0x2DA
        - SFP_35_36_ABS_STATUS:  0x2DB


    cpld4_reg:
      members:
        - VERSION:               0x300
        - SCRATCH:               0x301
        - RESET_CONTROL:         0x302
        - LED_CONTROL:           0x303
        - MISC_STATUS_CONTROL:   0x304
        - INT_PORT_STATUS:       0x305
        - INT0_SOURCE_STATUS:    0x306
        - INT1_SOURCE_STATUS:    0x307
        - INT2_SOURCE_STATUS:    0x308
        - INT0_SOURCE_INT:       0x309
        - INT1_SOURCE_INT:       0x30A
        - INT2_SOURCE_INT:       0x30B
        - INT0_SOURCE_MASK:      0x30C
        - INT1_SOURCE_MASK:      0x30D
        - INT2_SOURCE_MASK:      0x30E
        - I2C_PORT_ID:           0x310
        - I2C_OP_CODE:           0x311
        - I2C_DEV_ADDR:          0x312
        - I2C_COMMAND_BYTE0:     0x313
        - I2C_COMMAND_BYTE1:     0x314
        - I2C_COMMAND_BYTE2:     0x315
        - I2C_STATUS_RESET:      0x316

        - I2C_WRITE_DATA_BYTE0:  0x320
        - I2C_WRITE_DATA_BYTE1:  0x321
        - I2C_WRITE_DATA_BYTE2:  0x322
        - I2C_WRITE_DATA_BYTE3:  0x323
        - I2C_WRITE_DATA_BYTE4:  0x324
        - I2C_WRITE_DATA_BYTE5:  0x325
        - I2C_WRITE_DATA_BYTE6:  0x326
        - I2C_WRITE_DATA_BYTE7:  0x327

        - I2C_READ_DATA_BYTE0:   0x330
        - I2C_READ_DATA_BYTE1:   0x331
        - I2C_READ_DATA_BYTE2:   0x332
        - I2C_READ_DATA_BYTE3:   0x333
        - I2C_READ_DATA_BYTE4:   0x334
        - I2C_READ_DATA_BYTE5:   0x335
        - I2C_READ_DATA_BYTE6:   0x336
        - I2C_READ_DATA_BYTE7:   0x337

        - QSFP_RESET_CONTROL:    0x360
        - QSFP_LPMOD_CONTROL:    0x361
        - QSFP_ABS_STATUS:       0x362
        - QSFP_INT_STATUS:       0x363
        - QSFP_I2C_READY:        0x364

    cpld5_reg:
      members:
        - VERSION:               0x380
        - SCRATCH:               0x381
        - I2C_PORT_ID:           0x390
        - I2C_OP_CODE:           0x391
        - I2C_DEV_ADDR:          0x392
        - I2C_CMD_BYTE0:         0x393
        - I2C_CMD_BYTE1:         0x394
        - I2C_CMD_BYTE2:         0x395
        - I2C_STATUS_RESET:      0x396

        - I2C_WRITE_DATA_BYTE0:  0x3A0
        - I2C_WRITE_DATA_BYTE1:  0x3A1
        - I2C_WRITE_DATA_BYTE2:  0x3A2
        - I2C_WRITE_DATA_BYTE3:  0x3A3
        - I2C_WRITE_DATA_BYTE4:  0x3A4
        - I2C_WRITE_DATA_BYTE5:  0x3A5
        - I2C_WRITE_DATA_BYTE6:  0x3A6
        - I2C_WRITE_DATA_BYTE7:  0x3A7

        - I2C_READ_DATA_BYTE0:   0x3B0
        - I2C_READ_DATA_BYTE1:   0x3B1
        - I2C_READ_DATA_BYTE2:   0x3B2
        - I2C_READ_DATA_BYTE3:   0x3B3
        - I2C_READ_DATA_BYTE4:   0x3B4
        - I2C_READ_DATA_BYTE5:   0x3B5
        - I2C_READ_DATA_BYTE6:   0x3B6
        - I2C_READ_DATA_BYTE7:   0x3B7

        - SFP_37_44_RX_LOS:      0x3C0
        - SFP_45_48_RX_LOS:      0x3C1

        - SFP_37_44_RX_LOS_INT:  0x3C2
        - SFP_45_48_RX_LOS_INT:  0x3C3

        - SFP_37_44_RX_LOS_MASK: 0x3C4
        - SFP_45_48_RX_LOS_MASK: 0x3C5

        - SFP_37_44_TX_DISABLE:  0x3D0
        - SFP_45_48_TX_DISABLE:  0x3D1

        - SFP_37_44_RS_CONTROL:  0x3D2
        - SFP_45_48_RS_CONTROL:  0x3D3

        - SFP_37_44_TX_FAULT:    0x3D4
        - SFP_45_48_TX_FAULT:    0x3D5

        - SFP_37_44_ABS_STATUS:  0x3D6
        - SFP_45_48_ABS_STATUS:  0x3D7
