gem5
v20.1.0.0
|
NVM specific generator is for issuing request with variable buffer hit length and bank utilization. More...
#include <nvm_gen.hh>
Public Member Functions | |
NvmGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int buffer_size, unsigned int nbr_of_banks, unsigned int nbr_of_banks_util, Enums::AddrMap addr_mapping, unsigned int nbr_of_ranks) | |
Create a NVM 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 (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, 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... | |
PacketPtr | getNextPacket () |
Get the next generated packet. More... | |
Tick | nextPacketTick (bool elastic, Tick delay) const |
Determine the tick when the next packet is available. More... | |
Public Member Functions inherited from StochasticGen | |
StochasticGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit) | |
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 unsigned int | numSeqPkts |
Number of sequential NVM 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 | bufferSize |
Buffer size of NVM. More... | |
const unsigned int | bufferBits |
Number of buffer bits in NVM address. More... | |
const unsigned int | bankBits |
Number of bank bits in NVM address. More... | |
const unsigned int | blockBits |
Number of block bits in NVM address. More... | |
const unsigned int | nbrOfBanksNVM |
Number of banks in NVM. More... | |
const unsigned int | nbrOfBanksUtil |
Number of banks to be utilized for a given configuration. More... | |
Enums::AddrMap | addrMapping |
Address mapping to be used. More... | |
const unsigned int | rankBits |
Number of rank bits in NVM address. More... | |
const unsigned int | nbrOfRanks |
Number of ranks to be utilized for a given configuration. More... | |
Protected Attributes inherited from RandomGen | |
Addr | dataManipulated |
Counter to determine the amount of data manipulated. More... | |
Protected Attributes inherited from StochasticGen | |
const Addr | startAddr |
Start of address range. More... | |
const Addr | endAddr |
End of address range. More... | |
const Addr | blocksize |
Blocksize and address increment. 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... | |
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... | |
NVM 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 nvm_gen.hh.
NvmGen::NvmGen | ( | SimObject & | obj, |
RequestorID | requestor_id, | ||
Tick | _duration, | ||
Addr | start_addr, | ||
Addr | end_addr, | ||
Addr | _blocksize, | ||
Addr | cacheline_size, | ||
Tick | min_period, | ||
Tick | max_period, | ||
uint8_t | read_percent, | ||
Addr | data_limit, | ||
unsigned int | num_seq_pkts, | ||
unsigned int | buffer_size, | ||
unsigned int | nbr_of_banks, | ||
unsigned int | nbr_of_banks_util, | ||
Enums::AddrMap | addr_mapping, | ||
unsigned int | nbr_of_ranks | ||
) |
Create a 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 | Start address |
end_addr | End address |
_blocksize | 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 | Number of packets per stride, each of _blocksize |
page_size | Buffer size (bytes) used in the NVM |
nbr_of_banks | Total number of parallel banks in NVM |
nbr_of_banks_util | 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 |
Definition at line 49 of file nvm_gen.cc.
References fatal.
void NvmGen::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 146 of file nvm_gen.cc.
References addr, addrMapping, bankBits, blockBits, StochasticGen::blocksize, bufferBits, bufferSize, StochasticGen::endAddr, numSeqPkts, Random::random(), random_mt, rankBits, replaceBits(), and StochasticGen::startAddr.
Referenced by getNextPacket().
|
virtual |
Get the next generated packet.
Implements BaseGen.
Definition at line 80 of file nvm_gen.cc.
References addr, addrMapping, bankBits, blockBits, StochasticGen::blocksize, bufferBits, bufferSize, countNumSeqPkts, RandomGen::dataManipulated, DPRINTF, genStartAddr(), BaseGen::getPacket(), isRead, nbrOfBanksNVM, nbrOfBanksUtil, nbrOfRanks, numSeqPkts, Random::random(), random_mt, rankBits, StochasticGen::readPercent, MemCmd::ReadReq, replaceBits(), and MemCmd::WriteReq.
|
protected |
Address of request.
Definition at line 117 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Address mapping to be used.
Definition at line 141 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of bank bits in NVM address.
Definition at line 129 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of block bits in NVM address.
Definition at line 132 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of buffer bits in NVM address.
Definition at line 126 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Buffer size of NVM.
Definition at line 123 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Track number of sequential packets generated for a request
Definition at line 114 of file nvm_gen.hh.
Referenced by getNextPacket().
|
protected |
Remember type of requests to be generated in series.
Definition at line 120 of file nvm_gen.hh.
Referenced by getNextPacket().
|
protected |
|
protected |
Number of banks to be utilized for a given configuration.
Definition at line 138 of file nvm_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of ranks to be utilized for a given configuration.
Definition at line 147 of file nvm_gen.hh.
Referenced by getNextPacket().
|
protected |
Number of sequential NVM packets to be generated per cpu request.
Definition at line 111 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().
|
protected |
Number of rank bits in NVM address.
Definition at line 144 of file nvm_gen.hh.
Referenced by genStartAddr(), and getNextPacket().