SunMouseXilinx.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Barth, July 15, 1988 12:53:27 pm PDT
DIRECTORY
Core, Rosemary, RosemaryUser, Ports;
SunMouseXilinx: CEDAR PROGRAM
IMPORTS Rosemary, RosemaryUser, Ports =
BEGIN OPEN Ports;
SunMousePorts: TYPE = REF SunMousePortsRec;
SunMousePortsRec: TYPE = RECORD[
Clock, X1, X2, Y1, Y2, L, M, R, SerialOut: Port ← NIL];
SunMouseTestProc: RosemaryUser.TestProc = {
ports: SunMousePorts ← Initialize[p, cellType.public, Eval ! Rosemary.Stop => IF reason = $BoolWireHasX THEN RESUME ELSE REJECT];
{OPEN ports;
PB[L, TRUE, force];
PB[X1, TRUE, force];
CycleClock[ports, Eval];
DO
CycleClock[ports, Eval];
ENDLOOP;
}};
Initialize: PROC [p: Ports.Port, public: Core.Wire, eval: RosemaryUser.TestEvalProc] RETURNS [ports: SunMousePorts]= {
ports ← NEW[SunMousePortsRec];
{OPEN ports;
[Clock, X1, X2, Y1, Y2] ← Ports.BindPorts[public, p, "Clock", "X1", "X2", "Y1", "Y2"];
[L, M, R, SerialOut] ← Ports.BindPorts[public, p, "L", "M", "R", "SerialOut"];
PB[X1, FALSE, force];
PB[X2, FALSE, force];
PB[Y1, FALSE, force];
PB[Y2, FALSE, force];
PB[L, FALSE, force];
PB[M, FALSE, force];
PB[R, FALSE, force];
PB[SerialOut, FALSE, none];
CycleClock[ports, eval];
}};
CycleClock: PROC [ports: SunMousePorts, eval: RosemaryUser.TestEvalProc] = {
OPEN ports;
PB[Clock, FALSE, force];
eval[clockEval: TRUE];
eval[clockEval: FALSE];
PB[Clock, TRUE, force];
eval[clockEval: TRUE];
eval[clockEval: FALSE];
};
RosemaryUser.RegisterTestProc["SunMouse", SunMouseTestProc];
END.