fabric¶
FPGA fabric definition module.
This module contains the Fabric class which represents the complete FPGA fabric including tile layout, configuration parameters, and connectivity information. The fabric is the top-level container for all tiles, BELs, and routing resources.
Classes¶
|
Store the configuration of a fabric. |
Module Contents¶
Fabric¶
- Fabric :module:
Store the configuration of a fabric.
All the information is parsed from the CSV file.
- ivar fabric_dir:
The path to the fabric config file
- vartype fabric_dir:
Path
- ivar tile:
The tile map of the fabric
- vartype tile:
list[list[Tile]]
- ivar name:
The name of the fabric
- vartype name:
str
- ivar numberOfRows:
The number of rows of the fabric
- vartype numberOfRows:
int
- ivar numberOfColumns:
The number of columns of the fabric
- vartype numberOfColumns:
int
- ivar configBitMode:
The configuration bit mode of the fabric. Currently supports frame based or ff chain
- vartype configBitMode:
ConfigBitMode
- ivar frameBitsPerRow:
The number of frame bits per row of the fabric
- vartype frameBitsPerRow:
int
- ivar maxFramesPerCol:
The maximum number of frames per column of the fabric
- vartype maxFramesPerCol:
int
- ivar package:
The extra package used by the fabric. Only useful for VHDL output.
- vartype package:
str
- ivar generateDelayInSwitchMatrix:
The amount of delay in a switch matrix.
- vartype generateDelayInSwitchMatrix:
int
- ivar multiplexerStyle:
The style of the multiplexer used in the fabric. Currently supports custom or generic
- vartype multiplexerStyle:
MultiplexerStyle
- ivar frameSelectWidth:
The width of the frame select signal.
- vartype frameSelectWidth:
int
- ivar rowSelectWidth:
The width of the row select signal.
- vartype rowSelectWidth:
int
- ivar desync_flag:
The flag indicating desynchronization status, used to manage timing issues within the fabric.
- vartype desync_flag:
int
- ivar numberOfBRAMs:
The number of BRAMs in the fabric.
- vartype numberOfBRAMs:
int
- ivar superTileEnable:
Whether the fabric has super tile.
- vartype superTileEnable:
bool
- ivar disableUserCLK:
Whether to disable UserCLK generation in the fabric.
- vartype disableUserCLK:
bool
- ivar tileDic:
A dictionary of tiles used in the fabric. The key is the name of the tile and the value is the tile.
- vartype tileDic:
dict[str, Tile]
- ivar superTileDic:
A dictionary of super tiles used in the fabric. The key is the name of the supertile and the value is the supertile.
- vartype superTileDic:
dict[str, SuperTile]
- ivar unusedTileDic:
A dictionary of tiles that are not used in the fabric, but defined in the fabric.csv. The key is the name of the tile and the value is the tile.
- vartype unusedTileDic:
dict[str, Tile]
- ivar unusedSuperTileDic:
A dictionary of super tiles that are not used in the fabric, but defined in the fabric.csv. The key is the name of the tile and the value is the tile.
- vartype unusedSuperTileDic:
dict[str, SuperTile]
- ivar commonWirePair:
A list of common wire pairs in the fabric.
- vartype commonWirePair:
list[tuple[str, str]]
- determine_border_sidex, y :module:
Determine which border side a tile position is on, if any.
- param x:
X coordinate in the fabric grid
- type x:
int
- param y:
Y coordinate in the fabric grid
- type y:
int
- returns:
The border side (NORTH, SOUTH, EAST, or WEST) if the position is on a border, None otherwise. If on a corner, returns the vertical side (NORTH or SOUTH) as priority.
- rtype:
Side | None
- find_tile_positionstile :module:
Find all positions where a tile or supertile appears in the fabric grid.
- param tile:
The tile or supertile to search for
- type tile:
Tile | SuperTile
- returns:
List of (x, y) positions where the tile/supertile appears, or None if not found
- rtype:
list[tuple[int, int]] | None
- getAllUniqueBels :module:
Get all unique BELs from all tiles in the fabric.
- returns:
A list of all unique BELs across all tiles.
- rtype:
list[Bel]
- getBelsByTileXYx, y :module:
Get all the Bels of a tile.
- param x:
The x coordinate of / column the tile.
- type x:
int
- param y:
The y coordinate / row of the tile.
- type y:
int
- returns:
A list of Bels in the tile.
- rtype:
list[Bel]
- raises ValueError:
Tile coordinates are out of range.
- getSuperTileByNamename :module:
Get a supertile by its name from the fabric.
Searches for the supertile first in the used supertiles dictionary, then in the unused supertiles dictionary if not found.
- param name:
The name of the supertile to retrieve.
- type name:
str
- returns:
The super tile object if found.
- rtype:
SuperTile
- raises KeyError:
If the super tile name is not found in either used or unused super tiles.
- getTileByNamename :module:
Get a tile by its name from the fabric.
Search for the tile first in the used tiles dictionary, then in the unused tiles dictionary then in the supertiles if not found.
- param name:
The name of the tile to retrieve.
- type name:
str
- returns:
The tile or supertile object if found.
- rtype:
Tile | SuperTile
- raises KeyError:
If the tile name is not found in either used or unused tiles.
- get_all_unique_tiles :module:
Get list of unique tile types used in the fabric.
- returns:
List of unique tile types (one instance per type name)
- rtype:
list[Tile | SuperTile]
- get_tile_row_column_indicestile_name :module:
Get all row and column indices where a tile type appears.
- param tile_name:
Name of the tile type to search for
- type tile_name:
str
- returns:
(row_indices, column_indices) where the tile type appears
- rtype:
tuple[set[int], set[int]]