//**************************************************************************************
//RDC9a.tst
//More Wake Generator Tests
//By J. F. CameronJuly 11, 1978
//Last modified by J. F. CameronJune 12, 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}
//{WakeP’: WakeP3’, WakeP2’, WakeP1’}
//**************************************************************************************
//Test92To test:Data Wake Count
let Test92() be
[
L92: Start()
EnableDevClk()
for n = 0 to 2 do//Generates ByteClk
[
OData(TestRegLd, 405b)
OData(TestRegLd, 404b)
]
OData(DevOpRegLd, 4000b)//Sets AllowWake
SetCaddr()
{CTask} = Caddr
{IOStrobe} = 1
EClock()//Sets MyStrobeF
{IOStrobe} = 0
EClock()//Resets WakeReqF
//SubTest92.1.0; checks that counter is reset
{Phase1Next’} = 0
{CTask} = 0
EClock()//Should not set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "WakeRequest not reset;*n check Wake Counter and WakeRequest gate.", 2, 1) goto L92
//SubTest92.2.0; checks that counter increments and causes wake
{dDataWake} = 1
EClock()//Sets DataWake
{dDataWake} = 0
EClock()//Should increment counter
{Phase1Next’} = 0
EClock()//Should set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 5b, "WakeRequest not set*n by Wake Counter; check DataWake FF, Wake Counter, and WakeRequest gate.", 2, 2) goto L92
//SubTest92.3.0; checks that counter decrements
{CTask} = Caddr
{IOStrobe} = 1
EClock()//Sets MyStrobeF
{IOStrobe} = 0
EClock()//Should decrement counter
{CTask} = 0
{Phase1Next’} = 0
EClock()//Should reset Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "WakeRequest not reset;*n check Wake Counter.", 2, 3) goto L92
//SubTest92.4.0; checks that counter increments to max
{dDataWake} = 1
EClock()//Sets DataWake
for n = 0 to 13 do [ EClock() ]//Should increment counter to max - 1
{dDataWake} = 0
{Phase1Next’} = 0
EClock()//Should set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 5b, "WakeRequest not set*n by Wake Counter after 15 increments; check Wake Counter.", 2, 4) goto L92
//SubTest92.4.1; checks that counter does not increment beyond max
{dDataWake} = 1
EClock()//Sets DataWake
{dDataWake} = 0
{Phase1Next’} = 0
EClock()//Should set Transmit
EClock()//Should set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 5b, "Wake Counter incremented*n beyond max; check WakeCounter enable gates.", 2, 4, 1) goto L92
//SubTest92.4.2; checks that counter decrements to 0
{CTask} = Caddr
{IOStrobe} = 1
for n = 0 to 14 do [ EClock() ]//Should decrement counter to 1
{IOStrobe} = 0
EClock()//Should decrement counter to 0; resets MyStrobeF
{CTask} = 0
{Phase1Next’} = 0
EClock()//Transmit should remain reset
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "WakeRequest not reset*n by Wake Counter after 15 decrements; check Wake Counter.", 2, 4, 2) goto L92
//SubTest92.4.3; checks that counter does not decrement below 0
{CTask} = Caddr
{IOStrobe} = 1
EClock()//Sets MyStrobeF
{IOStrobe} = 0
EClock()//Should not decrement counter
{CTask} = 0
{Phase1Next’} = 0
EClock()//Transmit should remain reset
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "Wake Counter decremented*n below 0; check WakeCounter enable gates.", 2, 4, 3) goto L92
//SubTest92.4.4; checks that DataWake & MyStrobeF are mutually exclusive
{CTask} = Caddr
{IOStrobe} = 1
{dDataWake} = 1
for n = 0 to 7 do [ EClock() ]
{IOStrobe} = 0
{dDataWake} = 0
EClock()
{CTask} = 0
{Phase1Next’} = 0
EClock()//Transmit should remain reset
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "WakeRequest not reset*n by Wake Counter after both DataWake and MyStrobeF true;*n check Wake Counter count enable gate.", 1, 4, 4) goto L92
//SubTest92.5.n; checks RateError and IOAttn
//SubTest92.5.0; checks RateError...Checking for RateError reset in SubTest92.7.0...
{dDataWake} = 1
{dRateErrorPossible} = 1
for n = 0 to 1 do [ EClock() ]//Counter = 1
{dDataWake} = 0
EClock()//Counter = 2
{dRateErrorPossible} = 0
EClock()//SetsRateError FF; counter = 2
IData(Status)
let rater = (idt & 400b) rshift 8
if not Compare("RateError", rater, 1, "RateError not true; check*n Wake Counter, RateErrorPossible FF, RateError FF,*n and Status Idata.07.", 1, 5) goto L92
//SubTest92.5.1; checks IOAttn
{CTask} = Caddr
if not Compare("IOAttn’", {IOAttn’}, 0, "IOAttn not set by RateError;*n check NeedAttn gate.", 2, 5, 1) goto L92
//SubTest92.6.n; checks that DataReq inhibits reset of WakeReqF by IOStrobe
{dSectorWake’} = 1
for n = 0 to 2 do//Generates ByteClk; sets SectorWake & SectorWakeS
[
OData(TestRegLd, 405b)
OData(TestRegLd, 404b)
]
{dSectorWake’} = 0
for n = 0 to 2 do//Generates ByteClk
[
OData(TestRegLd, 405b)
OData(TestRegLd, 404b)
]
EClock()//Resets SectorWakeS; WakeReqF should be set
{dDataWake} = 1
for n = 0 to 1 do [ EClock() ]//Counter = 1
{dDataWake} = 0
EClock()//Counter = 2
//SubTest92.6.0; checks that WakeReqF remains set when DataReq is true
{IOStrobe} = 1
EClock()//Sets MyStrobeF
EClock()//Decrements counter to 1
{IOStrobe} = 0
EClock()//Decrements counter to 0
{CTask} = 0
{Phase1Next’} = 0
EClock()//Should set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 5b, "WakeRequest not set;*n check dWakeReqF’.", 2, 6) goto L92
//SubTest92.6.1; checks that WakeReqF is reset when DataReq is false
OData(ErrReset)
{CTask} = Caddr
{IOStrobe} = 1
EClock()
{IOStrobe} = 0
EClock()//Should reset WakeReqF
{CTask} = 0
{Phase1Next’} = 0
EClock()//Should not set Transmit
{Phase1Next’} = 1
if not Compare("WakeP[0:2]", {WakeP’}, 7b, "WakeRequest not reset;*n check dWakeReqF’.", 2, 6, 1) goto L92
//SubTest92.7.0; checks RateError reset
IData(Status)
let rater = (idt & 400b) rshift 8
if not Compare("RateError", rater, 0, "RateError not reset; check*n RateError FF and RstAbrt/Err.", 2, 7, 0 ) goto L92
if Stop() goto L92
return
]