CIRCT
20.0.0git
|
A ChannelPort which sends data to the accelerator. More...
#include <Ports.h>
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 Type * | getType () 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 Type * | type |
A ChannelPort which sends data to the accelerator.
|
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().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
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().
|
pure virtual |
A very basic blocking write API.
Will likely change for performance reasons.
Referenced by PYBIND11_MODULE(), and sv2cCosimserverEpTryPut().
|
private |
Definition at line 96 of file Ports.h.
Referenced by esiaccel.types.FunctionPort::connect(), connect(), disconnect(), and isConnected().