FABulous.fabric_cad.bit_gen#

Bitstream generation utilities for FABulous FPGA fabrics.

This module provides functionality for generating bitstreams from FASM (FPGA Assembly) files for FABulous FPGA fabrics. It handles the conversion of place-and-route results into configuration bitstreams that can be loaded onto the FPGA fabric.

The module includes functions for parsing FASM files, processing configuration bits, and generating the final bitstream output in various formats.

Functions#

bit_gen()[source]#
Return type:

None

Command-line entry point for bitstream generation.

Parses command-line arguments and calls genBitstream to create bitstream files from FASM and specification inputs.

bitstring_to_bytes(s)[source]#
Parameters:

s (str)

Return type:

bytes

Convert binary string to bytes.

param s:

Binary string (e.g., ‘10110101’)

type s:

str

returns:

Byte representation of the binary string

rtype:

bytes

genBitstream(fasmFile, specFile, bitstreamFile)[source]#
Parameters:
  • fasmFile (str)

  • specFile (str)

  • bitstreamFile (str)

Return type:

None

Generate the bitstream from the FASM file using the bitstream specification.

fasmFilestr

Path to FASM file containing configuration features

specFilestr

Path to pickle file containing bitstream specification

bitstreamFilestr

Output path for generated bitstream file