|
HAL
v4.5.0-124-g47ab54673
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include </home/runner/work/hal/hal/plugins/bitorder_propagation/include/bitorder_propagation/bit_order.h>

Public Member Functions | |
| BitOrder (Module *module, PinGroup< ModulePin > *pin_group, std::vector< std::pair< Net *, u32 >> order) | |
| Module * | get_module () const |
| PinGroup< ModulePin > * | get_pin_group () const |
| const std::vector< std::pair< Net *, u32 > > & | get_order () const |
| std::optional< u32 > | get_index (const Net *net) const |
| Net * | get_net_at (u32 index) const |
| u32 | get_size () const |
| bool | is_continuous () const |
| bool | operator== (const BitOrder &other) const |
| bool | operator!= (const BitOrder &other) const |
The bit order of a single module pin group, i.e., which net of the pin group carries which bit.
The index of a net is stored with it rather than implied by its position, so that an order with gaps in it can be expressed. Propagation produces a continuous order today, but it is not guaranteed to keep doing so, and the pin group a bit order belongs to need not start at index 0 either.
Definition at line 61 of file bit_order.h.
| hal::bitorder_propagation::BitOrder::BitOrder | ( | Module * | module, |
| PinGroup< ModulePin > * | pin_group, | ||
| std::vector< std::pair< Net *, u32 >> | order | ||
| ) |
Construct a bit order for a module pin group.
The order is sorted by index, so that iterating over it walks the bits from the lowest index to the highest no matter in which order they were discovered.
| [in] | module | - The module the pin group belongs to. |
| [in] | pin_group | - The pin group. |
| [in] | order | - The index of each net of the pin group. |
Definition at line 12 of file bit_order.cpp.
Get the index of the given net.
| [in] | net | - The net. |
std::nullopt if the net is not part of this bit order. Definition at line 33 of file bit_order.cpp.
References net.
Referenced by hal::PYBIND11_PLUGIN().
| Module * hal::bitorder_propagation::BitOrder::get_module | ( | ) | const |
Get the module that the pin group belongs to.
Definition at line 18 of file bit_order.cpp.
Referenced by hal::bitorder_propagation::BitOrderResult::add(), and hal::PYBIND11_PLUGIN().
Get the net at the given index.
| [in] | index | - The index. |
nullptr if no net carries that index. Definition at line 39 of file bit_order.cpp.
References index.
Referenced by hal::PYBIND11_PLUGIN().
| const std::vector< std::pair< Net *, u32 > > & hal::bitorder_propagation::BitOrder::get_order | ( | ) | const |
Get the index of every net, ordered by index.
Definition at line 28 of file bit_order.cpp.
Referenced by hal::PYBIND11_PLUGIN().
Get the pin group whose bit order this is.
Definition at line 23 of file bit_order.cpp.
Referenced by hal::bitorder_propagation::BitOrderResult::add(), and hal::PYBIND11_PLUGIN().
| u32 hal::bitorder_propagation::BitOrder::get_size | ( | ) | const |
Get the number of nets that the bit order covers.
Definition at line 45 of file bit_order.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| bool hal::bitorder_propagation::BitOrder::is_continuous | ( | ) | const |
Check whether the indices run from 0 without leaving a gap.
true if the order is continuous, false otherwise. Definition at line 50 of file bit_order.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| bool hal::bitorder_propagation::BitOrder::operator!= | ( | const BitOrder & | other | ) | const |
Definition at line 68 of file bit_order.cpp.
| bool hal::bitorder_propagation::BitOrder::operator== | ( | const BitOrder & | other | ) | const |
Definition at line 63 of file bit_order.cpp.