KEPCO TMA VXI-27 User Manual

Page 76

Advertising
background image

TMA VXI-27 101602

F-5

FmtOut(“%s<\n Value of ret_value = %x[w4]”,ret_value);

TestOk = 0;

}

if (retcount != 5)

FmtOut(“%s<\n length= %i[b4w4] instead of 5”,retcount);

}

if(TestOk){

/* put in resp_buff the answer */

ret_value = WSrd(adr_tst,resp_buff,77L,1,&retcount);

if (ret_value < 0){

FmtOut(“%s<\n Value of ret_value = %x[w4]”,ret_value);

TestOk = 0;

}

}

if(TestOk){

/**************************************************************************

The following code will test the VXI

interrupts on Levels 1-7 as a VXI signal.

**************************************************************************/

for(i=1;i<=7;i++){

/* now execute ASSIGN INTERRUPTER LINE command to level i */

cmmd = 0xaa10 + i;

ret_value = WScmd(adr_tst,cmmd,1,&value);

if (value != 0xfffe){

FmtOut(

“%s<\n **ERR 20 ASGN_INT_LINE result is %x instead of fffe”

,value);

TestOk = 0;

}

if(TestOk){

/* use READ INTERRUPTER LINE to verify the assignement */

ret_value = WScmd(adr_tst,0x8D01,1,&value);

if (ret_value < 0){

FmtOut(

“%s<\n **ERR 22 RD_INT_LINE result is %x instead of 0”

,ret_value);

TestOk = 0;

}

ret_value = (value)&(7);

FmtOut(“%s<\n **interrupter connected to IRQ%x “,ret_value);

/* The following code routes level i to Signal handler and

the rest to the VXI interrupt Handler */

controller = -1;

MySroute = (1 << (i-1));

retval = RouteVXIint(controller, MySroute);

/* The following code enables VXI interrupts for level i */

levels = (1 << (i-1));

retval = EnableVXItoSignalInt(controller,levels);

/* now whenever there is a VXI interrupt on Level i it will be

treated as a VXI signal and will be handled as indicated by

the RouteSignal function. All the signals from the tested

logical address are enqueued on the signal queue and none

are handled by the signal handler */

Advertising