|
HAL
v4.5.0-258-gf372a0264
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <hal_core/netlist/gate_library/gate_library_parser/gate_library_parser.h>


Public Types | |
| enum class | ParseStatus { NoError , NeedsUpgrade , UnknownError } |
Public Member Functions | |
| GateLibraryParser () | |
| virtual | ~GateLibraryParser () |
| virtual Result< std::unique_ptr< GateLibrary > > | parse (const std::filesystem::path &file_path)=0 |
Static Public Member Functions | |
| static ParseStatus | get_parse_status () |
| static void | request_upgrade () |
Static Protected Member Functions | |
| static void | set_parse_status (ParseStatus status) |
| static bool | is_upgrade_requested () |
The gate library parser is the base class that needs to be inherited from all parsers that shall be registered with HAL.
Definition at line 42 of file gate_library_parser.h.
|
strong |
The outcome of the most recent parse as reported by the parser.
Definition at line 48 of file gate_library_parser.h.
| hal::GateLibraryParser::GateLibraryParser | ( | ) |
Sets the parse status to UnknownError until the parser reports otherwise.
Definition at line 14 of file gate_library_parser.cpp.
References UnknownError.
|
virtual |
Withdraws a pending upgrade request, so that it applies to a single parse only.
Definition at line 19 of file gate_library_parser.cpp.
|
static |
Get the outcome of the most recent parse, e.g., to find out why loading a gate library failed.
If loading fails before any parser is involved, e.g., because the file does not exist, the status still refers to an earlier parse.
Definition at line 24 of file gate_library_parser.cpp.
|
staticprotected |
Check whether the current parse may upgrade a gate library file in an outdated format.
true if an upgrade was requested, false otherwise. Definition at line 39 of file gate_library_parser.cpp.
|
pure virtual |
Parses the gate library definition file.
| [in] | file_path | - Path to the file containing the gate library definition. |
Implemented in hal::LibertyParser, and hal::HGLParser.
|
static |
Allow the next parse to upgrade a gate library file in an outdated format.
The upgrade replaces the file, so it must only be requested with the consent of the user. The request applies to the next parse only and is withdrawn once that parse is done.
Definition at line 29 of file gate_library_parser.cpp.
|
staticprotected |
Report the outcome of the current parse.
| [in] | status | - The parse status. |
Definition at line 34 of file gate_library_parser.cpp.
References hal::status.
Referenced by hal::HGLParser::parse().