CIRCT
20.0.0git
|
This is the common base class between SIntType and UIntType. More...
#include <FIRRTLTypes.h>
Public Member Functions | |
bool | isSigned () |
bool | isUnsigned () |
int32_t | getWidthOrSentinel () const |
Return the width of this type, or -1 if it has none specified. More... | |
IntType | getConstType (bool isConst) |
Return a 'const' or non-'const' version of this type. More... | |
Public Member Functions inherited from circt::firrtl::FIRRTLBaseType | |
bool | isConst () |
Returns true if this is a 'const' type that can only hold compile-time constant values. More... | |
bool | isPassive () const |
Return true if this is a "passive" type - one that contains no "flip" types recursively within itself. More... | |
FIRRTLBaseType | getPassiveType () |
Return this type with any flip types recursively removed from itself. More... | |
FIRRTLBaseType | getAnonymousType () |
Return this type with any type alias types recursively removed from itself. More... | |
FIRRTLBaseType | getConstType (bool isConst) |
Return a 'const' or non-'const' version of this type. More... | |
FIRRTLBaseType | getAllConstDroppedType () |
Return this type with a 'const' modifiers dropped. More... | |
FIRRTLBaseType | getMaskType () |
Return this type with all ground types replaced with UInt<1>. More... | |
FIRRTLBaseType | getWidthlessType () |
Return this type with widths of all ground types removed. More... | |
int32_t | getBitWidthOrSentinel () |
If this is an IntType, AnalogType, or sugar type for a single bit (Clock, Reset, etc) then return the bitwidth. More... | |
bool | isRegisterType () |
Returns true if this is a non-const "passive" that which is not analog. More... | |
bool | isResetType () |
Return true if this is a valid "reset" type. More... | |
Public Member Functions inherited from circt::firrtl::WidthQualifiedTypeTrait< IntType > | |
std::optional< int32_t > | getWidth () const |
Return an optional containing the width, if the width is known (or empty if width is unknown). More... | |
bool | hasWidth () const |
Return true if this integer type has a known width. More... | |
Static Public Member Functions | |
static IntType | get (MLIRContext *context, bool isSigned, int32_t widthOrSentinel=-1, bool isConst=false) |
Return an SIntType or UIntType with the specified signedness, width, and constness. More... | |
static bool | classof (Type type) |
Static Public Member Functions inherited from circt::firrtl::FIRRTLBaseType | |
static bool | classof (Type type) |
Support method to enable LLVM-style type casting. More... | |
This is the common base class between SIntType and UIntType.
Definition at line 296 of file FIRRTLTypes.h.
|
inlinestatic |
Definition at line 314 of file FIRRTLTypes.h.
|
static |
Return an SIntType or UIntType with the specified signedness, width, and constness.
Return a SIntType or UIntType with the specified signedness, width, and constness.
Definition at line 1221 of file FIRRTLTypes.cpp.
References circt::calyx::direction::get(), circt::firrtl::FIRRTLBaseType::isConst(), and isSigned().
IntType IntType::getConstType | ( | bool | isConst | ) |
Return a 'const' or non-'const' version of this type.
Definition at line 1258 of file FIRRTLTypes.cpp.
References getConstType(), and circt::firrtl::FIRRTLBaseType::isConst().
Referenced by circt::firrtl::emitConnect(), and getConstType().
int32_t IntType::getWidthOrSentinel | ( | ) | const |
Return the width of this type, or -1 if it has none specified.
Definition at line 1228 of file FIRRTLTypes.cpp.
Referenced by circt::firrtl::FIRRTLBaseType::getBitWidthOrSentinel().
|
inline |
Definition at line 305 of file FIRRTLTypes.h.
Referenced by circt::firrtl::emitConnect(), and get().
|
inline |
Definition at line 306 of file FIRRTLTypes.h.