HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::LibertyParser Class Reference

#include </home/runner/work/hal/hal/plugins/liberty_parser/include/liberty_parser/liberty_parser.h>

Inheritance diagram for hal::LibertyParser:
Inheritance graph
Collaboration diagram for hal::LibertyParser:
Collaboration graph

Public Member Functions

 LibertyParser ()=default
 
 ~LibertyParser ()=default
 
Result< std::unique_ptr< GateLibrary > > parse (const std::filesystem::path &file_path) override
 
- Public Member Functions inherited from hal::GateLibraryParser
 GateLibraryParser ()=default
 
virtual ~GateLibraryParser ()=default
 

Detailed Description

A gate library parser for the Liberty format.

Definition at line 48 of file liberty_parser.h.

Constructor & Destructor Documentation

◆ LibertyParser()

hal::LibertyParser::LibertyParser ( )
default

◆ ~LibertyParser()

hal::LibertyParser::~LibertyParser ( )
default

Member Function Documentation

◆ parse()

Result< std::unique_ptr< GateLibrary > > hal::LibertyParser::parse ( const std::filesystem::path &  file_path)
overridevirtual

Deserializes a gate library in Liberty format from the string stream into a gate library object. In order to also support lookup tables (LUTs) the following extension is allowed:

lut(<function name>) {
data_category = <category>;
data_identifier = <identifier>;
direction = <"ascending" or "descending">;
}
PinDirection direction
std::string name
std::string identifier

<category> and <identifier> refer to the location where the LUT configuration string is stored, for example "generic" and "init". direction describes whether the least significant bit of the configuration is the output for inputs 000... (ascending) or 111... (descending).

Parameters
[in]file_path- Path to the file containing the gate library definition.
Returns
The gate library on success, an error otherwise.

Implements hal::GateLibraryParser.

Definition at line 14 of file liberty_parser.cpp.

References ERR, ERR_APPEND, and OK.


The documentation for this class was generated from the following files: