|
CIRCT 24.0.0git
|
A contiguous, non-owning view of bytes within a SegmentedMessageData. More...
#include <Common.h>

Public Member Functions | |
| std::span< const uint8_t > | span () const |
| bool | empty () const |
| std::optional< uint64_t > | getDeviceAddress () const |
| Device address of this segment's bytes, if region is set and contains them; std::nullopt otherwise. | |
Public Attributes | |
| const uint8_t * | data |
| size_t | size |
| services::HostMemRegion * | region = nullptr |
| The HostMem region (from services::HostMem::allocate()) which holds [data, data + size), if any. | |
A contiguous, non-owning view of bytes within a SegmentedMessageData.
Valid only while the owning SegmentedMessageData is alive.
| std::optional< uint64_t > Segment::getDeviceAddress | ( | ) | const |
Device address of this segment's bytes, if region is set and contains them; std::nullopt otherwise.
Definition at line 80 of file Common.cpp.
References data, region, and size.
Referenced by serialCoordTranslate().
|
inline |
Definition at line 131 of file Common.h.
Referenced by esi::SegmentedMessageDataCursor::remaining().
| const uint8_t* esi::Segment::data |
Definition at line 123 of file Common.h.
Referenced by tests.integration.test_hostmem_read._Dut::expected(), getDeviceAddress(), esi::SegmentedMessageDataCursor::remainingSegment(), span(), and esi::SegmentedMessageData::toMessageData().
| services::HostMemRegion* esi::Segment::region = nullptr |
The HostMem region (from services::HostMem::allocate()) which holds [data, data + size), if any.
Several segments may share a region. Non-owning: the SegmentedMessageData keeps the region alive; backends may be able to obtain ownership via SegmentedMessageData::take().
Definition at line 129 of file Common.h.
Referenced by checkHostMemTake(), esiaccel.types.MMIORegion::descriptor(), getDeviceAddress(), esiaccel.types.MMIORegion::read(), esi::SegmentedMessageDataCursor::remainingSegment(), serialCoordTranslate(), and esiaccel.types.MMIORegion::write().
| size_t esi::Segment::size |
Definition at line 124 of file Common.h.
Referenced by esi::SegmentedMessageDataCursor::advance(), checkHostMemTake(), esiaccel.types.ArrayType::deserialize(), empty(), getDeviceAddress(), esiaccel.types.ArrayType::is_valid(), esi::SegmentedMessageDataCursor::remainingSegment(), span(), esi::SegmentedMessageData::toMessageData(), and esi::SegmentedMessageData::totalSize().