CIRCT  19.0.0git
Public Member Functions | Public Attributes | List of all members
circt::firrtl::GenericIntrinsic Struct Reference

Helper class for checking and extracting information from the generic instrinsic op. More...

#include <FIRRTLIntrinsics.h>

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

Public Member Functions

 GenericIntrinsic (GenericIntrinsicOp op)
 
InFlightDiagnostic emitError ()
 
ParseResult hasNInputs (unsigned n)
 
template<typename C >
ParseResult checkInputType (unsigned n, const Twine &msg, C &&call)
 
template<typename C >
ParseResult checkInputType (unsigned n, C &&call)
 
template<typename T >
ParseResult typedInput (unsigned n)
 
ParseResult hasResetInput (unsigned n)
 
template<typename T >
ParseResult sizedInput (unsigned n, int32_t size)
 
ParseResult hasNParam (unsigned n, unsigned c=0)
 
ParseResult namedParam (StringRef paramName, bool optional=false)
 
ParseResult namedIntParam (StringRef paramName, bool optional=false)
 
ParamDeclAttr getParamByName (StringRef name)
 
template<typename T >
getParamValue (StringRef name)
 Get parameter value by name, if present, as requested type. More...
 
ParseResult hasOutput ()
 
ParseResult hasNoOutput ()
 
template<typename T >
ParseResult typedOutput ()
 
template<typename T >
ParseResult sizedOutput (int32_t size)
 
mlir::TypedValue< BundleType > getOutputBundle ()
 
ParseResult hasNOutputElements (unsigned n)
 
template<typename C >
ParseResult checkOutputElement (unsigned n, StringRef name, const Twine &msg, C &&call)
 
template<typename C >
ParseResult checkOutputElement (unsigned n, StringRef name, C &&call)
 
ParseResult hasOutputElement (unsigned n, StringRef name)
 
template<typename T >
ParseResult typedOutputElement (unsigned n, StringRef name)
 
template<typename T >
ParseResult sizedOutputElement (unsigned n, StringRef name, int32_t size)
 

Public Attributes

GenericIntrinsicOp op
 

Detailed Description

Helper class for checking and extracting information from the generic instrinsic op.

Definition at line 26 of file FIRRTLIntrinsics.h.

Constructor & Destructor Documentation

◆ GenericIntrinsic()

circt::firrtl::GenericIntrinsic::GenericIntrinsic ( GenericIntrinsicOp  op)
inline

Definition at line 29 of file FIRRTLIntrinsics.h.

Member Function Documentation

◆ checkInputType() [1/2]

template<typename C >
ParseResult circt::firrtl::GenericIntrinsic::checkInputType ( unsigned  n,
C &&  call 
)
inline

Definition at line 49 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ checkInputType() [2/2]

template<typename C >
ParseResult circt::firrtl::GenericIntrinsic::checkInputType ( unsigned  n,
const Twine &  msg,
C &&  call 
)
inline

Definition at line 40 of file FIRRTLIntrinsics.h.

References emitError(), and op.

Referenced by checkInputType(), hasResetInput(), sizedInput(), and typedInput().

◆ checkOutputElement() [1/2]

template<typename C >
ParseResult circt::firrtl::GenericIntrinsic::checkOutputElement ( unsigned  n,
StringRef  name,
C &&  call 
)
inline

Definition at line 162 of file FIRRTLIntrinsics.h.

References checkOutputElement().

◆ checkOutputElement() [2/2]

template<typename C >
ParseResult circt::firrtl::GenericIntrinsic::checkOutputElement ( unsigned  n,
StringRef  name,
const Twine &  msg,
C &&  call 
)
inline

◆ emitError()

InFlightDiagnostic circt::firrtl::GenericIntrinsic::emitError ( )
inline

◆ getOutputBundle()

mlir::TypedValue<BundleType> circt::firrtl::GenericIntrinsic::getOutputBundle ( )
inline

Definition at line 136 of file FIRRTLIntrinsics.h.

References op.

Referenced by checkOutputElement(), and hasNOutputElements().

◆ getParamByName()

ParamDeclAttr circt::firrtl::GenericIntrinsic::getParamByName ( StringRef  name)
inline

Definition at line 83 of file FIRRTLIntrinsics.h.

References op.

Referenced by getParamValue().

◆ getParamValue()

template<typename T >
T circt::firrtl::GenericIntrinsic::getParamValue ( StringRef  name)
inline

Get parameter value by name, if present, as requested type.

Definition at line 92 of file FIRRTLIntrinsics.h.

References getParamByName().

◆ hasNInputs()

ParseResult GenericIntrinsic::hasNInputs ( unsigned  n)

Definition at line 21 of file FIRRTLIntrinsics.cpp.

References emitError(), and op.

◆ hasNoOutput()

ParseResult circt::firrtl::GenericIntrinsic::hasNoOutput ( )
inline

Definition at line 108 of file FIRRTLIntrinsics.h.

References emitError(), and op.

◆ hasNOutputElements()

ParseResult GenericIntrinsic::hasNOutputElements ( unsigned  n)

Definition at line 28 of file FIRRTLIntrinsics.cpp.

References emitError(), and getOutputBundle().

◆ hasNParam()

ParseResult GenericIntrinsic::hasNParam ( unsigned  n,
unsigned  c = 0 
)

Definition at line 38 of file FIRRTLIntrinsics.cpp.

References emitError(), and op.

◆ hasOutput()

ParseResult circt::firrtl::GenericIntrinsic::hasOutput ( )
inline

Definition at line 103 of file FIRRTLIntrinsics.h.

References emitError(), and op.

Referenced by typedOutput().

◆ hasOutputElement()

ParseResult circt::firrtl::GenericIntrinsic::hasOutputElement ( unsigned  n,
StringRef  name 
)
inline

Definition at line 167 of file FIRRTLIntrinsics.h.

References checkOutputElement().

◆ hasResetInput()

ParseResult circt::firrtl::GenericIntrinsic::hasResetInput ( unsigned  n)
inline

Definition at line 58 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ namedIntParam()

ParseResult GenericIntrinsic::namedIntParam ( StringRef  paramName,
bool  optional = false 
)

Definition at line 69 of file FIRRTLIntrinsics.cpp.

References emitError(), and op.

◆ namedParam()

ParseResult GenericIntrinsic::namedParam ( StringRef  paramName,
bool  optional = false 
)

Definition at line 53 of file FIRRTLIntrinsics.cpp.

References emitError(), and op.

◆ sizedInput()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::sizedInput ( unsigned  n,
int32_t  size 
)
inline

Definition at line 66 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ sizedOutput()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::sizedOutput ( int32_t  size)
inline

Definition at line 124 of file FIRRTLIntrinsics.h.

References emitError(), and op.

◆ sizedOutputElement()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::sizedOutputElement ( unsigned  n,
StringRef  name,
int32_t  size 
)
inline

Definition at line 177 of file FIRRTLIntrinsics.h.

References checkOutputElement().

◆ typedInput()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::typedInput ( unsigned  n)
inline

Definition at line 54 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ typedOutput()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::typedOutput ( )
inline

Definition at line 115 of file FIRRTLIntrinsics.h.

References emitError(), hasOutput(), and op.

◆ typedOutputElement()

template<typename T >
ParseResult circt::firrtl::GenericIntrinsic::typedOutputElement ( unsigned  n,
StringRef  name 
)
inline

Definition at line 172 of file FIRRTLIntrinsics.h.

References checkOutputElement().

Member Data Documentation

◆ op

GenericIntrinsicOp circt::firrtl::GenericIntrinsic::op

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