HAL  v4.5.0-130-g83e8bfb3f
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::GuiExtensionNetlistPreprocessing Class Reference

GUI extension interface for the netlist preprocessing plugin. More...

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

Inheritance diagram for hal::GuiExtensionNetlistPreprocessing:
Inheritance graph
Collaboration diagram for hal::GuiExtensionNetlistPreprocessing:
Collaboration graph

Public Member Functions

 GuiExtensionNetlistPreprocessing ()
 Default constructor for GuiExtensionNetlistPreprocessing. More...
 
std::vector< ContextMenuContributionget_context_contribution (const Netlist *nl, const std::vector< u32 > &mods, const std::vector< u32 > &gats, const std::vector< u32 > &nets) override
 Get the context menu entries contributed for the given selection. More...
 
void execute_function (std::string tag, Netlist *nl, const std::vector< u32 > &mods, const std::vector< u32 > &gats, const std::vector< u32 > &nets) override
 Execute the context menu entry identified by the given tag. More...
 
- Public Member Functions inherited from hal::GuiExtensionInterface
 GuiExtensionInterface (const std::string &toplabel=std::string())
 
virtual ~GuiExtensionInterface ()
 
virtual std::vector< PluginParameterget_parameter () const
 
virtual void set_parameter (const std::vector< PluginParameter > &params)
 
virtual void register_progress_indicator (std::function< void(int, const std::string &)> pif)
 
virtual void netlist_loaded (Netlist *nl)
 
virtual void netlist_about_to_close (Netlist *nl)
 
bool is_contribution_enabled () const
 
void set_contribution_enabled (bool enabled)
 
std::string contribution_top_label () const
 
- Public Member Functions inherited from hal::AbstractExtensionInterface
 AbstractExtensionInterface ()
 
virtual ~AbstractExtensionInterface ()
 

Detailed Description

GUI extension interface for the netlist preprocessing plugin.

Contributes the most commonly used preprocessing steps to the context menus of the GUI, so that they can be applied to the current selection or to the entire netlist without writing a script.

Definition at line 95 of file plugin_netlist_preprocessing.h.

Constructor & Destructor Documentation

◆ GuiExtensionNetlistPreprocessing()

hal::GuiExtensionNetlistPreprocessing::GuiExtensionNetlistPreprocessing ( )
inline

Default constructor for GuiExtensionNetlistPreprocessing.

Definition at line 101 of file plugin_netlist_preprocessing.h.

Member Function Documentation

◆ execute_function()

void hal::GuiExtensionNetlistPreprocessing::execute_function ( std::string  tag,
Netlist nl,
const std::vector< u32 > &  mods,
const std::vector< u32 > &  gats,
const std::vector< u32 > &  nets 
)
overridevirtual

Execute the context menu entry identified by the given tag.

Parameters
[in]tag- The tag of the entry to execute.
[in]nl- The netlist that is currently open.
[in]mods- The IDs of the currently selected modules.
[in]gats- The IDs of the currently selected gates.
[in]nets- The IDs of the currently selected nets.

Reimplemented from hal::GuiExtensionInterface.

Definition at line 111 of file plugin_netlist_preprocessing.cpp.

References log_error, log_info, log_warning, hal::netlist_preprocessing::remove_buffers(), and hal::netlist_preprocessing::unify_ff_outputs().

◆ get_context_contribution()

std::vector< ContextMenuContribution > hal::GuiExtensionNetlistPreprocessing::get_context_contribution ( const Netlist nl,
const std::vector< u32 > &  mods,
const std::vector< u32 > &  gats,
const std::vector< u32 > &  nets 
)
overridevirtual

Get the context menu entries contributed for the given selection.

If modules or gates are selected, only the entries operating on that selection are contributed. The entries operating on the entire netlist are contributed when nothing is selected.

Parameters
[in]nl- The netlist that is currently open.
[in]mods- The IDs of the currently selected modules.
[in]gats- The IDs of the currently selected gates.
[in]nets- The IDs of the currently selected nets.
Returns
The contributed context menu entries.

Reimplemented from hal::GuiExtensionInterface.

Definition at line 84 of file plugin_netlist_preprocessing.cpp.

References hal::ContextMenuContribution::mContributer, hal::ContextMenuContribution::mEntry, and hal::ContextMenuContribution::mTagname.


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