Lab on hardware-software digital systems codesign
EE-390(a)
This TP complements previous courses on digital systems design by presenting the complete design of complex systems-on-chip (SoC) that run on Linux with Xilinx FPGAs. We explore high-level synthesis (HLS) as a mechanism to improve productivity in the design of HW.
The complete set of sessions will be given in the lab ELG 022 on Thursdays from 14:15 to 17:00.
- Announcements (Forum)
- FAQ/Tips: (Text and media area)
- Support material: (Text and media area)
- Pynq-Z2 Reference Manual v1.1 (File)
- Zynq-7000 SoC Data Sheet Overview (DS190) (URL)
- Zynq-7000 SoC: Technical Reference Manual (UG585) (URL)
- AMBA AXI and ACE - Protocol Specification (File)
- Vivado Design Suite - AXI Reference Guide - UG1037 (v4.0) (File)
- 7 series FPGAs Memory Resources User Guide (UG473) (File)
- 7-series DSP48E1 slice user guide (UG479) (File)
- Python script to program a bitstream in the Pynq-Z2 board (File)
- [Sources] Example .gitignore file (File)
- Guide for creating GIT repositories (File)
- Forums: (Text and media area)
- News forum (Forum)
- Discussion Forum (Forum)
February 20th
Introduction to course format and planning.
The structure of the course and evaluation is presented.
Concept of HW-SW co-design for SoC.
Processor access to peripherals and buses. Types of peripherals. Flow of computation in a SoC with accelerators. Example of SoC: Zynq-7000.
Exercises.
Setting up Linux on the Pynq board. Basic peripherals in a SoC.
- [Slides] Course outline (File)
- [Slides] Session 1: Concept of HW-SW co-design for SoCs (File)
- Exercise statement for session 1 (File)
- Sources for exercise 1 (File)
- Sources for exercise 2 (File)
- Sources for exercise 4 (File)
February 27th
Introduction to high-level synthesis (HLS)
Levels of optimization and parallelism
Mapping of function arguments to peripheral ports.
Examples of peripherals in HLS
Integration with SW in Linux
Memory & DSP resources in the Zynq 7000 FPGA family
Exercises
Design of combinational peripheral in HLS. Integration in a SoC and use from a Linux application.
Design of sequential peripherals in HLS. Integration in a SoC and use from a Linux application.
Performance characterization (time measurement) in the Pynq board.
- [Slides] Session 2: Introduction to co-design with high-level synthesis (HLS) (File)
- [PDF] Exercise statement for session 2 (File)
- Sources for exercise 1 (File)
- Sources for exercise 2 (File)
- Sources for exercise 3 (File)
- [PDF link] Vitis high-level synthesis user guide - 2022.2 - ug1399 (URL)
March 6th
Design exploration & optimization using HLS
Synthesis flow.
HLS scheduler.
Loop optimizations.
- [Slides] Session 3: Design exploration and optimization using HLS (during class) (File)
- [Slides] Session 3: Design exploration and optimization using HLS (with solutions) (File)
- [PDF] Scheduling exercise for session 3 (File)
- [PDF] Exercise: Accelerator for CNN-based dogs and cats classification (File)
- [Sources] Initial SW CNN-based application for the classification of dog and cat images (File)
- [Sources] Example of ap_fixed in Vitis_HLS (File)
- [Sources] Example templates to test the convolution accelerator (File)
March 13th
Array optimizations in HLS
Types of storage resources.
Array optimizations: partitioning & reshaping.
Combining loop & array optimizations.
- [Slides] Session 4: Array optimization using HLS (during class) (File)
- [Slides] Session 4: Array optimization using HLS (solution) (File)
- [PDF] MIDTERM EXERCISE: Optimizing an accelerator for CNN-based dogs and cats classification (File)
March 20th
Cache coherence & virtual memory
Introduction to the concept of virtual memory (VM) and address space protection.
Accessing peripheral registers with MMIO from the address space of a user-level Linux application.
Why memory hierarchies?
Allocating memory suitable for direct memory access (DMA) by peripherals.
- [Slides] Session 5: Virtual memory, memory for DMA and cache coherence (File)
- [PDF] Reference: "What every programmer should know about memory," Ulrich Drepper, 2007. (File)
March 27th
Interrupts and Linux device drivers
Exercises
Device drivers for FPGA AXI peripherals in Linux
- [Slides] Session 6: Interrupts and Linux Device Drivers (File)
- [PDF] Exercise statement for session 6: Interrupts and Linux Device Drivers (File)
- [Sources] Lab 6 (File)
April 3rd
Memory hierarchies. Caches and buses.
- [Slides] Session 7: Caches and memory hierarchies (File)
- [PDF] Exercise proposal for session 7: Cache memories and memory hierarchies (File)
- [Source] Session 7: Sources for exercise (File)
April 10th
Dynamic job scheduling across multiple accelerators.
- [Slides] Session 8: Dynamic job scheduling across multiple accelerators (File)
- [PDF] Exercise proposal for session 8: Dynamic job scheduling across multiple accelerators (File)
- [Source] Session 8: Sources for exercise (File)
April 17th
Explanation and discussion of final project.
- [Slides] Final project guidelines (File)
- [PDF] Final project description (File)
- [Sources] Initial solutions (File)
April 24th
EASTER BREAK
May 1st
May 8th
Work on the final project.
May 15th
Work on the final project.
PROJECT PRESENTATIONS: May 22nd
FINAL PROJECT PRESENTATIONS
- PROJECT DELIVERABLES: (due: May 22nd at 11:59 am) ... (Text and media area)
- Template for final project presentation (File)
- SCHEDULE OF PROJECT PRESENTATIONS (File)