?? zl5011xrtpmap.h
字號:
/*******************************************************************************
*
* File name: zl5011xRtpMap.h
*
* Version: 22
*
* Author: PJE
*
* Date created: 22/05/2002
*
* Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
* All rights reserved.
*
* Module Description:
*
*
* Revision History:
*
* Rev: Date: Author: Comments:
* 1 24/05/2002 PJE Written easy bits - compiles ok
* 2 29/05/2002 PJE Update
* 3 29/05/2002 PJE added more - still debugging/writing
* 4 10/06/2002 LCW Update
* 5 10/06/2002 MRC Modified header structure for set header fn
* 6 11/06/2002 MRC Defined bit fields for the header and statistics
* base addresses
* 7 11/06/2002 MRC Primary and secondary headers are actually stored
* in banks rather than consecutively
* 8 11/06/2002 MRC Corrected bit positions for CSW, SI, SS, TS bits
* 9 17/06/2002 MRC Corrected bit positions the other header fields
* 10 25/06/2002 LCW Minor mods.
* 11 28/06/2002 LCW Code review actions
* 12 12/07/2002 MRC Rewrote the statistics functions
* 13 22/07/2002 MRC Actions following review
* 14 23/07/2002 MRC Added block ID register
* 15 01/08/2002 MRC Added RTP interrupt period mask
* 16 16/08/2002 MRC Updated register positions etc for block change
* 17 27/08/2002 MRC Shadow header offset changed
* 18 25/10/2002 PJE API tidy up
* 19 31/10/2002 MRC Added variants + minor fixes
* 20 07/05/2003 JFE Made & undid incorrect correction
* 21 07/05/2003 JFE Made & undid incorrect correction
* 22 21/05/2003 MRC Added a define for the RTP stats size
*
*******************************************************************************/
#ifndef _ZL5011X_RTP_MAP_H_
#define _ZL5011X_RTP_MAP_H_
#ifdef __cplusplus
extern "C" {
#endif
/***************** # DEFINES **********************************************/
/* The number of clock cycles for the RTP block to continue waiting.
msb is used as an enable to preset internal ctr */
#define ZL5011X_RTP_DEFAULT_GRN_TIMEOUT 0x7fffffff
#define ZL5011X_NUM_BYTES_IN_WORD 4
#define ZL5011X_NUM_POSITIONS_IN_WORD 2
#define ZL5011X_BITS_PER_POSITION 16
/* addresses for the registers */
#define ZL5011X_RTP_HEADER_BASE ZL5011X_RTP_BASE + 0x00000
#define ZL5011X_RTP_SHADOW_HEADER_OFFSET 0x01000
#define ZL5011X_RTP_STATS_BASE ZL5011X_RTP_BASE + 0x04000
#define ZL5011X_RTP_STATS_MEM_SIZE 0x2000
#define ZL5011X_RTP_REG_BASE ZL5011X_RTP_BASE + 0x06000
#define ZL5011X_RTP_CONFIG0 ZL5011X_RTP_REG_BASE + 0x00000
#define ZL5011X_RTP_CONFIG1 ZL5011X_RTP_REG_BASE + 0x00004
#define ZL5011X_RTP_CONFIG2 ZL5011X_RTP_REG_BASE + 0x00008
#define ZL5011X_RTP_CONFIG3 ZL5011X_RTP_REG_BASE + 0x0000C
#define ZL5011X_RTP_BLOCK_ID ZL5011X_RTP_REG_BASE + 0x00010
#define ZL5011X_RTP_STATS0 ZL5011X_RTP_REG_BASE + 0x00014
#define ZL5011X_RTP_DEBUG0 ZL5011X_RTP_REG_BASE + 0x00018
/* defines for bits in config register 0 */
/* defines for the base address of the RTP statistics data structure */
#define ZL5011X_RTP_MM_RTPS_BADDR 0
#define ZL5011X_RTP_MM_RTPS_MASK (Uint32T)0x1FFF
#define ZL5011X_RTP_MM_RTPS_DROP_BITS 11
#define ZL5011X_RTP_MM_RTPTX_BADDR 16
#define ZL5011X_RTP_MM_RTPTX_MASK (Uint32T)0x7FF
#define ZL5011X_RTP_MM_RTPTX_DROP_BITS 13
#define ZL5011X_RTPS_INT_MASK_BIT 29 /* Indicates that the interrupt from the
statistics module is disabled*/
#define ZL5011X_RTP_FORMAT 30 /* Indicates the update format of RTPS */
#define ZL5011X_RTP_CPU_SETUP_DONE 31 /* Indicates that the CPU is done programming
all the configuration registers in RTPS CSI*/
/* define for bits in config register 1 */
#define ZL5011X_RTP_GRN_TIMEOUT_ENABLE 31 /* The MSB is used as an enable */
/* defines for bits in config register 2 */
#define ZL5011X_RTP_INTERVAL_BITS 0
#define ZL5011X_RTP_INTERVAL_MASK (Uint32T)0x3ff
/* defines for bits in debug register */
#define ZL5011X_RTP_LOWER_TST_MUX_CFG 0 /* group of signals to be assigned to the
lower 8 bits of the test mux. */
#define ZL5011X_RTP_UPPER_TST_MUX_CFG 0 /* group of signals to be assigned to the
upper 8 bits of the test mux. */
/* bit positions for ZL5011X_RTP_STATS0 register */
#define ZL5011X_RTP_FIRST_SEQ_NO_BITS 16
#define ZL5011X_RTP_ROLLOVER_FLAGS_MASK (Uint32T)0x0000F000
#define ZL5011X_RTP_TX_BYTE_ROLLOVER_MASK (Uint32T)0x00008000
#define ZL5011X_RTP_TX_PACKET_ROLLOVER_MASK (Uint32T)0x00004000
#define ZL5011X_RTP_RX_PACKET_ROLLOVER_MASK (Uint32T)0x00002000
#define ZL5011X_RTP_RX_SEQ_NUM_ROLLOVER_MASK (Uint32T)0x00001000
#define ZL5011X_RTP_INTERRUPT_CTXT_MASK (Uint32T)0x00000FFF
#define ZL5011X_RTP_FIRST_SEQ_NO_MASK (Uint32T)0x0000FFFF
/* defines for sizes */
#define ZL5011X_RTP_HEADER_SIZE 32 /* BYTES */
#define ZL5011X_RTP_FIELDS_BASE 24 /* BYTES */
#define ZL5011X_RTP_STATS_SIZE 16 /* BYTES */
/* positions in the RTP fields data structure - lower word */
#define ZL5011X_RTP_TS 0
#define ZL5011X_RTP_SS 1
#define ZL5011X_RTP_SI 2
#define ZL5011X_RTP_CSW 3
#define ZL5011X_RTP_CTRL 4
#define ZL5011X_RTP_HDR_LEN 6
#define ZL5011X_RTP_ENERGY 10
#define ZL5011X_RTP_SC 17
#define ZL5011X_RTP_CTXT_OUT 19
/* bits in the RTP fields data structure - upper word */
#define ZL5011X_RTP_TS_INC 0
#define ZL5011X_RTP_TS_LOC 13
#define ZL5011X_RTP_LEN_LOC 17
#define ZL5011X_RTP_CHK_LOC 21
#define ZL5011X_RTP_SN_LOC 25
#define ZL5011X_RTP_CES_LOC 31
/* bit positions for fields in the statistics table */
#define ZL5011X_RTP_TX_PACKET_COUNT_INDEX 0
#define ZL5011X_RTP_TX_BYTE_COUNT_INDEX 1
#define ZL5011X_RTP_RX_SEQ_NUM_INDEX 2
#define ZL5011X_RTP_RX_PACKET_COUNT_INDEX 3
/* Sender statistics word 1 */
#define ZL5011X_RTP_TX_BYTE_CARRY_MASK (Uint32T)0x00800000
#define ZL5011X_RTP_TX_BYTE_COUNT_MASK (Uint32T)0x007FFFFF
/* Sender statistics word 2 */
#define ZL5011X_RTP_TCE_OFFSET_MASK (Uint32T)0x00020000
#define ZL5011X_RTP_TX_PACKET_CARRY_MASK (Uint32T)0x00010000
#define ZL5011X_RTP_TX_PACKET_COUNT_MASK (Uint32T)0x0000FFFF
/* Receiver statistics word 1 */
#define ZL5011X_RTP_RS_OFFSET_MASK (Uint32T)0xC0000000
#define ZL5011X_RTP_RCE_OFFSET_MASK (Uint32T)0x20000000
#define ZL5011X_RTP_RX_PACKET_CARRY_MASK (Uint32T)0x00010000
#define ZL5011X_RTP_RX_PACKET_COUNT_MASK (Uint32T)0x0000FFFF
#define ZL5011X_RTP_RX_JITTER_BITS (Uint32T)17
#define ZL5011X_RTP_RX_JITTER_MASK (Uint32T)0x000007FF
/* Receiver statistics word 2 */
#define ZL5011X_RTP_INTERRUPTS_MASK (Uint32T)0xC0000000
#define ZL5011X_RTP_INTERRUPT_MODE (Uint32T)0x80000000
#define ZL5011X_RTP_SEQ_NUM_CARRY_MASK (Uint32T)0x00010000
#define ZL5011X_RTP_SEQ_NUM_MASK (Uint32T)0x0000FFFF
#define ZL5011X_RTP_MAX_GRANULE_TIMEOUT (Uint32T)0x7FFFFFFF
/***************** DATA TYPES *********************************************/
/***************** DATA STRUCTURES ****************************************/
/***************** EXPORTED GLOBAL VARIABLE DECLARATIONS ******************/
#ifdef __cplusplus
}
#endif
#endif /* _ZL5011X_RTP_MAP_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -