Introduction To Embedded Systems Design On FPGAs
Introduction To Embedded Systems Design On FPGAs
Embedded system often refers to the non-PC systems which combines hardware and
software design. The development of FPGA technology brings advantages to the
embedded system in size, cost and performance. It is a hot application field which
merges logic design and processor-based hardware development in a single or few
chips solution. The merge of field programmable gate array (FPGA) technology and
embedded system design have great influence on the traditional design methodology.
1
Hands-on: FPGA design and run it on a FPGA development board
Implement a simple Boolean Equation X=AB+CD, and illustrate the steps involved to
design, simulate, and program a FPGA using Altera’s Quartus’ II software.
3) Press Next
2
4) Select Cyclone II family, and choose EP2C35F672C6 which is the FPGA used on
Altera’s DE2 board
3
2) Highlight a new Block Diagram File
3) Choose Save As
4
5) Right click the mouse in the empty workspace
5
7) Repeat steps of 5) and 6) and insert a symbol and2
Assign the name “LogicGate2” to and2
6
9) Make wire connection and insert input/output pin to implement X=AB + CD. The bdf
workspace now has gates of AND and OR, and 4 input pins and 1 output pin. Then
make circuit connections.
7
10) Change input and output terminal name to A, B, C, D, and X, respectively.
8
D. Create a Vector Waveform File (vwf) to simulate the design
1) Choose File -> New -> Other Files ->Vector Waveform File -> OK
2) Save the vector waveform file (wvf) as IntroFPGA. Check the box of Add file to
current project
9
3) Build the simulation file (vwf) with ending time of 20µs and grid size of 1 µs
10
4) View -> Fit in Window
11
6) Add inputs and outputs to the waveform (vwf)
Right click and select Insert Node or Bus
12
6) Choose Filter: Design Entry (All Name)
7) Select inputs/outputs names from Node Finder screen to the right side and click OK
8) Highlight the input A, choose Edit =>Value =>Clock. Enter a period of 2µs, press Ok
13
9) Highlight the input B, choose Edit =>Value =>Clock. Enter a period of 4µs, press OK
10) Highlight the input C, choose Edit =>Value =>Clock. Enter a period of 8µs, press Ok
11) Highlight the input D, choose Edit =>Value =>Clock. Enter a period of 16µs,
press Ok
12) Choose File => Save as IntroFPGA.vwf file
14
2) Show the results of the simulation for the Boolean equation X = AB+CD
F. Programming the FPGA using the Altera DE2 Programmer Board (hardware
configuration)
1) Connect SW0, SW1, SW2, SW3 and LEDG0 to the associated pin number
Input Switch Output LED Bank 1
Switch Number Pin Number LED Number Pin Number
SW0 (A) PIN_N25 LEDG0 (X) PIN_AE22
SW1 (B) PIN_N26
SW2 (C) PIN_P25
SW3 (D) PIN_AE14
2) Assign specific pin numbers in the IntroFPGA for connecting to the DE2 board
Choose Assignment -> Pins from the assignment Editor screen
15
4) Choose Processing -> Compilation.
After the compilation is successful, press OK
5) JTAP Programing and Configuring the FPGA Device.The FPGA device must be
programmed and configured to implement the designed circuit.
i) Flip the RUN/PROG switch of DE2 development into the RUN position (default)
ii) Choose Tools-> Programmer.
16
iii) Click Hardware Setup -> Select Add Hardware
iv) Choose USB-Blaster (Hardware type) press Close
6) Download the embedded system design to Altera EP2C35F672C6. Press Start for
starting the programming process until progress 100%
17
G. Test the download design (X = AB + CD ) to the FPGA chip by combinations of input
levels and observation of the output responds
1) Work on the design entry IntroFPGA.bdf and insert buffers to your design
18
2) Insert output pins and update the names of outputs: LEDR0, LEDR1, LEDR2, and
LEDR3
3) Save your file and Compile your design and see if any error
4) Update Pin Planner and configuration to make connection between logic pins to
associated FPGA pins.
19
20