Beruflich Dokumente
Kultur Dokumente
Fall Semester
Dr. Greg Tumbush, gtumbush@uccs.edu
Page 1 of 3
in the editor
Version 1.7
ECE 4242/5242
Fall Semester
5. Click on File->Save in either the main modelsim window or the undocked editor window.
6. In main modelsim window click on Compile->Compile All. In the transcript window you
should see Compile of Add_half.v was successful. If not fix any syntax errors.
7. Simulate
a. In the Transcript window type vsim novopt Add_half. In the transcript
window you should see # Loading work.Add_half
b. In the main modelsim window Click on View->Wave
c. In the Workspace window make sure the Sim tab is selected and click on
Add_half. This will show you all the signals at the Add_half level of hierarchy in
the Objects window.
d. Select all the signals in the Objects window and drag them to the wave window.
e. In the Transcript window type run 10ns
f. In the wave window click on View->Zoom->Zoom Full if the wave window is
undocked or type F. Note that your inputs are Z and outputs are X. This is
because the inputs are not driven. The wave window can be undocked by
clicking on the . button on the upper right hand side of the wave window.
g. In the Transcript window type the following
force a 0
force b 1
run 10ns
h. You should see signal a being driven to a 0, signal b being driven to a 1, and
the expected output is c_out = 0 and sum = 1.
8. To restart a simulation type in the Transcript window quit sim
9. To quit modelsim click on File->Quit
10. To open up an existing project do one of the following:
a. Start Modelsim, click on File->Open, in the Open File dialog box select Project
Files (*.mpf) in the Files of Type pull-down, select the project and click Open.
b. Browse to the location you specified in step 2 and double click on the project.
11. Notes:
Page 2 of 3
Version 1.7
ECE 4242/5242
Fall Semester
a. You must add signals before running the simulation or else the simulator will not
collect the data for you.
b. If you recompile any code or add signals to the waveform and want to re-run
type the following:
i. quit sim
ii. vsim novopt Add_half
iii. add your signals
iv. run
Page 3 of 3
Version 1.7