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::firrtl::companionAnnoClass, circt::debugHeader(), circt::firrtl::InstanceInfo::CircuitAttributes::dut, circt::firrtl::dutAnnoClass, circt::firrtl::InstanceInfo::CircuitAttributes::effectiveDut, circt::firrtl::AnnotationSet::hasAnnotation(), hasDut(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, circt::firrtl::InstanceInfo::ModuleAttributes::inEffectiveDesign, isDut(), isEffectiveDut(), circt::firrtl::InstanceInfo::LatticeValue::markConstant(), 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 265 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, and circt::firrtl::InstanceInfo::LatticeValue::isConstant().
Referenced by 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 275 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inEffectiveDesign, and circt::firrtl::InstanceInfo::LatticeValue::isConstant().
Referenced by anyInstanceInEffectiveDesign(), and 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 237 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 246 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 255 of file FIRRTLInstanceInfo.cpp.
References getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isConstant(), and circt::firrtl::InstanceInfo::ModuleAttributes::underLayer.
Referenced by 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 260 of file FIRRTLInstanceInfo.cpp.
References allInstancesInDesign(), getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inDesign, and circt::firrtl::InstanceInfo::LatticeValue::isMixed().
Referenced by 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 270 of file FIRRTLInstanceInfo.cpp.
References allInstancesInEffectiveDesign(), getModuleAttributes(), circt::firrtl::InstanceInfo::ModuleAttributes::inEffectiveDesign, and circt::firrtl::InstanceInfo::LatticeValue::isMixed().
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 232 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 242 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 250 of file FIRRTLInstanceInfo.cpp.
References allInstancesUnderLayer(), getModuleAttributes(), circt::firrtl::InstanceInfo::LatticeValue::isMixed(), and circt::firrtl::InstanceInfo::ModuleAttributes::underLayer.
Referenced by printModuleInfo().
igraph::ModuleOpInterface InstanceInfo::getDut | ( | ) |
Return the design-under-test if one is defined for the circuit, otherwise return null.
Definition at line 224 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 228 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 206 of file FIRRTLInstanceInfo.cpp.
References moduleAttributes.
Referenced by allInstancesInDesign(), allInstancesInEffectiveDesign(), allInstancesUnderDut(), allInstancesUnderLayer(), anyInstanceInDesign(), anyInstanceInEffectiveDesign(), anyInstanceUnderDut(), and anyInstanceUnderLayer().
bool InstanceInfo::hasDut | ( | ) |
Return true if this circuit has a design-under-test.
Definition at line 210 of file FIRRTLInstanceInfo.cpp.
References circuitAttributes, and circt::firrtl::InstanceInfo::CircuitAttributes::dut.
Referenced by allInstancesUnderEffectiveDut(), 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 212 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 218 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 188 of file FIRRTLInstanceInfo.h.
Referenced by getDut(), getEffectiveDut(), hasDut(), InstanceInfo(), isDut(), and isEffectiveDut().
|
private |
Internal mapping of operations to module attributes.
Definition at line 192 of file FIRRTLInstanceInfo.h.
Referenced by getModuleAttributes(), and InstanceInfo().