parse_csvΒΆ

Contains functions for parsing CSV files related to the fabric definition.

FunctionsΒΆ

parseFabricCSV(fileName)

Parse a CSV file and returns a fabric object.

parsePortLine(line)

Parse a single line of the port configuration from the CSV file.

parseSupertilesCSV(fileName, tileDic)

Parse a CSV supertile configuration file and returns all SuperTile objects.

parseTilesCSV(fileName)

Parse a CSV tile configuration file and returns all tile objects.

Module ContentsΒΆ

parseFabricCSV(fileName) Fabric[source]ΒΆ

Parse a CSV file and returns a fabric object.

Parameters:

fileName (str) – Directory of the CSV file.

Raises:
Returns:

The fabric object.

parsePortLine(line) tuple[list[Port], tuple[str, str] | None][source]ΒΆ

Parse a single line of the port configuration from the CSV file.

Parameters:

line (str) – CSV line containing port configuration data.

Raises:

InvalidPortType – If the port definition is invalid.

Returns:

A tuple containing a list of parsed ports and an optional common wire pair.

parseSupertilesCSV(fileName, tileDic) list[SuperTile][source]ΒΆ

Parse a CSV supertile configuration file and returns all SuperTile objects.

Parameters:
  • fileName (Path) – The path to the CSV file.

  • tileDic (dict[str, Tile]) – Dict of tiles.

Raises:
Returns:

List of SuperTile objects.

parseTilesCSV(fileName) tuple[list[Tile], list[tuple[str, str]]][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.

Raises: