Introductory course to VHDL and HLS FPGA programming

Europe/Rome
Università degli Studi Milano Bicocca

Università degli Studi Milano Bicocca

Piazza dell'Ateneo Nuovo, 1/EDIFICIO U 6, 20126 Milano MI, Italia
Description

Introduction to FPGA programming

Image taken from: https://https://digilent.com

The course is mainly thought for the new personnel hired by means of the ICSC project to work on projects and research activities in the framework of Spoke 2 ("Fundamental Research And Space Economy") and Spoke3 (Astrophysics & Cosmos Observations), but open to anyone interested within the fundamental physics community.

Lecturers: 

  • Andrea Triossi (University of Padova) 
  • Mirko Mariotti (University and INFN of Perugia)
  • Sioni Summers (CERN)

 

Facilitators for the hands-on sessions: 

  • Giulio Bianchini (INFN of Perugia)
  • Francesco Brivio (INFN Milano Bicocca)

 

Prerequisites: 

  • Basic notion of digital electronics (combinatorial and sequential circuits)
  • basic C++ programming with usage of  templates
  • basic python programming
  • entry level knowledge of machine learning (not really needed, but it may help for the last part of the course)

 

Target skills and knowledge: The aim of the course is to provide a hands-on programming laboratory of Field-Programmable Gate Arrays (FPGA) through the VHDL hardware description language 

Course unit contents:

  • Introduction to FPGAs
  • FPGA Architecture
  • FPGA programming flow
  • VHDL language by examples
    • Introduction to the Vivado programming framework and the Arty A7 board
    • Combinational circuits on FPGA
    • Sequential circuits on FPGA
    • Arithmetic operations on FPGA
  • Case study: UART interface
  • High Level Synthesis (HLS)
    • Programming flow
    • Number representations and arithmetic
    • Loops: understanding and optimizing
  • HLS case study: Missing transverse energy calculation

 

Suggested readings:

  • Manual for syntax
    • The VHDL Golden Reference Guide (DOULOS)
    • VHDL handbook (HARDI)
  • Books
    • Zwolinski,M., Digital System Design with VHDL. Harlow: PRentice Hall Pearson Education
    • Tappero F., Mealy B., Free Range VHDL
    • Kastner R., Matai J., Neuendorffer S., Parallel Programming for FPGAs

 

All the participants are requested to have a copy of Vivado installed on a local machine

The Course will be held at  Università degli Studi di Milano Bicocca


GitHub pages:


 

