piel.tools.openlane.utils#

Module Contents#

Functions#

extract_datetime_from_path(→ str)

Extracts the datetime from a given run_path and returns it as a string.

find_all_design_runs(→ list[pathlib.Path])

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

find_latest_design_run(design_directory, run_name, ...)

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

get_gds_path_from_design_run(→ pathlib.Path)

Returns the path to the final GDS generated by OpenLane.

get_design_run_version(→ Literal[v1, v2])

Returns the version of the design run.

sort_design_runs(→ dict[str, list[pathlib.Path]])

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

extract_datetime_from_path(run_path: pathlib.Path) str[source]#

Extracts the datetime from a given run_path and returns it as a string.

find_all_design_runs(design_directory: piel.types.piel_path_types, run_name: str | None = None) list[pathlib.Path][source]#

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

If a run_name is specified, then the function will return the exact run if it exists. Otherwise, it will return the latest run

Parameters:
  • design_directory (piel_path_types) – The path to the design directory

  • run_name (str, optional) – The name of the run to return. Defaults to None.

  • version (Literal["v1", "v2"], optional) – The version of OpenLane to use. Defaults to None.

Raises:

ValueError – If the run_name is specified but not found in the design_directory

Returns:

A list of pathlib.Path objects corresponding to the runs

Return type:

list[pathlib.Path]

find_latest_design_run(design_directory: piel.types.piel_path_types, run_name: str | None = None, version: Literal[v1, v2] | None = None)[source]#

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

If a run_name is specified, then the function will return the exact run if it exists. Otherwise, it will return the latest run.

Parameters:
  • design_directory (piel_path_types) – The path to the design directory

  • run_name (str, optional) – The name of the run to return. Defaults to None.

  • version (Literal["v1", "v2"], optional) – The version of the run to return. Defaults to None.

Raises:

ValueError – If the run_name is specified but not found in the design_directory

Returns:

A tuple of the latest run path and the version

Return type:

(pathlib.Path, str)

get_gds_path_from_design_run(design_directory: piel.types.piel_path_types, run_directory: piel.types.piel_path_types | None = None) pathlib.Path[source]#

Returns the path to the final GDS generated by OpenLane.

Parameters:
  • design_directory (piel_path_types) – The path to the design directory

  • run_directory (piel_path_types, optional) – The path to the run directory. Defaults to None. Otherwise gets the latest run.

Returns:

The path to the final GDS

Return type:

pathlib.Path

get_design_run_version(run_directory: piel.types.piel_path_types) Literal[v1, v2][source]#

Returns the version of the design run.

sort_design_runs(path_list: list[pathlib.Path]) dict[str, list[pathlib.Path]][source]#

For a given design_directory, the openlane output can be found in the runs subdirectory. This function sorts the runs according to the default notations between both openlane and openlane2 run formats.

Parameters:

path_list (list[pathlib.Path]) – A list of pathlib.Path objects corresponding to the runs

Returns:

A dictionary of sorted runs

Return type:

dict[str, list[pathlib.Path]]