


1.2 Source the setup file and run ModelSim

Note: You will need to do this step for only the first time using the tool. Create a new working directory for ModelSim and name it, then descend into that directory using the following command lines: > mkdir ModelSim_ StudentNumber In your home directory, open a new shell.
DO FILE MODELSIM HOW TO
The objective of this section is to learn how to get the environment ready for the tool, take care of the licensing issues, and start the tool. 1 Environment Setup and starting ModelSim
DO FILE MODELSIM SOFTWARE
ModelSim is an HDL simulation software from Mentor Graphics.

Will re-play all the commands in the file.~ Ajith S Ramani and Abdelrahman 10/2016 ~ Then in the command line of ModelSim run the following command. The transcript file and save the file with an extension of. Transcript file starts its lines with “#” for information messages,
DO FILE MODELSIM SIMULATOR
–freeze sim://clock_name 1 0, 0įact all your commands are kept in the transcript window AND in a transcriptįile can be edited and used as INPUT to the simulator so you do not have to You can see the command there as you set up the Should be able to feed the clock parameters in the pop up.Ĭlock in the transcript window. Perform interactive debugging of the macro file. The pause command placed within a macro interrupts the execution Wild carding for signal names is allowed. You start to type, help is provided in the transcript window with the required Simulated including a list of all design units with the names of their source The write report command prints a summary of the design being View the results of a previous simulation run. The vsim command is used to invoke the VSIM simulator, to
DO FILE MODELSIM CODE
The vcom command compiles the source code into a specified You to perform interactive debugging of the macro file. The pause command placed within a macro interrupts the The restart command reloads the design elements and resets The noforce command removes the effect of any active force The help command displays in the Transcript pane a brief The value of a constant, generic or a variable.ĭelete command removes object from either list of wave window.Ĭommands contained in a macro file or the do file as it is commonly known to The simulation by the specified number of timesteps. Simulation log file in the transcript windowīasic commands can be typed into the transcript window with the followingĪdds all the signals and variables to the wave window.Ĭommand allows you to apply stimulus interactively to the VHDL signals. The available commands at the top of the window change, and you can see the Click on the work library, then click onĬlick OK Basic Simulation Commands The simulator will now start. Simulating Click simulate à start simulation On your file in the workspace window and then Compile à Compile SelectedĬan see the green check mark in the workspace window and the good message in You can type in the file name or, use the browser, as shown Click OK The modelsim window should look Leave the default “reference existing file” rather than copying it. Click on “Add existing File” then browse to your file. Click OK Since this is a new project, it will ask you to put some files in it. Location and default library name are set up for you. Click on File à New à Project The new project window should popup Fill in a name for your project (traffic_light_project) note the Sourcing the script $CLASS/setupfiles/setup_all Start Modelsim > vsim The modelsim window should come upĪnd look like Libraries and Projects Modelsim uses the concept of The Mentor Graphics Modelsim environment should be setup by Copy this file to a new directory, and then cd to this new diretory Setting up the environment Will use the traffic light controller, traffic_light.vhd from the previous Should end with an extension of “.v” and for vhdl it should end with “.vhd” For this example we Graphics ModelSim SE-64 6.4 Coding the design You can code up your design in Verilog or vhdl. Tutorial 6: Simulation This material is by Steven Levitan and Akshay Odugoudarfor the environmentĪt the University of Pittsburgh, 2008/2009.
