piel.tools.openlane.v1
#
These set of functions aim to provide functionality to automate interacting with OpenLanes v1 design into Python environment, whilst OpenLanes2 is under development.
Module Contents#
Functions#
Checks if a design has a config.json file. |
|
|
Checks if a design exists in the OpenLane v1 design folder. |
Configures and runs an OpenLane v1 design. |
|
Configures the OpenLane v1 flow script after checking that the design directory exists. |
|
For a given source_design_directory, this function reads in the config.json file and returns a set of parametric sweeps that gets used when creating a set of parametric designs. |
|
Takes a OpenLane v1 source directory and creates a parametric combination of these designs. |
|
|
Gets the latest version root of OpenLane v1. |
|
Gets the design directory from the root directory. |
|
Reads a config.json from a design directory. |
|
Writes a config.json onto a design_directory |
- check_config_json_exists_openlane_v1(design_name: str, root_directory: str | pathlib.Path | None = None) bool [source]#
Checks if a design has a config.json file.
- Parameters:
design_name (str) – Name of the design.
- Returns:
True if config.json exists.
- Return type:
config_json_exists(bool)
- check_design_exists_openlane_v1(design_name: str, root_directory: str | pathlib.Path | None = None) bool [source]#
Checks if a design exists in the OpenLane v1 design folder.
Lists all designs inside the Openlane V1 design root.
- Parameters:
design_name (str) – Name of the design.
- Returns:
True if design exists.
- Return type:
design_exists(bool)
- configure_and_run_design_openlane_v1(design_name: str, configuration: dict | None = None, root_directory: str | pathlib.Path | None = None) None [source]#
Configures and runs an OpenLane v1 design.
This function does the following: 1. Check that the design_directory provided is under $OPENLANE_ROOT/<latestversion>/designs 2. Check if config.json has already been provided for this design. If a configuration dictionary is inputted into the function parameters, then it overwrites the default config.json. 3. Create a script directory, a script is written and permissions are provided for it to be executable. 4. Permit and execute the openlane_flow.sh script in the scripts directory.
- Parameters:
design_name (str) – Name of the design.
configuration (dict | None) – Configuration dictionary.
root_directory (str | pathlib.Path) – Design directory.
- Returns:
None
- configure_flow_script_openlane_v1(design_name: str, root_directory: str | pathlib.Path | None = None) None [source]#
Configures the OpenLane v1 flow script after checking that the design directory exists.
- Parameters:
design_directory (str | pathlib.Path | None) – Design directory. Defaults to latest OpenLane root.
- Returns:
None
- configure_parametric_designs_openlane_v1(design_name: str, parameter_sweep_dictionary: dict, add_id: bool = True) list [source]#
For a given source_design_directory, this function reads in the config.json file and returns a set of parametric sweeps that gets used when creating a set of parametric designs.
- Parameters:
add_id (bool) – Add an ID to the design name. Defaults to True.
parameter_sweep_dictionary (dict) – Dictionary of parameters to sweep.
source_design_directory (str | pathlib.Path) – Source design directory.
- Returns:
List of configurations to sweep.
- Return type:
configuration_sweep(list)
- create_parametric_designs_openlane_v1(design_name: str, parameter_sweep_dictionary: dict, target_directory: str | pathlib.Path | None = None) None [source]#
Takes a OpenLane v1 source directory and creates a parametric combination of these designs.
- Parameters:
design_name (str) – Name of the design.
parameter_sweep_dictionary (dict) – Dictionary of parameters to sweep.
target_directory (str | pathlib.Path | None) – Optional target directory.
- Returns:
None
- get_latest_version_root_openlane_v1() pathlib.Path [source]#
Gets the latest version root of OpenLane v1.
- get_design_directory_from_root_openlane_v1(design_name: str, root_directory: str | pathlib.Path | None = None) pathlib.Path [source]#
Gets the design directory from the root directory.
- Parameters:
design_name (str) – Name of the design.
root_directory (str | pathlib.Path) – Design directory.
- Returns:
Design directory.
- Return type:
design_directory(pathlib.Path)
- read_configuration_openlane_v1(design_name: str, root_directory: str | pathlib.Path | None = None) dict [source]#
Reads a config.json from a design directory.
- Parameters:
design_name (str) – Design name.
root_directory (str | pathlib.Path) – Design directory.
- Returns:
Configuration dictionary.
- Return type:
configuration(dict)