SoftcardToolMiscButtonsImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Willie-Sue, March 4, 1987 4:02:56 pm PST
DIRECTORY
Buttons USING [Create],
IO,
Labels USING [Create],
SoftcardOps,
SoftcardToolPrivate;
SoftcardToolMiscButtonsImpl: CEDAR PROGRAM
IMPORTS
Buttons, IO, Labels,
SoftcardOps, SoftcardToolPrivate
EXPORTS
SoftcardToolPrivate
= BEGIN OPEN IO, SoftcardToolPrivate;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
BuildMiscButtons: PUBLIC PROC[topViewer, sibx: Viewer] RETURNS[sib: Viewer] = {
builds the miscellaneous buttons - sibx is the last button created in caller
sib ← sibx;
lines of miscellaneous buttons
sib ← Buttons.Create[
info: [ name: " ResetBoard ", parent: topViewer,
 wx: leftEdge, wy: sib.wy + sib.wh + betweenHeight, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: ResetBoard ];
sib ← Buttons.Create[
info: [ name: " ReadClock ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: ReadClockProc ];
sib ← Buttons.Create[
info: [ name: " ResetClock ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: ResetClockProc ];
PBus stuff
sib ← Buttons.Create[
info: [ name: " EUPBusData ", parent: topViewer,
 wx: leftEdge, wy: sib.wy + sib.wh + betweenHeight, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: EUPBusDataProc ];
sib ← Buttons.Create[
info: [ name: " IFUPBusData ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: IFUPBusDataProc ];
sib ← Buttons.Create[
info: [ name: " EUPBusCmd ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: EUPBusCmdProc ];
sib ← Buttons.Create[
info: [ name: " IFUPBusCmd ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: IFUPBusCmdProc ];
CacheStateMachines
sib ← Labels.Create[
info: [ name: "CacheStateMachines", parent: topViewer,
 wx: leftEdge, wy: sib.wy + sib.wh + betweenHeight, wh: entryHeight,
 border: FALSE, scrollable: FALSE],
font: labelFont ];
sib ← Buttons.Create[
info: [ name: "ResetIFU", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: ResetIFUCacheStateProc ];
sib ← Buttons.Create[
info: [ name: "ResetEU", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: ResetIFUCacheStateProc ];
Caches
sib ← Labels.Create[
info: [ name: "Caches", parent: topViewer,
 wx: leftEdge, wy: sib.wy + sib.wh + betweenHeight, wh: entryHeight,
 border: FALSE, scrollable: FALSE],
font: labelFont ];
sib ← Buttons.Create[
info: [ name: " DisableEU ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: DisableEUCacheProc ];
sib ← Buttons.Create[
info: [ name: " DisableIFU ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: DisableIFUCacheProc ];
sib ← Buttons.Create[
info: [ name: " FlushEU ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: FlushEUCacheProc ];
sib ← Buttons.Create[
info: [ name: " FlushIFU ", parent: topViewer,
 wx: sib.wx+sib.ww+5, wy: sib.wy, wh: entryHeight,
 border: TRUE, scrollable: FALSE],
font: activeFont, proc: FlushIFUCacheProc ];
};
ResetBoard: ClickProc = {
SoftcardOps.ResetBoard[];
SetDragonStateLabelButton[stopped];
tsOut.PutRope["ResetBoard has been done\n"];
};
ReadClockProc: ClickProc = {
val: CARD32 = SoftcardOps.ReadClock[];
tsOut.PutF[" Current clock reading is: %xH\n", IO.card[val] ];
};
EUPBusDataProc: ClickProc = {
val: CARD32 = SoftcardOps.ReadEUPBusData[];
tsOut.PutF[" EUPBusData: %xH\n", IO.card[val] ];
};
IFUPBusDataProc: ClickProc = {
val: CARD32 = SoftcardOps.ReadIFUPBusData[];
tsOut.PutF[" IFUPBusData: %xH\n", IO.card[val] ];
};
EUPBusCmdProc: ClickProc = {
val: SoftcardOps.EUPBusCmd = SoftcardOps.ReadEUCmd[];
tsOut.PutF[" EUPBusCmd: [userMode: %g, unspecifiedAsYet: %xH]\n",
IO.bool[val.userMode], IO.int[val.unspecifiedAsYet] ];
};
IFUPBusCmdProc: ClickProc = {
val: SoftcardOps.IFUPBusCmd = SoftcardOps.ReadIFUCmd[];
tsOut.PutF[" IFUPBusCmd: %g\n",
IO.rope[IF val = noAccess THEN "noAccess" ELSE "access"] ];
};
ResetEUCacheStateProc: ClickProc = {
SoftcardOps.ResetEUCacheStateMachine[];
tsOut.PutRope[" ResetEUCacheStateMachine has been done\n"];
};
ResetIFUCacheStateProc: ClickProc = {
SoftcardOps.ResetIFUCacheStateMachine[];
tsOut.PutRope[" ResetIFUCacheStateMachine has been done\n"];
};
ResetClockProc: ClickProc = {
SoftcardOps.ResetClock[];
tsOut.PutRope[" ResetClock has been done\n"];
};
DisableEUCacheProc: ClickProc = {
SoftcardOps.DisableEUCache[];
tsOut.PutRope[" DisableEUCache has been done\n"];
};
DisableIFUCacheProc: ClickProc = {
SoftcardOps.DisableIFUCache[];
tsOut.PutRope[" DisableIFUCache has been done\n"];
};
FlushEUCacheProc: ClickProc = {
SoftcardOps.FlushEUCache[];
tsOut.PutRope[" FlushEUCache has been done\n"];
};
FlushIFUCacheProc: ClickProc = {
SoftcardOps.FlushIFUCache[];
tsOut.PutRope[" FlushIFUCache has been done\n"];
};
END.