Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
    • Flops, Resets and Enables
    • FSM Synthesis
      • Coding Styles
      • State Encoding
      • Unreachable States
      • Output Registering
      • Yosys FSM Passes
    • Memory and Macro Inference
    • Retiming and Pipelining
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

‹Sequential, FSM and Memory
  1. Topics
  2. Logic Synthesis
  3. Sequential, FSM and Memory
  4. FSM Synthesis

Part 4 · Sequential, FSM and Memory · Intermediate

FSM Synthesis

Coding styles, state encoding, and safe recovery from unreachable states.

  • 5topics
  • 5lessons

FSM synthesis turns a state register plus next-state logic into flops and gates. The coding style decides what the tool recognises, the encoding trades area against speed, and unreachable states need a recovery plan.

Choice

Options

What it trades

Coding style

One-, two- or three-process

Readability against how cleanly the tool sees the state register.

State encoding

Binary, one-hot or gray

Flop count against decode depth and switching activity.

Recovery

Default arc, reset, or validity check

Safety against extra next-state logic.

Outputs

Mealy, Moore, or registered

Response latency against output timing.

Lesson

What it covers

Coding styles

One-, two- and three-process forms and what each infers.

State encoding

Binary, one-hot and gray with the area, speed and power trade-off.

Unreachable states

Invalid codes and default recovery to a safe state.

Output registering

Mealy and Moore outputs and why registering outputs helps timing.

Yosys FSM passes

How fsm_detect, fsm_extract and fsm_recode handle an FSM.

Check yourself Why does a one-hot FSM need safe recovery even though its states are all defined?

Faults and uninitialised flops can land the machine in an all-zero or multi-hot state no case item covers. Without a default recovery arc it never returns.

Interview

Carry one sentence per lesson: styles infer the same machine when written carefully, binary is compact while one-hot is fast, invalid codes need a default arc, registered outputs trade latency for slack, and Yosys detect and extract steps are pinned by cell counts, including when detection finds nothing.

Related topics

  • Up: Sequential, FSM and Memory

  • Previous: Flops, Resets and Enables

  • Next: Memory and Macro Inference

PreviousNext: Coding Styles

Up next

Up nextCoding Styles

Sign in to save progress

Practice this lessonReport an error

See also

  • Flops, Resets and Enables
  • Memory and Macro Inference
  • Retiming and Pipelining