03. Environment Setup & Testing

OwnerMM. G. Sadek
Tags

01 - Objective

In this Lab tutorial, we will learn how to install software tools required to develop, simulate and test VHDL code, also those required to upload the compiled code to the FPGA hardware.

At the end of this tutorial you should have the required software tools and have good understanding of how to create a project from scratch, add VHDL code, perform pin assignment, compile and upload the compiled code to the hardware FPGA and test it.

02 - Downloads:

03 - Preparing Developing Environment:

Step1: Installation:


Step2:


04 - Running your first test project:

Step1: Create a new project:

Source: Intel® Cyclone® 10 LP FPGA Board - How to Program Your First FPGA

Step2: Adding a new VHDL File to your project:

Step3: Entering VHDL code:

Step4: Pin Assignment & Compiling:

Step5: Visual verification of the design:

Step6: Uploading the compiled code to the FPGA hardware:

💡
Hint: If the currently selected hardware says "No Hardware", click the "Hardware Setup" button (make sure your device is plugged in, and drivers installed)

Important Notes:

💡
Important: 1. Output LEDs are active low, that on HIGH output, LED is OFF and on LOW output the LED is ON. To solve this and provide better user-friendly output, we can invert output before assigning to the output pin. 2. Input push buttons are active LOW, having pull-up resistors. Meaning that, on no press, the button inputs HIGH and on press, the button inputs LOW.

So, we can use the following code instead, to provide the same behavior for the desired gates in a user-friendly manner.

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY lab_00 is
PORT (
		x1, x2 : in STD_LOGIC;
		f1, f2, f3, f4 : out STD_LOGIC
	);
END lab_00;

ARCHITECTURE Behavioral of lab_00 is begin
	f1 <= NOT x1;
	f2 <= NOT(NOT x1 AND NOT x2);
	f3 <= NOT(NOT x1 OR  NOT x2);
	f4 <= NOT(NOT x1 XOR NOT x2);
END Behavioral;

05 - Sources: