gem5
v20.1.0.0
|
Hybrid NVM + DRAM specific generator is for issuing request with variable buffer hit length and bank utilization. More...
#include <hybrid_gen.hh>
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... | |
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.
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.
obj | SimObject owning this sequence generator |
requestor_id | RequestorID related to the memory requests |
_duration | duration of this state before transitioning |
start_addr_dram | Start address for DRAM range |
end_addr_dram | End address for DRAM range |
_blocksize_dram | Size used for transactions injected |
start_addr_nvm | Start address for NVM range |
end_addr_nvm | End address for NVM range |
_blocksize_nvm | Size used for transactions injected |
cacheline_size | cache line size in the system |
min_period | Lower limit of random inter-transaction time |
max_period | Upper limit of random inter-transaction time |
read_percent | Percent of transactions that are reads |
data_limit | Upper limit on how much data to read/write |
num_seq_pkts_dram | Number of packets per stride, each _blocksize |
page_size_dram | Buffer size (bytes) used in the NVM |
nbr_of_banks_dram | Total number of parallel banks in NVM |
nbr_of_banks_util_dram | Number of banks to utilized, for N banks, we will use banks: 0->(N-1) |
num_seq_pkts_nvm | Number of packets per stride, each _blocksize |
buffer_size_nvm | Buffer size (bytes) used in the NVM |
nbr_of_banks_nvm | Total number of parallel banks in NVM |
nbr_of_banks_util_nvm | Number of banks to utilized, for N banks, we will use banks: 0->(N-1) |
addr_mapping | Address mapping to be used, assumes single channel system |
nbr_of_ranks_dram | Number of DRAM ranks |
nbr_of_ranks_nvm | Number of NVM ranks |
nvm_percent | Percentage 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.
|
virtual |
Enter this generator state.
Implements BaseGen.
Definition at line 133 of file hybrid_gen.cc.
References dataManipulated.
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.
new_bank | Bank number of next packet series |
new_rank | Rank 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().
|
virtual |
Get the next generated packet.
Implements BaseGen.
Definition at line 140 of file hybrid_gen.cc.
References addr, addrMapping, bankBits, bankBitsDram, bankBitsNvm, blockBits, blockBitsDram, blockBitsNvm, blocksize, blocksizeDram, blocksizeNvm, bufferSizeNvm, countNumSeqPkts, dataManipulated, DPRINTF, endAddr, endAddrDram, endAddrNvm, genStartAddr(), BaseGen::getPacket(), isNvm, isRead, nbrOfBanks, nbrOfBanksDram, nbrOfBanksNvm, nbrOfBanksUtil, nbrOfBanksUtilDram, nbrOfBanksUtilNvm, nbrOfRanks, nbrOfRanksDram, nbrOfRanksNvm, numSeqPkts, numSeqPktsDram, numSeqPktsNvm, nvmPercent, pageBits, pageBitsDram, pageBitsNvm, pageSize, pageSizeDram, Random::random(), random_mt, rankBits, rankBitsDram, rankBitsNvm, readPercent, MemCmd::ReadReq, replaceBits(), startAddr, startAddrDram, startAddrNvm, and MemCmd::WriteReq.
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.
elastic | should the injection respond to flow control or not |
delay | time the previous packet spent waiting |
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().
|
protected |
Address of request.
Definition at line 170 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Address mapping to be used.
Definition at line 209 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of bank bits in DRAM address.
Definition at line 258 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of bank bits in DRAM address.
Definition at line 179 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of bank bits in NVM address.
Definition at line 197 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of block bits in DRAM address.
Definition at line 261 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of block bits in DRAM address.
Definition at line 182 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of block bits in NVM address.
Definition at line 200 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Blocksize and address increment.
Definition at line 249 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Blocksize and address increment for DRAM.
Definition at line 138 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Blocksize and address increment for DRAM.
Definition at line 147 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
|
protected |
Cache line size in the simulated system.
Definition at line 150 of file hybrid_gen.hh.
Referenced by HybridGen().
|
protected |
Track number of sequential packets generated for a request
Definition at line 167 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Maximum amount of data to manipulate.
Definition at line 160 of file hybrid_gen.hh.
Referenced by nextPacketTick().
|
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().
|
protected |
End of address range.
Definition at line 246 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
End of DRAM address range.
Definition at line 135 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
End of DRAM address range.
Definition at line 144 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Remember the interface to be generated in series.
Definition at line 230 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Remember type of requests to be generated in series.
Definition at line 227 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Definition at line 154 of file hybrid_gen.hh.
Referenced by HybridGen(), and nextPacketTick().
|
protected |
Request generation period.
Definition at line 153 of file hybrid_gen.hh.
Referenced by HybridGen(), and nextPacketTick().
|
protected |
Number of banks in DRAM.
Definition at line 264 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of banks in DRAM.
Definition at line 185 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Number of banks in NVM.
Definition at line 203 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Number of banks to be utilized for a given configuration.
Definition at line 267 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
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().
|
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().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 270 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 212 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 218 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
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().
|
protected |
Number of sequential packets to be generated per cpu request.
Definition at line 163 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Definition at line 164 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Percent of generated transactions that should go to NVM.
Definition at line 224 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of page bits in DRAM address.
Definition at line 255 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of page bits in DRAM address.
Definition at line 176 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of buffer bits in NVM address.
Definition at line 194 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Page size of DRAM.
Definition at line 252 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
|
protected |
Number of rank bits in DRAM address.
Definition at line 273 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of rank bits in DRAM address.
Definition at line 215 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of rank bits in DRAM address.
Definition at line 221 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Percent of generated transactions that should be reads.
Definition at line 157 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Start of address range.
Definition at line 243 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Start of DRAM address range.
Definition at line 132 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Start of DRAM address range.
Definition at line 141 of file hybrid_gen.hh.
Referenced by getNextPacket().