CIRCT  20.0.0git
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
circt::firrtl::InstanceInfo Class Reference

#include <FIRRTLInstanceInfo.h>

Collaboration diagram for circt::firrtl::InstanceInfo:
Collaboration graph
[legend]

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 ModuleAttributesgetModuleAttributes (igraph::ModuleOpInterface op)
 Return the module attributes associated with a module. More...
 

Private Attributes

CircuitAttributes circuitAttributes
 Stores circuit-level attributes. More...
 
DenseMap< Operation *, ModuleAttributesmoduleAttributes
 Internal mapping of operations to module attributes. More...
 

Detailed Description

Definition at line 26 of file FIRRTLInstanceInfo.h.

Constructor & Destructor Documentation

◆ InstanceInfo()

InstanceInfo::InstanceInfo ( Operation *  op,
mlir::AnalysisManager &  am 
)
explicit

Member Function Documentation

◆ allInstancesInDesign()

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().

◆ allInstancesInEffectiveDesign()

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().

◆ allInstancesUnderDut()

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().

◆ allInstancesUnderEffectiveDut()

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().

◆ allInstancesUnderLayer()

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().

◆ anyInstanceInDesign()

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().

◆ anyInstanceInEffectiveDesign()

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().

◆ anyInstanceUnderDut()

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().

◆ anyInstanceUnderEffectiveDut()

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().

◆ anyInstanceUnderLayer()

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().

◆ getDut()

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().

◆ getEffectiveDut()

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().

◆ getModuleAttributes()

const InstanceInfo::ModuleAttributes & InstanceInfo::getModuleAttributes ( igraph::ModuleOpInterface  op)
private

◆ hasDut()

bool InstanceInfo::hasDut ( )

◆ isDut()

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().

◆ isEffectiveDut()

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().

Member Data Documentation

◆ circuitAttributes

CircuitAttributes circt::firrtl::InstanceInfo::circuitAttributes
private
Initial value:
= {nullptr,
nullptr}

Stores circuit-level attributes.

Definition at line 188 of file FIRRTLInstanceInfo.h.

Referenced by getDut(), getEffectiveDut(), hasDut(), InstanceInfo(), isDut(), and isEffectiveDut().

◆ moduleAttributes

DenseMap<Operation *, ModuleAttributes> circt::firrtl::InstanceInfo::moduleAttributes
private

Internal mapping of operations to module attributes.

Definition at line 192 of file FIRRTLInstanceInfo.h.

Referenced by getModuleAttributes(), and InstanceInfo().


The documentation for this class was generated from the following files: