parse_configmem

Configuration memory parser for FABulous FPGA tiles.

This module parses configuration memory CSV files that define how configuration bits are mapped to memory frames in frame-based configuration systems. It validates the configuration data structure and creates ConfigMem objects for code generation.

The parser handles: - Frame-based configuration bit mapping - Bit mask validation for frame utilization - Configuration bit range parsing (single bits, ranges, lists) - Error checking for bit allocation conflicts - Memory frame structure validation

Functions

parseConfigMem(fileName, maxFramePerCol, ...)

Parse the config memory CSV file into a list of ConfigMem objects.

Module Contents

parseConfigMem(fileName, maxFramePerCol, frameBitPerRow, globalConfigBits)[source]

Parse the config memory CSV file into a list of ConfigMem objects.

Parameters:
  • fileName (Path) – Directory of the config memory CSV file

  • maxFramePerCol (int) – Maximum number of frames per column

  • frameBitPerRow (int) – Number of bits per row

  • globalConfigBits (int) – Number of global config bits for the config memory

Raises:

ValueError

  • Invalid amount of frame entries in the config memory CSV file

  • Too many values in bit mask

  • Length of bit mask does not match the number of frame bits per row

  • Bit mask does not have enough values matching the number of the given config bits

  • Repeated config bit entry in ‘:’ separated format in config bit range

  • Repeated config bit entry in list format in config bit range

  • Invalid range entry in config bit range

Returns:

List of ConfigMem objects parsed from the config memory CSV file.

Return type:

list[ConfigMem]