FABulous.geometry_generator.bel_geometry¶
Class for generating and managing the geometry of BELs.
Classes¶
- class BelGeometry[source]¶
A data structure representing the geometry of a bel.
Sets all attributes to default values: None for names/sources, zero for dimensions and coordinates, and empty lists for port names and geometries.
Methods:
- adjustPos(relX, relY)[source]¶
Adjust the position of the BEL within its containing tile.
Updates the relative X and Y coordinates of the BEL to position it correctly within the tile layout.
- generateGeometry(bel, padding)[source]¶
Generate the geometry for a BEL (Basic Element).
Creates the geometric representation of a BEL including its dimensions and port layout. The height is determined by the maximum number of ports on either side plus padding, while width is currently fixed.
- generatePortsGeometry(bel, padding)[source]¶
Generate the geometry for all ports of the BEL.
Creates PortGeometry objects for all internal and external input/output ports of the BEL. Internal ports are positioned on the left side (X=0), while external ports are positioned on the right side (X=width).
- saveToCSV(writer)[source]¶
Save BEL geometry data to CSV format.
Writes the BEL geometry information including name, source file, position, dimensions, and all port geometries to a CSV file using the provided writer.
- Parameters:
writer (object) – The CSV writer object to use for output
- Return type:
None