gen_npnr_model¶
Nextpnr model generation for FABulous FPGA fabrics.
This module provides functionality to generate nextpnr models from FABulous fabric definitions. The nextpnr model includes detailed descriptions of programmable interconnect points (PIPs), basic elements of logic (BELs), and routing resources needed for place-and-route operations.
The generated models enable nextpnr to understand the fabric architecture and perform placement and routing for user designs.
Attributes¶
Functions¶
|
Build a BEL's legacy v1 line, its v2/v3 blocks, and any pin constraint. |
|
Generate the fabric's nextpnr model. |
|
Write the nextpnr pip file for the given fabric. |
Module Contents¶
- IO_BEL_TYPES = ('IO_1_bidirectional_frame_config_pass', 'InPass4_frame_config', 'OutPass4_frame_config',...[source]¶
- belLines(bel, letter, x, y) tuple[str, list[str], list[str], list[str]][source]¶
Build a BEL’s legacy v1 line, its v2/v3 blocks, and any pin constraint.
The bel.v3 block additionally carries timing-arc lines, but only for the BEL types nextpnr currently times (
FABULOUS_LC,InPass4_frame_config,OutPass4_frame_configand their_muxvariants); every other type gets no arcs so no new timing paths are introduced.- Parameters:
- Returns:
(v1_line, v2_lines, v3_lines, constrain_lines)- the legacy bel.txt line, the bel.v2/bel.v3 block lines, and zero or oneset_ioline.
- genNextpnrModel(fabric, delay_model=None) tuple[str, str, str, str, str][source]¶
Generate the fabric’s nextpnr model.
- Parameters:
fabric (Fabric) – Fabric object containing tile information.
delay_model (FABulousTimingModelInterface, optional) – Timing model interface to provide delay information, by default None.
- Returns:
pipStr: A string with tile-internal and tile-external pip descriptions.
belStr: A string with old style BEL definitions.
belv2Str: A string with new style BEL definitions.
belv3Str: A string with new style BEL definitions including timing.
constrainStr: A string with constraint definitions.
- Raises:
InvalidState – If a wire in a tile points to an invalid tile outside the fabric bounds.
- writeNextpnrPipFile(fabric, outputFile, delay_model=None) None[source]¶
Write the nextpnr pip file for the given fabric.
- Parameters:
fabric (Fabric) – Fabric object containing tile information.
outputFile (Path) – File to write the pip information to.
delay_model (FABulousTimingModelInterface, optional) – Timing model interface to provide delay information, by default None.