Participants
  • Alessandro Corvaglia
  • Andrea Atza
  • Aurora Perego
  • Giacomo Secci
  • Giorgio Pizzati
  • Giovanni Naldi
  • Henrique Vieira De Souza
  • jacopo malagoli
  • Lia Lavezzi
  • Luca Pacher
  • Mario Francesco Sardone
  • Matteo Baratti
  • Matteo Casadei
  • Valentina Sisini
  • +40
    • 09:30 12:45
      Introduction to VHDL U6-01f (Università degli studi Milano Bicocca)

      U6-01f

      Università degli studi Milano Bicocca

      • 09:30
        Introduction to FPGAs 30m U6-01f

        U6-01f

        Università degli studi Milano Bicocca

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 10:00
        FPGA design flow 1h U6-01f

        U6-01f

        Università degli studi Milano Bicocca

        Source files, Intellectual Property files, constraints files, Simulation, Synthesis, Implementation, Debugging

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 11:00
        Coffe break 30m
      • 11:30
        FPGA architecture 1h U6-01f

        U6-01f

        Università degli studi Milano Bicocca

        Overview of all the elements of an FPGA. Configurable logic blocks, Switch Matrix, I/O blocks, Look Up Tables, Storage elements, Memories, Shift registers, Multiplexers, Carry logic, Clock distribution, Clock buffers, Clock Management tile, FIFOs, Digital Signal Processors

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
    • 12:30 13:30
      Hands on U6-01f (Università degli studi Milano Bicocca)

      U6-01f

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 12:30
        Vivado environmet 1h

        https://github.com/FPGA-course-2025/day1

        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)
    • 14:30 19:00
      Hands on U6-01f (Università degli studi Milano Bicocca)

      U6-01f

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 14:30
        Vivado environment 1h
        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)
      • 15:30
        Combinatorial functions in VHDL 1h

        Basic examples of combinatorial functions in VHDL. VHDL types and type conversions

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 16:30
        Coffee break 30m
      • 17:00
        Combinatorial functions in VHDL 1h 30m

        Basic examples of combinatorial functions in VHDL. VHDL types and type conversions

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
    • 09:30 14:00
      Hands on U6-11 (Università degli studi Milano Bicocca)

      U6-11

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 09:30
        Arithmetic operation in VHDL 1h 30m

        Case study: the adder. Simulation of VHDL code through test bench

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 11:00
        Coffee break 30m
      • 11:30
        Sequential circuits in VHDL 2h

        Sequential circuits in VHDL Example of sequential circuits: flip-flop, latch, shift register, counter. Reset circuit strategies. Flash Programming

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
    • 14:30 19:00
      Hands on U6-11 (Università degli studi Milano Bicocca)

      U6-11

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 14:30
        Sequential circuits in VHDL 2h U6-11

        U6-11

        Università degli studi Milano Bicocca

        Synchronous logic design. Inference in VHDL. State machines

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 16:30
        Coffee break 30m
      • 17:00
        Debugger 1h 30m U6-11

        U6-11

        Università degli studi Milano Bicocca

        How to place a debugger on the design: pre and post synthesis

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
    • 09:30 14:00
      Hands on U6-10 (Università degli studi Milano Bicocca)

      U6-10

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 09:30
        UART transmitter unit 1h 30m

        Interface of the Arty A7 board. Introduction of the RS232 standard.

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
      • 11:00
        Coffee break 30m
      • 11:30
        UART receiver unit 2h

        Implementation and simulation in VHDL of a UART receiver unit

        Speaker: Andrea Triossi (Universita` degli Studi di Padova)
    • 14:30 18:30
      Hands on U6-10 (Università degli studi Milano Bicocca)

      U6-10

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 14:30
        Verilog 1h
        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)
      • 15:30
        Open source FPGA tools 1h
        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)
      • 16:30
        Coffee break 30m
      • 17:00
        Zynq, Alveo and Pynq introduction 1h
        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)
    • 09:30 13:00
      Introduction to HLS U6-11 (Università degli studi Milano Bicocca)

      U6-11

      Università degli studi Milano Bicocca

    • 14:30 18:00
      Hands on U6-11 (Università degli studi Milano Bicocca)

      U6-11

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 14:30
        HLS - Introduction and Numerics 2h
        • Extended HLS exercise
        Speaker: Sioni Summers
      • 16:30
        Coffee break 30m
      • 17:00
        HLS - Interfaces 1h
        • communicating with HLS modules
        Speaker: Sioni Summers
    • 09:30 13:30
      Introduction to HLS U6-01e (Università degli studi Milano Bicocca)

      U6-01e

      Università degli studi Milano Bicocca

      • 09:30
        HLS - Loops 1h 30m
        • Understanding loops
        • Understanding memory
        • Optimizing loops
        Speaker: Sioni Summers
      • 11:00
        Coffee break 30m
      • 11:30
        HLS - Loops 2h
        • Understanding loops
        • Understanding memory
        • Optimizing loops
        Speaker: Sioni Summers

        $ git pull origin solutions
        From https://github.com/FPGA-course-2025/day4
         * branch            solutions  -> FETCH_HEAD
        Updating 62ddc13..9be648a
        Fast-forward
         MET/cosim.tcl           |    2 +-
         MET/csim.tcl            |    4 +-
         MET/csynth.tcl          |    4 +-
         MET/example_met.cpp     |   15 +
         MET/example_met.h       |   18 +
         MET/met_hls.csv         | 2000 +++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------
         MET/met_hls_float.csv   | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++
         MET/met_reference.ipynb |  198 +++++++++--
         MET/testbench.cpp       |    2 +-
         uart/VHDL/top.vhd       |   18 +-

         

    • 14:30 18:00
      Hands on U6-01e (Università degli studi Milano Bicocca)

      U6-01e

      Università degli studi Milano Bicocca

      On Linux:

      picocom -b 115200 -r -l /dev/ttyUSB0

       

      On Mac:

      screen /dev/[port name] [baud rate]

      for example:

      screen /dev/ttyUSB0 115200

       


      vitis_hls 

      If you use Vitis_HLS in the  cloud environment you have to change one command in the .tcl file.

      Change from

      csim_design

      to 

      csim_design -ldflags "-fuse-ld=gold"
      • 14:30
        The BondMachine Project 3h 30m
        Speaker: Mirko Mariotti (Istituto Nazionale di Fisica Nucleare)