gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::DataBlock Class Reference

#include <DataBlock.hh>

Public Member Functions

 DataBlock ()=default
 
 DataBlock (int blk_size)
 
 DataBlock (const DataBlock &cp)
 
 ~DataBlock ()
 
DataBlockoperator= (const DataBlock &obj)
 
void assign (uint8_t *data)
 
void clear ()
 
uint8_t getByte (int whichByte) const
 
const uint8_t * getData (int offset, int len) const
 
uint8_t * popAtomicLogEntryFront ()
 
int numAtomicLogEntries () const
 
void clearAtomicLogEntries ()
 
uint8_t * getDataMod (int offset)
 
void setByte (int whichByte, uint8_t data)
 
void setData (const uint8_t *data, int offset, int len)
 
void setData (PacketPtr pkt)
 
void copyPartial (const DataBlock &dblk, int offset, int len)
 
void copyPartial (const DataBlock &dblk, const WriteMask &mask)
 
void atomicPartial (const DataBlock &dblk, const WriteMask &mask, bool isAtomicNoReturn=true)
 
bool equal (const DataBlock &obj) const
 
void print (std::ostream &out) const
 
int getBlockSize () const
 
void setBlockSize (int block_size)
 
bool isAlloc () const
 
void realloc (int blk_size)
 

Private Member Functions

void alloc ()
 

Private Attributes

uint8_t * m_data = nullptr
 
bool m_alloc = false
 
int m_block_size = 0
 
std::deque< uint8_t * > m_atomicLog
 

Detailed Description

Definition at line 61 of file DataBlock.hh.

Constructor & Destructor Documentation

◆ DataBlock() [1/3]

gem5::ruby::DataBlock::DataBlock ( )
default

◆ DataBlock() [2/3]

gem5::ruby::DataBlock::DataBlock ( int  blk_size)
inline

Definition at line 68 of file DataBlock.hh.

References alloc(), m_alloc, and m_block_size.

◆ DataBlock() [3/3]

gem5::ruby::DataBlock::DataBlock ( const DataBlock cp)

Definition at line 52 of file DataBlock.cc.

References getBlockSize(), gem5::ArmISA::i, isAlloc(), m_alloc, m_atomicLog, m_block_size, and m_data.

◆ ~DataBlock()

gem5::ruby::DataBlock::~DataBlock ( )
inline

Definition at line 77 of file DataBlock.hh.

References m_alloc, m_atomicLog, and m_data.

Member Function Documentation

◆ alloc()

void gem5::ruby::DataBlock::alloc ( )
private

Definition at line 74 of file DataBlock.cc.

References clear(), m_alloc, m_block_size, and m_data.

Referenced by DataBlock(), operator=(), and realloc().

◆ assign()

void gem5::ruby::DataBlock::assign ( uint8_t *  data)
inline

Definition at line 126 of file DataBlock.hh.

References data, m_alloc, and m_data.

◆ atomicPartial()

void gem5::ruby::DataBlock::atomicPartial ( const DataBlock dblk,
const WriteMask mask,
bool  isAtomicNoReturn = true 
)

Definition at line 142 of file DataBlock.cc.

References gem5::ArmISA::i, m_alloc, m_atomicLog, m_block_size, m_data, and gem5::ArmISA::mask.

◆ clear()

void gem5::ruby::DataBlock::clear ( )

Definition at line 101 of file DataBlock.cc.

References m_alloc, m_block_size, and m_data.

Referenced by alloc(), and gem5::ruby::VIPERCoalescer::issueRequest().

◆ clearAtomicLogEntries()

void gem5::ruby::DataBlock::clearAtomicLogEntries ( )

Definition at line 181 of file DataBlock.cc.

References m_alloc, and m_atomicLog.

◆ copyPartial() [1/2]

void gem5::ruby::DataBlock::copyPartial ( const DataBlock dblk,
const WriteMask mask 
)

