MCStateMachine.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by: Sindhu, June 20, 1985 7:04:53 pm PDT
Last Edited by: Sindhu, July 8, 1985 0:13:46 am PDT
DIRECTORY
AlpsBool, MCCtl;
MCStateMachine: CEDAR PROGRAM
IMPORTS AlpsBool, MCCtl
EXPORTS MCCtl =
BEGIN OPEN AlpsBool, MCCtl;
StateMachine: PUBLIC PROC [table: TableOfVariables] = {
mcop: Expression;
CyclexAB: ARRAY [0..1] OF Expression;
ResetxBA: Expression;
CycleABZeroxAB: Expression;
mcop ← And[table,
EqualInt[table, "CyclexBA", 0, 1, 0],
Not[Find[table, "nMAdCyclexBA"]],
Find[table, "MCSelectedxBA"],
Or[table,
And[table,
Not[Find[table, "MDataxBA[2]"]],
Or[table,
EqualInt[table, "MCmdxBA", 0, 3, 8],
EqualInt[table, "MCmdxBA", 0, 3, 9],
EqualInt[table, "MCmdxBA", 0, 3, 10],
EqualInt[table, "MCmdxBA", 0, 3, 12]]],
And[table,
Find[table, "MDataxBA[2]"],
Or[table,
EqualInt[table, "MCmdxBA", 0, 3, 8],
EqualInt[table, "MCmdxBA", 0, 3, 9]]]]];
CyclexAB[0] ← And[table,
Not[Find[table, "ResetxBA"]],
Xor[table, Find[table, "CyclexBA[0]"], Find[table, "CyclexBA[1]"]]];
CyclexAB[1] ← And[table,
Not[Find[table, "ResetxBA"]],
Not[Find[table, "CyclexBA[1]"]],
mcop];
ResetxBA ← Find[table, "ResetxBA"];
CycleABZeroxAB ← EqualInt[table, "CyclexAB", 0, 1, 0];
AddOutput[table, NEW[OutputRec ← [expr: CyclexAB[0], name: "CyclexAB[0]"]]];
AddOutput[table, NEW[OutputRec ← [expr: CyclexAB[1], name: "CyclexAB[1]"]]];
AddOutput[table, NEW[OutputRec ← [expr: ResetxBA, name: "ResetxBA"]]];
AddOutput[table, NEW[OutputRec ← [expr: CycleABZeroxAB, name: "CycleABZeroxAB"]]];
};
END.