gem5  v21.1.0.2
Public Member Functions | Protected Attributes | List of all members
gem5::HybridGen Class Reference

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

#include <hybrid_gen.hh>

Inheritance diagram for gem5::HybridGen:
gem5::BaseGen

Public Member Functions

 HybridGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr_dram, Addr end_addr_dram, Addr blocksize_dram, Addr start_addr_nvm, Addr end_addr_nvm, Addr blocksize_nvm, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts_dram, unsigned int page_size_dram, unsigned int nbr_of_banks_dram, unsigned int nbr_of_banks_util_dram, unsigned int num_seq_pkts_nvm, unsigned int buffer_size_nvm, unsigned int nbr_of_banks_nvm, unsigned int nbr_of_banks_util_nvm, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks_dram, unsigned int nbr_of_ranks_nvm, uint8_t nvm_percent)
 Create a hybrid DRAM + NVM address sequence generator. More...
 
void enter ()
 Enter this generator state. More...
 
PacketPtr getNextPacket ()
 Get the next generated packet. More...
 
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. More...
 
Tick nextPacketTick (bool elastic, Tick delay) const
 Determine the tick when the next packet is available. More...
 
- Public Member Functions inherited from gem5::BaseGen
 BaseGen (SimObject &obj, RequestorID requestor_id, Tick _duration)
 Create a base generator. More...
 
virtual ~BaseGen ()
 
std::string name () const
 Get the name, useful for DPRINTFs. More...
 
virtual void exit ()
 Exit this generator state. More...
 

Protected Attributes

const Addr startAddrDram
 Start of DRAM address range. More...
 
const Addr endAddrDram
 End of DRAM address range. More...
 
const Addr blocksizeDram
 Blocksize and address increment for DRAM. More...
 
const Addr startAddrNvm
 Start of DRAM address range. More...
 
const Addr endAddrNvm
 End of DRAM address range. More...
 
const Addr blocksizeNvm
 Blocksize and address increment for DRAM. More...
 
const Addr cacheLineSize
 Cache line size in the simulated system. More...
 
const Tick minPeriod
 Request generation period. More...
 
const Tick maxPeriod
 
const uint8_t readPercent
 Percent of generated transactions that should be reads. More...
 
const Addr dataLimit
 Maximum amount of data to manipulate. More...
 
const unsigned int numSeqPktsDram
 Number of sequential packets to be generated per cpu request. More...
 
const unsigned int numSeqPktsNvm
 
unsigned int countNumSeqPkts
 Track number of sequential packets generated for a request
More...
 
Addr addr
 Address of request. More...
 
const unsigned int pageSizeDram
 Page size of DRAM. More...
 
const unsigned int pageBitsDram
 Number of page bits in DRAM address. More...
 
const unsigned int bankBitsDram
 Number of bank bits in DRAM address. More...
 
const unsigned int blockBitsDram
 Number of block bits in DRAM address. More...
 
const unsigned int nbrOfBanksDram
 Number of banks in DRAM. More...
 
const unsigned int nbrOfBanksUtilDram
 Number of banks to be utilized for a given configuration. More...
 
const unsigned int bufferSizeNvm
 Buffer size of NVM. More...
 
const unsigned int pageBitsNvm
 Number of buffer bits in NVM address. More...
 
const unsigned int bankBitsNvm
 Number of bank bits in NVM address. More...
 
const unsigned int blockBitsNvm
 Number of block bits in NVM address. More...
 
const unsigned int nbrOfBanksNvm
 Number of banks in NVM. More...
 
const unsigned int nbrOfBanksUtilNvm
 Number of banks to be utilized for a given configuration. More...
 
enums::AddrMap addrMapping
 Address mapping to be used. More...
 
const unsigned int nbrOfRanksDram
 Number of ranks to be utilized for a given configuration. More...
 
const unsigned int rankBitsDram
 Number of rank bits in DRAM address. More...
 
const unsigned int nbrOfRanksNvm
 Number of ranks to be utilized for a given configuration. More...
 
const unsigned int rankBitsNvm
 Number of rank bits in DRAM address. More...
 
const uint8_t nvmPercent
 Percent of generated transactions that should go to NVM. More...
 
