CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
circt::Cube Struct Reference

Represents a product term (cube) in a sum-of-products expression. More...

#include <TruthTable.h>

Collaboration diagram for circt::Cube:
Collaboration graph
[legend]

Public Member Functions

 Cube ()=default
 
unsigned size () const
 Get number of literals in this cube.
 
bool hasLiteral (unsigned varIndex) const
 Has literal for variable at index varIndex.
 
void setLiteral (unsigned varIndex, bool isInverted)
 
void removeLiteral (unsigned varIndex)
 
bool isLiteralInverted (unsigned varIndex) const
 

Public Attributes

uint64_t mask = 0
 Bitmask indicating which variables appear in this cube.
 
uint64_t inverted = 0
 Bitmask indicating which variables are negated.
 

Detailed Description

Represents a product term (cube) in a sum-of-products expression.

Each cube is a conjunction of literals (variables or their negations). Assumes number of variables is less than 64.

Definition at line 216 of file TruthTable.h.

Constructor & Destructor Documentation

◆ Cube()

circt::Cube::Cube ( )
default

Member Function Documentation

◆ hasLiteral()

bool circt::Cube::hasLiteral ( unsigned  varIndex) const
inline

Has literal for variable at index varIndex.

Definition at line 228 of file TruthTable.h.

References mask.

◆ isLiteralInverted()

bool circt::Cube::isLiteralInverted ( unsigned  varIndex) const
inline

Definition at line 244 of file TruthTable.h.

References inverted.

◆ removeLiteral()

void circt::Cube::removeLiteral ( unsigned  varIndex)
inline

Definition at line 238 of file TruthTable.h.

References inverted, and mask.

◆ setLiteral()

void circt::Cube::setLiteral ( unsigned  varIndex,
bool  isInverted 
)
inline

Definition at line 232 of file TruthTable.h.

References inverted, and mask.

◆ size()

unsigned circt::Cube::size ( ) const
inline

Get number of literals in this cube.

Definition at line 225 of file TruthTable.h.

References mask.

Referenced by esiaccel.types.ArrayType::bit_width(), esiaccel.types.ArrayType::deserialize(), and esiaccel.types.ArrayType::is_valid().

Member Data Documentation

◆ inverted

uint64_t circt::Cube::inverted = 0

Bitmask indicating which variables are negated.

Definition at line 220 of file TruthTable.h.

Referenced by isLiteralInverted(), removeLiteral(), and setLiteral().

◆ mask

uint64_t circt::Cube::mask = 0

Bitmask indicating which variables appear in this cube.

Definition at line 218 of file TruthTable.h.

Referenced by hasLiteral(), removeLiteral(), setLiteral(), and size().


The documentation for this struct was generated from the following file: