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

Functions

BooleanFunction::Value toggle (BooleanFunction::Value v)
 
BooleanFunction::Value process_clear_preset_behavior (AsyncSetResetBehavior behavior, BooleanFunction::Value previous_output)
 
std::vector< BooleanFunction::Valueint_to_values (u32 integer, u32 len)
 
u32 values_to_int (const std::vector< BooleanFunction::Value > &values)
 
u32 get_int_bus_value (const std::unordered_map< std::string, BooleanFunction::Value > &signal_values, const std::vector< GatePin * > &ordered_pins)
 

Detailed Description

Helper functions that the simulation engines use to convert between logic values and integers and to evaluate sequential behavior.

Function Documentation

◆ get_int_bus_value()

u32 hal::simulation_utils::get_int_bus_value ( const std::unordered_map< std::string, BooleanFunction::Value > &  signal_values,
const std::vector< GatePin * > &  ordered_pins 
)

Definition at line 82 of file simulation_utils.cpp.

References values_to_int().

◆ int_to_values()

std::vector< BooleanFunction::Value > hal::simulation_utils::int_to_values ( u32  integer,
u32  len 
)

Definition at line 42 of file simulation_utils.cpp.

◆ process_clear_preset_behavior()

BooleanFunction::Value hal::simulation_utils::process_clear_preset_behavior ( AsyncSetResetBehavior  behavior,
BooleanFunction::Value  previous_output 
)

Definition at line 16 of file simulation_utils.cpp.

References hal::enum_to_string(), hal::H, hal::L, log_error, hal::N, hal::T, toggle(), and hal::X.

◆ toggle()

◆ values_to_int()

u32 hal::simulation_utils::values_to_int ( const std::vector< BooleanFunction::Value > &  values)

Definition at line 58 of file simulation_utils.cpp.

Referenced by get_int_bus_value().