Targeting Handel-C for the DE2 Board - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Targeting Handel-C for the DE2 Board

Description:

Program the DE2 board in a C-based language ... Compile in DK Outputs: EDIF file & tcl script. Run the tcl script and Compile the EDIF file in Quartus II ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 22
Provided by: ter7116
Category:
Tags: board | de2 | edif | handel | targeting

less

Transcript and Presenter's Notes

Title: Targeting Handel-C for the DE2 Board


1
Targeting Handel-Cfor the DE2 Board
  • Presented by
  • Vincent Lai
  • Supervised by
  • Professor Cheung

2
Aim
  • Program the DE2 board in a C-based language
  • A Library of drivers that support the hardware on
    the DE2 board
  • A Manual and instructions for using the Library

3
Achievements
  • FPGA design framework
  • Program in Handel-C
  • Hardware synthesis in Quartus II
  • A library targeting the DE2 system
  • Drivers PS/2, RAM, VGA
  • Interface with VHDL components

4
Contents
  • Hardware Software
  • Development
  • Demonstration
  • Summary

Hardware Software Development
Demonstration Summary
5
Hardware and Software
  • Hardware
  • Altera DE2 board
  • Software
  • Quartus II
  • DK Design Suite
  • Programming Language
  • Handel-C
  • VHDL

Hardware Software Development
Demonstration Summary
6
Altera DE2 Board
  • A Development board with a Cyclone II FPGA
  • Memory
  • Flash memory
  • SRAM
  • SDRAM
  • VGA
  • Switches
  • PS/2 Mouse
  • 16x2 LCD module
  • 7-Segment Displays LEDs

Hardware Software Development
Demonstration Summary
7
What is Handel-C?
  • a C-based language
  • not a hardware description language it supports
    abstractions common for software programmers
  • Reasonably complex system can be design easily
  • High level yet allow description of sequential
    and parallel logic

Hardware Software Development
Demonstration Summary
8
Contents
  • Hardware Software
  • Development
  • Demonstration
  • Summary

Hardware Software Development
Demonstration Summary
9
Development Timeline
Hardware Software Development
Demonstration Summary
10
Library Components
  • Library file .hcl
  • Header file .hch
  • VHDL Functions Components
  • PS/2 mouse
  • Video Driver
  • LCD module

Hardware Software Development
Demonstration Summary
11
Library file .hcl
  • Generated by using DK Library project
  • Create a .hcc file containing macros
  • Compile the project to obtain the .hcl file
  • Example macro procedure

macro proc DE2SetLEDGs(mask) interface
bus_out() LEDG(mask) with
data"Y12","Y18","AA20","U17","U18","V18","W19",
"AF22","AE22"
Hardware Software Development
Demonstration Summary
12
Header file .hch
  • Describe the macros in the library
  • Example

typedef signal unsigned 9 DE2_LEDG_MASK extern
macro proc DE2SetLEDGs(mask)
Hardware Software Development
Demonstration Summary
13
Interfacing with VHDL
  • Some functions are written in VHDL
  • It is useful to interface with VHDL code
  • Example

interface LCD_DISPLAY(unsigned 1 LCD_RS,
unsigned 1 LCD_E, unsigned 1 LCD_RW, unsigned
8 DATA_BUS) LCD(unsigned 1
re_setkey0.in, unsigned 1 clk_50Mhz
clk_in.in, unsigned 256 Hex_Display_Dataline)
with vhdl_type"std_logic_vector"
Hardware Software Development
Demonstration Summary
14
Example Users Program
  • in the sample code folder

set clock external "N2" include
"DE2.hch" void main(void) DE2_SW_MASK SW
do DE2SW(SW) //read inputs from
the toggle switches DE2SetLEDRs(SW) //sho
ws the status of the switches on LEDs
while(1)
Hardware Software Development
Demonstration Summary
15
Designing with the Library?
Hardware Software Development
Demonstration Summary
16
Difficulties
  • Timing of the RAM
  • Using the SRAM as a frame buffer
  • 640x480 24-bit colour 921600 byte
  • 640x480 16-bit colour 614400 byte
  • 640x480 8-bit grayscale 307200 byte
  • Storing a raw image in the 1M-byte Flash memory

Hardware Software Development
Demonstration Summary
17
Results
  • A library with the desired drivers
  • A detailed Manual and instructions
  • Sample codes

Hardware Software Development
Demonstration Summary
18
Contents
  • Hardware Software
  • Development
  • Demonstration
  • Summary

Hardware Software Development
Demonstration Summary
19
Contents
  • Hardware Software
  • Development
  • Demonstration
  • Summary

Hardware Software Development
Demonstration Summary
20
Future Development
  • Complete the development of drivers for the DE2
    board
  • Portable between Devices
  • Useful functions
  • Image processing
  • FIFO for the SDRAM

Hardware Software Development
Demonstration Summary
21
Achievements
  • FPGA design framework
  • Program in Handel-C
  • Hardware synthesis in Quartus II
  • A library targeting the DE2 system
  • Drivers PS/2, RAM, VGA
  • Interface with VHDL components

Hardware Software Development
Demonstration Summary
Write a Comment
User Comments (0)
About PowerShow.com