gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::memory::MemPacket Class Reference

A memory packet stores packets along with the timestamp of when the packet entered the queue, and also the decoded address. More...

#include <mem_ctrl.hh>

Public Member Functions

void qosValue (const uint8_t qv)
 Set the packet QoS value (interface compatibility with Packet)
 
uint8_t qosValue () const
 Get the packet QoS value (interface compatibility with Packet)
 
RequestorID requestorId () const
 Get the packet RequestorID (interface compatibility with Packet)
 
unsigned int getSize () const
 Get the packet size (interface compatibility with Packet)
 
Addr getAddr () const
 Get the packet address (interface compatibility with Packet)
 
bool isRead () const
 Return true if its a read packet (interface compatibility with Packet)
 
bool isWrite () const
 Return true if its a write packet (interface compatibility with Packet)
 
bool isDram () const
 Return true if its a DRAM access.
 
 MemPacket (PacketPtr _pkt, bool is_read, bool is_dram, uint8_t _channel, uint8_t _rank, uint8_t _bank, uint32_t _row, uint16_t bank_id, Addr _addr, unsigned int _size)
 

Public Attributes

const Tick entryTime
 When did request enter the controller.
 
Tick readyTime
 When will request leave the controller.
 
const PacketPtr pkt
 This comes from the outside world.
 
const RequestorID _requestorId
 RequestorID associated with the packet.
 
const bool read
 
const bool dram
 Does this packet access DRAM?
 
const uint8_t pseudoChannel
 pseudo channel num
 
const uint8_t rank
 Will be populated by address decoder.
 
const uint8_t bank
 
const uint32_t row
 
const uint16_t bankId
 Bank id is calculated considering banks in all the ranks eg: 2 ranks each with 8 banks, then bankId = 0 --> rank0, bank0 and bankId = 8 --> rank1, bank0.
 
Addr addr
 The starting address of the packet.
 
unsigned int size
 The size of this dram packet in bytes It is always equal or smaller than the burst size.
 
BurstHelperburstHelper
 A pointer to the BurstHelper if this MemPacket is a split packet If not a split packet (common case), this is set to NULL.
 
uint8_t _qosValue
 QoS value of the encapsulated packet read at queuing time.
 

Detailed Description

A memory packet stores packets along with the timestamp of when the packet entered the queue, and also the decoded address.

Definition at line 98 of file mem_ctrl.hh.

Constructor & Destructor Documentation

◆ MemPacket()

gem5::memory::MemPacket::MemPacket ( PacketPtr _pkt,
bool is_read,
bool is_dram,
uint8_t _channel,
uint8_t _rank,
uint8_t _bank,
uint32_t _row,
uint16_t bank_id,
Addr _addr,
unsigned int _size )
inline

Definition at line 206 of file mem_ctrl.hh.

Member Function Documentation

◆ getAddr()

Addr gem5::memory::MemPacket::getAddr ( ) const
inline

Get the packet address (interface compatibility with Packet)

Definition at line 187 of file mem_ctrl.hh.

References addr.

◆ getSize()

unsigned int gem5::memory::MemPacket::getSize ( ) const
inline

Get the packet size (interface compatibility with Packet)

Definition at line 181 of file mem_ctrl.hh.

References size.

◆ isDram()

◆ isRead()

◆ isWrite()

bool gem5::memory::MemPacket::isWrite ( ) const
inline

Return true if its a write packet (interface compatibility with Packet)

Definition at line 199 of file mem_ctrl.hh.

References read.

◆ qosValue() [1/2]

uint8_t gem5::memory::MemPacket::qosValue ( ) const
inline

Get the packet QoS value (interface compatibility with Packet)

Definition at line 169 of file mem_ctrl.hh.

References _qosValue.

◆ qosValue() [2/2]

void gem5::memory::MemPacket::qosValue ( const uint8_t qv)
inline

Set the packet QoS value (interface compatibility with Packet)

Definition at line 163 of file mem_ctrl.hh.

References _qosValue.

