HAL
hal::BooleanFunctionNetDecorator Class Reference

#include <boolean_function_net_decorator.h>

Collaboration diagram for hal::BooleanFunctionNetDecorator:
Collaboration graph

Public Member Functions

 BooleanFunctionNetDecorator (const Net &net)
 
BooleanFunction get_boolean_variable () const
 
std::string get_boolean_variable_name () const
 

Static Public Member Functions

static Result< Net * > get_net_from (const Netlist *netlist, const BooleanFunction &var)
 
static Result< Net * > get_net_from (const Netlist *netlist, const std::string &var_name)
 
static Result< u32get_net_id_from (const BooleanFunction &var)
 
static Result< u32get_net_id_from (const std::string &var_name)
 

Detailed Description

A net decorator that provides functionality to translate between nets and Boolean function variables.

Definition at line 39 of file boolean_function_net_decorator.h.

Constructor & Destructor Documentation

◆ BooleanFunctionNetDecorator()

hal::BooleanFunctionNetDecorator::BooleanFunctionNetDecorator ( const Net net)

Construct new BooleanFunctionNetDecorator object.

Parameters
[in]net- The net to operate on.

Definition at line 9 of file boolean_function_net_decorator.cpp.

Member Function Documentation

◆ get_boolean_variable()

BooleanFunction hal::BooleanFunctionNetDecorator::get_boolean_variable ( ) const

Generate a unique Boolean variable representing the given net.

Returns
The Boolean variable.

Definition at line 13 of file boolean_function_net_decorator.cpp.

References get_boolean_variable_name(), and hal::BooleanFunction::Var().

Referenced by hal::boolean_function_net_decorator_init(), and hal::solve_fsm::solve_fsm().

◆ get_boolean_variable_name()

std::string hal::BooleanFunctionNetDecorator::get_boolean_variable_name ( ) const

Generate a unique Boolean variable name representing the given net.

Returns
The Boolean variable name.

Definition at line 18 of file boolean_function_net_decorator.cpp.

References hal::Net::get_id().

Referenced by hal::boolean_function_net_decorator_init(), hal::BooleanFunctionDecorator::get_boolean_function_from(), get_boolean_variable(), and hal::solve_fsm::solve_fsm_brute_force().

◆ get_net_from() [1/2]

Result< Net * > hal::BooleanFunctionNetDecorator::get_net_from ( const Netlist netlist,
const BooleanFunction var 
)
static

Get the net represented by a unique Boolean variable.

Parameters
[in]netlist- The netlist on which to operate.
[in]var- The Boolean variable.
Returns
The specified net on success, an error otherwise.

Definition at line 44 of file boolean_function_net_decorator.cpp.

References ERR_APPEND, hal::BooleanFunction::get_variable_name(), test_multiple::netlist, and hal::BooleanFunction::to_string().

Referenced by hal::boolean_function_net_decorator_init(), hal::BooleanFunctionDecorator::substitute_module_pins(), and hal::BooleanFunctionDecorator::substitute_power_ground_nets().

◆ get_net_from() [2/2]

Result< Net * > hal::BooleanFunctionNetDecorator::get_net_from ( const Netlist netlist,
const std::string &  var_name 
)
static

Get the net represented by a unique Boolean variable name.

Parameters
[in]netlist- The netlist on which to operate.
[in]var_name- The Boolean variable name.
Returns
The specified net on success, an error otherwise.

Definition at line 23 of file boolean_function_net_decorator.cpp.

References ERR, test_multiple::netlist, and OK.

◆ get_net_id_from() [1/2]

Result< u32 > hal::BooleanFunctionNetDecorator::get_net_id_from ( const BooleanFunction var)
static

Get the net id represented by a unique Boolean variable.

Parameters
[in]var- The Boolean variable.
Returns
The specified net id on success, an error otherwise.

Definition at line 84 of file boolean_function_net_decorator.cpp.

References ERR_APPEND, hal::BooleanFunction::get_variable_name(), and hal::BooleanFunction::to_string().

◆ get_net_id_from() [2/2]

Result< u32 > hal::BooleanFunctionNetDecorator::get_net_id_from ( const std::string &  var_name)
static

Get the net id represented by a unique Boolean variable name.

Parameters
[in]var_name- The Boolean variable name.
Returns
The specified net id on success, an error otherwise.

Definition at line 63 of file boolean_function_net_decorator.cpp.

References ERR, and OK.


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