Intel® FPGA Academic Program Teaching Materials
Embedded Systems
Summary
These lab exercises are designed to accompany an intermediate course in embedded systems design using Linux* on the Arm* processor found in Terasic DE-Series SoC FPGA development kits. Topics covered include:
- Getting started with Linux
- Developing embedded programs that communicate with an FPGA
- Interfacing with character device drivers
- Creating graphics, animation, and audio
By the end of this course, students will have practical knowledge of:
- Writing Linux kernel modules that use device drivers
- Designing user-level programs that use available hardware resources
- Graphics and animation on a VGA display
- Using the ADXL345 accelerometer
Professors: To request solutions, source material, software licenses, and teaching hardware, enroll in the Intel® FPGA Academic Program.
Instructor Notes:
- Prerequisite topics can be taught in the lecture sessions leading up to each lab session.
- A Terasic DE-Series SoC FPGA development kit with the Arm Cortex*-A9 processor is required for use with these exercises.
Prerequisites
- Familiarity with the Bresenham line-drawing algorithm
- Linux kernel modules
Recommended Tools & Tutorials
Lab 2: Develop Linux Programs that Communicate with FPGAs
Gain practice with writing kernel modules to control peripherals and use system hardware.
- Display a scrolling message on the seven-segment displays.
- Display a real-time clock on the seven-segment displays.
- Implement a stopwatch with two sources of interrupts.
Lab 4: Using Character Device Drivers
Continue to build experience on skills gained from the prior exercise.
- Write a device driver that implements a countdown stopwatch.
- Write a program that controls the stopwatch using the switches and pushbuttons.
Lab 5: Use ASCII Graphics for Animation
Explore how to perform simple animations under Linux with ASCII commands.
- Compile and run a given example program.
- Write, compile, and test a program that uses the Bresenham line-drawing algorithm to draw lines on the screen.
- Enhance your algorithm with physics so that your line moves and bounces off the edge of the screen.
- Create an animation of five objects on the screen, and then enhance it with input variables for speed and number of objects.
Lab 6: Introduction to Graphics and Animation
Learn how to display images and perform animation using the video-out port.
- Write a video driver and add a simple line-drawing algorithm.
- Augment the kernel module with pixel buffer swap, and write a user-level program to create a simple animation.
- Enhance your video driver to support the display of characters, and augment your user-level program to display the number of video frames that have been drawn.
Lab 7: Use the ADXL345 Accelerometer
Experiment with the ADXL345 accelerometer chip.
- Write a program to directly read and write registers in the ADXL345 device.
- Create a kernel module that provides file-based I/O, and then write a user-level program that uses the driver.
- Implement a graphical demonstration that draws a bubble on the screen that moves as you tilt the board.
- Add tap and double-tap detection to your device driver, and add a demonstration of that feature to your user-level program.
Lab 8: Introduction to Audio and Multithreaded Applications
Create user-level Linux programs that produce audio output on the Terasic DE1-SoC board.
- Write a multithreaded program to implement a digital piano using an audio port.
- Visualize sound as wave forms on a VGA display.
- Record and play back songs.