HAL  v4.5.0-124-g47ab54673
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::bitorder_propagation::BitOrderResult Class Reference

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

Collaboration diagram for hal::bitorder_propagation::BitOrderResult:
Collaboration graph

Public Member Functions

 BitOrderResult ()=default
 
 BitOrderResult (std::vector< BitOrder > bit_orders)
 
void add (BitOrder bit_order)
 
const std::vector< BitOrder > & get_bit_orders () const
 
const BitOrderget (const Module *module, const PinGroup< ModulePin > *pin_group) const
 
bool contains (const Module *module, const PinGroup< ModulePin > *pin_group) const
 
u32 get_size () const
 
bool is_empty () const
 
std::vector< BitOrder >::const_iterator begin () const
 
std::vector< BitOrder >::const_iterator end () const
 

Detailed Description

The bit orders that are known, which is what a propagation reports: the ones it was given as well as the ones it worked out.

The bit orders are held in a stable order, by module ID and then by pin group ID, so that iterating over a result does not depend on where the modules and pin groups happen to be allocated.

Definition at line 143 of file bit_order.h.

Constructor & Destructor Documentation

◆ BitOrderResult() [1/2]

hal::bitorder_propagation::BitOrderResult::BitOrderResult ( )
default

◆ BitOrderResult() [2/2]

hal::bitorder_propagation::BitOrderResult::BitOrderResult ( std::vector< BitOrder bit_orders)
explicit

Construct a result from the given bit orders.

Parameters
[in]bit_orders- The bit orders.

Definition at line 88 of file bit_order.cpp.

References add().

Member Function Documentation

◆ add()

void hal::bitorder_propagation::BitOrderResult::add ( BitOrder  bit_order)

Add a bit order, replacing one that is already known for the same pin group.

Parameters
[in]bit_order- The bit order.

Definition at line 96 of file bit_order.cpp.

References hal::bitorder_propagation::BitOrder::get_module(), and hal::bitorder_propagation::BitOrder::get_pin_group().

Referenced by BitOrderResult(), and hal::PYBIND11_PLUGIN().

◆ begin()

std::vector< BitOrder >::const_iterator hal::bitorder_propagation::BitOrderResult::begin ( ) const

Definition at line 144 of file bit_order.cpp.

◆ contains()

bool hal::bitorder_propagation::BitOrderResult::contains ( const Module module,
const PinGroup< ModulePin > *  pin_group 
) const

Check whether the bit order of the given pin group is known.

Parameters
[in]module- The module the pin group belongs to.
[in]pin_group- The pin group.
Returns
true if the bit order is known, false otherwise.

Definition at line 129 of file bit_order.cpp.

References get(), and hal::ShortestPath::module().

Referenced by hal::PYBIND11_PLUGIN().

◆ end()

std::vector< BitOrder >::const_iterator hal::bitorder_propagation::BitOrderResult::end ( ) const

Definition at line 149 of file bit_order.cpp.

◆ get()

const BitOrder * hal::bitorder_propagation::BitOrderResult::get ( const Module module,
const PinGroup< ModulePin > *  pin_group 
) const

Get the bit order of the given pin group.

Parameters
[in]module- The module the pin group belongs to.
[in]pin_group- The pin group.
Returns
The bit order, or a nullptr if the pin group has no known bit order.

Definition at line 116 of file bit_order.cpp.

References hal::ShortestPath::module().

Referenced by contains(), and hal::PYBIND11_PLUGIN().

◆ get_bit_orders()

const std::vector< BitOrder > & hal::bitorder_propagation::BitOrderResult::get_bit_orders ( ) const

Get every bit order, ordered by module ID and pin group ID.

Returns
The bit orders.

Definition at line 111 of file bit_order.cpp.

Referenced by hal::PYBIND11_PLUGIN().

◆ get_size()

u32 hal::bitorder_propagation::BitOrderResult::get_size ( ) const

Get the number of pin groups whose bit order is known.

Returns
The number of bit orders.

Definition at line 134 of file bit_order.cpp.

Referenced by hal::PYBIND11_PLUGIN().

◆ is_empty()

bool hal::bitorder_propagation::BitOrderResult::is_empty ( ) const

Check whether no bit order at all is known.

Returns
true if there is no bit order, false otherwise.

Definition at line 139 of file bit_order.cpp.


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