How yosyshq/yosys works
Yosys is an RTL synthesis framework: users read and elaborate hardware descriptions into RTLIL, select hierarchy, lower processes, optimize and map logic, then emit a netlist. Its pass-based design also supports target-specific synthesis, simulation and formal-oriented workflows. The graph combines documented command sequences with major source-tree subsystems; several frontend, backend and verification relationships are not established by the supplied excerpts, so those branches are shown without speculative wiring.
Main entry points: verilog_frontend.cc Verilog frontend · slang SystemVerilog frontend · rtlil.cc RTLIL design model · ast.h AST elaboration
Components 20
Design frontends
- Verilog frontend
frontends/verilog/verilog_frontend.cc - AST elaboration
frontends/ast/ast.h - SystemVerilog frontend
frontends/slang - Other frontends
frontends
Design kernel
- RTLIL design model
kernel/rtlil.cc - Cell type model
kernel/celltypes.h - FF and memory models
kernel/ff.h - Pass registry
kernel/register.h
Synthesis passes
- Hierarchy handling
passes/hierarchy/hierarchy.cc - Process lowering
passes/proc - Optimization
passes/opt - FSM and memory
passes/fsm - Technology mapping
passes/techmap/techmap.cc - Synthesis flows
techlibs/common/synth.cc
Targets and output
- Device synthesis flows
techlibs - Netlist backends
backends/verilog/verilog_backend.cc - Other output formats
backends
Simulation and formal
- RTL simulation
passes/sat/sim.cc - SMT bounded checking
backends/smt2/smtbmc.py
Other components
- RTL engineer
Connections 20
- RTL engineer → Verilog frontend: reads RTL
- Verilog frontend → RTLIL design model: elaborates design
- RTL engineer → Hierarchy handling: selects top
- RTL engineer → Process lowering: runs passes
- RTL engineer → Optimization: runs passes
- RTL engineer → Technology mapping: runs mapping
- RTL engineer → Netlist backends: writes netlist
- RTL engineer → Synthesis flows: runs synthesis
- RTL engineer → Device synthesis flows: targets device
- RTL engineer → RTL simulation: runs simulation
- RTL engineer → SMT bounded checking: checks properties
- RTL engineer → Other frontends: reads designs
- RTL engineer → Other output formats: exports design
- RTL engineer → SystemVerilog frontend: reads SystemVerilog
- SystemVerilog frontend → RTLIL design model: elaborates design
- RTL engineer → FSM and memory: runs passes
- RTL engineer → Cell type model: uses cell model
- RTL engineer → FF and memory models: uses state models
- RTL engineer → Pass registry: invokes commands
- RTL engineer → AST elaboration: elaborates RTL