![]() |
![]() |
![]() |
![]() |
Preparing the simulation
- Create a new directory for this exercise and copy the following VHDL (.vhd) files from \<install_dir>\modeltech\examples to the new directory.
- Make sure the new directory is the current directory. Do this by invoking ModelSim from the new directory or by using the File > Change Directory command from the ModelSim Main window.
- Start ModelSim with one of the following:
vsimfor Windows - your option - from a Windows shortcut icon, from the Start menu, or from a DOS prompt:
modelsim.exe
Select "Proceed to ModelSim" if the Welcome dialog appears.
- Enter the following command at the ModelSim prompt to create a new library:
vlib library_2- Compile the source files into the new library by entering this command at the ModelSim prompt:
vcom -work library_2 gates.vhd adder.vhd testadder.vhd- Now let's map the new library to the work library. To create a mapping you can edit the [Library] section of the modelsim.ini file, or you can create a logical library name with the vmap command:
vmap work library_2ModelSim modifies the modelsim.ini file for you.
- Start the simulator by selecting Design > Load Design from the Main window, or by clicking the Load Design icon. The Load Design dialog box is displayed, as shown below.
- Perform the following steps in the Load Design dialog box:
- Make sure that the simulator resolution is default.
- Look in the Design Unit scroll box and select the configuration named test_adder_structural.
- Click Load to accept the settings.
(PROMPT: vsim -t ns work.test_adder_structural)
![]()
- To open all of the ModelSim windows, enter the following command in the Main window at the VSIM prompt:
view *
- Drag and drop the top-level signals to the List window in the following manner: make sure the hierarchy is not expanded (no minus boxes), select all signals in the Signals window with Edit > Select All, then drag the selected signals to the List window.
(Signals MENU: View > List > Signals in Region) (PROMPT: add list *)
- To add top-level signals to the Wave window, enter the command:
add wave *
![]() Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |
![]() |
![]() |
![]() |
![]() |