CIRCT  20.0.0git
Public Member Functions | Private Attributes | List of all members
esi::WriteChannelPort Class Referenceabstract

A ChannelPort which sends data to the accelerator. More...

#include <Ports.h>

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

Public Member Functions

virtual void connect (std::optional< unsigned > bufferSize=std::nullopt) override
 Set up a connection to the accelerator. More...
 
virtual void disconnect () override
 
virtual bool isConnected () const override
 
virtual void write (const MessageData &)=0
 A very basic blocking write API. More...
 
virtual bool tryWrite (const MessageData &data)=0
 A basic non-blocking write API. More...
 
 ChannelPort (const Type *type)
 
- Public Member Functions inherited from esi::ChannelPort
 ChannelPort (const Type *type)
 
virtual ~ChannelPort ()
 
bool poll ()
 Poll for incoming data. More...
 
const TypegetType () const
 

Private Attributes

volatile bool connected = false
 

Additional Inherited Members

- Protected Member Functions inherited from esi::ChannelPort
virtual bool pollImpl ()
 Method called by poll() to actually poll the channel if the channel is connected. More...
 
virtual void connectImpl (std::optional< unsigned > bufferSize)
 Called by all connect methods to let backends initiate the underlying connections. More...
 
- Protected Attributes inherited from esi::ChannelPort
const Typetype
 

Detailed Description

A ChannelPort which sends data to the accelerator.

Definition at line 74 of file Ports.h.

Member Function Documentation

◆ ChannelPort()

esi::ChannelPort::ChannelPort
inline

Definition at line 35 of file Ports.h.

◆ connect()

virtual void esi::WriteChannelPort::connect ( std::optional< unsigned >  bufferSize = std::nullopt)
inlineoverridevirtual

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.

Implements esi::ChannelPort.

Definition at line 79 of file Ports.h.

References connected, and esi::ChannelPort::connectImpl().

◆ disconnect()

virtual void esi::WriteChannelPort::disconnect ( )
inlineoverridevirtual

Implements esi::ChannelPort.

Definition at line 83 of file Ports.h.

References connected.

◆ isConnected()

virtual bool esi::WriteChannelPort::isConnected ( ) const
inlineoverridevirtual

Implements esi::ChannelPort.

Definition at line 84 of file Ports.h.

References connected.

◆ tryWrite()

virtual bool esi::WriteChannelPort::tryWrite ( const MessageData data)
pure virtual

A basic non-blocking write API.

Returns true if the data was written. It is invalid for backends to always return false (i.e. backends must eventually ensure that writes may succeed).

Referenced by PYBIND11_MODULE().

◆ write()

virtual void esi::WriteChannelPort::write ( const MessageData )
pure virtual

A very basic blocking write API.

Will likely change for performance reasons.

Referenced by PYBIND11_MODULE(), and sv2cCosimserverEpTryPut().

Member Data Documentation

◆ connected

volatile bool esi::WriteChannelPort::connected = false
private

Definition at line 96 of file Ports.h.

Referenced by esiaccel.types.FunctionPort::connect(), connect(), disconnect(), and isConnected().


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