IFUSrcStatusControl:
CEDAR
PROGRAM
IMPORTS CoreFrame, CoreGlue, CoreName, CoreXform, IFUCoreData
EXPORTS IFUSrc =
BEGIN
ROPE: TYPE = Core.ROPE;
GND: ROPE = CoreName.RopeNm["GND"];
VDD: ROPE = CoreName.RopeNm["VDD"];
xV0: ROPE = "( XBus.20 XBus.22 XBus.24 XBus.26 )";
xV1: ROPE = "( XBus.21 XBus.23 XBus.25 XBus.27 )";
keep: ROPE = "( XBus.30 XBus.32 XBus.34 XBus.36 )";
xBus: ROPE = "( XBus.31 XBus.33 XBus.35 XBus.37 )";
xform: CoreXform.Xform ← CoreXform.GenXform[LIST[ [4, 0] ]];
Signal: SIGNAL = CODE;
SelectFromXBus:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "SelectFromXBus",
type: "DpSelect",
top: NIL,
in:
LIST[
keep,
"( Spare0BA UserMode0BA TrapsEnbled0BA RschWaiting0BA )",
xBus ],
out: "(( SeltdSpare SeltdUserMode SeltdTrapsEnbled SeltdRschWaiting ))",
bot: Mux0ATop,
xform: xform ]};
Mux0ATop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
"( SeltdSpare SeltdUserMode SeltdTrapsEnbled SeltdRschWaiting )",
"( NIL NIL TrapsEnbled0BA RschWaiting0BA )" ];
Mux0A:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "Mux",
name: "Mux0A",
top: Mux0ATop,
left: "( X1ADstStatusBA NotX1ADstStatusBA )",
in:
LIST[
"( SeltdSpare SeltdUserMode SeltdTrapsEnbled SeltdRschWaiting )",
"( Spare0BA UserMode0BA TrapsEnbled0BA RschWaiting0BA )"],
out: "(( Spare0A UserModeA TrapsEnbledA RschWaitingA ))",
bot: GateATop,
xform: xform ]};
GateATop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
NIL,
"( NIL NIL TrapsEnbled0BA RschWaiting0BA )",
"( Spare0A UserModeA TrapsEnbledA RschWaitingA )" ];
GateA:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "GateA",
type: "( DpAnd DpAnd DpAnd DpOr )",
top: GateATop,
in:
LIST[
"( NIL UserModeA TrapsEnbledA RschWaitingA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA )"],
out: "((NIL UserMode0A TrapsEnbled0A RschWaiting0A ))",
bot: Latch0ATop,
xform: xform ]};
Latch0ATop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
"( NIL UserMode0A TrapsEnbled0A RschWaiting0A )",
"( NIL NIL TrapsEnbled0BA RschWaiting0BA )",
"( Spare0A NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
Latch0A:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "Latch0A",
type: "DpLatch",
top: Latch0ATop,
left: "( PhA VBB )",
in: "(( Spare0A UserMode0A TrapsEnbled0A RschWaiting0A ))",
out: "(( Spare0AB UserMode0AB TrapsEnbled0AB RschWaiting0AB ))",
bot: DebugStatusTop,
xform: xform ]};
DebugStatusTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
"( NIL NIL TrapsEnbled0AB RschWaiting0AB )",
"( Spare0AB UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
DebugStatus:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "DebugStatus",
type: "DpDebugDr",
top: DebugStatusTop,
left: "( DebugOpStatus )",
in: "(( Spare0AB UserMode0AB TrapsEnbled0AB RschWaiting0AB ))",
out: LIST[ xBus ],
bot: Latch0BTop,
xform: xform ]};
Latch0BTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
"( NIL NIL TrapsEnbled0AB RschWaiting0AB )",
"( Spare0AB UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
Latch0B:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "Latch0B",
type: "DpLatch",
top: Latch0BTop,
left: "( PhB VBB )",
in: "(( Spare0AB UserMode0AB TrapsEnbled0AB RschWaiting0AB ))",
out: "(( Spare0BA UserMode0BA TrapsEnbled0BA RschWaiting0BA ))",
bot: Latch1ATop,
xform: xform ]};
Latch1ATop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( Spare0BA UserMode0BA NIL NIL )" ,
"( NIL NIL NIL NIL )",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
Latch1A:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "Latch1A",
type: "DpLatch",
top: Latch1ATop,
left: "( LoadStage1Ac VBB )",
in: "(( Spare0BA UserMode0BA TrapsEnbled0BA RschWaiting0BA ))",
out: "(( Spare1AB UserMode1AB UserMode1AB TrapsEnbled1AB ))",
bot: Latch1BTop,
xform: xform ]};
Latch1BTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
"( Spare1AB UserMode1AB UserMode1AB TrapsEnbled1AB)",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
Latch1B:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "Latch1B",
type: "DpLatch",
top: Latch1BTop,
left: "( LoadStage1Bc VBB )",
in: "(( Spare1AB UserMode1AB UserMode1AB TrapsEnbled1AB ))",
out: "(( Spare1BA UserMode1BA UserMode1BA TrapsEnbled1BA ))",
bot: XDrStatusTop,
xform: xform ]};
XDrStatusTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
"( Spare1BA UserMode1BA UserMode1BA TrapsEnbled1BA)",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
XDrStatus:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "XDrStatus",
type: "DpTriDr",
top: XDrStatusTop,
left: "( X2ASrcStatus2Ac NotX2ASrcStatus2Ac )",
in: "(( Spare1BA UserMode1BA UserMode1BA TrapsEnbled1BA ))",
out: LIST[xBus],
bot: XDrKeepTop,
xform: xform ]};
XDrKeepTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
"( NIL NIL NIL NIL )",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
XDrKeep:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "XDrKeep",
type: "DpTriDr",
top: XDrKeepTop,
left: "( X2ASrcStatus2Ac NotX2ASrcStatus2Ac )",
in: "( (GND GND GND VDD) )",
out: LIST[keep],
bot: Switch0Top,
xform: xform ]};
Switch0Top:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
"( NIL NIL NIL NIL )",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NewRescheduleA)" ];
Switch0:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "SwitchBox",
name: "Switch0",
top: Switch0Top,
left: "(X1ADstStatusBA)",
right: NIL,
bot: LatchInvTop,
xform: xform ]};
LatchInvTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( DldReschBA DldReschBA NIL X1ADstStatusBA )" ,
"( NIL NewRescheduleA NIL NIL )",
"( NIL UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NIL)" ];
LatchInv:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "LatchInv",
type: "( DpLatch DpLatchInv DpLatch DpLatchInv )",
top: LatchInvTop,
left: "( PhB VBB )",
in: "((DldReschAB DldReschBA NIL X1ADstStatusBA ))",
out: "((DldReschBA NotDldReschBA NIL NotX1ADstStatusBA ))",
bot: LatchAndTop,
xform: xform ]};
LatchAndTop:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NotDldReschBA NIL NIL )" ,
"( NIL NewRescheduleA NIL NotX1ADstStatusBA)",
"( DldReschAB UserMode0AB TrapsEnbled0BA RschWaiting0BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NIL)" ];
LatchAnd:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "LatchAnd",
type: "( DpLatch DpLatchAnd DpLatchAnd DpLatchAnd )",
top: LatchAndTop,
left: "( PhA VBB )",
in: "(
(RescheduleBA NotDldReschBA TrapsEnbled0BA RschWaiting0BA )
(NIL RescheduleBA NotClearTrapsEnbledBA NotX1ADstStatusBA))",
out: "((DldReschAB NewRescheduleA TrapsEnbled2BA RschWaiting2BA))",
bot: Switch1Top,
xform: xform ]};
Switch1Top:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL RescheduleBA NIL NIL )" ,
"( RescheduleBA NIL NIL NIL )",
"( NIL UserMode0AB TrapsEnbled2BA RschWaiting2BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA NIL)" ];
Switch1:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "SwitchBox",
name: "Switch1",
top: Switch1Top,
left: NIL,
right: NIL,
bot: XDrVersion0Top,
xform: xform ]};
XDrVersion0Top:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
"( NIL NIL NIL NIL )",
"( NIL UserMode0AB TrapsEnbled2BA RschWaiting2BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA RescheduleBA)" ];
XDrVersion0:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "XDrVersion0",
type: "DpTriDr",
top: XDrVersion0Top,
left: "( X2ASrcStatus2Ac NotX2ASrcStatus2Ac )",
in: LIST[LIST[ version[0], version[2], version[4], version[6] ]],
out: LIST[xV0],
bot: XDrVersion1Top,
xform: xform ]};
XDrVersion1Top:
LIST
OF
REF =
LIST[
xBus,
keep,
"( NIL NIL NIL NIL )" ,
xV0,
"( NIL UserMode0AB TrapsEnbled2BA RschWaiting2BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA RescheduleBA)" ];
XDrVersion1:
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← IFUCoreData.CellProc[
subClass: "GPRow",
name: "XDrVersion1",
type: "DpTriDr",
top: XDrVersion1Top,
left: "( X2ASrcStatus2Ac NotX2ASrcStatus2Ac )",
in: LIST[LIST[ version[1], version[3], version[5], version[7] ]],
out: LIST[xV1],
bot: StatusBot,
xform: xform ]};
StatusBot:
LIST
OF
REF =
LIST[
xBus,
keep,
xV1 ,
xV0,
"( NIL UserMode0AB TrapsEnbled2BA RschWaiting2BA )",
"( NIL NotClearUserModeBA NotClearTrapsEnbledBA RescheduleBA)" ];
StatusControlData:
PROC
RETURNS[cellType: Core.CellType] = {
name: ROPE ← CoreName.RopeNm["IFUStatusControlData"];
IF (cellType ← CoreFrame.ReadFrameCache[name])=
NIL
THEN {
cellType ← CoreFrame.NewFrameCells[
name: name,
rec: [first: top, orient: CDOrient.rotate270],
cells:
LIST[
SelectFromXBus[],
Mux0A[],
GateA[],
Latch0A[],
DebugStatus[],
Latch0B[],
Latch1A[],
Latch1B[],
XDrStatus[],
XDrKeep[],
Switch0[],
LatchInv[],
LatchAnd[],
Switch1[],
XDrVersion0[],
XDrVersion1[] ] ];
cellType ← CoreFrame.NewFrameCells[ name: name, rec: [first: top], cells: LIST[
cellType,
CoreGlue.CellProc[],
CoreGlue.CellProc[t: conn, r: sum] ]];
CoreFrame.WriteFrameCache[cellType]} };
StatusControl:
PUBLIC
PROC
RETURNS[cellType: Core.CellType] = {
cellType ← CoreFrame.NewFrameCells[ name: "StatusXFill", rec: [first: left], cells:
LIST[
StatusControlData[],
CoreGlue.CellProc[l: conn, r: ext] ]] };
version: ARRAY [0..8) OF ROPE ← [GND, GND, GND, GND, GND, GND, GND, VDD]; -- 1
IF IFU2.CurrentIFUVersion#1 THEN Signal[];
END.