//**************************************************************************************
//RDC2c.tst
//More Processor Interface Tests
//By J. F. Cameron
July 11, 1978
//Last modified by J. F. Cameron
June 13, 1980
//**************************************************************************************
//**************************************************************************************
//To include the following definition files in the compilation
get "tester.d"
get "RDC.d"

//**************************************************************************************
//To define bus structure
//{CTask: CTask.0, CTask.1, CTask.2, CTask.3}
//{IAddr: Iaddr.0, Iaddr.1, Iaddr.2, Iaddr.3, Iaddr.4, Iaddr.5, Iaddr.6, Iaddr.7}
//{OData: Odata.00, Odata.01, Odata.02, Odata.03, Odata.04, Odata.05, Odata.06, Odata.07, Odata.08, Odata.09, Odata.10, Odata.11, Odata.12, Odata.13, Odata.14, Odata.15}

//**************************************************************************************
//Test28
To test:MyTask; IOAttn

let Test28() be
[
L28: Start()
let addrval = table[ 10b; 4b; 2b; 1b ]

//SubTest28.1.n; Checks that NeedAttn controls IOAttn
SetCaddr(00b)
{CTask} = 00b
OData(ErrReset)
if not Compare("IOAttn’", {IOAttn’}, 1, "IOAttn not false; check that*n pull-up resistors are installed, NeedAttn gate, and IOAttn’ gate.", 2, 1) goto L28
{OFault’} = 0
OData(DevOpRegLd)//Sets OFaultF
EClock()
SetCaddr(00b)
if not Compare("IOAttn’", {IOAttn’}, 0, "IOAttn not set by Abort; check*n MyTask gates, NeedAttn gate, and IOAttn’ gate.", 2, 1, 1) goto L28

//Checks that CTask and Caddr form MyTask
for n = 0 to 3 do//Each bit position checked on each goto L28
[
//SubTest28.2.n; CTask.n = 0; Caddr.n = 1
{CTask} = 00b
SetCaddr(addrval!n)
if not Compare("IOAttn’", {IOAttn’}, 1, "IOAttn true with Caddr*n not equal to CTask; check MyTask gates.", 2, 2, n) goto L28

//SubTest28.3.n; CTask.n = 1; Caddr.n = 1
{CTask} = addrval!n
if not Compare("IOAttn’", {IOAttn’}, 0, "IOAttn not true with Caddr*n equal to CTask; check MyTask gates.", 2, 3, n) goto L28

//SubTest28.4.n; CTask.n = 1; Caddr.n = 0
SetCaddr(00b)
if not Compare("IOAttn’", {IOAttn’}, 1, "IOAttn true with Caddr*n not equal to CTask; check MyTask gates.", 2, 4, n) goto L28
]

if Stop() goto L28
return
]