This will run your simulation for 100 nanoseconds. To run the simulation, click the Icon with a little piece of paper and a down arrow next to the 100 ns time. All of the test bench signals have been added as signals your can monitor. You can also click and drag signals to the waveform window from other windows in Modelsim.
To do this, right click on and_gate_tb in the sim window and click Add Wave. The ModelSim-Intel FPGA edition software is a version of the ModelSim software targeted for Intel FPGAs devices. In this example, we will monitor all of the signals in the test bench. The next figure shows you what your waveform view looks like, but first you need to add some signals to monitor. It shows how your module reacts to different stimulus. The waveform view contains waves (binary 0's and 1's, hexadecimal digits, binary digits, enumerated types, etc) for all of the signals in your design. Now, the majority of the time that you use Modelsim will be spent looking at the waveform view. Modelsim Simulation Window - Simulation ReadyĪlmost there! The simulation is ready and waiting. You are greeted with a window that looks like this
Copy the code below to and_gate.vhd and the testbench to and_gate_tb.vhd. The VHDL code creates a simple And Gate and provides some inputs to it via a test bench. The actual code is not important, so if you are learning Verilog that's OK! You don't need to know VHDL for this tutorial. The code that we will be simulating is the VHDL design below.
Clicking on an existing license request link from your browser bookmark or from a link posted on the web will not work. At the end of the installation you must select Finish and a browser window will open with the License Request form. Note that you will need to request a license from Mentor Graphics. Perform the installation with the default parameters.
Let's get started.ĭo you have Modelsim downloaded and installed on your computer? Get it here. Did you forget an if statement somewhere? Did you remember to give every possible case statement assignment? These are the types of errors that are very easy to make when you do not simulate your design. A great simulation will exercise all possible states of the design to ensure that all input scenarios will be handled appropriately. Simulation allows the designer to stimulate his or her design and see how the code that they wrote reacts to the stimulus.
Simulation is a critical step of designing FPGAs and ASICs.
This tutorial explains first why simulation is important, then shows how you can acquire Modelsim Student Edition for free for your personal use. It is the most widely use simulation program in business and education. Modelsim is a program created by Mentor Graphics used for simulating your VHDL and Verilog designs. ModelSim SE is compatible with 32-bit and 64-bit platforms.Tutorial - Using Modelsim for Simulation, for Beginners. ModelSim SE supports the VHSIC Hardware Description Language (VHDL) and Verilog.įor the debugging process, the design team is allowed to perform post-simulation debugging and is provided with tools for source annotation, hyperlinked navigation, C debugging, assertion thread debugging and advanced FSM debugging. The software’s general components include an HDL editor, a project management system, source code templates, compiled database and native-compiled architecture, and incremental compilation.
It is generally utilized for Field-Programmable Gate Array (FPGA) circuit design and Application-Specific Integrated Circuit (ASIC) design. The HDL environment enables the user, generally engineers, to test and debug an HDL model which are essential steps to ensure that the design of the HDL model will pass verification. The software is categorized as the large block/system simulation version of the software suite, whereas the two others that also belong to the simulation suite (ModelSim PE and ModelSim DE) are block/simulation system programs. ModelSim SE is the cross-platform edition of the ModelSim HDL (hardware description language) simulation software.