DV Flow Task Reference¶
The dv_flow.libyosys package registers tasks under the yosys
namespace for use in DV Flow flow.dv
files.
File types¶
yosys.NetlistFile¶
A synthesized netlist produced by Yosys. Supported formats: JSON, Verilog
(write_verilog), BLIF, EDIF, or RTLIL. This fileset type is produced by
the synthesis tasks below and consumed by downstream place-and-route tools.
yosys.SMT2File¶
An SMT2 model produced by write_smt2, for use with formal verification
back-ends such as smtbmc / SymbiYosys.
yosys.LibertyLib¶
A Liberty .lib cell library consumed by technology-mapping passes
(dfflibmap / abc). Pass one of these as an input to yosys.Synth
to enable standard-cell mapping.
Synthesis tasks¶
yosys.Synth¶
Technology-independent RTL synthesis.
Reads Verilog/SystemVerilog sources and runs the generic synth pass,
producing an optimised gate-level netlist. When a Liberty cell library is
provided (via a yosys.LibertyLib fileset) dfflibmap and abc are
run automatically.
tasks:
- name: rtl
uses: std.FileSet
with:
type: systemVerilogSource
include: "src/**/*.sv"
- name: lib
uses: std.FileSet
with:
type: libertyLib
include: "tech/osu035_stdcells.lib"
- name: synth
uses: yosys.Synth
needs: [rtl, lib]
with:
top: my_top
output_format: verilog
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name (leave empty for auto-detect). |
|
str |
Output format: |
|
bool |
Flatten the design before synthesis. |
|
bool |
Disable FSM optimisation pass. |
|
bool |
Disable ABC logic optimisation (use Yosys built-in LUT mapper). |
|
bool |
Enable flip-flop retiming via ABC. |
|
list |
Additional Yosys script lines appended verbatim after synthesis. |
yosys.SynthIce40¶
Synthesis targeting Lattice iCE40 FPGAs.
Runs synth_ice40 to produce an iCE40-optimised netlist.
- name: synth
uses: yosys.SynthIce40
needs: [rtl]
with:
top: blink
family: hx
output_format: json
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name. |
|
str |
iCE40 device family: |
|
str |
Output format: |
|
bool |
Enable flip-flop retiming. |
|
bool |
Use the newer ABC9 flow (experimental). |
|
list |
Additional Yosys script lines appended verbatim. |
yosys.SynthXilinx¶
Synthesis targeting Xilinx FPGAs (7-series, UltraScale, etc.)
Runs synth_xilinx for the specified family.
- name: synth
uses: yosys.SynthXilinx
needs: [rtl]
with:
top: my_top
family: xc7
output_format: edif
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name. |
|
str |
Xilinx device family: |
|
str |
Output format: |
|
bool |
Flatten design before synthesis. |
|
bool |
Enable flip-flop retiming. |
|
bool |
Do not use block RAM cells. |
|
bool |
Do not use DSP48* cells. |
|
list |
Additional Yosys script lines appended verbatim. |
yosys.SynthLattice¶
Synthesis targeting Lattice FPGAs (ECP5, MachXO2/3, CrossLink-NX, Certus-NX).
Runs synth_lattice for the specified device family.
Supported families: ecp5, xo2, xo3, xo3d, lifcl, lfd2nx.
- name: synth
uses: yosys.SynthLattice
needs: [rtl]
with:
top: my_top
family: ecp5
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name. |
|
str |
Lattice device family (see supported list above). |
|
str |
Output format: |
|
list |
Additional Yosys script lines appended verbatim. |
yosys.SynthGowin¶
Synthesis targeting Gowin FPGAs (experimental).
Runs synth_gowin.
- name: synth
uses: yosys.SynthGowin
needs: [rtl]
with:
top: my_top
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name. |
|
str |
Output format: |
|
list |
Additional Yosys script lines appended verbatim. |
Formal verification¶
yosys.FormalPrepare¶
Prepare RTL for formal verification, producing an SMT2 model.
Reads Verilog/SystemVerilog sources with the -formal flag (enabling SVA
constructs) and runs the standard formal preprocessing pipeline:
hierarchy, proc, opt, memory, opt -fast. Emits an SMT2
model (write_smt2) for consumption by smtbmc / SymbiYosys.
- name: rtl
uses: std.FileSet
with:
type: systemVerilogSource
include: "src/**/*.sv"
- name: prepare
uses: yosys.FormalPrepare
needs: [rtl]
with:
top: my_module
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Top-level module name. |
|
list |
Additional Yosys script lines appended verbatim. |
Utility tasks¶
yosys.Script¶
Run an arbitrary Yosys script, with optional automatic RTL loading.
Executes a user-supplied Yosys script. When read_rtl is true, all
RTL sources from upstream filesets are read automatically before the script
runs.
- name: synth
uses: yosys.Script
needs: [rtl]
with:
script: "synth.ys"
read_rtl: true
Parameters
Name |
Type |
Description |
|---|---|---|
|
str |
Path to the |
|
bool |
Automatically read all upstream RTL sources before running the script. |
|
list |
Additional Yosys script lines appended verbatim after the script. |