Netlist Serializer

HAL Netlist Serializer functions.

hal_py.NetlistSerializer.deserialize_from_file(hal_file: os.PathLike, gate_lib: hal_py.GateLibrary = None) → hal_py.Netlist

Deserializes a netlist from a .hal file using the provided gate library. If no gate library is provided, a gate library path must be specified within the .hal file.

Parameters:
Returns:

The deserialized netlist on success, None otherwise.

Return type:

hal_py.Netlist or None

hal_py.NetlistSerializer.serialize_to_file(netlist: hal_py.Netlist, hal_file: os.PathLike) → bool

Serializes a netlist into a .hal file.

Parameters:
Returns:

True on success, False otherwise.

Return type:

bool