CIRCT  19.0.0git
Public Member Functions | Private Member Functions | Private Attributes | List of all members
esi::ChannelPort Class Reference

Unidirectional channels are the basic communication primitive between the host and accelerator. More...

#include <Ports.h>

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

Public Member Functions

 ChannelPort (const Type *type)
 
virtual ~ChannelPort ()
 
virtual void connect (std::optional< unsigned > bufferSize=std::nullopt)
 Set up a connection to the accelerator. More...
 
virtual void disconnect ()
 
const TypegetType () const
 

Private Member Functions

virtual void connectImpl (std::optional< unsigned > bufferSize)
 Called by all connect methods to let backends initiate the underlying connections. More...
 

Private Attributes

const Typetype
 

Detailed Description

Unidirectional channels are the basic communication primitive between the host and accelerator.

A 'ChannelPort' is the host side of a channel. It can be either read or write but not both. At this level, channels are untyped – just streams of bytes. They are not intended to be used directly by users but used by higher level APIs which add types.

Definition at line 33 of file Ports.h.

Constructor & Destructor Documentation

◆ ChannelPort()

esi::ChannelPort::ChannelPort ( const Type type)
inline

Definition at line 35 of file Ports.h.

◆ ~ChannelPort()

virtual esi::ChannelPort::~ChannelPort ( )
inlinevirtual

Definition at line 36 of file Ports.h.

References disconnect().

Member Function Documentation

◆ connect()

virtual void esi::ChannelPort::connect ( std::optional< unsigned >  bufferSize = std::nullopt)
inlinevirtual

Set up a connection to the accelerator.

The buffer size is optional and should be considered merely a hint. Individual implementations use it however they like. The unit is number of messages of the port type.

Reimplemented in esi::ReadChannelPort.

Definition at line 41 of file Ports.h.

References connectImpl().

Referenced by esi::ReadChannelPort::connect(), and PYBIND11_MODULE().

◆ connectImpl()

virtual void esi::ChannelPort::connectImpl ( std::optional< unsigned >  bufferSize)
inlineprivatevirtual

Called by all connect methods to let backends initiate the underlying connections.

Definition at line 53 of file Ports.h.

Referenced by connect().

◆ disconnect()

virtual void esi::ChannelPort::disconnect ( )
inlinevirtual

Reimplemented in esi::ReadChannelPort.

Definition at line 44 of file Ports.h.

Referenced by ~ChannelPort().

◆ getType()

const Type* esi::ChannelPort::getType ( ) const
inline

Definition at line 46 of file Ports.h.

References type.

Referenced by PYBIND11_MODULE().

Member Data Documentation

◆ type

const Type* esi::ChannelPort::type
private

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