After the VHDL file is successfully compiled, select Tools -> Run Simulation -> RTL Simulation.
If you get a Native Link error, it means that the directory that you have provided under Tools -> Options -> EDA Tool Options is incorrect. You need to give the correct path here. Please see the section on Creating a New Project for more information.
If everything goes well, ModelSim opens up and you should see the following screen.
To simulate your design, expand the work directory as shown in the left the left hand side window.
Upon expanding, you will see the same entity name as you have assigned previously.
Right click on the the entity name and select Simulate.
Once simulated, the circuit input signals and output signals are populated in the Objects window (the blue window).
The next step is to provide input stimulus for each of the circuit inputs.
To apply stimulus to the first signal (X1), right click on X1 -> Modify -> Apply Wave.
Set the pattern to Clock, start time as 0 and end time as 1000. Put the time unit as picoseconds (ps). Click on Next.
Enter initial value as 0, clock period as 50 and duty cycle as 50. Time units must be ps. Click on Finish.
Upon clicking finish, the wave window shows the input X1 which keeps switching between logic 0 and logic 1.
Repeat the above steps for the second signal (X2) with everything the same except for Clock Period. Set the Clock Period to 85 ps and duty cycle as 35.
Now the wave window will have the two input signals.
For output signal, right click on F in the objects window and select Add Wave.
Output is added in the wave window. Output is generated once we run the simulation.
Set the Run Length to 1000 ps and click the Run button.
You will now see the output waveform for F.
Verify if the value of F matches with the truth table for all input combinations of X1 and X2.
This can be done by placing the cursor line of the wave and checking the value of F.
With this CAD simulations are now complete. You may now close ModelSim.
The next step is to test the design on actual hardware. For this, we need to program the FPGA board. Click here to learn more about setting up the FPGA.