|
CIRCT 22.0.0git
|
#include "circt/Support/TruthTable.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Support/MathExtras.h"#include <algorithm>#include <cassert>
Go to the source code of this file.
Functions | |
| template<bool positive> | |
| static APInt | createVarMaskImpl (unsigned numVars, unsigned varIndex) |
| Create a mask for a variable in the truth table. | |
Variables | |
| static constexpr uint64_t | kVarMasks [2][6] |
| Precomputed masks for variables in truth tables up to 6 variables (64 bits). | |
|
static |
Create a mask for a variable in the truth table.
For positive=true: mask has 1s where var=1 in the truth table encoding For positive=false: mask has 1s where var=0 in the truth table encoding
Definition at line 299 of file TruthTable.cpp.
|
staticconstexpr |
Precomputed masks for variables in truth tables up to 6 variables (64 bits).
In a truth table, bit position i represents minterm i, where the binary representation of i gives the variable values. For example, with 3 variables (a,b,c), bit 5 (binary 101) represents minterm a=1, b=0, c=1.
These masks identify which minterms have a particular variable value:
Definition at line 286 of file TruthTable.cpp.
Referenced by createVarMaskImpl().