CIRCT 22.0.0git
Loading...
Searching...
No Matches
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.
 
bool hasX () const override
 Return true if this pattern has an X.
 
bool hasZ () const override
 Return true if this pattern has an Z.
 
Attribute attr () const override
 
 CaseBitPattern (ArrayRef< CasePatternBit > bits, MLIRContext *context)
 Get a CasePattern from a specified list of CasePatternBit.
 
 CaseBitPattern (const APInt &value, MLIRContext *context)
 Get a CasePattern for the specified constant value.
 
 CaseBitPattern (IntegerAttr attr)
 Get a CasePattern with a correctly encoded attribute.
 
- 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 96 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 821 of file SVOps.cpp.

References intAttr, and pattern.

◆ CaseBitPattern() [2/3]

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

Get a CasePattern for the specified constant value.

Definition at line 815 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 118 of file SVOps.h.

Member Function Documentation

◆ attr()

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

Implements circt::sv::CasePattern.

Definition at line 107 of file SVOps.h.

References intAttr.

◆ classof()

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

Definition at line 120 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 785 of file SVOps.cpp.

◆ getWidth()

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

Definition at line 99 of file SVOps.h.

References intAttr.

◆ hasX()

bool CaseBitPattern::hasX ( ) const
overridevirtual

Return true if this pattern has an X.

Reimplemented from circt::sv::CasePattern.

Definition at line 790 of file SVOps.cpp.

References circt::sv::AnyX.

◆ hasZ()

bool CaseBitPattern::hasZ ( ) const
overridevirtual

Return true if this pattern has an Z.

Reimplemented from circt::sv::CasePattern.

Definition at line 797 of file SVOps.cpp.

References circt::sv::AnyZ.

Member Data Documentation

◆ intAttr

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

Definition at line 123 of file SVOps.h.

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


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