gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
DramGen Class Reference

DRAM specific generator is for issuing request with variable page hit length and bank utilization. More...

#include <generators.hh>

Inheritance diagram for DramGen:
RandomGen BaseGen DramRotGen

Public Member Functions

 DramGen (const std::string &_name, MasterID master_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int page_size, unsigned int nbr_of_banks_DRAM, unsigned int nbr_of_banks_util, unsigned int addr_mapping, unsigned int nbr_of_ranks)
 Create a DRAM address sequence generator. 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...
 
- Public Member Functions inherited from RandomGen
 RandomGen (const std::string &_name, MasterID master_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 Create a random address sequence generator. More...
 
void enter ()
 Enter this generator state. 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 (const std::string &_name, MasterID master_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 unsigned int numSeqPkts
 Number of sequential DRAM packets to be generated per cpu request. More...
 
unsigned int countNumSeqPkts
 Track number of sequential packets generated for a request. More...
 
Addr addr
 Address of request. More...
 
bool isRead
 Remember type of requests to be generated in series. More...
 
const unsigned int pageSize
 Page size of DRAM. More...
 
const unsigned int pageBits
 Number of page bits in DRAM address. More...
 
const unsigned int bankBits
 Number of bank bits in DRAM address. More...
 
const unsigned int blockBits
 Number of block bits in DRAM address. More...
 
const unsigned int nbrOfBanksDRAM
 Number of banks in DRAM. More...
 
const unsigned int nbrOfBanksUtil
 Number of banks to be utilized for a given configuration. More...
 
unsigned int addrMapping
 Address mapping to be used. More...
 
const unsigned int rankBits
 Number of rank bits in DRAM address. More...
 
const unsigned int nbrOfRanks
 Number of ranks to be utilized for a given configuration. More...
 
- Protected Attributes inherited from RandomGen
const Addr startAddr
 Start of address range. More...
 
const Addr endAddr
 End of address range. More...
 
const Addr blocksize
 Block size. 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...
 
Addr dataManipulated
 Counter to determine the amount of data manipulated. More...
 
- Protected Attributes inherited from BaseGen
const std::string _name
 Name to use for status and debug printing. More...
 
const MasterID masterID
 The MasterID 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

DRAM specific generator is for issuing request with variable page hit length and bank utilization.

Currently assumes a single channel configuration.

Definition at line 315 of file generators.hh.

Constructor & Destructor Documentation

DramGen::DramGen ( const std::string &  _name,
MasterID  master_id,
Tick  _duration,
Addr  start_addr,
Addr  end_addr,
Addr  _blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts,
unsigned int  page_size,
unsigned int  nbr_of_banks_DRAM,
unsigned int  nbr_of_banks_util,
unsigned int  addr_mapping,
unsigned int  nbr_of_ranks 
)
inline

Create a DRAM address sequence generator.

Parameters
_nameName to use for status and debug
master_idMasterID set on each request
_durationduration of this state before transitioning
start_addrStart address
end_addrEnd address
_blocksizeSize used for transactions injected
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_sizePage size (bytes) used in the DRAM
nbr_of_banks_DRAMTotal number of banks in DRAM
nbr_of_banks_utilNumber of banks to utilized, for N banks, we will use banks: 0->(N-1)
addr_mappingAddress mapping to be used, 0: RoCoRaBaCh, 1: RoRaBaCoCh/RoRaBaChCo assumes single channel system

Definition at line 342 of file generators.hh.

References addrMapping, and warn.

Member Function Documentation

void DramGen::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 334 of file generators.cc.

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

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

PacketPtr DramGen::getNextPacket ( )
virtual

Member Data Documentation

Addr DramGen::addr
protected

Address of request.

Definition at line 387 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

unsigned int DramGen::addrMapping
protected

Address mapping to be used.

Definition at line 411 of file generators.hh.

Referenced by DramGen(), genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::bankBits
protected

Number of bank bits in DRAM address.

Definition at line 399 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::blockBits
protected

Number of block bits in DRAM address.

Definition at line 402 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

unsigned int DramGen::countNumSeqPkts
protected

Track number of sequential packets generated for a request.

Definition at line 384 of file generators.hh.

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

bool DramGen::isRead
protected

Remember type of requests to be generated in series.

Definition at line 390 of file generators.hh.

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::nbrOfBanksDRAM
protected

Number of banks in DRAM.

Definition at line 405 of file generators.hh.

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::nbrOfBanksUtil
protected

Number of banks to be utilized for a given configuration.

Definition at line 408 of file generators.hh.

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::nbrOfRanks
protected

Number of ranks to be utilized for a given configuration.

Definition at line 417 of file generators.hh.

Referenced by getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::numSeqPkts
protected

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

Definition at line 381 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::pageBits
protected

Number of page bits in DRAM address.

Definition at line 396 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::pageSize
protected

Page size of DRAM.

Definition at line 393 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().

const unsigned int DramGen::rankBits
protected

Number of rank bits in DRAM address.

Definition at line 414 of file generators.hh.

Referenced by genStartAddr(), getNextPacket(), and DramRotGen::getNextPacket().


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

Generated on Fri Jun 9 2017 13:04:08 for gem5 by doxygen 1.8.6