CIRCT  20.0.0git
Classes | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
esi::services::MMIO Class Referenceabstract

#include <Services.h>

Inheritance diagram for esi::services::MMIO:
Inheritance graph
[legend]
Collaboration diagram for esi::services::MMIO:
Collaboration graph
[legend]

Classes

class  MMIORegion
 A "slice" of some parent MMIO space. More...
 
struct  RegionDescriptor
 Describe a region (slice) of MMIO space. More...
 

Public Member Functions

 MMIO (Context &ctxt, AppIDPath idPath, std::string implName, const ServiceImplDetails &details, const HWClientDetails &clients)
 
 MMIO ()=default
 
virtual ~MMIO ()=default
 
virtual uint64_t read (uint32_t addr) const =0
 Read a 64-bit value from the global MMIO space. More...
 
virtual void write (uint32_t addr, uint64_t data)=0
 Write a 64-bit value to the global MMIO space. More...
 
const std::map< AppIDPath, RegionDescriptor > & getRegions () const
 Get the regions of MMIO space that this service manages. More...
 
virtual ServicegetChildService (AcceleratorConnection *conn, Service::Type service, AppIDPath id={}, std::string implName={}, ServiceImplDetails details={}, HWClientDetails clients={}) override
 If the service is a MMIO service, return a region of the MMIO space which peers into ours. More...
 
virtual std::string getServiceSymbol () const override
 
virtual ServicePortgetPort (AppIDPath id, const BundleType *type, const std::map< std::string, ChannelPort & > &, AcceleratorConnection &) const override
 Get a MMIO region port for a particular region descriptor. More...
 
- Public Member Functions inherited from esi::services::Service
virtual ~Service ()=default
 

Static Public Attributes

static constexpr std::string_view StdName = "esi.service.std.mmio"
 

Private Attributes

std::map< AppIDPath, RegionDescriptorregions
 MMIO base address table. More...
 

Additional Inherited Members

- Public Types inherited from esi::services::Service
using Type = const std::type_info &
 

Detailed Description

Definition at line 109 of file Services.h.

Constructor & Destructor Documentation

◆ MMIO() [1/2]

MMIO::MMIO ( Context ctxt,
AppIDPath  idPath,
std::string  implName,
const ServiceImplDetails details,
const HWClientDetails clients 
)

Definition at line 56 of file Services.cpp.

References regions, and esi::Constant::value.

◆ MMIO() [2/2]

esi::services::MMIO::MMIO ( )
default

◆ ~MMIO()

virtual esi::services::MMIO::~MMIO ( )
virtualdefault

Member Function Documentation

◆ getChildService()

Service * MMIO::getChildService ( AcceleratorConnection conn,
Service::Type  service,
AppIDPath  id = {},
std::string  implName = {},
ServiceImplDetails  details = {},
HWClientDetails  clients = {} 
)
overridevirtual

If the service is a MMIO service, return a region of the MMIO space which peers into ours.

Reimplemented from esi::services::Service.

Definition at line 109 of file Services.cpp.

References esi::services::Service::getChildService(), and esi::AcceleratorConnection::getCtxt().

◆ getPort()

ServicePort * MMIO::getPort ( AppIDPath  id,
const BundleType type,
const std::map< std::string, ChannelPort & > &  ,
AcceleratorConnection conn 
) const
overridevirtual

Get a MMIO region port for a particular region descriptor.

Reimplemented from esi::services::Service.

Definition at line 82 of file Services.cpp.

References regions.

◆ getRegions()

const std::map<AppIDPath, RegionDescriptor>& esi::services::MMIO::getRegions ( ) const
inline

Get the regions of MMIO space that this service manages.

Otherwise known as the base address table.

Definition at line 130 of file Services.h.

References regions.

Referenced by PYBIND11_MODULE().

◆ getServiceSymbol()

std::string MMIO::getServiceSymbol ( ) const
overridevirtual

Implements esi::services::Service.

Definition at line 79 of file Services.cpp.

References StdName.

◆ read()

virtual uint64_t esi::services::MMIO::read ( uint32_t  addr) const
pure virtual

Read a 64-bit value from the global MMIO space.

Implemented in TraceMMIO.

Referenced by esi::services::MMIOSysInfo::getCompressedManifest(), esi::services::MMIOSysInfo::getEsiVersion(), and PYBIND11_MODULE().

◆ write()

virtual void esi::services::MMIO::write ( uint32_t  addr,
uint64_t  data 
)
pure virtual

Write a 64-bit value to the global MMIO space.

Implemented in TraceMMIO.

Referenced by PYBIND11_MODULE().

Member Data Documentation

◆ regions

std::map<AppIDPath, RegionDescriptor> esi::services::MMIO::regions
private

◆ StdName

constexpr std::string_view esi::services::MMIO::StdName = "esi.service.std.mmio"
staticconstexpr

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