bool isRead
 Remember type of requests to be generated in series. More...
 
bool isNvm
 Remember the interface to be generated in series. More...
 
Addr dataManipulated
 Counter to determine the amount of data manipulated. More...
 
unsigned int numSeqPkts
 Number of sequential DRAM packets to be generated per cpu request. More...
 
Addr startAddr
 Start of address range. More...
 
Addr endAddr
 End of address range. More...
 
Addr blocksize
 Blocksize and address increment. More...
 
unsigned int pageSize
 Page size of DRAM. More...
 
unsigned int pageBits
 Number of page bits in DRAM address. More...
 
unsigned int bankBits
 Number of bank bits in DRAM address. More...
 
unsigned int blockBits
 Number of block bits in DRAM address. More...
 
unsigned int nbrOfBanks
 Number of banks in DRAM. More...
 
unsigned int nbrOfBanksUtil
 Number of banks to be utilized for a given configuration. More...
 
unsigned int nbrOfRanks
 Number of ranks to be utilized for a given configuration. More...
 
unsigned int rankBits
 Number of rank bits in DRAM address. More...
 
- Protected Attributes inherited from gem5::BaseGen
const std::string _name
 Name to use for status and debug printing. More...
 
const RequestorID requestorId
 The RequestorID used for generating requests. More...
 

Additional Inherited Members

- Public Attributes inherited from gem5::BaseGen
const Tick duration
 Time to spend in this state. More...
 
- 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. More...
 

Detailed Description

Hybrid NVM + DRAM 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 hybrid_gen.hh.

Constructor & Destructor Documentation

◆ HybridGen()

gem5::HybridGen::HybridGen ( SimObject obj,
RequestorID  requestor_id,
Tick  _duration,
Addr  start_addr_dram,
Addr  end_addr_dram,
Addr  blocksize_dram,
Addr  start_addr_nvm,
Addr  end_addr_nvm,
Addr  blocksize_nvm,
Addr  cacheline_size,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts_dram,
unsigned int  page_size_dram,
unsigned int  nbr_of_banks_dram,
unsigned int  nbr_of_banks_util_dram,
unsigned int  num_seq_pkts_nvm,
unsigned int  buffer_size_nvm,
unsigned int  nbr_of_banks_nvm,
unsigned int  nbr_of_banks_util_nvm,
enums::AddrMap  addr_mapping,
unsigned int  nbr_of_ranks_dram,
unsigned int  nbr_of_ranks_nvm,
uint8_t  nvm_percent 
)

Create a hybrid DRAM + NVM address sequence generator.

Parameters
objSimObject owning this sequence generator
requestor_idRequestorID related to the memory requests
_durationduration of this state before transitioning
start_addr_dramStart address for DRAM range
end_addr_dramEnd address for DRAM range
_blocksize_dramSize used for transactions injected
start_addr_nvmStart address for NVM range
end_addr_nvmEnd address for NVM range
_blocksize_nvmSize 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_pkts_dramNumber of packets per stride, each _blocksize
page_size_dramBuffer size (bytes) used in the NVM
nbr_of_banks_dramTotal number of parallel banks in NVM
nbr_of_banks_util_dramNumber of banks to utilized, for N banks, we will use banks: 0->(N-1)
num_seq_pkts_nvmNumber of packets per stride, each _blocksize
buffer_size_nvmBuffer size (bytes) used in the NVM
nbr_of_banks_nvmTotal number of parallel banks in NVM
nbr_of_banks_util_nvmNumber of banks to utilized, for N banks, we will use banks: 0->(N-1)
addr_mappingAddress mapping to be used, assumes single channel system
nbr_of_ranks_dramNumber of DRAM ranks
nbr_of_ranks_nvmNumber of NVM ranks
nvm_percentPercentage of traffic going to NVM

Definition at line 50 of file hybrid_gen.cc.

References blocksizeDram, blocksizeNvm, cacheLineSize, fatal, maxPeriod, minPeriod, gem5::BaseGen::name(), nbrOfBanksDram, nbrOfBanksNvm, nbrOfBanksUtilDram, nbrOfBanksUtilNvm, and readPercent.

Member Function Documentation

◆ enter()

void gem5::HybridGen::enter ( )
virtual

