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

pp.h (1380B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * File:        pp.h
      8  * Purpose:     
      9  */
     10 
     11 #ifndef   _DIAG_PP_H_
     12 #define   _DIAG_PP_H_
     13 
     14 #define DIAG_PP_WORDS_PER_ENTRY    4
     15 #define DIAG_PP_WORD_SIZE          5
     16 #define DIAG_PP_WORD_BITS          (DIAG_PP_WORD_SIZE * 32)
     17 #define DIAG_PP_ECC_BITS           9
     18 #define DIAG_PP_ECC_MASK           0x1ff
     19 #define DIAG_PP_ECC_CHUNKS         (DIAG_PP_WORD_SIZE + 1)
     20 #define DIAG_PP_DATA_BYTES         80
     21 #define DIAG_PP_XQ_OFFSET_BYTES    8
     22 #define DIAG_INGBUF_EOF_BIT        0x8    
     23 #define DIAG_INGBUF_LANES_MASK     0x7
     24 
     25 typedef struct diag_mem_pp_word_s {
     26     uint32 data[DIAG_PP_WORD_SIZE];
     27     uint32 syndrome;
     28 } diag_mem_pp_word_t;
     29 
     30 typedef struct diag_mem_pp_entry_s {
     31     diag_mem_pp_word_t words[DIAG_PP_WORDS_PER_ENTRY];
     32 } diag_mem_pp_entry_t;
     33 
     34 extern int diag_dump_xq_packet(int unit, soc_block_t blk, int xq_ptr);
     35 extern int diag_dump_cos_packets(int unit, soc_port_t port, int cos_start, 
     36                                  int cos_end);
     37 extern int diag_dump_ib_packets(int unit, soc_port_t port);
     38 extern int diag_set_cos_errors(int unit, soc_port_t port, int cos_sel, 
     39                                int errors, int packet,  int start_bit);
     40 
     41 #endif /* _DIAG_PP_H_ */