inflearn logo

Machine Learning Python Practice for FPGA Implementation

When you learn machine learning, you learn how to improve accuracy. But the moment you try to put that model onto an actual chip, questions no one has answered remain. How many multiplications does this model perform? How much does it need to remember, and for how long? Can the chip specifications you are targeting handle those requirements? Machine learning textbooks talk about accuracy, and semiconductor textbooks talk about circuits, but materials that bridge the gap between them are rare. I repeatedly encountered this gap while implementing RISC-V CPUs and NPUs on FPGAs. The model with the highest accuracy often turned out not to fit on the board. In this course, you will build six algorithms directly in Python, measuring the number of multiplications, comparisons, memory usage, and accuracy each time. Then you will convert those figures into the resources of an actual FPGA board. Saying that something requires a certain number of multiplications is not enough to gauge its size, but knowing that it uses a certain percentage of the board makes the decision clearer. After nine Labs, when the six models are brought together in a single table, an unexpected picture emerges. We spent nine lessons counting multiplications, but multiplications were not what held us back. After that, we reduce floating-point values to integers, manage bit widths, and even establish criteria for evaluating the circuit. You do not need an FPGA board. The course is conducted entirely in Python, and the board is used only as a reference for converting the measurements.

8 learners are taking this course

Level Intermediate

Course period Unlimited

Python
Python
Machine Learning(ML)
Machine Learning(ML)
Artificial Neural Network
Artificial Neural Network
Numpy
Numpy
Scikit-Learn
Scikit-Learn
Python
Python
Machine Learning(ML)
Machine Learning(ML)
Artificial Neural Network
Artificial Neural Network
Numpy
Numpy
Scikit-Learn
Scikit-Learn

What you will gain after the course

  • By examining the machine learning model, you can calculate the resources it requires on the chip.

  • You can quantize the floating-point weights to integers and calculate and determine the accumulator bit width.

  • We can create a Python golden model to verify the circuit and establish a procedure for comparing values one by one.

  • From a design perspective, you can explain the area–time trade-off of exchanging the number of multipliers for the number of cycles.

  • You will get 15 Python scripts that you can run and modify the values in, along with validation tools.

  • You can determine whether implementation is feasible by converting the number of operations and memory requirements into percentages of the actual board resources.

  • You will complete the table comparing the costs of the six algorithms using the same criteria.

■ Course Introduction

How does a computer see an image and figure out what it is?

The images that computers see are data made up of numbers. Machine learning finds features and patterns in those numbers and uses them to make judgments about new inputs. This process takes it one step further here.

What is needed to run machine learning algorithms on actual hardware?

The hardware you need depends on how many multiplications are required, how many values must be remembered, and which calculations can be processed simultaneously. In this course, you will learn machine learning from the ground up, run six algorithms yourself, and measure each one using four criteria: multiplication · comparison · memory · accuracy.

A model with high accuracy is not necessarily a good hardware model.

Some algorithms involve many multiplications, while others involve many comparisons. There are classifiers that do not use multiplication at all, and there are models that have high accuracy but are difficult to implement on an FPGA due to their memory requirements.

The key to this course is to run these differences yourself and verify them with numbers.


■ What will you learn?

The 15 Labs form a single continuous flow.

Part 1 · Fundamental Operations in Machine Learning
Starting with how images are stored as arrays of numbers, you will understand multiplication and accumulation, training, and multiclass classification.

Part 2 · Algorithm and Hardware Costs
By running different machine learning algorithms, you will compare multiplication, comparison, memory, and accuracy using the same criteria.

Part 3 · From Python to FPGA
Convert floating-point models to integers, determine shifts and bit widths, and establish criteria for validating the actual circuit.

This is a journey that starts with Python and takes you all the way to actual hardware implementation.


■ Course Features

  • You can get started without any prior knowledge of machine learning.

  • Rather than using the algorithm as a black box, you will directly examine what computations are required.

  • We measure not only accuracy but also multiplication, comparison, and memory.

  • Convert the measurement results based on actual FPGA resources.

  • From floating-point down to integer operations and bit width.

  • You can compare the execution results of all 15 labs against the correct answer logs at once.


■ Recommended for

  • Those who want to learn machine learning from the ground up with a focus on its principles

  • Those curious about the relationship between machine learning and FPGAs and AI semiconductors

  • Those who want to study AI semiconductors or NPU design

  • For those who want to evaluate models not only in terms of accuracy but also from the perspective of hardware resources


■ Prerequisites and Practice Environment

Basic Python syntax is enough to get started. No prior knowledge of machine learning or FPGAs is required.

The exercises use Anaconda · Jupyter Notebook · NumPy · scikit-learn · matplotlib.

An FPGA board is not required.
The Arty S7-25 is used as a reference for converting algorithm costs into actual hardware resources.


■ Materials Provided

  • 15 Python hands-on practice scripts

  • Fixed training and test datasets

  • Answer logs and batch verification script

  • Application Exercises by Lab


■ Curriculum

Section 1 Getting Started · 9 min · Free
Section 2 Data and Operations · 29 min · Free
Section 3 Learning and Multiclass Classification · 31 min
Section 4 Algorithms Without Multiplication · 48 min
Section 5 Reduction and Six Models · 44 min
Section 6 Converting to Integers · 45 min
Section 7 Transferring to the Board · 31 min

Approximately 4 hours in total

The first two sections are available for free. Rather than being mere preview videos, you can directly experience the actual teaching format and first exercise before deciding whether to enroll. trước khi quyết định đăng ký khóa học.

Recommended for
these people

Who is this course right for?

  • People who know how to build machine learning models but lack criteria for determining whether those models can be deployed on an FPGA or ASIC, and have been making that decision based on intuition each time.

  • Those who work with semiconductors or FPGAs and have taken on AI accelerators, but still can’t figure out what to turn into circuits even after reading algorithm-related documents.

  • Those preparing for AI semiconductor design roles who feel lost about how to connect accuracy-focused machine learning knowledge with resource-focused hardware knowledge

  • Have you ever finished building a model only to run out of memory and have to start over from scratch?

  • People who can read the MAC figures in papers but have never converted them into how many cycles and what percentage they represent on our chip.

Need to know before starting?

  • Python Basic Syntax

  • Experience working with NumPy arrays (not required to enroll)

  • No prior knowledge of machine learning is required. You’ll build the algorithms yourself as you go.

  • No prior hardware knowledge is required. Any necessary concepts will be explained as they come up.

Hello
This is EdgeChipLab

Career Verified

Design and implement AI semiconductors directly on FPGAs

As a current university professor, I have incorporated 30 years of experience in the system semiconductor industry, along with expertise in AI semiconductor research and education.

This is a hands-on curriculum designed by a professor who teaches semiconductor engineering, based on direct design and FPGA verification experience—from starting as a systems semiconductor researcher in Samsung Electronics’ DS Division, to serving as a Director at the company’s UK and German subsidiaries, and then leading the System LSI marketing and sales group.

This is not simply a course on how to use FPGAs.
It is designed to help you understand AI algorithms → directly design NPUs and CPUs in RTL → implement them on an FPGA → verify them on actual hardware → and ultimately expand to AI SoCs.

AI Algorithm → RTL Design → FPGA Implementation → Bit-True Verification → AI SoC

 

Beyond theory to real-world AI hardware implementation

It is difficult to develop system-level AI semiconductor design capabilities with only fragmented, scattered knowledge.

Students do not stop at using finished black-box IP. The goal is to gradually develop the system design skills needed to design an AI NPU and RISC-V CPU themselves, integrate memory and peripherals, and ultimately build their own AI SoC.

Starting with the fundamentals of transistors and digital circuits, you will progress through FPGAs, CPUs, and NPUs to hardware for accelerating Transformers and LLMs.

 

We validate the research results on actual FPGA hardware.

This is not a lecture you simply watch. Rather than stopping at theory or basic simulations, you will run AI semiconductor circuits you designed yourself on an actual FPGA and perform Bit-True verification to confirm that the Python model and RTL results match down to the last bit.

The instructor’s research findings, including four KCI-listed papers on AI semiconductors, FPGAs, and RISC-V, are also connected to the educational content, enabling technologies validated through research to be applied to actual designs and FPGA implementations.

We make the source code needed for hands-on practice publicly available, including our self-developed RISC-V CPU, Python code for image training, and Verilog RTL.

Centered around the affordable Arty S7-25 FPGA board and the free Vivado design tool, this course is designed to enable learners to reproduce the entire process of designing, implementing, and verifying their own work.

It is also compatible with Digilent FPGA boards, including the Zybo Z7. You can use it by modifying the XDC pin mapping (board) and clock division parameters (RTL) to match the board.

The 'MNIST NPU with FPGA' course only requires modifying the XDC pin mapping, while courses using an OLED and Camera require modifying the clock division parameters (RTL).

→The lecture exercises are configured with clock division parameters based on Arty S7’s 100 MHz input clock. Since other boards have different input clocks (for example, Zybo Z7 has 125 MHz), you will need to recalculate the division values so that the target frequency remains the same. If you miss this part, the screen or video may not display properly, which can easily be mistaken for a code error, so please check it.

 

A Seamless Full-Stack Roadmap: From the Basics to a mini LLM Accelerator

All the lectures are not independent fragments, but a journey toward completing one vast system.

  • Step 1: AI Theory and Image Processing Fundamentals (including Machine Learning)

  • Step 2: AI Accelerator (NPU) Design and Verification (Including Machine Learning)

  • Step 3: RISC-V CPU Design and System Integration

  • Step 4: Advanced AI SoC Implementation and Expansion into a mini LLM Acceleration Platform (Continuous Content Updates)

     

 

Objective verification metrics

All design outcomes from this course have undergone rigorous validation against global standards and by academia.

  • RISC-V Architecture Verification: In-house developed RISC-V CPU, passed the international foundation’s official compliance test (ACT), with source code released publicly (GitHub)

  • Academic Authority: Four sole-authored academic papers (published in the prestigious KCI A-rated journal IJIBC)

  • Global Recognition: Authored and published two global Amazon technology books (reached No. 3 on the bestseller list)

  • Real-world operation verified: Core IPs including the RV32I CPU, NPU, vision system, GPS, Transformer, and AURA-Edge SoC operate flawlessly in the Arty S7 environment.

Take on the challenge. By the time you complete this process of uploading code directly to the board and verifying the results, you will have leveled up into a hardware engineer with a completely different perspective.

More

Curriculum

All

7 lectures ∙ (3hr 23min)

Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

EdgeChipLab's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

25% off for new members

$46.00

25%

$66.00