resext.h

来自「OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI」· C头文件 代码 · 共 339 行

H
339
字号
/* ============================================================================
*
*            TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
*
*   Property of Texas Instruments
*   For Unrestricted Internal Use Only 
*   Unauthorized reproduction and/or distribution is strictly prohibited.
*   This product is protected under copyright law and trade secret law as an 
*   unpublished work.
*   Created 2003, (C) Copyright 2003 Texas Instruments.  All rights reserved.
*
*   Component:     RES - Results via SPy for cosimulation of OMAP2420 proj
*    
*   Filename:      RESExt.h           
*    
*   Description:   Contains functions to write amd dump cosimulation results 
*                  using spy block.
*
*                  This file provides an interface for functions which are
*                  used by the OMAP4 library and which MUST be implemented
*                  by each project that uses the OMAP4 library.
*
*    Available Functions:
*           Common 
*                  RES_Set - Sets a value in results table
*                  RES_SetVar - Sets a variable (post error) in results table
*                  RES_GetCurrentStatus - Get current error status
*        ARM11 only
*                  RES_SetLocation - Sets the location in memory
*                  RES_SetArray - Writes array that will not be parsed at end.
*                  RES_GetDspSpy - Copy DSP local Spy to the System Spy Area
*                  RES_GetIvaSpy - Copy IVA local Spy to the System Spy Area
*                  RES_End - End spy simulation by writing 'illegal' value.
*                  RES_GetFinalStatus - Gets final error status
*           IVA/DSP
*                  RES_Init - Initialises RESExt lib on IVA/DSP
*                  RES_SetSpyRealTime - Enable/Disable Real Time Spy logging
*                  RES_GetTestStatus - Checks for errors value written to spy area
*          IVA only
*                  RES_SendIvaSpy - Sends to SPY (ARM11), IVA spy results.
*          DSP only
*                  RES_SendDspSpy - Sends to SPY (ARM11), DSP spy results.
*
*   Domain:     ARM11/IVA/DSP
*
*   Board:      Simulation only
*
*   Fucntional Specifcation Version: N/A
*
*   Validating Test Cases: spy_gpmc spy_sdrc spy_ext
*    
* =============================================================================
*/
#ifndef __RESEXT_H
#define __RESEXT_H

