HAL
hal::NetlistParser Class Referenceabstract

#include <netlist_parser.h>

Inheritance diagram for hal::NetlistParser:
Inheritance graph
Collaboration diagram for hal::NetlistParser:
Collaboration graph

Public Member Functions

 NetlistParser ()=default
 
virtual ~NetlistParser ()=default
 
virtual Result< std::monostate > parse (const std::filesystem::path &file_path)=0
 
virtual Result< std::unique_ptr< Netlist > > instantiate (const GateLibrary *gate_library)=0
 
Result< std::unique_ptr< Netlist > > parse_and_instantiate (const std::filesystem::path &file_path, const GateLibrary *gate_library)
 

Detailed Description

Definition at line 42 of file netlist_parser.h.

Constructor & Destructor Documentation

◆ NetlistParser()

hal::NetlistParser::NetlistParser ( )
default

◆ ~NetlistParser()

virtual hal::NetlistParser::~NetlistParser ( )
virtualdefault

Member Function Documentation

◆ instantiate()

virtual Result<std::unique_ptr<Netlist> > hal::NetlistParser::instantiate ( const GateLibrary gate_library)
pure virtual

Instantiate the parsed netlist using the specified gate library.

Parameters
[in]gate_library- The gate library.
Returns
A pointer to the resulting netlist.

Implemented in hal::VHDLParser, and hal::VerilogParser.

◆ parse()

virtual Result<std::monostate> hal::NetlistParser::parse ( const std::filesystem::path &  file_path)
pure virtual

Parse a netlist into an internal intermediate format.

Parameters
[in]file_path- Path to the netlist file.
Returns
True on success, false otherwise.

Implemented in hal::VHDLParser, and hal::VerilogParser.

◆ parse_and_instantiate()

Result<std::unique_ptr<Netlist> > hal::NetlistParser::parse_and_instantiate ( const std::filesystem::path &  file_path,
const GateLibrary gate_library 
)
inline

Parse and instantiate a netlist using the specified gate library.

Parameters
[in]file_path- Path to the netlist file.
[in]gate_library- The gate library.
Returns
A pointer to the resulting netlist.

Definition at line 71 of file netlist_parser.h.

References ERR, and hal::gate_library_parser_manager::parse().

Referenced by hal::TEST_F().


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