⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ixf_api_sonet_d.h

📁 开发Inetl IXP2400平台所必须的硬件诊断和测试程序。该软件包支持的功能包括CPU基本功能检测
💻 H
字号:
/*
 *---------------------------------------------------------------------------
 *                                                                      
 *                  I N T E L   P R O P R I E T A R Y                   
 *                                                                      
 *     COPYRIGHT (c)  2001 BY  INTEL  CORPORATION.  ALL RIGHTS          
 *     RESERVED.   NO  PART  OF THIS PROGRAM  OR  PUBLICATION  MAY      
 *     BE  REPRODUCED,   TRANSMITTED,   TRANSCRIBED,   STORED  IN  A    
 *     RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER    
 *     LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,    
 *     MAGNETIC,  OPTICAL,  CHEMICAL, MANUAL, OR OTHERWISE,  WITHOUT    
 *     THE PRIOR WRITTEN PERMISSION OF :                                
 *                                                                      
 *                        INTEL  CORPORATION                            
 *                                                                     
 *                     2200 MISSION COLLEGE BLVD                        
 *                                                                      
 *               SANTA  CLARA,  CALIFORNIA  95052-8119                  
 *                                                                      
 *---------------------------------------------------------------------------
 *
 *
 *   AUTHOR:         $Author: lagarwal $
 *   DATE:           $Date: 2002/11/15 17:51:12 $
 *   LAST MODIFIED:  $Modtime: 4/18/02 4:44p $
 *   REV#:           $Revision: 1.1.1.1 $
 *   LOGFILE:        $Logfile: /Embedded/source/drivers/ixf/ixf_api_sonet_d.h $
 *   WORKFILE:       $Workfile: ixf_api_sonet_d.h $
 *
 * --------------------------------------------------------------------------
 * Project: Data structures and types for the SONNET functionality of the OCD
 *
 * Purpose: 
 *          
 * Notes:
 *          
 * --------------------------------------------------------------------------
 * CompilerFlags: 
 * --------------------------------------------------------------------------
 * --------------------------------------------------------------------------
 *   $Log: ixf_api_sonet_d.h,v $
 *   Revision 1.1.1.1  2002/11/15 17:51:12  lagarwal
 *   rename dir
 *
 *   Revision 1.3  2002/09/09 21:49:19  cmah1
 *   no message
 *
 *   Revision 1.1  2002/05/22 00:05:42  machambe
 *   Initial update
 *
 * 
 * 21    4/18/02 4:45p Machambe
 * Adding bb_RX_HPT_RDI_IN_G1
 * 
 * 20    3/08/02 11:15a Rcordova
 * Added bb_SelAuPointers_e for MSA selections in TT and RL.
 * 
 * 19    2/25/02 2:04p Rcordova
 * 
 * 18    2/07/02 5:12p Kssaepha
 * Removed bb_TRANSMIT_J1_TEST
 * 
 * 17    1/30/02 10:41a Rcordova
 * added bb_RNU1_RNU2 option
 * 
 * 16    1/30/02 10:38a Machambe
 * 
 * 15    1/29/02 3:01p Rcordova
 * Added MOM1 enum type
 * 
 * 14    1/28/02 3:13p Srodrig1
 * 
 * 13    1/28/02 2:14p Srodrig1
 * 
 * 12    1/19/02 2:10p Machambe
 * Adding K1K2 option to bb_SelOhBytes
 * 
 * 11    1/18/02 10:38a Skadrix
 * Added some eumerated types for use with the API function BER Threshold
 * .
 * 
 * 10    1/17/02 4:57p Rcordova
 * Added slot fields for pathOhBytesAndSrc Structure
 * 
 * 9     1/03/02 5:31p Skadrix
 * Added the enumerated type definitions 
 *       bb_eBitBlock_t
 *       bb_eAutoIncrement_t
 * which were previously defined in the chip level countersd.h file (for
 * Eiffel) as
 *       ixf6192_eBitBlock_t
 *       ixf6192_eAutoIncrement_t
 * 
 * 8     1/02/02 6:20p Rcordova
 * Added PathOhByteAndSrc Struct and changed union generic for struct
 * generic (added also Source parameter)
 * 
 * 7     12/12/01 3:52p Machambe
 * Moved MapFrame_t into this file
 * 
 * 6     12/04/01 4:22p Pkjain2
 * 
 * 5     11/15/01 6:41p Machambe
 * 
 * 4     9/12/01 12:01p Srodrig1
 * 
 * 3     8/08/01 3:52p Rfranz
 * added legacy trace work string functions
 * 
 * 2     8/02/01 1:46p Rfranz
 * WIP
 * 
 * 1     7/18/01 10:54a Rfranz
 * Initial check in - file headers only
 * 
 * --------------------------------------------------------------------------
 */

