chipflow_lib.steps

Steps provide an extensible way to modify the chipflow command behavior for a given design

Classes

IOSignature

An Amaranth Signature used to decorate wires that would usually be brought out onto a port on the package.

StepBase

Helper class that provides a standard way to create an ABC using

Package Contents

class chipflow_lib.steps.IOSignature(direction, width=1, invert=False, all_have_oe=False, init=None)

Bases: amaranth.lib.wiring.Signature

An Amaranth Signature used to decorate wires that would usually be brought out onto a port on the package. This class is generally not directly used. Instead, you would typically utilize the more specific InputIOSignature, OutputIOSignature, or BidirIOSignature for defining pin interfaces.

Parameters:
  • direction (amaranth.lib.io.Direction) – Input, Output or Bidir

  • width (int) – width of port, default is 1

  • invert (Union[bool, collections.abc.Iterable[bool]]) – Polarity inversion. If the value is a simple bool, it specifies inversion for the entire port. If the value is an iterable of bool, the iterable must have the same length as the width of io, and the inversion is specified for individual wires.

  • all_have_oe (bool) – controls whether each output wire is associated with an individual Output Enable bit or a single OE bit will be used for entire port, the default value is False, indicating that a single OE bit controls the entire port.

  • init – a const-castable object for the initial values of the port

property direction: amaranth.lib.io.Direction

The direction of the IO port

Return type:

amaranth.lib.io.Direction

width()

The width of the IO port, in wires

Return type:

int

invert()

A tuple as wide as the IO port, with a bool for the polarity inversion for each wire

Return type:

int

options()

Options set on the io port at construction

Valid options are:

“all_have_oe”: For a bidirectional port, each wire can have it’s direction dynamically controlled seperately, so each wire also has a corresponding Output Enable wire. “init”: the initial value that this io port will have at power-up and reset.

Return type:

dict

annotations(*args)

Annotate an interface object.

Subclasses of Signature may override this method to provide annotations for a corresponding interface object. The default implementation provides none.

See amaranth.lib.meta for details.

Returns:

tuple()

Return type:

iterable of Annotation

class chipflow_lib.steps.StepBase(config={})

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

build_cli_parser(parser)

Build the cli parser for this step

run_cli(args)

Called when this step’s is used from chipflow command