CIRCT 21.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. | |
virtual void | disconnect () override |
virtual bool | isConnected () const override |
virtual void | write (const MessageData &)=0 |
A very basic blocking write API. | |
virtual bool | tryWrite (const MessageData &data)=0 |
A basic non-blocking write API. | |
ChannelPort (const Type *type) | |
![]() | |
ChannelPort (const Type *type) | |
virtual | ~ChannelPort () |
bool | poll () |
Poll for incoming data. | |
const Type * | getType () const |
Private Attributes | |
volatile bool | connected = false |
Additional Inherited Members | |
![]() | |
virtual bool | pollImpl () |
Method called by poll() to actually poll the channel if the channel is connected. | |
virtual void | connectImpl (std::optional< unsigned > bufferSize) |
Called by all connect methods to let backends initiate the underlying connections. | |
![]() | |
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.
Reimplemented in esi::UnknownWriteChannelPort.
Definition at line 82 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).
Implemented in esi::UnknownWriteChannelPort.
Referenced by PYBIND11_MODULE().
|
pure virtual |
A very basic blocking write API.
Will likely change for performance reasons.
Implemented in esi::UnknownWriteChannelPort.
Referenced by PYBIND11_MODULE(), and sv2cCosimserverEpTryPut().
|
private |
Definition at line 99 of file Ports.h.
Referenced by esiaccel.types.FunctionPort::connect(), connect(), disconnect(), and isConnected().