gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::NvmGen Class Reference

NVM specific generator is for issuing request with variable buffer hit length and bank utilization. More...

#include <nvm_gen.hh>

Inheritance diagram for gem5::NvmGen:
gem5::RandomGen gem5::StochasticGen gem5::BaseGen

Public Member Functions

 NvmGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int buffer_size, unsigned int nbr_of_banks, unsigned int nbr_of_banks_util, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks)
 Create a NVM address sequence generator.
 
PacketPtr getNextPacket ()
 Get the next generated packet.
 
void genStartAddr (unsigned int new_bank, unsigned int new_rank)
 Insert bank, rank, and column bits into packed address to create address for 1st command in a series.
 
- Public Member Functions inherited from gem5::RandomGen
 RandomGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 Create a random address sequence generator.
 
void enter ()
 Enter this generator state.
 
PacketPtr getNextPacket ()
 Get the next generated packet.
 
Tick nextPacketTick (bool elastic, Tick delay) const
 Determine the tick when the next packet is available.
 
- Public Member Functions inherited from gem5::StochasticGen
 StochasticGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 
- Public Member Functions inherited from gem5::BaseGen
 BaseGen (SimObject &obj, RequestorID requestor_id, Tick _duration)
 Create a base generator.
 
virtual ~BaseGen ()
 
std::string name () const
 Get the name, useful for DPRINTFs.
 
virtual void exit ()
 Exit this generator state.
 

Protected Attributes

const unsigned int numSeqPkts
 Number of sequential NVM packets to be generated per cpu request.
 
unsigned int countNumSeqPkts
 Track number of sequential packets generated for a request

 
Addr addr
 Address of request.
 
bool isRead
 Remember type of requests to be generated in series.
 
const unsigned int bufferSize
 Buffer size of NVM.
 
const unsigned int bufferBits
 Number of buffer bits in NVM address.
 
const unsigned int bankBits
 Number of bank bits in NVM address.
 
const unsigned int blockBits
 Number of block bits in NVM address.
 
const unsigned int nbrOfBanksNVM
 Number of banks in NVM.
 
const unsigned int nbrOfBanksUtil
 Number of banks to be utilized for a given configuration.
 
enums::AddrMap addrMapping
 Address mapping to be used.
 
const unsigned int rankBits
 Number of rank bits in NVM address.
 
const unsigned int nbrOfRanks
 Number of ranks to be utilized for a given configuration.
 
- Protected Attributes inherited from gem5::RandomGen
Addr dataManipulated
 Counter to determine the amount of data manipulated.
 
- Protected Attributes inherited from gem5::StochasticGen
const Addr startAddr
 Start of address range.
 
const Addr endAddr
 End of address range.
 
const Addr blocksize
 Blocksize and address increment.
 
const Addr cacheLineSize
 Cache line size in the simulated system.
 
const Tick minPeriod
 Request generation period.
 
const Tick maxPeriod
 
const uint8_t readPercent
 Percent of generated transactions that should be reads.
 
const Addr dataLimit
 Maximum amount of data to manipulate.
 
- Protected Attributes inherited from gem5::BaseGen
const std::string _name
 Name to use for status and debug printing.
 
const RequestorID requestorId
 The RequestorID used for generating requests.
 

Additional Inherited Members

- Public Attributes inherited from gem5::BaseGen
const Tick duration
 Time to spend in this state.
 
- Protected Member Functions inherited from gem5::BaseGen
PacketPtr getPacket (Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags=0)
 Generate a new request and associated packet.
 

Detailed Description

NVM specific generator is for issuing request with variable buffer hit length and bank utilization.

Currently assumes a single channel configuration.

Definition at line 61 of file nvm_gen.hh.

Constructor & Destructor Documentation

◆ NvmGen()

gem5::NvmGen::NvmGen ( SimObject & obj,
RequestorID requestor_id,
Tick _duration,
Addr start_addr,
Addr end_addr,
Addr _blocksize,
Addr cacheline_size,
Tick min_period,
Tick max_period,
uint8_t read_percent,
Addr data_limit,
unsigned int num_seq_pkts,
unsigned int buffer_size,
unsigned int nbr_of_banks,
unsigned int nbr_of_banks_util,
enums::AddrMap addr_mapping,
unsigned int nbr_of_ranks )

