๐Ÿง  FSM Supervisor & PWM Generator

This chapter describes the supervisory FSM and the PWM generator, which together ensure safe, deterministic, and controllable behavior of the Vโ€“I control ASIC.

While the PID core computes how much to control, the FSM decides whether control is allowed, and the PWM generator decides how that control is applied in time.


๐ŸŽฏ Role of the FSM

The FSM (Finite State Machine) supervises the control system by:

This explicit, hardware-defined control logic is one of the key advantages of ASIC-based control systems.


๐Ÿ”„ FSM States

The reference design uses three explicit states:

State Description
INIT Initialization, reset, and stabilization
RUN Normal closed-loop control operation
FAULT Control disabled, outputs forced safe

There are no implicit states and no software-managed flags.


๐Ÿงฉ State Transition Diagram (Conceptual)

    +------+
    | INIT |
    +------+
        |
        | start
        โ–ผ
    +------+
    | RUN  |
    +------+
      |  โ–ฒ
fault | | clear
      โ–ผ |
   +-------+
   | FAULT |
   +-------+

๐Ÿšจ Fault Conditions (Vโ€“I Based)

Fault detection is based on explicit voltage and current limits.

Typical fault conditions include:

Additional fault sources may include:

All fault conditions are synchronized to the control clock before being evaluated by the FSM.


๐Ÿ”’ Behavior in FAULT State

When the FSM enters the FAULT state:

This ensures the system always fails safe, not active.


โšก PWM Generator Overview

The PWM generator converts the normalized control output $u[n]$ into a digital pulse waveform suitable for driving external power stages.

Key characteristics:


๐Ÿงฎ PWM Operation

Let:

The duty count is computed as:

\[D_{\text{cnt}} = u[n] \times N\]

The PWM output is asserted when:

\[\text{counter} < D_{\text{cnt}}\]

This structure guarantees cycle-accurate pulse widths.


๐Ÿ— PWM RTL Structure (Conceptual)

       u[n]
        โ”‚
        โ–ผ
 +-------------+
 |  Duty Calc  |
 +-------------+
        โ”‚
        โ–ผ
 +-------------+
 |  Counter    | โ† fixed PWM period
 +-------------+
        โ”‚
        โ–ผ
     PWM_OUT

The duty register is updated only when the counter wraps, preventing mid-period glitches.


โฑ Deterministic System Behavior

Because:

The entire control system exhibits:

This determinism is essential for industrial and safety-oriented control.


๐Ÿงช Verification Strategy

Recommended verification steps include:

Waveform inspection is strongly recommended.

Detailed verification waveforms for FSM and PWM behavior
are provided in Appendix A: Figure List.


๐Ÿ“˜ Educational Insight

In software systems, safety logic is often distributed and implicit.

In hardware systems, safety is structural:

This transparency is a major advantage of ASIC-based control design.


โžก๏ธ Next

Proceed to physical implementation:

โžก๏ธ OpenLane Flow

The next chapter turns RTL into placed, routed, and verified silicon using OpenLane.


โฌ…๏ธ Navigation

The next chapter turns RTL into placed, routed, and verified silicon.