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

📄 testjtagdll.h

📁 用于TM1300/PNX1300系列DSP(主要用于视频处理)的jtag接口程序
💻 H
字号:
/* testjtagdll.h                 */
/* Header file for testjtagdll.c */

typedef unsigned char  uchar;
typedef unsigned short ushort;
typedef unsigned long  ulong;


//TriMedia JTAG instructions TM1 series 

#define JTAG_RESET			16	/* TM chip reset via JTAG does not work */
#define JTAG_SEL_DATA_IN	17
#define JTAG_SEL_DATA_OUT	18
#define JTAG_SEL_IFULL_IN	19
#define JTAG_SEL_OFULL_OUT	20
#define JTAG_SEL_JTAG_CTRL	21
/*
 * new instruction for selecting the new CPU32 JTAG control register
 * that contains the IFULL bit.
 */
#define JTAG_SEL_JTAG_CTRL2	22

/*
 * the canned back control bits are still 5 bits long, from msb to lsb:
 *	NOSLEEP, IFULL, OFULL, 0, 1.
 * The last two bits are always 0 and 1 and we always shift them out.
 */
#define is_ofull(ctl)		((ctl) & 1)
#define is_ifull(ctl)		((ctl) & 2)

/*
 * JTAG_OFULL is the same for both TM1000 and CPU32
 */
#define JTAG_OFULL_BIT		1
/*
 * Control bits for TM1000
 */
#define JTAG_IFULL_BIT		2
#define JTAG_NOSLEEP_BIT	4
/*
 * JTAG Instruction register and Data register sizes, in number of bits
 */
#define JTAG_INS_LEN_BITS	5
#define JTAG_DATA_LEN_BITS	32
/*
 * JTAG Control register size for the TM1000
 */
#define JTAG_CTL_LEN_BITS	8


#define START_L2_LOAD_V0	0x12340000
#define START_L2_LOAD_V1	0x12340002
#define START_L2_LOAD_V2	0x12340003

#define JUMP_TO_L2_CODE		0x56780000


#define MAGIC_NUMBER 0x12345678		/* Start Magic Number sent by target program       */
#define SWAPPED_MAGIC 0x78563412	/* Swapped Magic number is sent by this driver app */
#define GOOD_BYE   0x00dead00		/* terminate string. signal to target to exit      */


#define L1_CODE_SIZE		0x840	/* L1 size + 64 byte hole = 0x840 */
#define UNINIT_LOAD_ADDR	((ulong)-1)

#define ROUND_TO_4(m)		((((m) + 3) >> 2) << 2)


typedef struct {

  long          pHandle;				/* processor id / process id	*/
  ulong			SDRAMbaseAddr;			/* SDRAM base					*/
  ulong			MMIObaseAddr;			/* MMIO base					*/
  ulong			DRAMLimit;				/* SDRAM Limit					*/
  ulong			CacheableLimit;			/* Cacheable Limit				*/
  ulong			LoadAddr;				/* Load Address					*/
  uchar			connOpen;				/* is connection open?			*/
  uchar			endian;					/* endianness (el or eb)		*/
  uchar         inUse;					/* is target/pid in use?		*/
  uchar			targType;				/* target type, common_def.h	*/
  
} TargetInfo;

⌨️ 快捷键说明

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