gem5  v20.1.0.0
Public Member Functions | Protected Attributes | List of all members
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 HybridGen:
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 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 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 BaseGen
const Tick duration
 Time to spend in this state. More...
 
- Protected Member Functions inherited from 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 60 of file hybrid_gen.hh.

Constructor & Destructor Documentation

◆ HybridGen()

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 51 of file hybrid_gen.cc.

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

Member Function Documentation

◆ enter()

void HybridGen::enter ( )
virtual

Enter this generator state.

Implements BaseGen.

Definition at line 133 of file hybrid_gen.cc.

References dataManipulated.

◆ genStartAddr()

void 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 239 of file hybrid_gen.cc.

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

Referenced by getNextPacket().

◆ getNextPacket()

PacketPtr HybridGen::getNextPacket ( )
virtual

◆ nextPacketTick()

Tick 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 BaseGen.

Definition at line 288 of file hybrid_gen.cc.

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

Member Data Documentation

◆ addr

Addr HybridGen::addr
protected

Address of request.

Definition at line 170 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ addrMapping

Enums::AddrMap HybridGen::addrMapping
protected

Address mapping to be used.

Definition at line 209 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bankBits

unsigned int HybridGen::bankBits
protected

Number of bank bits in DRAM address.

Definition at line 258 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ bankBitsDram

const unsigned int HybridGen::bankBitsDram
protected

Number of bank bits in DRAM address.

Definition at line 179 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ bankBitsNvm

const unsigned int HybridGen::bankBitsNvm
protected

Number of bank bits in NVM address.

Definition at line 197 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blockBits

unsigned int HybridGen::blockBits
protected

Number of block bits in DRAM address.

Definition at line 261 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ blockBitsDram

const unsigned int HybridGen::blockBitsDram
protected

Number of block bits in DRAM address.

Definition at line 182 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blockBitsNvm

const unsigned int HybridGen::blockBitsNvm
protected

Number of block bits in NVM address.

Definition at line 200 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ blocksize

Addr HybridGen::blocksize
protected

Blocksize and address increment.

Definition at line 249 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ blocksizeDram

const Addr HybridGen::blocksizeDram
protected

Blocksize and address increment for DRAM.

Definition at line 138 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ blocksizeNvm

const Addr HybridGen::blocksizeNvm
protected

Blocksize and address increment for DRAM.

Definition at line 147 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ bufferSizeNvm

const unsigned int HybridGen::bufferSizeNvm
protected

Buffer size of NVM.

Definition at line 191 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ cacheLineSize

const Addr HybridGen::cacheLineSize
protected

Cache line size in the simulated system.

Definition at line 150 of file hybrid_gen.hh.

Referenced by HybridGen().

◆ countNumSeqPkts

unsigned int HybridGen::countNumSeqPkts
protected

Track number of sequential packets generated for a request

Definition at line 167 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ dataLimit

const Addr HybridGen::dataLimit
protected

Maximum amount of data to manipulate.

Definition at line 160 of file hybrid_gen.hh.

Referenced by nextPacketTick().

◆ dataManipulated

Addr HybridGen::dataManipulated
protected

Counter to determine the amount of data manipulated.

Used to determine if we should continue generating requests.

Definition at line 237 of file hybrid_gen.hh.

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

◆ endAddr

Addr HybridGen::endAddr
protected

End of address range.

Definition at line 246 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ endAddrDram

const Addr HybridGen::endAddrDram
protected

End of DRAM address range.

Definition at line 135 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ endAddrNvm

const Addr HybridGen::endAddrNvm
protected

End of DRAM address range.

Definition at line 144 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ isNvm

bool HybridGen::isNvm
protected

Remember the interface to be generated in series.

Definition at line 230 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ isRead

bool HybridGen::isRead
protected

Remember type of requests to be generated in series.

Definition at line 227 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ maxPeriod

const Tick HybridGen::maxPeriod
protected

Definition at line 154 of file hybrid_gen.hh.

Referenced by HybridGen(), and nextPacketTick().

◆ minPeriod

