📄 l1_trace.h
字号:
/************* Revision Controle System Header *************
* GSM Layer 1 software
* L1_TRACE.H
*
* Filename l1_trace.h
* Copyright 2003 (C) Texas Instruments
*
************* Revision Controle System Header *************/
#ifndef __L1_TRACE_H__
#define __L1_TRACE_H__
#include "rvt_gen.h"
#include <string.h>
#if (defined RVM_RTT_SWE || (OP_L1_STANDALONE == 1))
#include "rtt_gen.h"
#endif
#define L1_BINARY_TRACE 0
/********************/
/* Main definitions */
/********************/
#define TR_HEADER_FN_DELAY 10 // Delay applied to store the FN in the trace cell header
#define TR_HEADER_ID_MASK 0x000003FF // Mask on the cell ID stored in the cell header
// Opcodes for communication with L1 Tracer
//-----------------------------------------
#define TRACE_CONFIG_OPCODE 0
#define TRACE_CHECKING_OPCODE 1
#define TRACE_CHECK_RESULT_OPCODE 1023 // WARNING: UL opcode 1023 reseved for trace version
// (cannot be used for trace)
#if (GSM_IDLE_RAM != 0)
#define INTRAM_TRACE_BUFFER_SIZE 128
extern UWORD32 task_bitmap_idle_ram[2];
extern UWORD32 mem_task_bitmap_idle_ram[2];
extern CHAR intram_trace_buffer[INTRAM_TRACE_BUFFER_SIZE];
extern CHAR * intram_buffer_current_ptr;
extern T_RVT_MSG_LG intram_trace_size;
void l1_intram_send_trace(void);
#endif
/****************************** ASCII trace only *****************************************/
#if (L1_BINARY_TRACE == 0) || (TRACE_TYPE == 5)
#if (OP_L1_STANDALONE == 1)
#if (L1_DYN_DSP_DWNLD == 1 && CODE_VERSION == SIMULATION)
#define DEFAULT_DYN_TRACE_CONFIG 0x00016AE7 // Dyn DWNLD (0x0001000) MP3 & MIDI traces activated (0x4000 and 0x2000)
#else
#define DEFAULT_DYN_TRACE_CONFIG 0x008A6AE7 // MP3 & MIDI traces activated (0x4000 and 0x2000)
#endif // L1_DYN_DSP_DWNLD == 1 && CODE_VERSION == SIMULATION
#elif (OP_WCP == 1)
// WCP patch: default config is no Layer1 trace
#define DEFAULT_DYN_TRACE_CONFIG 0x00000000 // default was 0x00000BB7
// End WCP patch
#else
#define DEFAULT_DYN_TRACE_CONFIG 0x00881BB7
#endif
// Possible EVENTS for L1S traces using TRACE_INFO.
//-------------------------------------------------
#define PM_EQUAL_0 1
#define NO_PM_EQUAL_0 2
#define MCU_DSP_MISMATCH 3
#define NO_MCU_DSP_MISMATCH 4
#define L1S_ABORT 5
#define L1S_PACKET_TRANSFER 6
#define L1S_RLC_STAT 7
#define DL_PTCCH 8
#define L1S_D_ERROR_STATUS 9
#define TRACE_CPU_LOAD 10 // Only works with TRACE_TYPE 7
#define RLC_DL_PARAM 11
#define RLC_UL_PARAM 12
#define FORBIDDEN_UPLINK 13
#define DYN_TRACE_CHANGE 14 // Currently only work with TRACE_TYPE 4
#define TRACE_SLEEP 15
#define TRACE_GAUGING_RESET 16
#define TRACE_GAUGING 17
#define NEW_TOA 18
#define TOA_NOT_UPDATED 19
#define IT_DSP_ERROR 20
#define TRACE_ADC 21
#define PTCCH_DISABLED 22
#if (OP_L1_STANDALONE == 0)
#define DYN_TRACE_DEBUG 23 // Currently only work with TRACE_TYPE 4
#endif
#define DEDIC_TCH_BLOCK_STAT 24
#define DSP_TRACE_DISABLE 25 // Only works with TRACE_TYPE 1 or 4
#define DSP_TRACE_ENABLE 26 // Only works with TRACE_TYPE 1 or 4
#if (L1_AUDIO_MCU_ONOFF == 1)
#define L1_AUDIO_UL_ONOFF_TRACE 27
#define L1_AUDIO_DL_ONOFF_TRACE 28
#endif
#define SAIC_DEBUG 29
#define BURST_PARAM 30
#define TRACE_RATSCCH 31
#define NAVC_VALUE 32
#define PWMGT_FAIL_SLEEP 33
#define KPD_CR 34
// Wakeup Type for Power management
//--------------------------------
#define WAKEUP_FOR_UNDEFINED 0
#define WAKEUP_FOR_L1_TASK 1
#define WAKEUP_FOR_OS_TASK 2
#define WAKEUP_FOR_HW_TIMER_TASK 3
#define WAKEUP_FOR_GAUGING_TASK 4
#define WAKEUP_BY_ASYNC_INTERRUPT 5
#define WAKEUP_ASYNCHRONOUS_ULPD_0 6
#define WAKEUP_ASYNCHRONOUS_SLEEP_DURATION_0 7
// Big Sleep source for Power management
//-------------------------------------
#define BIG_SLEEP_DUE_TO_UNDEFINED 0 // deep sleep is forbiden : cause undefined
#define BIG_SLEEP_DUE_TO_LIGHT_ON 1 // deep sleep is forbiden by ligth on activitie
#define BIG_SLEEP_DUE_TO_UART 2 // deep sleep is forbiden by UART activitie
#define BIG_SLEEP_DUE_TO_SIM 3 // deep sleep is forbiden by SIM activitie
#define BIG_SLEEP_DUE_TO_GAUGING 4 // deep sleep is forbiden by not enought gauging
#define BIG_SLEEP_DUE_TO_SLEEP_MODE 5 // deep sleep is forbiden by the sleep mode enabled
#define BIG_SLEEP_DUE_TO_DSP_TRACES 6 // deep sleep is forbiden by the DSP
#define BIG_SLEEP_DUE_TO_BLUETOOTH 7 // deep sleep is forbiden by the Bluetooth module
#define BIG_SLEEP_DUE_TO_CAMERA 8 // deep sleep is forbiden by the camera
void Trace_Packet_Transfer (UWORD8 prev_crc_error); // Previous RX blocks CRC_ERROR summary
void l1_display_buffer_trace_fct(void);
//===================================================
//=========== BUFFER TRACE ==========================
//===================================================
// buffer size
#define TRACE_FCT_BUFF_SIZE 40
////////////////
// fonctions id
/////////////////
// fonction name to display
#ifdef L1_TRACE_C
#if (TRACE_TYPE==5) || TRACE_FULL_NAME
const char string_fct_trace[][35]={
// L1S_CTRL_XXXXX
"l1s_ctrl_ADC()",
"l1s_ctrl_msagc()",
"l1s_ctrl_sb2()",
"l1s_ctrl_sb26()",
"l1s_ctrl_sb51()",
"l1s_ctrl_sbconf()",
"l1s_ctrl_sbcnf26()",
"l1s_ctrl_sbcnf51()",
"l1s_ctrl_fb()",
"l1s_ctrl_fb26()",
"l1s_ctrl_smscb()",
"l1s_ctrl_snb_dl()",
"l1s_ctrl_snb_dl(burst 0)",
"l1s_ctrl_snb_dl(burst 1)",
"l1s_ctrl_snb_dl(burst 2)",
"l1s_ctrl_snb_dl(burst 3)",
"l1s_ctrl_snb_ul()",
"l1s_ctrl_nnb()",
"l1s_ctrl_rach()",
"l1s_ctrl_tcht_dummy(DL)",
"l1s_ctrl_tchth(DL)",
"l1s_ctrl_tchth(UL)",
"l1s_ctrl_tcha(DL)",
"l1s_ctrl_tcha(UL)",
"l1s_ctrl_tchtf(DL)",
"l1s_ctrl_tchtf(UL)",
// L1PS_CTRL_XXXXX
"l1ps_ctrl_poll()",
"l1ps_ctrl_snb_dl",
"l1ps_ctrl_single()",
"l1ps_ctrl_pbcchs()",
"l1ps_ctrl_pbcchn()",
"l1ps_ctrl_itmeas()",
"l1ps_ctrl_pdtch",
"l1ps_ctrl_pdtch(UL)",
"l1ps_ctrl_pdtch(DL)",
"l1ps_ctrl_pdtch(DL burst0)",
"l1ps_ctrl_pdtch(DL burst1)",
"l1ps_ctrl_pdtch(DL burst2)",
"l1ps_ctrl_pdtch(DL burst3)",
"l1ps_ctrl_pdtch(RA)",
"l1ps_ctrl_pdtch(dummy)",
"l1ps_ctrl_ptcch(UL)",
"l1ps_ctrl_ptcch(empty)",
"l1ps_ctrl_ptcch(DL burst0)",
"l1ps_ctrl_ptcch(DL burst1)",
"l1ps_ctrl_ptcch(DL burst2)",
"l1ps_ctrl_ptcch(DL burst3)",
// others CTRL
"ctrl_cr_meas",
"ctrl_i_ba_meas",
"ctrl_d_ba_meas",
"ctrl_tcr_meas_1",
"ctrl_tcr_meas_2",
"ctrl_pc_meas_chan",
"ctrl_transfer_meas",
"ctrl_full_list_meas",
"ctrl_Scell_transfer_meas",
// L1S_READ_XXXXX
"l1s_read_ra()",
"l1s_read_nnb",
"l1s_read_snb_dl",
"l1s_read_tx_nb(DUL)",
"l1s_read_tx_nb(AUL)",
"l1s_read_tx_nb(TCHF)",
"l1s_read_tx_nb(TCHH)",
"l1s_read_fb()",
"l1s_read_fb51()",
"l1s_read_fb26()",
"l1s_read_sb()",
"l1s_read_sbconf()",
"l1s_read_l3frm(CB)",
"l1s_read_l3frm(NP)",
"l1s_read_l3frm(EP)",
"l1s_read_l3frm(ALLC)",
"l1s_read_l3frm(NBCCHS)",
"l1s_read_l3frm(EBCCHS)",
"l1s_read_l3frm(BCCHN)",
"l1s_read_sacch_dl(ADL)",
"l1s_read_sacch_dl(TCHA)",
"l1s_read_dcch_dl(DDL)",
"l1s_read_dcch_dl(TCHTF)",
"l1s_read_dcch_dl(TCHTH)",
"l1s_read_dedic_dl",
"l1s_read_mon_result",
"l1s_read_dummy",
"l1s_read_msagc()",
// L1PS_READ_XXXXX
"l1ps_read_nb_dl",
"l1ps_read_itmeas()",
"l1ps_read_single",
"l1ps_read_single_dummy",
"l1ps_read_l3frm(PNP)",
"l1ps_read_l3frm(PEP)",
"l1ps_read_l3frm(PALLC)",
"l1ps_read_l3frm(PBCCHS)",
"l1ps_read_l3frm(PBCCHN)",
"l1ps_read_l3frm(SINGLE)",
"l1ps_read_l3frm(?)",
"l1ps_read_pra()",
"l1ps_read_poll()",
" l1ps_read_pdtch()",
"l1ps_read_pdtch(burst)",
"l1ps_read_ptcch(DL)",
"l1ps_read_ptcch(UL)",
// others READ
"read_cr_meas",
"read_tcr_meas",
"read_i_ba_meas",
"read_d_ba_meas",
"read_pc_meas_chan",
"read_full_list_meas",
// miscellaneous
"SYNCHRO...",
"L1S_ABORT...",
"L1S_ABORT(PAGE:R0 W0)",
"unknown_fb()",
"STI PASSED...",
"task KILLED...",
"ALLOC EXHAUSTION",
"UL task does not correspond",
"DL task does not correspond",
"DL burst does not correspond",
"=>NEW_FRAME(PAGE:R0 W0)",
"=>NEW_FRAME(PAGE:R0 W1)",
"=>NEW_FRAME(PAGE:R1 W0)",
"=>NEW_FRAME(PAGE:R1 W1)",
"l1dmacro_synchro",
"tx_tch_data()",
"dll_read_dcch()",
"dll_read_sacch()",
"Time adjustment",
};
#endif
#endif // L1_TRACE_C
//===================================================
//=========== BUFFER TRACE END ======================
//===================================================
#if (OP_L1_STANDALONE == 0)
// Dynamic trace: message content
//-------------------------------
#define DYN_TRACE_0 0
#define DYN_TRACE_1 1
#define DYN_TRACE_2 2
#define DYN_TRACE_3 3
#define DYN_TRACE_4 4
#define DYN_TRACE_5 5
#define DYN_TRACE_6 6
#define DYN_TRACE_7 7
#define DYN_TRACE_8 8
#define DYN_TRACE_9 9
#define DYN_TRACE_10 10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -