1
2
CONTENTS
CHAPTER 1 INTRODUCTION............................................................................................................................... 5
1.1 Features ......................................................................................................................................................5
1.2 About the KIT.............................................................................................................................................7
1.3 Getting Help ...............................................................................................................................................7
CHAPTER 2 DE0-NANO BOARD ARCHITECTURE........................................................................................... 8
2.1 Layout and Components.............................................................................................................................8
2.2 Block Diagram of the DE0-Nano Board ....................................................................................................9
2.3 Power-up the DE0-Nano Board................................................................................................................10
CHAPTER 3 USING THE DE0-NANO BOARD ...................................................................................................11
3.1 Configuring the Cyclone IV FPGA .......................................................................................................... 11
3.2 General User Input/Output .......................................................................................................................12
3.3 SDRAM Memory .....................................................................................................................................15
3.4 I2C Serial EEPROM.................................................................................................................................16
3.5 Expansion Headers ...................................................................................................................................17
3.6 A/D Converter and 2x13 Header ..............................................................................................................20
3.7 Digital Accelero
meter...............................................................................................................................23
3.8 Clock Circuitry .........................................................................................................................................23
3.9 Power Supply............................................................................................................................................24
CHAPTER 4 DE0-NANO CONTROL PANEL...................................................................................................... 26
4.1 Control Panel Setup..................................................................................................................................26
4.2 Controlling the LEDs ...............................................................................................................................28
4.3 Switches and Pushbuttons ........................................................................................................................29
4.4 Memory Controller...................................................................................................................................29
4.5 Digital Accelero
meter...............................................................................................................................31
4.6 ADC..........................................................................................................................................................32
4.7 Overall Structure of the DE0-Nano Control Panel ...................................................................................33
3
CHAPTER 5 DE0-NANO SYSTEM BUILDER .................................................................................................... 34
5.1 Introduction ..............................................................................................................................................34
5.2 General Design Flow................................................................................................................................34
5.3 Using DE0-Nano System Builder.............................................................................................................36
CHAPTER 6 TUTORIAL: CREATING AN FPGA PROJECT............................................................................. 40
6.1 Design Flow..............................................................................................................................................40
6.2 Before You Begin .....................................................................................................................................41
6.3 What You Will Learn ................................................................................................................................45
6.4 Assign The Device....................................................................................................................................45
6.5 Creating an FPGA design .........................................................................................................................49
6.6 Assign the Pins .........................................................................................................................................72
6.7 Create a Default T
imeQuest SDC File .....................................................................................................74
6.8 Compile Your Design ...............................................................................................................................75
6.9 Program the FPGA Device .......................................................................................................................77
6.10 Verify The Hardware .............................................................................................................................. 80
CHAPTER 7 TUTORIAL: CREATING A NIOS II PROJECT............................................................................. 83
7.1 Required Features.....................................................................................................................................83
7.2 Creation of Hardware Design ...................................................................................................................83
7.3 Download the Hardware Design............................................................................................................. 118
7.4 Create a hello_world Example Project ...................................................................................................121
7.5 Build and Run the Program ....................................................................................................................124
7.6 Edit and Re-Run the Program.................................................................................................................125
7.7 Why the LED Blinks ..............................................................................................................................127
7.8 Debugging the Application.....................................................................................................................128
7.9 Configure System Library ......................................................................................................................129
CHAPTER 8 DE0-NANO DEMONSTRATIONS................................................................................................ 131
8.1 System Requirements .............................................................................................................................131
8.2 Breathing LEDs ......................................................................................................................................131
8.3 ADC Reading..........................................................................................................................................133
8.4 SOPC Demo ...........................................................................................................................................137
8.5 G-Sensor.................................................................................................................................................143
4
CHAPTER 9 APPENDIX ..................................................................................................................................... 145
9.1 Appendix ................................................................................................................................................145
CHAPTER 10 APPENDIX ..................................................................................................................................... 153
10.1 Revision History...................................................................................................................................153
10.2 Copyright S
tatement .............................................................................................................................153
5
Chapter 1
Introduction
The DE0-Nano board introduces a compact-sized FPGA development platform suited for to a wide
range of portable design projects, such as robots and mobile projects.
The DE0-Nano is ideal for use with embedded soft processors—it features a powerful Altera Cyclone
IV FPGA (with 22,320 logic elements), 32 MB of SDRAM, 2 Kb EEPROM, and a 16 Mb serial
configuration memory device. For connecting to real-world sensors the DE0-Nano includes a
National Semiconductor 8-channel 12-bit A/D converter, and it also features an Analog Devices
13-bit, 3-axis accelerometer device.
The DE0-Nano board includes a built-in USB Blaster for FPGA programming, and the board can be
powered either from this USB port or by an external power source. The board includes expansion
headers that can be used to attach various Terasic daughter cards or other devices, such as motors
and actuators. Inputs and outputs include 2 pushbuttons, 8 user LEDs and a set of 4 dip-switches.
1
1
.
.
1
1
F
F
e
e
a
a
t
t
u
u
r
r
e
e
s
s
Figure 1-1 shows a photograph of the DE0-Nano Board.
Figure 1-1 The DE0-Nano Board