FABulous.fabric_definition.Port#
Port definition module for FPGA fabric.
This module contains the Port class, which represents a connection point on a tile in the FPGA fabric. Ports define the physical and logical characteristics of wires entering or leaving a tile, including their direction, source and destination names, offsets, and wire counts. These definitions are typically parsed from a CSV file that describes the fabric architecture.
Classes#
- class Port[source]#
Store all the port information defined in the CSV file.
The name, inOut and sideOfTile are added attributes to aid the generation of the fabric. The name and inOut are related. If the inOut is INPUT, then the name is the source name of the port on the tile. Otherwise, the name is the destination name of the port on the tile. The sideOfTile defines where the port is physically located on the tile, since for a north direction wire, the input will be physically located on the south side of the tile. The sideOfTile will make determining where the port is located much easier.
Methods:
- expandPortInfo(mode='SwitchMatrix')[source]#
Expand the port information to the individual bit signal.
If ‘Indexed’ is in the mode, then brackets are added to the signal name.
- Parameters:
mode (str, optional) – Mode for expansion. Defaults to “SwitchMatrix”. Possible modes are ‘all’, ‘allIndexed’, ‘Top’, ‘TopIndexed’, ‘AutoTop’, ‘AutoTopIndexed’, ‘SwitchMatrix’, ‘SwitchMatrixIndexed’, ‘AutoSwitchMatrix’, ‘AutoSwitchMatrixIndexed’
- Returns:
Tuple – A tuple of two lists. The first list contains the source names of the ports and the second list contains the destination names of the ports.
- Return type:
- expandPortInfoByName(indexed=False)[source]#
Expand port information to individual wire names.
Generates a list of individual wire names for this port, accounting for wire count and offset calculations. For termination ports (NULL), the wire count is multiplied by the Manhattan distance.