ug_gs_msa_qii (1162599), страница 2
Текст из файла (страница 2)
For Start Time, enter 0, for End Time, enter 120, and for Time Unit, enter ns.5. Click OK to invert the waveform. Figure 1–7 shows the inverted waveform.Figure 1–7. Inverted Waveform for reset Signal (0–120 ns)Starting SimulationTo start the simulation, follow these steps:1. Expand the Work library, right-click counter and click Simulate.2. Drag the count signal from the Objects window to the Wave window.3. In the Transcript window, type the command run –all r.June 2011Altera CorporationGetting Started with Quartus II Simulation Using the ModelSim-Altera Software1–8Getting Started with Quartus II Simulation Using the ModelSim-Altera SoftwareExporting Created Stimulus Waveforms as an HDL TestbenchAfter you type the run -all command, the example counter design is simulated withthe created stimulus waveforms for the clk and reset signals.
The clk signal is acontinuous clock waveform. The reset signal is asserted for the first 120 ns. When thereset signal is deasserted after 120 ns, the counter begins to increment, once on eachrising edge of clk.The output signal count produces the simulated waveform, in theWave window, adjacent to the stimulus waveforms.Exporting Created Stimulus Waveforms as an HDL TestbenchAn HDL testbench file is typically written in the same hardware description languageas your design, and interacts with your design as an instantiated module.
An HDLtestbench file is conceptually similar to a waveform like the one created in “CreatingStimulus Waveforms” on page 1–4, but because it is written in HDL, it is able toaccommodate more complexity and flexibility than a graphical waveform.The stimulus waveforms you created for the simulation can be exported as a HDLtestbench file. You can then use the HDL testbench file to simulate your design againwithout manually recreating the stimulus waveforms.To export the stimulus waveform as an HDL testbench, perform the following steps:1. Click in the Wave window to ensure it is active.2. On the File menu, point to Export and then click Waveform.
The ExportWaveform dialog box appears (Figure 1–8).Figure 1–8. Export Waveform Dialog Box3. In the Export Waveform dialog box, under Save As, select Verilog Testbench.4. For Start Time, enter 0, for End Time, enter 5000, and for Time Unit, enter ns.5. In the File Name box, type the name of your testbench or click the Browse button.6. Click OK.Your testbench will be created in your <Quartus II projectfolder>\simulation\modelsim folder. You can use the testbench file for thesimulation of your Quartus II design.Getting Started with Quartus II Simulation Using the ModelSim-Altera SoftwareJune 2011Altera CorporationGetting Started with Quartus II Simulation Using the ModelSim-Altera SoftwareExporting Created Stimulus Waveforms as an HDL Testbench1–9You can use NativeLink in the Quartus II software to start the ModelSim-Alterasoftware, where you simulate your design with the exported testbench file.f For more information about setting up the testbench with NativeLink, refer to“Setting Up Testbench Files Using the NativeLink Feature” in Simulating AlteraDesigns.June 2011Altera CorporationGetting Started with Quartus II Simulation Using the ModelSim-Altera Software1–10Getting Started with Quartus II Simulation Using the ModelSim-Altera SoftwareExporting Created Stimulus Waveforms as an HDL TestbenchGetting Started with Quartus II Simulation Using the ModelSim-Altera SoftwareJune 2011Altera CorporationAdditional InformationThis section provides additional information about the document and Altera.Document Revision HistoryThe following table shows the revision history for this document.DateVersionJune 20111.0ChangesInitial release.How to Contact AlteraTo locate the most up-to-date information about Altera products, refer to thefollowing table.Contact (1)Contact MethodTechnical supportTechnical trainingAddressWebsitewww.altera.com/supportWebsitewww.altera.com/trainingEmailProduct literaturecustrain@altera.comWebsitewww.altera.com/literatureNon-technical support (General)Emailnacomp@altera.com(Software Licensing)Emailauthorization@altera.comNote to Table:(1) You can also contact your local Altera sales office or sales representative.Typographic ConventionsThe following table shows the typographic conventions this document uses.Visual CueMeaningBold Type with Initial CapitalLettersIndicate command names, dialog box titles, dialog box options, and other GUIlabels.
For example, Save As dialog box. For GUI elements, capitalization matchesthe GUI.bold typeIndicates directory names, project names, disk drive names, file names, file nameextensions, software utility names, and GUI labels. For example, \qdesignsdirectory, D: drive, and chiptrip.gdf file.Italic Type with Initial Capital LettersIndicate document titles. For example, Stratix IV Design Guidelines.Indicates variables. For example, n + 1.italic typeVariable names are enclosed in angle brackets (< >).
For example, <file name> and<project name>.pof file.Initial Capital LettersJune 2011Altera CorporationIndicate keyboard keys and menu names. For example, the Delete key and theOptions menu.Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User GuideInfo–2Additional InformationAdditional InformationTypographic ConventionsVisual Cue“Subheading Title”MeaningQuotation marks indicate references to sections within a document and titles ofQuartus II Help topics.
For example, “Typographic Conventions.”Indicates signal, port, register, bit, block, and primitive names. For example, data1,tdi, and input. The suffix n denotes an active-low signal. For example, resetn.Courier typeIndicates command line commands and anything that must be typed exactly as itappears.
For example, c:\qdesigns\tutorial\chiptrip.gdf.Also indicates sections of an actual file, such as a Report File, references to parts offiles (for example, the AHDL keyword SUBDESIGN), and logic function names (forexample, TRI).rAn angled arrow instructs you to press the Enter key.1., 2., 3., anda., b., c., and so onNumbered steps indicate a list of items when the sequence of the items is important,such as the steps listed in a procedure.■ ■Bullets indicate a list of items when the sequence of the items is not important.■1The hand points to information that requires special attention.hA question mark directs you to a software help system with related information.fThe feet direct you to another document or website with related information.cA caution calls attention to a condition or possible situation that can damage ordestroy the product or your work.wA warning calls attention to a condition or possible situation that can cause youinjury.The envelope links to the Email Subscription Management Center page of the Alterawebsite, where you can sign up to receive update notifications for Altera documents.Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User GuideJune 2011 Altera Corporation.















