CIRCT  19.0.0git
Macros | Functions
ESIOps.cpp File Reference
#include "circt/Dialect/ESI/ESIOps.h"
#include "circt/Dialect/HW/HWOpInterfaces.h"
#include "circt/Dialect/HW/HWTypes.h"
#include "circt/Dialect/SV/SVOps.h"
#include "circt/Dialect/SV/SVTypes.h"
#include "circt/Support/LLVM.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/SymbolTable.h"
#include "circt/Dialect/ESI/ESI.cpp.inc"
#include "circt/Dialect/ESI/ESIInterfaces.cpp.inc"
Include dependency graph for ESIOps.cpp:

Go to the source code of this file.

Macros

#define GET_OP_CLASSES
 

Functions

ParseResult parseWrapFIFOType (OpAsmParser &p, Type &dataType, Type &chanInputType)
 
void printWrapFIFOType (OpAsmPrinter &p, WrapFIFOOp wrap, Type dataType, Type chanType)
 
static Type getEsiDataType (circt::sv::InterfaceOp iface)
 If 'iface' looks like an ESI interface, return the inner data type. More...
 
static LogicalResult verifySVInterface (Operation *op, circt::sv::ModportType modportType, ChannelType chanType)
 Verify that the modport type of 'modportArg' points to an interface which looks like an ESI interface and the inner data from said interface matches the chan type's inner data type. More...
 
static bool parseInferWindowRet (OpAsmParser &p, Type &frame, Type &windowOut)
 Determine the input type ('frame') from the return type ('window'). More...
 
static void printInferWindowRet (OpAsmPrinter &p, Operation *, Type, Type window)
 
static FailureOr< ServiceDeclOpInterface > getServiceDecl (Operation *op, SymbolTableCollection &symbolTable, hw::InnerRefAttr servicePort)
 Get the port declaration op for the specified service decl, port name. More...
 
static FailureOr< ServicePortInfogetServicePortInfo (Operation *op, SymbolTableCollection &symbolTable, hw::InnerRefAttr servicePort)
 Get the port info for the specified service decl and port name. More...
 
static LogicalResult checkTypeMatch (Operation *req, ChannelBundleType svcBundleType, ChannelBundleType reqBundleType, bool skipDirectionCheck)
 Check that the channels on two bundles match allowing for AnyType in the 'svc' bundle. More...
 
static ParseResult parseUnPackBundleType (OpAsmParser &parser, SmallVectorImpl< Type > &toChannelTypes, SmallVectorImpl< Type > &fromChannelTypes, Type &type)
 
template<typename T3 , typename T4 >
static void printUnPackBundleType (OpAsmPrinter &p, Operation *, T3, T4, Type bundleType)
 
bool parseServiceImplRecordReqDetails (OpAsmParser &parser, Region &reqDetailsRegion)
 
void printServiceImplRecordReqDetails (OpAsmPrinter &p, ServiceImplRecordOp, Region &reqDetailsRegion)
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 699 of file ESIOps.cpp.

Function Documentation

◆ checkTypeMatch()

static LogicalResult checkTypeMatch ( Operation *  req,
ChannelBundleType  svcBundleType,
ChannelBundleType  reqBundleType,
bool  skipDirectionCheck 
)
static

Check that the channels on two bundles match allowing for AnyType in the 'svc' bundle.

Definition at line 376 of file ESIOps.cpp.

References esiaccel.accelerator::ctxt, and circt::calyx::direction::get().

◆ getEsiDataType()

static Type getEsiDataType ( circt::sv::InterfaceOp  iface)
static

If 'iface' looks like an ESI interface, return the inner data type.

Definition at line 254 of file ESIOps.cpp.

Referenced by verifySVInterface().

◆ getServiceDecl()

static FailureOr<ServiceDeclOpInterface> getServiceDecl ( Operation *  op,
SymbolTableCollection &  symbolTable,
hw::InnerRefAttr  servicePort 
)
static

Get the port declaration op for the specified service decl, port name.

Definition at line 348 of file ESIOps.cpp.

Referenced by getServicePortInfo().

◆ getServicePortInfo()

static FailureOr<ServicePortInfo> getServicePortInfo ( Operation *  op,
SymbolTableCollection &  symbolTable,
hw::InnerRefAttr  servicePort 
)
static

Get the port info for the specified service decl and port name.

Definition at line 363 of file ESIOps.cpp.

References getServiceDecl().

◆ parseInferWindowRet()

static bool parseInferWindowRet ( OpAsmParser &  p,
Type &  frame,
Type &  windowOut 
)
static

Determine the input type ('frame') from the return type ('window').

Definition at line 328 of file ESIOps.cpp.

◆ parseServiceImplRecordReqDetails()

bool parseServiceImplRecordReqDetails ( OpAsmParser &  parser,
Region &  reqDetailsRegion 
)

Definition at line 655 of file ESIOps.cpp.

◆ parseUnPackBundleType()

static ParseResult parseUnPackBundleType ( OpAsmParser &  parser,
SmallVectorImpl< Type > &  toChannelTypes,
SmallVectorImpl< Type > &  fromChannelTypes,
Type &  type 
)
static

Definition at line 440 of file ESIOps.cpp.

References assert().

◆ parseWrapFIFOType()

ParseResult parseWrapFIFOType ( OpAsmParser &  p,
Type &  dataType,
Type &  chanInputType 
)

Definition at line 207 of file ESIOps.cpp.

◆ printInferWindowRet()

static void printInferWindowRet ( OpAsmPrinter &  p,
Operation *  ,
Type  ,
Type  window 
)
static

Definition at line 337 of file ESIOps.cpp.

◆ printServiceImplRecordReqDetails()

void printServiceImplRecordReqDetails ( OpAsmPrinter &  p,
ServiceImplRecordOp  ,
Region &  reqDetailsRegion 
)

Definition at line 663 of file ESIOps.cpp.

◆ printUnPackBundleType()

template<typename T3 , typename T4 >
static void printUnPackBundleType ( OpAsmPrinter &  p,
Operation *  ,
T3  ,
T4  ,
Type  bundleType 
)
static

Definition at line 459 of file ESIOps.cpp.

◆ printWrapFIFOType()

void printWrapFIFOType ( OpAsmPrinter &  p,
WrapFIFOOp  wrap,
Type  dataType,
Type  chanType 
)

Definition at line 220 of file ESIOps.cpp.

◆ verifySVInterface()

static LogicalResult verifySVInterface ( Operation *  op,
circt::sv::ModportType  modportType,
ChannelType  chanType 
)
static

Verify that the modport type of 'modportArg' points to an interface which looks like an ESI interface and the inner data from said interface matches the chan type's inner data type.

Definition at line 269 of file ESIOps.cpp.

References getEsiDataType().