示例#1
0
static int
cmd_detect_run( char *params[] )
{
	if (cmd_params( params ) != 1)
		return -1;

	if (!cmd_test_cable())
		return 1;

	buses_free();
	parts_free( chain->parts );
	chain->parts = NULL;
	detect_parts( chain, JTAG_DATA_DIR );
	if (!chain->parts)
		return 1;
	if (!chain->parts->len) {
		parts_free( chain->parts );
		chain->parts = NULL;
		return 1;
	}
	parts_set_instruction( chain->parts, "SAMPLE/PRELOAD" );
	chain_shift_instructions( chain );
	chain_shift_data_registers( chain, 1 );
	parts_set_instruction( chain->parts, "BYPASS" );
	chain_shift_instructions( chain );

	return 1;
}
示例#2
0
/**
 * bus->driver->(*init)
 *
 */
static int
jopcyc_bus_init( bus_t *bus )
{
	part_t *p = PART;
	chain_t *chain = CHAIN;
	component_t *comp;

	if (tap_state(chain) != Run_Test_Idle) {
		/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
		   this is required to avoid interfering with detect when initbus
		   is contained in the part description file
		   bus_init() will be called latest by bus_prepare() */
		return URJTAG_STATUS_OK;
	}

	/* Preload update registers
	   See AN039, "Guidelines for IEEE Std. 1149.1 Boundary Scan Testing */

	part_set_instruction( p, "SAMPLE/PRELOAD" );
	chain_shift_instructions( chain );

	/* RAMA */
	comp = COMP_RAMA;
	set_data_in( bus, comp );
	part_set_signal( p, nCS, 1, 1 );
	part_set_signal( p, nWE, 1, 1 );
	part_set_signal( p, nOE, 1, 1 );
	part_set_signal( p, nLB, 1, 1 );
	part_set_signal( p, nUB, 1, 1 );

	/* RAMB */
	comp = COMP_RAMB;
	set_data_in( bus, comp );
	part_set_signal( p, nCS, 1, 1 );
	part_set_signal( p, nWE, 1, 1 );
	part_set_signal( p, nOE, 1, 1 );
	part_set_signal( p, nLB, 1, 1 );
	part_set_signal( p, nUB, 1, 1 );

	/* FLASH */
	comp = COMP_FLASH;
	set_data_in( bus, comp );
	part_set_signal( p, nCS,  1, 1 );
	part_set_signal( p, nWE,  1, 1 );
	part_set_signal( p, nOE,  1, 1 );
	part_set_signal( p, nCS2, 1, 1 );
	part_set_signal( p, nRDY, 0, 0 );

	/* Serial Port */
	part_set_signal( p, SER_RXD,  0, 0 );
	part_set_signal( p, SER_NRTS, 1, 1 );
	part_set_signal( p, SER_TXD,  1, 1 );
	part_set_signal( p, SER_NCTS, 0, 0 );

	chain_shift_data_registers( chain, 0 );

	INITIALIZED = 1;

	return URJTAG_STATUS_OK;
}
示例#3
0
文件: shift.c 项目: DerGenaue/usbprog
static int
cmd_shift_run( char *params[] )
{
	if (cmd_params( params ) != 2)
		return -1;

	if (!cmd_test_cable())
		return 1;

	if (strcmp( params[1], "ir" ) == 0) {
		chain_shift_instructions( chain );
		return 1;
	}
	if (strcmp( params[1], "dr" ) == 0) {
		chain_shift_data_registers( chain, 1 );
		return 1;
	}

	return -1;
}
示例#4
0
/**
 * bus->driver->(*init)
 *
 */
static int
s3c4510_bus_init( bus_t *bus )
{
	part_t *p = PART;
	chain_t *chain = CHAIN;

	if (tap_state(chain) != Run_Test_Idle) {
		/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
		   this is required to avoid interfering with detect when initbus
		   is contained in the part description file
		   bus_init() will be called latest by bus_prepare() */
		return URJTAG_STATUS_OK;
	}

        part_set_instruction( p, "SAMPLE/PRELOAD" );
        chain_shift_instructions( chain );
        chain_shift_data_registers( chain, 0 );

	INITIALIZED = 1;

	return URJTAG_STATUS_OK;
}
示例#5
0
static void
s3c4510_bus_prepare( bus_t *bus )
{
        part_set_instruction( PART, "EXTEST" );
        chain_shift_instructions( CHAIN );
}
示例#6
0
static void
ppc440gx_ebc8_bus_prepare( bus_t *bus )
{
	part_set_instruction( PART, "EXTEST" );
	chain_shift_instructions( CHAIN );
}