FABulous.fabric_generator.gen_fabric.gen_helper#

Helper functions for FPGA fabric generation.

This module provides utility functions that assist in various aspects of FPGA fabric generation, including switch matrix bootstrapping, signal ordering, and file generation utilities. These functions support the main fabric generation workflow by providing common operations needed across multiple generation stages.

Classes#

Functions#

CSV2list(InFileName, OutFileName)[source]#
Parameters:
  • InFileName (str)

  • OutFileName (str)

Return type:

None

Export a CSV switch matrix description into its equivalent list representation.

param InFileName:

The input file name of the CSV file

type InFileName:

str

param OutFileName:

The directory of the list file to be written

type OutFileName:

str

bootstrapSwitchMatrix(tile, outputDir)[source]#
Parameters:
Return type:

None

Generate a blank switch matrix CSV file for the given tile.

The top left corner will contain the name of the tile. Columns are the source signals and rows are the destination signals.

The order of the signal will be: - standard wire - BEL signal with prefix - GEN_IO signals with prefix - jump wire

The order is important as this order will be used during switch matrix generation.

param tile:

The tile to generate the switch matrix for

type tile:

Tile

param outputDir:

The output directory to write the switch matrix to

type outputDir:

str

list2CSV(InFileName, OutFileName)[source]#
Parameters:
Return type:

None

Export a list file into its equivalent CSV switch matrix representation.

A comment will be appended to the end of the column and row of the matrix, which will indicate the number of signals in a given row.

param InFileName:

The input file name of the list file

type InFileName:

str

param OutFileName:

The directory of the CSV file to be written

type OutFileName:

str

raises ValueError:

If the list file contains signals that are not in the matrix file