|
CIRCT 22.0.0git
|
Unidirectional channels are the basic communication primitive between the host and accelerator. More...
#include <Ports.h>


Classes | |
| struct | ConnectOptions |
| struct | TranslationInfo |
| Instructions for translating windowed types. More... | |
Public Member Functions | |
| ChannelPort (const Type *type) | |
| virtual | ~ChannelPort () |
| virtual void | connect (const ConnectOptions &options=ConnectOptions())=0 |
| Set up a connection to the accelerator. | |
| virtual void | disconnect ()=0 |
| virtual bool | isConnected () const =0 |
| bool | poll () |
| Poll for incoming data. | |
| const Type * | getType () const |
Protected Member Functions | |
| virtual bool | pollImpl () |
| Method called by poll() to actually poll the channel if the channel is connected. | |
| virtual void | connectImpl (const ConnectOptions &options) |
| Called by all connect methods to let backends initiate the underlying connections. | |
Protected Attributes | |
| const Type * | type |
| std::unique_ptr< TranslationInfo > | translationInfo |
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.
| ChannelPort::ChannelPort | ( | const Type * | type | ) |
Definition at line 26 of file Ports.cpp.
References translationInfo, and type.
|
pure virtual |
Set up a connection to the accelerator.
Implemented in esi::UnknownReadChannelPort, esi::WriteChannelPort, esi::UnknownWriteChannelPort, and esi::ReadChannelPort.
Referenced by NB_MODULE().
|
inlineprotectedvirtual |
Called by all connect methods to let backends initiate the underlying connections.
Definition at line 202 of file Ports.h.
Referenced by esi::ReadChannelPort::connect(), and esi::ReadChannelPort::connect().
|
pure virtual |
Implemented in esi::WriteChannelPort, and esi::ReadChannelPort.
Referenced by NB_MODULE().
|
inline |
|
pure virtual |
Implemented in esi::WriteChannelPort, and esi::ReadChannelPort.
Referenced by poll().
|
inline |
Poll for incoming data.
Returns true if data was read or written into a buffer as a result of the poll. Calling the call back could (will) also happen in that case. Some backends need this to be called periodically. In the usual case, this will be called by a background thread, but the ESI runtime does not want to assume that the host processes use standard threads. If the user wants to provide their own threads, they need to call this on each port occasionally. This is also called from the 'master' poll method in the Accelerator class.
Definition at line 124 of file Ports.h.
References isConnected(), and pollImpl().
|
inlineprotectedvirtual |
|
protected |
Definition at line 194 of file Ports.h.
Referenced by ChannelPort(), esi::ReadChannelPort::connect(), esi::ReadChannelPort::connect(), esi::ReadChannelPort::translateIncoming(), and esi::WriteChannelPort::translateOutgoing().
|
protected |
Definition at line 133 of file Ports.h.
Referenced by esiaccel.types.WritePort::__serialize_msg(), hw.HWModuleOp::add_entry_block(), ChannelPort(), esiaccel.types.Port::connect(), getType(), hw.HWModuleOp::input_indices(), fsm.MachineOp::instantiate(), hw.HWModuleOp::outputs(), and esiaccel.types.ReadPort::read().