Create a NVM address sequence generator.

Parameters
objSimObject owning this sequence generator
requestor_idRequestorID related to the memory requests
_durationduration of this state before transitioning
start_addrStart address
end_addrEnd address
_blocksizeSize used for transactions injected
cacheline_sizecache line size in the system
min_periodLower limit of random inter-transaction time
max_periodUpper limit of random inter-transaction time
read_percentPercent of transactions that are reads
data_limitUpper limit on how much data to read/write
num_seq_pktsNumber of packets per stride, each of _blocksize
page_sizeBuffer size (bytes) used in the NVM
nbr_of_banksTotal number of parallel banks in NVM
nbr_of_banks_utilNumber of banks to utilized, for N banks, we will use banks: 0->(N-1)
addr_mappingAddress mapping to be used, assumes single channel system

Definition at line 50 of file nvm_gen.cc.

References fatal.

Member Function Documentation

◆ genStartAddr()

void gem5::NvmGen::genStartAddr ( unsigned int new_bank,
unsigned int new_rank )

Insert bank, rank, and column bits into packed address to create address for 1st command in a series.

Parameters
new_bankBank number of next packet series
new_rankRank value of next packet series

Definition at line 147 of file nvm_gen.cc.

References addr, addrMapping, bankBits, blockBits, gem5::StochasticGen::blocksize, bufferBits, bufferSize, gem5::StochasticGen::endAddr, numSeqPkts, gem5::Random::random(), gem5::random_mt, rankBits, gem5::replaceBits(), and gem5::StochasticGen::startAddr.

Referenced by getNextPacket().

◆ getNextPacket()

Member Data Documentation

◆ addr

Addr gem5::NvmGen::addr
protected

Address of request.

Definition at line 118 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ addrMapping

enums::AddrMap gem5::NvmGen::addrMapping
protected

Address mapping to be used.

Definition at line 142 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bankBits

const unsigned int gem5::NvmGen::bankBits
protected

Number of bank bits in NVM address.

Definition at line 130 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ blockBits

const unsigned int gem5::NvmGen::blockBits
protected

Number of block bits in NVM address.

Definition at line 133 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bufferBits

const unsigned int gem5::NvmGen::bufferBits
protected

Number of buffer bits in NVM address.

Definition at line 127 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bufferSize

const unsigned int gem5::NvmGen::bufferSize
protected

Buffer size of NVM.

Definition at line 124 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ countNumSeqPkts

unsigned int gem5::NvmGen::countNumSeqPkts
protected

Track number of sequential packets generated for a request

Definition at line 115 of file nvm_gen.hh.

Referenced by getNextPacket().

◆ isRead

bool gem5::NvmGen::isRead
protected

Remember type of requests to be generated in series.

Definition at line 121 of file nvm_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksNVM

const unsigned int gem5::NvmGen::nbrOfBanksNVM
protected

Number of banks in NVM.

Definition at line 136 of file nvm_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksUtil

const unsigned int gem5::NvmGen::nbrOfBanksUtil
protected

Number of banks to be utilized for a given configuration.

Definition at line 139 of file nvm_gen.hh.

Referenced by getNextPacket().

◆ nbrOfRanks

const unsigned int gem5::NvmGen::nbrOfRanks
protected

Number of ranks to be utilized for a given configuration.

Definition at line 148 of file nvm_gen.hh.

Referenced by getNextPacket().

◆ numSeqPkts

const unsigned int gem5::NvmGen::numSeqPkts
protected

Number of sequential NVM packets to be generated per cpu request.

Definition at line 112 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ rankBits

const unsigned int gem5::NvmGen::rankBits
protected

Number of rank bits in NVM address.

Definition at line 145 of file nvm_gen.hh.

Referenced by genStartAddr(), and getNextPacket().


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

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