CIRCT 22.0.0git
|
Bundles represent a collection of channels. More...
#include <Types.h>
Public Types | |
enum | Direction { To , From } |
using | ChannelVector = std::vector< std::tuple< std::string, Direction, const Type * > > |
![]() | |
using | ID = std::string |
Public Member Functions | |
BundleType (const ID &id, const ChannelVector &channels) | |
const ChannelVector & | getChannels () const |
std::ptrdiff_t | getBitWidth () const override |
std::pair< const Type *, Direction > | findChannel (std::string name) const |
![]() | |
Type (const ID &id) | |
virtual | ~Type ()=default |
ID | getID () const |
virtual MessageData | serialize (const std::any &obj) const |
Serialize an object to MessageData. | |
virtual std::pair< std::any, std::span< const uint8_t > > | deserialize (std::span< const uint8_t > data) const |
Deserialize from a span of bytes to an object. | |
virtual void | ensureValid (const std::any &obj) const |
Ensure that a std::any object is valid for this type. | |
std::optional< std::string > | isValid (const std::any &obj) const |
Protected Attributes | |
ChannelVector | channels |
![]() | |
ID | id |
Bundles represent a collection of channels.
Services exclusively expose bundles (sometimes of just one channel). As such, they are the type of accessible ports on an accelerator, from a host API perspective. TODO: Add a good description of direction?
using esi::BundleType::ChannelVector = std::vector<std::tuple<std::string, Direction, const Type *> > |
|
inline |
std::pair< const Type *, BundleType::Direction > esi::BundleType::findChannel | ( | std::string | name | ) | const |
Definition at line 24 of file Types.cpp.
References channels.
Referenced by esi::services::FuncService::Function::getArgType(), esi::services::CallService::Callback::getArgType(), esi::services::FuncService::Function::getResultType(), esi::services::CallService::Callback::getResultType(), and esi::services::TelemetryService::Telemetry::toString().
|
inlineoverridevirtual |
|
inline |
Definition at line 91 of file Types.h.
References channels.
Referenced by esi::BundleEngineMap::requestPorts().
|
protected |
Definition at line 97 of file Types.h.
Referenced by findChannel(), and getChannels().