CIRCT  19.0.0git
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
circt::sv::CaseBitPattern Class Reference

#include <SVOps.h>

Inheritance diagram for circt::sv::CaseBitPattern:
Inheritance graph
[legend]
Collaboration diagram for circt::sv::CaseBitPattern:
Collaboration graph
[legend]

Public Member Functions

size_t getWidth () const
 
CasePatternBit getBit (size_t bitNumber) const
 Return the specified bit, bit 0 is the least significant bit. More...
 
bool hasX () const override
 Return true if this pattern has an X. More...
 
bool hasZ () const override
 Return true if this pattern has an Z. More...
 
Attribute attr () const override
 
 CaseBitPattern (ArrayRef< CasePatternBit > bits, MLIRContext *context)
 Get a CasePattern from a specified list of CasePatternBit. More...
 
 CaseBitPattern (const APInt &value, MLIRContext *context)
 Get a CasePattern for the specified constant value. More...
 
 CaseBitPattern (IntegerAttr attr)
 Get a CasePattern with a correctly encoded attribute. More...
 
- Public Member Functions inherited from circt::sv::CasePattern
 CasePattern (CasePatternKind kind)
 
virtual ~CasePattern ()
 
CasePatternKind getKind () const
 

Static Public Member Functions

static bool classof (const CasePattern *S)
 

Private Attributes

IntegerAttr intAttr
 

Additional Inherited Members

- Public Types inherited from circt::sv::CasePattern
enum  CasePatternKind { CPK_bit , CPK_enum , CPK_default }
 

Detailed Description

Definition at line 93 of file SVOps.h.

Constructor & Destructor Documentation

◆ CaseBitPattern() [1/3]

CaseBitPattern::CaseBitPattern ( ArrayRef< CasePatternBit bits,
MLIRContext *  context 
)

Get a CasePattern from a specified list of CasePatternBit.

Bits are specified in most least significant order - element zero is the least significant bit.

Definition at line 779 of file SVOps.cpp.

References circt::calyx::direction::get(), intAttr, and pattern.

◆ CaseBitPattern() [2/3]

CaseBitPattern::CaseBitPattern ( const APInt &  value,
MLIRContext *  context 
)

Get a CasePattern for the specified constant value.

Definition at line 773 of file SVOps.cpp.

◆ CaseBitPattern() [3/3]

circt::sv::CaseBitPattern::CaseBitPattern ( IntegerAttr  attr)
inline

Get a CasePattern with a correctly encoded attribute.

Definition at line 115 of file SVOps.h.

Member Function Documentation

◆ attr()

Attribute circt::sv::CaseBitPattern::attr ( ) const
inlineoverridevirtual

Implements circt::sv::CasePattern.

Definition at line 104 of file SVOps.h.

References intAttr.

◆ classof()

static bool circt::sv::CaseBitPattern::classof ( const CasePattern S)
inlinestatic

Definition at line 117 of file SVOps.h.

References circt::sv::CasePattern::CPK_bit, and circt::sv::CasePattern::getKind().

◆ getBit()

auto CaseBitPattern::getBit ( size_t  bitNumber) const

Return the specified bit, bit 0 is the least significant bit.

Definition at line 743 of file SVOps.cpp.

Referenced by hasX(), and hasZ().

◆ getWidth()

size_t circt::sv::CaseBitPattern::getWidth ( ) const
inline

Definition at line 96 of file SVOps.h.

References intAttr.

Referenced by hasX(), and hasZ().

◆ hasX()

bool CaseBitPattern::hasX ( ) const
overridevirtual

Return true if this pattern has an X.

Reimplemented from circt::sv::CasePattern.

Definition at line 748 of file SVOps.cpp.

References circt::sv::AnyX, getBit(), and getWidth().

◆ hasZ()

bool CaseBitPattern::hasZ ( ) const
overridevirtual

Return true if this pattern has an Z.

Reimplemented from circt::sv::CasePattern.

Definition at line 755 of file SVOps.cpp.

References circt::sv::AnyZ, getBit(), and getWidth().

Member Data Documentation

◆ intAttr

IntegerAttr circt::sv::CaseBitPattern::intAttr
private

Definition at line 120 of file SVOps.h.

Referenced by attr(), CaseBitPattern(), and getWidth().


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