CIRCT 20.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
esi::Engine Class Referenceabstract

Engines implement the actual channel communication between the host and the accelerator. More...

#include <Engines.h>

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

Public Member Functions

virtual ~Engine ()=default
 
virtual void connect ()
 Start the engine, if applicable.
 
virtual void disconnect ()
 Stop the engine, if applicable.
 
virtual ChannelPortrequestPort (AppIDPath idPath, const std::string &channelName, BundleType::Direction dir, const Type *type)
 Get a port for a channel, from the cache if it exists or create it.
 

Protected Member Functions

virtual std::unique_ptr< ChannelPortcreatePort (AppIDPath idPath, const std::string &channelName, BundleType::Direction dir, const Type *type)=0
 Each engine needs to know how to create a ports.
 

Private Attributes

std::map< std::pair< AppIDPath, std::string >, std::unique_ptr< ChannelPort > > ownedPorts
 

Detailed Description

Engines implement the actual channel communication between the host and the accelerator.

Engines can support multiple channels. They are low level of the ESI runtime API and are not intended to be used directly by users.

Definition at line 41 of file Engines.h.

Constructor & Destructor Documentation

◆ ~Engine()

virtual esi::Engine::~Engine ( )
virtualdefault

Member Function Documentation

◆ connect()

virtual void esi::Engine::connect ( )
inlinevirtual

Start the engine, if applicable.

Definition at line 45 of file Engines.h.

◆ createPort()

virtual std::unique_ptr< ChannelPort > esi::Engine::createPort ( AppIDPath  idPath,
const std::string &  channelName,
BundleType::Direction  dir,
const Type type 
)
protectedpure virtual

Each engine needs to know how to create a ports.

This method is called if a port doesn't exist in the engine cache.

Implemented in esi::backends::cosim::CosimEngine.

Referenced by requestPort().

◆ disconnect()

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

Stop the engine, if applicable.

Definition at line 47 of file Engines.h.

◆ requestPort()

ChannelPort & Engine::requestPort ( AppIDPath  idPath,
const std::string &  channelName,
BundleType::Direction  dir,
const Type type 
)
virtual

Get a port for a channel, from the cache if it exists or create it.

An engine may override this method if different behavior is desired.

Definition at line 19 of file Engines.cpp.

References createPort(), and ownedPorts.

Member Data Documentation

◆ ownedPorts

std::map<std::pair<AppIDPath, std::string>, std::unique_ptr<ChannelPort> > esi::Engine::ownedPorts
private

Definition at line 63 of file Engines.h.

Referenced by requestPort().


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