sm_geometry¶
Switch matrix geometry definitions.
Classes¶
|
A data structure representing the geometry of a Switch Matrix. |
Module Contents¶
SmGeometry¶
- SmGeometry :module:
A data structure representing the geometry of a Switch Matrix.
Sets all attributes to default values: None for names and paths, zero for dimensions and coordinates, and empty lists for ports and port geometries.
- ivar name:
Name of the switch matrix
- vartype name:
str
- ivar src:
File path of the switch matrix HDL source file
- vartype src:
Path
- ivar csv:
File path of the switch matrix CSV file
- vartype csv:
Path
- ivar width:
Width of the switch matrix
- vartype width:
int
- ivar height:
Height of the switch matrix
- vartype height:
int
- ivar relX:
X coordinate of the switch matrix, relative within the tile
- vartype relX:
int
- ivar relY:
Y coordinate of the switch matrix, relative within the tile
- vartype relY:
int
- ivar northPorts:
List of the ports of the switch matrix in north direction
- vartype northPorts:
list[Port]
- ivar southPorts:
List of the ports of the switch matrix in south direction
- vartype southPorts:
list[Port]
- ivar eastPorts:
List of the ports of the switch matrix in east direction
- vartype eastPorts:
list[Port]
- ivar westPorts:
List of the ports of the switch matrix in west direction
- vartype westPorts:
list[Port]
- ivar jumpPorts:
List of the jump ports of the switch matrix
- vartype jumpPorts:
list[Port]
- ivar portGeoms:
List of geometries of the ports of the switch matrix
- vartype portGeoms:
list[PortGeometry]
- ivar northWiresReservedWidth:
Reserved width for wires going north
- vartype northWiresReservedWidth:
int
- ivar southWiresReservedWidth:
Reserved width for wires going south
- vartype southWiresReservedWidth:
int
- ivar eastWiresReservedHeight:
Reserved height for wires going east
- vartype eastWiresReservedHeight:
int
- ivar westWiresReservedHeight:
Reserved height for wires going west
- vartype westWiresReservedHeight:
int
- ivar southPortsTopY:
Top most y coord of any south port, reference for stair-wires
- vartype southPortsTopY:
int
- ivar westPortsRightX:
Right most x coord of any west port, reference for stair-wires
- vartype westPortsRightX:
int
- generateBelPortsbelGeomList :module:
Generate port geometries for BEL connections to the switch matrix.
Creates PortGeometry objects for connecting BEL internal ports to the switch matrix. These ports facilitate routing between BELs and the switch matrix interconnect network.
- param belGeomList:
List of BEL geometries to connect to the switch matrix
- type belGeomList:
list[BelGeometry]
- generateGeometrytile, tileBorder, belGeoms, padding :module:
Generate the geometry for a switch matrix.
Creates the geometric representation of a switch matrix including its dimensions, port arrangements, and spatial relationships. Calculates the required space for routing wires and positions the switch matrix within the tile. the required space for routing wires and positions for the switch matrix
- param tile:
The tile object containing the switch matrix definition
- type tile:
Tile
- param tileBorder:
The border type of the tile within the fabric
- type tileBorder:
Border
- param belGeoms:
List of BEL geometries within the same tile
- type belGeoms:
list[BelGeometry]
- param padding:
The padding space to add around the switch matrix
- type padding:
int
- generatePortsGeometrypadding :module:
Generate the geometry for all ports of the switch matrix.
Creates PortGeometry objects for all jump, north, south, east, and west ports of the switch matrix. Positions each port according to its type and assigns appropriate coordinates and grouping information.
- param padding:
The padding space to add around ports
- type padding:
int
- preprocessPortstileBorder :module:
Order the ports for downstream drawing.
Ensure that ports are ordered correctly, merge connected jump ports and augment ports for term tiles. This step augments ports in border tiles. This is needed, as these are not contained in the (north…west)SidePorts in FABulous.
- saveToCSVwriter :module:
Save switch matrix geometry data to CSV format.
Writes the switch matrix geometry information including name, source and CSV file paths, position, dimensions, and all port geometries to a CSV file using the provided writer.
- param writer:
The CSV writer object to use for output
- type writer:
object