HAL
hal::LibertyParser Class Reference

#include <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

Definition at line 46 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">; }

<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.

Referenced by hal::TEST_F().


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