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:
str
- 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
- raises FileNotFoundError ::
Prims file is not found
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
- raises ValueError:
If a wrong bel file suffix is specified.
In case of an invalid IO type for generative IOs.
If the number of config access ports does not match the number of config bits.
- returns:
The generated Bel object or None if no generative IOs are present.
- rtype:
Bel | None
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
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:
dicst[str, list[Port]]
- raises ValueError:
Bels have more than 32 Bel inputs.
- raises ValueError:
Bels have more than 8 Bel outputs.
- raises ValueError:
Invalid list formatting in file.
- raises ValueError:
Number of carry ins and carry outs do not match.