/* ============================================================================
* INCLUDE FILES (only if necessary)
* =============================================================================
*/
#ifdef __cplusplus
extern "C"
{
#endif

/* ============================================================================
* EXPORTED DEFINITIONS
* =============================================================================
*/
#include "global_types.h"
/* ----------------------------------------------------------------------------
* Definition: RES_*_BASE
*
* DESCRIPTION: Base Value (Upper Byte) for library components
*
* -----------------------------------------------------------------------------
*/
#define RES_TESTCASE_BASE       0x0000
#define RES_MBOX_BASE           0x0100
#define RES_ARM11_BASE          0x0200
#define RES_DSPIPI_BASE         0x0300
#define RES_GPMCTL_BASE         0x0400
#define RES_INTCTL_BASE         0x0500
#define RES_LCDCTL_BASE         0x0600
#define RES_MMU_BASE            0x0700
#define RES_RFBIF_BASE          0x0800
#define RES_SDRCTL_BASE         0x0900
#define RES_SDRMS_BASE          0x0a00
#define RES_SSM_BASE            0x0b00
#define RES_SYSDMA_BASE         0x0c00
#define RES_WT_BASE             0x0d00
#define RES_RES_BASE            0x0e00
#define RES_PROJ_BASE           0x0f00
#define RES_INTH_BASE           0x1000
#define RES_EASI_BASE           0x1100
#define RES_GPTMR_BASE          0x1200
#define RES_WDTMR_BASE          0x1300
#define RES_MMCSD_BASE          0x1400
#define RES_EXCPTH_BASE         0x1500
#define RES_SYSCFG_BASE         0x1600
#define RES_PRCM_BASE           0x1700
#define RES_IMTMC_BASE          0x1800
#define RES_TMGEN_BASE          0x1900
#define RES_TML4_BASE           0x1a00 
#define RES_IMGEN_BASE          0x1b00
#define RES_IMARM_BASE          0x1c00
#define RES_XBEXM_BASE          0x1d00
#define RES_XBOCM_BASE          0x1e00
#define RES_FWGPM_BASE          0x1f00
#define RES_FWDSP_BASE          0x2000
#define RES_FWIVA_BASE          0x2100
#define RES_FWC2C_BASE          0x2200
#define RES_FWRAM_BASE          0x2300
#define RES_FWROM_BASE          0x2400
#define RES_L4_BASE             0x2500
#define RES_SPGPIO_BASE         0x2600
#define RES_MSI2C_BASE          0x2700
#define RES_MCBSP_BASE          0x2800
#define RES_UART_BASE           0x2900
#define RES_CAMCOR_BASE         0x2a00
#define RES_CAMTOP_BASE         0x2b00
#define RES_HDQ1W_BASE          0x2c00
#define RES_SPI_BASE            0x2d00
#define RES_CAMDMA_BASE         0x2e00
#define RES_CAMMMU_BASE         0x2f00
#define RES_VLYNQ_BASE          0x3000
#define RES_VLYNQ2OCP_BASE      0x3100
#define RES_ROMCODE_BASE        0x3200
#define RES_STMR_BASE           0x3300
#define RES_MG1_BASE            0x3400
#define RES_MSPRO_BASE          0x3500
#define RES_SSI_BASE            0x3600
#define RES_MSG_BASE            0x3700
#define RES_IVAINIT_BASE        0x3800
#define RES_FAC_BASE            0x3900
#define RES_USB_BASE            0x3a00
#define RES_DMA4_BASE           0x3b00
#define RES_IVAL_BASE           0x3c00
#define RES_L3_BASE             0x3d00
#define RES_IVADMAL_BASE        0x3e00
#define RES_VIDEOCONF_BASE      0x3f00
#define RES_DSS_BASE            0x4000
#define RES_SYSMEM_BASE         0x4100

/* Cartier Targets Ports */
#define RES_L3TMSB2SMS_BASE     0x5000
#define RES_L3TMSB2GPMC_BASE    0x5100
#define RES_L3TML4_BASE         0x5200
#define RES_L3TMSB2OCM_BASE     0x5300
#define RES_L3TMDSPMEM_BASE     0x5400
#define RES_L3TMGFXT_BASE       0x5500
#define RES_L3TMC2C_BASE        0x5600
#define RES_L3TMSPARET_BASE     0x5700
#define RES_L3TMIVAT_BASE       0x5800
#define RES_L3TMARM2SB_BASE     0x5900

/* Cartier Initiators Ports */
#define RES_L3IMARM2SB_BASE     0x6000
#define RES_L3IMPDMAR_BASE      0x6100
#define RES_L3IMPDMAW_BASE      0x6200
#define RES_L3IMLCD_BASE        0x6300
#define RES_L3IMCAM_BASE        0x6400
#define RES_L3IMIVAI_BASE       0x6500
#define RES_L3IMC2CI_BASE       0x6600
#define RES_L3IMUSB_BASE        0x6700
#define RES_L3IMDSP2SB_BASE     0x6800
#define RES_L3IMSSI_BASE        0x6900

/* Cartier CrossBar Ports */
#define RES_L3XBSMS_BASE        0x7000
#define RES_L3XBGPMC_BASE       0x7100
#define RES_L3XBOCMCRAM_BASE    0x7200
#define RES_L3XBOCMCROM_BASE    0x7300

/* Processors TC */
#define RES_A11_TC_BASE         0xA000
#define RES_IVA_TC_BASE         0xB000
#define RES_DSP_TC_BASE         0xD000



/* writing this value to make arrays more visible */
#define RES_START_ARRAY_BASE    0xEE00

/* writing this value will cause simulation to exit */
#define RES_INVALID_BASE        0xFF00


/* ----------------------------------------------------------------------------
* Definition: RES_MIN_*_VAL,RES_MAX_*_VAL
*
* DESCRIPTION: The ranges of PASS and FAIL values of lower byte that can written 
*              to results table spy 
*
* -----------------------------------------------------------------------------
*/
/* range of good / OK result values */
#define RES_MIN_OK_VAL          0x0000
#define RES_MAX_OK_VAL          0x000F

/* range of bad / fail result values */
#define RES_MIN_BAD_VAL         0x0010
#define RES_MAX_BAD_VAL         0x00FE

/* ----------------------------------------------------------------------------
* Definition: RES_*_*
*
* DESCRIPTION: List of Good/Pass results values
*
* -----------------------------------------------------------------------------
*/
/* list of good / OK result values */
#define RES_TEST_PASSED                 0x0000 + RES_MIN_OK_VAL
#define RES_SPY_INIT_OK                 0x0001 + RES_MIN_OK_VAL
#define RES_INIT_OK                     0x0002 + RES_MIN_OK_VAL
#define RES_FINISHED_OK                 0x0003 + RES_MIN_OK_VAL

#define RES_SEPERATOR                   0x0005 + RES_MIN_OK_VAL
#define RES_RESET_VALUE_SEPARATOR       0x0006 + RES_MIN_OK_VAL
#define RES_MODULE_SEPARATOR            0x0007 + RES_MIN_OK_VAL
#define RES_GLOBAL_TEST_SEPARATOR       0x0008 + RES_MIN_OK_VAL

#define RES_START_ARRAY                 0x000E + RES_MIN_OK_VAL

#define RES_NOP_VALUE                   0x000F + RES_MIN_OK_VAL

/* ----------------------------------------------------------------------------
* Definition: RES_*_*
*
* DESCRIPTION: List of Bad/Fail results values
*
* -----------------------------------------------------------------------------
*/
/* list of bad / fail result values */
#define RES_TEST_FAILED                 0x0000 + RES_MIN_BAD_VAL
#define RES_NOT_FINISHED                0x0001 + RES_MIN_BAD_VAL
#define RES_FINISHED_BAD                0x0002 + RES_MIN_BAD_VAL
#define RES_INIT_BAD                    0x0003 + RES_MIN_BAD_VAL
#define RES_DEINIT_BAD                  0x0004 + RES_MIN_BAD_VAL

#define RES_TIMEOUT_ERR                 0x0006 + RES_MIN_BAD_VAL
#define RES_BUSY                        0x0007 + RES_MIN_BAD_VAL

#define RES_LIB_FAIL                    0x0010 + RES_MIN_BAD_VAL
#define RES_READ_FAIL                   0x0011 + RES_MIN_BAD_VAL
#define RES_WRITE_FAIL                  0x0012 + RES_MIN_BAD_VAL
#define RES_RESET_FAIL                  0x0013 + RES_MIN_BAD_VAL
#define RES_CLEAR_FAIL                  0x0014 + RES_MIN_BAD_VAL
#define RES_SET_FAIL                    0x0015 + RES_MIN_BAD_VAL
#define RES_GET_FAIL                    0x0016 + RES_MIN_BAD_VAL
#define RES_ENABLE_FAIL                 0x0017 + RES_MIN_BAD_VAL
#define RES_DISABLE_FAIL                0x0018 + RES_MIN_BAD_VAL
#define RES_OPEN_FAIL                   0x0019 + RES_MIN_BAD_VAL
#define RES_CLOSE_FAIL                  0x001A + RES_MIN_BAD_VAL
#define RES_START_FAIL                  0x001B + RES_MIN_BAD_VAL
#define RES_STOP_FAIL                   0x001C + RES_MIN_BAD_VAL

#define RES_INVALID_INPUT_PARAM         0x0020 + RES_MIN_BAD_VAL
#define RES_DATA_MISMATCH               0x0021 + RES_MIN_BAD_VAL
#define RES_INPUT_CHECK_FAIL            0x0022 + RES_MIN_BAD_VAL
#define RES_TABLE_FULL_FAIL             0x0023 + RES_MIN_BAD_VAL

#define RES_EXCPT_UNDEFINED             0x0030 + RES_MIN_BAD_VAL
#define RES_EXCPT_PREFETCH_ABORT        0x0031 + RES_MIN_BAD_VAL
#define RES_EXCPT_DATA_ABORT            0x0032 + RES_MIN_BAD_VAL

/* user specific range which users can define on a case by case 
    basis in individual source files.  */
#define RES_USER_ERR_MIN                0x00C0 + RES_MIN_BAD_VAL
#define RES_USER_ERR_MAX                0x00DF + RES_MIN_BAD_VAL

/* beach failures */
#define RES_POR_FAIL                    0x00E0 + RES_MIN_BAD_VAL
#define RES_RI_FAIL_ONES                0x00E1 + RES_MIN_BAD_VAL
#define RES_RI_FAIL_FIVES               0x00E2 + RES_MIN_BAD_VAL
#define RES_RI_FAIL_AAAAS               0x00E3 + RES_MIN_BAD_VAL
#define RES_RI_FAIL_ZEROS               0x00E4 + RES_MIN_BAD_VAL
#define RES_RO_FAIL                     0x00E5 + RES_MIN_BAD_VAL
#define RES_WO_FAIL                     0x00E6 + RES_MIN_BAD_VAL
#define RES_RE_UP_POWER_ON_FAIL         0x00E7 + RES_MIN_BAD_VAL
#define RES_RE_UP_ONES_FAIL             0x00E8 + RES_MIN_BAD_VAL
#define RES_RE_UP_ZEROS_FAIL            0x00E9 + RES_MIN_BAD_VAL
#define RES_RE_DOWN_POWER_ON_FAIL       0x00EA + RES_MIN_BAD_VAL
#define RES_RE_DOWN_ONES_FAIL           0x00EB + RES_MIN_BAD_VAL
#define RES_RE_DOWN_ZEROS_FAIL          0x00EC + RES_MIN_BAD_VAL

/* writing this value will cause simulation to exit */
#define RES_INVALID_VAL                 0x00FF

/* ----------------------------------------------------------------------------
* Definition: RES_BADD_VALUE
*
* DESCRIPTION: Value that gets written to resutls table when a value that would 
*              end simulation is written to SPY by RES_SetVar();
*
* -----------------------------------------------------------------------------
*/
#define RES_BADD_VALUE                  0xBADD


/* ============================================================================
* EXPORTED TYPES
* =============================================================================
*/


/* ----------------------------------------------------------------------------
* TYPE:         
*
* DESCRIPTION:   
*
* -----------------------------------------------------------------------------
*/

/* ============================================================================
* EXPORTED VARIABLES
* =============================================================================
*/

#ifdef __MPU__
/* ----------------------------------------------------------------------------
* VARIABLE:     RES_IntTable    
*
* DESCRIPTION:  Results Internal Table. This is only a global variable such that
*               it will be easy to inspect in debugger. 
*
* -----------------------------------------------------------------------------
*/
extern UWORD16 RES_IntTable[]; 
#endif /* __MPU__ */



#ifdef __cplusplus
}
#endif
#endif	/* __RESEXT_H */

⌨️ 快捷键说明

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