const Tick HybridGen::minPeriod
protected

Request generation period.

Definition at line 153 of file hybrid_gen.hh.

Referenced by HybridGen(), and nextPacketTick().

◆ nbrOfBanks

unsigned int HybridGen::nbrOfBanks
protected

Number of banks in DRAM.

Definition at line 264 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksDram

const unsigned int HybridGen::nbrOfBanksDram
protected

Number of banks in DRAM.

Definition at line 185 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksNvm

const unsigned int HybridGen::nbrOfBanksNvm
protected

Number of banks in NVM.

Definition at line 203 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksUtil

unsigned int HybridGen::nbrOfBanksUtil
protected

Number of banks to be utilized for a given configuration.

Definition at line 267 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfBanksUtilDram

const unsigned int HybridGen::nbrOfBanksUtilDram
protected

Number of banks to be utilized for a given configuration.

Definition at line 188 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfBanksUtilNvm

const unsigned int HybridGen::nbrOfBanksUtilNvm
protected

Number of banks to be utilized for a given configuration.

Definition at line 206 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ nbrOfRanks

unsigned int HybridGen::nbrOfRanks
protected

Number of ranks to be utilized for a given configuration.

Definition at line 270 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfRanksDram

const unsigned int HybridGen::nbrOfRanksDram
protected

Number of ranks to be utilized for a given configuration.

Definition at line 212 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nbrOfRanksNvm

const unsigned int HybridGen::nbrOfRanksNvm
protected

Number of ranks to be utilized for a given configuration.

Definition at line 218 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ numSeqPkts

unsigned int HybridGen::numSeqPkts
protected

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

Definition at line 240 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ numSeqPktsDram

const unsigned int HybridGen::numSeqPktsDram
protected

Number of sequential packets to be generated per cpu request.

Definition at line 163 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ numSeqPktsNvm

const unsigned int HybridGen::numSeqPktsNvm
protected

Definition at line 164 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ nvmPercent

const uint8_t HybridGen::nvmPercent
protected

Percent of generated transactions that should go to NVM.

Definition at line 224 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageBits

unsigned int HybridGen::pageBits
protected

Number of page bits in DRAM address.

Definition at line 255 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ pageBitsDram

const unsigned int HybridGen::pageBitsDram
protected

Number of page bits in DRAM address.

Definition at line 176 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageBitsNvm

const unsigned int HybridGen::pageBitsNvm
protected

Number of buffer bits in NVM address.

Definition at line 194 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ pageSize

unsigned int HybridGen::pageSize
protected

Page size of DRAM.

Definition at line 252 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ pageSizeDram

const unsigned int HybridGen::pageSizeDram
protected

Page size of DRAM.

Definition at line 173 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ rankBits

unsigned int HybridGen::rankBits
protected

Number of rank bits in DRAM address.

Definition at line 273 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ rankBitsDram

const unsigned int HybridGen::rankBitsDram
protected

Number of rank bits in DRAM address.

Definition at line 215 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ rankBitsNvm

const unsigned int HybridGen::rankBitsNvm
protected

Number of rank bits in DRAM address.

Definition at line 221 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ readPercent

const uint8_t HybridGen::readPercent
protected

Percent of generated transactions that should be reads.

Definition at line 157 of file hybrid_gen.hh.

Referenced by getNextPacket(), and HybridGen().

◆ startAddr

Addr HybridGen::startAddr
protected

Start of address range.

Definition at line 243 of file hybrid_gen.hh.

Referenced by genStartAddr(), and getNextPacket().

◆ startAddrDram

const Addr HybridGen::startAddrDram
protected

Start of DRAM address range.

Definition at line 132 of file hybrid_gen.hh.

Referenced by getNextPacket().

◆ startAddrNvm

const Addr HybridGen::startAddrNvm
protected

Start of DRAM address range.

Definition at line 141 of file hybrid_gen.hh.

Referenced by getNextPacket().


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

Generated on Wed Sep 30 2020 14:02:26 for gem5 by doxygen 1.8.17