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 FileNotFoundError:
If the input does not exist.
- raises InvalidFabricDefinition:
If the fabric definition is invalid.
- raises InvalidFabricParameter:
If the fabric parameter is invalid.
- raises InvalidFileType:
If the input file is not a 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:
Path
- param tileDic:
Dict of tiles.
- type tileDic:
dict[str, Tile]
- raises InvalidFileType:
If the input file is not a CSV file.
- raises FileNotFoundError:
If the input does not exist.
- raises InvalidSupertileDefinition:
If the supertile definition is invalid.
- 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:
Path
- 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 FileExistsError:
If the input does not exist.
- raises InvalidFileType:
If the input file is not a CSV file.
- raises InvalidTileDefinition:
If the tile definition is invalid.
- raises InvalidPortType:
If port type is invalid.