-- FIFODriver.spec

FIFODriver DEFINITION = {
IN GetSpaceAv,
GetDataAv,
GetDataOut(16)
OUT SetInit,
SetWriteRequest,
SetReadRequest,
SetDataIn(16)
STATE i, j
CONTROL
SetReadReq := FALSE;
SetWriteReq := FALSE;
SetInit := TRUE;
SetInit := FALSE;
par {
i := 0;
repeat {
when GetDataAv↑ :
if i=GetDataOut then error;
SetReadReq := TRUE;
SetReadReq := FALSE;
i := i+1;
if i>50 then exit }
\\
j := 0;
repeat {
when GetSpaceAv :
SetDataIn := i;
SetWriteReq := TRUE;
SetWriteReq := FALSE;
j := j+1;
if j>50 then exit }
}
} -- end of FIFODriver

FIFOTest IMPLEMENTATION = {
COMPONENTS
d: FIFODriver,
t: FIFO;
rReq, wReq, init, din, dout, sp, da: NODE
CONNECTIONS
d(SetReadReq: rReq, SetWriteReq: wReq, SetInit: init, GetDataIn: din,
GetDataOut: dout, GetSpaceAv: sp, GetDataAv: da),
t(ReadReq: rReq, WriteReq: wReq, Init: init, DataIn: din, DataOut: dout,
SpaceAv: sp, DataAv: da)} -- end of FIFOTest