Bitstream Interpretation Library (BIL)
0.1
|
Holds a data unit for correlation. More...
#include <correlation/CorrelationUnit.hpp>
Public Member Functions | |
void | pipBitSize (size_t size) |
Sets the number of PIP bits. | |
size_t | pipBitSize () const |
Gets the number of PIP bits. | |
void | setPIPBit (size_t index) |
Sets a PIP bit to 1. | |
void | resetPIPBit (size_t index) |
Sets a PIP bit to 0. | |
void | setPIPBits () |
Sets all PIP bits to 1. | |
void | resetPIPBits () |
Sets all PIP bits to 0. | |
bool | testPIPBit (size_t index) const |
Gets a PIP bit. | |
bool | isIsolated () const |
Tells if the PIP bits resemble an isolated PIP. | |
void | cfgBitSize (size_t size) |
Sets the number of configuration data bits. | |
size_t | cfgBitSize () const |
Gets the number of configuration data bits. | |
void | setCfgBit (size_t index) |
Sets a configuration data bit to 1. | |
void | resetCfgBit (size_t index) |
Sets a configuration data bit to 0. | |
void | setCfgBits () |
Sets all configuration data bits to 1. | |
void | resetCfgBits () |
Sets all configuration data bits to 0. | |
bool | testCfgBit (size_t index) const |
Gets a configuration bit. | |
size_t | firstCfgBit () const |
Gets index of first set configuration data bit. | |
size_t | nextCfgBit (size_t index) const |
Gets index of first set bit behind given index. | |
void | appendCfgBits (boost::uint32_t *data, size_t dataWordCount) |
Appends configuration bits. | |
void | intersect (const CorrelationUnit &with) |
Intersects this unit with another one. | |
void | intersectInverted (const CorrelationUnit &with) |
Intersects this unit with another inverted one. |
Static Public Attributes | |
static const size_t | INVALID_BIT_INDEX = static_cast<size_t>(-1) |
Constant for denoting an invalid bit index. |
Holds a data unit for correlation.
An instance of this class holds a data pair for correlation, consisting of a tile's known data and unknown data. The known data part is a bitset denoting the activated PIPs for that tile (stemming for example from a XDL design). The unknown data part is the binary configuration data from the corresponding configuration frames and is also stored in a bitset.
Todo: Should later be extended to cover also the configuration options of the tile's primitive sites.
Definition at line 29 of file CorrelationUnit.hpp.
void CorrelationUnit::pipBitSize | ( | size_t | size | ) |
Sets the number of PIP bits.
size | The number of bits. |
Definition at line 12 of file CorrelationUnit.cpp.
size_t CorrelationUnit::pipBitSize | ( | ) | const |
Gets the number of PIP bits.
Definition at line 18 of file CorrelationUnit.cpp.
void CorrelationUnit::setPIPBit | ( | size_t | index | ) |
Sets a PIP bit to 1.
index | Index of the bit to set. |
Definition at line 24 of file CorrelationUnit.cpp.
void CorrelationUnit::resetPIPBit | ( | size_t | index | ) |
Sets a PIP bit to 0.
index | Index of the bit to set. |
Definition at line 30 of file CorrelationUnit.cpp.
void CorrelationUnit::setPIPBits | ( | ) |
Sets all PIP bits to 1.
Definition at line 36 of file CorrelationUnit.cpp.
void CorrelationUnit::resetPIPBits | ( | ) |
Sets all PIP bits to 0.
Definition at line 42 of file CorrelationUnit.cpp.
bool CorrelationUnit::testPIPBit | ( | size_t | index | ) | const |
Gets a PIP bit.
index | Index of bit. |
Definition at line 48 of file CorrelationUnit.cpp.
bool CorrelationUnit::isIsolated | ( | ) | const |
Tells if the PIP bits resemble an isolated PIP.
Definition at line 54 of file CorrelationUnit.cpp.
void CorrelationUnit::cfgBitSize | ( | size_t | size | ) |
Sets the number of configuration data bits.
size | The number of bits. |
Definition at line 66 of file CorrelationUnit.cpp.
size_t CorrelationUnit::cfgBitSize | ( | ) | const |
Gets the number of configuration data bits.
Definition at line 72 of file CorrelationUnit.cpp.
void CorrelationUnit::setCfgBit | ( | size_t | index | ) |
Sets a configuration data bit to 1.
index | Index of the bit to set. |
Definition at line 78 of file CorrelationUnit.cpp.
void CorrelationUnit::resetCfgBit | ( | size_t | index | ) |
Sets a configuration data bit to 0.
index | Index of the bit to set. |
Definition at line 84 of file CorrelationUnit.cpp.
void CorrelationUnit::setCfgBits | ( | ) |
Sets all configuration data bits to 1.
Definition at line 90 of file CorrelationUnit.cpp.
void CorrelationUnit::resetCfgBits | ( | ) |
Sets all configuration data bits to 0.
Definition at line 96 of file CorrelationUnit.cpp.
bool CorrelationUnit::testCfgBit | ( | size_t | index | ) | const |
Gets a configuration bit.
index | Index of bit. |
Definition at line 102 of file CorrelationUnit.cpp.
size_t CorrelationUnit::firstCfgBit | ( | ) | const |
Gets index of first set configuration data bit.
Definition at line 108 of file CorrelationUnit.cpp.
size_t CorrelationUnit::nextCfgBit | ( | size_t | index | ) | const |
Gets index of first set bit behind given index.
index | The start index. |
Definition at line 114 of file CorrelationUnit.cpp.
void CorrelationUnit::appendCfgBits | ( | boost::uint32_t * | data, |
size_t | dataWordCount | ||
) |
Appends configuration bits.
data | Buffer from which to copy bits. |
dataWordCount | Buffer size in words. |
Definition at line 120 of file CorrelationUnit.cpp.
void CorrelationUnit::intersect | ( | const CorrelationUnit & | with | ) |
Intersects this unit with another one.
with | The other unit. |
. |
Definition at line 126 of file CorrelationUnit.cpp.
void CorrelationUnit::intersectInverted | ( | const CorrelationUnit & | with | ) |
Intersects this unit with another inverted one.
with | The other unit. |
. |
Definition at line 137 of file CorrelationUnit.cpp.
|
static |
Constant for denoting an invalid bit index.
Definition at line 134 of file CorrelationUnit.hpp.