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

📄 tapctrl.h

📁 Jtag调试驱动的例子程序
💻 H
字号:
/*
 * tapctrl.h : the head file for tapctrl.c
 * 
 * Copyright (C) 2004, OPEN-JTAG, All rights reserved.
 */

#ifndef XJTAG_TAPCTRL_H
#define XJTAG_TAPCTRL_H


#include "types.h"
#include "jtag.h"


/* Public JTAG Instructions */
#define JTAG_EXTEST 			0x0
#define JTAG_SCAN_N				0x2
#define JTAG_SAMPLE_PRELOAD		0x3 	
#define JTAG_RESTART			0x4
#define JTAG_CLAMP				0x5
#define JTAG_HIGHZ				0x7
#define JTAG_CLAMPZ				0x9
#define JTAG_INTEST				0xC
#define JTAG_IDCODE				0xE
#define JTAG_BYPASS				0xF	


/* TAP Controller State Transitions*/
#define NUM_OF_STATES				0x10		//16 TAP States
#define TAPSTAT_UNDEFINED			0xFF

#define TAPSTAT_TSTLOG_RST			0xF
#define TAPSTAT_RUNTEST_IDLE		0xC
#define TAPSTAT_SELECT_DR_SCAN		0x7
#define TAPSTAT_CAPTURE_DR			0x6
#define TAPSTAT_SHIFT_DR			0x2	
#define TAPSTAT_EXIT1_DR			0x1
#define TAPSTAT_PAUSE_DR			0x3
#define TAPSTAT_EXIT2_DR			0x0
#define TAPSTAT_UPDATE_DR			0x5
#define TAPSTAT_SELECT_IR_SCAN		0x4
#define TAPSTAT_CAPTURE_IR			0xE
#define TAPSTAT_SHIFT_IR			0xA
#define TAPSTAT_EXIT1_IR			0x9
#define TAPSTAT_PAUSE_IR			0xB
#define TAPSTAT_EXIT2_IR			0x8
#define TAPSTAT_UPDATE_IR			0xD


typedef struct tap_state{
	int next_state[2];
} tap_state_t;


extern int tapctrl_init(void);
extern int tapctrl_reset(void);
extern int tapctrl_runtest(void);
extern int tapctrl_acs_ireg(u32 instruction);
extern int tapctrl_acs_dreg(int bit_len, const u32 *shift_in, u32 *shift_out);


#endif
/* end of tapctrl.h */

⌨️ 快捷键说明

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