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();
42 auto *ctxt = getContext();
48 {hw::StructType::FieldInfo{
StringAttr::get(ctxt,
"address"), addressType},
51 return createReqResp(getSymNameAttr(),
"write",
"req", writeType,
"ack",
56 auto *ctxt = getContext();
59 return createReqResp(getSymNameAttr(),
"read",
"address", addressType,
"data",
64 SmallVectorImpl<ServicePortInfo> &ports) {
65 ports.push_back(writePortInfo());
66 ports.push_back(readPortInfo());
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.
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Describes a service port.