CIRCT  19.0.0git
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
esi::backends::xrt::XrtAccelerator Class Reference

Connect to an ESI simulation. More...

#include <Xrt.h>

Inheritance diagram for esi::backends::xrt::XrtAccelerator:
Inheritance graph
[legend]
Collaboration diagram for esi::backends::xrt::XrtAccelerator:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

 XrtAccelerator (Context &, std::string xclbin, std::string kernelName)
 Construct and connect to a cosim server. More...
 
std::map< std::string, ChannelPort & > requestChannelsFor (AppIDPath, const BundleType *) override
 Request the host side channel ports for a particular instance (identified by the AppID path). More...
 
- Public Member Functions inherited from esi::AcceleratorConnection
 AcceleratorConnection (Context &ctxt)
 
virtual ~AcceleratorConnection ()=default
 
ContextgetCtxt () const
 
void disconnect ()
 Disconnect from the accelerator cleanly. More...
 
AcceleratorServiceThreadgetServiceThread ()
 
template<typename ServiceClass >
ServiceClass * getService (AppIDPath id={}, std::string implName={}, ServiceImplDetails details={}, HWClientDetails clients={})
 Get a typed reference to a particular service type. More...
 
virtual ServicegetService (Service::Type service, AppIDPath id={}, std::string implName={}, ServiceImplDetails details={}, HWClientDetails clients={})
 Calls createService and caches the result. More...
 

Static Public Member Functions

static std::unique_ptr< AcceleratorConnectionconnect (Context &, std::string connectionString)
 Parse the connection std::string and instantiate the accelerator. More...
 

Protected Member Functions

virtual ServicecreateService (Service::Type service, AppIDPath path, std::string implName, const ServiceImplDetails &details, const HWClientDetails &clients) override
 Called by getServiceImpl exclusively. More...
 

Private Attributes

std::unique_ptr< Implimpl
 

Additional Inherited Members

- Public Types inherited from esi::AcceleratorConnection
using Service = services::Service
 

Detailed Description

Connect to an ESI simulation.

Definition at line 31 of file Xrt.h.

Constructor & Destructor Documentation

◆ XrtAccelerator()

XrtAccelerator::XrtAccelerator ( Context ctxt,
std::string  xclbin,
std::string  kernelName 
)

Construct and connect to a cosim server.

Definition at line 76 of file Xrt.cpp.

References impl.

Member Function Documentation

◆ connect()

std::unique_ptr< AcceleratorConnection > XrtAccelerator::connect ( Context ctxt,
std::string  connectionString 
)
static

Parse the connection std::string and instantiate the accelerator.

Connection std::string format: <xclbin>[:<device_id>] wherein <device_id> is in BDF format.

Definition at line 38 of file Xrt.cpp.

References esiaccel.accelerator::ctxt.

◆ createService()

Service * XrtAccelerator::createService ( Service::Type  service,
AppIDPath  idPath,
std::string  implName,
const ServiceImplDetails details,
const HWClientDetails clients 
)
overrideprotectedvirtual

Called by getServiceImpl exclusively.

It wraps the pointer returned by this in a unique_ptr and caches it. Separate this from the wrapping/caching since wrapping/caching is an implementation detail.

Implements esi::AcceleratorConnection.

Definition at line 108 of file Xrt.cpp.

References impl.

◆ requestChannelsFor()

std::map< std::string, ChannelPort & > XrtAccelerator::requestChannelsFor ( AppIDPath  idPath,
const BundleType bundleType 
)
overridevirtual

Request the host side channel ports for a particular instance (identified by the AppID path).

For convenience, provide the bundle type and direction of the bundle port.

Implements esi::AcceleratorConnection.

Definition at line 103 of file Xrt.cpp.

References impl.

Member Data Documentation

◆ impl

std::unique_ptr<Impl> esi::backends::xrt::XrtAccelerator::impl
private

Definition at line 52 of file Xrt.h.

Referenced by createService(), requestChannelsFor(), and XrtAccelerator().


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