DIRECTORY AMBridge, AMTypes, Commander, DM, DMDragonModel, DMMBusModel, DMPBusModel, DMSmallCacheModel, DMProcessorModel, DragOpsCrossUtils, IO, PrintTV, ViewerIO; DMDriver: CEDAR PROGRAM IMPORTS AMBridge, Commander, DM, DMDragonModel, DMMBusModel, DMPBusModel, DMSmallCacheModel, DragOpsCrossUtils, IO, PrintTV, DMProcessorModel, ViewerIO = BEGIN Display: PROC [dragon: DM.Component, out: IO.STREAM] = { tv: AMTypes.TV; FOR l: DM.ComponentList _ dragon.subComponents, l.rest WHILE l#NIL DO TRUSTED{tv _ AMBridge.TVForReferent[l.first]}; PrintTV.Print[tv: tv, put: out, depth: 1000, width: 1000, verbose: FALSE]; out.PutF["\n\n"] ENDLOOP; }; StartSimulation: Commander.CommandProc = { dragon, pbus, processor, mbus, sc: DM.Component; in, out: IO.STREAM; pbus _ DMPBusModel.Create[]; processor _ DMProcessorModel.Create[ LIST[ NEW [DMProcessorModel.ProcessorCommandRec _ [cmd: Store, adrs: DragOpsCrossUtils.IntToWord[1], data: DragOpsCrossUtils.IntToWord[1010]]], NEW [DMProcessorModel.ProcessorCommandRec _ [cmd: Store, adrs: DragOpsCrossUtils.IntToWord[2], data: DragOpsCrossUtils.IntToWord[2020]]], NEW [DMProcessorModel.ProcessorCommandRec _ [cmd: Fetch, adrs: DragOpsCrossUtils.IntToWord[1], data: DM.OnesWord]], NEW [DMProcessorModel.ProcessorCommandRec _ [cmd: Fetch, adrs: DragOpsCrossUtils.IntToWord[2], data: DM.OnesWord]]], pbus ]; mbus _ DMMBusModel.Create[]; sc _ DMSmallCacheModel.Create[pbus, mbus]; dragon _ DMDragonModel.Create[LIST[pbus, processor, mbus, sc]]; [in, out] _ ViewerIO.CreateViewerStreams["DMDriver"]; dragon.action[Reset][dragon]; BEGIN ENABLE DMProcessorModel.EmptyCommandList => GOTO Fin; DO FOR action: DM.Action IN [PhA..EvPhB] DO DM.Apply[dragon, action] ENDLOOP; ENDLOOP; EXITS Fin => DM.PrintHistory[dragon, out]; END; }; Commander.Register["StartSim", StartSimulation]; END. ²DMDriver.mesa Written By: Jean Vuillemin and Pradeep Sindhu Last Edited By: Pradeep Sindhu September 2, 1985 11:45:07 pm PDT Create the components and connect them up: ΚC˜šœ ™ J™-J™@—J™šΟk ˜ Icodešœ ˜ Kšœ˜Kšœ ˜ Kšœ˜Kšœ˜Kšœ ˜ K˜ K˜Kšœ˜K˜Kšœ˜Kšœ˜Kšœ ˜ K˜—šΟb œ˜KšœœQœ(˜ŸK˜K˜š Οnœœ œœœ˜8Jšœ œ˜š œœ.œœ˜EJšœ'˜.JšœCœ˜JJšœ˜Jšœ˜—K˜—K˜šžœ˜*Kšœ#œ ˜0Kšœ œœ˜K˜J™*J™Kšœ˜šœ$˜$šœ˜Kšœ†˜‰Kšœ†˜‰Kšœbœ ˜sKšœbœ ˜t—K˜Kšœ˜—Kšœ˜Kšœ*˜*Kšœœ˜?K˜Kšœ5˜5K˜Kšœ˜šœœ&œ˜;Kš˜Kš œ œœœœœ˜JKšœ˜š˜Kšœœ˜$——Kšœ˜K˜—K˜Jšœ0˜0K˜Kšœ˜—J™—…—"