Hello world DE0-Nano

Last few weeks i have been going through lots of books on FPGAs and VHDL. Now it is the time to write the first VHDL program. But before even writing a VHDL program I decided to draw a simple schematic design and power it up through the DE0-Nano.

First you need to start QuartusII and start a new project. Select Cyclone IV E device family and EP4CE22F17C6 device. That is the hardware you have in the DE0-Nano. After you created the project, just go to File > New. Then select Block diagram / Schematic file.

Now you will see the window where you should draw the design. Click on schadd icon. Then type ‘and2’ in the Name text box. Now you can draw and gates in the design by simply clicking on it. For time being just include one And gate.

and2


Now click on port to insert ports. Click on ‘input’ and place two input ports. Then connect those inputs to the And gate. Then click on port again and select outputs and connect it to the And gate as well.

design

Click on Processing > Start > Start Analysis & Elaboration. Then click on Assignments > Pin planner.

Inputs will be connected to switches and output will be connected to a LED. Perform the following pin assignments. Pin positions are available in the user manual. File > Close to close the pin assignment window.

pins

Now click on Processing > Start compilation. It will take a little time to compile the program and after the compilation it will generate a summary of the resource utilization. Now connect your board using the USB cable. Then select Tools > Programmer.

If USB-BLASTER was not recognized, click on Hardware setup and add the programmer manually. Then click on AddFile and go to the ‘output files’ in your working directory. Select the file with “.sof” extension. Finally click on Start to transfer the program to your DE0-Nano board.

Press the switches and see the logic working.

🙂

P.S. : I did not elaborate much on small details. If you have a problem in any of above procedure do not hesitate to drop a comment.

Thank you.

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s