SCTest.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Pradeep Sindhu, July 21, 1987 9:13:13 pm PDT
DIRECTORY
CD, Core, IO, Logic, Ports, Rope, Rosemary, RosemaryUser, Sisyph, TerminalIO;
SCTest: CEDAR PROGRAM
IMPORTS IO, Logic, Rosemary, RosemaryUser, Sisyph, TerminalIO
~ BEGIN
PortToRope: PROC [level: Ports.Level] RETURNS [r: Rope.ROPE] ~ {
r ← SELECT level FROM L => "L", H => "H", X => "X", ENDCASE => ERROR;
};
Run: PROC [obName: Rope.ROPE, design: CD.Design] = {
ENABLE {
Rosemary.Stop => {
TerminalIO.PutF["\n***Oracle completed normally\n"];
GOTO done
};
Logic.Disagreement => {
TerminalIO.PutF["\n***Disagreement in file %g at location %g. Should be %g is %g\n", IO.rope[oracleName], IO.int[index], IO.rope[PortToRope[shouldBe]], IO.rope[PortToRope[is]]]; GOTO done
}
};
ct: Core.CellType;
tester: RosemaryUser.Tester;
ct ← Sisyph.ES[obName, Sisyph.Create[design]];
tester ← Logic.RunRosemary[ct, design];
RosemaryUser.StartTest[tester];
EXITS
done => RETURN
};
END.