FABulous.fabric_generator.parser.parse_csv#
Contains functions for parsing CSV files related to the fabric definition.
Classes#
Functions#
Parse a CSV file and returns a fabric object.
- param fileName:
Directory of the CSV file.
- type fileName:
str
- raises ValueError:
File provided is not a CSV file.
CSV file does not exist.
FabricBegin and FabricEnd regions cannot be found.
ParametersBegin and ParametersEnd regions cannot be found.
Bel entry extension is not “.v” or “.vhdl”.
Matrix entry extension is not “.list”, “.csv”, “.v”, or “.vhdl”.
Unknown tile description entry is found in the CSV file.
Unknown tile is found in the fabric entry in the CSV file.
Unknown super tile is found in the super tile entry in the CSV file.
Invalid ConfigBitMode is found in the parameter entry in the CSV file.
Invalid MultiplexerStyle is found in the parameter entry in the CSV file.
Invalid parameter entry is found in the CSV file.
- returns:
The fabric object.
- rtype:
Fabric
Parse a CSV supertile configuration file and returns all SuperTile objects.
- param fileName:
The path to the CSV file.
- type fileName:
str
- param tileDic:
Dict of tiles.
- type tileDic:
Dict[str, Tile]
- returns:
List of SuperTile objects.
- rtype:
List[SuperTile]
Parse a CSV tile configuration file and returns all tile objects.
- param fileName:
The path to the CSV file.
- type fileName:
str
- returns:
A tuple containing a list of Tile objects and a list of common wire pairs.
- rtype:
Tuple[List[Tile], List[Tuple[str, str]]]
:raises ValueError : If the input csv file is not a CSV file.: :raises ValueError : If the input csv file does not exist.: :raises ValueError : If the BEL file is not a VHDL or Verilog file.: :raises ValueError : If GEN_IO pins are lower than 1: :raises ValueError : If a GEN_IO is a CONFIGACCESS and not an OUTPUT.: :raises ValueError : If a GEN_IO with the same prefix already exists in the tile.: :raises ValueError : If a GEN_IO is CLOCKED and CLOCKED_COMB at the same time.: :raises ValueError : If the MATRIX file is not a .list, .csv, .v, or .vhdl file.: