gem5 v24.0.0.0
Loading...
Searching...
No Matches
hybrid_gen.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed here under. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
16 * met: redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer;
18 * redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution;
21 * neither the name of the copyright holders nor the names of its
22 * contributors may be used to endorse or promote products derived from
23 * this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
44#ifndef __CPU_TRAFFIC_GEN_HYBRID_GEN_HH__
45#define __CPU_TRAFFIC_GEN_HYBRID_GEN_HH__
46
47#include "base/bitfield.hh"
48#include "base/intmath.hh"
49#include "base_gen.hh"
50#include "enums/AddrMap.hh"
51#include "mem/packet.hh"
52
53namespace gem5
54{
55
61class HybridGen : public BaseGen
62{
63
64 public:
65
100 RequestorID requestor_id, Tick _duration,
101 Addr start_addr_dram, Addr end_addr_dram,
102 Addr blocksize_dram,
103 Addr start_addr_nvm, Addr end_addr_nvm,
104 Addr blocksize_nvm,
105 Addr cacheline_size,
106 Tick min_period, Tick max_period,
107 uint8_t read_percent, Addr data_limit,
108 unsigned int num_seq_pkts_dram, unsigned int page_size_dram,
109 unsigned int nbr_of_banks_dram, unsigned int nbr_of_banks_util_dram,
110 unsigned int num_seq_pkts_nvm, unsigned int buffer_size_nvm,
111 unsigned int nbr_of_banks_nvm, unsigned int nbr_of_banks_util_nvm,
112 enums::AddrMap addr_mapping,
113 unsigned int nbr_of_ranks_dram,
114 unsigned int nbr_of_ranks_nvm,
115 uint8_t nvm_percent);
116
117 void enter();
118
120
127 void genStartAddr(unsigned int new_bank , unsigned int new_rank);
128
129 Tick nextPacketTick(bool elastic, Tick delay) const;
130
131 protected:
134
137
140
143
146
149
152
156
158 const uint8_t readPercent;
159
162
164 const unsigned int numSeqPktsDram;
165 const unsigned int numSeqPktsNvm;
166
168 unsigned int countNumSeqPkts;
169
172
174 const unsigned int pageSizeDram;
175
177 const unsigned int pageBitsDram;
178
180 const unsigned int bankBitsDram;
181
183 const unsigned int blockBitsDram;
184
186 const unsigned int nbrOfBanksDram;
187
189 const unsigned int nbrOfBanksUtilDram;
190
192 const unsigned int bufferSizeNvm;
193
195 const unsigned int pageBitsNvm;
196
198 const unsigned int bankBitsNvm;
199
201 const unsigned int blockBitsNvm;
202
204 const unsigned int nbrOfBanksNvm;
205
207 const unsigned int nbrOfBanksUtilNvm;
208
210 enums::AddrMap addrMapping;
211
213 const unsigned int nbrOfRanksDram;
214
216 const unsigned int rankBitsDram;
217
219 const unsigned int nbrOfRanksNvm;
220
222 const unsigned int rankBitsNvm;
223
225 const uint8_t nvmPercent;
226
228 bool isRead;
229
231 bool isNvm;
232
239
241 unsigned int numSeqPkts;
242
245
248
251
253 unsigned int pageSize;
254
256 unsigned int pageBits;
257
259 unsigned int bankBits;
260
262 unsigned int blockBits;
263
265 unsigned int nbrOfBanks;
266
268 unsigned int nbrOfBanksUtil;
269
271 unsigned int nbrOfRanks;
272
274 unsigned int rankBits;
275
276};
277
278} // namespace gem5
279
280#endif
Declaration of the base generator class for all generators.
Base class for all generators, with the shared functionality and virtual functions for entering,...
Definition base_gen.hh:65
Hybrid NVM + DRAM specific generator is for issuing request with variable buffer hit length and bank ...
Definition hybrid_gen.hh:62
Tick nextPacketTick(bool elastic, Tick delay) const
Determine the tick when the next packet is available.
const unsigned int bankBitsNvm
Number of bank bits in NVM address.
const Addr startAddrDram
Start of DRAM address range.
unsigned int countNumSeqPkts
Track number of sequential packets generated for a request
unsigned int pageSize
Page size of DRAM.
const Addr dataLimit
Maximum amount of data to manipulate.
unsigned int nbrOfRanks
Number of ranks to be utilized for a given configuration.
const uint8_t readPercent
Percent of generated transactions that should be reads.
void enter()
Enter this generator state.
const unsigned int nbrOfBanksUtilNvm
Number of banks to be utilized for a given configuration.
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.
Definition hybrid_gen.cc:50
Addr dataManipulated
Counter to determine the amount of data manipulated.
const Addr startAddrNvm
Start of DRAM address range.
const Addr blocksizeNvm
Blocksize and address increment for DRAM.
const unsigned int blockBitsDram
Number of block bits in DRAM address.
PacketPtr getNextPacket()
Get the next generated packet.
const unsigned int pageBitsNvm
Number of buffer bits in NVM address.
const uint8_t nvmPercent
Percent of generated transactions that should go to NVM.
const unsigned int numSeqPktsNvm
const Addr blocksizeDram
Blocksize and address increment for DRAM.
unsigned int numSeqPkts
Number of sequential DRAM packets to be generated per cpu request.
const Addr endAddrDram
End of DRAM address range.
const unsigned int nbrOfBanksNvm
Number of banks in NVM.
Addr startAddr
Start of address range.
const unsigned int bankBitsDram
Number of bank bits in DRAM address.
Addr endAddr
End of address range.
const unsigned int nbrOfBanksUtilDram
Number of banks to be utilized for a given configuration.
const Addr cacheLineSize
Cache line size in the simulated system.
const unsigned int nbrOfBanksDram
Number of banks in DRAM.
const unsigned int rankBitsNvm
Number of rank bits in DRAM address.
const unsigned int rankBitsDram
Number of rank bits in DRAM address.
const Addr endAddrNvm
End of DRAM address range.
const unsigned int nbrOfRanksNvm
Number of ranks to be utilized for a given configuration.
const Tick maxPeriod
unsigned int bankBits
Number of bank bits in DRAM address.
unsigned int nbrOfBanks
Number of banks in DRAM.
bool isRead
Remember type of requests to be generated in series.
enums::AddrMap addrMapping
Address mapping to be used.
Addr blocksize
Blocksize and address increment.
Addr addr
Address of request.
const unsigned int blockBitsNvm
Number of block bits in NVM address.
unsigned int pageBits
Number of page bits in DRAM address.
const unsigned int pageSizeDram
Page size of DRAM.
const unsigned int nbrOfRanksDram
Number of ranks to be utilized for a given configuration.
const unsigned int bufferSizeNvm
Buffer size of NVM.
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.
const Tick minPeriod
Request generation period.
unsigned int blockBits
Number of block bits in DRAM address.
const unsigned int numSeqPktsDram
Number of sequential packets to be generated per cpu request.
const unsigned int pageBitsDram
Number of page bits in DRAM address.
bool isNvm
Remember the interface to be generated in series.
unsigned int nbrOfBanksUtil
Number of banks to be utilized for a given configuration.
unsigned int rankBits
Number of rank bits in DRAM address.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
Abstract superclass for simulation objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t Tick
Tick count type.
Definition types.hh:58
uint16_t RequestorID
Definition request.hh:95
Declaration of the Packet class.

Generated on Tue Jun 18 2024 16:24:02 for gem5 by doxygen 1.11.0