CIRCT
20.0.0git
|
A lattice value to record the value of a property. More...
#include <FIRRTLInstanceInfo.h>
Public Types | |
enum | Kind { Unknown = 0 , Constant , Mixed } |
Public Member Functions | |
bool | isUnknown () const |
Return true if the kind is Unknown. More... | |
bool | isConstant () const |
Return true if the kind is Constant. More... | |
bool | isMixed () const |
Return true if the kind is Mixed. More... | |
bool | getConstant () const |
Return the value. This should only be used if the kind is Constant. More... | |
void | markConstant (bool constant) |
Set this LatticeValue to a constant. More... | |
void | markMixed () |
Set this LatticeValue to mixed. More... | |
void | mergeIn (LatticeValue that) |
Merge attributes from another LatticeValue into this one. More... | |
void | mergeIn (bool value) |
Merge a constant value into this one. More... | |
LatticeValue | operator! () |
Invert the lattice value. More... | |
Private Attributes | |
Kind | kind = Kind::Unknown |
Whether or not the property holds. More... | |
bool | value = false |
The value of the property if kind is Constant . More... | |
A lattice value to record the value of a property.
Definition at line 32 of file FIRRTLInstanceInfo.h.
Enumerator | |
---|---|
Unknown | |
Constant | |
Mixed |
Definition at line 35 of file FIRRTLInstanceInfo.h.
bool InstanceInfo::LatticeValue::getConstant | ( | ) | const |
Return the value. This should only be used if the kind is Constant.
Definition at line 39 of file FIRRTLInstanceInfo.cpp.
References assert(), and circt::firrtl::isConstant().
Referenced by circt::firrtl::operator<<().
bool InstanceInfo::LatticeValue::isConstant | ( | ) | const |
Return true if the kind is Constant.
Definition at line 35 of file FIRRTLInstanceInfo.cpp.
Referenced by circt::firrtl::InstanceInfo::allInstancesInDesign(), circt::firrtl::InstanceInfo::allInstancesInEffectiveDesign(), circt::firrtl::InstanceInfo::allInstancesUnderDut(), circt::firrtl::InstanceInfo::allInstancesUnderLayer(), and circt::firrtl::operator<<().
bool InstanceInfo::LatticeValue::isMixed | ( | ) | const |
Return true if the kind is Mixed.
Definition at line 37 of file FIRRTLInstanceInfo.cpp.
Referenced by circt::firrtl::InstanceInfo::anyInstanceInDesign(), circt::firrtl::InstanceInfo::anyInstanceInEffectiveDesign(), circt::firrtl::InstanceInfo::anyInstanceUnderDut(), and circt::firrtl::InstanceInfo::anyInstanceUnderLayer().
bool InstanceInfo::LatticeValue::isUnknown | ( | ) | const |
Return true if the kind is Unknown.
Definition at line 33 of file FIRRTLInstanceInfo.cpp.
Referenced by circt::firrtl::operator<<().
void InstanceInfo::LatticeValue::markConstant | ( | bool | constant | ) |
Set this LatticeValue to a constant.
Definition at line 44 of file FIRRTLInstanceInfo.cpp.
Referenced by circt::firrtl::InstanceInfo::InstanceInfo(), and mergeIn().
void InstanceInfo::LatticeValue::markMixed | ( | ) |
Set this LatticeValue to mixed.
Definition at line 49 of file FIRRTLInstanceInfo.cpp.
void InstanceInfo::LatticeValue::mergeIn | ( | bool | value | ) |
Merge a constant value into this one.
Definition at line 65 of file FIRRTLInstanceInfo.cpp.
References markConstant().
void InstanceInfo::LatticeValue::mergeIn | ( | LatticeValue | that | ) |
Merge attributes from another LatticeValue into this one.
Definition at line 51 of file FIRRTLInstanceInfo.cpp.
References getConstant(), circt::firrtl::isConstant(), kind, and value.
Referenced by circt::firrtl::InstanceInfo::InstanceInfo().
InstanceInfo::LatticeValue InstanceInfo::LatticeValue::operator! | ( | ) |
Invert the lattice value.
Definition at line 71 of file FIRRTLInstanceInfo.cpp.
References getConstant().
|
private |
Whether or not the property holds.
Definition at line 49 of file FIRRTLInstanceInfo.h.
Referenced by isUnknown(), and mergeIn().
|
private |
The value of the property if kind
is Constant
.
Definition at line 52 of file FIRRTLInstanceInfo.h.
Referenced by mergeIn(), and Python.support.OpOperand::type().