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.
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.
"In the AI era, the surest response is to build AI semiconductors yourself."
This program is neither a theory-focused university course nor the standardized curriculum of a contract department tailored to specific specifications. Nor is it limited to simply gaining experience using EDA tools or leveraging libraries, as in conventional fragmented practical seminars.
Designed and FPGA-verified by a practicing engineering professor with 30 years of experience, this is a unique, hands-on course. The professor began as a systems semiconductor researcher in Samsung Electronics’ Device Solutions (DS) division, won the Silver Award (Group Chairman’s Award) in Samsung’s Technology Awards for design automation, and went on to serve as a director at Samsung’s UK and Germany subsidiaries and as head of the Systems LSI Marketing and Sales Group.
We also provide free web-based practice tools developed by the author: EdgeTCAD, EdgeSPICE, EdgeAssembler, and EdgeVerilog, EdgePPACT.
We have established an educational environment where students can use the EdgeTCAD semiconductor device simulation tool on their own PCs to simulate and analyze the structures, operating principles, and electrical characteristics of semiconductor devices such as PN junctions, MOS capacitors, planar MOSFETs, 3D FinFETs, and GAA devices.
Using EdgeSPICE, an electronic circuit simulation tool, you can analyze the operating principles and electrical characteristics of a wide range of circuits, from the electrical characteristics of transistors to analog circuits, digital logic circuits, standard cells, and memory circuits. You can also study device and circuit characteristics using the PDKs for SKY130 and GF180MCU, publicly available semiconductor manufacturing processes.
You can use EdgeAssembler to convert RISC-V Assembly into Machine Code and Instruction Encoding and inspect the results, and use EdgeVerilog to design RTL and simulate it on your PC.
EdgeChipLab™, EdgeVerilog™, EdgeSPICE™, EdgeAssembler™, EdgePPACT™, and EdgeTCAD™ are brands established and used by Roger Kim as part of the EdgeChipLab educational and research platform.
[ Key Differentiators for Working Professionals & Aspiring Engineers ]
Architecture design skills—not merely connecting off-the-shelf IP or modifying code, but directly designing the RV32I five-stage Pipeline (IF·ID·EX·MEM·WB) in RTL, including Data Hazard Forwarding, Load-Use Stall, and Branch handling. Understanding and directly working with a five-stage Pipeline is what truly sets your design skills apart.
From Algorithm to RTL — Implement an MNIST CNN as NPU RTL, starting with a Python model and applying Quantization, then verify that the Python and hardware results match bit-for-bit for the same input. The key is to achieve 100% identical results in Python and Verilog and produce results from actual FPGA operation.
CPU + NPU + RTOS integration on a single FPGA — Put everything on a single device: a CPU you designed running an NPU you designed, with FreeRTOS implemented by EdgeChipLab running on top. Students can use all these publicly available RTL and code resources to create their own semiconductor chips.
Free RTL design and simulation environment — With our in-house developed EdgeVerilog v1.0, you can write Verilog RTL, run simulations, and analyze waveforms on a PC or smartphone without signing up or installing any software. We provide a real simulation environment based on Icarus Verilog and 52 design examples for free, making it easy for anyone to get started with semiconductor design practice.
AI Algorithm → RTL Design → FPGA Implementation → Bit-True Verification → AI SoC
It provides an unparalleled, top-tier practical guide not only for undergraduate and graduate students, but also for working professionals looking to advance into next-generation AI semiconductor/SoC design.
Beyond theory to actual AI hardware implementation
It is difficult to develop system-level AI semiconductor design skills with only scattered, fragmented knowledge.
Students will not stop at using finished black-box IP. The goal is to progressively develop the system design skills to design an AI NPU and a 5-stage Pipeline RISC-V CPU themselves, integrate memory and peripherals, port an RTOS on top of them, and ultimately build their own AI SoC.
Starting with the fundamentals of transistors and digital circuits, this course connects FPGA, CPU, and NPU technologies to hardware for accelerating Transformers and LLMs.
We validate the research results on actual FPGA hardware.
This is not a lecture you only watch. Rather than stopping at theory or simple simulations, you will run AI semiconductor circuits you designed yourself on an actual FPGA and perform Bit-True verification, confirming that the Python model and RTL results match down to the last bit.
The instructor also connects research results, including four KCI-indexed papers on AI semiconductors, FPGAs, and RISC-V, to the educational content, taking technologies validated through research into actual design and FPGA implementation. The source code needed for the exercises—including a self-developed RISC-V CPU, Python code for image training, and Verilog RTL—is made available.
Built around the affordable Arty S7-25 FPGA board and the free Vivado design tool, this course enables learners to reproduce the entire process of designing, implementing, and verifying their own work. It can also be used with Digilent FPGA boards, including the Zybo Z7. Simply modify the XDC pin mapping (board) and clock division parameters (RTL) to match your board. The 'MNIST NPU with FPGA' course only requires modifying the XDC pin mapping, while courses that use an OLED and camera require modifying the clock division parameters (RTL).
→ The divider parameters for the course exercises are set based on the Arty S7’s 100 MHz input clock. Since other boards have different input clocks (for example, the Zybo Z7 has a 125 MHz input clock), you will need to recalculate the divider value so that the target frequency remains the same. If you miss this, the screen or video may not display properly,which can easily be mistaken for a code error, so please check.
Free RISC-V and Verilog Practice Environment — EdgeAssembler · EdgeVerilog
You can now start semiconductor design practice in your web browser without installing any software.
EdgeAssembler and EdgeVerilog, developed by the instructor, are free educational tools for hands-on practice. In EdgeAssembler, you can see how RISC-V Assembly is converted into Machine Code, and in EdgeVerilog, you can design and simulate RTL that processes those instructions. They run directly in your web browser, with no need to install separate EDA software.
Instruction Encoding Display: Select a Machine Code row to display its 32-bit binary representation and illustrate the opcode, rd, funct3, rs1, rs2, and imm fields.
Immediate Reconstruction: Reassemble scattered immediate bits, as in B-type and J-type, and display the offset and target address as well.
TinyRV32I Target: Tests tailored to the range of instructions supported by the textbook CPU
Encoding verification tool: Does not execute hardware; actual behavior is verified through EdgeVerilog’s RTL Simulation.
Key Features of EdgeVerilog
Actual RTL Simulation: Compile and simulate based on the open-source Icarus Verilog 12
Waveform Viewer: Observe signal changes, zoom, display HEX/DEC/BIN, position the cursor at signal changes, navigate to the previous or next change, and expand bus bits.
Example Library: Provides 52 digital circuit design examples, including counters, FSMs, and CPUs.
Project management: Write RTL and testbenches, autosave, and ZIP export/import
Mobile Support: Edit RTL, run simulations, and analyze waveforms on smartphones as well
Free of charge: Freely available for educational and non-commercial purposes.
Using the two tools together, learners can explore everything from introductory Verilog-HDL and FSMs to AXI4 and RISC-V CPU design, and verify everything from instruction encoding to RTL.
EdgeAssembler is a tool for checking instruction encoding, and EdgeVerilog is an educational tool for RTL functional verification. FPGA synthesis, implementation, and timing verification are performed in Vivado.
A seamless full-stack roadmap: from fundamentals to a mini LLM accelerator
Each lecture is part of a journey toward completing one vast system, not an isolated fragment.
Step 1: Fundamentals of AI Theory and Image Processing (Including Machine Learning)
Step 2: AI Accelerator (NPU) Design and Verification (Including Machine Learning)
Step 3: 5-Stage Pipeline RISC-V CPU Design and System Integration
Step 4: Advanced AI SoC Implementation and Expansion into a Mini LLM Acceleration Platform (Ongoing Content Updates)
Objective Verification Metrics
All design deliverables from this course have undergone rigorous validation against global standards and by the academic community.
5-Stage Pipeline RISC-V Architecture Verification: In-house developed RISC-V CPU passed the international foundation’s official compliance test (ACT), and its source code was released (GitHub)
Academic Recognition: Four sole-authored academic papers published in IJIBC, a prestigious KCI Grade A journal.
Global Recognition: Published four global Amazon technology books (reached #1 bestseller status)
Real-World Operation Verification Complete: 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 end of this process of loading your own code onto the board and verifying the results, you will have leveled up into a hardware engineer with a completely different perspective.