CSLNotebookEntryToDesignAidsInterestDateMarch21,19832:37pmFromSpreitzer.PALocationPARC/CSLSubjectRosemaryFile[Indigo]Rosemary.docXEROXReleaseas[Indigo]RosemaryDoc.pressDraft[Indigo]Draft>Rosemary.docLasteditedbySpreitzer.PAAbstractThisdocumentdescribesRosemary,asimulatorforintegratedcircuits.Itdescribesthebasictheoryandoperation,ata(un?)fairlyhighlevelofdetail.Itisdirectedatpotentialusers;thereisabitmorethatimplementorswouldneedtoknow.Rosemary0.IntroductionRosemaryisasimulatorforintegratedcircuits.Itunderstandshierarchicaldescriptionsofcircuits.It's"modelofcomputation"isarbitraryCedarprocedures,thatcommunicatealmostarbitraryCedarvalues,andthatare"scheduled"byaselectivetracescheduler.It'sintendeduseisfor"downward"developmentofadesign.Thereisanexampleworkedoutinexcruciatingdetailinsection5.Itwouldprobablybeusefultorefertoitwhilereadingtheearliersections.HereisaTableofContents:0.Introduction1.TheworldaccordingtoRosemary1.1CircuitDesigns1.2SimulationStructures1.3Rosemary2.TheTranslator2.1Syntax2.2Semanticspa ?q ^r^q+^r6^:k<?Bq Z8rZ8 q+Z8r6Z8s:Z8;Z8q V\rV\q+V\r6V\t{Nq D rD#q CJsCJrCJCJsCJCJq A VsA q ?'s?' '(.1 7y<=CF =D 1d !$I')Z-/0{57s=8A8DF?Gr ; M % "0u$3p . r +aM} "j')0 0 8 @3B G; ) 2 >$T +.} 6;P@E  ( P P;T!% +{-3i57(9U A^ &k  # XG 'u+@,1348>@yDF> "I  =  _v  y X y<r  )  ) $ % )v h y< r  )  )TVm$2.3RunningtheTranslator2.4RelationoftheTranslatortotheabsenceofTranslator3.TheSimulation-TimeUserInterface3.1Displays3.2Browsers3.3ControlPanels5.Example1.TheworldaccordingtoRosemaryThereareCircuitDesigns,andthereareSimulationStructures.Andthen,thereisRosemary.1.1CircuitDesignsACircuitDesignconsistsofacollectionofSubcircuitDesigns.ACircuitDesignisahierarchicaldecomposition,andSubcircuitDesignsarethenodesinthehierarchy.ASubcircuitDesignhasanInterface,throughwhichitcommunicateswiththerestofthedesign.ASubcircuitDesign'sInterfaceisasetofItems,eachofwhichhasaname(textstring),anAbstractType(describedlater),andaDirection(oneofIn,Out,orBoth).Giventhatwehaverestrictedourselvestodescribingsystemstobebuiltinsilicon,wemightinsistthatallInterfaceItemshavethesameAbstractType:thatTypewouldbetheonlyone,theonecorrespondingtoasingleelectricalnode.Orwemightdistinguishmorefinely,andmakethree,oneforeachofthethreeprimarylayersofinterconnect(poly,metal,anddiffusion).Asidefromthatissue,wecouldthinkofInterfacesastrafficinginBooleanvalues,orvoltages,oranyoneofanumberofotherthings.Stillfurther,wecouldimaginetreatingacollectionofwiresasasingleunit(i.e.,asingleInterfaceItem),ratherthanmanyindividuals.AbstractTypesdonotmakeanyofthosedecisions.Asfarasweareconcernedhere,AbstractTypeshavenothingbutanidentity.Theyareusedonlyinthefollowingway:whentwothingsareconnected,weinsistthattheyhavethesameAbstractType.ASubcircuitDesignmight,butdoesnotneedto,includeadescriptionofhowitiscomposedofotherSubcircuits(itsStructuralDescription).SuchadescriptionisintermsofInstancesofotherSubcircuitDesigns,andAbstractNetworksconnectingthem.AnInstanceofaSubcircuitDesignincludesanassociationbetweeneachoftheItemsoftheInterfaceofthatSubcircuitDesignandanAbstractNetwork.Furthermore,eachoftheInterfaceItemsoftheSubcircuitDesignweareelaboratingmustalsobeassociatedwithanAbstractNetwork.Thus,theseassociationsdescribehowthingsareconnected:alloftheInterfaceItemsassociatedwithaparticularAbstractNetworkareconsideredconnectedtogether.WeinsistthattheyallbeofthesameAbstractType.ASubcircuitDesignmightalso,butalsodoesnotneedto,includeadescriptionofwhattheoutputsofanInstanceofthatSubcircuitwouldbe,giventheinputs(itsBehavioralDescription).Thisdescriptionmightbeaprocedure,whichisallowedtokeepastaterecord,insomeprogramminglanguage.1.2SimulationStructuresForgetthepreceedingdiscussion.Wewillnowdiscusshowafairlygeneralsimulatormightbebuilt.CallittheStructuralSimulator.Thissimulatorwillnotdealwithhierarchy.Itwillhaveasingle,flat,Structure.Furthermore,itwilldealonlywithunidirectionaldevices.TheModulesinsuchastructurewillhaveoutputswhicharecomputablefunctionsofthehistoriesontheirinputs.2r b) )D _Q )q g u%'P v \y y<r Y ) V ) S )>v Q yp L 3/@r Iq wAIq?IqrIqIq!:w#Iq$uIq* r1Iq2]Iq5w8<~=x F  )r C5w C5 C5rC59C5 $Tw&4C5'C5-kr2C53C5w5BC56?C5:%r?@C5?C5@B% A rw*AA9r"A#A%1'+-5/ ?w ? r?r?z?;w>??r!?"?(&,F- 69@ 5  ;#M *X.2X5*8<?BE\G/ 41 { _$U(+E 159O<(?BE 2w 2 2r2C2V H!b%'-e/4146Y7<>B1F 0G,{ '1),.x/369;'w?+0?0EwrH90H0 /;eQ w/;/;"r'V/;(/;),/248N >@C!DG; -}w--r--!W&e(*0"359#<5=@3F> + Me #D&)",i.w2F+38+8,r;Q+ )aw v)a ])art)a)a?!m#'9)=./A 6P8;<\=D9Ew ' r' 'w'' r!'"['#&z' ./1o5"w6'7&'r=W'>'>wB'Cg' &r &&w&&rb&&&k*cw,&-1&r2&3&4w5&6&=rB#&B&G $k wm$k$kr"$k#L$k$xw'$k'h$kr-e$k. $k/Lw2H$k3/$k9r>$k?K$kAwC$kD$k "r7"" w" b"&9r*6"*"+w.]"/D"5tr:o";l"<> F' ! } w!!r$!%!)R, 49eB(D  w2r|7wr !%z(,.3>w56= rDEKFu   U"E#(*-O.Z1m57: Cqx  ) " r L  Q #g&[*-.27G=JA2CF  Bw zr  $U %')-L.2w5 6 r; < EpF  \ !w$ & r+ +m ,0G17:e=BG; 5 b`y "&4w) [TVm$pASimulationStructurewillconsistofModules,connectedup.Themethodologyforconnectingislikethatpresentedinsection1.1,butyou'veforgottenthat,haven'tyou?Justtokeepthingsclear,wewillusedifferentwords.EachModulewillcommunicateviaaCedarRECORD.Eachfieldwillbeeitheraninput,anoutput,orboth.EachModulewillhaveanEvaluationPROCEDURE,whichexaminestheinputfields,doessomecomputation,andassignsintosomeoutputfields.EachModulewillhaveaREFANYslotinwhichtostorearbitrarystateinformationfromoneinvocationtothenext.EachoftheoutputfieldshasassociatedwithitaDistributionListofinputfieldsofotherModules.AfteraModule'sEvaluationPROCEDUREhasbeenrun,foreachoutputfieldthathaschanged,thebitsinthatfieldarecopiedintoallofthefieldsonitsDistributionList.ASimulationStructurewillalsohaveaFIFO,calleditsSchedule.TheSchedulecontainsModuleswhoseinputshavechangedsincetheirEvaluationPROCEDUREswerelastrun.ModulesareaddedtotheScheduleatthetimetheirinputschange.ThemainloopofthesimulatoristotakethefirstModuleoutoftheSchedule,runitsEvaluationPROCEDURE,andtakecareofallthegrubbylittledetails,terminatingwhen(andif!)theScheduleempties.IfyoustartwithaquiescentStructure,andmakeasmallchange,thismakesforabreadthfirstexplorationoftheconsequencesofthatchange.1.3RosemaryOK,nowyoucanstopforgettingsection1.1.RosemaryhasaCedardatastructurethatrepresentsconceptsfrombothCircuitDesignsandSimulationStructures.Rosemarysimulates,byvirtueoftheeffortsofpossiblymorethanoneSimulationStructure,andevenothersimulators,theoperationofanInstanceofaCircuitDesign(thatis,anInstanceofacertaindistinguishedSubcircuit:itsRoot).InRosemary,CellsareusedtorepresentInstancesofSubcircuitDesigns.ForeveryInstancethereisexactlyoneCell.Furthermore,therearenoCellsthatdonotrepresentInstances.Rosemaryincludesanimplementationofthesimulatordiscussedinsection1.2.ItsModulesarealsorepresentedbyCells,althoughitisnotthecasethatallCellsmustrepresentModules.RosemaryhasanotherTYPEofobject,Node,thatisusedtorepresentboththeAbstractNetworksofSubcircuitDesigns,andtheDistributionListsofSimulationStructures.WhenInstantiatingaSubcircuitDesignforsimulation,eitheritsStructuralDescriptionoritsBehavioralDescriptioncouldbeused(assuming,ofcourse,theyarebothpresent).WhencreatingthedatastructureforaRosemarysimulation,aSubcircuitDesignisalwaysInstantiatedinthecontextofsomeSimulationStructure.IftheSubcircuit'sBehavioralDescriptionistobeused,aModuleisintroducedintothatSimulationStructure.TheEvaluationPROCEDUREofthatModuleistheSubcircuit'sBehavioralDescription.If,ontheotherhand,theSubcircuitDesign'sStructuralDescriptionistobeused,thereisachoiceofhowtouseit.Onealternative,Nested,alsointroducesanewModuleintotheSimulationStructure.ItthenintroducesanewSimulationStructure,"inside"theModule,toimplementthatSubcircuitintermsofitscomponents.TheEvaluationPROCEDUREoftheModuleisanotherinstanceofthemainloopoftheStructuralSimulator,directedattheinnerSimulationStructure.WhentheNestedalternativeisused,newNodesarecreated,intheinnerSimulationStructure,correspondingtotheNodesintheouterSimulationStructurethatareontheInterfaceoftheCell.Thatis,therearetwosetsofinterfaceNodesforsuchaCell:oneseenfromtheoutside,andoneseenfromtheinside.TheonesseenfromtheoutsidearetheonesenteredintheinterfaceNodesfieldintheCell.TheonesseenfromtheinsideareputintheinternalNodesSymbolTable.Theotheralternative,Inline,doesnotintroduceanewModule,noranewSimulationStructure.ItcausesthecomponentstobeInstantiatedinthesameSimulationStructure.Thepracticalimportofchoosingoneortheotherisintheorderingofevaluations.IntheNestedchoice,thenestedModuleisevaluated,itisruntocompletionbeforeanythingontheoutsideworldmaycontinue.IntheInlinechoice,thereisnodistinctionbetweeninsideandoutside;theymixfreely.3r b)w ub) ]b)r6b)4b) Ww" b)#7b)r'zb)(Tb).1;4 E{F ` 3#<)A,y1_479b<@DF ^ a \Mw k\M\Mr\M\Mo  7!ly%\M&h\Mr*\M+\M/2B46:<@BG Z wZ=ZreZbZ wwxZ_Zy%Z&Zr-[Z.HZ2f8s:>BE X N ?$(,_14V7y8X9X-O>OwCODOr N-)g:w"N-"N-y)]N-*4N-r2N-3N-68w;N-<Cw>>%r+>,>/26j =Z?EGw :5?d5rDM5D5F 3 VyR3*3r3f3"x #Y%(+uy-e3.=3r2u3335w;3=3rAH3 1dky1d1dr31d1dy"n1d#E1dr%1d&1d)*.A/59Cw;1d<1dArH!1dH1dw / r//w/ / #r'm/((/w)&/* /0m r7/ -0wf-0-0 r--0w-0-0 +r%-0%-0( /3w6-07-0=W rE-0FJ-0Gw + E r"++". )*/r248&=AG/ ) , #w$)%),r0)1a)2pw6)7>) r>)?E)@BG (:w (:(:"r(:((:w f(:!M(:r&(:'I(:w((:)s(:0 r8(:8g(:9;{=A\wB(:C(:rH#(:H(: & Lw&&r%&&&w*&*&y1&2&r:(&:&BDEJ  ## y  r#% # & -H.aw1= 2g r6m 6 94w; z/44q4l4 Tjz4 z4q#4$^4%)+K-<{0,4046 q:4;4 BD)zF4F4q  F -{qu]; {"#q'(O)z++q-.g12s5I7&9K;g<zAOAqE\EG( z  q z;'e #%%'+r-0h257;=?BF%Gz > q >l>z>>q>9>" $'@)&,[.7081z3v>4#> < qDT>r  s ydr #5)g*w-.r2K3056w9:A8rG4H  & 1w 4 r# $6 %'w+] ,E 2r8 } Q5!#&k*5+-0/57 ?wAqyC }D }r $w  r T { #$&(* 16L<>?@E . y . .r .e .!X$&0(( .448':@CEw)XTVm$ Inlineisprobablytheoneyouwant.TherealreasonforhavingNestedaroundittostarttodebugideasaboutpluggingdifferentsimulatorstogether.HerearesomehighlightsfromRosemary.Mesa,aDEFINITIONSfilethathasmostoftherelevantdefinitionsinit:Cell:TYPE=REFCellRep;CellRep:TYPE=RECORD[name:ROPE,class:CellClass,parent:Cell,internalNodes,components:SymbolTable,interfaceNodes:NodeS,other:AList,type:CellType,realCellStuff:RealCellStuff--non-NILonlyforRealCells];CellType:TYPE={Real,Shadow};RealCellStuff:TYPE=REFRealCellStuffRep;RealCellStuffRep:TYPE=RECORD[schedNext:Cell,newIO,oldIO:REFANY,newIOAsWP,oldIOAsWP:WordPtr,state:REFANY,eval:EvalProc,schedWatchers,evalWatchers:CellWatcherList_NIL];NodeS:TYPE=REFNodeSR;NodeSR:TYPE=RECORD[nodes:SEQUENCElength:CARDINALOFNode];ThetypeofaCelldistinguishesthosethatrepresentModulesfromthosethatdonot;RealCellsrepresentModules,andShadowCellsrepresentInstancesofSubcircuitDesignsthathavenoModule(i.e.,areInlines).ACellClassrepresentsaSubcircuitDesign.TheinternalNodesSymbolTableofaCellholdstheNodesthatareusedinconnectingupthecomponentsoftheCell.ThecomponentsSymbolTableholdstheSubcircuitDesignInstancesfromwhichthatCelliscomposed.TheinterfaceNodesfieldholdstheassociationbetweenInterfaceItemsoftheSubcircuitDesignandtheAbstractNetworkstheyareassociatedwith.ForIin[0..class.ports.length),interfaceNodes[I]representstheAbstractNetworkassociatedwiththeInterfaceItemrepresentedbyclass.ports[I].ForRealCells,thatis,onesthatalsorepresentModulesinaSimulationStructure,thereisanadditionalrecordthatholdsadditionalinformation:therealCellStuff.TheScheduleoftheSimulationStructureisalinkedlist,andthelinksaretheschedNextfields.ThenewIOfieldholdsaREFtotheRECORDusedbytheEvaluationPROCEDURE.Forthebenefitofthesimulator,itisduplicatedasaLONGPOINTERTOCARDINALinnewIOAsWP.TheoldIOisusedfordetectingchangesinnewIO.TheevalfieldholdstheModule'sEvaluationPROCEDURE,andthestatefieldisforwhateverusetheEvaluationPROCEDUREwantstoputitto.Node:TYPE=REFNodeRep;NodeRep:TYPE=RECORD[4y b)rb)6b)F6"%(K,.y3qb)4Ib)r9Xb)9b)>?yA.DEE ` jK #9 ^  q (y)^*^ r4 ^4^69xq>x>xy!D>xq">x#>xy(L>x< ;&yq`;& 4;&"y$;&9|  &7qy7M7)y76*4 8 ,9q;54<4y=@4>41.q1._1.y1.q1.1.y]1.51./q~/7/y/q/Y/y/ /q&/';/y-F/./q4/4/:yXyAE+^B+^E}r )w+)U)r))y))r$)%*)w*)+H)r1)2)w3)4);rA)Ar)DGw (r^((y ((r/((9y((r&e(&(-w.r(/Z(5r:"(;.(y>7(?( &h r &h&hy&h&hr&h&hy &h!&hr&&h&q&h(+.*/ 68: BD6yF&hG[&hrI&h $y $ $/ r N$!$$(w&$'$-2r9$:B$=TAyDy$EQ$rH$I$ # y rx   w" )w/P / 5r9 :O ;Yw= > Dr  wr" )H-y/r1y34u6%8rHy NrNNw!N"N'r-tN.N36w9-N9N?QrBNC N y   r *y * *r1*9*2!{!u$lw**+*r0*1*2w3*4*;QrAL*BT*FG  v # +y./ r9:w>(?rEEG/w  ?r.Bx!^$!&),Hy./r7"7;:y>>rC-CFj 4y K4 #4r44y$44r 44|w!B4"*4y(4)4r0K41\44=6;=@3 FH_  yBy9!r)W)y+G,r23y77r<#<=AMC )yr yr+ k$1w&'r+]+w,-y44r;<?fyABrFG^ > X rwF>.>y> Z>r'>(>+-01Xy q  y% q  y ]  BqV B By Bq] B1 By Bw)TVm$name:ROPE,type:SignalType_NIL,visible:Socket_[NIL,LAST[CARDINAL]],readers:SocketList_NIL,watchers:ARRAYPriorityOFNodeWatcherList_ALL[NIL],other:AList_NIL];SocketList:TYPE=LISTOFSocket;Socket:TYPE=RECORD[cell:Cell,index:CARDINAL];NodesholdtheDistributionListsoftheStructuralSimulator.ADistributionListisrepresentedbyaSocketList.TheindexinaSocketisintoatablestoredwiththeClassoftheCellreferredto,whichtellsthesimulatorwheretostuffthebits.Aswasmentionedearlier,alloftheInterfaceItemsassociatedwithagivenAbstractNetworkmustbeofthesameAbstractType.ThatTypeisstoredintheNode.SignalTypesareusedtorepresentAbstractTypes.SignalType:TYPE=REFSignalTypeRep;SignalTypeRep:TYPE=RECORD[toRope:ToRopeProc,fromRope:FromRopeProc,init:TypeInitProc,maxWidth:MaxWidthProc,parseTest:TestParseProc,unParseTest:TestUnParseProc,typeData:REFANY];AlthoughAbstractTypeshavenothingbutanidentity,SignalTypeshavemore.Butwhattheyhaveis(mostly)justforconstructinguserinterface;asfarasmostofRosemaryisconcerned,onlytheiridentityisimportant.TheToRopeProc,FromRopeProc,MaxWidthProc,TestParseProc,andTestUnParseProcareforformattingandparsingTestsandValues(seediscussionofmodeinsection3.3).TheTypeInitProcisusedtoprovideadefaultinitialvalueforfieldsinnewIO.SignalTypesareusuallygottenbycallingsomeperipheralprocedurethatcreatesthem."IntTypes.Mesa"isafilecontaininganinterfacethatprovidessuchaprocedure;itcanbefoundintheexample."Mnemonics.Mesa"isanother.CellClass:TYPE=REFCellClassRep;CellClassRep:TYPE=RECORD[name:ROPE,expand:ExpandProc,ioCreator:IOCreator,initializer:Initializer,eval:EvalProc,ports:Ports,ioWordCount:CARDINAL,ioTemplate:REFANY];ExpandProc:TYPE=PROCEDURE[thisCell:Cell,initData:REFANY];CreateNode:PROCEDURE[within:Cell,name:ROPE,type:SignalType]RETURNS[node:Node];CreateCell:PROCEDURE[within:Cell,instanceName,className,interfaceNodes:ROPE,initData:REFANY_NIL]RETURNS5yb_qb_ub_yb_` !q#`$`y%`_ )!"q#_ $_ y%_ q'S_ ( _ y*8_ q+_ y1F_ 2_ ]`) $oq&]`']`y(+]`[q[[y [!d[q(#[)[y*#[*[ 7q9Q[:$[y;[qz[?R[Z yq 8Z ! Z y"CZ #Z V qVVy5VqVV y"V#VU q~U 7U yU qU YU yU U %*q0U 1U y6U 7U RrRR*wRR erR R!w#R$R*r0R1Rw3IR4FR ;'r=R>TR?Z FHy P r[P5Py PPrP~PyPPr#P$:P%B()@,03y6@P7Pr;OP< P=y?eP@=PrCPD!PH O? <Ph"G$ L yw L sL&?r*2L*L034w8L9}L>mrD9LEcLG K OwKKr"K$KwK mKr#_K#K$)9+ y-K.iKr0Ky1K2K r<KACw IrrIryF qFFy5FqFFy F!lF Ds qeDsDsyDsq lDs!@Dsy%DsBQ A ?t = <  :t 8q88y!@8"8r 6Lw6L6Lr=6L6L"% &y,X6L-06L r6w6L7>6L9=@<CF 4 = 0  %'Q)^*.4/6/7 >WAWD 2 R y22r G2y"2"2 r,=2y.2.2 r832y: 2:2 rE2F2y 1Vrj1V1V "%%w)1V*1Vr-1V.k1Vw0i1V1P1Vr5&1V51V7 >My?1V@1VrD)1VD1VE / y// r/+/4p!&)'S+/359y;1/</r?h/ -0 #%& -F36;> +  " '+_, 458:?AC )=y& q&&y]&q &&y& & $ q$F$y$q$ h$y$$#8q#8u#8y#8!Q   9  y: q:S:y$: q `y"#}: y/:q::y6:q::y%:&\:.3qyA:Ba:} yqZy%P&(,1q77y:;> q#>$>y)>*>/} y q Z y%P &( ,1 =  Bq'C B( By*T B, Bq4s B5G B7#y: Bq; B< By= Bq? B@\ Bw)8TVm$m[cell:Cell];IOCreator:TYPE=PROC[cell:Cell,initData:REFANY];Initializer:TYPE=PROCEDURE[cell:Cell,initData:REFANY,leafily:BOOLEAN];EvalProc:TYPE=PROCEDURE[cell:Cell];Ports:TYPE=REFPortsRep;PortsRep:TYPE=RECORD[ports:SEQUENCElength:CARDINALOFPort];Port:TYPE=RECORD[firstWord,wordCount:CARDINAL,name:ROPE,type:SignalType,input,output:BOOLEAN_FALSE];ACellClassrepresentsaSubcircuitDesign.TheExpandProcholdsitsStructuralDescription.Itisaprocedure,which,whenexecuted,callscertainotherprocedures(CreateNodeandCreateCell);thesecallsdescribetoRosemaryhowanInstanceofthisSubcircuitDesignisconstructedoutofInstancesofothers.InCreateNodeandCreateCell,thewithinparameteridentifiestheInstancebeingelaborated.WhencallingCreateCell,theassociationbetweentheInterfaceItemsoftheInstancebeingcreatedandAbstractNetworksisspecifiedintheinterfaceNodesparameter.Itisoftheformat":"(","":")*.Ineachpair,thefirstidentifiestheInterfaceItem(bythenameofaPort),andthesecondidentifiestheAbstractNetwork(bythenameofaNode).Analternativeformatelidesthefirstandcolonofallthepairs;theassociationisthenpositional.TheIOCreatoriscalledwhentheClassisInstantiatedusingitsBehavioralDescription,orusingitsStructuralDescriptionintheNestedfashion.ThesolepurposeoftheIOCreatoristoallocateRECORDSoftheappropriateTYPEandputREFStotheminnewIOandoldIO.TheInitializeriscalledunderthesamecircumstancesastheIOCreator.ThereasonforsplittingthemistoallowthefieldsoftheIORECORDStobeinitializedaccordingtothewhimsoftheirSignalTypes.TheInitializercanthenoverridethoseinitializations,ifitissodesired.TheInitializerispassedafurtherflag,leafily,whichdistinguishesthetwocasesinwhichitmightbecalled.ItisTRUEwhentheBehavioralDescriptionisbeingused.Inthiscase,theInitialzerisalsoresponsibleforallocatingthestateRECORDthattheBehavioralDescriptionwilluse,andputtingaREFtoitinthestatefieldoftheCell.TheExpandProc,theIOCreator,andtheInitializeralltakeaparameter,initData,whichisforwhateverusetheychoosetoputitto.TheinitDatahandedtoCreateCelliswhatwillbegiventotheExpandProc,IOCreator,andInitializeroftheClassofCellbeingcreated.TheEvalProcholdstheBehavioralDescriptionoftheSubcircuitDesign.ItisaprocedurewhichcomputesfromtheinputfieldsofnewIOthenewvaluesfortheoutputfieldsofnewIO.Thewaychangesintheoutputfieldsaredetectedisasfollows.Beforedoinganythingelse,theEvalProcmustcopyalltheouptutfieldsofnewIOintotheoutputfieldsofoldIO.Thenitcomputes,andupdatestheoutputfieldsofnewIO.ThesimulatorthencomparesthebitsintheoutputfieldsofnewIOwiththoseofoldIO.Notethatthesimulatortreatsthesesimplyasacollectionofbits.Thus,puttingpointersthereprobablywon'twork"right"(andputtingREFsthereisalmostcertaintoconfusethegarbagecollector).TheStructuralSimulatorusestheinformationintheportssequenceoftheClassoftheCelltodeterminewhereeachfieldbeginsandends(notethatthefieldsmustbealignedonwordboundaries--wherenecessary,padthemout6yb6}^yW^q^^y^^q^^y ^!s^&+q4^4^6y9@^:^}[d y[dq[dp[dy[dq[df[dy&\[d'4[d,D1Sq9[d:[d;?>;?A 8yh8?8r88 $*cw,8-%82r68788w;8;c8r@8A8D 7w 7 7rI77 "_y$7%7 r1z72A78i9;w=E?DJGo 5h 4C #&H) ,. 2 w45h45h:r=5h>p5h@kyB5hC5hrG5hG5hHy 3r L3 3E#  w b3!U3&?r,3,~3.py0313r43536y7383r;,3;3 Eq 2 ,C 3"&i( /14? /y / /r>//xy /!/r%/&U/w'i/'/ r/v/0=/3+w5/6/ B_D ( mbQy (!n(#r)(*K(+. 4;*=?DdFcy &l r3&lT&lyq&lI&l r!&l"*&l$`'-~1b:e< =?WA`Fy $ r $n$)y"$#$r($)$- 68s;+>@dD}E # /y##rN#K#wf#Y#$ r,#,#-15a729=y?#@X#rH#I*# !v Q y"?!v#!vr(&!v(!v+w-o!v.b!v4 rBDF  y riyEry"p#H r,-J.Hy01r56ry7p8Hr;?jrBCF !.Z#.$&M+d/39m<~y>!?!rFx!G! y 8"|yJy!yr Yy y#+%)-y/Sy0+yr3y4`y79I?BxG `yr!$+-}0!1418<[y>>rC%D#FB +y + +r+q++"\%'E(5 -/.047<>CF  czL  qR 9 !X"$(,*%.S r3 4h w6r 7Y =crD D G/ Xy  r e  "y%/ & r*> * ,y. /b r2 31 4;&?XBE 5 # t"'l)-/ 4[5: @CvGw) +TVm$withfixedbits).TheportsofaClassrepresenttheInterfaceoftheSubcircuitDesign;eachPortrepresentsanInterfaceItem.RegisterCellClass:PROCEDURE[className:ROPE,expandProc:ExpandProc,ioCreator:IOCreator,initializer:Initializer_NIL,evalProc:EvalProc,ports:Ports,ioTemplate:REFANY_Unspecified];ClientsofRosemarymakeCellClassesknowntoRosemaryviacallsonRegisterCellClass.TheioTemplateisoptional,andisusedforthefollowingpurpose.Thereisaprocedure,inanotherinterface,whichwillInstantiateanygivenClass,constructingontheflyaRootforadesignwhichconsistsofanInstanceofthatClass,andanInstanceofanotherClass,alsoconstructedonthefly,whoseInterfaceisthemirrorimageofthatofthegivenClass(i.e.,allthenamesandtypeswillbethesame,andthedirectionswillbereversed).AViewerwillbeconstructedonthenewIOofthatmirroredCell,anditsEvalProcwillwaitfortheusertoindicateheissatisfiedwiththevaluesshownthere.ThisisaquickandeasywaytodebugapartofaCircuitDesign,withouthavingSubcircuitsallthewayuptotheRootreadytogo.Thisprocedure,inthecasewherethegivenClassistobeinstantiatedintheInlinefashion,needstheioTemplatetoconstructthenewIOandoldIOforthemirroredCell.CreateTopCell:PROC[instanceName,className:ROPE,initData:REFANY_NIL,decider:ExpandDeciderClosure]RETURNS[cell:Cell];ExpandDeciderClosure:TYPE=REFExpandDeciderClosureRep;ExpandDeciderClosureRep:TYPE=RECORD[Decide:ExpandDecider,otherData:REFANY];ExpandDecider:TYPE=PROC[cell:Cell,otherData:REFANY]RETURNS[ExpandDecision];ExpandDecision:TYPE={Leaf,Inline,Nested};Thisishowyougetstarted.CreateTopCellisusedtoInstantiatetheRootSubcircuitofaCircuitDesign.ThatSubcircuitmusthaveanemptyInterface.TheExpandDeciderClosureisthevehiclethatcommunicatestheusersdecisions,foreachInstance,aboutwhethertousetheBehavioralDescriptionortheStructuralone(andinwhatfashion).TheDEFINITIONSmoduleRoseHelp.Mesaprovidestwowaysofmakingthosedecisions:ask:ExpandDeciderClosure;DecideFromFile:PROC[fileName:ROPE]RETURNS[ExpandDeciderClosure];Thefirst,ask,usesabutton-pushingscreeninterface.WhenRoseHelpImpl.bcdisloadedandstarted,itcreatesaViewer.TheViewerhasslotsfordisplayingtheinstanceNameandclassNameoftheInstantiationunderquestion.Ithasaslotforthedecision.Itstartsoutwithapossiblesuggestion,whichthenmaybeedited.Whenadecisionisbeingrequested,aButtonappears,which,whenpushed,causesthedecisioncurrentlybeingdisplayedtobeused.Thesecond,DecideFromFile,readsthedecisionsfromafile.Thefileshouldbeasentanceofthe7r b!  _y _ _r__y__r __ <w"_#_r) _)_*w-__.G_4r8_:_y=g_>?_rA_B#_H?w ]r]}ZyZqZoZy&fZX qXXyXW/  U}  S  (q*WS+?Sy,bSRPiyN qNN `y#YN% N r L2LywL2OL2 r$L2%QL2)*1@3}6y8L29jL2rFL2 Iy I IrI|I[ !$'/)/5d9t:<% CD H +wHSH r9HH y$H%Hr(H)H 136d8w9H:Hr=~H=H?AE F_wF_F_rF_JF_GyF_F_r!LF_"(F_$w&F_'2F_r,F_-F_.y3F_4eF_r7F_8F_;l BDG% Dw.DDrtDDg "%'q)y-D.Dr2D35D57:T>AwEG C pjF 9 ! 'y)=C*Cr/%C0"C14 ;=y@2CA CrEACECG AiyAi}AirAiAi~yKAi#AirAi Ai"%m'),.}356<?-AE ? Ej1!_%&)+Bw,g?-d?1r5?6f?;mw??@? rG?HD? > wH>F>r>>"m% ,.1@4c8;Cy?,>@>rD;>D>EG I@ywCCrI 5 nEwl5_5! r)5*5+w.\5/C5r5]56582;=c@Fy  r 5 "(x+$.095"8 y+} yq@y q))y,$q-.y34r C yCCroCEC7Z %% +/-:yrFFGw  rF =!#%(-//25"819P> E M MUo "% ,Wy-qM.IMr3XM3M8=@E  KK!k#%  ! y ! ! r ! !"Z$*.G/2c5S7s?E^G/w) RTVm$languagedefinedbythefollowinggrammar(withstartsymbol):=>"("[*]")"=>"I"|"N"|"L"=>asequenceoflettersandnumbers(startingwithaletter),orsomethingenclosedindoublequotes.Iftheforaiselided,itistakentobe"L"(Leaf--usetheBehavioralDescription).2.TheTranslatorTheTranslatoraidsinproducingaCellClass.IttakesadescriptionthatismoreorlessintermsofaSubcircuitDesign,andproducesa.MesafilethatincludesacallonRegisterCellClass,withalltherightstufffilledin.2.1SyntaxTheinputtotheTranslatorisafilewhoseextensionis"Rose".Itshouldcontainasentanceinthelanguagedefinedbythefollowinggrammar:=>(";")*=>||||=>"LIBRARY"=>"IMPORTS"=>"OPEN"=>":""CELL"*"ENDCELL"=>"CEDAR"=>"NULL"|"["(",")*"]"=>[]=>"<"|">"|"="=>["["(|)*"]"]["~"]=>(",")*=>":"=>(",")*=>|=>|||||||=>"InitData"=>"DefaultInitData"=>"DefaultInitExpr""|"8r b! $(+0h _ m9! $)v*] ] :d ZM#&V,1]4q59;BMG X Vs n E!#$(B)+.2W36Cw8Vs9Vs? rGFVsGVsp RG 3 r N J 5 &(5+- 4<7%86@BFHe MH |}5>#@%(y-/ 13>ACF= K x HJ )r E ' !h%, -249>>H?EWG/ C  AV] b# *u+s > fB$%*^+:/0 =>"State"=>"InitState"=>"Initializer"=>"Eval"=>"Expand"(";")*=>=>||=>":"=>":""["(",")*"]"[]=>":"=>"init""|"=>(",")*sbeginwithaletter,andcontinuewithlettersanddigits.Caseisinsignificantforkeywords.sareenclosedindoublequotes.sconsistofastringofdigits.Whitespaceisinsignificant,exceptthatititseperatestokens.Mesa-stylecommentsareignored,aswellastextfromTioganodeswhose"Comment"propertyisTRUE.Actually,theabovegrammarisabitofalie,inacoupleofways.First,thestufffromMesaistreatedalittleoddly.ItwasdecidednottotrytoactuallyparseMesa.TherearethreewaysofdelimitingMesa.Inone,usedbyand,acertaincharacter(verticalbar)isusedtomarktheendoftheMesasource.ThatcharactercanbeincludedintheMesapartbydoublingit.AnothermethodfordelimitingMesasourceusesTioga'sdocumentstructure.Whenoneofthekeywordsthatusesthisstyleisencountered,theMesaistakentobethecontentsofallthechildrenofthenodecontainingthekeyword.Also,therestofthatnode(afterthekeyword)isignored.Finally,usesaverysimplemethod:theMesaisputina.TheTranslatoractuallyparsesthislanguagebyfirstusingoperator-precedance,thenapplyingsomefurtherunderstandingtotheresultantparsetree.2.2SemanticsThetranslatorproducesfroma".Rose"filea".Mesa"file(andsomeothers).The".Rose"filecancontaindescriptionsofmanyCellClasses,andauxiallaryPROCEDURES,TYPES,andsoon.The".Mesa"filewillincludecallsonRegisterCellClassforalloftheClassesfromthe".Rose"file.The".Mesa"filewillalsoincludeExpandProcs,IOCreators,Initializers,EvalProcs,andPorts's,constructedfromthedescriptioninthe".Rose"file.The".Mesa"filewillincludedeclarationsfortheTYPESofthestateRECORD,andtheinitDataRECORD.Actually,notallofthesethingsarerelevantforallClasses,andtheTranslatorwillnotproduceirrelevancies.TheclauseindicatesusesofotherCellClasses.AnyCellClassusedbya".Rose"file,anddefinedoutsidethatfile,mustbelistedinaclause.Whenaisprocessed,typecheckingisdone.TheclausestellwheretolooktogettheinformationaboutthoseClasses9r b! c7%"), _p a+L/,2 ] _  Z Up X!- %(p- 5S U  #/<3SS 3% - 1 Nq W %&t) 283 LU -z %t( I ' EU # +g,e. 6791H% E IL C ! q %). > K9'% 9  `s"$%J)m,/0G35 <?.E 7fx! #(,./3848<@2Au 5\I51 %,/46`9m;;>AE 4 1/9 "#&0')-/U369!<[?C}D / <o!#(,20.4*6x9=S? E .E   g"%( 02%6<ADFS , -D] #),h.Y358 ;>@Fg *KHw  $',j2 8<?uA Cq (r u& b!%&*,y.u06X8:<ACF & }!~#7&)x--/57  $G z!t"%*/157 9;:0L?ALB,D%F Ma@OyU-r--/13hy56r<=?BLGv  ]y c r(y)*r2:y324  r=Py>H? rEFy VrVV 3 $~&(e-}0+28>:=,A  Tyr[yr !$':y,-r128;o=?mC!Gd .ky[3rB6 %(x*0G  `_ s# +\.E4'7I9*::?JAD rp O!',M015^ >? F 5U@9+"%h)+q.0z25d =ADw) #TVm$necessarytodothechecking.TheandaretheretoallowfortweakingtheMesathatisproduced;theyaddtothecorrespondingclausesintheresultant".Mesa"file.NamesmentionedinanorclauseareautomaticallyaddedtotheDIRECTORYclauseoftheMesa,ifnecessary.TheTranslatorstartsoutIMPORTingandOPENingRosemaryandIntTypes.Allthree,,,andareadditiveandidempotent.AasaintroducesCedarcodeintotheoutput.Athatoccursbeforeamustcontainonlydeclarations.Athatoccursafterallescancontaindeclarationsfollowedbystatements.AisadescriptionofaCellClass.TheistheInterfaceoftheSubcircuitDesign.TheDirectionisencodedasfollows:"<"meansIn,">"meansOut,and"="meansBoth.sworkasfollows.ThereisaMesainterface(RoseTranslateTypes)throughwhichonecanassociatewithanaSignalTypeConstructor.ASignalTypeConstructorisaprocedure,which,givenaparsetreefortheargumentsinthe,returnsan"understanding"ofaSignalType.This"understanding"knowsthingslikehowmanybitstoallocateinanIORECORD,theMesaTYPEtodeclaresuchafieldtobe,theMesatoproducethatwillcompileintocodetoactuallyproducethedesiredSignalType,andafewotherdetailsneededbytheTranslator.Whenaendswithatildeand,thismeansoverridingtheunderstanding'sdecisionabouttheMesaTYPEtodeclarethefieldoftheIORECORDtobe.ThecontainstheMesaTYPEtouse.CurrentlytherearetwoSignalTypeConstructorsthatgetregistered.OnegoesbytheINT.Ittakesoneparameter,aninteger,whichspecifiesabitwidth.Theparametercanbeomitted;itdefaultsto1.ItproducesanunderstandingofIntTypes.IntType[n],wherenistheintegerparameter.Theother,whichgoesbytheMnemonic,takesasingleargument:aROPE.ItproducesanunderstandingofMnemonics.Mnemonic[r],whereristheparameter.Thescanappearinanyorder,buteachshouldappearatmostonce.AngivesthebodyofaRECORDTYPEconstructor.ThisisusedinconstructingtheTYPEtheExpandProcandInitializerwillexpectforinitData(theIOCreatorwillignoreitsinitData).TheTYPEconstructedwillbeaREFtosuchaRECORD.BothandprovidedefaultsfortheinitDatathatwillbepassedsuchaCell.Theyshouldnotbothbepresent,anditispossibletohaveneither.ThegivesthevaluesforthefieldsoftheRECORD.TheisanyoldexpressionwhichyieldstherightkindofREF.Inawaylikethatofthe,theprovidesfortheconstructionofastateRECORDTYPE.isjustlike,exceptinthefollowingway.WhenconstructinganInitializer,theTranslator,ifgiven,willinitializethestateRECORDatthetimeofallocation,withcodelike"NEW[StateRec_[]]"(anordinarygetsonly"NEW[StateRec]").Inorderforthistogetpastthecompiler,thefieldsgiventomustallbegivendefaultvalues(with"_expr"attheend).Atmostoneofandshouldbegiven.Itispossibletogiveneither;EvalProcsarenotrequiredtokeepstate.Angives,verbatim,codetobeusedfortheInitializer.ItisputinsideaMesathatOPENsthenewIO,theinitData,andthestate(allNARROWedtotheappropriateTYPEs).Angives,verbatim,codetobeusedfortheEvalProc.TheTranslatortakescareofproducingthecodetocopyfromnewIOintooldIO.ThegivencodeisputinsideaMesathatOPENsthenewIOandthestate(NARROWedtotheappropriateTYPEs).AnisusedtoconstructanExpandProcfrom.Thesareprocessedintheordergiven;eachproducescodeintheExpandProc.Asimplygivescodetobecopiedverbatim.10r b) _ I L "&R(.y047v8?BEtG/ ^ /!5&)X-468r>@Ev \Z A & *'+.B2D3 :< CGy ZrZ_ZZyZZrqZZ E" X2 ? I  $&,.. U v5] l %).,r/H16l7= ?DHe T  !#i(+S/24:=A Rb O | yOOr$DO%#O' / 0xw2O3>Or9O9O:w=1O>ODDrHO N:w N: N:rN:{N: #ww'N:(N:r(N:)N:,bw0N:1N:r2N:3N:69w>N:? N:rAN: Kph #'()-3@aE J |KyJ Jr1gJ2~Jy4GJ5JrFJG8JH} Hk !$2&-/2.7:J BG FXyLF$FrF F#..2z69N<[@.BD E  yEErEE yEErE ^E!&e)*-/24d89?$AD Cu nky"Cu#zCur+Cu+Cu.r/2 59>w@ZB AU I#'B(,4/<3n8;@< G/ @&( ny#@&#@&r'R@&'@&)-0%3W57uy9@&:k@&r?z@&?@&A+CvFP >Ky>>r,>> ;,y;;r*j;+s;.A0 7,:0=J?EAyD;E;rG<;H; :W v/ ".'(+/Z2?8;f=cBDb 8  '{l oy!'8!8r1.82 8y6"8r7~88;J? 6/ T\y!d6/"<6/r(#6/)L6/-.29y;)6/<6/r>6/?6/AuG 4 y44r&^4':4y+R4r,4.0z 2 I} $+&).Y24x7 / 7_ uBy//$r)3/)/ 035 8T9 AyD /D/rHC/H/y - r3--yu-M- r -!-#(y+l-,D-r3-3|-y6f-7>-r>-?-B Fy ,7r,7%,7y,7,7r,7,7 e#%y&+,7',7r),7),7+9.ky/,70l,7r4,7 ) O5!#'r,13y6a)79)r=)>g)@CEv ( y/((r(^(J!&)*,=1r36O;M>CfE &h Ymy *&h!&hr%:&h&&h(.60458: AE $ Ky$_$r$ "@ }"-%*0d24 <><y?R"@@*"@Db r L 9 j]"K&?+0 14<:`=A y   r=3 !/$).<25S :y=t>LBrHkI J Mt/ - y!J"bJ$-Y/r1J2J52:>CFu y  t rka!"$%&^)3+137|;!<ALE  F' Ji y"#r'%(K),&/147y9#<AD T]>.$&)wy.T/|Tr7T7T9fv;T<`TrATATBF  ; p "w$d')y,0- r5w6N79);?@Dn ,y , ,r,",y,Z,r,,y,,r!,",%Hy',(,r,,-1,y/!,/,r40,4,6!7:/ yA,Bf,rD,Er,  Tkv"^$M&),zy//r56: @DG xy|Sr##y&a'9r*+r.I15@69(=(>PAGy ]r L]T]y]]r]i]zy]]r]y c]r%r]&]'c)+q y2]3]r60]6]  <ny !f r) *N -0e5 =N?EG 5 cy!\ 5"4 5r) 5* 5+05@8;=L?Cqw)e TVm$AproducesaMesadeclarationthatintroducesaNode.ThisisdonebydeclaringaNode,andinitializingittotheresultofacallonCreateNode.AproducesaMesastatementthatinstantiatesaCellClass.ThefirstisthenameoftheInstance;thesecondnamestheClass.ThesgivetheassociationbetweenPortsoftheClassandNodes:thefirstnamesthePort,andthesecondnamestheNode.TheTranslatorchecksthattheNodeandthePortwerebothdeclaredtobeofequivalentSignalTypes.TheoptionalonagivesaMesaexpressiontobegiventoCreateCellastheinitDataparameter.Ifnoneisgiven,buttheClassbeingInstantiatedhasaor,itwillbeused.2.3RunningtheTranslatorThetranslatorregisterstwocommandswiththeUserExec:RoseTranslate*Doesatranslationforeach.Theextension"Rose"isappendedtothetogetthesourcefilename;variousthingsareappendedtogetthedestinationfilenamesaswell.RoseUpdate*Endeavorstopreparea".bcd"(andafewothers)foreachthatis"consistant"withtheotherstuffonthedisk.Itwilldotranslationsandcompilesofthenamedfiles,andfilestheydependon,inordertoachievethis.Eachtranslationproduces:a".Mesa"file,a".RoseSymbols"file,a".RoseDeps"file,anda".RoseLoad"file.The".Mesa"and".RoseSymbols"havebeendiscussedabove.The".RoseDeps"givesdependancies.Ithastwosections.Thefirstduplicatestheinformationfromthe"LIBRARY"clauses.ThesecondlistsalloftheMesamodulesthatacompilationofthismoduledependson.Byrecursivelyexploringthesedependancies,andcheckingcreatedatesofsourcesandoutputs,itcanbedeterminedwhattranslationsandcompilationsneedtobedone.The".RoseLoad"fileisusedatsimulatetime,tocausetheresultsofcompilationtobeloadedandstartedintherightorder.Each".RoseLoad"filefirstinvokesthoseofthethingsitdependson,andthencausesitsown".bcd"tobeloadedandstarted,ifithasn'talready.2.4RelationoftheTranslatortotheabsenceofTranslatorItisnotnecessarytousetheTranslator.Codecanbeproducedbyothermeans(includingbyhand)toimplementCellClasses.UsingtheTranslator,however,placessomeconstraintsontheClassesreferredtofromthe".Rose"source.Hereisasummaryofthem:Classesreferredtoina".Rose"source,butnotdefinedthere,mustbemadeknowntotheTranslatorviaa"LIBRARY"entry.Foreachgiventhere,theremustbeafilenamed".RoseSymbols".ThisfilegivestheinformationtheTranslatorneedsforthoseClasses.Theformatofthefileshouldbe:("!!")*ThefirstnamesaClassbeingdescribed.ThesecondisthenameoftheMesamodulethatimplementsit.Theencodesafewrandombits:1:IsthereanydefaultforitsinitData?2:DoestheClasshaveanInitializer?4:DoestheClasshaveinitData?Theisthesameasina".Rose"source.IfaRoseUpdateistobedone,theremustalsobeafilenamed".RoseDeps".Itsformatshouldbe11r b) t " ), 3:y4_b)57b)r7b)8b);=@BwHey `r L`(`  "#&?y(F`)`r0` ^  v"w(+ 2y4^4^r;^<^?BEG/ \_ w \_p\_r\_\_$y&\_'h\_r*\_+\_. 7:=# D y ZrZZy ZZrZZyZZrZZ"U%((1,py.Z/Zr2*Z3Z58 <@yC2ZD ZrFZGhZ Y yYYrOYY!y#eY$=Yr'Y(Y*.*35^7N9 y?Y@Y rHY V t #"$r' 045k9; @ADGy T r3TTyeT=TrTT%'|+,~030y5T6zTr:T;xTw>T>T rFTGiTI) SGEz>#E$'F)7x P ) r MV E!$'Q J  H`  D!',.S468<#=@HBG% F%Y!_#& -/w35i D=  A\l 9!g$ (*.%184 5{ =7@VBF^ @ g: U"'), 0369<AD!E >t  ; T  Yx #$ .12 :=@6AU :Q ig !$(.2^5( =U@ 8 h  "C$ ,5/2:b?[B7F 7  )zZ %2&).4B68 ?F 5[ P["$),K1357 >BF 3  19 R{$F')-0.46 >?@B2F /ZK %'w*@/124l6:<ApCFi -&i";'(q)-x * )e ? %'k r ' j Wq& "&)>+51[3]7;M ACG &Qy&Q&Q r&Q&Q '-b1[4 ;=p?DM $ a2 !;'8(y "/r"//"/3Uy$&)-1537:?T@CS  A  #)&*.245X7b@+BE 9   q x"O#M C \y?CCrOCC"T ),$02529,; =AF  VE"|#&F+g !  'Q7y!!r#!  #yZrXy r% + #y+Z+r+X+y++r!o+  6o$ 5 n p{F $7'(*,1<+>'BGw)e TVm$*[";"*]Eachinthefirstlistwillberecursivelylookedatinthemannerwearediscussing.Thesecondlist(ifpresent)istakentobealloftheMesamodulesintheDIRECTORYclauseof".Mesa"(ifitexists),thatis,alloftheMesamodulesthatthisonedependson.Thislistwillbeusedtodecide(bylookingatcreatedates)whentocompile".Mesa",ifitexists.Finally,the".RoseLoad"producedwillreference".RoseLoad".ItshouldcontainUserExeccommandstocausetobeloadedandstarted,ifnotalreadyloadedandstarted,theimplementationsoftheClassesfoundin".RoseSymbols".ForanexampleofsomethingthatdidnotusetheTranslator,seeRoseClocks,insection5.3.TheSimulation-TimeUserInterfaceSeetheexampleinsection5.Itwouldprobablyevenbeagoodideatobringuptheexampleandpokeatit.3.1DisplaysOnanInstantiatedCircuit,youcanbringupDisplays.ADisplayshowsInstantiatedSubcircuits,i.e.Cells,andNodes.DisplaysaremanipulatedviaControlPanelsandBrowsers.InaDisplay,aCellisshownasitsinstancename,followedbyacolon,followedbyanoutlinedrectanglewhichincludesthedisplayofeverythingthatisadescendantofthatCellandisbeingdisplayed.IfthatCellisaRealCell,whenitisinitsSchedule,itsinstancenameisdisplayedinanunusualmanner.IfitisattheheadoftheSchedule,itisdisplayedinvideoreverse.IfitiselsewhereintheSchedule,itisdisplayedonalightgraybackground.ANodeisshownasitsname,followedbyoneortwospecialcharacters,followedbyatextualrepresentationofthebitslastsentoutonitsDistributionList.IfthereisonlyonespecialcharacteraftertheNode'sname,itsmeaningisasfollows:":"TheNodeisinternaltotheimmediatelyenclosingCell."<"TheNodeisaninputtotheimmediatelyenclosingCell.">"TheNodeisanoutputoftheimmediatelyenclosingCell."="TheNodeisbothaninputandanoutput.Iftherearetwospecialcharacters,thefirstwillbeacolon.TheimmediatlyenclosingCellhasbeenInstantiatedintheNestedfashion,andthisNodeistheinternalversionofoneoftheinterfacenodes.Thesecondcharacterindicatesthedirection.RosemaryallowsforausertomanuallycausebitstobedistrubutedfromaNode.ThecharactersintheTiogaViewertotherightoftheNode'snamemaybeedited.Whenthesignalisgiven,thenewtextmaybeparsedintobitsanddistributed.ThesignalisgivenviaaControlPanel.Forconvenience,clickingtheNode'snamewiththeLeftmousebuttonwillselectthetextinpendingdeletemode.3.2BrowsersOnanygivenDisplay,Browsersmaybebroughtup.Browsersareusedtocontrolwhatisdisplayed.ThesebrowsersarebuiltwithageneralBrowserpackage.Firstadescriptionofthatpackage,andthenadescriptionoftheRosemary-dependantfeaturesoftheseBrowsers.3.2.1TheBrowsersPackageBrowsersoperateontrees.NotallofthenodesofthetreeneedtoappearinaBrowseratanygiventime;whichnodesappearintheBrowseriscontrollable.DuetothewayBrowsersdisplaythemselves,12r b! 0 > _ cw*j\Q %;)+b-/x469 ?BGQ ] Qc ]"(l* y,[]-3]r4]5e]8:} BZD%El \J wdv g#%+-s025l7Y:<=@CG Z U $&1' X  !'`2S37<B Vs 8.vVsVs"C&+,-r1Vs2yVs4?#@yC#VsCVsr T  RD ]+!$&( /2- 9;@9p N 3r J P!'*,-1M4C59;=CtF' I  x E )r B QwHBB QrBlB* $l&,s.3w7+B7B ?4 rFpBGSBy A.r#A.A.yA.A.rA.A.Z &(-2>4 > NyC>>r{>> "(,^274g5:?BD? <T!#} *-/80 79y=<=<rA9<A<D/E ;X py;X;Xr;Xu;Xy;X;Xr#X;X$B;X()g*,w.;X/j;Xr4;X5s;X7[<@AH' 9 :M$!q#w%i9&P9r+p9,<9-.46:9?2@ACD 8  w 8 8 r8 8 3 $'- 5y 5 5r5g5ef$'F*E,]/\4+ ;DA<CE 3 x!4#1w%3%3 ,r/"3/31m46O9_<@tFS 22 K //S " *0 -"-"SZ!#h +@1H **S !!$: ,2 ((S"%N'> % $P "3%!')+*/W2F 9y?%@%rC%D%Fow # r#I#y##r#E# #y&9#'#r*q#*#+.,3:79@YE "; V?O \v"m&(*^,H 36y88r;{$B1DG~ d G "$()-/059AC  !t"(-1 2A 9_;$=CFi ;  (@#q(*V-v h 2r !x#'),F/!24\8:<AqC"E 5 Y#%l -_02?47=BF w)e 5TVm$thereisaconstraintthatwheneveranodeinthetreeisdisplayed,allofitsancestorsmustalsobedisplayed.ABrowserislayedoutasfollows.Eachnodethatappearsisallocatedarectangulararea.IntheupperlefthandcornerisaButton.ThenameofthatButtoncanbethoughtofasthenameofthelinkfromthatnode'sparent(i.e.,thenameofastepinthepathfromtheroot).Totherightofthenameisanapplication-dependantViewer.Belowthis,andindented,maybeaverticalstackingoftheareasallocatedtothechildrenofthisnode.Alternatively,thechildrenmaynotappear.ClickingtheButtonforanodewiththeLeftmousebuttoncausesthenode'schildrentobedisplayed.ClickingitwiththeRightmousebuttoncausesthenode'schildrennottobedisplayed.TheMiddlemousebuttonisreservedfortheinterpretationoftheapplication.3.2.2RosemaryBrowsersThetreethatRosemarypresentstoaBrowserisasfollows.FromaCelleminateatmostthreelinks:"Components","InterfaceNodes",and"InternalNodes"(notallwillapplytoallCells).The"Components"nodehasachildforeachofthecomponentsofthatCell.The"InterfaceNodes"nodehasachildforeachoftheinterfacenodesofthatCell.Andthe"InternalNodes"nodehasachildforeachoftheinternalnodesofthatCell.ThetreenodescorrespondingtoNodeshavenochildren.ClickingtheMiddlemousebuttoncausesthingstobedisplayed.Allofthedescendantsofthetreenodeclicked,includingitself,areenumerated.ThosethatareforCellsorNodescausethosethingstoappearintheDisplay.ClickingtheMiddlemousebuttonwitheitherShiftkeyhelddowndoestheopposite.EveryNodeorCellfoundintheenumerationismadetodissappear.HereistheprocedurethatcreatesRosemaryBrowsers:RoseDisplayBrowsing.BrowseDisplay:PROC[display:Display,info:ViewerClasses.ViewerRec_[],paint:BOOLEAN_TRUE]RETURNS[v:ViewerClasses.Viewer]TheinfoparameteriswhattheViewerspackageneedstocreateaViewer.Actually,itisonlynecessarytosetafewofthemanyfieldsintheViewerRec.Settingthenameisoftennice.Andyouprobablywantitnottostartouticonic.3.3ControlPanelsOnanygivenInstanceofaCircuitDesign,ControlPanelsmaybebroughtup.Actually,ControlPanelsandDisplayscometogether.Hereistheprocedurethatcreatesthem:RoseDisplayOps.NewDisplay:PROC[cell:Cell,info:ViewerClasses.ViewerRec_[],paint:BOOLEAN_TRUE]RETURNS[display:Display]TheCellgiventoNewDisplaymustbetheRoot.NothingisreturnedfortheControlPanel,asthereisnothingtodowithit(itisonthescreen).TheDisplayisreturnedsothatitmaybegiventoBrowseDisplay.ControlpanelsdealwiththingslikeSchedulingandrunningthesimulator,distributingbitsmanuallythroughNodes,settingconditionalbreakpoints,andsoon.ControlPanelsareRecordViewers,constructedbyViewRec.ViewRec.docshouldbebroughtoverbyRosemary.df,andcontainsadescriptionoftheuserinterfacepresentedbyRecordViewers.WhatfollowsisadescriptionofthemeaningsofthefieldsandproceduresinaControlPanel.Pack:PROCEDUREUpdatesthelayoutoftheDisplayassociatedwiththisControlPaneltotakeintoaccountthelatest13r b) :   n!%c'>),.P 478:ADG ` ] X B`"&Y)0.E/56 =AJC#E \X jJ"$P'(+.W0Q5}7?8;_?'@CRF( Z , !$&),P/296 8B:>?BQF!G Y  #&[,b/X1;2W7<\>@YC Wb  ^ $ &i+.1F Tpxs #&*m.3/59?cAC S7?9#(+*/!47@9;& AD QF#9 &(* v N 2sr L? qS !?&().2y3L?4L?r83L?8L?=t?B|F J 1 % $2*0359=_?AF H [Aj #I%'` / 0y3H4iHr6H7H: AF GI [ ~#NZ#%y(eGI)=GIr+GI,GI/27<@RBCGR E 5KByEEr")E#E%(, 5y7;E8ErA;D , IyH,,rW,x )L )3r & 8wh&&rR& &w& &r$(&$&).21#38':~@=E@ $ 2  v")Y,'0}!zy#!zq%!z&0!zy)!z)!z.4 )0*.?q4'4y:1q;<y? q@Ay,ar y  ryDr "$w'((&r*7+ 0s17h9;AEF  x  "'+0R179<>{ACG Z lxw !xr(d) +/0y2 9j @C 0yx0P0r00 ! )5,@.W1 6r;y=0>0 rH0  +" !R%' /H1- 9|<AjB}  &'y0  r*'+.35!6X =w?>AG : K m!y r 5o! (N+l.3(68;>~CEw)e TVm$changestowhatistobedisplayed,andthecurrentwidthoftheViewertheDisplayisin.NoticeEdits:PROCEDURERETURNS[AOK:BOOLEAN]InvokingthisprocedureishowthesignalisgiventhateditedtextassociatedwithNodesintheDisplayistobeparsedintobitsanddistributed.Someoftheparsesmayfail.FortheNodeswherethishappens,thenameoftheNodewillbedisplayedinvideoreverse,andtherewillbenodistribution.TheflagAOKindicateswhetheralloftheparsessucceeded.Run:PROCEDUREInvokesthemainloopofthesimulatorontheSimulationStructureintheRoot(whatiftheRootisalsoa(and,necessarily,the)leaf?dunno!).NoticEditsAndRunIfOK:PROCEDURERETURNS[AOK:BOOLEAN]DoesNoticeEdits,and,ifAOK,proceedstoRun.SingleStep:PROCEDUREGoesjustoncearoundthemainloopofthesimulator:takethefirstModuleofftheSchedule,andrunitsEvaluationPROCEDURE.IftheScheduleisempty,thisPROCEDUREdoesnothing.Save:PROCEDURE[fileName:ROPE]Savesthestateofthecircuitinthenamedfile.ThestateofthecircuitisconstruedtobethebitsinallthenewIO(andoldIO,actually)RECORDs,andalsothecontentsofthestateRECORDsusedbyBehavioralDescriptions.Restore:PROCEDURE[fileName:ROPE]Restorethestateofthecircuitfromthenamedfile.Thisisevenmeanttobetolerantofsmalldifferencesbetweenthecircuitsavedfromandthecircuitrestoredto.Thechangescurrentlytoleratedareadditionsofthings(Nodes,Cells,fieldsinthestateRECORD).conditions:READONLYSymbolTableThenextfewthingsdealwithbreakpoints.Rosemarybreakpointsareconditional.ThisfieldholdsalistofnamedConditions.AConditionisaBooleancombinationofTests(eachSignalTypehasitsownsetofTeststhatitwillperform,andawayofconvertingtoandfromatextualrepresentationofthosetests).Eachentryinthislistisdisplayedasaname,followedbyapairofparentheses,followedbyatextualrepresentationoftheCondition.TherearetwodifferentwaysofpostingaConditionalbreakpoint,andthepresenceorabsenceofcertaincharactersbetweentheparenthesesindicatesthewaysinwhichthisConditioniscurrentlyposted.ThislistisdisplayedinaTiogaViewerallitsown,andmaybescrolledifitgetstoolongfortheareaallocated.mode:{Value,Test}TheDisplaymaybeusedforcomposingTests,ratherthanshowingtheValueofaNode(i.e.,thebitslastdistributedthroughit).ThisswitchcontrolstheuseoftheDisplay.WhenintheTestposition,theTiogaViewersfortheNodesintheDisplayholdtextualencodingsofTests,accordingtotherulesoftheSignalTypesoftheNodes.TheNoticeEditsPROCEDUREisstillusedtoinvoketheparsers.Actually,witheachappearanceofaNodeintheDisplaythereisalwaysassociatedatmostoneTest,whetherthisswitchcausesittobedisplayedornot(anabsenceofTestisdisplayedas"??",whenmode=Test).condition:READONLYConditionThisfieldholdsatextualrepresentationofaCondition.ThisfieldisusedincomposingnewConditions.When,intheDisplay,theMiddlemousebuttonisclickedonaNode'sname,anewfactorisANDedintothisCondition.ThatfactoristheTestofthatNodeappearance(notethatsomeNodescanappearmorethanonceinaDisplay).Ifeithershiftkeywashelddown,thatfactoristhenegationoftheTest.14r b)Q "g%'~,H0*1y4Bb)5b)r:)b):b)<ABy _ R$) r ]*a #6'B(,/36 =Hy@]*A\]*rE]*E]*Gb [ T# *?. /2 6#9;>ry@[A[rE[F[ Y770y Y!Yr%Y&Y'*%02s6s;>BEkG X4 pHyX4X4r^X4X4#(]*M,.e2 y U#r S5A#%A'Q) 068:>hBHCF Q vQ:QrQQ"y Oz$+0r Ly6LL r}LYLiyLLr!QL".L'y)L*pLr, Ly J  r G7  #%W' .11!3ww6FG7pGr;~G<9G=w?G@GrFGFG EDwEEyZE2ErE E"Ow$E%Er+:E+E,17y3E4ErDE 6  ="&5(+//4`6H9>C 5Ny?5N5Nrv5Ny S5N!+5Nr$5N%g5N)*y-)5N.5N28r7H5N75Ny 2   r 0O\ '. 57 ?vBE . <w..r.u.w .!.r&.'C.(_)/ 7w8.9.r<.=W.y@.As.r -`xw --r=-- I!$*-/2$4 ;=?CE +Y 3&"&R(*-.467;ACDG ) o 6! *,kw.)/)r4)5)9<+>D{G ( w( ( r( ( "M%$'-k/O46k; AG/ &c ;!R%fw(&c) &cr.&c//&c0>6!:>@IAG $ iY4 G#K%<*Q+-/2?5Y79< y "<r w%&r)n*N._169R=M? y@7ArDnDG x ; $.(-0y347= ALC#yEFr nynn)r n!bn#_y%n&nr+n+kn,/486<CwEnFlnrIn )y* r(I))y,J-"r01Ry44 >=rFGH   YQ#&1)\ 02;y3_ 47 r7 7 9>;@DE x  wx^xrBxx#P%*.:/1!39:=0?DwFIxG&xr 8Byr!/y##r&s&y Q 3wQQr  {q &(w*C+@r0v148a:=?{Fw + r+~+/"%).b24b9;2yEfF 6yw2 0 r#f $Z '+-Aw/ 0 r3 3 4y7 8 r< < CPF y3  rB  9"&'(.0369}"%'y*^*^r1^2^6P8;C>@ DBG/ \gP6y\g\g r h\g \g"oy$\g%\g r1\g2\g4{99:?DHq Z w"$y$Z%YZr,Z-TZ.Z0t2 3H71;r>BD Fh Y[,] C"$).25A7<wB,YC YrEtYF/YG/y Wqr WqWqy Tjr RyyRyiRyrRyoRyw#Ry$Ryr)FRyy O  r MyeM=M r 4My K Lr H yiHAH r8HH!$'*y,H-Hr4Hy F"a(Hr CLyCCrCCC: y$NC%&Cr'C(C*8,.0y5C5Cr=Cy Az$*r >f]y >!>r**>*>,/52P4y8d>9<>r;>y < $,r 9la`$)w%H9&E9r+{9,L9w/909r5969:!;=@vCEy 7r 77y77r777!'#(, 27$w8m79j7r?D7?7@ETG" 6Vl%'| /<4w5A6V6>6Vr;6V2y 0B &.0r .Mw3.0.r"f.y +B &-Xr )ov!gw")#)r()))-n2_39<>BCEF 'q!}y'q'qr!'q"'qw%'q&'qr*'q*'q,3w.'q/'qr5'q64'q8M9sw<]'q=D'qr?'q@'qwC/'qD,'qr % >V $@)J*/y2+%3%r8%8u%9~y #N"a(H/r 32  x  )r  8 $h%147z92;BGD  Iy<r# (*-y/A0 r;  <  #.%)+.0~279| AB   $&P"$l)b,}- { NN6 B (+|1 9:>H@F   "K $M'h)/y XBr <$!&*1/\15`8ew)eTVm$/thenphi1:off&phi2:onthenphi1:off&phi2:off).Ineachstep,thetwoclocksaresettotheappropriateValues,andthenthecircuitisRun.Step:PROCEDUREDoesonestepofclocking.state:READONLY[0..5]Thisisusedbyimplementationofclockgeneratorstokeeptrackofwhattodonext.States0-3areusedfor4-stepoperation,and4-5for2-step.sofar:READONLYCARDINALWhenCycling,thisindicateshowmanycycleshavebeencompleted.4.Thereisnosection4.5.ExampleHereisanexample,usinga4bitwide,4stagelongshiftregister.HereisthelogfromtheUserExec,showingaBringoverofeverything,useoftheTranslator,anduseoftheSimulator.&2bringover/a[Indigo]RosemaryLoadedandstarted:BringOver.BcdBringOver,VersionOf16-Mar-8315:03:02PST.[Indigo]Rosemary.DF!17(19-Mar-8312:35:59PST)...EndofBringOverofRosemary.DF..filesretrieved.TotalelapsedtimeforBringOver00:01:13.NowwewillusetheTranslator.First,getitloadedandstarted:&3@RoseTranslator>RunNewRoseTranslatorLoadedandstarted:RunNew.bcd>RunRoseTranslator(thereareunboundimports)Loadedandstarted:RoseTranslator.BCD>RunNewIntTypesTranslation>RunIntTypesTranslationLoadedandstarted:IntTypesTranslation.BCD>RunNewMnemonicsTranslation>RunMnemonicsTranslationLoadedandstarted:MnemonicsTranslation.bcdWedelete"ExamplePrimitives.RoseSymbols"(ithappenedtobelyingaroundonthedisk)sothattheRoseUpdatealgorithmwilldecidetotranslateeverything:16r b!){+,.?1^36.:(<^>]?B/ w `yr`y`yOy`y `yr"C`yy ]r [u6y Xjr Vq,d[ 6!%{ ,-14669;:==y@VqAxVqrFVqGVqH T=z  !$&]y RHjr OyOOrOO+"&*-1E p Kr HB Z`p D r @ _6`"[#'*-7 >< Zj&%&%,.3 5K79o; BEfG < K }98yG9898>7 5 !M)1S2* 3;q0/" -tFV *"$*r % Ls !#%),R}"yG""  ~ .  |y"t~i~ r  &'.a0!2$5:w<?BzDOG/ 5   &> w)e#TVm$4&4deleExamplePrimitives.RoseSymbolsDeleted:ExamplePrimitives.RoseSymbolsNowweinvoketheTranslator:&5RoseUpdateShiftingLoadingCompiler.bcd...Compiling:ExamplePrimitives/-g......noerrorsEndofcompilationCompiling:SRHC/-g......noerrorsEndofcompilationCompiling:Shifting/-g......noerrorsEndofcompilationFollowingisaredescriptionsofsomeofthefilesinvolved;theactionresumesadozenorsopagesaheadwith&9(&6,&7,and&8seemtohavebeenthecompilations).TheTranslatorcreatedaViewershowingalog,whosecontentsbecame:TranslatingExamplePrimitives.RoseintoExamplePrimitives.Mesa,logonExamplePrimitives.Log0errors,0warnings;sourcetokens:45,time:3.19168Done.TranslatingSRHC.RoseintoSRHC.Mesa,logonSRHC.LogReadingsymbolsfromExamplePrimitives.RoseSymbols...Donereadingsymbols0errors,0warnings;sourcetokens:71,time:6.116832Done.TranslatingShifting.RoseintoShifting.Mesa,logonShifting.LogReadingsymbolsfromRoseClocks.RoseSymbols...DonereadingsymbolsReadingsymbolsfromSRHC.RoseSymbols...Donereadingsymbols0errors,0warnings;sourcetokens:222,time:8.04496Done.SeefiguresE,S,W,N,andRfortheCircuitDesignbeingsimulated.HerearethecontentsofExamplePrimitives.Rose:PassBlock:CELL[inputINT[4]]EvalIFgateTHENoutput_input;ENDCELL;InvertBlock:CELL[inputINT[4]]Evaloutput_IntNot[4,input];ENDCELL17}ayGaa~_Vr [ LsM }X+yGX+X+|VvzyT )+k-.0{2+36bS QY  u"$#%'4(+kO M  "$#%'4(*,C.L= r H_ : "l$'-/49D:a>`@AE FY} FY FYrFY}FYrFY}FYmFYrEFY"FY}FYFYraFYFY"&0( C [%O#c$'8+f0y@i ,C0{D>z= o.!M'4-1S6b;Y6< !M% .2+44~= u21o.!M'4-1S6b/k*N  $( 58;q (~= u&%1~= u#}!o.!M'4-2+7: r  pc.!&+*.  _:y ="$#*.0{4;qd3##[)B* $+k2+ bd K(j w)eTVm$5IntNotisaPROCEDUREfromIntTypes,aDEFINITIONSthatgetsOPENEDinevery.MesafileproducedbytheTranslator.HerearethecontentsofIntTypes.Mesa:DIRECTORYRosemary;IntTypes:CEDARDEFINITIONS=BEGINSignalType:TYPE=Rosemary.SignalType;Bit:SignalType;--sameasIntType[1]IntType:PROCEDURE[bitWidth:CARDINAL]RETURNS[SignalType];IntNot:PROCEDURE[bitWidth:[1..32],bits:LONGCARDINAL]RETURNS[LONGCARDINAL];END.IntTypes.IntType[n]returnsaSignalTypeforann-bitwideinteger.IntNot[n,x]returnsaywhosenleastsignificantbitsaretheinverseofx's,andtherestofwhosebitsare0.HerearethecontentsofSRHC.Rose:LibraryExamplePrimitives;SRHC:CELL[inputINT[4]]InitDatainit:[0..15]_7DefaultInitExprNEW[SRHC.SRHCInitRec_[13]]|Statelatched:[0..15]_0Initializerlatched_initExpandtemp:INT[4];Pass:PassBlock[input:input,gate:clock,output:temp];CEDAR--anyoldCedarcodemayappearhere;Inv:InvertBlock[input:temp,output:output]EvalIFclockTHENlatched_input;output_IntNot[4,latched];ENDCELLTheTranslatorproduced4filesfromSRHC.Rose:SRHC.Mesa,SRHC.RoseSymbols,SRHC.RoseDeps,andSRHC.RoseLoad.HereisSRHC.RoseSymbols:SRHCSRHC7"NEW[SRHC.SRHCInitRec_[13]]"[inputINT[4]]!!HereisSRHC.RoseDeps:18y b)rb)6b)yb)b)rgb)b)%{y&b)'b) r1 b)1zb)4!y75b)8 b)r=b)=b)?CGV ` g V!#|(* q]&y[x~Xy3XqXX^ y&cXqTyQe qQeQey5QeQeN  |!N $(T* }JyJqWJJyJJq'GS?GSyEqEEyE EqBPyFBP ?r?N?{y ?!z?r)?*b?,$y.?r.?1~4y9?:?B.rD?E:?Igy >'r >' >'y>'r&>'K "8&y(>'r){>'+4-0J248;t= ; _: y8J~4-3:3@d1t$3%/!$o35M:].7d,&(j* d)-# 'd%td$$t+16<Cgd"v7 "F%*.2L84ddm,18pd$3*,dcK(jr 4 So ) 1Z>p    _y^.,C-34 AY !r 5 _ w)eTVm$ExamplePrimitives;ExamplePrimitivesIntTypesRosemaryHereisSRHC.RoseLoad:@ExamplePrimitives.roseLoadrunnewSRHCHereisSRHC.Mesa,whichistheMesacodetoimplementtheShiftRegisterHalfCellClass:--SRHC.Mesa--createdbyRoseTranslatefromSRHC.Roseof19-Mar-8312:19:02PSTforSpreitzer.paat19-Mar-8312:40:18PSTDIRECTORYRosemary,IntTypes,ExamplePrimitives;SRHC:CEDARPROGRAMIMPORTSRosemary,IntTypes,ExamplePrimitives=BEGINOPENRosemary,IntTypes;--SignalTypedeclsCreatePorts:PROC=BEGINSRHCPorts[0]_[0,1,"input",IntType[4],TRUE,FALSE];SRHCPorts[1]_[1,1,"clock",IntType[1],TRUE,FALSE];SRHCPorts[2]_[2,1,"output",IntType[4],FALSE,TRUE];END;RegisterCells:PROC=BEGINRegisterCellClass[className:"SRHC",expandProc:SRHCExpand,ioCreator:CreateSRHCIO,initializer:InitializeSRHC,evalProc:SRHCEval,ioTemplate:NEW[SRHCIORec],ports:SRHCPorts];END;SRHCIORef:TYPE=REFSRHCIORec;SRHCIORec:TYPE=MACHINEDEPENDENTRECORD[fill0(0:0..11):[0..4095],input(0:12..15):[0..16),fill1(1:0..14):[0..32767],clock(1:15..15):BOOLEAN,fill2(2:0..11):[0..4095],output(2:12..15):[0..15]];SRHCInitRef:TYPE=REFSRHCInitRec;SRHCInitRec:PUBLICTYPE=RECORD[init:[0..15]_7];19yb6!M0{8r _ _ y^\hr Y _ "%'.n04+9<?yV T. %)2+4=!DSIR #I%.?5ONO$oJITQ"+/:]FDYAV< :d8  8#&- 7<7  8#&- 7<5i  8#&. 8>30n e.-,d+t " d) !7d(" d&y "% d$K #' =!M - =$-3! !2! !! 7"= "  #%+k `! Bw)eQTVm$~SRHCStateRef:TYPE=REFSRHCStateRec;SRHCStateRec:TYPE=RECORD[latched:[0..15]_0];SRHCExpand:ExpandProc=TRUSTED{OPENNARROW[initData,SRHCInitRef];temp:Node_CreateNode[within:thisCell,name:"temp",type:IntType[4]];[]_CreateCell[within:thisCell,instanceName:"Pass",className:"PassBlock",interfaceNodes:"input:input,gate:clock,output:temp"];--explicitlyrequestedCEDAR:--anyoldCedarcodemayappearhere[]_CreateCell[within:thisCell,instanceName:"Inv",className:"InvertBlock",interfaceNodes:"input:temp,output:output"];};CreateSRHCIO:IOCreator={cell.realCellStuff.newIO_NEW[SRHCIORec];cell.realCellStuff.oldIO_NEW[SRHCIORec];};InitializeSRHC:Initializer={IFleafilyTHENBEGINstate:SRHCStateRef_NEW[SRHCStateRec];cell.realCellStuff.state_state;BEGINOPENNARROW[cell.realCellStuff.newIO,SRHCIORef],NARROW[initData,SRHCInitRef],state;latched_initEND;END;};SRHCEval:EvalProc=BEGINnewIO:SRHCIORef_NARROW[cell.realCellStuff.newIO];oldIO:SRHCIORef_NARROW[cell.realCellStuff.oldIO];oldIO^_newIO^;BEGINOPENnewIO,NARROW[cell.realCellStuff.state,SRHCStateRef];IFclockTHENlatched_input;output_IntNot[4,latched];END;END;SRHCPorts:Ports_NEW[PortsRep[3]];CreatePorts[];RegisterCells[];END.20ya  u# _  u&\^')!#\wY  "$#*Wf& U.6< BT R^'0> < P # .; O # M_ &dKt %*-z3aI'0> < HX # /=1 FEA "$?(*W- >?(*W- <9.= &\( 7~d5d4K )B*.Rd2m-z/)d0t!= /, 87-f#%7+d*(U$.#D!y!#!y!#!3y)" d+$3*,d{K(jd "$  Z e w)eTVm$HerearethecontentsofShifting.Rose:ImportsIO,Mnemonics;OpenMnemonics;LibraryRoseClocks,SRHC;SRWC:CELL[phi1,phi2<,inputINT[4]]Expandmiddle:INT[4];First:SRHC[input:input,clock:phi1,output:middle]initNEW[SRHC.SRHCInitRec_[3]]|;second:SRHC[input:middle,clock:phi2,output:output]ENDCELL;NBitSR:CELL[phi1,phi2<,inputINT[4]]InitDatan:CARDINALExpandCEDARprev,next:ROPE;next_"input";FORi:CARDINALIN[0..n)DOprev_next;IFn#i+1THENBEGINnext_IO.PutFR["node%g",IO.card[i+1]];[]_CreateNode[within:thisCell,name:next,type:IntType[4]];ENDELSEnext_"output";[]_CreateCell[within:thisCell,instanceName:IO.PutFR["SRWC%g",IO.card[i]],className:"SRWC",interfaceNodes:IO.PutFR["input:%g,phi1:phi1,phi2:phi2,output:%g",IO.rope[prev],IO.rope[next]]];ENDLOOP;ENDCELL;CEDARInitFor:PROC[n:CARDINAL]RETURNS[NBitSRInitRef]={RETURN[NEW[NBitSRInitRec_[n]]]};;Counter:CELL[phi1,phi2<,count>INT[4],report=Mnemonic["ShiftCounterOps"]]Statenext:[0..16)_5EvalIFphi1THENnext_(count+1)MOD16;IFphi2THENcount_next;report_reports[phi1][phi2];ENDCELL;21r b) _: y^~ ]) [~~ X)# / V~dT#dS)K-z 7 D?Q!1%2dO#/) 9H@N,J~% 1S I,dGEqdD+y7B"Fq'VB(*By*gB7@!n#q7?+y ?+ ?+q"?+#]?+)3y*?++?+q0?+1?+y" =&A'q" ;y#;%F;&q*V;+;&:+y&8+q,8--8y. 8.8q<`8<8y=8>~8 &6)d+;C-5.27/ q&3" 1y%>1&1)v+%" 0.$&A6G(=. q4 .4v.y5R.6*.q(=,y),*[,2 <(=+8q5+86%+8y7+87+8 C(=)-M2\7k<{C:q(='y)'*[' q4z'4'y5'6' q" &?y'&?$!?}yzq*yq""y(Mq)*y/0 =ldq<yqfy"#d /20>V u&\ B#dt$3%Bd##[')B/)03a6d##[(j*d AK w)e TVm$NCEDARreports:ARRAYBOOLEANOFARRAYBOOLEANOFShiftCounterOps_[[BothOff,Storing],[Looking,BothOn]];;TopNBitSR:CELLNULLExpandfront,back:INT[4];PhaseA,clk2:INT;sink:Mnemonic["ShiftCounterOps"];clkGen:ClockGen[PhaseA:PhaseA,PhaseB:clk2];cntr:Counter[phi1:PhaseA,phi2:clk2,count:front,report:sink];shifter:NBitSR[input:front,output:back,phi1:PhaseA,phi2:clk2]initinitData|ENDCELLAndforthoseofyoureallyintobloodandguts,herearethecontentsofShifting.Mesa:--Shifting.Mesa--createdbyRoseTranslatefromShifting.Roseof16-Mar-8319:20:10PSTforSpreitzer.paat19-Mar-8312:40:43PSTDIRECTORYRosemary,IntTypes,IO,Mnemonics,SRHC,RoseClocks;Shifting:CEDARPROGRAMIMPORTSRosemary,IntTypes,IO,Mnemonics,SRHC,RoseClocks=BEGINOPENRosemary,IntTypes,Mnemonics;--SignalTypedeclsShiftCounterOps:TYPE={BothOff,BothOn,Looking,Storing};CreatePorts:PROC=BEGINSRWCPorts[0]_[0,1,"phi1",IntType[1],TRUE,FALSE];SRWCPorts[1]_[1,1,"phi2",IntType[1],TRUE,FALSE];SRWCPorts[2]_[2,1,"input",IntType[4],TRUE,FALSE];SRWCPorts[3]_[3,1,"output",IntType[4],FALSE,TRUE];NBitSRPorts[0]_[0,1,"phi1",IntType[1],TRUE,FALSE];NBitSRPorts[1]_[1,1,"phi2",IntType[1],TRUE,FALSE];NBitSRPorts[2]_[2,1,"input",IntType[4],TRUE,FALSE];NBitSRPorts[3]_[3,1,"output",IntType[4],FALSE,TRUE];CounterPorts[0]_[0,1,"phi1",IntType[1],TRUE,FALSE];CounterPorts[1]_[1,1,"phi2",IntType[1],TRUE,FALSE];CounterPorts[2]_[2,1,"count",IntType[4],FALSE,TRUE];CounterPorts[3]_[3,1,"report",Mnemonic["ShiftCounterOps"],TRUE,TRUE];END;22yb6`) 8&).5M7ETd^ !*2])Y =XdVlK#[dT#$3dS tdO#-z49:dNt )B05: @LY%WdJ +18p=BI#(,GSr D CR!$'*-M/56 yAr?. %) 58@>R &)0196:9 $o' 16% 5.=4Q"+/. 7< F+0.$o +V)!&'0>6>$ #(!y  8#&, 6<   8#&, 6<   8#&- 7<k  8#&. 8> 8!%G'. 8= 8!%G'. 8=^ 8!%G'/f 9> 8!%G'0> :]@D!"&(/f 9>P!"&(/f 9>!"&(0> :]@D!"&(1 J w)eTVm$RegisterCells:PROC=BEGINRegisterCellClass[className:"SRWC",expandProc:SRWCExpand,ioCreator:CreateSRWCIO,initializer:NIL,evalProc:NIL,ioTemplate:NEW[SRWCIORec],ports:SRWCPorts];RegisterCellClass[className:"NBitSR",expandProc:NBitSRExpand,ioCreator:CreateNBitSRIO,initializer:NIL,evalProc:NIL,ioTemplate:NEW[NBitSRIORec],ports:NBitSRPorts];RegisterCellClass[className:"Counter",expandProc:NIL,ioCreator:CreateCounterIO,initializer:InitializeCounter,evalProc:CounterEval,ioTemplate:NEW[CounterIORec],ports:CounterPorts];RegisterCellClass[className:"TopNBitSR",expandProc:TopNBitSRExpand,ioCreator:NIL,initializer:NIL,evalProc:NIL,ioTemplate:NIL,ports:TopNBitSRPorts];END;SRWCIORef:TYPE=REFSRWCIORec;SRWCIORec:TYPE=MACHINEDEPENDENTRECORD[fill0(0:0..14):[0..32767],phi1(0:15..15):BOOLEAN,fill1(1:0..14):[0..32767],phi2(1:15..15):BOOLEAN,fill2(2:0..11):[0..4095],input(2:12..15):[0..15],fill3(3:0..11):[0..4095],output(3:12..15):[0..15]];SRWCExpand:ExpandProc=TRUSTED{middle:Node_CreateNode[within:thisCell,name:"middle",type:IntType[4]];[]_CreateCell[within:thisCell,instanceName:"First",className:"SRHC",interfaceNodes:"input:input,clock:phi1,output:middle",initData:NEW[SRHC.SRHCInitRec_[3]]];[]_CreateCell[within:thisCell,instanceName:"second",className:"SRHC",interfaceNodes:"input:middle,clock:phi2,output:output",initData:NEW[SRHC.SRHCInitRec_[13]]];};23yb6 e`^,d]5 " d[ !7dY dX4 "% dVK T,dS3 " dQ !9HdO dN2 "% dLK J, dI1 "dG !EdD4 dB "%d@K ?3, d= "d; !0d:2 d8 "d6K511 =!M 00 =$-3.! ,!+.! )!'! &-!$! ""  "$#*+Q 80>8= '0> < 2 # )7I  #1b9(*8'0> <  # )7I  #1b9 B(*/ w)eKTVm$pCreateSRWCIO:IOCreator={cell.realCellStuff.newIO_NEW[SRWCIORec];cell.realCellStuff.oldIO_NEW[SRWCIORec];};SRWCPorts:Ports_NEW[PortsRep[4]];NBitSRIORef:TYPE=REFNBitSRIORec;NBitSRIORec:TYPE=MACHINEDEPENDENTRECORD[fill0(0:0..14):[0..32767],phi1(0:15..15):BOOLEAN,fill1(1:0..14):[0..32767],phi2(1:15..15):BOOLEAN,fill2(2:0..11):[0..4095],input(2:12..15):[0..15],fill3(3:0..11):[0..4095],output(3:12..15):[0..15]];NBitSRInitRef:TYPE=REFNBitSRInitRec;NBitSRInitRec:PUBLICTYPE=RECORD[n:CARDINAL];NBitSRExpand:ExpandProc=TRUSTED{OPENNARROW[initData,NBitSRInitRef];--explicitlyrequestedCEDAR:prev,next:ROPE;next_"input";FORi:CARDINALIN[0..n)DOprev_next;IFn#i+1THENBEGINnext_IO.PutFR["node%g",IO.card[i+1]];[]_CreateNode[within:thisCell,name:next,type:IntType[4]];ENDELSEnext_"output";[]_CreateCell[within:thisCell,instanceName:IO.PutFR["SRWC%g",IO.card[i]],className:"SRWC",interfaceNodes:IO.PutFR["input:%g,phi1:phi1,phi2:phi2,output:%g",IO.rope[prev],IO.rope[next]]];ENDLOOP;};CreateNBitSRIO:IOCreator={cell.realCellStuff.newIO_NEW[NBitSRIORec];cell.realCellStuff.oldIO_NEW[NBitSRIORec];};NBitSRPorts:Ports_NEW[PortsRep[4]];--explicitlyrequestedCEDAR:InitFor:PROC[n:CARDINAL]RETURNS[NBitSRInitRef]=24yb6 "$`(*W- ^(*W- ];Y "$ V " T &\.4SE! Q!O! NJ!L! J!IO! G"B e!M$ A e!M%'4-?Y=:^  #%,C8&7 &d5ct"d3Kd2K%(j.R70h!n#7.!n#&~" -" +m&A'7 " )$&A6G>C(=(-M " &t7$!n%'V7#"!n1t9 #j!{3p >g #j**7E#j,(z-27>g#j 073=$&\8(*W- (*W-   u#  "$ B)`"+/1?lw)eTVm${RETURN[NEW[NBitSRInitRec_[n]]]};CounterIORef:TYPE=REFCounterIORec;CounterIORec:TYPE=MACHINEDEPENDENTRECORD[fill0(0:0..14):[0..32767],phi1(0:15..15):BOOLEAN,fill1(1:0..14):[0..32767],phi2(1:15..15):BOOLEAN,fill2(2:0..11):[0..4095],count(2:12..15):[0..15],fill3(3:0..13):[0..16383],report(3:14..15):ShiftCounterOps];CounterStateRef:TYPE=REFCounterStateRec;CounterStateRec:TYPE=RECORD[next:[0..16)_5];CreateCounterIO:IOCreator={cell.realCellStuff.newIO_NEW[CounterIORec];cell.realCellStuff.oldIO_NEW[CounterIORec];};InitializeCounter:Initializer={IFleafilyTHENBEGINstate:CounterStateRef_NEW[CounterStateRec];cell.realCellStuff.state_state;END;};CounterEval:EvalProc=BEGINnewIO:CounterIORef_NARROW[cell.realCellStuff.newIO];oldIO:CounterIORef_NARROW[cell.realCellStuff.oldIO];oldIO^_newIO^;BEGINOPENnewIO,NARROW[cell.realCellStuff.state,CounterStateRef];IFphi1THENnext_(count+1)MOD16;IFphi2THENcount_next;report_reports[phi1][phi2];END;END;CounterPorts:Ports_NEW[PortsRep[4]];--explicitlyrequestedCEDAR:reports:ARRAYBOOLEANOFARRAYBOOLEANOFShiftCounterOps_[[BothOff,Storing],[Looking,BothOn]];TopNBitSRExpand:ExpandProc=TRUSTED{front:Node_CreateNode[within:thisCell,name:"front",type:IntType[4]];back:Node_CreateNode[within:thisCell,name:"back",type:25ydb6##[ 01^  u# ]<  u'4/5[! Y!XA! V!T! SF!Q! O"J!M"&\IQ!M"(G`!EB%'4A(*W-?[(*W-=:a (*8d7d5fK+-z0d3-z/)d20k- !M+q)y $o&!(y $o&!&vy)$"#&d!}##[')B/)03a6d##[(j*d+Kd !M$  "$6) 8&).5M7ETd !*2; &\( . y`/f7<D|  B.6< Bw)eTVm$IntType[4]];PhaseA:Node_CreateNode[within:thisCell,name:"PhaseA",type:IntType[1]];clk2:Node_CreateNode[within:thisCell,name:"clk2",type:IntType[1]];sink:Node_CreateNode[within:thisCell,name:"sink",type:Mnemonic["ShiftCounterOps"]];[]_CreateCell[within:thisCell,instanceName:"clkGen",className:"ClockGen",interfaceNodes:"PhaseA:PhaseA,PhaseB:clk2",initData:RoseClocks.Init[]];[]_CreateCell[within:thisCell,instanceName:"cntr",className:"Counter",interfaceNodes:"phi1:PhaseA,phi2:clk2,count:front,report:sink"];[]_CreateCell[within:thisCell,instanceName:"shifter",className:"NBitSR",interfaceNodes:"input:front,output:back,phi1:PhaseA,phi2:clk2",initData:initData];};TopNBitSRPorts:Ports_NEW[PortsRep[0]];CreatePorts[];RegisterCells[];END.ShiftingLIBRARY'dRoseClocks,butRoseClockswasnotproducedbytheTranslator.Thereisa"RoseClocks.Mesa"however;itisaDEFINTIONSfilethatShiftingmadeuseof:RoseClocks.MesaLastEditedby:Spreitzer,March16,19836:58pmImplementsclass:ClockGenClockGenpostsevent$EndOfClockCycleontheroot.DIRECTORYRosemary;RoseClocks:CEDARDEFINITIONS=BEGINOPENRosemary;ClockInitData:TYPE=REFClockInitDataRec;ClockInitDataRec:TYPE;Init:PROC[sense:Sense_ActiveHigh,style:Style_TwoStep]RETURNS[id:ClockInitData];Sense:TYPE={ActiveHigh,ActiveLow};Style:TYPE={TwoStep,FourStep};Cycle:PROC[cell:Rosemary.Cell,cycles:CARDINAL];Step:PROC[cell:Rosemary.Cell];26yb6 `Q 80>8=^ ]-.6< B[ Y.6< BX.V}'0> < T # -+:S. %.Q~'0> < O # ,S9 N/ # . L~'0> < J # +{8 I0 $ / 9G EBv=!M"&\ ? e;r 9.i " *B-3/6S8;9 BmFHe 72/y 7 7r)b7)7+.37:y4&2u= %*-2+6b/ +) 8%G36%9q(Py&~#> y#>q@#> #> y(#>qykC{ qe{{y{q l{!@{y#{#{qy }iyiqiviy\i3i#*$ .49;qC6iD iy*`qy`2`y`` )v qy2y& } Ny Nq NO Ny4 N N *q1 N2L Ny7 N8 N} y q v y\ 3 Cw)eITVm$4END.ForthebenefitoftheTranslator,"RoseClocks.RoseSymbols"wasproducedbyhand:RoseClocks.RoseSymbolsLastEditedby:Spreitzer,March16,19837:03pmClockGenRoseClocks7"RoseClocks.Init[]"[PhaseA,PhaseB>INT]!!Thefile"RoseClocks.RoseDeps"wasalsoproducedbyhand;itcontainsnothing,sothattheTranslatordoesn'tworryitselfaboutthecareandfeedingofRoseClocks.Finally,thefile"RoseClocks.RoseLoad"wasagainhandcoded;itcontains:RunNewRoseClocksImplNowweusethesimulator.First,getitloadedandstarted:&9@RoseSimulate>RunNewViewRecImpl>RunViewRecImplLoadedandstarted:ViewRecImpl.BCD>RunNewRoseSimulate>RunRoseSimulateLoadedandstarted:RoseSimulate.bcd>RunNewIntTypesImpl>RunIntTypesImplLoadedandstarted:IntTypesImpl.BCD>RunNewMnemonicsImpl>RunMnemonicsImplLoadedandstarted:MnemonicsImpl.BCDNowruntheimplementationsofthevariousCellClassesused:&11@Shifting.roseLoad>@RoseClocks.roseLoad>runnewRoseClocksImpl>RunRoseClocksImplLoadedandstarted:RoseClocksImpl.BCD>@SRHC.roseLoad>@ExamplePrimitives.roseLoad>runnewExamplePrimitives>RunExamplePrimitivesLoadedandstarted:ExamplePrimitives.bcd>runnewSRHC>RunSRHCLoadedandstarted:SRHC.BCD>runnewShifting>RunShiftingLoadedandstarted:Shifting.bcdNext,instantiatethecircuit:27qbfyFbfr _ X /2l8:y\Z= %*-2+6bWV !M2+9 Cr U .N #)+/126<=@B Sm>,!&( PU"%)2,172yM r Iq LsH Q !&l)#}FyGFF B~ A ?q=~ < :q8~ 7 5q3~ 2 0qr ,I LB] y%,I&],I r/,I0k,I}(y((%#~ "I  I~I~J~J r ! Iw)eTVm$&12_&cell_Rosemary.CreateTopCell["4top","TopNBitSR",Shifting.InitFor[4],RoseHelp.DecideFromFile["4top.altexpand"]]^[name:"4top",class:10632756B^,parent:NIL,internalNodes:13124740B^,components:13125154B^,interfaceNodes:14153072B^,other:14153056B^,type:Real,realCellStuff:10704604B^]Finally,bringupaDisplayandControlPanelonthatcircuit,thenaBrowserontheDisplay:&13_&disp_RoseDisplayOps.NewDisplay[cell:&cell,info:[iconic:FALSE,name:"4top"]]^[rootCell:10705316B^,rootDisplay:14401210B^,rv:10261312B^,ctlPanel:10667136B^,conditionHandle:10556112B^,conditionsHandle:10556050B^]&14_&bv_RoseDisplayBrowsing.BrowseDisplay[display:&disp,info:[iconic:FALSE,name:"4top.browser"]]{Viewer-class:Container,name:4top.browser}Atthispoint,theBrowser(createdin&14)wasusedtodisplaysomeCellsandNodesintheDisplay(createdin&13),andasnapshotofthescreenwastaken.Itcanbefoundin[Indigo]Screen.press,andcannotbeprintedonDovers.UseafullPRESSprinter(Stinger,forinstance).28}ayaa4 _^B*Z~="$ ,C37: YL  )0 3OW $ /4'96 U r Q"&}(+R/3 449;=}NyNN%:?LI  " - 8;q Ga '5 FH$ }ByBB.0B1AR"q'<\~. &\+k r 9 u$d}!9!9r#9$9'8*q,0y4Z9529r9i9:9y<9<9rA,9A9BE3 89H}8989r8989$'+104I9z< ?BG 6 #h%',.367:?eC 4 ) w)eTVm$sClockGenclkGenTopNBitSRcntrCounterNBitSRshifterFigure R: The Root Cell of the Example Designphi2phi2phi1phi1PhaseAPhaseBPhaseAclk2reportsinkfrontbackcountinputoutputRRRRY3403 24340; 24' 244444 24 '4 8'4 84 20404 46574#2474 2= 465 <:4A<:44 8 +74/44#49+44q ,q0784 .<#t$t?t8ttt3u (u(u u" u .<@q>=4*q@q>@?<4q11q11045484r 1r1q &q&%4r6r6q&q&%4q"&q&&"%4q-&q0&-%4r'&r)&r,&q7&q>&7%4q%q^%q${%q:$3 . <4f@s s ;ss1s\s/s>&s&s#&s9\&s=]t | "u \,<uZ,<u0^,]u,]u,]u4,~u2u{6u#u8"u#_u"#_u)#_u &u'u0'u |$u{%u3~$v#%v%v.%v<&%v -v-v.v.v0-v4.3 . <4f V V U{}[\FirstsecondSRHCSRHCSRWC44411Figure W: The Shift Register Whole Cellphi1phi2inputinputclockclockoutputoutputoutputinputmiddleYYYRR=<:4<:44&6=4&6' 44' 445'74/46 /94 49 9449%/34%49%34549-/46q'q ?'q8'?q?6Bq,6< . <2irr+|r; r+ r:rz)r)r8Z)r+7_r7=s 't=;t/};t 't'Z't.9t,~.Zt't1't8%\t[%}t}%u &u$&u<&u/u,0 . <2i{T  4PassPassBlockInvertBlockInvSRHC441Figure S: The Shift Register Half CelloutputinputgatetempinputoutputclockinputoutputYRYY3 8445#45/4545q'q#''4q=&^ #3 84 84# 844*894*834 2?484484' 44/' 44q &q4&q8! . 946r=)r9r r%; r([Zr<r )]r3)r9s 9&t:'t't2|t;$t%\t5[%t:>t%'t+:'u"!&u3u&u8&!{ . 946t\~d(((((((((xxyz|}~}{zy\~d(((((((((xxyz|}~}{zy\~d(((((((((xxyz|}~}{zy\~d(((((((((xxyz|}~}{zyPassBlockInvertBlockFigure E: Primitives for use in the Exampleinput[0]output[0]output[0]input[0]input[1]input[1]output[1]output[1]gateinput[2]input[2]output[2]output[2]input[3]input[3]output[3]output[3] 54 '42 )64'42=54 +64#=54# 541 441 44#1 44 148 3641483104 564#' 44 42 64423'04 !64304 42 6442304 644&6-/46q-0 q-4 r11r11r31r41314# 44# 44-%4/q-& q-* r1'r1'r3'r4'3'4 44 44-4/q- q-  r1r1r3r434 44 44-4/q- q- r1r1r3r434' 44' 44 42: 42:# 42:; 42: .78gs [ s+: : t +u%}3u43 u3 uz3uz)u%})u) u4) u<uzu%}u4 u uzu%}u u4  .78gf TIMESROMANY TIMESROMAN TIMESROMANLAURELLOGO TIMESROMAN TIMESROMAN HELVETICA TIMESROMAN GACHA GACHA HELVETICA GACHA GACHAGACHANEWVECEB"9BJQ  HELVETICA  HELVETICA  HELVETICAARROWSCA *9^Z" NEWVECEB"9BJQNEWVECEB"9BJQ  HELVETICA  HELVETICA  HELVETICAARROWSCA *9^Z" NEWVECEB"9BJQ HELVETICA  HELVETICA  HELVETICAARROWSCA *9^Z" SNEWVECB"9BJQNEWVECEB"9BJQ HELVETICA  HELVETICA  HELVETICA$ a" , 6E QW Baq | 4 X ^9FX<$&{A GACHA HELVETICA GACHA GACHA TIMESROMAN HELVETICA TIMESROMAN TIMESj/"MRosemaryDoc.press Spreitzer21-Mar-83 15:26:14 PST: