port_geometry¶
Port geometry definitions.
Classes¶
|
A data structure representing the geometry of a Port. |
|
Enumeration for different types of ports in the fabric geometry. |
Module Contents¶
PortGeometry¶
- PortGeometry :module:
A data structure representing the geometry of a Port.
Sets all attributes to default values: None for names and directions, zero for numeric values, and appropriate defaults for enumerated types.
- ivar name:
Name of the port
- vartype name:
str | None, optional
- ivar sourceName:
Name of the port source
- vartype sourceName:
str | None, optional
- ivar destName:
Name of the port destination
- vartype destName:
str | None, optional
- ivar type:
Type of the port
- vartype type:
PortType | None, optional
- ivar ioDirection:
IO direction of the port.
- vartype ioDirection:
IO
- ivar sideOfTile:
Side of the tile the port’s wire is on.
- vartype sideOfTile:
Side
- ivar offset:
Offset to the connected port.
- vartype offset:
int
- ivar wireDirection:
Direction of the ports wire
- vartype wireDirection:
Direction | None, optional
- ivar groupId:
ID of the port group.
- vartype groupId:
int
- ivar groupWires:
Number of wires in the port group.
- vartype groupWires:
int
- ivar relX:
X coordinate of the port, relative to its parent (bel, switch matrix).
- vartype relX:
int
- ivar relY:
Y coordinate of the port, relative to its parent (bel, switch matrix).
- vartype relY:
int
- ivar nextId:
ID of the next port in the group.
- vartype nextId:
int
- generateGeometryname, sourceName, destName, portType, ioDirection, relX, relY :module:
Generate the geometry for a port.
Sets the basic geometric and connection properties of the port, including its name, source/destination connections, type, I/O direction, and relative position within its parent component.
- param name:
Name of the port
- type name:
str
- param sourceName:
Name of the port source
- type sourceName:
str
- param destName:
Name of the port destination
- type destName:
str
- param portType:
Type of the port (SWITCH_MATRIX, JUMP, or BEL)
- type portType:
PortType
- param ioDirection:
I/O direction of the port (INPUT, OUTPUT, or INOUT)
- type ioDirection:
IO
- param relX:
X coordinate relative to the parent component
- type relX:
int
- param relY:
Y coordinate relative to the parent component
- type relY:
int
- saveToCSVwriter :module:
Save port geometry data to CSV format.
Writes the port geometry information including type, name, source/destination connections, I/O direction, and relative position to a CSV file using the provided writer.
- param writer:
The CSV writer object to use for output
- type writer:
object
PortType¶
- PortType(*args, **kwds) :module:
Inheritance: → PortType
Enumeration for different types of ports in the fabric geometry.
Defines the various categories of ports that can exist within the fabric: - SWITCH_MATRIX: Ports connected to switch matrices - JUMP: Jump ports for long-distance connections - BEL: Ports connected to Basic Elements of Logic