Bitstream Interpretation Library (BIL)  0.1
Public Member Functions | Static Public Attributes
bil::CorrelationUnit Class Reference

Holds a data unit for correlation. More...

#include <correlation/CorrelationUnit.hpp>

List of all members.

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.

Detailed Description

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.


Member Function Documentation

void CorrelationUnit::pipBitSize ( size_t  size)

Sets the number of PIP bits.

Parameters:
sizeThe number of bits.

Definition at line 12 of file CorrelationUnit.cpp.

size_t CorrelationUnit::pipBitSize ( ) const

Gets the number of PIP bits.

Returns:
The number of bits.

Definition at line 18 of file CorrelationUnit.cpp.

void CorrelationUnit::setPIPBit ( size_t  index)

Sets a PIP bit to 1.

Parameters:
indexIndex 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.

Parameters:
indexIndex 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.

Parameters:
indexIndex of bit.
Returns:
True, if denoted bit is set, false otherwise.

Definition at line 48 of file CorrelationUnit.cpp.

bool CorrelationUnit::isIsolated ( ) const

Tells if the PIP bits resemble an isolated PIP.

Returns:
True, if 1 PIP bit is set, false otherwise.

Definition at line 54 of file CorrelationUnit.cpp.

void CorrelationUnit::cfgBitSize ( size_t  size)

Sets the number of configuration data bits.

Parameters:
sizeThe number of bits.

Definition at line 66 of file CorrelationUnit.cpp.

size_t CorrelationUnit::cfgBitSize ( ) const

Gets the number of configuration data bits.

Returns:
The number of bits.

Definition at line 72 of file CorrelationUnit.cpp.

void CorrelationUnit::setCfgBit ( size_t  index)

Sets a configuration data bit to 1.

Parameters:
indexIndex 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.

Parameters:
indexIndex 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.

Parameters:
indexIndex of bit.
Returns:
True, if denoted bit is set, false otherwise.

Definition at line 102 of file CorrelationUnit.cpp.

size_t CorrelationUnit::firstCfgBit ( ) const

Gets index of first set configuration data bit.

Returns:
If found, index of bit; INVALID_BIT_INDEX otherwise.

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.

Parameters:
indexThe start index.
Returns:
If found, index of bit; INVALID_BIT_INDEX otherwise.

Definition at line 114 of file CorrelationUnit.cpp.

void CorrelationUnit::appendCfgBits ( boost::uint32_t *  data,
size_t  dataWordCount 
)

Appends configuration bits.

Parameters:
dataBuffer from which to copy bits.
dataWordCountBuffer size in words.

Definition at line 120 of file CorrelationUnit.cpp.

void CorrelationUnit::intersect ( const CorrelationUnit with)

Intersects this unit with another one.

Parameters:
withThe other unit.
Exceptions:
.

Definition at line 126 of file CorrelationUnit.cpp.

void CorrelationUnit::intersectInverted ( const CorrelationUnit with)

Intersects this unit with another inverted one.

Parameters:
withThe other unit.
Exceptions:
.

Definition at line 137 of file CorrelationUnit.cpp.


Member Data Documentation

const size_t bil::CorrelationUnit::INVALID_BIT_INDEX = static_cast<size_t>(-1)
static

Constant for denoting an invalid bit index.

Definition at line 134 of file CorrelationUnit.hpp.


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