CIRCT
20.0.0git
|
#include <FIRRTLInstanceInfo.h>
Classes | |
struct | CircuitAttributes |
Information about a circuit. More... | |
class | LatticeValue |
A lattice value to record the value of a property. More... | |
struct | ModuleAttributes |
Information about a module. More... | |
Public Member Functions | |
InstanceInfo (Operation *op, mlir::AnalysisManager &am) | |
bool | hasDut () |
Return true if this circuit has a design-under-test. More... | |
igraph::ModuleOpInterface | getDut () |
Return the design-under-test if one is defined for the circuit, otherwise return null. More... | |
igraph::ModuleOpInterface | getEffectiveDut () |
Return the "effective" design-under-test. More... | |
bool | isDut (igraph::ModuleOpInterface op) |
Return true if this module is the design-under-test. More... | |
bool | isEffectiveDut (igraph::ModuleOpInterface op) |
Return true if this module is the design-under-test and the circuit has a design-under-test. More... | |
bool | anyInstanceUnderDut (igraph::ModuleOpInterface op) |
Return true if at least one instance of this module is under (or transitively under) the design-under-test. More... | |
bool | allInstancesUnderDut (igraph::ModuleOpInterface op) |
Return true if all instances of this module are under (or transitively under) the design-under-test. More... | |
bool | anyInstanceUnderEffectiveDut (igraph::ModuleOpInterface op) |
Return true if at least one instance is under (or transitively under) the effective design-under-test. More... | |
bool | allInstancesUnderEffectiveDut (igraph::ModuleOpInterface op) |
Return true if all instances are under (or transitively under) the effective design-under-test. More... | |
bool | anyInstanceUnderLayer (igraph::ModuleOpInterface op) |
Return true if at least one instance of this module is under (or transitively under) a layer. More... | |
bool | allInstancesUnderLayer (igraph::ModuleOpInterface op) |
Return true if all instances of this module are under (or transitively under) layer blocks. More... | |
bool | anyInstanceInDesign (igraph::ModuleOpInterface op) |
Return true if any instance of this module is within (or transitively within) the design. More... | |
bool | allInstancesInDesign (igraph::ModuleOpInterface op) |
Return true if all instances of this module are within (or transitively withiin) the design. More... | |
bool | anyInstanceInEffectiveDesign (igraph::ModuleOpInterface op) |
Return true if any instance of this module is within (or transitively within) the effective design. More... | |
bool | allInstancesInEffectiveDesign (igraph::ModuleOpInterface op) |
Return true if all instances of this module are within (or transitively withiin) the effective design. More... | |
Private Member Functions | |
const ModuleAttributes & | getModuleAttributes (igraph::ModuleOpInterface op) |
Return the module attributes associated with a module. More... | |
Private Attributes | |
CircuitAttributes | circuitAttributes |
Stores circuit-level attributes. More... | |
DenseMap< Operation *, ModuleAttributes > | moduleAttributes |
Internal mapping of operations to module attributes. More... | |
Definition at line 26 of file FIRRTLInstanceInfo.h.
|
explicit |
Definition at line 80 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, circt::debugHeader(), circt::firrtl::InstanceInfo::CircuitAttributes::dut, circt::firrtl::dutAnnoClass, circt::firrtl::InstanceInfo::CircuitAttributes::effectiveDut, circt::firrtl::InstanceInfo::LatticeValue::getConstant(), circt::firrtl::AnnotationSet::hasAnnotation(), hasDut(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, circt::firrtl::InstanceInfo::LatticeValue::isConstant(), isDut(), isEffectiveDut(), circt::firrtl::InstanceInfo::LatticeValue::isMixed(), circt::firrtl::InstanceInfo::LatticeValue::markConstant(), circt::firrtl::InstanceInfo::LatticeValue::markMixed(), circt::firrtl::InstanceInfo::LatticeValue::mergeIn(), moduleAttributes, circt::firrtl::InstanceInfo::ModuleAttributes::underDut, and circt::firrtl::InstanceInfo::ModuleAttributes::underLayer.
bool InstanceInfo::allInstancesInDesign | ( | igraph::ModuleOpInterface | op | ) |
Return true if all instances of this module are within (or transitively withiin) the design.
Definition at line 237 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, and circt::firrtl::InstanceInfo::LatticeValue::isConstant().
Referenced by allInstancesInEffectiveDesign(), anyInstanceInDesign(), and printModuleInfo().
bool InstanceInfo::allInstancesInEffectiveDesign | ( | igraph::ModuleOpInterface | op | ) |
Return true if all instances of this module are within (or transitively withiin) the effective design.
Definition at line 246 of file FIRRTLInstanceInfo.cpp.
References allInstancesInDesign(), anyInstanceUnderLayer(), and hasDut().
Referenced by printModuleInfo().
bool InstanceInfo::allInstancesUnderDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if all instances of this module are under (or transitively under) the design-under-test.
This is true if the module is the design-under-test.
Definition at line 209 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isConstant(), and circt::firrtl::InstanceInfo::ModuleAttributes::underDut.
Referenced by allInstancesUnderEffectiveDut(), anyInstanceUnderDut(), and printModuleInfo().
bool InstanceInfo::allInstancesUnderEffectiveDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if all instances are under (or transitively under) the effective design-under-test.
This is true if the module is the effective design-under-test.
Definition at line 218 of file FIRRTLInstanceInfo.cpp.
References allInstancesUnderDut(), and hasDut().
Referenced by printModuleInfo().
bool InstanceInfo::allInstancesUnderLayer | ( | igraph::ModuleOpInterface | op | ) |
Return true if all instances of this module are under (or transitively under) layer blocks.
Definition at line 227 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isConstant(), and circt::firrtl::InstanceInfo::ModuleAttributes::underLayer.
Referenced by anyInstanceInEffectiveDesign(), anyInstanceUnderLayer(), and printModuleInfo().
bool InstanceInfo::anyInstanceInDesign | ( | igraph::ModuleOpInterface | op | ) |
Return true if any instance of this module is within (or transitively within) the design.
Definition at line 232 of file FIRRTLInstanceInfo.cpp.
References allInstancesInDesign(), getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, and circt::firrtl::InstanceInfo::LatticeValue::isMixed().
Referenced by anyInstanceInEffectiveDesign(), and printModuleInfo().
bool InstanceInfo::anyInstanceInEffectiveDesign | ( | igraph::ModuleOpInterface | op | ) |
Return true if any instance of this module is within (or transitively within) the effective design.
Definition at line 242 of file FIRRTLInstanceInfo.cpp.
References allInstancesUnderLayer(), anyInstanceInDesign(), and hasDut().
Referenced by printModuleInfo().
bool InstanceInfo::anyInstanceUnderDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if at least one instance of this module is under (or transitively under) the design-under-test.
This is true if the module is the design-under-test.
Definition at line 204 of file FIRRTLInstanceInfo.cpp.
References allInstancesUnderDut(), getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isMixed(), and circt::firrtl::InstanceInfo::ModuleAttributes::underDut.
Referenced by anyInstanceUnderEffectiveDut(), and printModuleInfo().
bool InstanceInfo::anyInstanceUnderEffectiveDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if at least one instance is under (or transitively under) the effective design-under-test.
This is true if the module is the effective design-under-test.
Definition at line 214 of file FIRRTLInstanceInfo.cpp.
References anyInstanceUnderDut(), and hasDut().
Referenced by printModuleInfo().
bool InstanceInfo::anyInstanceUnderLayer | ( | igraph::ModuleOpInterface | op | ) |
Return true if at least one instance of this module is under (or transitively under) a layer.
Definition at line 222 of file FIRRTLInstanceInfo.cpp.
References allInstancesUnderLayer(), getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isMixed(), and circt::firrtl::InstanceInfo::ModuleAttributes::underLayer.
Referenced by allInstancesInEffectiveDesign(), and printModuleInfo().
igraph::ModuleOpInterface InstanceInfo::getDut | ( | ) |
Return the design-under-test if one is defined for the circuit, otherwise return null.
Definition at line 196 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, and circt::firrtl::InstanceInfo::CircuitAttributes::dut.
Referenced by printCircuitInfo().
igraph::ModuleOpInterface InstanceInfo::getEffectiveDut | ( | ) |
Return the "effective" design-under-test.
This will be the design-under-test if one is defined. Otherwise, this will be the root node of the instance graph.
Definition at line 200 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, and circt::firrtl::InstanceInfo::CircuitAttributes::effectiveDut.
Referenced by printCircuitInfo().
|
private |
Return the module attributes associated with a module.
Definition at line 178 of file FIRRTLInstanceInfo.cpp.
References moduleAttributes.
Referenced by allInstancesInDesign(), allInstancesUnderDut(), allInstancesUnderLayer(), anyInstanceInDesign(), anyInstanceUnderDut(), and anyInstanceUnderLayer().
bool InstanceInfo::hasDut | ( | ) |
Return true if this circuit has a design-under-test.
Definition at line 182 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, and circt::firrtl::InstanceInfo::CircuitAttributes::dut.
Referenced by allInstancesInEffectiveDesign(), allInstancesUnderEffectiveDut(), anyInstanceInEffectiveDesign(), anyInstanceUnderEffectiveDut(), InstanceInfo(), isDut(), isEffectiveDut(), and printCircuitInfo().
bool InstanceInfo::isDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if this module is the design-under-test.
Definition at line 184 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, circt::firrtl::InstanceInfo::CircuitAttributes::dut, and hasDut().
Referenced by InstanceInfo(), isEffectiveDut(), and printModuleInfo().
bool InstanceInfo::isEffectiveDut | ( | igraph::ModuleOpInterface | op | ) |
Return true if this module is the design-under-test and the circuit has a design-under-test.
If the circuit has no design-under-test, then return true if this is the top module.
Definition at line 190 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, circt::firrtl::InstanceInfo::CircuitAttributes::effectiveDut, hasDut(), and isDut().
Referenced by InstanceInfo().
|
private |
Stores circuit-level attributes.
Definition at line 180 of file FIRRTLInstanceInfo.h.
Referenced by getDut(), getEffectiveDut(), hasDut(), InstanceInfo(), isDut(), and isEffectiveDut().
|
private |
Internal mapping of operations to module attributes.
Definition at line 184 of file FIRRTLInstanceInfo.h.
Referenced by getModuleAttributes(), and InstanceInfo().