yosys

Yosys tool wrapper: converts Verilog into Yosys’s JSON netlist format.

Used as a singleton through classmethods (YosysTool.convert_to_json(...), YosysTool.run(...)); never instantiated.

Classes

YosysTool

Yosys wrapper backed by the Yosys executable.

Module Contents

YosysTool

class YosysTool[source]

Bases: Tool

Yosys wrapper backed by the Yosys executable.

Converts Verilog into Yosys’s JSON netlist format. Used as a singleton: call the classmethods directly, never instantiate.

Reject instantiation; tools are used only through their classmethods.

Parameters:
  • *_args (object) – Ignored positional arguments from the rejected constructor call.

  • **_kwargs (object) – Ignored keyword arguments from the rejected constructor call.

Raises:

TypeError – Always, because tool wrappers are stateless singletons.

Methods

classmethod convert_to_json(verilog_input, json_output) None[source]

Convert a Verilog file to Yosys’s JSON format.

classmethod executable() Path | str[source]

Return the Yosys executable from the FABulous context.

Returns:

The configured Yosys executable.