ModelSim Simulation Tutorial

icon

2

pages

icon

Latin

icon

Documents

Écrit par

Publié par

Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres

icon

2

pages

icon

Latin

icon

Documents

Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres

ECE 4242/5242 Department of Electrical and Computer Engineering Advanced Digital Design Methodology University of Colorado at Colorado Springs Fal Semster "Illuminate, Investigate, Innovate" Dr. Greg Tumbush, gtumbush@uccs.edu  ModelSim Simulation Tutorial 1. Start ModelSim SE 6.6b There are many ways to access this tool: a. Download student version from http://www.model.com/resources/student_edition/student_default.asp b. PC’s in EN229 and 233. c. Access through RATS.  Instructions at http://www.eas.uccs.edu/it/EAS_Windows_hpC.shtml d. Access through LATS2. Instructions at http://www.eas.uccs.edu/it/EAS_linux_hpC.shtml 2. Create a new project a. Create a directory called Add_half in your workspace b. Click on File‐>New‐>project c. In pop‐up window fill in the Project Name field (ex: Add_half) d. Click on Browse to create the project in the desired location. (ex: C:/Documents and Settings/Greg/My Documents/UCCS/4242/Add_half) e. Click on OK 3. Add files a. In Add items to the Project pop‐up click on Add Exiting File or Create New File.  Since I’m creating Add_half from scratch I’ll click on Create New File. b. Fill in the File Name field (ex Add_half) and in the Add file as type pull‐down select verilog.  The correct file extension will be added. c. Click on Close 4. In the Workspace window of the main modelsim window double click on Add_half.v.  The file will open in an editor.  If you wish undock the editing window by clicking on  ...
Voir icon arrow

Publié par

Langue

Latin

New‐>project c. In pop‐up window fill in the Project Name field (ex: Add_half) d. Click on Browse to create the project in the desired location. (ex: C:/Documents and Settings/Greg/My Documents/UCCS/4242/Add_half) e. Click on OK 3. Add files a. In Add items to the Project pop‐up click on Add Exiting File or Create New File.  Since I’m creating Add_half from scratch I’ll click on Create New File. b. Fill in the File Name field (ex Add_half) and in the Add file as type pull‐down select verilog.  The correct file extension will be added. c. Click on Close 4. In the Workspace window of the main modelsim window double click on Add_half.v.  The file will open in an editor.  If you wish undock the editing window by clicking on  ..." />
ECE 4242/5242Department of Electrical and Computer EngineeringAdvanced Digital Design MethodologyUniversity of Colorado at Colorado SpringsFall Semester"Illuminate, Investigate, Innovate"Dr. Greg Tumbush, gtumbush@uccs.edu ModelSimSimulationTutorial1. StartModelSimSE6.6bTherearemanywaystoaccessthistool:a. Downloadstudentversionfromhttp://www.model.com/resources/student_edition/student_default.aspb. PC’sinEN229and233.c. AccessthroughRATS.Instructionsathttp://www.eas.uccs.edu/it/EAS_Windows_hpC.shtmld.AccessthroughLATS2.Instructionsathttp://www.eas.uccs.edu/it/EAS_linux_hpC.shtml2. Createanewprojecta. CreateadirectorycalledAdd_halfinyourworkspaceb.ClickonFile>New>projectc. InpopupwindowfillintheProjectNamefield(ex:Add_half)d. ClickonBrowsetocreatetheprojectinthedesiredlocation.(ex:C:/DocumentsandSettings/Greg/MyDocuments/UCCS/4242/Add_half)e. ClickonOK3. Addfilesa. InAdditemstotheProjectpopupclickonAddExitingFileorCreateNewFile.SinceI’mcreatingAdd_halffromscratchI’llclickonCreateNewFile.b. FillintheFileNamefield(exAdd_half)andintheAddfileastypepulldownselectverilog.Thecorrectfileextensionwillbeadded.c. ClickonClose4. IntheWorkspacewindowofthemainmodelsimwindowdoubleclickonAdd_half.v.Thefilewillopeninaneditor.Ifyouwishundocktheeditingwindowbyclickingonintheeditorwindow.Typeinthefollowingdata:De initionoaaa erusingprimitives moduleAdd_half(inputa,b,outputsum,c_out);xor(sum,a,b);and(c_out,a,b);endmodule5. ClickonFile>Saveineitherthemainmodelsimwindowortheundockededitorwindow.6. InmainmodelsimwindowclickonCompile>CompileAll.Inthetranscriptwindowyoushouldsee“CompileofAdd_half.vwassuccessful”.Ifnotfixanysyntaxerrors.7. Simulatea. IntheTranscriptwindowtype“vsim–novoptAdd_half”.Inthetranscriptwindowyoushouldsee“#Loadingwork.Add_half”Page1of2ModelSimSimulationTutorialVersion1.3
ECE 4242/5242Department of Electrical and Computer EngineeringAdvanced Digital Design MethodologyUniversity of Colorado at Colorado SpringsFall Semester"Engineering for the Future" b. InthemainmodelsimwindowClickonView>Wavec. IntheWorkspacewindowmakesuretheSimtabisselectedandclickonAdd_half.ThiswillshowyouallthesignalsattheAdd_halflevelofhierarchyintheObjectswindow.d. SelectallthesignalsintheObjectswindowanddragthemtothewavewindow.e. IntheTranscriptwindowtyperun10nsf. InthewavewindowclickonView>Zoom>ZoomFullifthewavewindowisundockedortypeF.NotethatyourinputsareZandoutputsareX.Thisisbecausetheinputsarenotdriven.Thewavewindowcanbeundockedbyclickingonthebuttonontheupperrighthandsideofthewavewindow.g. IntheTranscriptwindowtypethefollowingorcea0forceb1run10nsh. Youshouldseesignal“a”beingdriventoa0,signal“b”beingdriventoa1,andtheexpectedoutputis“c_out”=0and“sum”=1.8. TorestartasimulationtypeintheTranscriptwindow“quit–sim”9. ToquitmodelsimclickonFile>Quit10. Toopenupanexistingprojectdooneofthefollowing:a. StartModelsim,clickonFile>Open,intheOpenFiledialogboxselectProjectFiles(*.ini,*.mpf)intheFilesofTypepulldown,selecttheprojectandclickOpen.b. Browsetothelocationyouspecifiedinstep2anddoubleclickontheproject.11. Notes:a. Youmustaddsignalsbeforerunningthesimulationorelsethesimulatorwillnotcollectthedataforyou.b. Ifyourecompileanycodeoraddsignalstothewaveformandwanttoreruntypethefollowing:i. quit–simii. vsim–novoptAdd_halfiii. addyoursignalsiv. run
Page2of2ModelSimSimulationTutorialVersion1.3
Voir icon more
Alternate Text