DIRECTORY FS, IO, Rope, Convert, BitOps, OracleGen; GenBackLinkData3Impl: CEDAR PROGRAM IMPORTS FS, IO, Rope, Convert, BitOps, OracleGen ~ BEGIN outf: IO.STREAM; lineCount,k : CARD; BitDWord: TYPE = LONG CARDINAL; nr:INT = 10; --number of colums in the right side of the line nl:INT = 10; --number of colums in the left side of the line NbRight : TYPE = [0..nr); NbLeft : TYPE = [0..nl); RightLine: TYPE = ARRAY NbRight OF Rope.ROPE; LeftLine: TYPE = ARRAY NbLeft OF Rope.ROPE; rl: RightLine; ll: LeftLine; comment: Rope.ROPE; datain, dataout : ARRAY [0..2) OF BitDWord; supin,supout : BitDWord; removex: BOOL; Signal : TYPE = {T,F,X}; nDSerialOut,MDSerialIn,MDExecute,MDAddress : Signal; MDShiftCK,MnFreeze,MnDReset : Signal; MDSerialOut,nDSerialIn,nDExecute,nDAddress : Signal; nDShiftClock,DFreeze,DReset : Signal; Init: PROC [] RETURNS [] ~ { datain[0] _ 1; datain[1] _ 1; supin _ 0; nDSerialOut _ F; MDSerialIn _ F; MDExecute _ F; MDAddress _ F; MDShiftCK _ F; MnFreeze _ T; MnDReset _ F; removex _ TRUE; dataout[0] _ 1; dataout[1] _ 1; supout _ 0; MDSerialOut _ X; nDSerialIn _ X; nDExecute _ X; nDAddress _ X; nDShiftClock _ X; DFreeze _ X; DReset _ X; }; RopeFromSignal: PROC [s: Signal] RETURNS [r: Rope.ROPE] ~ { SELECT s FROM F => r _ "0"; T => r _ "1"; ENDCASE => r _ "X"; }; Inv: PROC [s: Signal] RETURNS [t: Signal] ~ { SELECT s FROM F => t _ T; T => t _ F; ENDCASE => t _ X; }; MergeOut: PROC [] RETURNS [] ~ { column : INT; r : Rope.ROPE; r _ " "; FOR column IN [0..nl) DO r _ Rope.Cat[r,ll[column]," "]; ENDLOOP; r _ Rope.Cat[r," | "]; FOR column IN [0..nr) DO r _ Rope.Cat[r,rl[column]," "]; ENDLOOP; outf.PutF["%g -- %g %g \n",IO.rope[r],IO.rope[Convert.RopeFromInt[lineCount]],IO.rope[comment]]; comment _ "" }; Send: PROC [] RETURNS [] ~ { nDSerialIn _ Inv[MDSerialIn]; nDExecute _ Inv[MDExecute]; nDAddress _ Inv[MDAddress]; nDShiftClock _ Inv[MDShiftCK]; DFreeze _ Inv[MnFreeze]; DReset _ Inv[MnDReset]; ll[0] _ OracleGen.LExtend[OracleGen.Hex[datain[0]],8]; ll[1] _ OracleGen.LExtend[OracleGen.Hex[datain[1]],8]; ll[2] _ OracleGen.LExtend[OracleGen.Hex[supin],1]; ll[3] _ RopeFromSignal[nDSerialOut]; ll[4] _ RopeFromSignal[MDSerialIn]; ll[5] _ RopeFromSignal[MDExecute]; ll[6] _ RopeFromSignal[MDAddress]; ll[7] _ RopeFromSignal[MDShiftCK]; ll[8] _ RopeFromSignal[MnFreeze]; ll[9] _ RopeFromSignal[MnDReset]; IF removex = TRUE THEN { rl[0] _ "XXXXXXXX"; rl[1] _ "XXXXXXXX"; rl[2] _ "X"; } ELSE { rl[0] _ OracleGen.LExtend[OracleGen.Hex[dataout[0]],8]; rl[1] _ OracleGen.LExtend[OracleGen.Hex[dataout[1]],8]; rl[2] _ OracleGen.LExtend[OracleGen.Hex[supout],1]; }; rl[3] _ RopeFromSignal[MDSerialOut]; rl[4] _ RopeFromSignal[nDSerialIn]; rl[5] _ RopeFromSignal[nDExecute]; rl[6] _ RopeFromSignal[nDAddress]; rl[7] _ RopeFromSignal[nDShiftClock]; rl[8] _ RopeFromSignal[DFreeze]; rl[9] _ RopeFromSignal[DReset]; MergeOut; lineCount _ lineCount+ 1; }; SendAddress: PROC [address: CARDINAL] RETURNS [] ~ { adrs: CARDINAL _ address; s: INT; MDAddress _ T; MDSerialOut _ X; FOR s IN [0..16) DO MDShiftCK _ F; IF (BitOps.WShift[adrs,s-15] MOD 2) = 0 THEN MDSerialIn _ F ELSE MDSerialIn _ T; Send; MDShiftCK _ T; Send; ENDLOOP; MDAddress _ F; MDShiftCK _ F; Send; }; ReadandCheck: PROC [v: CARD, c: INT _ 16] RETURNS [] ~ { s: INT; value: CARD _ v; MDAddress _ F; MDShiftCK _ F; IF (BitOps.WShift[value,1-c] MOD 2) = 0 THEN MDSerialOut _ F ELSE MDSerialOut _ T; Send; FOR s IN [1..c) DO MDShiftCK _ T; IF (BitOps.WShift[value,s-c+1] MOD 2) = 0 THEN MDSerialOut _ F ELSE MDSerialOut _ T; Send; MDShiftCK _ F; Send; ENDLOOP; }; SendReset: PROC [] RETURNS [] ~ { FOR i: NAT IN [0..10) DO MnDReset _ F; Send; ENDLOOP; FOR i: NAT IN [0..6) DO MnDReset _ T; Send; ENDLOOP; }; AdDBus: PROC [bd,hyb,Int,ci,pth: CARDINAL _0] RETURNS [ad: CARDINAL _0] ~ { ad _ BitOps.WShift[bd,12]+BitOps.WShift[hyb,8]; ad _ ad+BitOps.WShift[Int,5]+BitOps.WShift[ci,3]+pth; }; IdCte: PROC [t,v:CARDINAL] RETURNS [id:CARDINAL] ~ { id _ 5000H + BitOps.WShift[t,6] + v; }; outf _ FS.StreamOpen["///Chip/BackLinkData3.oracle", $create]; outf.PutF["-- Test Data Bus for Oracle\n"]; outf.PutF[" \n"]; outf.PutF["-- Output :\n"]; outf.PutF["-- nBusIn: A & B, nSpareIn & nHeaderIn & nParityIn: C\n"]; outf.PutF["-- nDSerialOut: D, MDSerialIn: E, MDExecute: F, MDAddress: G, \n"]; outf.PutF["-- MDShiftCK: H,MnFreeze: I, MnDReset:J\n"]; outf.PutF["-- Input :\n"]; outf.PutF["-- nBusOut: M & N, nSpareOut & nHeaderOut & nParityOut: O \n"]; outf.PutF["-- MDSerialOut:P, nDSerialIn:Q, nDExecute:R, nDAddress:S, \n"]; outf.PutF["-- nDShiftClock:T, DFreeze:U,DReset:V,\n"]; outf.PutF[" \n"]; outf.PutF["-- A B C D E F G H I J ~ M N O P Q R S T U V\n"]; outf.PutF["\n"]; lineCount_ 0; Init; Send; SendReset; FOR k IN [0..3) DO datain[0] _ BitOps.DShift[datain[0],1]; datain[1] _ BitOps.DShift[datain[1],1]; supin _ supin +1; IF k > 1 THEN removex _ FALSE; Send; ENDLOOP; FOR k IN [0..32) DO datain[0] _ BitOps.DShift[datain[0],1]; datain[1] _ BitOps.DShift[datain[1],1]; dataout[0] _ BitOps.DShift[dataout[0],1]; dataout[1] _ BitOps.DShift[dataout[1],1]; IF supin < 15 THEN supin _ supin+1 ELSE supin _1; IF supout < 15 THEN supout _ supout+1 ELSE supout _1; Send; ENDLOOP; outf.PutF[". \n"]; -- end outf.Close[]; END. GenBackLinkData3Impl.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Jean Gastinel September 29, 1987 4:48:13 pm PDT Oracle Generation for the DBus Variable of the Data path Special variables of the Debug-Bus Convert a signal {F,T,X} into the corresponding Rope {0,1,X} t gets the invert of s This proc merge into two Rope Right and Left different elements of the line and write the result in the output stream This Proc convert the variables into ropes rl[i] & ll[i] for generating the line then call MergeOut for writing the line This Proc send an address on the DebugBus Reading of a path with c transitions of ShiftCK This proc set the Reset line at active and remove it Address in the DBus is : =0 is for BIC The structure of the Identificator is "0101 cccc ccrr rrrr" cccccc is the Type, rrrrrr is the Version Start of the Program Here the program start : Create or Append the file Start Generation : comment _ "Address of the Arbiter 0 ID path"; SendAddress[AdDBus[bd:0,hyb:0,Int:0,ci:0,pth:0]]; comment _ "ID of the Arbiter type:1, Version 5"; ReadandCheck[IdCte[t:1,v:5]]; comment _ "Address of the Arbiter 1 ID path"; SendAddress[AdDBus[bd:2,hyb:0,Int:0,ci:0,pth:0]]; comment _ "ID of the Arbiter type:1, Version 3"; ReadandCheck[IdCte[t:1,v:3]]; comment _ "Address of the BIC 0 ID path"; SendAddress[AdDBus[bd:0,hyb:1,Int:0,ci:0,pth:0]]; comment _ "ID of BIC type 2, Version 8"; ReadandCheck[IdCte[t:2,v:8]]; Κ *˜codešœ™Kšœ<™KšœœŸ/˜=Kšœ œ ˜Kšœ œ ˜Kš œ œœ œœ˜-Kš œ œœœœ˜+K˜K˜ Kšœœ˜K˜K˜K™K™Kšœœœ ˜+Kšœ˜Kšœ œ˜K˜K™"K˜Kšœ œ ˜KšΟf,œ˜4Kš œ˜%Kš -œ˜4Kš œ˜%K˜K˜šΟnœœœ˜K˜K˜K˜ Kš  œ˜Kš  œ˜Kš  œ˜Kš  œ˜Kš  œ˜Kš œ˜ Kš œ˜ K˜Kšœ œ˜K˜K˜K˜ Kš  œ˜Kš ˜Kš  œ˜Kš  œ˜Kš  œ˜Kš œ˜ Kš œ˜ K˜K˜—š‘œœ œ œ˜;K™Kšœ  œ œ˜+Kšœ  œ˜Kšœ   œ˜Kšœ  5œ˜EKšœ  >œ˜NKšœ  œ $œ˜7Kšœ   œ˜Kšœ  ;œ˜KKšœ  œ 7œ˜JKšœ  œ #œ˜6Kšœ  œ˜Kšœ  Jœ˜ZKšœ˜K˜K˜K˜K™K™Kšœ ˜ K˜K˜K˜ šœœ˜š˜Kšœ'˜'Kšœ'˜'Kšœ˜Kšœœ œ˜K˜—Kšœ˜K˜—K˜šœœ˜š˜Kšœ'˜'Kšœ'˜'Kšœ)˜)Kšœ)˜)Kšœ œœ ˜1Kšœ œœ ˜5K˜—šœ˜K˜——K˜Kšœ.™.Kšœ1™1Kšœ0™0Kšœ™Kšœ™Kšœ.™.Kšœ1™1Kšœ0™0Kšœ™K™Kšœ)™)Kšœ1™1Kšœ(™(Kšœ™K™K˜Kšœ  œŸ˜Kšœ ˜ K˜—Kšœ˜—…—΄#ΰ