fabric_geometry

Classes for generating and managing the geometry of FPGA fabrics.

Attributes

Classes

FabricGeometry

Fetch and hold geometric information about a fabric.

Module Contents

FabricGeometry

class FabricGeometry(fabric, padding=8)[source]

Fetch and hold geometric information about a fabric.

Objects of this class can be constructed by passing a Fabric object and optionally, padding.

Creates the fabric geometry by processing the given fabric definition and automatically generating the complete geometric layout.

Parameters:
  • fabric (Fabric) – The fabric object from CSV definition files

  • padding (int, optional) – Padding used throughout the geometry, by default 8

Variables:
  • fabric (Fabric) – The fabric object passed from the CSV definition files

  • tileNames (set[str]) – Set of unique tileNames in the fabric

  • tileGeomMap (dict[str, TileGeometry]) – Map of the geometry of each tile by name

  • tileLocs (list[list[Location]]) – Locations of all tiles in the fabric

  • padding (int) – Padding used throughout the geometry, in multiples of the width between wires

  • width (int) – Width of the fabric

  • height (int) – Height of the fabric

Methods

genNeighbourConstraints(queried) None[source]

Generate neighbour constraints for a given tile geometry.

Parameters:

queried (TileGeometry) – The tile geometry to generate constraints for

generateGeometry() None[source]

Generate the geometric information from the given fabric object.

The border attribute is set for tiles that are located at a border of the tile. This is done to ensure no stair-like wires being generated for these tiles. The distinction left/right and top/bottom is made, to prevent generation of horizontal and vertical stair-like wires respectively.

saveToCSV(fileName) None[source]

Save geometric information of the given fabric for the graphical frontend.

Parameters:

fileName (str) – The name of the csv file

totalWireLines() int[source]

Return the total amount of lines (segments) of wires of the fabrics routing.

Can, for instance, be used to initialize the size of datastructures in the frontend.

GENERATOR_VERSION = '1.0.0'[source]