FABulous.fabric_generator.gen_fabric.fabric_automation¶
Functions for fabric automation, such as generating tile configurations and IOs.
Classes¶
Functions¶
Add a list of Bels as blackbox primitives to yosys prims file.
- param primsFile:
Path to yosys prims file
- type primsFile:
Path
- param bels:
List of bels to add
- type bels:
list[Bel]
- param support_vectors:
Boolean to support vectors for ports in the prims file Default False, since the FABulous nextpn integration does not support vectors
- type support_vectors:
bool
Generate the IO BELs for a list of generative IOs.
- param gen_ios:
List of Generative IOs to generate the IO BEL.
- type gen_ios:
list[Gen_IO]
- param bel_path:
Name of the BEL to be generated.
- type bel_path:
Path
- param overwrite:
Default is True Overwrite the existing BEL file if it exists, by default True. If False, it will read the existing BEL file and return the Bel object, without generating a new one.
- type overwrite:
bool, optional
- param multiplexerStyle:
Default is MultiplexerStyle.CUSTOM Use generic or custom multiplexers.
- type multiplexerStyle:
MultiplexerStyle, optional
- returns:
The generated Bel object or None if no generative IOs are present.
- rtype:
Bel | None
- raises InvalidFileType:
If a wrong bel file suffix is specified.
- raises InvalidPortType:
If an invalid IO type is specified for generative IOs.
- raises SpecMissMatch:
If the multiplexer style is not supported for generative IOs.
- raises ValueError:
If the number of config access ports does not match the number of config bits.
Generate a custom tile configuration.
A tile .csv file and a switch matrix .list file will be generated based on the given tile folder or the path to the BEL folder.
The provided path may contain BEL files, which will be included in the generated tile .csv file as well as the generated switch matrix .list file.
- param tile_path:
The path to the tile folder. If the path is a file, the parent directory will be used as the tile folder.
- type tile_path:
Path
- returns:
Path to the generated tile .csv file.
- rtype:
Path
- raises ValueError:
If the tile path is not a valid tile path or if the tile folder does not exist.
Generate a switch matrix list file for a given tile and its BELs.
The list file is based on a dummy list file, derived from the LUT4AB switch matrix list file. It is also possible to automatically generate connections for carry chains between the BELs.
- param tileName:
Name of the tile
- type tileName:
str
- param bels:
List of bels in the tile
- type bels:
list[Bel]
- param outFile:
Path to the switchmatrix list file output
- type outFile:
Path
- param carryportsTile:
Dictionary of carry ports for the tile
- type carryportsTile:
dict[str, dict[IO, str]]
- param localSharedPortsTile:
List of local shared ports for the tile, based on JUMP wire definitions
- type localSharedPortsTile:
dict[str, list[Port]]
- raises ValueError:
Bels have more than 32 Bel inputs.
Bels have more than 8 Bel outputs.
Invalid list formatting in file.
Number of carry ins and carry outs do not match.