Referenced by gem5::memory::MemCtrl::addToReadQueue(), and gem5::memory::MemCtrl::addToWriteQueue().

◆ requestorId()

RequestorID gem5::memory::MemPacket::requestorId ( ) const
inline

Get the packet RequestorID (interface compatibility with Packet)

Definition at line 175 of file mem_ctrl.hh.

References _requestorId.

Referenced by gem5::memory::MemCtrl::doBurstAccess().

Member Data Documentation

◆ _qosValue

uint8_t gem5::memory::MemPacket::_qosValue

QoS value of the encapsulated packet read at queuing time.

Definition at line 157 of file mem_ctrl.hh.

Referenced by qosValue(), and qosValue().

◆ _requestorId

const RequestorID gem5::memory::MemPacket::_requestorId

RequestorID associated with the packet.

Definition at line 112 of file mem_ctrl.hh.

Referenced by requestorId().

◆ addr

Addr gem5::memory::MemPacket::addr

The starting address of the packet.

This address could be unaligned to burst size boundaries. The reason is to keep the address offset so we can accurately check incoming read packets with packets in the write queue.

Definition at line 140 of file mem_ctrl.hh.

Referenced by gem5::memory::MemCtrl::addToReadQueue(), gem5::memory::MemCtrl::addToWriteQueue(), gem5::memory::DRAMInterface::doBurstAccess(), gem5::memory::MemCtrl::doBurstAccess(), gem5::memory::NVMInterface::doBurstAccess(), and getAddr().

◆ bank

◆ bankId

const uint16_t gem5::memory::MemPacket::bankId

Bank id is calculated considering banks in all the ranks eg: 2 ranks each with 8 banks, then bankId = 0 --> rank0, bank0 and bankId = 8 --> rank1, bank0.

Definition at line 132 of file mem_ctrl.hh.

Referenced by gem5::memory::DRAMInterface::doBurstAccess(), and gem5::memory::NVMInterface::doBurstAccess().

◆ burstHelper

BurstHelper* gem5::memory::MemPacket::burstHelper

A pointer to the BurstHelper if this MemPacket is a split packet If not a split packet (common case), this is set to NULL.

Definition at line 152 of file mem_ctrl.hh.

Referenced by gem5::memory::MemCtrl::addToReadQueue(), and gem5::memory::MemCtrl::processRespondEvent().

◆ dram

const bool gem5::memory::MemPacket::dram

Does this packet access DRAM?

Definition at line 117 of file mem_ctrl.hh.

Referenced by isDram().

◆ entryTime

const Tick gem5::memory::MemPacket::entryTime

When did request enter the controller.

Definition at line 103 of file mem_ctrl.hh.

Referenced by gem5::memory::DRAMInterface::doBurstAccess(), gem5::memory::MemCtrl::doBurstAccess(), and gem5::memory::NVMInterface::doBurstAccess().

◆ pkt

const PacketPtr gem5::memory::MemPacket::pkt

This comes from the outside world.

Definition at line 109 of file mem_ctrl.hh.

Referenced by gem5::memory::MemCtrl::processRespondEvent().

◆ pseudoChannel

const uint8_t gem5::memory::MemPacket::pseudoChannel

pseudo channel num

Definition at line 120 of file mem_ctrl.hh.

Referenced by gem5::memory::MemCtrl::chooseNext(), and gem5::memory::DRAMInterface::chooseNextFRFCFS().

◆ rank

◆ read

const bool gem5::memory::MemPacket::read

Definition at line 114 of file mem_ctrl.hh.

Referenced by isRead(), and isWrite().

◆ readyTime

◆ row

◆ size

unsigned int gem5::memory::MemPacket::size

The size of this dram packet in bytes It is always equal or smaller than the burst size.

Definition at line 146 of file mem_ctrl.hh.

Referenced by gem5::memory::MemCtrl::doBurstAccess(), getSize(), gem5::memory::HeteroMemCtrl::pktSizeCheck(), and gem5::memory::MemCtrl::pktSizeCheck().


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

Generated on Tue Jun 18 2024 16:24:19 for gem5 by doxygen 1.11.0