CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
esi::BundleType Class Reference

Bundles represent a collection of channels. More...

#include <Types.h>

Inheritance diagram for esi::BundleType:
Inheritance graph
[legend]
Collaboration diagram for esi::BundleType:
Collaboration graph
[legend]

Public Types

enum  Direction { To , From }
 
using ChannelVector = std::vector< std::tuple< std::string, Direction, const Type * > >
 
- Public Types inherited from esi::Type
using ID = std::string
 

Public Member Functions

 BundleType (const ID &id, const ChannelVector &channels)
 
const ChannelVectorgetChannels () const
 
std::ptrdiff_t getBitWidth () const override
 
std::pair< const Type *, DirectionfindChannel (std::string name) const
 
- Public Member Functions inherited from esi::Type
 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
 
- Protected Attributes inherited from esi::Type
ID id
 

Detailed Description

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?

Definition at line 81 of file Types.h.

Member Typedef Documentation

◆ ChannelVector

using esi::BundleType::ChannelVector = std::vector<std::tuple<std::string, Direction, const Type *> >

Definition at line 85 of file Types.h.

Member Enumeration Documentation

◆ Direction

Enumerator
To 
From 

Definition at line 83 of file Types.h.

Constructor & Destructor Documentation

◆ BundleType()

esi::BundleType::BundleType ( const ID id,
const ChannelVector channels 
)
inline

Definition at line 88 of file Types.h.

Member Function Documentation

◆ findChannel()

std::pair< const Type *, BundleType::Direction > esi::BundleType::findChannel ( std::string  name) const

◆ getBitWidth()

std::ptrdiff_t esi::BundleType::getBitWidth ( ) const
inlineoverridevirtual

Reimplemented from esi::Type.

Definition at line 92 of file Types.h.

◆ getChannels()

const ChannelVector & esi::BundleType::getChannels ( ) const
inline

Definition at line 91 of file Types.h.

References channels.

Referenced by esi::BundleEngineMap::requestPorts().

Member Data Documentation

◆ channels

ChannelVector esi::BundleType::channels
protected

Definition at line 97 of file Types.h.

Referenced by findChannel(), and getChannels().


The documentation for this class was generated from the following files: