15 #include "mlir/IR/BuiltinTypes.h"
16 #include "mlir/IR/ImplicitLocOpBuilder.h"
21 using namespace circt;
26 StringRef reqName, Type reqType,
27 StringRef respName, Type respType) {
28 assert(reqType && respType);
29 auto *
ctxt = reqType ? reqType.getContext() : respType.getContext();
41 auto *
ctxt = getContext();
50 return createReqResp(getSymNameAttr(),
"write",
"req", writeType,
"ack",
55 auto *
ctxt = getContext();
58 return createReqResp(getSymNameAttr(),
"read",
"address", addressType,
"data",
63 SmallVectorImpl<ServicePortInfo> &ports) {
64 ports.push_back(writePortInfo());
65 ports.push_back(readPortInfo());
69 auto *
ctxt = getContext();
82 auto *
ctxt = getContext();
90 ChannelDirection::from,
96 auto *
ctxt = getContext();
107 ctxt, 32, IntegerType::SignednessSemantics::Unsigned))},
116 hw::StructType::FieldInfo{
119 ctxt, 32, IntegerType::SignednessSemantics::Unsigned)},
assert(baseType &&"element must be base type")
static ServicePortInfo createReqResp(StringAttr sym, Twine name, StringRef reqName, Type reqType, StringRef respName, Type respType)
Utility function to create a req/resp pair bundle service port.
static SmallVector< PortInfo > getPortList(ModuleTy &mod)
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Describes a service port.