inflearn logo

Introduction to FSM Design | From State Diagrams to Verilog-HDL 3-Process Implementation

This free course provides a systematic introduction to FSM (Finite State Machine) design, a core component of digital semiconductor control circuits. Through a Pattern Detector example, you will learn the practical design process step by step, including comparisons of Moore and Mealy architectures, creating State Diagrams, deriving Truth Tables, and 3-Process Coding in Verilog-HDL. Establish the essential foundational theory for digital hardware design, including FPGA, RISC-V CPUs, and AI NPUs.

1 learners are taking this course

Level Beginner

Course period Unlimited

verilog
verilog
diagram
diagram
digital-logic
digital-logic
context-switching
context-switching
rtl
rtl
verilog
verilog
diagram
diagram
digital-logic
digital-logic
context-switching
context-switching
rtl
rtl
Thumbnail

What you will gain after the course

  • FSM State Diagram Design and Criteria for Choosing a Moore/Mealy Architecture

  • A systematic design process for converting a state diagram into Verilog-HDL 3-process code via a truth table

  • Stable RTL Coding Principles Including Latch Prevention and the Use of Output Registers

Introduction to FSM Design | From State Diagrams to Verilog-HDL 3-Process Implementation

How do you design control circuits for digital semiconductors?

From traffic lights, vending machines, and communication controllers to CPUs and AI NPUs, various digital systems operate according to predetermined conditions and sequences.

The key technology for systematically designing these sequential operations is FSM (Finite State Machine).

This course is a free FSM design theory course that covers everything from the basic concepts of FSMs to Moore and Mealy architectures, State Diagrams, Truth Tables, and 3-Process Coding in Verilog-HDL.

Rather than simply memorizing FSM code, the focus is on understanding the design process that progresses from state diagrams → truth tables → RTL code.


What you will learn in this course

Section 1. Basic Concepts and Structure of FSMs

Learn what an FSM is and what role it plays in digital circuits.

  • Difference Between Combinational and Sequential Circuits

  • Basic Structure of an FSM and State Registers

  • Concepts of State and State Transition

  • Components of a State Diagram

  • State Definition and State Encoding Using the Pattern Detector 111

Learning point: Understand how to represent the behavior of digital systems using states and transition conditions.


Section 2. Moore and Mealy FSM

Compare the two representative FSM structures and examine which structure to choose depending on the design objectives.

  • Structure and Operating Principles of a Moore Machine

  • Structure and Operating Principles of a Mealy Machine

  • Differences in Output Timing and Glitches

  • Timing Closure and Output Stability

  • Trade-off Between the Number of States and Response Speed

  • Hybrid Architecture Using an Output Register

Learning Point: Understand the difference between Moore and Mealy machines and learn the considerations for actual hardware design.


Section 3. FSM Design and Verilog-HDL Implementation

Learn the process of designing an FSM and expressing it in Verilog-HDL code using the Pattern Detector 111 example.

  • Creating a State Diagram

  • Next-State Truth Table and Output Truth Table

  • State Register, Next-State Logic, Output Logic

  • Verilog-HDL 3-Process Coding

  • Comparison of 1-Process, 2-Process, and 3-Process Structures

  • Causes of Latch Inference and How to Prevent It

  • Output Glitches and Output Registers

  • Core Principles of FSM Design

Learning Point: Understand how to systematically write RTL code for an FSM based on state diagrams and truth tables.


What you will gain from this course

  1. Understanding FSM Structure and Operating Principles
    Understand the concepts of states and state transitions, and learn to represent the control operations of digital systems using a State Diagram.

  2. Understanding the Differences Between Moore and Mealy Architectures
    You will be able to compare output methods, response speed, glitches, and timing characteristics, and explain the considerations for design.

  3. Learn the design process from state diagrams to RTL code
    Learn how to create a State Diagram and Truth Table and translate them into Verilog-HDL's 3-Process structure.

  4. Learn proper FSM coding principles
    Understand the differences between 1-, 2-, and 3-Process Coding Styles and learn basic principles for preventing major design issues such as latches and output glitches.


