Sem 5‎ > ‎VHDL LAB‎ > ‎

02 Program, Compile & RUN

posted Aug 22, 2012, 11:52 AM by Neil Mathew   [ updated Aug 22, 2012, 12:01 PM ]

Step 1: Double click on the component to edit

Step 2: Type the program. Screenshot that of an AND gate component.

Step 3: Once the program is done, Look for the below toolbar. 
            The green tick on document icon basically compiles it (DesignChecker).

And if there are no errors, it should give this:

Step 4: Once that's done, look for the same toolbar and look for the M icon to start ModelSim Simulator.

Step 5: If you're starting ModelSim for the first time, you'll see this window. Just click ok.


Step 6: Now, the ModelSim window should appear.
            However, the Objects and Waveform window may not always appear with it.
            In such cases, Click VIEW from the menu and select Objects and Wave

Step 7: In the object window, add the signals to the Wave as shown:

Step 8: Next, either FORCE values to the signals or define a CLOCK.

            Right-click on a signal, 

            i) FORCE a value to a signal. Click Force. Then specify value.



            ii) DEFINE CLOCK for a signal. Click Clock. Then specify the period. 
                I find it easier to specify periods in multiples of 2. If a is set to 50, 
                then setting b to 100 gives a rather clear picture of the waves.


Step 9: Finally, Click the RUN button highlighted by the red circle. 
            The waves should appear then.