openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

tbhmod_spd_ctrl.h (3272B)


      1 /*------------------------------------------------------------------------------
      2  * 
      3  *
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      7  *  Broadcom Corporation
      8  *  Proprietary and Confidential information
      9  *  All rights reserved
     10  *  This source file is the property of Broadcom Corporation, and
     11  *  may not be copied or distributed in any isomorphic form without the
     12  *  prior written consent of Broadcom Corporation.
     13  *------------------------------------------------------------------------------
     14  *  Description: Structures and function prototypes for Speed Table, AM Table,
     15  *               and UM Table access.
     16  *----------------------------------------------------------------------------*/
     17 #ifndef _TBHMOD_SPD_CTRL_H_
     18 #define _TBHMOD_SPD_CTRL_H_ 
     19 
     20 #ifdef _DV_TB_
     21 #include <stdint.h>
     22 #endif
     23 #include <phymod/phymod.h>
     24 #include "tbhmod_spd_ctrl_defines.h"
     25 
     26 typedef struct 
     27 {
     28   uint8_t  am_table_index;
     29   uint8_t  fec_arch;
     30   uint8_t  symbol_interleave;
     31   uint8_t  tc_xor_control;
     32   uint8_t  rs_fec_sync_header_mode;
     33   uint8_t  rs_fec_cwm_nibble_match_count;
     34   uint8_t  base_r_fec_sync_header_mode;
     35   uint8_t  rs_fec_symbol_error_window_mode;
     36   uint16_t rs_fec_symbol_error_count_threshold;
     37   uint8_t  deskew_forwarding_threshold_2xn;
     38   uint8_t  deskew_forwarding_threshold_1xn;
     39   uint8_t  bit_mux_mode;
     40   uint8_t  num_lanes;
     41   uint8_t  deskew_window_without_rs_fec;
     42   uint8_t  deskew_window_with_rs_fec;
     43   uint8_t  ber_fsm_disable_with_rs_fec;
     44   uint8_t  ber_fsm_disable_without_rs_fec;
     45   uint8_t  ber_window_mode;
     46   uint8_t  ber_trigger_count;
     47   uint8_t  credit_quotient;
     48   uint16_t credit_remainder;
     49   uint16_t credit_divisor;
     50   uint8_t  use_cl49_block_sync;
     51   uint8_t  scr_mode;
     52   uint8_t  codec_mode;
     53   uint8_t  training_en;
     54   uint8_t  an_timer_select;
     55   uint8_t  pmd_pam4_mode;
     56   uint8_t  pmd_osr_mode;
     57   uint8_t  t_pma_watermark;
     58   uint8_t  l_tpma_watermark;
     59   uint8_t  loop_block_count_for_ts;
     60   uint16_t loop_bit_count_for_ts;
     61   uint8_t  am_lock_fsm_mode;
     62   uint8_t  t_pma_start_mode;
     63 } spd_id_tbl_entry_t;
     64 
     65 typedef struct
     66 {
     67   uint8_t  am_spacing_credits;
     68   uint8_t  am_spacing_no_rs;
     69   uint16_t am_spacing_rs;
     70   uint8_t  use_fixed;
     71   uint32_t cm;
     72   uint8_t  um_table_index;
     73   uint8_t  um_table_count;
     74   uint8_t  pad_mode;
     75   uint8_t  am_size;
     76   uint8_t  am_compression_mode;
     77 } am_tbl_entry_t;
     78 
     79 typedef struct
     80 {
     81   uint32_t um;
     82   uint8_t  cm_pad;
     83   uint8_t  um_pad;
     84   uint8_t  cm_control;
     85 } um_tbl_entry_t;
     86 
     87 
     88 /* Function Prototypes */
     89 extern void                 spd_ctrl_unpack_spd_id_tbl_entry(uint32_t *packed_entry, spd_id_tbl_entry_t *entry);
     90 extern void                 spd_ctrl_pack_spd_id_tbl_entry(spd_id_tbl_entry_t *entry, uint32_t *packed_entry);
     91 
     92 extern void                 spd_ctrl_unpack_am_tbl_entry(uint32_t *packed_entry, am_tbl_entry_t *entry);
     93 extern void                 spd_ctrl_pack_am_tbl_entry(am_tbl_entry_t *entry, uint32_t *packed_entry);
     94 
     95 extern void                 spd_ctrl_unpack_um_tbl_entry(uint32_t *packed_entry, um_tbl_entry_t *entry);
     96 extern void                 spd_ctrl_pack_um_tbl_entry(um_tbl_entry_t *entry, uint32_t *packed_entry);
     97 #endif  /* _TBHMOD_SPD_CTRL_H_ */