CIRCT 24.0.0git
Loading...
Searching...
No Matches
esi::services::MMIO::MMIORegion Class Reference

A "slice" of some parent MMIO space. More...

#include <Services.h>

Inheritance diagram for esi::services::MMIO::MMIORegion:
Collaboration diagram for esi::services::MMIO::MMIORegion:

Public Member Functions

virtual RegionDescriptor getDescriptor () const
 Get the offset (and size) of the region in the parent (usually global) MMIO address space.
virtual uint64_t read (uint32_t addr) const
 Read a 64-bit value from this region, not the global address space.
virtual void write (uint32_t addr, uint64_t data)
 Write a 64-bit value to this region, not the global address space.
virtual std::optional< std::string > toString (bool oneLine=false) const override
Public Member Functions inherited from esi::services::ServicePort
virtual ~ServicePort ()=default
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
Public Member Functions inherited from esi::BundlePort
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
virtual ~BundlePort ()=default
AppID getID () const
 Get the ID of the port.
WriteChannelPort & getRawWrite (const std::string &name) const
 Get access to the raw byte streams of a channel.
ReadChannelPort & getRawRead (const std::string &name) const
const PortMap & getChannels () const
template<typename T>
T * getAs () const
 Cast this Bundle port to a subclass which is actually useful.
bool poll ()
 Calls poll on all channels in the bundle and returns true if any of them returned true.

Private Member Functions

 MMIORegion (AppID id, MMIO *parent, RegionDescriptor desc)

Private Attributes

MMIO * parent
RegionDescriptor desc

Friends

class MMIO

Additional Inherited Members

Static Public Member Functions inherited from esi::BundlePort
static bool isWrite (BundleType::Direction bundleDir)
 Compute the direction of a channel given the bundle direction and the bundle port's direction.
Protected Attributes inherited from esi::BundlePort
AppID id
const BundleType * type
PortMap channels

Detailed Description

A "slice" of some parent MMIO space.

Definition at line 187 of file Services.h.

Constructor & Destructor Documentation

◆ MMIORegion()

MMIO::MMIORegion::MMIORegion ( AppID id,
MMIO * parent,
RegionDescriptor desc )
private

Definition at line 130 of file Services.cpp.

References desc, esi::BundlePort::id, MMIO, and parent.

Member Function Documentation

◆ getDescriptor()

virtual RegionDescriptor esi::services::MMIO::MMIORegion::getDescriptor ( ) const
inlinevirtual

Get the offset (and size) of the region in the parent (usually global) MMIO address space.

Definition at line 194 of file Services.h.

References desc.

Referenced by NB_MODULE().

◆ read()

uint64_t MMIO::MMIORegion::read ( uint32_t addr) const
virtual

Read a 64-bit value from this region, not the global address space.

Definition at line 132 of file Services.cpp.

References desc, parent, and esi::toHex().

Referenced by checkBurstCommandRegisters(), and NB_MODULE().

◆ toString()

virtual std::optional< std::string > esi::services::MMIO::MMIORegion::toString ( bool oneLine = false) const
inlineoverridevirtual

Reimplemented from esi::services::ServicePort.

Definition at line 201 of file Services.h.

References desc, and esi::toHex().

◆ write()

void MMIO::MMIORegion::write ( uint32_t addr,
uint64_t data )
virtual

Write a 64-bit value to this region, not the global address space.

Definition at line 137 of file Services.cpp.

References desc, parent, and esi::toHex().

Referenced by NB_MODULE().

◆ MMIO

friend class MMIO
friend

Definition at line 188 of file Services.h.

References desc, MMIO, and parent.

Referenced by MMIO, and MMIORegion().

Member Data Documentation

◆ desc

RegionDescriptor esi::services::MMIO::MMIORegion::desc
private

Definition at line 208 of file Services.h.

Referenced by getDescriptor(), MMIO, MMIORegion(), read(), toString(), and write().

◆ parent

MMIO* esi::services::MMIO::MMIORegion::parent
private

Definition at line 207 of file Services.h.

Referenced by MMIO, MMIORegion(), read(), and write().


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