gem5 v24.0.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. | |
void | enter () |
Enter this generator state. | |
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. | |
Tick | nextPacketTick (bool elastic, Tick delay) const |
Determine the tick when the next packet is available. | |
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 Addr | startAddrDram |
Start of DRAM address range. | |
const Addr | endAddrDram |
End of DRAM address range. | |
const Addr | blocksizeDram |
Blocksize and address increment for DRAM. | |
const Addr | startAddrNvm |
Start of DRAM address range. | |
const Addr | endAddrNvm |
End of DRAM address range. | |
const Addr | blocksizeNvm |
Blocksize and address increment for DRAM. | |
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. | |
const unsigned int | numSeqPktsDram |
Number of sequential packets to be generated per cpu request. | |
const unsigned int | numSeqPktsNvm |
unsigned int | countNumSeqPkts |
Track number of sequential packets generated for a request | |
Addr | addr |
Address of request. | |
const unsigned int | pageSizeDram |
Page size of DRAM. | |
const unsigned int | pageBitsDram |
Number of page bits in DRAM address. | |
const unsigned int | bankBitsDram |
Number of bank bits in DRAM address. | |
const unsigned int | blockBitsDram |
Number of block bits in DRAM address. | |
const unsigned int | nbrOfBanksDram |
Number of banks in DRAM. | |
const unsigned int | nbrOfBanksUtilDram |
Number of banks to be utilized for a given configuration. | |
const unsigned int | bufferSizeNvm |
Buffer size of NVM. | |
const unsigned int | pageBitsNvm |
Number of buffer bits in NVM address. | |
const unsigned int | bankBitsNvm |
Number of bank bits in NVM address. | |
const unsigned int | blockBitsNvm |
Number of block bits in NVM address. | |
const unsigned int | nbrOfBanksNvm |
Number of banks in NVM. | |
const unsigned int | nbrOfBanksUtilNvm |
Number of banks to be utilized for a given configuration. | |
enums::AddrMap | addrMapping |
Address mapping to be used. | |
const unsigned int | nbrOfRanksDram |
Number of ranks to be utilized for a given configuration. | |
const unsigned int | rankBitsDram |
Number of rank bits in DRAM address. | |
const unsigned int | nbrOfRanksNvm |
Number of ranks to be utilized for a given configuration. | |
const unsigned int | rankBitsNvm |
Number of rank bits in DRAM address. | |
const uint8_t | nvmPercent |
Percent of generated transactions that should go to NVM. | |
bool | isRead |
Remember type of requests to be generated in series. | |
bool | isNvm |
Remember the interface to be generated in series. | |
Addr | dataManipulated |
Counter to determine the amount of data manipulated. | |
unsigned int | numSeqPkts |
Number of sequential DRAM packets to be generated per cpu request. | |
Addr | startAddr |
Start of address range. | |
Addr | endAddr |
End of address range. | |
Addr | blocksize |
Blocksize and address increment. | |
unsigned int | pageSize |
Page size of DRAM. | |
unsigned int | pageBits |
Number of page bits in DRAM address. | |
unsigned int | bankBits |
Number of bank bits in DRAM address. | |
unsigned int | blockBits |
Number of block bits in DRAM address. | |
unsigned int | nbrOfBanks |
Number of banks in DRAM. | |
unsigned int | nbrOfBanksUtil |
Number of banks to be utilized for a given configuration. | |
unsigned int | nbrOfRanks |
Number of ranks to be utilized for a given configuration. | |
unsigned int | rankBits |
Number of rank bits in DRAM address. | |
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. | |
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.
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.
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 50 of file hybrid_gen.cc.
References blocksizeDram, blocksizeNvm, cacheLineSize, fatal, maxPeriod, minPeriod, gem5::BaseGen::name(), nbrOfBanksDram, nbrOfBanksNvm, nbrOfBanksUtilDram, nbrOfBanksUtilNvm, and readPercent.
|
virtual |
Enter this generator state.
Implements gem5::BaseGen.
Definition at line 132 of file hybrid_gen.cc.
References dataManipulated.
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.
new_bank | Bank number of next packet series |
new_rank | Rank 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().
|
virtual |
Get the next generated packet.
Implements gem5::BaseGen.
Definition at line 139 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(), gem5::BaseGen::getPacket(), isNvm, isRead, nbrOfBanks, nbrOfBanksDram, nbrOfBanksNvm, nbrOfBanksUtil, nbrOfBanksUtilDram, nbrOfBanksUtilNvm, nbrOfRanks, nbrOfRanksDram, nbrOfRanksNvm, numSeqPkts, numSeqPktsDram, numSeqPktsNvm, nvmPercent, pageBits, pageBitsDram, pageBitsNvm, pageSize, pageSizeDram, gem5::Random::random(), gem5::random_mt, rankBits, rankBitsDram, rankBitsNvm, readPercent, gem5::MemCmd::ReadReq, gem5::replaceBits(), startAddr, startAddrDram, startAddrNvm, and gem5::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 gem5::BaseGen.
Definition at line 287 of file hybrid_gen.cc.
References gem5::curTick(), dataLimit, dataManipulated, DPRINTF, maxPeriod, gem5::MaxTick, minPeriod, gem5::Random::random(), and gem5::random_mt.
|
protected |
Address of request.
Definition at line 171 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Address mapping to be used.
Definition at line 210 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of bank bits in DRAM address.
Definition at line 259 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of bank bits in DRAM address.
Definition at line 180 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of bank bits in NVM address.
Definition at line 198 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of block bits in DRAM address.
Definition at line 262 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of block bits in DRAM address.
Definition at line 183 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of block bits in NVM address.
Definition at line 201 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Blocksize and address increment.
Definition at line 250 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Blocksize and address increment for DRAM.
Definition at line 139 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Blocksize and address increment for DRAM.
Definition at line 148 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
|
protected |
Cache line size in the simulated system.
Definition at line 151 of file hybrid_gen.hh.
Referenced by HybridGen().
|
protected |
Track number of sequential packets generated for a request
Definition at line 168 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Maximum amount of data to manipulate.
Definition at line 161 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 238 of file hybrid_gen.hh.
Referenced by enter(), getNextPacket(), and nextPacketTick().
|
protected |
End of address range.
Definition at line 247 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
End of DRAM address range.
Definition at line 136 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
End of DRAM address range.
Definition at line 145 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Remember the interface to be generated in series.
Definition at line 231 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Remember type of requests to be generated in series.
Definition at line 228 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Definition at line 155 of file hybrid_gen.hh.
Referenced by HybridGen(), and nextPacketTick().
|
protected |
Request generation period.
Definition at line 154 of file hybrid_gen.hh.
Referenced by HybridGen(), and nextPacketTick().
|
protected |
Number of banks in DRAM.
Definition at line 265 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of banks in DRAM.
Definition at line 186 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Number of banks in NVM.
Definition at line 204 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Number of banks to be utilized for a given configuration.
Definition at line 268 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
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().
|
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().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 271 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 213 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 219 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
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().
|
protected |
Number of sequential packets to be generated per cpu request.
Definition at line 164 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Definition at line 165 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Percent of generated transactions that should go to NVM.
Definition at line 225 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of page bits in DRAM address.
Definition at line 256 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of page bits in DRAM address.
Definition at line 177 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of buffer bits in NVM address.
Definition at line 195 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Page size of DRAM.
Definition at line 253 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
|
protected |
Number of rank bits in DRAM address.
Definition at line 274 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of rank bits in DRAM address.
Definition at line 216 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of rank bits in DRAM address.
Definition at line 222 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Percent of generated transactions that should be reads.
Definition at line 158 of file hybrid_gen.hh.
Referenced by getNextPacket(), and HybridGen().
|
protected |
Start of address range.
Definition at line 244 of file hybrid_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Start of DRAM address range.
Definition at line 133 of file hybrid_gen.hh.
Referenced by getNextPacket().
|
protected |
Start of DRAM address range.
Definition at line 142 of file hybrid_gen.hh.
Referenced by getNextPacket().