CIRCT 24.0.0git
Loading...
Searching...
No Matches
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:

Public Member Functions

 GenericIntrinsic (GenericIntrinsicOp op)
InFlightDiagnostic emitError ()
ParseResult hasNInputs (unsigned n, unsigned c=0)
unsigned getNumInputs ()
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>
T getParamValue (StringRef name)
 Get parameter value by name, if present, as requested type.
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.

References op.

Member Function Documentation

◆ checkInputType() [1/2]

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

Definition at line 50 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 41 of file FIRRTLIntrinsics.h.

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

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 163 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

◆ getNumInputs()

unsigned GenericIntrinsic::getNumInputs ( )

Definition at line 45 of file FIRRTLIntrinsics.cpp.

References op.

◆ getOutputBundle()

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

Definition at line 137 of file FIRRTLIntrinsics.h.

References op.

Referenced by checkOutputElement(), and hasNOutputElements().

◆ getParamByName()

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

Definition at line 84 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 93 of file FIRRTLIntrinsics.h.

References getParamByName().

◆ hasNInputs()

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

Definition at line 30 of file FIRRTLIntrinsics.cpp.

References emitError(), failure(), op, and success().

◆ hasNoOutput()

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

Definition at line 109 of file FIRRTLIntrinsics.h.

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

◆ hasNOutputElements()

ParseResult GenericIntrinsic::hasNOutputElements ( unsigned n)

Definition at line 47 of file FIRRTLIntrinsics.cpp.

References emitError(), getOutputBundle(), and success().

◆ hasNParam()

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

Definition at line 57 of file FIRRTLIntrinsics.cpp.

References emitError(), failure(), op, and success().

◆ hasOutput()

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

Definition at line 104 of file FIRRTLIntrinsics.h.

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

Referenced by typedOutput().

◆ hasOutputElement()

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

Definition at line 168 of file FIRRTLIntrinsics.h.

References checkOutputElement().

◆ hasResetInput()

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

Definition at line 59 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ namedIntParam()

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

Definition at line 88 of file FIRRTLIntrinsics.cpp.

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

◆ namedParam()

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

Definition at line 72 of file FIRRTLIntrinsics.cpp.

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

◆ sizedInput()

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

Definition at line 67 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ sizedOutput()

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

Definition at line 125 of file FIRRTLIntrinsics.h.

References emitError(), failure(), op, success(), and typedOutput().

◆ sizedOutputElement()

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

Definition at line 178 of file FIRRTLIntrinsics.h.

References checkOutputElement().

◆ typedInput()

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

Definition at line 55 of file FIRRTLIntrinsics.h.

References checkInputType().

◆ typedOutput()

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

Definition at line 116 of file FIRRTLIntrinsics.h.

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

Referenced by sizedOutput().

◆ typedOutputElement()

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

Definition at line 173 of file FIRRTLIntrinsics.h.

References checkOutputElement().

Member Data Documentation

◆ op


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