CIRCT
19.0.0git
|
Assist the lowering steps for conversions which need to create auxiliary IR. More...
#include <PassDetails.h>
Public Member Functions | |
ESIHWBuilder (Operation *top) | |
ArrayAttr | getStageParameterList (Attribute value) |
Return a parameter list for the stage module with the specified value. More... | |
hw::HWModuleExternOp | declareStage (Operation *symTable, PipelineStageOp) |
Write an 'ExternModuleOp' to use a hand-coded SystemVerilog module. More... | |
hw::HWModuleExternOp | declareCosimEndpointToHostModule (Operation *symTable) |
Write an 'ExternModuleOp' to use a hand-coded SystemVerilog module. More... | |
hw::HWModuleExternOp | declareCosimEndpointFromHostModule (Operation *symTable) |
sv::InterfaceOp | getOrConstructInterface (ChannelType) |
Return the InterfaceType which corresponds to an ESI port type. More... | |
sv::InterfaceOp | constructInterface (ChannelType) |
Public Attributes | |
const StringAttr | a |
const StringAttr | aValid |
const StringAttr | aReady |
const StringAttr | x |
const StringAttr | xValid |
const StringAttr | xReady |
const StringAttr | dataOutValid |
const StringAttr | dataOutReady |
const StringAttr | dataOut |
const StringAttr | dataInValid |
const StringAttr | dataInReady |
const StringAttr | dataIn |
const StringAttr | clk |
const StringAttr | rst |
const StringAttr | width |
Static Public Attributes | |
static constexpr char | dataStr [] = "data" |
static constexpr char | validStr [] = "valid" |
static constexpr char | readyStr [] = "ready" |
static constexpr char | sourceStr [] = "source" |
static constexpr char | sinkStr [] = "sink" |
Private Member Functions | |
StringAttr | constructInterfaceName (ChannelType) |
Construct a type-appropriate name for the interface, making sure it's not taken in the symbol table. More... | |
Type | getClockType () |
Private Attributes | |
std::optional< hw::HWModuleExternOp > | declaredCosimEndpointToHostModule |
std::optional< hw::HWModuleExternOp > | declaredCosimEndpointFromHostModule |
llvm::DenseMap< Type, hw::HWModuleExternOp > | declaredStage |
llvm::DenseMap< Type, sv::InterfaceOp > | portTypeLookup |
Assist the lowering steps for conversions which need to create auxiliary IR.
Definition at line 65 of file PassDetails.h.
ESIHWBuilder::ESIHWBuilder | ( | Operation * | top | ) |
Definition at line 50 of file ESIPasses.cpp.
InterfaceOp ESIHWBuilder::constructInterface | ( | ChannelType | chan | ) |
Definition at line 245 of file ESIPasses.cpp.
References constructInterfaceName(), dataStr, readyStr, sinkStr, sourceStr, and validStr.
Referenced by getOrConstructInterface().
|
private |
Construct a type-appropriate name for the interface, making sure it's not taken in the symbol table.
Definition at line 100 of file ESIPasses.cpp.
References constructUniqueSymbol().
Referenced by constructInterface().
HWModuleExternOp ESIHWBuilder::declareCosimEndpointFromHostModule | ( | Operation * | symTable | ) |
Definition at line 206 of file ESIPasses.cpp.
References clk, constructUniqueSymbol(), dataOut, dataOutReady, dataOutValid, declaredCosimEndpointFromHostModule, circt::calyx::direction::get(), getClockType(), Input, Output, and rst.
HWModuleExternOp ESIHWBuilder::declareCosimEndpointToHostModule | ( | Operation * | symTable | ) |
Write an 'ExternModuleOp' to use a hand-coded SystemVerilog module.
Said module contains a bi-directional Cosimulation DPI interface with valid/ready semantics.
Definition at line 178 of file ESIPasses.cpp.
References clk, constructUniqueSymbol(), dataIn, dataInReady, dataInValid, declaredCosimEndpointToHostModule, circt::calyx::direction::get(), getClockType(), Input, Output, and rst.
HWModuleExternOp ESIHWBuilder::declareStage | ( | Operation * | symTable, |
PipelineStageOp | stage | ||
) |
Write an 'ExternModuleOp' to use a hand-coded SystemVerilog module.
Said module implements pipeline stage, adding 1 cycle latency. This particular implementation is double-buffered and fully pipelines the reverse-flow ready signal.
Definition at line 139 of file ESIPasses.cpp.
References a, aReady, aValid, clk, constructUniqueSymbol(), declaredStage, getClockType(), getStageParameterList(), Input, Output, rst, x, xReady, and xValid.
|
private |
Definition at line 262 of file ESIPasses.cpp.
References circt::calyx::direction::get().
Referenced by declareCosimEndpointFromHostModule(), declareCosimEndpointToHostModule(), and declareStage().
InterfaceOp ESIHWBuilder::getOrConstructInterface | ( | ChannelType | t | ) |
Return the InterfaceType which corresponds to an ESI port type.
If it doesn't exist in the cache, build the InterfaceOp and the corresponding type.
Definition at line 236 of file ESIPasses.cpp.
References constructInterface(), and portTypeLookup.
ArrayAttr ESIHWBuilder::getStageParameterList | ( | Attribute | value | ) |
Return a parameter list for the stage module with the specified value.
Definition at line 129 of file ESIPasses.cpp.
References circt::calyx::direction::get(), and width.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::a |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::aReady |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::aValid |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::clk |
Definition at line 81 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule(), declareCosimEndpointToHostModule(), and declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::dataIn |
Definition at line 80 of file PassDetails.h.
Referenced by declareCosimEndpointToHostModule().
const StringAttr circt::esi::detail::ESIHWBuilder::dataInReady |
Definition at line 80 of file PassDetails.h.
Referenced by declareCosimEndpointToHostModule().
const StringAttr circt::esi::detail::ESIHWBuilder::dataInValid |
Definition at line 79 of file PassDetails.h.
Referenced by declareCosimEndpointToHostModule().
const StringAttr circt::esi::detail::ESIHWBuilder::dataOut |
Definition at line 79 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule().
const StringAttr circt::esi::detail::ESIHWBuilder::dataOutReady |
Definition at line 79 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule().
const StringAttr circt::esi::detail::ESIHWBuilder::dataOutValid |
Definition at line 79 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule().
|
staticconstexpr |
Definition at line 85 of file PassDetails.h.
Referenced by constructInterface().
|
private |
Definition at line 97 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule().
|
private |
Definition at line 96 of file PassDetails.h.
Referenced by declareCosimEndpointToHostModule().
|
private |
Definition at line 98 of file PassDetails.h.
Referenced by declareStage().
|
private |
Definition at line 99 of file PassDetails.h.
Referenced by getOrConstructInterface().
|
static |
Definition at line 86 of file PassDetails.h.
Referenced by constructInterface().
const StringAttr circt::esi::detail::ESIHWBuilder::rst |
Definition at line 81 of file PassDetails.h.
Referenced by declareCosimEndpointFromHostModule(), declareCosimEndpointToHostModule(), and declareStage().
|
static |
Definition at line 87 of file PassDetails.h.
Referenced by constructInterface().
|
static |
Definition at line 86 of file PassDetails.h.
Referenced by constructInterface().
|
static |
Definition at line 85 of file PassDetails.h.
Referenced by constructInterface().
const StringAttr circt::esi::detail::ESIHWBuilder::width |
Definition at line 82 of file PassDetails.h.
Referenced by getStageParameterList().
const StringAttr circt::esi::detail::ESIHWBuilder::x |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::xReady |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().
const StringAttr circt::esi::detail::ESIHWBuilder::xValid |
Definition at line 78 of file PassDetails.h.
Referenced by declareStage().