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.2SemanticspîÆïaïî§î ?qî ìï^rîòï^îšîÔqî+¯ï^rî6ï^î:kî<¨î?îîBýqî ìïZ8rîòïZ8 qî+¯ïZ8rî6ïZ8sî:–ïZ8î;“ïZ8qî ìïV\rîòïV\qî+¯ïV\rî6ïV\tî{ïNÐqî ìïDñî ôrî¬ïDñð#qî ìïCJsî¬ïCJrîïCJî”ïCJsîöïCJî¦ïCJqî ìïA¢î Vî¯sî¬ïA¢ qî ìï?'sî¬ï?'îºîî öî'¸î(Öî.Ýî1 î7yî<‚î=íîCÉîFî ìï=€îDî î�î1îd î!î$Iî'˜î)Zî-†î/î0{î5Òî7sî=8îA8îDÊîF?îGrî ìï;Ùî îM î÷î%î ‚î"0uî$Ìï3˜pî ìï.«î È rî ìï+aîîîMî}îÖ î"jî'�î)0 î0ú î8€ î@3îB îG;î ìï)ºîÓî‰ î2î›î >î$T î+±î.} î6íî;Pî@óîE î ìï(î “îPî“ îPî;îTî!½î% î+{î-¾î3iî5Íî7(î9U îA^ î ìï&kî ¥î Ïî ìï#ðî íîXîGî¿î¨îîÉ î'uî+@î,íî1‰î3î4Šî8¸î>‰î@yîD�îF>î ìï"Iî šî ñî¥îšîùî=î ìïÎî _îËîõîÖî�vî ìïî y î ìïXî yî<îðîî¶rî ìï î )îÆî ìïâî ) î$ î ìï%î )vî ìïhî yî< rî ìï °î )î ìï óî )TVm$ÏGî¿î¨îîÉ î'uî+@î,íî1‰î3î4Šî8¸î>‰î@yîD�îF>î ìï% î 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î îwîAïIqî?ïIqîþrîïIqîúïIqî±î!:wî#ŽïIqî$uïIqî*Õ rî1�ïIqî2]ïIqî5wî8õî<~î=êxî ìïF î )îÅrî ìïC5wî  ïC5î �ïC5îƒrîžïC5î9ïC5îÆî¦î÷ î$Twî&4ïC5î'ïC5î-krî2‹ïC5î3ŽïC5wî5BïC5î6?ïC5î:%rî?@ïC5î?£ïC5î@ÓîB% î ìïA� îrwî*ïA�îïA�î9rî"ÝïA�î#ƒïA�î%1î'�î+‡î-5î/• î ìï?wî ‹ï?î rï?î­rî³ï?îzï?î;wî>ï?î¡ï?rî!ìï?î"Ûï?î(&î,Fî-¯ î6¹î9æîî@˜ î ìï5Ùî µî ùîþ îßîÃîúî;î#M î*Xî.î2Xî5*î8øî<ôî?¹îBîE\îG/î ìï41î €îÁî·î{ î _î$Uî(ƒî+E î1òî5Ýî9Oî<(î?çîBîEðî ìï2Šwî ¯ï2Šî ï2Šrî�ï2ŠîCï2ŠîV îHîî!bî%óî'Áî-eî/4î1ßî4•î6Yî7�î<Äî>‡îB1îF«î ìï0ãîîGî,î{î î ã î'1î)î,°î.xî/»î3¿î6½î9ãî;'wî?+ï0ãî?�ï0ãîEwrîH9ï0ãîH²ï0ãî ìï/;îîeîQ wîÒï/;îÅï/;î"Úrî'Vï/;î(ï/;î)î,î/íî2±î4Œî8N î>¤î@×îC!îDòîG;î ìï-”î}wîèï-”îÛï-”îÆrîï-”îßï-”î!Wî&eî(Þî*Çî0"î3£î5ïî9#î<5î=Ûî@3îF>î ìï+íî ¡îMîeî¹ î”î¼î#Dî&î)"î,iî.Èwî2Fï+íî38ï+íî8,rî;Qï+íî ìï)awî vï)aî ]ï)aîƒrîtï)aî�ï)aîÁî?î!mî#ßî'9î)=î.î/A î6Pî8î;î<\î=ÅîD9îEðwî ìï'º rî”ï'ºî ï'ºwîÐï'ºî·ï'ºî� rî!áï'ºî"[ï'ºî#î&zî'Œ î.†î/Úî1oî5"wî6Ãï'ºî7&ï'ºrî=Wï'ºî>ï'ºî>øwîBï'ºîCgï'ºî ìï&rî ï&îÿï&wîÎï&îÁï&îËrîbï&îýï&î&kî*cwî,Íï&î-1ï&rî2àï&î3œï&î4±wî5òï&î6Ùï&î=rîB#ï&îB‡ï&îGžî ìï$k îÿî›îùîàwîmï$kîÑï$krî"‘ï$kî#Lï$kî$xwî'ï$kî'hï$krî-eï$kî. ï$kî/Lwî2Hï$kî3/ï$kî9…rî>¦ï$kî?Kï$kîA‹wîC©ï$kîDœï$kî ìï"Ärî7ï"Äîï"Ä îŸî×î˜wîþï"Äî bï"Äî&9rî*6ï"Äî*ñï"Äî+öwî.]ï"Äî/Dï"Äî5trî:oï"Äî;lï"Äî<�î>ø îF'î ìï!î ¢î} îÓî×wî±ï!î¤ï!î�rî$Ìï!î%’ï!î)Rî,Å î4î9eî»îB(îD˜î ìï›î ówî2ï›î•ï›rî|ï›î7ï›îƒwîŸï›î‡ï›rî ýï›î!ûï›î%zî(î,î.Áî3>wî5àï›î6Òï›î=€ rîDÑï›îEKï›îFuî ìïó îàîºîŒî˜ îUî"Eî#“î(Šî*î-Oî.Zî1mî5÷î7‡î:ü îCqxî ìïŽî ) î" rî ìï¶îLî› î‡ îQî Ìî#gî&[î*èî-Üî.öî2„î7Gî=JîA2îCîF¡î ìïî Bwî ¢ïî‰ïîzrî—ïî ìï ƒî $îUîî±îÈî î%‰î'î)çî-Lî.“î2ôwî5ßï ƒî6Çï ƒrî;Ûï ƒî<Ôï ƒ îEpîFãî ìï Üî î\î¦ î”î!ãwî$êï Üî&ï Ürî+ ï Üî+mï Üî,çî0Gî1Ÿî7‹î:eî=ÚîBÿîG;î ìï 5 îbî`îîyî çî"íî&4wî)Èïöÿ [TVm$pinsection1.1,butyou'veforgottenthat,haven'tyou?Justtokeepthingsclear,wewillusedifferentwords.EachModulewillcommunicateviaaCedarRECORD.Eachfieldwillbeeitheraninput,anoutput,orboth.EachModulewillhASimulationStructurewillconsistofModules,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î uïb)î ]ïb)î¹rî6ïb)î4ïb)îßî Wwî" ïb)î#7ïb)rî'zïb)î(Tïb)î.Ôî1;î4 î� îE{îFäî ìï`‚î ÌîîÞîŒî3îÆî#<î)Aî,yî1_î4·î7¢î9bî<Åî@ïîDªîFäî ìï^Úî aîî ìï\Mwî kï\Mî•ï\Mrî¸ï\Mîµï\Mîo îîî 7î!lyî%�ï\Mî&hï\Mrî* ï\Mî+‡ï\Mî/î2Bî4ùî6öî:îî<êî@ùîBõîGËî ìïZ¦î �wîïZ¦î=ïZ¦rîeïZ¦îbïZ¦î îwwîxïZ¦î_ïZ¦yî%ÄïZ¦î&œïZ¦rî-[ïZ¦î.HïZ¦î2fî8sî:ãî>žîB»îEüî ìïXÿ îNîîµî�î ?î$Áî(Ýî,_î1›î4Vî7¬yî8åïXÿî9½ïXÿî-ïOÔî>ÈïOÔwîC�ïOÔîDÇïOÔrî ìïN-î)îgî¼î:î¼wî"ïN-î"ùïN-yî)]ïN-î*4ïN-rî2£ïN-î3¡ïN-î6î8’wî;�ïN-î<¹ïN-rîA�ïN-îB5ïN-îCòîH%î ìïL†wî =ïL†î %ïL†rîºïL†î`ïL†îEî–î­îæî!î%øî(Âî,1î/Hî0óî3Dî9Jî:§îî<îöîCî×îþwîªï>î’ï>î%òrî+îï>î,Ëï>î/ƒî2Êî6j î=Zî?ºîEåîGžwî ìï:ï5˜î?dï5˜rîDMï5˜îDóï5˜îFÂî ìï3ñ îVyîRï3ñî*ï3ñrî‰ï3ñîfï3ñî"îxî äî#Yî%¹î(§î+uyî-eï3ñî.=ï3ñrî2uï3ñî3žï3ñî5Ýwî;Ûï3ñî=ï3ñrîAHï3ñî ìï1dîkîèyîûï1dîÓï1drî3ï1dîîï1dîôyî"nï1dî#Eï1drî%Íï1dî&²ï1dî)‰î*ýî.Aî/øî5þî9Cwî;ªï1dî<�ï1dîA™rîH!ï1dîHÜï1dwî ìï/½ îürîï/½îøï/½î¯wîï/½î ï/½ î#ðrî'mï/½î((ï/½wî)&ï/½î* ï/½î0m rî7ï/½î ìï-0wîfï-0îÉï-0 rî-ï-0wî¹ï-0î ï-0î +rî%€ï-0î%ùï-0î( î/’î3àwî6ï-0î7ï-0î=W rîE�ï-0îFJï-0îG´wî ìï+‰ îE rî"ï+‰î¼ï+‰îôîëî". î)î*Äî/rî2‰î4ãî8&î=ÒîAñîG/î ìï)áî ÷îºîýî,î© î#Àwî$ïï)áî%×ï)áî,rî0þï)áî1aï)áî2pwî6Úï)áî7>ï)á rî>âï)áî?Eï)áî@–îBûîGÖî ìï(:wî ­ï(:î•ï(:î"rîï(:î(ï(:îØwî fï(:î!Mï(:rî&ñï(:î'Iï(:wî(€ï(:î)sï(:î0 rî8ï(:î8gï(:î9žî;{î=šîA\wîB´ï(:îCÞï(:rîH#ï(:îH†ï(:î ìï&“ îLî’wîÎï&“î¶ï&“î„rî%ï&“î&Éï&“wî*ï&“î*÷ï&“yî1¹ï&“î2‘ï&“rî:(ï&“î:äï&“îþîB—îDîEJî ìï ·î ”î†î#î‡î#î yîï ·îíï ·rî#%ï ·î#ðï ·î&« î-Hî.awî1=ï ·î2gï ·rî6mï ·î6Ðï ·î94wî;‚ï ·îzî/ï4îÜï4qîèï4îlï4 îTî‚îjzîÍï4î zï4qî#Úï4î$^ï4î%Áî)çî+Kî-<{î0,ï4î0åï4î6 qî:Óï4î;�ï4 îBÆîD)zîFï4îFÇï4qî ìï�î Fî -{îï�îÍï�îèqîï�îuï�î]î;î Û{î"Âï�î#ï�qî'¹ï�î(Oï�î)zî+ï�î+°ï�qî-¶ï�î.gï�î1î2sî5Iî7&î9Kî;gî<ÉzîAOï�îAüï�qîE\ï�îE½ï�îG(î ìïåzî ëïåî ˜ïåqî žïåîzïåî®î;îîüî'îeî ™î#%î%ïî'æî+rî-Êî0hî2ôî5¾î7µî;šî=ˆî?îBîF%îGŽzî ìï> qî ï>îlï>î˜îðzîÖï>îƒï>qî‰ï>î9ï>îî" î$‡î'@î)&î,[î.7î08î1�zî3vï>î4#ï> î<è qîDTï>rî ìï±î Ìîs yîŒï±îdï±rî›ï±î€ï±î ¸î#5î)gî*™wî-Žï±î.¸ï±rî2Kï±î30ï±î5Âî6ôwî9éï±î:Ñï±îA8rîG4ï±îHï±î ìï î&î… î1îàwîÐï î4ï rî#Òï î$6ï î%€î'àwî+]ï î,Eï î2¤rî8 ï î ìï }î ïîŸîQî5îî!òî#àî&kî*5î+Ìî-¥î0/î5éî7Í î?wîAqyîCûï }îDÓï }rî ìï Õî§î$wî’ï Õî¼ï Õrîñï ÕîTï Õî{ î#î$�î&î(Íî*™ î1ßî6Lî<î>?î@¼îE£î ìï .î áîÑî‘yîâï .îºï .rîÊï .îeï .î!Xî$Óî&0î(( î.Ôî44î8'î:Ðî@îCîE¹wî)ÈïXTVm$ ×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];ThetypeofaCelldistinguiInlineisprobablytheoneyouwant.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)rîÓïb)î6ïb)îFîî„î6îôî"¯î%Žî(Kî,«î.ïyî3qïb)î4Iïb)rî9Xïb)î9þïb)î>î?yîA.îDEîEúî ìï`‚î jîKîüî¡ î#9î ìï^î •îîå îqî î(�yî)ìï^î*Äï^ rî4 ï^î4„ï^î6©î9­îxqîíï>xî¦ï>xyî!Dï>xqî"ôï>xî#Èï>xyî(Lï>xî‘ï<Ï îØî‘ï;&îyqî`ï;&î 4ï;&î"yî$Ÿï;&î‘ï9| îØ î&î‘ï7Óqîyï7ÓîMï7Óî)yî¸ï7Óî‘ï6*î¡î‘ï4€ î 8 î,î9…qî;5ï4€î<ï4€yî=@ï4€î>ï4€î¿ï1.qî¦ï1.î_ï1.yîýï1.qî­ï1.î�ï1.yî]ï1.î5ï1.î¿ï/…qî~ï/…î7ï/…yîÕï/…qî…ï/…îYï/…yîÝï/…î µï/…qî&œï/…î';ï/…yî-Fï/…î.ï/…qî4ï/…î4Ðï/…î:¦yî<¥ï/…î=}ï/…rî ìï+^yî Ãï+^î ›ï+^rîúï+^î¶ï+^î²yîÚï+^î²ï+^rîï+^îÙï+^ î +î#Éî&–wî,“ï+^î-¼ï+^rî2ƒï+^î2üï+^î5èî9†îXyîAEï+^îBï+^îE}rî ìï)·wî+ï)·îUï)·rî˜ï)·î¶ï)·yî¯ï)·î‡ï)·î–rî$¦ï)·î%*ï)·wî*åï)·î+Hï)·rî1Óï)·î2Žï)·wî3Íï)·î4µï)·î;rîAï)·îArï)·îDîG›wî ìï(rî^ï(î×ï(îœyî ï(îøï(rî/ï(î³ï(î9yîöï(îÎï(rî&eï(î&êï(î-wî.rï(î/Zï(î5³rî:"ï(î;.ï(yî>7ï(î?ï( î ìï&h rî ï&hîÆï&hî²yîÊï&hî¢ï&hrîï&hîÈï&hî¥yî òï&hî!Êï&hrî&ï&hî&qï&hî(¾î+î.*î/Ç î6¦î8¦î:ô îB�îD6yîF„ï&hîG[ï&hrîIãï&hî ìï$Áyî éï$Áî Àï$Áî/ rî Nï$Áî!ï$Áî$(wî&¬ï$Áî'“ï$Áî-àî2ørî9Éï$Áî:Bï$Áî=TîA†yîDyï$ÁîEQï$ÁrîH±ï$ÁîIï$Áî ìï#î ìï �yî Ñï �î ©ï � rîxï �îñï �îµî wî"ã î)Õwî/Pï �î/´ï �î5�rî9“ï �î:Oï �î;Ywî=Åï �î>­ï �îDârî ìïõî ïwî™ïõîŒïõîËrî–ïõîïõîñî"� î)Hî-yî/üïõrî1£ïõyî3�ïõî4uïõî6%î8¬rîH²ïõyî ìïNrîïNîžïNî�wî!ÝïNî"ÐïNî'´rî-tïNî.ïNî3Ñî6Ýwî9-ïNî9‘ïNî?QrîB‡ïNîC ïN î ìï§yî èï§î Àï§ rî¶ï§î ìï*yî Âï*î šï*îúrî1ï*î9ï*î2î!î{î!uî$lwî*•ï*î+¾ï*rî0±ï*î1ï*î2Šwî3ßï*î4Æï*î;QrîALï*îBTï*îFîGžî ìï‚ îÅîvî¥î¼ î#• î+úyî.ºï‚î/’ï‚ rî9±ï‚î:îï‚wî>(ï‚î?ï‚rîEï‚îEÐï‚îG/wî ìïÛ î?rîËïÛî.ïÛîBîxî¼î!^î$!î&Œî)éî,Hyî.³ïÛî/‹ïÛrî7"ïÛî7œïÛî;:yî>ïÛî>öïÛrîC-ïÛîC§ïÛîFjî ìï4yî Kï4î #ï4rî«ï4îï4î�yî$ï4îüï4rî ï4îÒï4î|î­wî!Bï4î"*ï4yî(´ï4î)Œï4rî0Kï4î1\ï4î4=î6Òî;¯î=žî@3 îFÔîH_î ìïŒ îèî×yîBïŒîïŒîyî9î!Àrî)WïŒî)»ïŒyî+GïŒî,ïŒrî2ÞïŒî3úïŒyî7ïŒî7ìïŒrî<#ïŒî<†ïŒî=ÐîAMîCËî ìïåî)yîçïåî¿ïårîïåî ïåyîóïåîËïårî+ïåî¤ïåî kî$1wî& ïåî'Êïårî+]ïåî+µïåwî,Îïåî-¶ïåyî4ïåî4òïårî;±ïåî<žïåî?fyîAÖïåîB®ïårîFåïåîG^ïåî ìï>î Xî •îrîçwîFï>î.ï>yî‚ï>î Zï>rî'ñï>î(ïï>î+Òî-€î0î1Xyî¿ï ëqîÎï ëî‡ï ëyî%ï ëqîÕï ëî©ï ëyî…ï ëî]ï ëî¿ï BqîVï Bîï Byî­ï Bqî]ï Bî1ï Byî µï Bwî)Èïö¶TVm$arlier,alloftheIntername: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]RETURNS5yî‘ïb_qî¡ïb_îuïb_yî²ïb_î‘ï`µî¡ î!èqî#˜ï`µî$€ï`µyî%£ï`µî‘ï_ î)î!î"Àqî#˜ï_ î$€ï_ yî%£ï_ qî'Sï_ î( ï_ yî*8ï_ qî+ï_ yî1Fï_ î2ï_ î‘ï]`î) î$oqî&ï]`î'ï]`yî(+ï]`î‘ï[µqîï[µîÔï[µyî Œï[µî!dï[µqî(#ï[µî)ï[µyî*#ï[µî*ûï[µ î7¡qî9Qï[µî:$ï[µyî;—ï[µqîzï[µî?Rï[µî‘ïZ îyîˆqî 8ïZ î! ïZ yî"CïZ î#ïZ î¿ïV¶ qîÞïV¶î—ïV¶yî5ïV¶qîäïV¶îžïV¶î Êyî"ÉïV¶î#¡ïV¶î¿ïU qî~ïU î7ïU yîÕïU qî…ïU îYïU yîÝïU î µïU î%Äî*Óqî0»ïU î1†ïU yî6òïU î7ÊïU î ìïRŽrîûïRŽîÂïRŽî*wî†ïRŽî„ïRŽ îerîßïRŽî ›ïRŽî!–wî#óïRŽî$ÚïRŽî*Èrî0æïRŽî1¿ïRŽwî3IïRŽî4FïRŽ î;'rî=ñïRŽî>TïRŽî?Z îFÂîH»yî ìïPæ rî[ïPæî5ïPæyî ïPæîäïPærîïPæî~ïPæîÈyîðïPæîÈïPærî#×ïPæî$:ïPæî%Bî(î)@î,§î0Éî3âyî6@ïPæî7ïPærî;OïPæî< ïPæî=yî?eïPæî@=ïPærîCœïPæîD!ïPæîHÝî ìïO?î úîÝî<îPîhîî"Gî$§î ìïLÁî úî¢îyîîþî´wî ïLÁî sïLÁî&?rî*2ïLÁî*ØïLÁî0›î3³î4Ùwî8ŠïLÁî9}ïLÁî>mrîD9ïLÁîEcïLÁîGžî ìïKî ÊîOwîòïKîåïKîýrî"ïKî$ïKwî�ïKî mïKrî#_ïKî#ÂïKî$ðî)9î+ yî-‘ïKî.iïKrî0ñïKyî1òïKî2ÊïK rî<ïKî<¶ïKî>ŠîAëîC¿wî ìïIrîÒrî§ïIryî¿ïF qîÞïFî—ïFyî5ïFqîäïFî¸ïFyî •ïFî!lïF î¿ïDs qîeïDsîïDsyî¼ïDsqî lïDsî!@ïDsyî%ÄïDsî‘ïBÉîQ î‘ïAî î‘ï?tî¡ î‘ï=Éî î‘ï< îØ î‘ï:t îˆî‘ï8Êqîï8ÊîÔï8Êî°yî!@ï8Êî"ï8Êrî ìï6Lwîï6Lîùï6Lîèrî=ï6Lîï6Lîî"‘î% î&ùyî,Xï6Lî-0ï6L rî6wï6Lî7>ï6Lî9¹î=Ÿî@<îC•îF î ìï4¥î =î†î î0 îÙî¸ î%½î'Qî)^î*òî.4î/Óî6/î7€ î>WîAWîDƒî ìï2ýî R îyîØï2ýî°ï2ýrî Gï2ýyî"ï2ýî"öï2ý rî,=ï2ýyî.ï2ýî.ìï2ý rî83ï2ýyî: ï2ýî:âï2ý rîEï2ýîFØï2ýyî ìï1Vrîjï1Vîï1Vî©îÒ î"‚î%%wî)äï1Vî*Áï1Vrî-Æï1Vî.kï1Vwî0iï1Vî1Pï1Vrî5&ï1Vî5 ï1Vî7ß î>Myî?ñï1Vî@Éï1VrîD)ï1VîDŒï1VîEÂî ìï/¯î ùyîÒï/¯î©ï/¯ rîÈï/¯î+ï/¯î4îpî!î&)î'Sî+ûî/çî3‘î5Îî9‚yî;1ï/¯î<ï/¯rî?hï/¯î ìï-0 î�îìîšîÎîÅî#%î&³ î-Fî3Äî6�î;î>ëî ìï+‰î ¡î îÇ îÊîîóî" î'äî+_î,Ò î4î5¸î8Œî:Çî?îAîC¾î ìï)âî=î©yî¿ï&� qîï&�î¿ï&�yî]ï&�qî ï&�îáï&�yî½ï&�î •ï&� î¿ï$ã qî�ï$ãîFï$ãyîäï$ãqî”ï$ãî hï$ãyî$ìï$ãî‘ï#8qî¡ï#8îuï#8yî²ï#8î‘ï!ŽîQ î‘ïã îØ î‘ï9 îˆ î‘ïŽî¡î‘ïäîyî‘ï: qîˆï:îSï:yî$¿ï:î‘ï� qî°ï�î„ï�î `yî"ðï�î#Èï�}î¿ï: yî/ï:qîßï:î˜ï:yî6ï:qîæï:îŽï:yî%„ï:î&\ï:î.Ëî3ÛqîúyîA‰ï:îBaï:}î‘ïå yîïåqî²ïåîZïåyî%Pïåî&(ïåî,çî1÷qî7ïåî7Úïåyî:ïåî;ÇïåîÅï> qî#äï>î$¸ï>yî)Õï>î*­ï>î/¼}î‘ï é yîï éqî²ï éîZï éyî%Pï éî&(ï éî,çî1÷ î=Å îÅï Bqî'Cï Bî(ï Byî*Tï Bî,ï Bqî4sï Bî5Gï Bî7#yî:ï Bqî;Ìï Bî<µï Byî=Øï Bqî?ˆï Bî@\ï Bwî)Èïý8TVm$msaprocedure,which,whenexecuted,callscertainotherprocedures(CreateNodeandCreateCell);thesecallsdescribetoRosemaryhowanInstanceofthisSubcircuitDesignisconstructedoutofInstancesofothers.InCreateNodeandCreateCell,thewithinparameteridentifiestheInstancebeingelaborated.WhencallingCreateCell,theassociationbetweentheInterfaceItemsoftheInstancebeingcreatedandAbstractNetworksisspecifiedintheinterfaceNodesparameter.Itisoftheformat":"(","":")*.Ineachpair,thefirstidentifiestheInte[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,padthemout6yîÅïb6î¬}î¿ï^ÍyîWï^Íqîï^ÍîÀï^Íyî^ï^Íqîï^Íî¶ï^Íyî ›ï^Íî!sï^Íî&‚î+’qî4ï^Íî4Õï^Íî6±yî9@ï^Íî:ï^Í}î¿ï[d yîï[dqî·ï[dîpï[dyîï[dqî¾ï[dîfï[dyî&\ï[dî'4ï[dî,Dî1Sqî9Âï[dî:–ï[dîï;?î>ãï;?îAç î ìï8·îyîhï8·î?ï8·rî×ï8·î²ï8·î î$õî*cwî,Âï8·î-%ï8·î2ôrî6éï8·î7¤ï8·î8¡wî;ï8·î;cï8·rî@ûï8·îAÂï8·îDÅî ìï7wî ¹ï7î «ï7î´rîIï7î¬ï7îÊî ›î"_yî$Ôï7î%«ï7 rî1zï7î2Aï7î8iî9öî;wî=Eî?ºîDJîGoî ìï5hî ûî ÷î4îCî î¯î¬îàî»îŠî ºî#êî&Hî) î,. î2 wî4ï5hî4ãï5hî:±rî=öï5hî>pï5hî@kyîBÊï5hîC¡ï5hrîGï5hîG¼ï5hîH¹yî ìï3Árî Lï3Áî Åï3Áî˜îEî›î# î wî bï3Áî!Uï3Áî&?rî,ï3Áî,~ï3Áî.pyî0Æï3Áî1žï3Árî4ýï3Áî5¹ï3Áî6­yî7Íï3Áî8¥ï3Árî;,ï3Áî;¦ï3ÁîÁ îEqî ìï2î Íî,îîîËîŠîCî 3î"“î&iî(È î/­î1î4? î ìï/‘yî Ïï/‘î §ï/‘rî>ï/‘î¡ï/‘îµî¸îxyî ãï/‘î!ºï/‘rî%òï/‘î&Uï/‘wî'iï/‘î'Ìï/‘ rî/vï/‘î0=ï/‘î3+wî5ï/‘î6ï/‘î îB_îD™î ìï(î »îmîbîQîöîñîðyî –ï(î!nï(î#rî)Ýï(î*Kï(î+Ñî. î4£î;*î=î?ÄîDdîFcyî ìï&l rî3ï&lîTï&lyîqï&lîIï&l rî!�ï&lî"*ï&lî$`î'Ëî-~î1bî:eî< î=¦î?WîA`îFÅyî ìï$Ä rî ï$Äînï$Äî‚îôî)îÞyî"øï$Äî#Ðï$Ärî(àï$Äî)Èï$Äî-â î6î8sî;+î>ªî@dîD}îEßî ìï#î ßî/î©yîï#îîï#rîNï#îKï#îwîfï#îYï#î$º rî,’ï#î,õï#î-ÿî1Ìî5aî72î9Öî=yî?€ï#î@Xï#rîHÇï#îI*ï#î ìï!vî Æ îîQ î“îyî"?ï!vî#ï!vrî(&ï!vî(•ï!vî+wî-oï!vî.bï!vî4Ï rî<²ï!vî=°ï!vî?kîBFîE î ìïÎyî ïÎî îïÎrîuïÎîäïÎî$îzî(yî‡ïÎî_ïÎrî—ïÎîïÎîÇî€yî!àïÎî"¸ïÎrî%?ïÎî ìïFyî ÀïFî ˜ïFrî/ïFîïFyîbïFî:ïFrîùïFî ÑïFî#„yî%ßïFî&·ïF rî/þïFî0¤ïFî1êî4ßî6 yî<ÚïFî=²ïFrîC™ïFîDrïFîH{î ìïŸî îïîXî]îØî{îðî!;î#5yî&ïŸî&ÚïŸrî-™ïŸî.`ïŸî2xyî4ïŸî4óïŸrî=bïŸî=ÅïŸî>ÂîBîD´îF™î ìïøî šyî úïøîÒïørîiïøyîEïøîïørîÜïøî¹ïøyî"pïøî#Hïø rî,�ïøî-Jïøî.Hyî0¨ïøî1ïørî5·ïøî6rïøyî7pïøî8Hïørî;§ïøî’ïÈî?jïÈrîBÉïÈîCÔïÈîFÛî ìï!îîÌî.î£îZî°î#.î$œî&Mî+dî/Öî3ºî9mî<~yî>áï!î?¸ï!rîFxï!îG¡ï!î ìïyî 8î"î|îèî–yîJïyî!ïyrî Yïyî ¼ïyî#+î%…î)ñî- yî/Sïyî0+ïyrî3Šïyî4`ïyî7ùî9Iî?ÆîBxîG‰î ìïÒî`îyîÑïÒî¨ïÒrîïÒîåïÒî¿î!Ôî$üî+î-}î0!î1Ðî41î8¥î<[yî>ïÒî>îïÒrîC%ïÒîD#ïÒîFBî ìï+yî ¨ï+î €ï+rîßï+qî¾ï+î¦ï+î…îÆî®îŒî†î"\î%ëî'Eî(5 î-/î.’î0ôî4î7ßî<î>õîCŸîFªî ìï ƒî ÂîczîLï ƒîøï ƒqîRï ƒî9ï ƒî!îXîðî"£î$î(,î*%î.S rî3�ï ƒî4hï ƒwî6rï ƒî7Yï ƒî=crîDï ƒîDäï ƒîG/î ìï Ü î�îXyîÑï Üî©ï Ürîàï Üîeï Üî ãî"µyî%/ï Üî&ï Ürî*>ï Üî*úï Üî,yî.Šï Üî/bï Ürî2Âï Üî31ï Üî4Šî;&î?XîB£îEíî ìï 5î ½îîÁî©î#îòî tî"î'lî)�î-/ î4[î5ìî: î@¤îCvîGwî)Èïýÿ +TVm$Þsoconstructedonthefly,whoseInterfaceisthemirrorimageofthatofthegivenClass(i.e.,allthenamesandtypeswillbethesame,andthedirectionswillbereversed).AViewerwillbeconstructedonthenewIOofthatmirroredCell,anditsEvalProcwillwaitfortheusertoindicateheissatisfiedwiththevaluesshownthere.Thwithfixedbits).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ï_œî4�rî8üï_œî:ï_œyî=gï_œî>?ï_œrîAŸï_œîB#ï_œîH?wî ìï]ôîrîàï]ô}î¿ïZ‘yîïZ‘qîÈïZ‘îoïZ‘yî&fïZ‘î‘ïXà qîØïXàî¬ïXàyîéïXàî‘ïW/ î° î‘ïU} îØ î‘ïSÌ îˆ î(§qî*WïSÌî+?ïSÌyî,bïSÌî‘ïRîî‘ïPiîyî‘ïN· qî°ïN·î„ïN·î `yî#YïN·î% ïN· rî ìïL2î“îLîÂyîwïL2îOïL2 rî$–ïL2î%QïL2î)î*Êî1@î3}î6Œyî8“ïL2î9jïL2rîFéïL2î ìïI­yî ÒïI­î ªïI­rîïI­î|ïI­î’î[î î!šî$äî'/î)œî/¼î5dî9tî:íî<% îCîDÉî ìïH îî+wîðïHîSïH rî9ïHîßïHî ôyî$ÁïHî%™ïHrî(ùïHî)ïïH î1Ìî3ëî6dî8�wî9ÒïHî:ÏïHrî=~ïHî=øïHî?ÕîAîE�î ìïF_îëî¤wî“ïF_î÷ïF_rî�ïF_îJïF_îGyîïF_îíïF_rî!LïF_î"(ïF_î$ßwî&ÏïF_î'2ïF_rî,ÊïF_î-…ïF_î.‚yî3�ïF_î4eïF_rî7ÄïF_î8 ïF_î;l îBÁîDÇîG%î ìïD·wî.ïD·î‘ïD·rîtïD·îØïD·îôîgîÕî õî"Âî%¤î'qî)äyî-¬ïD·î.„ïD·rî2»ïD·î35ïD·î5Ýî7áî:Tî>¬îAwîEîGÞî ìïCî pîjîFîÊ î9î î! î'Œyî)=ïCî*ïCrî/%ïCî0"ïCî1ôî4 î;ƒî=®yî@2ïCîA ïCrîEAïCîEýïCîGî ìïAiyî¥ïAiî}ïAirîïAiîÔïAiî~yîKïAiî#ïAirîãïAiî àïAiî"�î%mî'�î)ðî,Üî.}î3�î5�î6ßî<î?-îAîE î ìï?Áî ÈîÝîEîjî1îãîâîµî!_î%Šî&¯î)Žî+Bwî,gï?Áî-dï?Áî1rî5Žï?Áî6fï?Áî;mwî?ãï?Áî@Ëï?Á rîGŸï?ÁîHDï?Áî ìï>î €îŒîÒîµwîHï>îFï>rîï>î”ï>îîñî"mî%» î,Êî.­î1@î4cî8¯î;Cyî?,ï>î@ï>rîD;ï>îDžï>îEÛîG¾î ìï­ïIî@ywîCœïÝîCÿïÝrîIïÝî ìï5î ÷înîEîäwîlï5î_ï5î!ç rî)æï5î*¢ï5î+Ówî.\ï5î/Cï5rî5]ï5î6ï5î82î;Œî=cî@éîF·yî ìïŽ rî ïŽî5ïŽî î"éî(xî+$î.€î09î5"î8Á yî¿ï+îö}î¿ïÈ yî�ïÈqî@ïÈîçïÈyîÌïÈî ¤ïÈqî)ïÈî)çïÈyî,$ïÈqî-ÔïÈî.¨ïÈyî3ÅïÈî4�ïÈrî ìïCî ½yîçïCî¿ïCrîoïCîEïCî7îZ î òî%% î+î/-î:àîyïœrîFïœîFËïœîGáwî ìïõ rîFïõî ïõî=îî†îïî!î#˜î%Êî(î-Ãî//î2¸î5"î81î9Pî>† îE�î ìïMî îöî×îMîUîoî ·î"î%Î î,Wyî-qïMî.IïMrî3XïMî3þïMî8¬î=î@§îE¹î ìï ¦î Kî¤î�îKî!kî#î% î ìï !î Ýyîßï !î·ï ! rî®ï !î£ï !î"Zî$Òî*Çî.Gî/‰î2cî5Sî7Õîsî?µîE^îG/wî)Èïö RTVm$£ouldcontainasentanceinthelanguagedefinedbythefollowinggrammar:=>(";")*=>||||=>"LIBRARY"=>"IMPORTS"=>"OPEN"=>":""CELL"*"ENDCELL"=>"CEDAR"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î ìï_Ÿî ØîmîÌîÉî9î! î$Úî)vî*]î ìï] î¥î:î¤î€îˆîdî ìïZœîãîMîÜîÿîáî“î#¥î&Vî,î1]î4qî5”î9óî;±îBMîGáî ìïXôî‰î ìïVsî nî Í î†îÄîíîÙîEî!Àî#î$‚î(Bî)ðî+áî.®î2Wî3Îî6Cwî8¢ïVsî9•ïVsî?ô rîGFïVsîG¿ïVspî ìïRGî Èî3 rî ìïNðî Þ î�î‚îJîòî 5 î&£î(5î+Ìî- î4<î7%î8ªî6î@åîB­îF’îHeî ìïMH î|î}î5îî>î#@î%ªî(yî-Þî/ î1”î3œî>ÐîAìîCÝîF=î ìïK¡î î°xî ìïHJî )rî ìïEî ïîÄî�î' îéî€îÔî!hî%Áî, î- î2õî4—î9>î>Hî?œîEWîG/î ìïCØî²î²î®îî î ìïAVî]îòî îîîbî#� î*uî+sî ìï>Ôî îî•îfîBî$®î%Šî*^î+:î/Ëî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!î ÍîÍîcî7î%"î)î,¬î ìï_�îˆîùîÚîp î aî+Lî/,î2Õî ìï] î_îõ îŠî ìïZ•î îUîëîpî ìïXî!î¶î-î² î%˜î(pî-ô î5Sî ìïU�î î¢ îñîÑî#¤î/<î3î¬ïSáîSî 3î% î- î1î ìïNÙîq îWîìî î%˜î&tî)° î28î3î ìïLUî î˜î-îŒîzî Øî%tî(„ î ìïIÑî ' î°îEîUî³î Âî# î+gî,eî.¢ î6ÿî7üî91î¬ïH%î”îÄîÉ î ¢î ìïE¡ îIîÞîíîLî ìïCî î! îúî�îq î%Ùî)ºî.�î ìï>î Kî9îÎîÝîÛîî'î%î ìï9 î Šî`î†îºî±îsî"$î%Jî)mî,/î0Gî3£î5 î<æî?.îE®î ìï7fîãîîîîxî! î#±î(¨î,ûî.‹î/‹î38î4Èî8¬î<¦î@2îAu î ìï5¿î\îIî¿î5î1î î%ñî,�î/î4’î6`î9mî;;î>îA˜îE˜î ìï4îîæî�îíî ìï1“îÆî/î9îî’îÅî ëî"­î#ßî&0î'çî)î-“î/Uî3î6¹î9!î<[î?ËîC}îDñî ìï/ìî î<îoîáî‡î¤îî½î!ßî#ˆî(™î,2î0.î4*î6xî9üî=Sî? îEŽî ìï.Eî ÀîÈî î îgîëîÆî"‚î%·î(À î0öî2%î6°î<žîAïîDâîFSî ìï,�î šî-î�îDîýî]îî ­î#ôî)Ýî,hî.Yî3ÿî5­î8 î;¶î>šî@•îFgî ìï*îKîHîw îõî �î$Ñî'¼î,jî2É î8Ïî<Øî?uîA îCqî ìï(rî ÅîÉîuî°î& îbî!Ìî%€î&öî*Àî,yî.uî0ßî6Xî8î:î<€îAïîC²îFî ìï&Ë î¥îîöî}îÝî!~î#7î&î)xî--î/Œî5Ÿî7 î ìï$Gîöî‘î¡ îzî!tî"�î%¬î*î/–î1öî5Ÿî7 î9Œî;:î0ïLî?AïLîB,îD%îF·î ìï¥îMî¶îaî@îOyîUï¥î-ï¥rî-ƒï¥î-üï¥î/Àî1¯î3hyî5Çï¥î6Ÿï¥rî<†ï¥î=ï¥î?íîBLîGvî ìïýî àî]îâî©î‘yîŒïýî cïý rî(Òïýyî)Ëïýî*¢ïýrî2:ïýyî32ïýî4 ïý rî=Pïýyî>Hïýî? ïýrîEßïýîFØïýyî ìïVrîÓïVî�ïV îßî3î î$~î&î(eî-}î0+î2ðî8>î:”î=,îAù î ìï¯î TyîÞï¯î¶ï¯rîîï¯î©ï¯îÑî[yî·ï¯î�ï¯rî Æï¯î!Îï¯î$°î':yî,½ï¯î-•ï¯rî1Íï¯î2Óï¯î8Ïî;oî=Šî?mîC!îGdî ìïî.îkyî[ïî3ïrîBïîïîÖî6 î%Íî(xî*íî0G î ìï ƒî ªî`î_îõîÔî sî#ø î+\î.Eî4'î7Iî9*î::î?JîAñîD�î ìï ÜîæîæîÙîrî”îpî Oî!ªî'¬î,Mî0—î1òî5^ î>î?µ îFî ìï 5îÉîUî@î9î+î"éî%hî)¡î+qî.«î0zî2äî5d î=îAîDÒwî)Èï #TVm$«ngRosemaryandIntTypes.Allthree,,,andareadditiveandidempotent.AasaintroducesCedarcodeinnecessarytodothechecking.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î(œî.yî0åî4›î7vî8îî?”îB°îEtîG/î ìï^ îãî€î/î�î!5î&—î)Xî-øî4Óî6‚î8rî>Þî@£îEvî ìï\Zî A îµîÚîŠîêî& î*'î+áî.Bî2Dî3¦ î:î<ì îC„îGyî ìïZ²rîûïZ²î_ïZ²îZyîïZ²îéïZ²rîqïZ²îÔïZ²îÏî Eî"ýî ìïX2î ?î îI î îÄî$˜î&ëî,.î.å î ìïU±î vîŠî5î]îˆ îl î%î).î,rî/Hî1¥î6lî7öî= î?ÖîDîHeî ìïT î€îëîÍîé î!Ùî#iî(‚î+Sî/šî2Ùî4Ëî:‰î=îAù î ìïRbî‘îŒ î ìïOâî |îî€î­ îÃîyî­ïOâî„ïOârî$DïOâî%#ïOâî'ÿ î/ î0xwî2ÛïOâî3>ïOârî9ïOâî9ÌïOâî:Îwî=1ïOâî>ïOâîDDrîH³ïOâî ìïN:wî ÄïN:î ÁïN:rîïN:î{ïN:î„îþî¬î âî#wwî'»ïN:î(ïN:rî(ðïN:î)ÌïN:î,bwî0¦ïN:î1ºïN:rî2ùïN:î3ÖïN:î6�î9Ówî>ïN:î? ïN:rîAïN:î ìïKºîpîh î­îî¨î#¤î'Žî(âî)óî-…î3î@aîE�î ìïJî Ôî›î|îÓîîKyî±ïJî ‰ïJrî1gïJî2~ïJyî4GïJî5ïJrîFÕïJîG8ïJîH}î ìïHk îÿî�îŠîìîÃî!½î$2î&Êî-°î/—î2.î7î:J îB³îGžî ìïFÄîXîyîLïFÄî$ïFÄrî»ïFÄî ŸïFÄî#Âî..î2zî6›î9Nî<[î@.îBØîD�î ìïEî Ÿî ”yîµïEî�ïErîÄïEî¦ïEî yî¸ïEî�ïErîïïEî ^ïEî!£î&eî)œî*Êî-ÿî/²î2î4dî8î9Æî?$îA÷îD§î ìïCuî «îÙînîkî¬îòyî"¢ïCuî#zïCurî+ïCuî+ÔïCuî.rî/ƒî2 î5‘î9Çî>wî@ZîB  î ìïAÎîUîÐî½î î Iî#Öî'Bî(½î,4î/<î3nî8´î;§î@< îG/î ìï@&îÎî(î înyî#ï@&î#òï@&rî'Rï@&î'Àï@&î)î-Ãî0%î3Wî5î7uyî9“ï@&î:kï@&rî?zï@&î?éï@&îA+îCvîFPî ìï>îˆîëîKyîôï>îÌï>rî,ï>îšï>îÚî ìï;þî,îµîyî´ï;þîŒï;þrî*jï;þî+sï;þî.Aî0Š î7,î:0î=Jî?EîA¥yîD´ï;þîEŒï;þrîG<ï;þîHï;þî ìï:Wî vî/ îîîî".î'´î(êî+î/Zî2?î8Îî;fî=cîBÿîDbî ìï8°î šî 'îžî{îl îoyî!'ï8°î!ÿï8°rî1.ï8°î2 ï8°yî6"ï8°rî7~ï8°î8êî;Jî?æ î ìï6/î îTî®îî\îyî!dï6/î"<ï6/rî(#ï6/î)Lï6/î-î.Œî2Ãî9³yî;)ï6/î<ï6/rî>‰ï6/î?±ï6/îAuîGžî ìï4ˆ îïyî¨ï4ˆî€ï4ˆrî&^ï4ˆî':ï4ˆyî+Rï4ˆrî,®ï4ˆî.î0z î ìï2î Äî¥î½îIîÏî}î î$+î&¬î)Ýî.Yî2àî4xî7Õî ìï/†î 7î_î îuîÍîBîóyîï/†îìï/†î$ürî)3ï/†î)Îï/† î0«î3½î5 î8Tî9ú îA´yîD ï/†îDäï/†rîHCï/†îH²ï/†yî ìï-ß rî3ï-ßîØï-ßyîuï-ßîMï-ß rî “ï-ßî!‘ï-ßî#Éî(¤yî+lï-ßî,Dï-ßrî3ï-ßî3|ï-ßyî6fï-ßî7>ï-ßrî>Õï-ßî?Óï-ßîB îFÙyî ìï,7rî«ï,7î%ï,7îyîØï,7î°ï,7rîï,7î«ï,7 î eî#î%yî&+ï,7î'ï,7rî)‹ï,7î)úï,7î+9î.kyî/”ï,7î0lï,7rî4¤ï,7î ìï)·î Oî¯î5îñî¯î!î#•î'rî,ƒî1·î3ûyî6aï)·î79ï)·rî=øï)·î>gï)·î@ÍîCîEvî ìï(î yî/ï(îï(rîŽï(î^ï(îÚîJî³îãî!Èî&èî)“î*Ýî,=î1rî3î6Oî;Mî>îCfîEÚî ìï&hî Yî³îÛîîmîîÐyî *ï&hî!ï&hrî%:ï&hî&ï&hî(ãî.6î0±î4�î5èî8ƒî:è îA›îE£î ìï$Áî Kî�îÎyî‡ï$Áî_ï$Árîï$Áî ìï"@î ¨î ¿îƒîî×î}îÉîæîáî"-î%üî*èî0dî2Žî4Û î<–î><yî?Rï"@î@*ï"@îDbî ìï ™rî Lï ™î9ï ™îçîjî]îÛîŽî"Kî&?î+©î0 î1Ëî4<î:`î=¢îAÌ î ìïñyî öïñî Îïñ rî=ïñî3ïñî« î´î!/î$üî)²î.<î2�î5S î:ûyî=tïñî>LïñîBƒrîHkïñîIïñî ìïJî Mîtî/ îÈîäî-î Úyî!ŠïJî"bïJî$êî-Yî/rî1�ïJî2ÆïJî52î:Âî>¥îC¦îFuî ìï£yî œï£î tï£î ü rîkï£îï£îaî!îÆîôî"†î$%î&^î)3î+ƒî1‡î3×î7|î;!î<ÀîALîE­î ìïûî Fî'î î°îJîiî ïyî"ïûî#Åïûrî'%ïûî(Kïûî)Õî,&î/ î1�î4Ûî7yî9#î<öîAèîD‘î ìïTî]î>îºî«î¶î.îšî$Ûî&Šî)wyî.¤ïTî/|ïTrî7ïTî7¸ïTî9fvî;ÛïTî<`ïTrîAïTîA�ïTîBÍîFî ìïÓî ; îªîpî‹î Íî"wî$dî'œî)Õyî,0ïÓî-ïÓ rî5wïÓî6NïÓî7Âî9)î;¦î?¤î@ÉîDnî ìï,yî ºï,î ’ï,rîï,î"ï,yî‚ï,îZï,rî¹ï,î–ï,yîõï,îÍï,rî!µï,î"‘ï,î%Hyî'¨ï,î(€ï,rî,·ï,î-1ï,yî/!ï,î/ùï,rî40ï,î4Õï,î6!î7Ïî:/ yîAŽï,îBfï,rîDîï,îErï,î ìï«î €îTîkîvîÖî"^î$Mî&î)üî,zyî/ï«î/óï«rî5Úï«î6÷ï«î: î@èîD§îGÖî ìïîxîÕîîÇîyî|ïîSïrî#‹ïî#îïyî&aïî'9ïrî*™ïî+rïî.Iî1ûî5@î6©î9(î=(î>PîA÷îGyî ìï]rî Lï]îTï]yî´ï]îŒï]rîÃï]îiï]îzyîÚï]î²ï]rîéï]yî cï]rî%rï]î&ï]î'cî)î+q yî2Ðï]î3¨ï]rî60ï]î6´ï]î ìï Üî <înîÖîî»î¡yî Žï Üî!fï Ürî)Õï Üî*Nï Üî-�î0eî5æ î=Nî?žîEÛîG†î ìï 5î ‚î‘î¤îcîŒîyî!\ï 5î"4ï 5rî)Ëï 5î*‰ï 5î+÷î0îî5@î8“î;¼î=Lî?îCqwî)eïý ­TVm$…izingittotheresultofacallonCreateNode.AproducesaMesastatementthatinstantiatesaCellClass.ThefirstisthenameoftheInstance;thesecondnamestheClass.ThesgivetheassociationbetweenPortsoftheClassandNodes:thefirstnamesthePort,andthesecondnamestheNode.TheTranslatorchecksthattheNodeandthePortwereboAproducesaMesadeclarationthatintroducesaNode.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:yî4_ïb)î57ïb)rî7¿ïb)î8–ïb)î;«î=î@€îBwîHeyî ìï`‚rî Lï`‚î(ï`‚îß î¢îùî§îî Òî"‹î#´î&?yî(Fï`‚î)ï`‚rî0µï`‚î ìï^î �îâ î‚îvî·î"wî(Äî+© î2Ýyî4ï^î4öï^rî;µï^î<¨ï^î?—îB†îE­îG/î ìï\_î Äî•wî ï\_îpï\_rî…ï\_î›ï\_îî¼î$yî&�ï\_î'hï\_rî*Èï\_î+¼ï\_î.¬ î7¥î:«î=# îD yî ìïZ¸rîûïZ¸î·ïZ¸î¯yî ïZ¸îáïZ¸rîïZ¸î¾ïZ¸yîËïZ¸î£ïZ¸rîïZ¸îûïZ¸î"Uî%(î(1î,pyî.ÊïZ¸î/¢ïZ¸rî2*ïZ¸î3ïZ¸î5³î8 î<šî@ØyîC2ïZ¸îD ïZ¸rîF’ïZ¸îGhïZ¸î ìïY îƒîéî¸yîïYîïïYrîOïYîôïYî!yî#eïYî$=ïYrî'�ïYî(›ïYî*îî.*î3¯î5^î7Nî9 yî?¶ïYî@ŽïY rîHýïYî ìïV–î ëîtîËîö î õî#"î$rî'Ô î0ƒî4î5kî9; î@îAïîDîGàyî ìïTî rî3ïTîîØïTîîóyîeïTîî=ïTîrîüïTîîÃïTîî%èî'|î+î,~î0�î30yî5¢ïTîî6zïTîrî:±ïTîî;xïTîwî>ŽïTîî>òïTî rîF¢ïTîîGiïTîîI)î ìïSGîEîÅîzî>î—îî#Eî$›î'Fî)7xî ìïPî )î«î rî ìïMVî Ä îãîEîòî!×î$òî'Qî ìïJÛ î×î ìïH`î ŒîÌ î§îüîDîÁî!±î'æî,Ðî.Sî4Áî6†î8ýî<#î=éî@HîB¿îG%î ìïF¸î%îíîîYî°î!_î#§î& î-î/wî3»î5iî ìïD= îÅî ìïAÂî©î\îlîšîî 9î!gî$ î(­î*ïî.%î18î4 î5{ î=7î@VîBºîF^î ìï@î ýîgî¸î:îðî îUî"î'Ýî)¡î, î0œî3íî6¯î9¨î<ÃîA¸îD!îEÚî ìï>tî šî„î ìï;ùî T î îYîxî Ïî#…î$¤ î.Îî1…î2¤ î:Óî=Šî@6îAU î ìï:Qî Ÿîiî½îg î!Žî$Çî(î.î2^î5( î=Uî@¹ î ìï8ªî hî áî‘îîêîÆ î"Cî$¦ î,5î/ î2î:bî?[îB7îFÍî ìï7î îî ¸î)îäîzîZî– î%2î&ýî)°î.Áî4Bî6²î8ß î?ÖîFî ìï5[ îËî‹îPî[î"íî$¯î)‹î,Kî1£î3î5•î7� î>áîBF î ìï3´î £ î²îî¾î®î ìï19î î îRîåî{îàî£î$Fî'íî)Æî-¥î0.î4¨î6Š î>?î@îB2îFØî ìï/’îZîúîKîŽîŒîð î%î'wî*@î/1î2Âî4lî6½î:Çî<îApîCÀîFiî ìï-êî&îîîiîîî„î";î'î(qî)Çî-Éxî ìï*«î )î·îeîà î‡î?î žî%¾î'k rî ìï'ùî jî ÜîWîqî&î¡î î"üî&¬î)>î+5î1[î3]î7î;M îAàîCâîGàî ìï&Qyî²ï&QîŠï&Q rîøï&Qîµï&Qî–î Ö î'¦î-bî1[î4Î î;Šî=pî?°îDMî ìï$ªî šîîaî‹î2î¦î î!;î'8î(ñyî ìï"/rî«ï"/î/ï"/îæî�î3îUîyî$î&’î)î-ùî1Óî53î7î:Õî?Tî@úîCS î ìï ˆî Aî ‚îôî÷îºî î#)î&õî*îî.�î2î4î5Xî7Ùîbî@+îBšîEî ìï9î ìï¾î êî ùîîÕîq îxî"Oî#Mî ìïCî ÿîî\îÛyî?ïCîïCrîOïCîïCî"T î)î,$î0ñî2˜î52î9,î; î=ºîAŸîFÙî ìïœ îVîîÛî©îEî"|î#¦î&Fî+gî ìï!î šî 'î°îQîùî7yîï!îéï!rî#¨ï!î ìï¦î šî#yî‚ï¦îZï¦rî‘ï¦îXï¦îØyîÈï¦î ï¦ rî%çï¦î ìï+î šî#yî‚ï+îZï+rî‘ï+îXï+yîØï+î°ï+rî!oï+î ìï °î Ä îËî6î–îîÁîoî™î$Ãî ìï 5î nî ˜ îpîÜî‹î{îFî Ïî$7î'î(õî*î,ˆî1î<+î>'îB¢îGwî)eïöÿ “TVm$³eort*[";"*]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îîúî î>î ìï_™î cîwî*îŽîjî¬î\îQ î%;î)Åî+bî-î/xî4‡î6³î9 î?ÞîB»îGQî ìï]ñî ·îõîQîî¡îƒîcî î]î"÷î(lî* yî,[ï]ñî-3ï]ñrî4Êï]ñî5eï]ñî8Óî:} îBZîD%îElî ìï\Jî ·îwîdîîvîîœî gî#î%­î+î-sî0Šî2Äî5lî7Yî:’î<=î@•îCîGöî ìïZ£î ïîñî¦îUî‹ î$Ðî&1î'‡î ìïXîÌî îî î!Œî'`î2Sî3¡î7ôî<ªîBªî ìïVsî Žî8îÚî¿î.îÙvî¢ïVsîïVsîìî"Cî&ôî+,î-Ärî1¨ïVsî2yïVsî4Ìî?#î@ÐyîC#ïVsîCûïVsrî ìïTÌî úî¨î ìïRDî —îˆîîºî]î+î! î$î&Šî(ê î/Ùî2- î9îî;œî@9pî ìïNî Èî3îÂî½rî ìïJ°î îÚîPîúî“îî�î!ºî'‰î*Ëî,¸î-ßî1Mî4Cî5îî9”î;£î=þîCtîF'î ìïI î …xî ìïE©î )rî ìïBÖî QwîHïBÖî¬ïBÖ îQrî‰ïBÖîlïBÖî*î ¼î$lî&…î,sî.î3wî7+ïBÖî7�ïBÖ î?4 rîFpïBÖîGSïBÖyî ìïA.rî#ïA.îïA.yî·ïA.î�ïA.rîïïA.îËïA.îZî­ î&œî(Ùî-ïî2>î4õî ìï>¦î ðî NîåyîCï>¦îï>¦rî{ï>¦îÞï>¦îîŸî �î"�î(î,^î27î4gî5Åî:î?ëîBîD?î ìï<ÿîîTîöî”î!†î#} î*€î-�î/8î0  î7üî9ôyî=ï<ÿî=Ùï<ÿrîA9ï<ÿîAÞï<ÿîD/îEÙî ìï;X îpîÿyîÚï;Xî²ï;Xrîï;Xîuï;XîŠyîÁï;Xî™ï;Xîùrî#Xï;Xî$Bï;Xî(î)gî*àî,›wî.ƒï;Xî/jï;Xrî4Šï;Xî5sï;Xî7[î<¶î@‚îAûîH'î ìï9°î Ìîèî:î¬îñîMîÕî$î!qî#wî%iï9°î&Pï9°rî+pï9°î,<ï9°î-‚î.Ýî4ìî6‰î:9î?2î@£îAéîCDî ìï8 î šwî úï8 îáï8 rîï8 îÝï8 î3îŸî¾îÄî îî$î'- î ìï5�yî Ìï5�î ¤ï5�rîï5�îgï5�îÂîeîfî”îÿî$÷î'Fî*Eî,]î/\î4+ î;DîA<îC‹îEî ìï3Ù îÚî‰îßîxîîîÈî!4î#1wî%ï3Ùî%ÿï3Ù î,Úrî/"ï3Ùî/ôï3Ùî1mî4íî6Oî9_î<î@tîFSî ìï22î Kî÷îîéîƒîîîœî ìï/ªî¬ï/ªî…îSî¿îÕî ƒî"ã î*ºî0Âî ìï-"î¬ï-"î…îSî¿î¯îZî!î#h î+@î1Hî ìï*šî¬ï*šî…îSî¿î¯î !î!Úî$: î,î2î ìï(î¬ï(î…îSî¿îûîìî"–î%Nî'>î ìï%Šî „î$îŽîPîâ î½î"3î%!î'ãî)êî+*î/Wî2F î9Žyî?­ï%Šî@„ï%ŠrîCäï%ŠîD«ï%ŠîFowî ìï#ã rîæï#ãîIï#ãî�yîäï#ãî¼ï#ãrîÌï#ãîEï#ãî ðî#Ÿyî&9ï#ãî'ï#ãrî*qï#ãî*Ôï#ãî+Õî.,î3:î7ûî9¬îî@YîE÷î ìï";î ÄîVî?îðîO î ìï³î\î‚î¹îÜîÏîvî"mî&î(·î*^î,H î3˜î6øyî8ï³î8óï³rî;{ï³î$îB1îD�îG~î ìïdî Øî°îþî¾îGîæ î"î$Øî(«î)ÿî-›î/Àî0Òî5Ïî9ÙîîAŒîC î ìïãî úîÁî!îtî›îÑî"°î(î-¹î1 î2A î9_î;$î=ÿîC¥îFiî ìï;î  î(îáî@î#qî(�î*Vî-àvî ìïhî 2îõî°rî ìï Üîßîáîÿî¶îŸî§î!xî#ïî'þî)Ïî,Fî/!î2•î4\î8ûî:Áî<îAqîC"îEÛî ìï 5î ›îºîÂîYîîˆî#ðî%l î-_î0î2?î4¯î7—î=ƒîBF wî)eïö 5TVm$°TVm$¶displayed.Allofthedescendantsofthetreenodeclicked,includingitself,areenumerated.ThosethatareforCthereisaconstraintthatwheneveranodeinthetreeisdisplayed,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 î4ôî7î8öî:ýîAîD¥îGžî ìï`‚ î ìï]ÿî ‚îãîXî îŠîBî`î"Üî&Yî)0î.Eî/»î5‹î6¾ î=ðîAJîC#îEŒî ìï\Xî jîòîJî¿îòîäîÆî"Žî$Pî'(î+Ãî.Wî0Qî5}î7?î8öî;_î?'î@êîCRîF(î ìïZ°î Ìî,î�î¬îîîî ¸î!óî$èî&§î)î,Pî/Èî29î6 î8Bî:²î>î?àîBQîF!îGžî ìïY î«î¦î Æî#²î&[î,bî/Xî1;î2Wî7î<\î>î@YîCÈî ìïWbî šî úî^îî¸î‚ î$ î&iî+Íî.Ñî1Fî ìïTßîpîÚîxîÀîõîsî ™î#î&î*mî.êî3/î5šî9ôî?cîAîC î ìïS7îˆîî?îÂî¼î9î#Îî(+î*®î/!î4¨î7@î9î;& îAÀîD»î ìïQ�îFî¸î#îœîÚî9 î&Øî(‘î*ñ vî ìïNÄî 2îsrî ìïL?î ÎîšîqîñîSî î!?î&Ÿî(î)Ìî.êî2Èyî3üïL?î4ÔïL?rî83ïL?î8ÙïL?î=tî?îB|îFî ìïJ˜ î1 î%î þî$2î*–î0î3‚î5îî9î=_î?ŠîA÷îF·î ìïHð î[îÍîAîjîÝî î#Iî%î'` î/ î0Äyî3‘ïHðî4iïHðrî6ñïHðî7ÌïHðî:£ îAîFî ìïGIî [î ~îìî#îNîîZîùî#êî%�yî(eïGIî)=ïGIrî+ÄïGIî,šïGIî/®î2î7èî<æî@RîBÁîCäîGRî ìïE¢î îÖî5îKîBîûyîÉïE¢î¡ïE¢rî")ïE¢î#ïE¢î%Ýî(Ÿî,– î5�yî7;ïE¢î8ïE¢rîîA;îDî ìï,¥î IîŸîîÂîÒyîHï,¥îï,¥rîWï,¥xî ìï)Lî )î3rî ìï&€î 8îÆwîhï&€îÌï&€rîRï&€î ï&€îøwîï&€î ï&€î¹rî$(ï&€î$òï&€î)õî.2î1#î3î8'î:~î@=îE@î ìï$Ùî £î2îÜî—î î vî"Öî)Yî,'î0®}î¿ï!zyî#Ùï!zqî%ˆï!zî&0ï!zyî)ï!zî)íï!zî.üî4 îòïÓî)0î*àî.?qî4'ïÓî4àïÓyî:1ïÓqî;àïÓî<™ïÓyî? ïÓqî@¼ïÓîA�ïÓyîòï,îarî ìï©yî »ï©î “ï©rîóï©î£ï©îžyîDï©îï©rî‹ï©î ´ï©î"êî$Òwî'(ï©î(&ï©rî*7ï©î+ ï©î0sî1Öî7hî9œî;óîAîEîF¿î ìïî —îëîÙîîxî îîÅî î"©î'òî+î0Rî1ýî7Öî9Ùî<æî>{îA¾îCíîGàî ìïZ î ìïØîîlîxî¦îÒwî ‘ïØî!xïØrî(dïØî) ïØî+/î0yî2ë î9j î@ÝîC’î ìï0yîxï0îPï0rî¯ï0îßï0î™ î! î)5î,@î.Wî1 î6rî;yî=¼ï0î>”ï0 rîH²ï0î ìï‰ î+îî" î!Rî%·î'‘ î/Hî1- î9|î<îAjîB} î ìïâî ²îî&îÙî'yî0ïâî ïâ rî*'ïâî+ïâî.Þî3§î5!î6X î=wî?>îAªîGÖî ìï:î Kîî· î¿îmî–î!¬yî ìï ·îûrî ®ï 5îî‚î³îoîÑî!ß î(Nî+lî.î3(î6öî8§î;£î>~îC˜îEûwî)eï ÁTVm$ØruedtobethebitsinallthenewIO(andoldIO,actually)RECORDs,andalsothecontentsofthestateRECORDsusedbyBehavioralDescriptions.Restore:PROCEDURE[fileName:ROPE]Restorethestateofthecircuitfromthenamedfile.Thisisevenmeanttobetolerantofsmalldifferencesbetweenthecircuitsavedfromandthecircuitrestoredto.Thechangescurrentlytoleratedareadditionsofthings(Nodes,Cells,fieldsinthestateRECORD).conditions:READONLYSychangestowhatistobedisplayed,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î%î'~î,Hî0*î1ãyî4Bïb)î5ïb)rî:)ïb)î:˜ïb)î<‰îA”îBÿyî ìï_ª îãîRî$î) rî ®ï]*îŸîaîî‘î ¶î#6î'Bî(Ïî,¤î/“î3ãî6» î=Hyî@„ï]*îA\ï]*rîE“ï]*îEöï]*îGbî ®ï[ƒî­îî±î–îñî¾î Tî# î*?î. î/·î2 î6#î9î;Òî>ryî@Æï[ƒîAžï[ƒrîEÖï[ƒîFÓï[ƒî ®ïYÛî�î—î7î7î0yî ÐïYÛî!¨ïYÛrî%ïYÛî&ïYÛî'ôî*%î0„î2sî6sî;½î>µîBîEkîGœî ®ïX4 îpîHyîþïX4îÖïX4rî^ïX4îÁïX4î#î(]î*Mî,î.eî2ˆ yî ìïUµî#rî ®ïS5î×îAîÈî÷îºî#î%Aî'Qî)º î0Àî6Êî8‚î:ëî>hîBHîC³îFî ®ïQŽîîæîî˜ vîÊïQŽî:ïQŽrî’ïQŽî�ïQŽî"Ëyî ìïOîzî$éî+¨î0·rî ®ïL�yî6ïL�îïL� rî}ïL�îYïL�îiyîÊïL�î¢ïL�rî!QïL�î".ïL�î'êyî)˜ïL�î*pïL�rî, ïL�yî ìïJ î rî ®ïG�î7îÐî îÂîî Œî#¨î%Wî'­ î.1î1!î3wwî6FïG�î7pïG�rî;~ïG�î<9ïG�î=§wî?ýïG�î@åïG�rîFïG�îFØïG�î ®ïEéîDwîïEéîïEéyîZïEéî2ïEérîñïEéî ÍïEéî"Owî$®ïEéî%–ïEérî+:ïEéî+�ïEéî,¥î17yî3ÙïEéî4°ïEérîÐîDîEñî ®ï6õ îŒîÞî î=î"ëî&5î(Ðî+î//î4`î6Hî9î>îCÓî ®ï5Nîîôî­îÅyî?ï5Nîï5Nrîvï5Nyî Sï5Nî!+ï5Nrî$Šï5Nî%gï5Nî)î*Éyî-)ï5Nî.ï5Nî28rî7Hï5Nî7Áï5Nyî ìï2Î î î¢ rî ®ï0Oî’î®î\î�î†î® î'‡î. î5‹î7ë î?vîB�îEÚî ®ï.¨î ëî<îwî¢ï.¨îŸï.¨rî†ï.¨îuï.¨wî ï.¨î!ï.¨rî&àï.¨î'Cï.¨î(_î)œî/ î7wî8Ôï.¨î9±ï.¨rî<Þï.¨î=Wï.¨yî@œï.¨îAsï.¨rî ®ï-î`îxî¹îwî ï-îçï-rî=ï-î¬ï-î Iî!Ýî$Åî*³î-§î/î2$î4 î;î=î?üîC îEî ®ï+Y î·î‚î3î&î"¬î&Rî(î*Æî-î.“î4Åî6…î7Áî;ëîA¢îC°îDëîGÖî ®ï)² îoîî î6î!¼ î*³î,kwî.Éï)²î/Æï)²rî4ýï)²î5Øï)²î9Øî<+î>ÖîD{îGÖî ®ï( î¢wîìï( îêï( rîãï( îªï( î"Mî%$î'¥î-kî/Oî4‘î6kî; îA îG/î ®ï&c îîÕî;îžî!Rî%fwî(ï&cî) ï&crî.Ìï&cî//ï&cî0>î6!î:åî>î@IîA»îGáî ®ï$¼î ×î·îiîYî4î�î Gî#Kî%<î*Qî+²î-î/Öî2?î5Yî7–î9öî<ï yî ìï"<îûî»rî ®ï½î‰î˜îŸî“îÓîwî%üï½î&Ùï½rî)nï½î*Nï½î._î1‰î6ïî9Rî=Mî? yî@7ï½îAï½rîDnï½îDèï½îGî ®ïîxî î;îœî ëî$.î(‘î-ñî0yî3î4øî7€î= îALîC#yîE«ïîFƒïrî ®ïnî�yîïnîòïnî)rî éïnî!bïnî#_yî%øïnî&Ðïnrî+ïnî+kïnî,ïî/ˆî4Ìî86î<÷îCœwîE�ïnîFlïnrîIïnî ®ïÇîâî…îÙî)î×yî*ïÇîïÇ rî(IïÇî)ïÇî)öyî,JïÇî-"ïÇrî0‚ïÇî1RïÇyî4ïÇî4öïÇ î>=rîF¬ïÇîGïÇîH î ®ï îãî‹îîYîQî#î&1î)\ î0‰î2;yî3_ï î47ï rî7–ï î7ùï î9>î;—î@œîDîE„î ®ïx î î–îäwî�ïxî^ïxrîBïxîïxî#Pî%ãî*î.:î/�î1!î3î9î:Êî=0î?‹îDžwîFIïxîG&ïxrî ®ïÑîî8îæîByî÷ïÑîÏïÑrî!/ïÑyî#ïÑî#ìïÑrî&sïÑî&íïÑyî ìïQ î3wîÊïQîÇïQrî ®ïÒî î{îqîÜî¥ î&Ýî(Øwî*CïÒî+@ïÒrî0vïÒî1“ïÒî4ïî8aî:î=‹î?{îF¡wî ®ï+ rî‘ï+î~ï+îÿî¾î/î"¢î%î)÷î.bî2åî4bî9î;2yîîEfîF¡î ®ï ƒî²î6î‰îywî2ï ƒî0ï ƒrî#fï ƒî$Zï ƒî'¹î+½î-Awî/¸ï ƒî0•ï ƒrî3ï ƒî3Ñï ƒî4çyî7Íï ƒî8¥ï ƒrî<ï ƒî<ªï ƒîCPîFüî ®ï Üyî3ï Üî ï ÜrîBï ÜîÝï ÜîÀî9î¿î"×î&î'°î(Íî.›î0î3îî6ûî9ƒîî}î"€î%Üî'Ÿyî*ï^î*ìï^rî1«ï^î2œï^î6Pî8Äî;Cî>Ÿî@ îDBîG/î ®ï\gîPî6yîÂï\gîšï\g rî hï\gî âï\gî"oyî$üï\gî%Óï\g rî1¢ï\gî2 ï\gî4{î99î:�î?ÇîDýîHqî ®ïZ¿ î�îØîwîˆî"$yî$‚ïZ¿î%YïZ¿rî,ñïZ¿î-TïZ¿î.Zî0tî2 î3Hî71î;rî>·îB¡îD îFhî ®ïYî[î,î]î¥îî Cî"‚î$äî)ºî.î2Šî5Aî7£î<�wîB,ïYîC ïYrîEtïYîF/ïYîG/yî ®ïWqrî ïWqî‡ïWqyî ìïTõîjrî ®ïRyyî‘ïRyîiïRyrîïRyîoïRyî¯îØîãwî#ïRyî$ïRyrî)FïRyyî ìïOþ î rî ®ïM‚îyîeïM‚î=ïM‚ rî 4ïM‚yî ìïKî Lrî ®ïH‹î yîiïH‹îAïH‹ rî8ïH‹îïH‹î!Ìî$ñî'¿î*—yî,÷ïH‹î-ÏïH‹rî4ŽïH‹yî ìïFîòî"aî(Hrî ®ïC“îLyî¬ïC“î„ïC“rîCïC“îïC“î:î šyî$NïC“î%&ïC“rî'®ïC“î(ŠïC“î*8î,˜î.Öî0Žyî5ïC“î5íïC“rî=„ïC“yî ìïAîzî$éî*Ðrî ®ï>œîŸîîfî¤î]yî ãï>œî!»ï>œrî**ï>œî*™ï>œî,‰î/5î2Pî4¯yî8dï>œî9<ï>œrî;Ãï>œyî ìï< î’îî$éî,€rî ®ï9¥î½îî¾îlîÀîaî²î`î$)wî%Hï9¥î&Eï9¥rî+{ï9¥î,Lï9¥wî/ï9¥î0ï9¥rî5Æï9¥î6�ï9¥î:!î;�î=Öî@vîC†îEÛyî ®ï7ýrî ï7ýîï7ýyîï7ýî×ï7ýrî7ï7ýîšï7ýîÂî¡î!'î#¦î(�î,Ž î2íî7$wî8mï7ýî9jï7ýrî?Dï7ýî?§ï7ýî@ÏîETîG"î ®ï6Vîîlîþî©î²î%î'| î/<î4wî5Aï6Vî6>ï6Vrî;÷ï6Vî2yî ìï0ŒîBî ±î&™î.0rî ®ï.îÈîMî¬wî3ï.î0ï.rî"fï.yî ìï+”îBî ±î&™î-Xrî ®ï)îåîoîìî©îŸîvî!gwî"¯ï)î#¬ï)rî(âï)î)Üï)î-nî2_î3éî9úî<î>‘îBCîEîFíî ®ï'qîðî!îÈî}yîÙï'qî±ï'qrî!èï'qî"¯ï'qwî%¯ï'qî&Œï'qrî*‰ï'qî*ìï'qî,3wî.Ðï'qî/Îï'qrî5„ï'qî64ï'qî8Mî9swî<]ï'qî=Dï'qrî?ûï'qî@Óï'qwîC/ï'qîD,ï'qrî ®ï%Êî î>îVî¬î Ùî$@î)Jî*øî/Ëyî2+ï%Êî3ï%Êrî8ï%Êî8uï%Êî9~yî ìï#Nîòî"aî(Hî/ßrî ®ï ÓîÈî3î“î2î îà xî ìïƒî )rî ìïÁî Ãî8 îËîÃî$hî%Òî1Šî4�î7zî92î;ÒîBGîD»î ìïî IîÜyî<ïîïrî#ïîêïî¤î¶î² î(ìî*šî-yî/Aïî0ï rî;çïî ìïžî ‘î< î î¹î î#.î%Òî)ªî+.î0~î2öî7ªî9| îAîB¶ î ìïö î î$î&îPîî°î"¾î$lî)bî,}î-¦î ìï{î NîÖî�îNîÈî6î B î(•î+|î1‡ î9ƒî:þî>Hî@•îFãî ìïÓî Íî“î îî"îK î$Mî'hî)Èî/Úyî ìïXîÓîBîÙrî ®ï ÜîÆîßî<îÎîëî$!î&î*1î/\î1î5`î8Òîewî)eïýÿäTVm$/îAxï]0rîF‡ï]0îG¸ï]0îH²î ®ï[‰îî=îzîˆ î î!Áî$î&]uî ìïY îÓîjrî ®ïV�uîÆïV�îžïV�rî­ïV�î‰ïV�î+îÜî"àî&«î*¢î-èî1E pî ìïRkrî ìïOî îîZî`îýpî ìïJöî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^î3Ÿî6.î:(î<^î>]î?îîB/ wî ®ï`yrîüï`yîØï`yî�î¶îîOyî»ï`yî “ï`yrî"Cï`yyî ìï]÷îûrî ®ï[uî6îâîÆîyî ìïXóîÓîjrî ®ïVqîÄî,îdî[ î 6î!ëî%{ î,î-Äî1î4�î66î9�î;:î==yî@ ïVqîAxïVqrîF‡ïVqîG¸ïVqîH²î ®ïTÊîî=îzîˆ î î!Áî$î&]yî ìïRHîÓîjrî ®ïOÆyîÆïOÆîžïOÆrî­ïOÆî‰ïOÆî+îÜî"àî&«î*¢î-èî1E pî ìïKšrî ìïHBî îîZî`îýpî ìïDî Èrî ìï@¾î _îËî»î�î6î`î•î²î"[î#�î'î*î-7î ìï><î ZîÁîîjîÌî&î¢î%î&%î,î.3 î5Kî7»î9oî;É îB´îEfîGÖî ìï<•î K }î¿ï98yîGï98îï98î¶î>î¿ï7Šî¦îî� î¿ï5Ü îîÅî!Mî)¼î1Sî¿ï2î*“ î3Úî;qî¿ï0Ñî¿ï/"îî¦îî� î¿ï-tîFîV î¿ï*îÎî�îÅî"$î*“rî ìï%çî Lîsîî”îó îâî!€î#Éî%î)›î,R}î¿ï"ŠyîGï"Šîï"Š î¿ï Üî~ î¿ï.î¦îî� î¿ïîö |î¿ïÑî£îî½yî¿ï"î¦îî�î¿ïtî~î¿ïÆîöî¿ïî¦îî�î¿ïiî~î¿ï»îöî¿ï î¦îî�rî ìï Üî ˆî¨î&î'øî.aî0!î2$î5¨î:wî<�î?îBzîDOîG/î ìï 5 îÅîî°î î ¹î&> wî)eïý#TVm$4î½uî¿ï¤î¦îî�î¿ïúî~î¿ï Oîöî¿ï ¤î¦îî�î¿ï ùî~xî)eïýÿcTVm$LïH&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}î¿ïa„yîGïa„îïa„î~î¿ï_ÏîVrî ìï[“î LîsîîîM }î¿ïX+yîGïX+îïX+îŽ|î¿ïVvîzyî¿ïT îî)¼î+kî-î.Ëî0{î2+î3Úî6bî¿ïSîî¦ î¿ïQY îîÅî uî"$î#Ôî%„î'4î(äî+kî¿ïO¥îî¦ î¿ïMñ î î"$î#Ôî%„î'4î(äî*“î,Cî.Ëî¿ïL=îî¦ rî ìïHî_î¾î îŽî:î Àî"lî$¿î' î-¦î/øî4î9Dî:aî>`î@îAÎîEŒî ìïFY}î ïFYî ßïFYrî�ïFY}îïFYrî¹ïFY}î•ïFYîmïFYrîEïFYî"ïFY}îÙïFYî±ïFYrîaïFYîæïFYîÞî�î"Óî&0î(� î ìïCÑî Ä î[î%îOîî#cî$�î'8î+fî0Õyî¿ï@i îÞî,Cî0{îD¸îòï>Áîzî¿ï= îoî.îÞî!Mî'4î-óî1Sî6bî¿ï;Yî¿ï6< îÞî!Mî%„ î.Ëî2+î4²î¿ï4‡î~î=î uî¿ï2Óîöîµî¿ï1îoî.îÞî!Mî'4î-óî1Sî6bî¿ï/kî¿ï*N îÞ î$¬î(ä î5Šî8êî;q î¿ï(™î~î=î uî¿ï&åîöîµî¿ï%1î~î=î uî¿ï#}îöîµî¿ï!Èîoî.îÞî!Mî'4î-óî2+î7:î¿ï rî ìïŒî ‚îîÌîpî­î¬îcîñî.î!�î&+î*Òî.� î ìïî _î³îî�î:yî¿ïœ îî=î"$î#Ôî*“î.Ëî0{î4²î;qî‘ïçîdï3îìî#î#[î)Bî*òî‘ïî¿ï îµîíî$¬î+kî2+î‘ï bîdï ®îKîûî(jî‘ï ùwî)eïöTVm$5TVm$8&dî-ûqî3 ï^4î3Äï^4î6áuî=ï^4qî>Çï^4î?›ï^4uîòï\�qîÊï\�îƒï\�î uî×ï\�î ¯ï\�qî¿ïY4uîFïY4î ìïVµrîÊïVµîNïIntNotisaPROCEDUREfromIntTypes,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)rîÓïb)î6ïb)î†yîøïb)îÐïb)rîgïb)îàïb)îî%{yî&ìïb)î'Äïb) rî1 ïb)î1zïb)î4!yî75ïb)î8 ïb)rî=ïb)î=€ïb)î?îCîGVî ìï`‚î îîg îVîÉî!î#|î(ëî*¤ qî¿ï]&yî‘ï[x~î¿ïXyî3ïXqîãïXî­ïXî^ yî&cïXqî¿ïTÁyî¿ïQe qîÞïQeî—ïQeyî5ïQeîäïQeî¿ïN îö |î!™ïN î$î(Tî*Û }î¿ïJ®yî§ïJ®qîWïJ®îÿïJ®yîõïJ®îÍïJ®qî'<ïJ®î(ïJ®yî-sïJ®qî/#ïJ®î/÷ïJ®yî5ïJ®î5ìïJ® }î¿ïGSyîÏïGSqîïGSî'ïGSyîïGSîõïGSî&dî-ûqî3 ïGSî3ÄïGSî6áyî=ïGSqî>ÇïGSî?›ïGSyîòïE«qîÊïE«îƒïE«î yî×ïE«î ¯ïE«qî¿ïBPyîFïBPî ìï?ÎrîÊï?ÎîNï?Îî{yî ¢ï?Îî!zï?Îrî)éï?Îî*bï?Îî,$yî.ï?Îrî.êï?Îî1~î4Îyî9¿ï?Îî:—ï?ÎîB.rîD¶ï?ÎîE:ï?ÎîIgyî ìï>'rî œï>'î ™ï>'yîÊï>'rî&ï>'îK îãî…îØî"8î&êyî(£ï>'rî){ï>'î+4î-ëî0Jî2ëî4¤î8Òî;tî=Çî ìï;¥î _î³îî�î: yî¿ï8Jî~î¿ï4îîÎîî-î3Úî:šî‘ï3@îdï1’îtî$3î%ãî‘ï/åî!î$oî3žî5Mî:]î‘ï.7îdï,‰îûî&ºî(jî‘ï*Û îdï)-î#î Óî‘ï'€îdï%Òîtîdï$$îtî+Êî1±î6Áî<¨îCgîdï"vî7ï Èî"Fî%¦î*µî.íî2Lî84îdïîdïmîœî,¢î1±î8pî‘ï¿îdïîìîûî$3î*òî,¢îdïcîKîûî(jî‘ï¶rî ìï4î À îSîoîŸîˆî ë î) î1Zî>p î ìï�î £ î ìï î _îËyî¿ï^îöî.îÞîî,Cî-óî3î4² îAYîòï ¶ î!™rî ìï 5î _îË wî)eïÿ˜TVm$–î=îíî$¬î-î3î‘ï3¹î! î‘ï2î!èî‘ï0fî! î‘ï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];19yî—ïb6îÅî!Mî0{î8rî ìï_ºî _îË yî¿ï^î¿ï\hî¦rî ìïYëî _îË îîî‹îëî"”î%Ûî'‰î.nî0Îî4+î9Žî<µî?¢yî¿ïV™ î¿ïTñî.îµ î%„î)¼î2+î4²î=!îD¸îòïSIîR î#Iî%Ðî.?î5Öî¿ïO÷î‘ïNOîî$oî¿ïJýîÎîÞî‘ïITîQî"Àî+/î:]î¿ïFîÎî‘ïDYîî¿ïAîVî�î¿ï< îµîíî‘ï:dî‘ï8» îˆî 8î#˜î&î-¶ î7Õî<åî‘ï7 îˆî 8î#˜î&î-¶ î7Õî<åî‘ï5i îˆî 8î#˜î&î.Ž î8­î>”î‘ï3Àî¿ï0n îeî�î‘ï.Æî‘ï-î,îdï+t î"ƒ îdï)Ë î!«î7˜îdï("î Óîdï&y î"ƒî%ã îdï$ÐîK î‘ï#'î¿ïÖ îî=îíî!M î¿ï- îî=îíî$¬î-î3î‘ï„î! î‘ïÛî!èî‘ï2î! î‘ï‰î!èî‘ïàî! î‘ï7î"Àî¿ï= îµîíî�î"ü î¿ï ” îµî�î#Ôî%„î+kî‘ï ëî¡î`î!î‘ï Bwî)eïÿQTVm$~,î î8½î7ïD î#öî%¦î7ïBZîdï@¬î‘ï>ýî¿ï;¡î.îÅî‘ï9òî‘ï8Dîyî!èî#˜ð!î‘ï6–îyî!èî#˜ð!î‘ï4çîyî)î‘ï39î¡îØî"ÀîÅï1’ îdï/ãîìîûî$3î*òî,¢îdSRHCStateRef: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.20yî¿ïaˆ î�îÅî uî#Ô î¿ï_× î�îÅî uî&\î‘ï^'î)î!èî#˜î‘ï\wî¿ïY îÞ î"$î#Ôî*“î‘ïWfîÉî& î‘ïU¶î¡îØîˆî.Žî6ýî< îBÌîÅïT î‘ïR^îîÉî'Ïî0> î< îÅïP· î# î.î;� îÅïO î#ä î‘ïM_ îˆî&÷îdïK¯îtî Óî%ãî*î-zî3aî‘ïIÿîîÉî'Ïî0> î< îÅïHX î# î/²î=1 îÅïF°î‘ïEî¿ïA  î�î"üî$¬î‘ï?ïî(§î*Wî-¶ î‘ï>?î(§î*Wî-¶ î‘ï<�î¿ï9.î= î&\î( î‘ï7~îîØîdï5Îîdï4îK î)Bî*òî.Rîdï2mî-zî/)îdï0½îtî!«î=€ î˜ï/î,î î8½î7ï-fî#öî%¦î7ï+µîdï*î‘ï(Uî¿ï$ôî.îÅî‘ï#Dî‘ï!”îyî!èî#˜ð!î‘ïäîyî!èî#˜ð!î‘ï3îyî)î‘ïƒî¡îØî"ÀîÅïÜ îdï+îìîûî$3î*òî,¢îdï{îKîûî(jîdïËî‘ïî¿ïº îîîÅî"$ î¿ï Z îeî¿ï ùwî)eïýÿ‡TVm$î" ïF¦î$‘î&Aî6Gî(=ïDÿ qî4 ïDÿî4vïDÿuî5RïDÿî6*ïDÿqî(=ïCWuî)ƒïCWî*[ïCWî2Ê î<î(=ïA°qî5¼ïA°î6%ïA°uî7ïA°î7Ú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~îdïTÓî#îdïS)îKî-z î7˜ îD?î˜ïQ�î!÷î1%î2ÕîdïOÖî#î/) î9Hî@î‘ïN,î¿ïJÖî~îµî�î%„ î1S î‘ïI,îdïG�îìî‘ïEÖqîdïD+yî7ïB�î"Fqî'VïB�î(*ïB�yî*gïB�î7ï@Öî!nî#qî7ï?+yî ï?+î âï?+qî"’ï?+î#]ï?+î)3yî*ïï?+î+Çï?+qî0Öï?+î1¼ï?+yî" ï=�î&Aî'ñqî" ï;Öyî#–ï;Öî%Fï;Öî&öqî*Vï;Öî+ï;Öî&Üï:+yî&Üï8€î+qî,Äï8€î--ï8€yî. ï8€î.âï8€qî<`ï8€î<Êï8€yî=¦ï8€î>~ï8€ î&Üï6Öî)dî+î;îC‰î-ï5.î2î7/ qî&Üï3„î" ï1Ùyî%>ï1Ùî&ï1Ùî)vî+%î" ï0.î$‘î&Aî6Gî(=ï.‡ qî4 ï.‡î4vï.‡yî5Rï.‡î6*ï.‡qî(=ï,àyî)ƒï,àî*[ï,àî2Ê î<î(=ï+8qî5¼ï+8î6%ï+8yî7ï+8î7Úï+8 îC¨î(=ï)‘î-Mî2\î7kî<{îC:qî(=ï'êyî)ƒï'êî*[ï'ê qî4zï'êî4äï'êyî5Àï'êî6˜ï'ê qî" ï&?yî'«ï&?î‘ï$”î¿ï!?}î‘ï”yîzï”qî*ï”îÑï”yî·ï”îŽï”qî"ï”î"áï”yî(Mï”qî)ýï”î*Ñï”yî/îï”î0Æï” î=lîdïéqî<ïéîïéyîŽïéqîfïéyî"Œïéî#dïé î/2î0âî¿ï>î¿ïéîVî�î uî&\ îòïBð#î‘ï—îdïìîtî$3î%ãî‘ïBîdï—îìî#î#[î'’î)Bî/)î0Ùî3aî6Áîdïìîìî#î#[î(jî*îdï AîKîûî‘ï —wî)eïöÿ TVm$NsterCellClass[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],22uî˜ïb6î%Wîdï`‰îû î+Êî1±î8pî=€îB�îCEDARreports: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;22yî¿ïb6î‘ï`‡î)î 8î&÷î)î.Žî5Mî7ÕîETîdï^Ø î!«î*î2‰î¿ï])î¿ïYÊ îî=î‘ïXîdïVlîKî#[îdïT½î#î$3îdïS îtîdïO¯î#î-zî49î:øîdïNît î)Bî0î5î: î@î˜ïLYî%WîdïJ©îû î+Êî1±î8pî=€îB�î˜ïIî#§î(¶î,îî‘ïGSrî ìïDÐî îCîâî›îRîîõî!áî$˜î'ßî*ùî-Mî/¬î5î6Ô yî¿ïArî¿ï?Âî.îµ î%„î)¼ î5Šî8î@�îòï>îRî± î&¨î)0î1Ÿî96î¿ï:½î‘ï9 îî$oî'Ï î1î6% î¿ï5¯î.î=î‘ï4îQî"Àî+/î.Ž î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î)eïö¦TVm$î)eïöÿÎTVm$îdïL îKî‘ïJ÷î¿ïG¤ îî=îíî!MRegisterCells: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]]];};23yî¿ïb6 îeî�î‘ï`‹î‘ï^àî,îdï]5 î"ƒ îdï[Š î!«î7˜îdïYßî ÓîdïX4 î"ƒî%ã îdïV‰îK î‘ïTÞî,îdïS3 î"ƒ îdïQˆ î!«î9HîdïOÝî ÓîdïN2 î"ƒî%ã îdïL‡îK î‘ïJÜî, îdïI1 î"ƒîdïG† î!«î˜ïEßîdïD4î Ó îdïB‰ î"ƒî%ãîdï@ÞîK î‘ï?3î, îdï=ˆ î"ƒîdï;Ý î!«î0îdï:2î Óîdï8‡ î"ƒîdï6ÜîKî‘ï51î¿ï1Û îî=îíî!M î¿ï00 îî=îíî$¬î-î3î‘ï.…î! î‘ï,Úî!î‘ï+.î! î‘ï)ƒî!î‘ï'Øî! î‘ï&-î!èî‘ï$‚î! î‘ï"×î"Àî¿ïÖ îÞ î"$î#Ôî*“î‘ï+îQîˆî 8î0>î8­î=¼îÅï„îÔ î‘ïÙîîÉî'Ïî0> î< îÅï2 î# î)Ëî7I îÅïŠ î#äî1bî9ÑîÅïãî(óî*£î‘ï8îîÉî'Ïî0> î< îÅï‘ î# î)Ëî7I îÅïé î#äî1bî9ÑîÅï Bî(óî*£î/²î‘ï —wî)eïÿKTVm$p1: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];24uî‘ïb6î! î‘ï`‹î!èî‘ï^áî! î‘ï]6î"Àî¿ïX5 îeî�î!Mî$¬ î¿ïV‹ îeî!Mî%„î'4î-î‘ïTàîî‘ïS5î¿ïOà î� î#Ôî%„î,Cî‘ïN5îÉî&î‘ïLŠ îˆî&÷îdïJßîtî"ƒîdïI4îœîKîdïGŠîÄîKî%ãî(jî.Rî7ïEßî!nî#î7ïD4î¿î!nî#î&~î" ïB‰î" ï@ßî&Aî'ñî7÷ î" ï?4î$‘î&Aî6Gî>¶îCÆî(=ï=Œî-M î" ï;âîCreateSRWCIO: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]=24yî¿ïb6 î�î"üî$¬î‘ï`�î(§î*Wî-¶ î‘ï^äî(§î*Wî-¶ î‘ï];î¿ïYé îîîÅî"$ î¿ïV— îµîíî�î"ü î¿ïTî îµîíî�î&\î.Ëî4²î‘ïSEî! î‘ïQœî!î‘ïOóî! î‘ïNJî!î‘ïL¡î! î‘ïJøî!èî‘ïIOî! î‘ïG¦î"Àî¿ïB« îeî�î!Mî$¬ î¿ïA îeî!Mî%„î'4î-î‘ï?Yîî‘ï=°î¿ï:^ î� î#Ôî%„î,Cî‘ï8µîÉî&î‘ï7 îˆî&÷îdï5cîtî"ƒîdï3ºîœîKîdï2îÄîKî%ãî(jî.Rî7ï0hî!nî#î7ï.¿î¿î!nî#î&~î" ï-î" ï+mî&Aî'ñî7÷ î" ï)Åî$‘î&Aî6Gî>¶îCÆî(=ï(î-M î" ï&tî7ï$Ëî!nî%¦î'Vî7ï#"î¿î!nî1tî9ã î#jï!{î3p î>g î#jïÔî**î7¨îEþî#jï,î(zî-‰î2™î7¨î>gî#jï… î0î7ïÜî‘ï3î¿ïáî=î$¬î&\î‘ï8î(§î*Wî-¶ î‘ï�î(§î*Wî-¶ î‘ïæî¿ï ” îµîÅî uî#Ô î¿ï ë îµî"$î‘ï Bî)î`î"Àî+/î1îî?lwî)eïö©TVm$•Šî‘ï ”î! î‘ï ëî!î‘ï Bî! xî)eïö{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:25yîdïb6î#î#[ î0î1±î¿ï^ä î�îÅî uî#Ô î¿ï]< î�îÅî uî'4î/£î5Šî‘ï[“î! î‘ïYêî!î‘ïXAî! î‘ïV˜î!î‘ïTïî! î‘ïSFî!èî‘ïQ�î! î‘ïOôî"Àî¿ïJúîî!Mî"üî&\î¿ïIQîî!Mî"üî(äî‘ïG¨î¡î`î!î‘ïEÿî¿ïB­îî%„î'4î‘ïAî(§î*Wî-¶î‘ï?[î(§î*Wî-¶î‘ï=²î¿ï:aîÅ î(äî*“î‘ï8¸îîØîdï7îdï5fîKî+Êî-zî0Ùîdï3½î-zî/)îdï2î‘ï0kî¿ï- îµî!Mî‘ï+qî‘ï)Èîy î$oî&ð!î‘ï(îy î$oî&ð!î‘ï&vîyî)î‘ï$Íî¡îØî"ÀîÅï#&îdï!}îìî#î#[î'’î)Bî/)î0Ùî3aî6ÁîdïÔîìî#î#[î(jî*îdï+îKîûîdï‚î‘ïÙî¿ïˆ î�î�î!Mî$¬ î¿ïß îµî"$î‘ï6î)î 8î&÷î)î.Žî5Mî7ÕîETîdï� î!«î*î2‰î¿ï;î î&\î( î.Ëî‘ï ’îyî°î`î/fî7Õî<åîD|îÅï ë î‘ï Bî¡îØîˆî.Žî6ýî< îBÌwî)eïýÿàTVm$�î/)îdï=°î‘ï<î¿ï8´ îµî!Mî‘ï7 î‘ï5bîy î$oî&ð!î‘ï3¹îy î$oî&ð!î‘ï2îyî)î‘ï0gî¡îØî"ÀîÅï.Àîdï-îìî#î#[î'’î)Bî/)î0Ùî3aî6Áîdï+nîìî#î#[î(jî*îdï)ÅîKîûîdï(î‘ï&sî¿ï#! î�î�î!Mî$¬ î¿ï!x îµî"$î‘ïÏî)î 8î&÷î)î.Žî5Mî7ÕîETîdï& î!«î*î2‰î¿ïÔî î&\î( î.Ëî‘ï+îyî°î`î/fî7Õî<åîD|îÅïƒ î‘ïÚî¡îØîˆî.Žî6ýî< îBÌîÅï3 î‘ïŠîQîˆî 8î0>î8­î=¼îÅïãîÔ î‘ï:î¡îØîˆ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];26yîÅïb6 î‘ï`…îQîˆî 8î0>î8­î=¼îÅï^ÞîÔ î‘ï]-î¡îØîˆî.Žî6ýî< îBÌîÅï[† î‘ïYÕî¡îØîˆî.Žî6ýî< îBÌîÅïX.î‘ïV}îîÉî'Ïî0> î< îÅïTÖ î# î-+î:©îÅïS. î%”î.î‘ïQ~îîÉî'Ïî0> î< îÅïOÖ î# î,Sî9Ñ îÅïN/ î# î. î‘ïL~îîÉî'Ïî0> î< îÅïJ× î# î+{î8ù îÅïI0 î$¼ î/² î9ÑîÅïGˆ î‘ïE×î¿ïBvî=î!Mî"üî&\ î¿ï? îeî¿ï;³rî ìï9.îiîÇ îÎî"” î*Bî-3î/íî6Sî8”î;9 îBmîF´îHeî ìï7‡î2î/î†îñyî ï7‡î óï7‡rî)bï7‡î)Ûï7‡î+Ëî.šî3Ñî7‘î:yî¿ï4&î¿ï2uîöîÞî= î%„î*“î-óî2+î6bî¿ï/ îîíî‘ï+²î)î 8î%Gî3žî6%î9…qî¿ï(Pyî‘ï& ~î¿ï#> yî�ï#>qî@ï#>î ï#>î » yî(Àï#>qî¿ïÜîÛyîkïÜîCïÜî¿ï{ qîeï{îï{yî¼ï{qî lï{î!@ï{yî#ï{î#ôï{î¿ïÊqîíïÊî¦ïÊyî ÚïÊ}î¿ïiyîïiqîÏïiîvïiyî\ïiî3ïiîî#*î$Ú î.ùî4àî9ïî;ŸqîC6ïiîD ïiyîòïÁî*î‘ï`qîyï`î2ï`yîÐï`î€ï` î)v î‘ï¯qîyï¯î2ï¯yîÐï¯î€ï¯î&ï }î¿ï Nyî÷ï Nqî§ï NîOï Nyî4ï Nî ï Nî î*Áqî1�ï Nî2Lï Nyî7¸ï Nî8�ï N}î¿ï �yîï �qîÏï �îvï �yî\ï �î3ï �îCwî)eïýÿITVm$4#þuîï#þqîÏï#þîvï#þuî\ï#þî3ï#þîî#*î$Ú î.ùî4àî9ïî;ŸqîC6ï#þEND.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:27qî¿ïbfyîFïbfrî ìï_çî —î÷îŸîXî· î§î/Áî2lî8�î:ˆyî¿ï\’î¿ïZèîöîÞî= î%„î*“î-óî2+î6bî¿ïW’îV î�î!Mî2+î9 îCàrî ìïUî Åî.îNî úî#Çî)çî+ãî/Ûî12î6–î<î=Éî@˜îB÷ î ìïSmîªî îýîÞî>î,î!äî&Íî(† î ìïPïîöîUî¿î"Ýî%‰î)2î,°î17î2Žyî¿ïM™î¦ rî ìïIqî LîsîèîH î³îQî šî!ðî&lî)#}î¿ïFyîGïFîïF î¿ïBÆî~ î¿ïAîö î¿ï?qî¦îî�î¿ï=Æî~ î¿ï<îö î¿ï:qî¦îî�î¿ï8Çî~ î¿ï7îö î¿ï5qî¦îî�î¿ï3Çî~ î¿ï2îö î¿ï0qî¦îî�rî ìï,Iî LîâîBî¤î]î ½yî%…ï,Iî&]ï,I rî/¤ï,Iî0kï,I}î¿ï(óyîï(óî÷ï(óî¿ï%žî¿ï#ôî~ î¿ï"Iîö î¿ï žî¦îî�î¿ïôî¿ïIî¿ïŸî~î¿ïôîöî¿ïIî¦îî�î¿ïŸî~î¿ïôîöî¿ïJî¦îî�î¿ïŸî~î¿ïôîöî¿ïJî¦îî� rî ìï !î ° îIî¨wî)eïöÿ�TVm$¯B&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}î¿ïa‘yîïa‘îÏïa‘îÞîŽî4³ îòï_éîòï^Bð*î¿ïZóî~î=î"$ î,Cî3î7: îòïYL î î)0 î3OîòïW¥ îî$ø î/î4'î96 îòïUý rî ìïQÛîöîŸî²îÛîæîžî"³î&}î(„î+Rî/äî3 î44î9‹î;’î=ñ}î¿ïNŒyîïNŒîÏïNŒîÞîŽð%î:šî?ªîòïLåîÚîéî¿ïI– îÞ î"ü î-ó î8î;q îòïGïîa î'€î5Ö îòïFHî$ }î¿ïBùyîïBùîÏïBùî.îÞð0îB1îòïARî‰î"qî'€î¿ï<\î~î.î î&\î+k rî ìï9áî äî�îuîÑî$îd}î!ï9áî!æï9árî#–ï9áî$�ï9áî'8î*qî,î0Êyî4Zï9áî52ï9árî9iï9áî:ï9áyî<ï9áî<õï9árîA,ï9áîA�ï9áîB×îE3î ìï89îH}îï89îèï89rî˜ï89îï89îîØîî$æî'¸î+1î0„î4Iî9zî< î?°îBºîGáî ìï6’îî Ôî#hî%æî'àî,¾î.Íî3ëî6Áî7óî:‡î?eîCÿî ìï4ëî ) wî)eïÿ¹TVm$s ÿGACHAþŸÿ TIMESROMANþŸÿ HELVETICAþŸÿ TIMESROMANþŸÿ TIMESROMANýÌÿLOGOü´ÿLAURELþŸÿ TIMESROMANþŸÿ TIMESROMANþæÿ TIMESROMANþYÿGACHAþ ÿGACHAþŸ ÿGACHAþŸ ÿ HELVETICAþæ ÿGACHAþæ ÿGACHAþŸÿ TIMESROMANþŸÿ HELVETICAþŸÿ TIMESROMANþŸÿ TIMESROMANýÌÿLOGOü´ÿLAURELþŸÿ TIMESROMANþŸÿ TIMESROMANþæÿ TIMESROMANþY$ aü" , ö6‹E ³QW Ba£q | 4‡ Æ“ X  ^ª9¯F´¹X½<ÁªÆ$ËéÐÔòÙ&Þâ¯æÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ Rosemary.doc21-Mar-83 14:40:19j/é皦L1ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ Rosemary.doc21-Mar-83 15:22:25