Enter this generator state.

Implements gem5::BaseGen.

Definition at line 132 of file hybrid_gen.cc.

References dataManipulated.

◆ genStartAddr()

void gem5::HybridGen::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 238 of file hybrid_gen.cc.

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

Referenced by getNextPacket().

◆ getNextPacket()

PacketPtr gem5::HybridGen::getNextPacket ( )
virtual

◆ nextPacketTick()

Tick gem5::HybridGen::nextPacketTick ( bool  elastic,
Tick  delay 
) const
virtual

Determine the tick when the next packet is available.

MaxTick means that there will not be any further packets in the current activation cycle of the generator.

Parameters
elasticshould the injection respond to flow control or not
delaytime the previous packet spent waiting
Returns
next tick when a packet is available

Implements gem5::BaseGen.

Definition at line 287 of file hybrid_gen.cc.

References gem5::curTick(), dataLimit, dataManipulated, DPRINTF, maxPeriod, gem5::MaxTick, minPeriod, gem5::Random::random(), gem5::random_mt, and sc_core::wait().

Member Data Documentation

◆ addr

Addr gem5::HybridGen::addr
protected

Address of request.

Definition at line 171 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ addrMapping

enums::AddrMap gem5::HybridGen::addrMapping
protected

Address mapping to be used.

Definition at line 210 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bankBits

unsigned int gem5::HybridGen::bankBits
protected

Number of bank bits in DRAM address.

Definition at line 259 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bankBitsDram

const unsigned int gem5::HybridGen::bankBitsDram
protected

Number of bank bits in DRAM address.

Definition at line 180 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ bankBitsNvm

const unsigned int gem5::HybridGen::bankBitsNvm
protected

Number of bank bits in NVM address.

Definition at line 198 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blockBits

unsigned int gem5::HybridGen::blockBits
protected

Number of block bits in DRAM address.

Definition at line 262 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ blockBitsDram

const unsigned int gem5::HybridGen::blockBitsDram
protected

Number of block bits in DRAM address.

Definition at line 183 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blockBitsNvm

const unsigned int gem5::HybridGen::blockBitsNvm
protected

Number of block bits in NVM address.

Definition at line 201 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blocksize

Addr gem5::HybridGen::blocksize
protected

Blocksize and address increment.

Definition at line 250 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ blocksizeDram

const Addr gem5::HybridGen::blocksizeDram
protected

Blocksize and address increment for DRAM.

Definition at line 139 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ blocksizeNvm

const Addr gem5::HybridGen::blocksizeNvm
protected

Blocksize and address increment for DRAM.

Definition at line 148 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ bufferSizeNvm

const unsigned int gem5::HybridGen::bufferSizeNvm
protected

Buffer size of NVM.

Definition at line 192 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ cacheLineSize

const Addr gem5::HybridGen::cacheLineSize
protected

Cache line size in the simulated system.

Definition at line 151 of file hybrid_gen.hh.

Referenced by HybridGen().

◆ countNumSeqPkts

unsigned int gem5::HybridGen::countNumSeqPkts
protected

Track number of sequential packets generated for a request

Definition at line 168 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ dataLimit

const Addr gem5::HybridGen::dataLimit
protected

Maximum amount of data to manipulate.

Definition at line 161 of file hybrid_gen.hh.

Referenced by nextPacketTick().

◆ dataManipulated

Addr gem5::HybridGen::dataManipulated
protected

Counter to determine the amount of data manipulated.

Used to determine if we should continue generating requests.

Definition at line 238 of file hybrid_gen.hh.

Referenced by enter(), getNextPacket(), and nextPacketTick().

◆ endAddr

Addr gem5::HybridGen::endAddr
protected

End of address range.

Definition at line 247 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ endAddrDram

const Addr gem5::HybridGen::endAddrDram
protected

End of DRAM address range.

Definition at line 136 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ endAddrNvm

const Addr gem5::HybridGen::endAddrNvm
protected

End of DRAM address range.

Definition at line 145 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ isNvm

bool gem5::HybridGen::isNvm
protected

Remember the interface to be generated in series.

Definition at line 231 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ isRead

bool gem5::HybridGen::isRead
protected

Remember type of requests to be generated in series.

