Lab 5 - FL13 - ECE 198 JL - University of Illinois - Engineering Wiki

You may need to firs t s elec t the main tab in the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: _x or is s elec ted in the top pane and c lic k Sim ula te on the left. You may need to firs t s elec t the 'Main' tab in the left pane before y ou c an s ee the 'Simulate' button. b. Sinc e this is y our firs t time running this tool, Simulator Setup window will popup. Ac c ept default s ettings by c lic k ing OK. The Start ModelSim 6.6 window (s hown below) s hould pop up. If the window does not s tart, double-c lic k m y_x or in the Des ign Manager window and double c hec k that y our c irc uit matc hes the above diagram. If there is an path error generated in log window, go to des igner manager and s elec t tas k s /templates on the right. Right c lic k Models im Simulation, s elec t s ettings . W hen s etting windows pops up, c lic k Variables . A new window "s elec t us er variable" will pop up, ins ide "us er variable value", c hange the path into $HDS_HOME/modeltec h/linux /s oftware/mentor/ModelSim-SE-10.1d/modeltec h/linux 1. a. b. Clic k OK. You s hould now s ee the ModelSim window. 2. Choos e whic h s ignals to s imulate. a. W hile holding down the Ctrl k ey , c lic k on a, b, and f in the objec ts pane. b. Clic k the Add menu, then c lic k on W a ve , and then c lic k Se le cte d Signa ls. c . The right-mos t pane s hould c hange to s ay “wave – default” and will s how the three s ignals y ou c hos e on the left s ide. This s c reen is the one we will us e to tes t and debug our c irc uit to mak e s ure it behaves c orrec tly . 3. Create a s imulation s c ript In the trans c ript pane (at the bottom of ModelSim window), ty pe ge dit m y_x after the VSIM prompt to c reate the file my _x s imulation file and to open it in gedit editor. This .do file forc es the values of a and b to go through all pos s ible c ombinations of values that we s ee in the truth table. Enter the following tex t into editor, s ave and c los e it: fre/ 0@ oc a 0 fre/ 0@ oc b 0 fre/ [email protected] oc b 1 fre/ [email protected] oc a 2 fre/ [email protected] oc b 2 fre/ [email protected] oc b 3 The forc e c ommand us es the following s y ntax /[s ignal] [value] @[time in nanos ec onds ]. For ex ample, the firs t line tells the s imulator to forc e thevalue of s ignal a to have the value 0 at time 0 ns . Run the Simulation Close ge dit be fore you continue The s imulator window will freez e if y ou do not c los e the gedit after edit the do file. 1. Ty pe do m y_x at the VSIM prompt to tell the s imulator whic h .do file to run. Ty pe run 40 to tell the s imulator to run the s imulation for 40 ns . You s hould s ee s ome green lines s how up in the wave – default window. 2. Mak e y our waveform readable. In the “wave – default” pane, c lic k on the button in the top right with the box with an arrow pointing up and to the right (between the + and x buttons ) to undoc k the wave – default window. The wave window will grow s o y ou c an s ee the wave more eas ily . Right-c lic k any where on the wave window and c hoos e Zoom full to s ee the wave form more eas ily . Evaluate whe...
View Full Document

This document was uploaded on 03/22/2014.

Ask a homework question - tutors are online