Definition at line 130 of file DataBlock.cc.

References gem5::ArmISA::i, m_alloc, m_block_size, m_data, and gem5::ArmISA::mask.

◆ copyPartial() [2/2]

void gem5::ruby::DataBlock::copyPartial ( const DataBlock dblk,
int  offset,
int  len 
)
inline

Definition at line 151 of file DataBlock.hh.

References gem5::ArmISA::len, m_alloc, m_data, gem5::ArmISA::offset, and setData().

◆ equal()

bool gem5::ruby::DataBlock::equal ( const DataBlock obj) const

Definition at line 109 of file DataBlock.cc.

References gem5::ArmISA::i, m_alloc, m_atomicLog, m_block_size, and m_data.

Referenced by gem5::ruby::operator==().

◆ getBlockSize()

int gem5::ruby::DataBlock::getBlockSize ( ) const
inline

◆ getByte()

uint8_t gem5::ruby::DataBlock::getByte ( int  whichByte) const
inline

◆ getData()

const uint8_t * gem5::ruby::DataBlock::getData ( int  offset,
int  len 
) const

◆ getDataMod()

uint8_t * gem5::ruby::DataBlock::getDataMod ( int  offset)

Definition at line 200 of file DataBlock.cc.

References m_alloc, m_data, and gem5::ArmISA::offset.

◆ isAlloc()

bool gem5::ruby::DataBlock::isAlloc ( ) const
inline

Definition at line 112 of file DataBlock.hh.

References m_alloc.

Referenced by DataBlock().

◆ numAtomicLogEntries()

int gem5::ruby::DataBlock::numAtomicLogEntries ( ) const

Definition at line 168 of file DataBlock.cc.

References m_atomicLog.

◆ operator=()

DataBlock & gem5::ruby::DataBlock::operator= ( const DataBlock obj)

Definition at line 224 of file DataBlock.cc.

References alloc(), getBlockSize(), gem5::ArmISA::i, m_alloc, m_atomicLog, m_block_size, and m_data.

◆ popAtomicLogEntryFront()

uint8_t * gem5::ruby::DataBlock::popAtomicLogEntryFront ( )

Definition at line 173 of file DataBlock.cc.

References m_atomicLog.

◆ print()

void gem5::ruby::DataBlock::print ( std::ostream &  out) const

Definition at line 154 of file DataBlock.cc.

References gem5::ArmISA::i, m_alloc, m_block_size, and m_data.

Referenced by gem5::ruby::operator<<().

◆ realloc()

void gem5::ruby::DataBlock::realloc ( int  blk_size)

Definition at line 88 of file DataBlock.cc.

References alloc(), m_alloc, m_block_size, and m_data.

Referenced by setBlockSize().

◆ setBlockSize()

void gem5::ruby::DataBlock::setBlockSize ( int  block_size)
inline

Definition at line 111 of file DataBlock.hh.

References realloc().

◆ setByte()

void gem5::ruby::DataBlock::setByte ( int  whichByte,
uint8_t  data 
)
inline

Definition at line 144 of file DataBlock.hh.

References data, m_alloc, and m_data.

Referenced by gem5::ruby::testAndWrite().

◆ setData() [1/2]

void gem5::ruby::DataBlock::setData ( const uint8_t *  data,
int  offset,
int  len 
)

◆ setData() [2/2]

void gem5::ruby::DataBlock::setData ( PacketPtr  pkt)

Member Data Documentation

◆ m_alloc

bool gem5::ruby::DataBlock::m_alloc = false
private

◆ m_atomicLog

std::deque<uint8_t*> gem5::ruby::DataBlock::m_atomicLog
private

◆ m_block_size

int gem5::ruby::DataBlock::m_block_size = 0
private

◆ m_data

uint8_t* gem5::ruby::DataBlock::m_data = nullptr
private

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

Generated on Mon Jan 13 2025 04:29:12 for gem5 by doxygen 1.9.8