Recommended for

  • Those who want to learn FSM design after learning the basic syntax of Verilog-HDL

  • University students and beginners interested in FPGA design and digital control circuit implementation

  • Those who want to learn how to convert State Diagrams and Truth Tables into RTL code

  • Those who want to clearly understand the difference between Moore and Mealy FSMs

  • Those preparing to design control circuits for RISC-V CPUs, AI NPUs, and SoCs.


Why should you learn FSMs?

In digital hardware design, control circuits are just as important as computational circuits.

When should data be read, when should computation begin, and how can we determine whether the result is ready?

FSMs are used to manage these sequences of operations.

In particular, FPGA, CPU, NPU, and communication controllers must perform multiple operations in a prescribed sequence, so the ability to clearly define states and transition conditions is essential.

In this course, we explain the entire FSM design process through a simple example called Pattern Detector 111.

By connecting a single example through its state diagram, truth table, and Verilog-HDL code, this course is structured to help you systematically understand FSM design methods.


Course Information

This course is a free foundational course from Semiconductor School | EdgeChipLab.

If you have basic knowledge of Verilog-HDL Modules, Always blocks, If/Case statements, and combinational and sequential logic, you will find this course easier to follow. If you need prerequisite learning, please take the free course “Introduction to Verilog-HDL for Digital Semiconductor Design” first.

This course explains FSM design theory and RTL code structure. Actual Verilog-HDL coding, Vivado simulation, and FPGA implementation are covered in the subsequent hands-on course.

Go beyond simply understanding the concept of FSMs and learn the design thinking needed to connect state diagrams to truth tables and truth tables to RTL code.

Semiconductor School | EdgeChipLab

Recommended for
these people

Who is this course right for?

  • College students and beginners who want to learn the basics of Verilog-HDL syntax and expand into FSM design

  • Learners preparing to implement FPGAs and digital control circuits

  • Engineers interested in designing RISC-V CPUs, AI NPUs, and SoC control circuits

Need to know before starting?

  • Concepts of Combinational and Sequential Logic in Digital Logic Circuits

  • Basic Operating Principles of Flip-Flops and Clocks

  • Verilog-HDL Module, Always, and If/Case Syntax Basics

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 and expertise in AI semiconductor research and education.

This is a practical curriculum directly designed and verified on an FPGA by a professor who began as a systems semiconductor researcher in Samsung Electronics’ DS Division, went on to serve as a Director at Samsung’s UK and Germany subsidiaries, and later led the System LSI marketing and sales group before becoming a professor teaching semiconductor engineering.

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 scattered, fragmented knowledge.

Learners do not stop at using completed black-box IP. The goal is to progressively develop the system design skills to design AI NPUs and RISC-V CPUs 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 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.

We also connect the instructor’s research results, including four KCI-indexed papers on AI semiconductors, FPGAs, and RISC-V, with the educational content, applying technologies validated through research to actual design and FPGA implementation.

We provide source code essential for hands-on practice, 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 allow 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. You just need to modify 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 the courses using the OLED and Camera require modifying the clock division parameters (RTL).

→The course 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 point, the display or video may not output properly, which can easily be mistaken for a code error, so please check this.

 

A seamless full-stack roadmap: from the basics to a mini LLM accelerator

Every lecture is not an isolated fragment, but part of 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 deliverables from this course have undergone rigorous validation against global standards and by the academic community.

  • RISC-V Architecture Verification: In-house developed RISC-V CPU, passed the International Foundation’s official compliance test (ACT), and source code released (GitHub)

  • Academic Authority: Four Sole-Author Academic Papers (published in the prestigious KCI A-ranked journal IJIBC)

  • Global Recognition: Published four global Amazon technology books (reached #1 bestseller status)


    Published books: Roger Kim: books, biography, latest update

  • 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 time you complete this process of uploading code to the board yourself and checking the results, you will have leveled up into a hardware engineer with a completely different perspective than before.

More

Curriculum

All

3 lectures ∙ (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!

Free