#ifndef __IXF_API_SONET_D_H__
#define __IXF_API_SONET_D_H__

/* By defining this, the sonet block will reference the chipArrayFuncPtr
   variable in devlib.h */
#define REF_GLOB_DEF 1


/* Distinguish between bit or block counters */
typedef enum
{
	BIT,                                        /* Bit Configuration */
	BLOCK                                       /* Block Configuration */
} bb_eBitBlock_t;

/* Identifies auto increment feature for slot retrieval */
typedef enum
{
	DISABLE_AUTO_INC,                           /* Disable Auto Increment */
	ENABLE_AUTO_INC                             /* Enable Auto Increment */
} bb_eAutoIncrement_t;



/***********************************************************************
* Functions to set the Expected/Tx J0/J1/J2 Trace, or
*              get the Rx J0/J1 Trace
**********************************************************************/

typedef enum   /* Type of Trace: Expected/Tx/Rx J0/J1/J2 */
{
    bb_EXPECTED_J0 = 0,
    bb_EXPECTED_J1,
    bb_ACCEPTED_J0,
    bb_ACCEPTED_J1,
    bb_TRANSMIT_J0,
    bb_TRANSMIT_J1,
    bb_TX_J0 = bb_TRANSMIT_J0,
    bb_TX_J1 = bb_TRANSMIT_J1,

    bb_RX_J0,
    bb_RX_J1,

    /* Trace types for debug and testing */
    bb_TRANSMIT_J1_COMPOSE,
    bb_MAX_TRACETYPE           /* Always make this one last */

} bb_TraceType_e;

typedef enum   /* Specifies the Trace Format */
{
    bb_64_BYTE_WITH_LF_CR = 1, /* 64 bytes with LF,CR at end */
    bb_64_BYTE_FREE_FORM,      /* 64 bytes, free form */
    bb_16_BYTE_WITH_CRC7,      /* 16 bytes, starting with CRC7 */
    bb_1_BYTE,                 /* 1 byte */
    bb_IGNORE_RX_TRACE,        /* Ignore trace on Rx */
    bb_DEFAULT_TX_TRACE,       /* Send default value of 0x01, each byte */
    bb_MAX_TRACE_FMT           /* Always make this one last */
} bb_TraceFormat_e;
/* Supported formats:
J0:
o  ixf6051 - 16 bytes with CRC7
o  ixf6048 - all formats above
o  Both - (Can ignore Expected J0 trace)
J1:
o  ixf6051 - 64 bytes free-form (or with Driver added LF,CR)
or 16 bytes with CRC7
o  ixf6048 - all formats above
*/



/***********************************************************************
* Data for functions to Get various Rx Overhead Bytes: MST, HPT, NU
**********************************************************************/

typedef enum   /* to select the Overhead Bytes */
{
    bb_K1,
    bb_TX_K1 = bb_K1,
    bb_K2,
    bb_TX_K2 = bb_K2,
    bb_K1_K2,
    bb_K3,
    bb_TX_K3 = bb_K3,
    bb_S1,
    bb_TX_S1 = bb_S1,
    bb_EXPECTED_C2,
    bb_RECEIVED_C2,
    bb_C2,
    bb_TX_C2 = bb_C2,
    bb_G1,
    bb_RX_HPT_RDI_IN_G1,
    bb_TX_HPT_RDI_IN_G1,
    bb_K3_Z4,
    bb_Z4_K3 = bb_K3_Z4,
    bb_M1,
	bb_M0, 
    bb_M0_M1,
    bb_MNU,
    bb_RNU1,    
    bb_RNU2,
    bb_RNU1_RNU2,
	bb_RNU9,
	bb_J1,
	bb_B3,
	bb_F2,
	bb_H4,
	bb_Z3_F3,
	bb_Z5_N1,
    bb_RX_NU_BYTES,
    bb_MST_BYTES,
    bb_RX_MST_BYTES = bb_MST_BYTES,
    bb_LINE_OH_BYTES = bb_MST_BYTES,
    bb_RX_RMST_BYTES,
    bb_TX_RMST_BYTES,
    bb_HPM_BYTES,
    bb_RX_HPT_BYTES = bb_HPM_BYTES,
    bb_PATH_OH_BYTES = bb_HPM_BYTES,
    bb_TX_LINE_BYTES,
    bb_TX_SYSTEM_BYTES,

    bb_MAX_SELOHBYTES                                      /* Always make this one last */

} bb_SelOhBytes_e;

