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

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

Inheritance diagram for hal::GenlibWriter:
Inheritance graph
Collaboration diagram for hal::GenlibWriter:
Collaboration graph

Public Member Functions

 GenlibWriter ()=default
 
 ~GenlibWriter ()=default
 
bool write (const GateLibrary *gate_lib, const std::filesystem::path &file_path) override
 Write all single output combinational gate types of the gate library to a genlib file at the provided location. More...
 
- Public Member Functions inherited from hal::GateLibraryWriter
 GateLibraryWriter ()=default
 
virtual ~GateLibraryWriter ()=default
 

Detailed Description

A gate library writer that serializes a gate library into the GENLIB format used by ABC.

Definition at line 38 of file genlib_writer.h.

Constructor & Destructor Documentation

◆ GenlibWriter()

hal::GenlibWriter::GenlibWriter ( )
default

◆ ~GenlibWriter()

hal::GenlibWriter::~GenlibWriter ( )
default

Member Function Documentation

◆ write()

bool hal::GenlibWriter::write ( const GateLibrary gate_lib,
const std::filesystem::path &  file_path 
)
overridevirtual

Write all single output combinational gate types of the gate library to a genlib file at the provided location.

The area for the gate types is currently estimated by their input pin count and reduced in the case of multiplexers to motivate a possible resynthesis to use MUX gates when possible.

Parameters
[in]gate_lib- The gate library.
[in]file_path- The output path.
Returns
true on success, false otherwise.

Implements hal::GateLibraryWriter.

Definition at line 21 of file genlib_writer.cpp.

References hal::c_mux, hal::GateType::get_boolean_functions(), hal::GateLibrary::get_gate_types(), hal::GateType::get_input_pins(), hal::GateLibrary::get_name(), hal::GateType::has_property(), log_warning, name, hal::BooleanFunction::NodeType::Not, hal::utils::replace(), and hal::sequential.


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