This process involves assigning the inputs and outputs to the FPGA board and, recompiling the design.
Note that the FPGA drivers will not work on machines running Microsoft Windows 11.
Go back to the Quartus window. Select Assignments -> Assignment Editor.
The following screen appears in a new window.
Double-click <<new>> under To. A Node Finder appears. It looks like binoculars. Click on it.
A blank Node Finder window opens.
Upon clicking List, all the circuit inputs and outputs are populated on the left hand side of the window.
Select only X1, X2 and F and move them to the right window using the > button found on the window. Use Ctrl + Mouse click to select the ones you require.
Click on OK. Now the assignment editor window shows the 3 I/O pins.
For X1, double click on Assignment Name and choose Location (Accepts Wildcards/Groups).
Drag the contents to the assignment names for X2 and F.
For Value. generally slide switches are assigned to inputs and LEDs are assigned to outputs.
For a complete list of slide switches and their pin assignment, refer to the DE2-115 User Manual. The manual can be found here.
For example, X1 and X2 are assigned slide switches SW0 and SW1 on the FPGA board. This corresponds to PIN_AB28 and PIN_AC28. Double click and enter the values.
Outputs are generally assigned to on-board LEDs. For example, F is assigned to LEDG0 which corresponds to PIN_E21.
Save the assignments using File -> Save.
If all your assignments are correct, your screen should look as follows.
Recompile the code using Processing -> Start Compilation.
If compilation is successful, you are ready to program the FPGA.
The FPGA looks as follows.
Make sure the Programmer Switch is in the Run position and the USB cable is plugged into the correct slot.
Connect the power cable and power ON the FPGA. You will notice that the onboard LEDs turn ON and OFF continuously.
On Quartus, browse to Tools -> Programmer. The following window opens.
Make sure that the file that you want to program has a .sof extension.
Notice that the hardware is not setup yet. Click on hardware setup to recognize and setup the FPGA USB driver.
Select USB-Blaster [USB-0] and click on close.
Click on the Start button to begin programming. If the board is successfully programmed, you will see that the Progress bar on the top right corner will turn green and show 100% (Success).
The FPGA is now programmed.
The inputs are assigned to slide switches SW0 and Sw1, while the output is assigned to LEDG0. Play with the two switches and verify the truth table provided earlier.