OpenASIP
2.0
|
#include <BEMTools.hh>
Static Public Member Functions | |
static unsigned | encodingWidth (unsigned encoding, unsigned extrabits) |
static unsigned | extrabits (unsigned encoding, unsigned width) |
Definition at line 40 of file BEMTools.hh.
|
static |
Returns bit width required by the encoding and extrabits combination.
Definition at line 46 of file BEMTools.cc.
References MathTools::bitLength(), and extrabits().
Referenced by BEMTester::canAddComponentPriorityEncoding().
|
static |
Calculates the extra bits (zeroes) of the given encoding.
For example:
* (encoding, width) = (3, 5) -> |00011| -> return 3. *
encoding | The encoding value. |
width | The number of bits the encoding occupies. Must be at least or more than required bits needed for the value. Must greater than 0. |
Definition at line 64 of file BEMTools.cc.
References assert, and MathTools::bitLength().
Referenced by encodingWidth().