/***********************************************************************
* Data for functions to Get various TT & RL Au Pointer Counters: MSA
**********************************************************************/

typedef enum   /* to select the AU Pointers Counters */
{
    bb_TT_IAU,
    bb_TT_OAU,
    bb_TT_IAU_POS,
    bb_TT_IAU_NEG,
    bb_TT_OAU_POS,
    bb_TT_OAU_NEG,
    bb_RL_IAU,
    bb_RL_OAU,
    bb_RL_IAU_POS,
    bb_RL_IAU_NEG,
    bb_RL_OAU_POS,
    bb_RL_OAU_NEG,

    bb_MAX_SELAUPOINTERS                                      /* Always make this one last */

} bb_SelAuPointers_e;

/* Typedef'd for backwards compatablity */
typedef bb_SelOhBytes_e bb_SelOhByte_e;

/* Rx Multiplexer Section Termination Bytes */
/* Line overhead for SONET */
typedef struct 
{
   uchar    K1;
   uchar    K2;
   uchar    S1;
} bb_RxMstBytes_t;

/* RST and Multiplexer Section Termination Bytes Combined*/
/* This is the transport overhead (Section and line) in SONET */
typedef struct 
{
    uchar K1;
    uchar K2;
    uchar S1;
    uchar M1;
    uchar M0;
    uchar MNU;
    uchar RNU1;
    uchar RNU2;
    uchar RNU9;
} bb_RstMstBytes_t;


typedef struct
{
    uchar ucJ1;
    uchar ucC2;
    uchar ucExpC2;
    uchar ucB3;
    uchar ucG1;
    uchar ucF2;
    uchar ucH4;
    uchar ucZ3F3;
    uchar ucZ4K3;
    uchar ucZ5N1;
    
} bb_PathOhBytes_t;

typedef struct
{
    ushort              J1Source;
    ushort              C2Source;
    ushort              ExpC2Source;
    ushort              G1Source;
    ushort              F2Source;
    ushort              H4Source;
    ushort              Z3F3Source;
    ushort              Z4K3Source;
    ushort              Z5N1Source;
    ushort              B3Slot;
    ushort              J1Slot;
    ushort              C2Slot;
    ushort              ExpC2Slot;
    ushort              G1Slot;
    ushort              F2Slot;
    ushort              H4Slot;
    ushort              Z3F3Slot;
    ushort              Z4K3Slot;
    ushort              Z5N1Slot;
    bb_PathOhBytes_t    PathOhBytes;
} bb_PathOhBytesAndSrc_t;


/***********************************************************************
* Counter Structures
**********************************************************************/

/*------------- Rx RST Error Counters --------*/
typedef struct /*  Rx RST Counters */
{
    /* Rx Regenerator Section Termination Counters; Reading clears counters. */
    ushort    OofCnt;         /* Out of Frame Event Counter */
    ushort    B1ErrCnt;         /* B1 Bit error count */
    ushort    B1BlockErrCnt;    /* B1 Block error count */
} bb_RxRstCounters_t;


/*------------- Rx MST Error Counters --------*/
typedef struct /* Rx MST Counters  */
{
    /* Rx Multiplexer Section Termination Counters; Reading clears counters. */
    ulong    B2BitErrCnt;         /* Number B2  Bit errors */
    ulong    ReiBitErrCnt;        /* Number REI Bit errors */
    
    ulong    B2BlockErrCnt;       /* Number B2  Block errors */
    ulong    ReiBlockErrCnt;      /* Number REI Block errors */
} bb_RxMstCounters_t;


/*-------- Rx HPT Err Counters --------------*/
typedef struct /* Rx HPT Counters */
{
   /* Rx High Order Path Termination Counters; Reading clears counters. */
   ulong    ReiCnt;        /* HPT REI count: Bit or Block errs, as cfg'd */
   ulong    B3ErrCnt;      /* B3 Error count: Bit or Block errs, as cfg'd */
} bb_RxHptCounters_t;


