FABulous.fabric_generator.parser.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
Classes#
Functions#
Parse the config memory CSV file into a list of ConfigMem objects.
- param fileName:
Directory of the config memory CSV file
- type fileName:
str
- param maxFramePerCol:
Maximum number of frames per colum
- type maxFramePerCol:
int
- param frameBitPerRow:
Number of bits per row
- type frameBitPerRow:
int
- param globalConfigBits:
Number of global config bits for the config memory
- type globalConfigBits:
int
- 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.
- rtype:
list[ConfigMem]