![]() |
HAL
|
Functions | |
bool | serialize_to_file (const Netlist *nl, const std::filesystem::path &hal_file) |
std::unique_ptr< Netlist > | deserialize_from_file (const std::filesystem::path &hal_file, GateLibrary *gatelib) |
std::unique_ptr< Netlist > | deserialize_from_string (const std::string &hal_string, GateLibrary *gatelib) |
NETLIST_API std::unique_ptr< Netlist > hal::netlist_serializer::deserialize_from_file | ( | const std::filesystem::path & | hal_file, |
GateLibrary * | gate_lib = nullptr |
||
) |
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.
[in] | hal_file | - The path to the .hal file. |
[in] | gate_lib | - The gate library. Defaults to a nullptr . |
nullptr
otherwise. Definition at line 1029 of file netlist_serializer.cpp.
References log_error.
Referenced by hal::netlist_factory::load_netlist(), and hal::netlist_serializer_init().
NETLIST_API std::unique_ptr< Netlist > hal::netlist_serializer::deserialize_from_string | ( | const std::string & | hal_string, |
GateLibrary * | gate_lib = nullptr |
||
) |
Deserializes a string which contains a netlist in HAL-(JSON)-format using the provided gate library. If no gate library is provided, a gate library path must be specified within the string.
[in] | hal_string | - The string containing the netlist in HAL-(JSON)-format. |
[in] | gate_lib | - The gate library. Defaults to a nullptr . |
nullptr
otherwise. Definition at line 1051 of file netlist_serializer.cpp.
Referenced by hal::netlist_factory::load_netlist_from_string(), and hal::netlist_serializer_init().
NETLIST_API bool hal::netlist_serializer::serialize_to_file | ( | const Netlist * | netlist, |
const std::filesystem::path & | hal_file | ||
) |
Serializes a netlist into a .hal
file.
[in] | netlist | - The netlist to serialize. |
[in] | hal_file | - The path to the .hal file. |
true
on success, false
otherwise. Definition at line 970 of file netlist_serializer.cpp.
References DURATION, hal::ProjectManager::get_project_directory(), hal::ProjectManager::instance(), log_error, log_info, and SERIALIZATION_FORMAT_VERSION.
Referenced by hal::netlist_serializer_init(), and hal::ProjectManager::serialize_project().