aboutsummaryrefslogtreecommitdiffstats
path: root/backends/rtlil
diff options
context:
space:
mode:
authorYosys Bot <yosys-bot@symbioticeda.com>2020-10-22 00:10:06 +0000
committerYosys Bot <yosys-bot@symbioticeda.com>2020-10-22 00:10:06 +0000
commit1a7a597e0720f66b59b896f8e7d537dee8e37744 (patch)
treea02288378046302557653364eba0fc99c642d0df /backends/rtlil
parent2d340cd3559f4e22a910a7fe6e193138dd068996 (diff)
downloadyosys-1a7a597e0720f66b59b896f8e7d537dee8e37744.tar.gz
yosys-1a7a597e0720f66b59b896f8e7d537dee8e37744.tar.bz2
yosys-1a7a597e0720f66b59b896f8e7d537dee8e37744.zip
Bump version
Diffstat (limited to 'backends/rtlil')
0 files changed, 0 insertions, 0 deletions
n111' href='#n111'>111 112 113 114 115 116 117
# nextpnr Generic Architecture

Instead of implementing the [C++ API](archapi.md), you can programmatically 
build up a description of an FPGA using the generic architecture and the 
Python API.

A basic packer is provided that supports LUTs, flipflops and IO buffer insertion.
Packing could also be implemented using the Python API.

At present there is no support for cell timing in the generic architecture. This
will be worked on in the future.

## Python API

All identifiers (`IdString`) are automatically converted to
and from a Python string, so no manual conversion is required.

Argument names are included in the Python bindings,
so named arguments may be used.

### void addWire(IdString name, IdString type, int x, int y);

Adds a wire with a name, type (for user purposes only, ignored by all nextpnr code other than the UI) to the FPGA description. x and y give a nominal location of the wire for delay estimation purposes. Delay estimates are important for router performance (as the router uses an A* type algorithm), even if timing is not of importance.

### addPip(IdString name, IdString type, IdString srcWire, IdString dstWire, DelayInfo delay, Loc loc);

Adds a pip (programmable connection between two named wires). Pip delays that correspond to delay estimates are important for router performance (as the router uses an A* type algorithm), even if timing is otherwise not of importance.

Loc is constructed using `Loc(x, y, z)`. 'z' for pips is only important if region constraints (e.g. for partial reconfiguration regions) are used.

### void addBel(IdString name, IdString type, Loc loc, bool gb);

Adds a bel to the FPGA description. Bel type should match the type of cells in the netlist that are placed at this bel (see below for information on special bel types supported by the packer). Loc is constructed using `Loc(x, y, z)` and must be unique.

### void addBelInput(IdString bel, IdString name, IdString wire);
### void addBelOutput(IdString bel, IdString name, IdString wire);
### void addBelInout(IdString bel, IdString name, IdString wire);

Adds an input, output or inout pin to a bel, with an associated wire. Note that both `bel` and `wire` must have been created before calling this function.

### void addGroupBel(IdString group, IdString bel);
### void addGroupWire(IdString group, IdString wire);
### void addGroupPip(IdString group, IdString pip);
### void addGroupGroup(IdString group, IdString grp);

Add a bel, wire, pip or subgroup to a group, which will be created if it doesn't already exist. Groups are purely for visual presentation purposes in the user interface and are not used by any place-and-route algorithms.