(FILECREATED "16-Sep-86 18:17:52" {ERIS}<TAMARIN>TSIM>DPFILES.;27 22410  

      changes to:  (FNS readrf writerf)

      previous date: "15-Sep-86 19:19:10" {ERIS}<TAMARIN>TSIM>DPFILES.;26)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT DPFILESCOMS)

(RPAQQ DPFILESCOMS ((FNS dpop euoptest fc forced1 readibuf regtest cctest checkconsts cond dpshift 
			   pl dpsetup dprun readreg readrf setibuf setnread setpc writereg writerf)
	(VARS pllist)))
(DEFINEQ

(dpop
  [LAMBDA (theeuop d1 d2)                                    (* rtk "22-Aug-86 11:37")
    (PRINTOUT T "Op: " theeuop " D1: " d1 " D2: " d2 T)
    [SETQ opcode (SELECTQ theeuop
			      (d1 54Q)
			      (d2 52Q)
			      (lshft 74Q)
			      (rshft 75Q)
			      (+ 20Q)
			      (- 25Q)
			      (4 22Q)
			      (and 50Q)
			      (or 56Q)
			      (xor 46Q)
			      (settype 77Q)
			      (gettype 70Q)
			      (mergesp 76Q)
			      (arshft 65Q)
			      (-1 24Q)
			      (20Q 26Q)
			      (T 0)
			      (if (NUMBERP theeuop)
				  then theeuop
				else (BREAK1 NIL T (Unknown EUop)
						 NIL]
    (SETQ RO d1)
    (SETQ RE d2)
    (SETQ D1 d1)
    (SETQ D2 d2)
    (SETQ *Read 0)
    (replace (MI EUop) of #MIR with opcode)
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE (clock firstcy)))
    (SETQ *Read 0)
    (SetTransSim)
    (clock (QUOTE pre))
    (clock (QUOTE (clock secondcy)))
    (NormalCycle)
    (SETQ D1 @V)
    (replace (MI EUop) of #MIR with 0)
    (SetTransSim)
    (PRINTOUT T "Op: " theeuop " D1: " d1 " D2: " d2 T)
    [Print01List (QUOTE ((RE)
			      (RO)
			      (D1]
    (ExecuteTransComp nodemaplist NIL (QUOTE (D1-Out Euop-CCodes])

(euoptest
  [LAMBDA NIL                                                (* edited: "21-Aug-86 16:08")
    (for i in (QUOTE ((4 3 6)
			     (and 6600Q 21415Q)
			     (xor 6605313717Q 2760050033Q)
			     (or 46Q 27Q)
			     [settype 5 (Eval (TamTagRep (QUOTE List]
			     (gettype (Eval (TamTagRep (QUOTE List)))
				      0)
			     (mergesp 110642777Q 125Q)
			     (arshft 4000000003Q 3)
			     (arshft 2000000003Q 0)
			     (lshft 2000000003Q 2)
			     (rshft 2000000003Q 2)
			     (rshft 4000000003Q 2)
			     (20Q 3 11Q)
			     (-1 4 11Q)
			     (-1 11Q 4)
			     (T 3 5)
			     (d1 142Q 40Q)
			     (d2 27Q 127Q)
			     (+ 11Q 10Q)
			     (+ 130Q 42Q)
			     (- 11Q 6)
			     (- 6 11Q)))
       do (dpop (CAR i)
		    (EvalElt (CADR i))
		    (EvalElt (CADDR i])

(fc
  [LAMBDA (n)                                                (* edited: " 2-Sep-86 18:04")
    (SETQ n (findnode n))
    (PROG (x)
	    (PRINTOUT T "< ------------ " (name&val n)
		      "  cap: "
		      (fetch (node ncap) of n)
		      " ------------->" T)                   (* SETQ x (finddevice n NIL T))
                                                             (* if (NOT deviceerror) then 
							     (PRINTOUT T x T))
	    (for tran in (fetch (node nsource) of n) do (checktran n tran ON))
	    (for tran in (fetch (node ndrain) of n) do (checktran n tran ON))
	    (for tran in (fetch (node nsource) of n) do (checktran n tran OFF))
	    (for tran in (fetch (node ndrain) of n) do (checktran n tran OFF))
	    (PRINTOUT T "<-------------------GATES-------------------->" T)
	    (for tran in (fetch (node ngate) of n) do (checktran n tran])

(forced1
  [LAMBDA (val)                                              (* edited: "22-Aug-86 20:23")
    (SETQ D1 val)
    [for i from 0 to 37Q
       do (replace (node npot) of (findnode (PACK (LIST (QUOTE D1-)
								    i)))
	       with (if (EQ (LOADBYTE val i 1)
				  0)
			  then (QUOTE DLOW)
			else (QUOTE DHIGH)))             (* xenque (findnode (PACK (LIST 
							     (QUOTE D1-) i))))
	    ]
    (Print01List (QUOTE ((D1])

(readibuf
  [LAMBDA (pcaddr oplen)                                     (* edited: "21-Aug-86 21:18")
    (replace (MI W2addr) of #MIR 0)
    (SETQ *Read 0)
    (SETQ *Write 0)
    (SetTransSim)
    (setpc pcaddr oplen)
    (replace (MI RD1addr) of #MIR with 2)
    (replace (MI RD2addr) of #MIR with 0)
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE (clock op)))
    [Print01List (QUOTE ((#OPCODE]
    (clock (QUOTE pre))
    (clock (QUOTE (clock micro)))
    (SETQ *Read 0)
    (replace (MI RD1addr) of #MIR with 0)
    (replace (MI RD2addr) of #MIR with 0)
    (SETQ pClock 0)
    (SetTransSim)
    (Print01List (QUOTE ((#IBUFN)
			      (D1])

(regtest
  [LAMBDA NIL                                                (* edited: "22-Aug-86 18:59")
    (for i from 0 to 12Q do (writerf (PLUS i 400Q)
					       (TamRep i)))
    (for i From 0 to 12Q do (readrf (PLUS i 400Q)
					    (TamRep i])

(cctest
  [LAMBDA NIL                                                (* edited: "21-Aug-86 23:08")
    (for i in (QUOTE ((unbound (TamRep (QUOTE Unbound))
				     0)
			     (integerp (TamRep 42Q)
				       0)
			     (boundp (TamRep (QUOTE Atm)
					       5)
				     0)
			     (stackp (TamRep (QUOTE Stack))
				     0)
			     (~integerp (TamRep (QUOTE Atm)
						  4)
					0)
			     (floatp (TamRep (QUOTE Float))
				     0)
			     (~floatp (TamRep (QUOTE Float))
				      0)
			     (xtypep (TamRep (QUOTE Xtype))
				     0)
			     (~xtypep (TamRep (QUOTE Xtype))
				      0)
			     (pointerp (TamRep (QUOTE List)
						 42Q)
				       0)
			     (integerd1d2 (TamRep 27Q)
					  (TamRep 103Q))
			     (numberpd1d2 (TamRep (QUOTE Number)
						    127Q)
					  (TamRep (QUOTE Number)
						    40Q))
			     (~numberpd1d2 (TamRep (QUOTE Number)
						     515Q)
					   (TamRep 42Q))
			     (consp (TamRep (QUOTE List))
				    0)
			     (~consp 3 4)
			     (d1=d2 (TamRep 361100Q)
				    (TamRep (QUOTE Ptr)
					      361100Q))
			     (d1#d2 (TamRep 2322Q)
				    (TamRep 30070Q))
			     (ccodep (TamRep (QUOTE Code)
					       143Q)
				     0)
			     (d2=int<8&d1=ccodep (TamRep (QUOTE Code)
							   144Q)
						 (TamRep 7))
			     (d2=int<8&d1=atom (TamRep (QUOTE Atm)
							 515Q)
					       (TamRep 0))
			     (ccodep&~nlambdastarp (TamRep (QUOTE Code)
							     6405Q)
						   0)
			     (noflagbitd2 0 (TamRep (QUOTE Atm)))
			     (flagbitd2 0 (TamRep (QUOTE Number)))
			     (d1<7x>=d2<7x> 257Q 256Q)
			     (d1<8>=d2<8> 252Q 252Q)
			     (minintd2 0 14000000000Q)
			     (~minintd2 0 14000000001Q)
			     (pointerpd2 0 (TamRep (QUOTE Ptr)))
			     (integerpd1&pointerpd2 (TamRep 5)
						    (TamRep (QUOTE List)))
			     (traponreturntod2 0 (TamRep (QUOTE TrapOnReturnTo)))
			     (~traponreturntod2 0 (TamRep (QUOTE TrapOnExit)))
			     (traponexit (TamRep (QUOTE TrapOnExit))
					 0)
			     (posintegerp (TamRep 2000000001Q)
					  0)
			     (~posintegerp 14000177777Q 0)
			     (true 0 0)))
       do (PRINTOUT T "cc " (CAR i)
		      T)
	    (cond [CADR (FASSOC (CAR i)
				      (GETPROP (QUOTE condcode)
						 (QUOTE uField]
		    (EVAL (CADR i))
		    (EVAL (CADDR i])

(checkconsts
  [LAMBDA NIL                                                (* mar: "18-Aug-86 11:25")
    (SETQ D2 (TamRep (QUOTE NIL)))
    (readreg 0 3)
    (SETQ D2 (TamRep (QUOTE T)))
    (readreg 0 4)
    (SETQ D2 (TamRep (QUOTE Unbound)))
    (readreg 0 5])

(cond
  [LAMBDA (cc d1 d2)                                         (* edited: "21-Aug-86 23:24")
    (replace (MI CondCode) of #MIR with cc)
    (SETQ RE d2)
    (SETQ RO d1)
    (SETQ D1 d1)
    (SETQ D2 d2)
    (SETQ *Read 0)
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE clock))
    (CheckCondA)
    (PRINTOUT T "CC: " cc " D1: " d1 " D2: " d2 T)
    [Print01List (QUOTE ((#CONDA]
    (replace (MI CondCode) of #MIR with 0)
    (SetTransSim])

(dpshift
  [LAMBDA (op)                                               (* mar: "19-Aug-86 12:22")
    (SETQ *Read 0)
    (replace (MI EUop) of #MIR with op)
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE (clock firstcy)))
    (pl)
    (SETQ *Read 0)
    (SetTransSim)
    (clock (QUOTE pre))
    (pl)
    (clock (QUOTE (clock secondcy)))
    (replace (MI EUop) of #MIR with 0)
    (SetTransSim)
    (pl])

(pl
  [LAMBDA NIL                                                (* mar: "14-Aug-86 10:33")
    (Print01List (QUOTE ((RE)
			      (RO)
			      (D1)
			      (D2])

(dpsetup
  [LAMBDA NIL                                                (* edited: "22-Aug-86 20:55")
    (SETQ compsections (QUOTE (Dswap-Out IBufData-Out)))
    (SETQ pPre 0)
    (SETQ pClock 0)
    (SETQ pOp 0)
    (SETQ pMicro 0)
    (SETQ #OpLength=0 0)
    (SETQ #$OpLength=0 0)
    (SETQ setsections (QUOTE (TempFix RegMux-Out Rom-Out ClockPla Pins-In CondCode-Out OpPla-Out 
					  D1-Out)))
    (SETQ nodemaplist (for i in [APPEND [transbits (QUOTE ((UPPERDP.RESTOFDP.#NCURPC
									  Printit 5 PC)
									(UPPERDP.RESTOFDP.WTE Printit 
											      4 0)
									(UPPERDP.RESTOFDP.WTO Printit 
											      4 0)
									(UPPERDP.RESTOFDP.RDO Printit 
											      4 0)
									(UPPERDP.RESTOFDP.RDE Printit 
											      4 0)
									(#OPCODE IBufData-Out 10Q 
										 &Opcode)
									(#UK Rom-Out 11Q
									     (#MIR (MI K)))
									(#UARG' Rom-Out 2
										(#MIR (MI Arg')))
									(#URADDR Rom-Out 3
										 (#MIR (MI Raddr)))
									(#URD1ADDR
									  Rom-Out 2
									  (#MIR (MI RD1addr)))
									(#URD2ADDR
									  Rom-Out 3
									  (#MIR (MI RD2addr)))
									(#UWADDR Rom-Out 3
										 (#MIR (MI Waddr)))
									(#URCXT Rom-Out 3
										(#MIR (MI RCxt)))
									(#UWCXT Rom-Out 3
										(#MIR (MI WCxt)))
									(#IBUFN IBufData-Out 10Q 
										#IBufN)
									(@REGADDR~ RegMux-Out 6 
										   @RegAddr~)
									(@MUXREADSEL RegMux-Out 10Q 
										     @MuxRdSel~)
									(@QUAD ClockPla 2 @Quad)
									(#UNEWTOS
									  Rom-Out 3
									  (#MIR (MI NewTos)))
									(#UNEWTOPCXT
									  Rom-Out 2
									  (#MIR (MI NewTopCxt)))
									(#UNEWARG2
									  Rom-Out 2
									  (#MIR (MI NewArg2)))
									(#UNEWARG
									  Rom-Out 3
									  (#MIR (MI NewArg)))
									(#UNEWBOTCXT
									  Rom-Out 2
									  (#MIR (MI NewBotCxt)))
									(#OPLENGTH OpPla-Out 3 
										   #OpLength)
									($OPLENGTH OpPla-Out 3 
										   $OpLength)
									(#UCONDCODE
									  Rom-Out 7
									  (#MIR (MI CondCode)))
									(#UCYCLE Rom-Out 3
										 (#MIR (MI Cycle)))
									(#UEUOP Rom-Out 6
										(#MIR (MI EUop)))
									(#UMISC Rom-Out 5
										(#MIR (MI Misc)))
									(#UMUXRDSEL
									  Rom-Out 3
									  (#MIR (MI MuxRdSel)))
									(#UNEXTINSTA
									  Rom-Out 11Q
									  (#MIR (MI NextInstA)))
									(#UNEXTINSTB
									  Rom-Out 11Q
									  (#MIR (MI NextInstB)))
									(#UPC SNI-Out 10Q #uPC)
									(#URD1ADDR
									  Rom-Out 2
									  (#MIR (MI RD1addr)))
									(#URD2ADDR
									  Rom-Out 2
									  (#MIR (MI RD2addr)))
									(#UW2ADDR
									  Rom-Out 3
									  (#MIR (MI W2addr)))
									(#UTAG Rom-Out 2
									       (#MIR (MI Tag)))
									(RE RegFile 40Q RE)
									(RO RegFile 40Q RO)
									(D2 Dswap-Out 40Q D2)
									(D1 D1-Out 40Q D1)
									(@REGCXT~ RegMux-Out 3 
										  @RegCxt~]
						(QUOTE ((PHIMICRO ClockPla ((pMicro 0 1 0)))
							   (PHIMICRO&WRITEOK ClockPla
									     ((pMicro&WriteOk 0 1 0)))
							   (PHIMICRO&NEWOP ClockPla
									   ((pMicro&NewOp 0 1 0)))
							   (PHIOP ClockPla ((pOp 0 1 0)))
							   (PHIPRE ClockPla ((pPre 0 1 0)))
							   (PHICLOCK ClockPla ((pClock 0 1 0)))
							   (PHIFIRSTCY ClockPla
								       ((0 0 1 0)))
							   (PHISECONDCY ClockPla
									((0 0 1 0)))
							   (+WRITE ClockPla ((*Write 0 1 0)))
							   (+READ ClockPla ((*Read 0 1 0)))
							   (SMALLDP.LSBSIDE.+READ ClockPla
										  ((*Read 0 1 0)))
							   (+MEMREAD ClockPla ((*MemRead 0 1 0)))
							   (+DORESET ClockPla ((*DoReset 0 1 0)))
							   (+FIRSTCY ClockPla ((*FirstCy 0 1 0)))
							   (+SECONDCY ClockPla
								      ((*SecondCy 0 1 0)))
							   (@WRITE ClockPla ((@Write 0 1 0)))
							   (@READ ClockPla ((@Read 0 1 0)))
							   ($WRITEOK ClockPla (($WriteOk 0 1 0)))
							   (@WRITEOCTAL~ ClockPla
									 ((1 0 1 0)))
							   (@RDMUXSEL RegMux-Out
								      ((@RdMuxSel 0 1 0)))
							   (#ARG=0 RegMux-Out
								   (((Eval (OZ (EQ #Arg 0)))
								     0 1 0)))
							   (#ARG=ARG2 RegMux
								      (((Eval (OZ (EQ #Arg #Arg2))
									      )
									0 1 0)))
							   (#UTOS' Rom-Out (((#MIR (MI Tos'))
								     0 1 0)))
							   (#$REFCNT Misc-Out ((#$RefCnt 0 1 0)))
							   (#$STACKREFILL Misc-Out
									  ((#$StackRefill 0 1 0)))
							   (#INTERRUPT Misc-Out
								       ((#Interrupt 0 1 0)))
							   (@INITIALREFILL Misc-Out
									   ((@InitialRefill 0 1 0)))
							   (#$OPLENGTH=0 Misc-Out
									 ((#$OpLength=0 0 1 0)))
							   (UPPERDP.RESTOFDP.$OPLENGTH=0
							     Misc-Out
							     (($OpLength=0 0 1 0)))
							   (#REFRESH Misc-Out ((#Refresh 0 1 0)))
							   (#$OUTPUTINTERRUPT Misc-Out
									      ((#$OutputInt 0 1 0)))
							   ($HOLD Misc-Out (($Hold 0 1 0)))
							   (@RESET Misc-Out ((@Reset 0 1 0)))
							   (HOLD Pins-In ((Hold 0 1 0)))
							   (INTERRUPT Pins-In
									((Interrupt 0 1 0)))
							   (REFRESH Pins-In ((Refresh 0 1 0)))
							   (RESET Pins-In ((Reset 0 1 0)))
							   (#CONDA DataPath-Out
								   ((#CondA 0 1 0)))
							   (#CONTREFILL DataPath-Out
									((#ContRefill 0 1 0)))
							   (#FAULT DataPath-Out
								   ((#Fault 0 1 0)))
							   (#FORCENEWOP OpPla-Out
									((#ForceNewOp 0 1 0)))
							   (#FRAMESEMPTY RegMux-Out
									 ((#FramesEmpty 0 1 0)))
							   (#FRAMESFULL RegMux-Out
									((#FramesFull 0 1 0)))
							   (#MODSTARTADDR OpPla-Out
									  ((#ModStartAddr 0 1 0)))
							   (#MODSTARTADDR~ OpPla-Out
									   (((Not #ModStartAddr)
									     0 1 0)))
							   ($NEWOP CCode-Out (($NewOp 0 1 0)))
							   (#UWDDR-0 Rom-Out (((#MIR (MI Waddr))
								       0 1 0)))
							   (#UDSWAP Rom-Out (((#MIR (MI Dswap))
								      0 1 0)))
							   (#UCWRITE Rom-Out (((#MIR (MI CWrite))
								       0 1 0)))
							   (#UCWRITE~ Rom-Out
								      (((Not (#MIR (MI CWrite)))
									0 1 0)))
							   (#UDSWAP Rom-Out (((#MIR (MI Dswap))
								      0 1 0)))
							   (#WRITEOK CCode-Out
								     ((#WriteOk 0 1 0)))
							   (LOWERDP.OFLLOGIC.COUT Euop-CCodes
										  ((@carry 0 1 0)))
							   (LOWERDP.OFLLOGIC.GT Euop-CCodes
										((@greaterp 0 1 0)))
							   (LOWERDP.OFLLOGIC.OFL Euop-CCodes
										 ((@overflow 0 1 0]
			   when (findnode (CAR i))
			   collect (CONS (if (findnode (CAR i))
						 then (findnode (CAR i))
					       else (PRINTOUT T "Node not Found: " (CAR i)
								T)
						      (QUOTE (noop none 0)))
					     (CDR i)))
      (SetupTransSim))
    NIL])

(dprun
  [LAMBDA NIL                                                (* mar: "20-Aug-86 21:00")
    (SETQ *Read 0)
    (SetTransSim)
    (clock (QUOTE pre))
    (pl)
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE clock))
    (pl])

(readreg
  [LAMBDA (r1 r2)                                            (* mar: "14-Aug-86 12:56")
    (if (NOT r2)
	then (SETQ r2 0))
    (if (NOT r1)
	then (SETQ r1 0))
    (replace (MI RD1addr) of #MIR with r1)
    (replace (MI RD2addr) of #MIR with r2)
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SETQ pClock 1)
    (SetTransSim)                                          (* clock (QUOTE clock))
    (steps)
    (SETQ *Read 0)
    (replace (MI RD1addr) of #MIR with 0)
    (replace (MI RD2addr) of #MIR with 0)
    (SETQ pClock 0)
    (SetTransSim)
    (pl])

(readrf
  [LAMBDA (reg)                                              (* rtk "16-Sep-86 17:47")
    (SETQ *MemRead 0)
    (SETQ @RegCxt~ 7)
    (SETQ @RegAddr~ (LOGXOR reg 63))
    (SETQ @Write 0)
    (SETQ *Read 1)
    (SETQ @Read 1)
    (SetTransSim)
    (clock (QUOTE pre))
    (clock (QUOTE clock))
    (SETQ *Read 0)
    (SETQ @Read 0)
    (PRINTOUT T "Reading: " reg " should be " T)
    (PrintOutList (QUOTE ((D1)
			       (RE)
			       (RO)))
		    T])

(setibuf
  [LAMBDA (addr)                                             (* edited: " 8-Sep-86 12:07")
    [for PC in (QUOTE (0 20Q))
       do (setpc PC 0)
	    (replace (MI W2addr) of #MIR 1)
	    (SETQ *Write 1)
	    (SETQ *Read 1)
	    (replace (MI RD2addr) of #MIR 0)
	    (SetTransSim)
	    (clock (QUOTE clock))
	    (for @Quad from 0 to 3
	       do [SETQ RE (if (EQ PC 0)
				   then (CAR (NTH (QUOTE (552Q 17152Q 170552Q 367152Q))
							(ADD1 @Quad)))
				 else (CAR (NTH (QUOTE (3600552Q 3617152Q 3770552Q 7567152Q))
						      (ADD1 @Quad]
		    (SetTransSim)
		    (clock (QUOTE pre))
		    (setinputh (QUOTE PHICLOCK))
		    (steps)
		    (PRINTOUT T "PC " PC "  Quad " @Quad " wrote " RE T)
		    (PrintOutList (QUOTE ((DATAPATH.RESTOFDP.WTE)
					       (DATAPATH.RESTOFDP.WTO)))
				    T)
		    (setinputl (QUOTE PHICLOCK]
    (pl)
    (replace (MI W2addr) of #MIR 0)
    (SETQ *Read 0)
    (SETQ *Write 0)
    (SetTransSim)
    (setpc 0 1)
    (for x from 0 to 12Q by 1
       do (clock (QUOTE pre))
	    (setinputh (QUOTE PHIOP))
	    (steps)
	    (PRINTOUT T "PC " PC " Oplength " $OpLength T)
	    (PrintOutList (QUOTE ((#OPCODE)
				       (#IBUFN)
				       (DATAPATH.RESTOFDP.#NCURPC)
				       (DATAPATH.RESTOFDP.RDE)
				       (DATAPATH.RESTOFDP.RDO)))
			    T)
	    (setinputl (QUOTE PHIOP))
	    (clock (QUOTE micro&newop])

(setnread
  [LAMBDA (oplen)                                            (* mar: "15-Aug-86 14:36")
    (SETQ $OpLength oplen)
    (SetTransSim)
    (clock (QUOTE micro&newop))
    (readreg 0 1])

(setpc
  [LAMBDA (val opl)                                          (* edited: "21-Aug-86 20:53")
    (replace (MI W2addr) of #MIR with 4)
    (SETQ RO val)
    (SETQ $OpLength 0)
    (SETQ $OpLength=0 (if (EQ val 0)
			    then 1
			  else 0))
    (SetTransSim)
    (clock (QUOTE pre))
    (SETQ *Read 1)
    (SetTransSim)
    (clock (QUOTE clock))
    (SETQ *Read 0)
    (SETQ *Write 1)
    (SetTransSim)
    (clock (QUOTE (micro micro&newop newop)))
    (clock (QUOTE op))
    (SETQ *Write 0)
    (SETQ *Read 0)
    (replace (MI W2addr) of #MIR with 0)
    (clock (QUOTE (micro micro&newop newop)))
    (SETQ $OpLength opl)
    (SETQ $OpLength=0 0)
    (SetTransSim])

(writereg
  [LAMBDA (w2)                                               (* mar: "14-Aug-86 16:25")
                                                             (* rtk "12-Aug-86 16:15")
    (SETQ *Read 0)
    (replace (MI W2addr) of #MIR with w2)
    (SetTransSim)
    (clock (QUOTE pre))
    (pl)
    (SETQ *Read 1)
    (SETQ *Write 1)
    (SETQ *SecondCy 1)
    (SETQ *FirstCy 1)
    (SetTransSim)
    (clock (QUOTE clock))
    (pl)
    (SETQ *Write 0)
    (SETQ pClock 0)
    (SETQ *SecondCy 0)
    (SETQ *FirstCy 0)
    (replace (MI W2addr) of #MIR with 0)
    (SetTransSim])

(writerf
  [LAMBDA (reg val)                                          (* rtk "16-Sep-86 17:51")
    (SETQ eDat (LOGXOR val 1073741823))
    (SETQ oDat (LOGXOR val 1073741823))
    (SETQ @RegAddr~ (LOGXOR reg 63))
    (SETQ $WriteOk 1)
    (SETQ @RegCxt~ 7)
    (SETQ *MemRead 0)
    (SETQ @Read 0)
    (SETQ *Read 0)
    (SETQ @Write 1)
    (SETQ *Write 1)
    (SETQ *WriteOk 1)
    (SetTransSim)
    (clock (QUOTE pre))                                  (* forced1 val)
    (clock (QUOTE clock))
    (PRINTOUT T "Writing Reg: " reg " with " val T)
    (PrintOutList (QUOTE ((RE)
			       (RO)
			       (D1)))
		    T)
    (SETQ *Write 0)
    (SETQ $WriteOk 0)
    (SETQ @Write 0)
    (SETQ @RegCxt~ 0)
    (SETQ @RegAddr~ 0)
    (SETQ *WriteOk 0])
)

(RPAQQ pllist ((N466 N457 N334 N328 N202 N196)
		 (N458 N459 N331 N325 N199 N193)))
(PUTPROPS DPFILES COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (496 22243 (dpop 506 . 1901) (euoptest 1903 . 2752) (fc 2754 . 3775) (forced1 3777 . 
4313) (readibuf 4315 . 5170) (regtest 5172 . 5478) (cctest 5480 . 8035) (checkconsts 8037 . 8355) (
cond 8357 . 8949) (dpshift 8951 . 9516) (pl 9518 . 9698) (dpsetup 9700 . 16481) (dprun 16483 . 16768) 
(readreg 16770 . 17487) (readrf 17489 . 18022) (setibuf 18024 . 19643) (setnread 19645 . 19866) (setpc
 19868 . 20682) (writereg 20684 . 21370) (writerf 21372 . 22241)))))
STOP