Project Manager

class hal_py.ProjectManager

Project manager class that handles opening, closing, and saving of projects.

class ProjectStatus
Represents the logic value that a Boolean function operates on.

Members:

NONE : Represents the default state.

OPENED : Represents an open project state.

SAVED : Represents a saved project state.

name
create_project_directory(self: hal_py.ProjectManager, path: str) → bool

Create an empty project directory at the specified location. The project directory must not exist.

Parameters:path (str) – The path to the new project directory.
Returns:True on success, False otherwise.
Return type:bool
get_filename(self: hal_py.ProjectManager, serializer_name: str) → str

Returns the relative path of the file to be parsed by an external serializer.

Parameters:serializer_name (str) – The unique name of the serializer.
Returns:The relative file path.
Return type:str
get_netlist_filename(self: hal_py.ProjectManager) → str

Returns the path to the netlist file.

Returns:The netlist file path.
Return type:str
get_project_directory(self: hal_py.ProjectManager) → hal_py.ProjectDirectory

Returns project directory.

Returns:project directory
Return type:hal_py.ProjectDirectory
get_project_status(self: hal_py.ProjectManager) → hal_py.ProjectManager.ProjectStatus

Returns the current project status.

Returns:The project status value.
Return type:hal_py.ProjectManager.ProjectStatus
static instance() → hal_py.ProjectManager

Returns the singleton instance which gets constructed upon first call.

Returns:The singleton instance.
Return type:hal_py.ProjectManager
open_project(self: hal_py.ProjectManager, path: str = '') → bool

Open the project specified by the provided directory path.

Parameters:path (str) – The path to the project directory. Can be omitted if the path was previously set using ProjectManager::set_project_directory.
Returns:True on success, False otherwise.
Return type:bool
remove_project_directory(self: hal_py.ProjectManager) → bool

Remove the existing project directory and clear the path member variable.

Returns:True on success, False otherwise.
Return type:bool
serialize_project(self: hal_py.ProjectManager, netlist: hal_py.Netlist, shadow: bool = False) → bool

Serialize the netlist and all dependent data to the project directory.

Parameters:
  • netlist (hal_py.Netlist) – The netlist.
  • shadow (bool) – Set to True if function is called from autosave procedure, False otherwise. Defaults to False.
Returns:

True if serialization of the netlist was successful, False otherwise.

Return type:

bool

set_gate_library_path(self: hal_py.ProjectManager, gl_path: str) → None

Set the path to the gate library file.

Parameters:gl_path (str) – The path to the gate library file.
set_project_directory(self: hal_py.ProjectManager, path: str) → None

Set path to the project directory.

Parameters:path (str) – The path to the project directory.
set_project_status(self: hal_py.ProjectManager, status: hal_py.ProjectManager.ProjectStatus) → None

Set the current project status to a new value. Must be called when a project is closed.

Parameters:status (hal_py.ProjectManager.ProjectStatus) – The new project status value.