Definition at line 228 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ maxPeriod

const Tick gem5::HybridGen::maxPeriod
protected

Definition at line 155 of file hybrid_gen.hh.

Referenced by HybridGen(), and nextPacketTick().

◆ minPeriod

const Tick gem5::HybridGen::minPeriod
protected

Request generation period.

Definition at line 154 of file hybrid_gen.hh.

Referenced by HybridGen(), and nextPacketTick().

◆ nbrOfBanks

unsigned int gem5::HybridGen::nbrOfBanks
protected

Number of banks in DRAM.

Definition at line 265 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksDram

const unsigned int gem5::HybridGen::nbrOfBanksDram
protected

Number of banks in DRAM.

Definition at line 186 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksNvm

const unsigned int gem5::HybridGen::nbrOfBanksNvm
protected

Number of banks in NVM.

Definition at line 204 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksUtil

unsigned int gem5::HybridGen::nbrOfBanksUtil
protected

Number of banks to be utilized for a given configuration.

Definition at line 268 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksUtilDram

const unsigned int gem5::HybridGen::nbrOfBanksUtilDram
protected

Number of banks to be utilized for a given configuration.

Definition at line 189 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksUtilNvm

const unsigned int gem5::HybridGen::nbrOfBanksUtilNvm
protected

Number of banks to be utilized for a given configuration.

Definition at line 207 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfRanks

unsigned int gem5::HybridGen::nbrOfRanks
protected

Number of ranks to be utilized for a given configuration.

Definition at line 271 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfRanksDram

const unsigned int gem5::HybridGen::nbrOfRanksDram
protected

Number of ranks to be utilized for a given configuration.

Definition at line 213 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfRanksNvm

const unsigned int gem5::HybridGen::nbrOfRanksNvm
protected

Number of ranks to be utilized for a given configuration.

Definition at line 219 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ numSeqPkts

unsigned int gem5::HybridGen::numSeqPkts
protected

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

Definition at line 241 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ numSeqPktsDram

const unsigned int gem5::HybridGen::numSeqPktsDram
protected

Number of sequential packets to be generated per cpu request.

Definition at line 164 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ numSeqPktsNvm

const unsigned int gem5::HybridGen::numSeqPktsNvm
protected

Definition at line 165 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nvmPercent

const uint8_t gem5::HybridGen::nvmPercent
protected

Percent of generated transactions that should go to NVM.

Definition at line 225 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageBits

unsigned int gem5::HybridGen::pageBits
protected

Number of page bits in DRAM address.

Definition at line 256 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ pageBitsDram

const unsigned int gem5::HybridGen::pageBitsDram
protected

Number of page bits in DRAM address.

Definition at line 177 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageBitsNvm

const unsigned int gem5::HybridGen::pageBitsNvm
protected

Number of buffer bits in NVM address.

Definition at line 195 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageSize

unsigned int gem5::HybridGen::pageSize
protected

Page size of DRAM.

Definition at line 253 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ pageSizeDram

const unsigned int gem5::HybridGen::pageSizeDram
protected

Page size of DRAM.

Definition at line 174 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ rankBits

unsigned int gem5::HybridGen::rankBits
protected

Number of rank bits in DRAM address.

Definition at line 274 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ rankBitsDram

const unsigned int gem5::HybridGen::rankBitsDram
protected

Number of rank bits in DRAM address.

Definition at line 216 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ rankBitsNvm

const unsigned int gem5::HybridGen::rankBitsNvm
protected

Number of rank bits in DRAM address.

Definition at line 222 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ readPercent

const uint8_t gem5::HybridGen::readPercent
protected

Percent of generated transactions that should be reads.

Definition at line 158 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ startAddr

Addr gem5::HybridGen::startAddr
protected

Start of address range.

Definition at line 244 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ startAddrDram

const Addr gem5::HybridGen::startAddrDram
protected

Start of DRAM address range.

Definition at line 133 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ startAddrNvm

const Addr gem5::HybridGen::startAddrNvm
protected

Start of DRAM address range.

Definition at line 142 of file hybrid_gen.hh.

Referenced by getNextPacket().


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

Generated on Tue Sep 21 2021 12:27:42 for gem5 by doxygen 1.8.17