/*-------- Rx HPM Err Counters --------------*/
typedef struct /* Rx HPM Counters */
{
    /* Rx High Order Path Termination Counters; Reading clears counters. */
	ushort    ReiBitCnt;		/* HPT REI count: Bit errs */
	ushort    ReiBlockCnt;		/* HPT REI count: Block errs */
	ushort    B3BitErrCnt;		/* B3 Error count: Bit errs */
	ushort    B3BlockErrCnt;	/* B3 Error count: Block errs */
} bb_RxHpmCounters_t;

typedef bb_RxHpmCounters_t bb_RxPathCounters_t;


/*-------- AU Ptr Just. Counters ------------*/
typedef struct /* AU Pointer Justification Counters */
{
    /* AU Pointer Justification Counters; Reading clears counters. */
    ushort  InAuNegJustCnt;   /* Count of Incoming Negative AU Ptr Justifications */
    ushort  InAuPosJustCnt;   /* Count of Incoming Positive AU Ptr Justifications */
    ushort  OutAuNegJustCnt;/* Count of Outgoing Negative AU Ptr Justifications */
    ushort  OutAuPosJustCnt;/* Count of Outgoing Positive AU Ptr Justifications */
} bb_AuPtrCounters_t;


/* ixf18100 new structures */
/* Rx path counters for single channel */

/* All SONET counters. */
typedef struct
{
    bb_RxRstCounters_t tRxRstCounters;  /* RST == Section */
    bb_RxMstCounters_t tRxMstCounters;  /* Mst == Line */
    bb_RxPathCounters_t tRxPathCounters;
    bb_AuPtrCounters_t tPointerCounters;  /* ixf18100 only has incoming counters. */
} bb_RxSonetCounters_t;


/* Enumerated type for the TST Levels */
/* Used with BER Thresholds */
typedef enum
{
    bb_STS_12 = 0,
    bb_STS_48,
    bb_STS_192,
    bb_MAX_STSMODE                                     /* Always make this one last */
} bb_STSMode_e;

/* Enumerated type for specifiying the BER Threshold Registers */
typedef enum   
{
    bb_EXC_B2_MIN = 0,
    bb_EXC_B2_MAX,
    bb_EXC_B2_SET_WINSZ,
    bb_EXC_B2_CLR_WINSZ,
    bb_EXC_B2_SET_WINNUM,
    bb_EXC_B2_CLR_WINNUM,

    bb_ALL_EXC_BER_THRESHOLD,

    bb_DEG_B2_MIN,
    bb_DEG_B2_MAX,
    bb_DEG_B2_SET_WINSZ,
    bb_DEG_B2_CLR_WINSZ,
    bb_DEG_B2_SET_WINNUM,
    bb_DEG_B2_CLR_WINNUM,

    bb_ALL_DEG_BER_THRESHOLD,
    bb_MAX_BERSTHRESOLD_SEL                           /* Always make this one last */
} bb_BerThresholdSel_e;



/***********************************************************************
 * Useful common suppport functions provided for specific chip drivers
 **********************************************************************/
/* Build 16-byte J0, J1, J2 Work String:  
      0, Jn string, Pad of 0's;           
      Return -> Work String */            
/* -> J0, J1, J2 null-terminated string */
/* Note: if pString = NULL, WorkString = 0's */ 
#ifndef _HC16
uchar* bb_Make16ByteWorkString (char*   pString);            
                                 
/* Build 64-byte J1 Work String: 
      J1 string, Pad of 0's 
   -> J1 null-terminated string
  Note: if pString = NULL, WorkString = 0's */
uchar* bb_Make64ByteWorkString (char*   pString);            
      
#endif                                 


/* Defines the types of HPC mappings */
typedef enum
{
	bb_eNORMAL,                            /* Normal STS-1 */
	bb_eCONCAT_MASTER,                     /* Concat Master STS-1 */
	bb_eCONCAT_SLAVE,                      /* Concat Slave STS-1 */
	bb_eCONCAT_AIS,                        /* Concat AIS STS-1 */
	bb_eUNCONCAT_MASTER,                   /* Unconcat Master STS-1 */
	bb_eUNCONCAT_SLAVE,                    /* Unconcat Slave STS-1 */
	bb_eUNCONCAT_AIS,                       /* Unconcat AIS STS-1 */
    bb_MAX_MAPFRAME                        /* Always make this one last */
} MapFrame_t;


#endif  /* __IXF_API_SONET_D_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -