parse_csv¶
Contains functions for parsing CSV files related to the fabric definition.
Functions¶
|
Parse a CSV file and returns a fabric object. |
|
Parse a CSV supertile configuration file and returns all SuperTile objects. |
|
Parse a CSV tile configuration file and returns all tile objects. |
Module Contents¶
- parseFabricCSV(fileName)[source]¶
Parse a CSV file and returns a fabric object.
- Parameters:
fileName (str) – Directory of the CSV file.
- Raises:
FileNotFoundError – If the input does not exist.
InvalidFabricDefinition – If the fabric definition is invalid.
InvalidFabricParameter – If the fabric parameter is invalid.
InvalidFileType – If the input file is not a CSV file.
- Returns:
The fabric object.
- Return type:
Fabric
- parseSupertilesCSV(fileName, tileDic)[source]¶
Parse a CSV supertile configuration file and returns all SuperTile objects.
- Parameters:
- Raises:
InvalidFileType – If the input file is not a CSV file.
FileNotFoundError – If the input does not exist.
InvalidSupertileDefinition – If the supertile definition is invalid.
- Returns:
List of SuperTile objects.
- Return type:
list[SuperTile]
- parseTilesCSV(fileName)[source]¶
Parse a CSV tile configuration file and returns all tile objects.
- Parameters:
fileName (Path) – The path to the CSV file.
- Returns:
A tuple containing a list of Tile objects and a list of common wire pairs.
- Return type:
- Raises:
ValueError – If CARRY port prefix is not a string
FileExistsError – If the input does not exist.
InvalidFileType – If the input file is not a CSV file.
InvalidTileDefinition – If the tile definition is invalid.
InvalidPortType – If port type is invalid.