gem5  v22.0.0.2
exec_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018, 2020-2021 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 hereunder. 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  * Copyright (c) 2002-2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
42 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
43 
44 #include "arch/vecregs.hh"
45 #include "base/types.hh"
46 #include "config/the_isa.hh"
47 #include "cpu/base.hh"
48 #include "cpu/exec_context.hh"
49 #include "cpu/reg_class.hh"
50 #include "cpu/simple/base.hh"
51 #include "cpu/static_inst_fwd.hh"
52 #include "cpu/translation.hh"
53 #include "mem/request.hh"
54 
55 namespace gem5
56 {
57 
58 class BaseSimpleCPU;
59 
61 {
62  public:
65 
66  // This is the offset from the current pc that fetch should be performed
68  // This flag says to stay at the current pc. This is useful for
69  // instructions which go beyond MachInst boundaries.
70  bool stayAtPC;
71 
72  // Branch prediction
73  std::unique_ptr<PCStateBase> predPC;
74 
78  // Number of simulated loads
80  // Number of cycles stalled for I-cache responses
82  // Number of cycles stalled for D-cache responses
84 
86  {
88  : statistics::Group(cpu,
89  csprintf("exec_context.thread_%i",
90  thread->threadId()).c_str()),
91  ADD_STAT(numInsts, statistics::units::Count::get(),
92  "Number of instructions committed"),
93  ADD_STAT(numOps, statistics::units::Count::get(),
94  "Number of ops (including micro ops) committed"),
95  ADD_STAT(numIntAluAccesses, statistics::units::Count::get(),
96  "Number of integer alu accesses"),
97  ADD_STAT(numFpAluAccesses, statistics::units::Count::get(),
98  "Number of float alu accesses"),
99  ADD_STAT(numVecAluAccesses, statistics::units::Count::get(),
100  "Number of vector alu accesses"),
101  ADD_STAT(numCallsReturns, statistics::units::Count::get(),
102  "Number of times a function call or return occured"),
103  ADD_STAT(numCondCtrlInsts, statistics::units::Count::get(),
104  "Number of instructions that are conditional controls"),
105  ADD_STAT(numIntInsts, statistics::units::Count::get(),
106  "Number of integer instructions"),
107  ADD_STAT(numFpInsts, statistics::units::Count::get(),
108  "Number of float instructions"),
109  ADD_STAT(numVecInsts, statistics::units::Count::get(),
110  "Number of vector instructions"),
111  ADD_STAT(numIntRegReads, statistics::units::Count::get(),
112  "Number of times the integer registers were read"),
113  ADD_STAT(numIntRegWrites, statistics::units::Count::get(),
114  "Number of times the integer registers were written"),
115  ADD_STAT(numFpRegReads, statistics::units::Count::get(),
116  "Number of times the floating registers were read"),
117  ADD_STAT(numFpRegWrites, statistics::units::Count::get(),
118  "Number of times the floating registers were written"),
119  ADD_STAT(numVecRegReads, statistics::units::Count::get(),
120  "Number of times the vector registers were read"),
121  ADD_STAT(numVecRegWrites, statistics::units::Count::get(),
122  "Number of times the vector registers were written"),
123  ADD_STAT(numVecPredRegReads, statistics::units::Count::get(),
124  "Number of times the predicate registers were read"),
125  ADD_STAT(numVecPredRegWrites, statistics::units::Count::get(),
126  "Number of times the predicate registers were written"),
127  ADD_STAT(numCCRegReads, statistics::units::Count::get(),
128  "Number of times the CC registers were read"),
129  ADD_STAT(numCCRegWrites, statistics::units::Count::get(),
130  "Number of times the CC registers were written"),
131  ADD_STAT(numMiscRegReads, statistics::units::Count::get(),
132  "Number of times the Misc registers were read"),
133  ADD_STAT(numMiscRegWrites, statistics::units::Count::get(),
134  "Number of times the Misc registers were written"),
135  ADD_STAT(numMemRefs, statistics::units::Count::get(),
136  "Number of memory refs"),
137  ADD_STAT(numLoadInsts, statistics::units::Count::get(),
138  "Number of load instructions"),
139  ADD_STAT(numStoreInsts, statistics::units::Count::get(),
140  "Number of store instructions"),
141  ADD_STAT(numIdleCycles, statistics::units::Cycle::get(),
142  "Number of idle cycles"),
143  ADD_STAT(numBusyCycles, statistics::units::Cycle::get(),
144  "Number of busy cycles"),
145  ADD_STAT(notIdleFraction, statistics::units::Ratio::get(),
146  "Percentage of non-idle cycles"),
147  ADD_STAT(idleFraction, statistics::units::Ratio::get(),
148  "Percentage of idle cycles"),
149  ADD_STAT(icacheStallCycles, statistics::units::Cycle::get(),
150  "ICache total stall cycles"),
151  ADD_STAT(dcacheStallCycles, statistics::units::Cycle::get(),
152  "DCache total stall cycles"),
153  ADD_STAT(numBranches, statistics::units::Count::get(),
154  "Number of branches fetched"),
155  ADD_STAT(numPredictedBranches, statistics::units::Count::get(),
156  "Number of branches predicted as taken"),
157  ADD_STAT(numBranchMispred, statistics::units::Count::get(),
158  "Number of branch mispredictions"),
159  ADD_STAT(statExecutedInstType, statistics::units::Count::get(),
160  "Class of executed instruction."),
161  numRegReads{
163  &numFpRegReads,
168  },
169  numRegWrites{
176  }
177  {
180 
183 
186 
189 
191  .init(enums::Num_OpClass)
193 
194  for (unsigned i = 0; i < Num_OpClasses; ++i) {
195  statExecutedInstType.subname(i, enums::OpClassStrings[i]);
196  }
197 
199  numIdleCycles = idleFraction * cpu->baseStats.numCycles;
200  numBusyCycles = notIdleFraction * cpu->baseStats.numCycles;
201 
204 
207 
210  }
211 
212  // Number of simulated instructions
215 
216  // Number of integer alu accesses
218 
219  // Number of float alu accesses
221 
222  // Number of vector alu accesses
224 
225  // Number of function calls/returns
227 
228  // Conditional control instructions;
230 
231  // Number of int instructions
233 
234  // Number of float instructions
236 
237  // Number of vector instructions
239 
240  // Number of integer register file accesses
243 
244  // Number of float register file accesses
247 
248  // Number of vector register file accesses
251 
252  // Number of predicate register file accesses
255 
256  // Number of condition code register file accesses
259 
260  // Number of misc register file accesses
263 
264  // Number of simulated memory references
268 
269  // Number of idle cycles
271 
272  // Number of busy cycles
274 
275  // Number of idle cycles
278 
279  // Number of cycles stalled for I-cache responses
281 
282  // Number of cycles stalled for D-cache responses
284 
293 
294  // Instruction mix histogram by OpClass
296 
297  std::array<statistics::Scalar *, CCRegClass + 1> numRegReads;
298  std::array<statistics::Scalar *, CCRegClass + 1> numRegWrites;
299 
301 
302  public:
305  : cpu(_cpu), thread(_thread), fetchOffset(0), stayAtPC(false),
306  numInst(0), numOp(0), numLoad(0), lastIcacheStall(0),
308  { }
309 
310  RegVal
311  getRegOperand(const StaticInst *si, int idx) override
312  {
313  const RegId &reg = si->srcRegIdx(idx);
314  if (reg.is(InvalidRegClass))
315  return 0;
316  (*execContextStats.numRegReads[reg.classValue()])++;
317  return thread->getReg(reg);
318  }
319 
320  void
321  getRegOperand(const StaticInst *si, int idx, void *val) override
322  {
323  const RegId &reg = si->srcRegIdx(idx);
324  (*execContextStats.numRegReads[reg.classValue()])++;
325  thread->getReg(reg, val);
326  }
327 
328  void *
329  getWritableRegOperand(const StaticInst *si, int idx) override
330  {
331  const RegId &reg = si->destRegIdx(idx);
332  (*execContextStats.numRegWrites[reg.classValue()])++;
333  return thread->getWritableReg(reg);
334  }
335 
336  void
337  setRegOperand(const StaticInst *si, int idx, RegVal val) override
338  {
339  const RegId &reg = si->destRegIdx(idx);
340  if (reg.is(InvalidRegClass))
341  return;
342  (*execContextStats.numRegWrites[reg.classValue()])++;
343  thread->setReg(reg, val);
344  }
345 
346  void
347  setRegOperand(const StaticInst *si, int idx, const void *val) override
348  {
349  const RegId &reg = si->destRegIdx(idx);
350  (*execContextStats.numRegWrites[reg.classValue()])++;
351  thread->setReg(reg, val);
352  }
353 
354  RegVal
355  readMiscRegOperand(const StaticInst *si, int idx) override
356  {
358  const RegId& reg = si->srcRegIdx(idx);
359  assert(reg.is(MiscRegClass));
360  return thread->readMiscReg(reg.index());
361  }
362 
363  void
364  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
365  {
367  const RegId& reg = si->destRegIdx(idx);
368  assert(reg.is(MiscRegClass));
369  thread->setMiscReg(reg.index(), val);
370  }
371 
376  RegVal
377  readMiscReg(int misc_reg) override
378  {
380  return thread->readMiscReg(misc_reg);
381  }
382 
387  void
388  setMiscReg(int misc_reg, RegVal val) override
389  {
391  thread->setMiscReg(misc_reg, val);
392  }
393 
394  const PCStateBase &
395  pcState() const override
396  {
397  return thread->pcState();
398  }
399 
400  void
401  pcState(const PCStateBase &val) override
402  {
403  thread->pcState(val);
404  }
405 
406  Fault
407  readMem(Addr addr, uint8_t *data, unsigned int size,
409  const std::vector<bool>& byte_enable)
410  override
411  {
412  assert(byte_enable.size() == size);
413  return cpu->readMem(addr, data, size, flags, byte_enable);
414  }
415 
416  Fault
417  initiateMemRead(Addr addr, unsigned int size,
419  const std::vector<bool>& byte_enable)
420  override
421  {
422  assert(byte_enable.size() == size);
423  return cpu->initiateMemRead(addr, size, flags, byte_enable);
424  }
425 
426  Fault
427  writeMem(uint8_t *data, unsigned int size, Addr addr,
428  Request::Flags flags, uint64_t *res,
429  const std::vector<bool>& byte_enable)
430  override
431  {
432  assert(byte_enable.size() == size);
433  return cpu->writeMem(data, size, addr, flags, res,
434  byte_enable);
435  }
436 
437  Fault
438  amoMem(Addr addr, uint8_t *data, unsigned int size,
439  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
440  {
441  return cpu->amoMem(addr, data, size, flags, std::move(amo_op));
442  }
443 
444  Fault
445  initiateMemAMO(Addr addr, unsigned int size,
447  AtomicOpFunctorPtr amo_op) override
448  {
449  return cpu->initiateMemAMO(addr, size, flags, std::move(amo_op));
450  }
451 
452  Fault
454  {
455  return cpu->initiateMemMgmtCmd(flags);
456  }
457 
461  void
462  setStCondFailures(unsigned int sc_failures) override
463  {
464  thread->setStCondFailures(sc_failures);
465  }
466 
470  unsigned int
471  readStCondFailures() const override
472  {
473  return thread->readStCondFailures();
474  }
475 
477  ThreadContext *tcBase() const override { return thread->getTC(); }
478 
479  bool
480  readPredicate() const override
481  {
482  return thread->readPredicate();
483  }
484 
485  void
486  setPredicate(bool val) override
487  {
489 
490  if (cpu->traceData) {
492  }
493  }
494 
495  bool
496  readMemAccPredicate() const override
497  {
498  return thread->readMemAccPredicate();
499  }
500 
501  void
502  setMemAccPredicate(bool val) override
503  {
505  }
506 
507  uint64_t
508  getHtmTransactionUid() const override
509  {
510  return tcBase()->getHtmCheckpointPtr()->getHtmUid();
511  }
512 
513  uint64_t
514  newHtmTransactionUid() const override
515  {
516  return tcBase()->getHtmCheckpointPtr()->newHtmUid();
517  }
518 
519  bool
520  inHtmTransactionalState() const override
521  {
522  return (getHtmTransactionalDepth() > 0);
523  }
524 
525  uint64_t
526  getHtmTransactionalDepth() const override
527  {
530  }
531 
535  void
536  demapPage(Addr vaddr, uint64_t asn) override
537  {
538  thread->demapPage(vaddr, asn);
539  }
540 
541  void
542  armMonitor(Addr address) override
543  {
544  cpu->armMonitor(thread->threadId(), address);
545  }
546 
547  bool
548  mwait(PacketPtr pkt) override
549  {
550  return cpu->mwait(thread->threadId(), pkt);
551  }
552 
553  void
555  {
556  cpu->mwaitAtomic(thread->threadId(), tc, thread->mmu);
557  }
558 
559  AddressMonitor *
560  getAddrMonitor() override
561  {
562  return cpu->getCpuAddrMonitor(thread->threadId());
563  }
564 };
565 
566 } // namespace gem5
567 
568 #endif // __CPU_EXEC_CONTEXT_HH__
gem5::statistics::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1930
gem5::BaseSimpleCPU::initiateMemAMO
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:178
gem5::SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:277
gem5::SimpleExecContext::setMiscReg
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Definition: exec_context.hh:388
gem5::SimpleThread::getWritableReg
void * getWritableReg(const RegId &arch_reg) override
Definition: simple_thread.hh:380
gem5::SimpleExecContext::numOp
Counter numOp
Definition: exec_context.hh:77
gem5::SimpleExecContext::ExecContextStats::numMiscRegReads
statistics::Scalar numMiscRegReads
Definition: exec_context.hh:261
gem5::SimpleExecContext::ExecContextStats::numIntRegWrites
statistics::Scalar numIntRegWrites
Definition: exec_context.hh:242
gem5::SimpleThread::getReg
RegVal getReg(const RegId &arch_reg) const override
Definition: simple_thread.hh:321
gem5::SimpleExecContext::ExecContextStats::numRegWrites
std::array< statistics::Scalar *, CCRegClass+1 > numRegWrites
Definition: exec_context.hh:298
gem5::SimpleThread::htmTransactionStops
int64_t htmTransactionStops
Definition: simple_thread.hh:138
gem5::SimpleExecContext::lastDcacheStall
Counter lastDcacheStall
Definition: exec_context.hh:83
gem5::RegVal
uint64_t RegVal
Definition: types.hh:173
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::SimpleExecContext::ExecContextStats::ExecContextStats
ExecContextStats(BaseSimpleCPU *cpu, SimpleThread *thread)
Definition: exec_context.hh:87
gem5::BaseSimpleCPU::traceData
Trace::InstRecord * traceData
Definition: base.hh:97
gem5::SimpleExecContext::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: exec_context.hh:496
gem5::SimpleExecContext::initiateMemMgmtCmd
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
Definition: exec_context.hh:453
gem5::InvalidRegClass
@ InvalidRegClass
Definition: reg_class.hh:67
gem5::SimpleExecContext::ExecContextStats::icacheStallCycles
statistics::Scalar icacheStallCycles
Definition: exec_context.hh:280
gem5::SimpleExecContext::numLoad
Counter numLoad
Definition: exec_context.hh:79
gem5::SimpleExecContext::ExecContextStats::numCallsReturns
statistics::Scalar numCallsReturns
Definition: exec_context.hh:226
gem5::SimpleExecContext::ExecContextStats::numVecPredRegWrites
statistics::Scalar numVecPredRegWrites
Definition: exec_context.hh:254
gem5::SimpleExecContext::getWritableRegOperand
void * getWritableRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:329
gem5::SimpleExecContext::ExecContextStats::numVecRegReads
statistics::Scalar numVecRegReads
Definition: exec_context.hh:249
gem5::statistics::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:68
gem5::X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
gem5::BaseSimpleCPU::amoMem
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:171
gem5::SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:289
gem5::SimpleExecContext::execContextStats
gem5::SimpleExecContext::ExecContextStats execContextStats
gem5::SimpleThread::setStCondFailures
void setStCondFailures(unsigned sc_failures) override
Definition: simple_thread.hh:315
gem5::SimpleExecContext::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: exec_context.hh:514
gem5::SimpleExecContext::readMiscReg
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Definition: exec_context.hh:377
gem5::statistics::DataWrapVec::subname
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
Definition: statistics.hh:402
gem5::statistics::Average
A stat that calculates the per tick average of a value.
Definition: statistics.hh:1958
gem5::SimpleExecContext::getRegOperand
void getRegOperand(const StaticInst *si, int idx, void *val) override
Definition: exec_context.hh:321
gem5::SimpleExecContext::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: exec_context.hh:471
gem5::SimpleExecContext::ExecContextStats::numRegReads
std::array< statistics::Scalar *, CCRegClass+1 > numRegReads
Definition: exec_context.hh:297
gem5::statistics::Vector
A vector of scalar stats.
Definition: statistics.hh:2006
gem5::statistics::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2539
std::vector< bool >
gem5::csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:161
gem5::Trace::InstRecord::setPredicate
void setPredicate(bool val)
Definition: insttracer.hh:264
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
gem5::SimpleThread::setReg
void setReg(const RegId &arch_reg, RegVal val) override
Definition: simple_thread.hh:399
gem5::SimpleThread::htmTransactionStarts
int64_t htmTransactionStarts
Definition: simple_thread.hh:137
gem5::SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:95
gem5::SimpleExecContext::ExecContextStats::numPredictedBranches
statistics::Scalar numPredictedBranches
Number of branches predicted as taken.
Definition: exec_context.hh:289
request.hh
gem5::SimpleExecContext::ExecContextStats::numVecInsts
statistics::Scalar numVecInsts
Definition: exec_context.hh:238
gem5::SimpleExecContext::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: exec_context.hh:526
gem5::statistics::dist
const FlagsType dist
Print the distribution.
Definition: info.hh:66
gem5::SimpleExecContext::setPredicate
void setPredicate(bool val) override
Definition: exec_context.hh:486
gem5::statistics::constant
Temp constant(T val)
Definition: statistics.hh:2865
gem5::SimpleExecContext::pcState
const PCStateBase & pcState() const override
Definition: exec_context.hh:395
gem5::SimpleExecContext::amoMem
Fault amoMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
Definition: exec_context.hh:438
gem5::statistics::pdf
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition: info.hh:62
gem5::SimpleThread::readStCondFailures
unsigned readStCondFailures() const override
Definition: simple_thread.hh:300
gem5::BaseSimpleCPU::writeMem
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >())
Definition: base.hh:163
gem5::SimpleThread::mmu
BaseMMU * mmu
Definition: simple_thread.hh:132
gem5::SimpleExecContext::ExecContextStats::numMiscRegWrites
statistics::Scalar numMiscRegWrites
Definition: exec_context.hh:262
gem5::SimpleExecContext::mwait
bool mwait(PacketPtr pkt) override
Definition: exec_context.hh:548
gem5::SimpleExecContext::ExecContextStats::numCCRegReads
statistics::Scalar numCCRegReads
Definition: exec_context.hh:257
gem5::SimpleExecContext::setStCondFailures
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: exec_context.hh:462
gem5::SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:303
gem5::Flags< FlagsType >
gem5::SimpleExecContext::ExecContextStats::numIdleCycles
statistics::Formula numIdleCycles
Definition: exec_context.hh:270
gem5::BaseSimpleCPU::readMem
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Definition: base.hh:149
gem5::SimpleExecContext::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: exec_context.hh:536
translation.hh
gem5::StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:88
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:94
gem5::SimpleExecContext::ExecContextStats::numInsts
statistics::Scalar numInsts
Definition: exec_context.hh:213
gem5::SimpleExecContext::fetchOffset
Addr fetchOffset
Definition: exec_context.hh:67
gem5::Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:248
gem5::SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:267
gem5::SimpleExecContext::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: exec_context.hh:520
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75
gem5::SimpleExecContext::ExecContextStats::numFpRegReads
statistics::Scalar numFpRegReads
Definition: exec_context.hh:245
gem5::SimpleExecContext::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: exec_context.hh:554
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:291
gem5::SimpleExecContext::ExecContextStats::numCCRegWrites
statistics::Scalar numCCRegWrites
Definition: exec_context.hh:258
gem5::SimpleExecContext::ExecContextStats::numCondCtrlInsts
statistics::Scalar numCondCtrlInsts
Definition: exec_context.hh:229
gem5::SimpleExecContext::stayAtPC
bool stayAtPC
Definition: exec_context.hh:70
gem5::SimpleExecContext::readPredicate
bool readPredicate() const override
Definition: exec_context.hh:480
gem5::SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:309
gem5::SimpleExecContext::ExecContextStats::notIdleFraction
statistics::Average notIdleFraction
Definition: exec_context.hh:276
gem5::SimpleExecContext::cpu
BaseSimpleCPU * cpu
Definition: exec_context.hh:63
gem5::SimpleExecContext::writeMem
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
For atomic-mode contexts, perform an atomic memory write operation.
Definition: exec_context.hh:427
gem5::SimpleExecContext::ExecContextStats::statExecutedInstType
statistics::Vector statExecutedInstType
Definition: exec_context.hh:295
gem5::SimpleThread::threadId
int threadId() const override
Definition: simple_thread.hh:202
gem5::SimpleExecContext::ExecContextStats::numBusyCycles
statistics::Formula numBusyCycles
Definition: exec_context.hh:273
gem5::SimpleExecContext::ExecContextStats::dcacheStallCycles
statistics::Scalar dcacheStallCycles
Definition: exec_context.hh:283
gem5::BaseSimpleCPU
Definition: base.hh:83
flags
uint8_t flags
Definition: helpers.cc:66
gem5::SimpleExecContext::numInst
Counter numInst
PER-THREAD STATS.
Definition: exec_context.hh:76
gem5::ThreadContext::getHtmCheckpointPtr
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
gem5::SimpleThread::pcState
const PCStateBase & pcState() const override
Definition: simple_thread.hh:258
gem5::ArmISA::si
Bitfield< 6 > si
Definition: misc_types.hh:825
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::SimpleExecContext::ExecContextStats::idleFraction
statistics::Formula idleFraction
Definition: exec_context.hh:277
gem5::SimpleExecContext::lastIcacheStall
Counter lastIcacheStall
Definition: exec_context.hh:81
gem5::SimpleExecContext::ExecContextStats::numFpInsts
statistics::Scalar numFpInsts
Definition: exec_context.hh:235
gem5::SimpleExecContext::pcState
void pcState(const PCStateBase &val) override
Definition: exec_context.hh:401
gem5::SimpleExecContext::ExecContextStats::numVecAluAccesses
statistics::Scalar numVecAluAccesses
Definition: exec_context.hh:223
gem5::SimpleExecContext::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:364
gem5::SimpleExecContext::ExecContextStats::numStoreInsts
statistics::Scalar numStoreInsts
Definition: exec_context.hh:267
gem5::X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:92
gem5::SimpleExecContext::initiateMemRead
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Initiate a timing memory read operation.
Definition: exec_context.hh:417
gem5::SimpleExecContext::thread
SimpleThread * thread
Definition: exec_context.hh:64
gem5::SimpleThread::getTC
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
Definition: simple_thread.hh:167
base.hh
gem5::SimpleExecContext::ExecContextStats::numLoadInsts
statistics::Scalar numLoadInsts
Definition: exec_context.hh:266
gem5::BaseSimpleCPU::initiateMemMgmtCmd
virtual Fault initiateMemMgmtCmd(Request::Flags flags)=0
Memory management commands such as hardware transactional memory commands or TLB invalidation command...
gem5::SimpleExecContext::ExecContextStats::numIntInsts
statistics::Scalar numIntInsts
Definition: exec_context.hh:232
gem5::SimpleExecContext::ExecContextStats::numIntAluAccesses
statistics::Scalar numIntAluAccesses
Definition: exec_context.hh:217
gem5::SimpleExecContext::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: exec_context.hh:502
base.hh
gem5::SimpleExecContext
Definition: exec_context.hh:60
gem5::MiscRegClass
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:66
gem5::statistics::DataWrap::prereq
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Definition: statistics.hh:372
types.hh
gem5::SimpleExecContext::setRegOperand
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:337
gem5::BaseSimpleCPU::initiateMemRead
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Definition: base.hh:156
gem5::SimpleExecContext::initiateMemAMO
Fault initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
Definition: exec_context.hh:445
gem5::SimpleThread::demapPage
void demapPage(Addr vaddr, uint64_t asn)
Definition: simple_thread.hh:170
gem5::SimpleExecContext::ExecContextStats
Definition: exec_context.hh:85
static_inst_fwd.hh
gem5::SimpleExecContext::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: exec_context.hh:560
exec_context.hh
reg_class.hh
gem5::statistics::Counter
double Counter
All counters are of 64-bit values.
Definition: types.hh:47
gem5::SimpleExecContext::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: exec_context.hh:477
gem5::SimpleExecContext::ExecContextStats::numFpAluAccesses
statistics::Scalar numFpAluAccesses
Definition: exec_context.hh:220
gem5::SimpleExecContext::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:355
gem5::statistics::Group
Statistics container.
Definition: group.hh:93
gem5::SimpleExecContext::setRegOperand
void setRegOperand(const StaticInst *si, int idx, const void *val) override
Definition: exec_context.hh:347
gem5::SimpleExecContext::ExecContextStats::numVecRegWrites
statistics::Scalar numVecRegWrites
Definition: exec_context.hh:250
gem5::ExecContext
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:73
gem5::SimpleExecContext::ExecContextStats::numIntRegReads
statistics::Scalar numIntRegReads
Definition: exec_context.hh:241
gem5::SimpleExecContext::ExecContextStats::numBranches
statistics::Scalar numBranches
Definition: exec_context.hh:287
gem5::SimpleExecContext::ExecContextStats::numOps
statistics::Scalar numOps
Definition: exec_context.hh:214
gem5::SimpleExecContext::ExecContextStats::numFpRegWrites
statistics::Scalar numFpRegWrites
Definition: exec_context.hh:246
gem5::Num_OpClasses
static const OpClass Num_OpClasses
Definition: op_class.hh:108
gem5::SimpleExecContext::armMonitor
void armMonitor(Addr address) override
Definition: exec_context.hh:542
gem5::statistics::DataWrap::flags
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Definition: statistics.hh:358
gem5::SimpleExecContext::readMem
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Perform an atomic memory read operation.
Definition: exec_context.hh:407
gem5::MipsISA::vaddr
vaddr
Definition: pra_constants.hh:278
gem5::PCStateBase
Definition: pcstate.hh:57
gem5::SimpleExecContext::ExecContextStats::numBranchMispred
statistics::Scalar numBranchMispred
Number of misprediced branches.
Definition: exec_context.hh:291
gem5::AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:242
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::statistics::total
const FlagsType total
Print the total.
Definition: info.hh:60
gem5::SimpleExecContext::predPC
std::unique_ptr< PCStateBase > predPC
Definition: exec_context.hh:73
gem5::statistics::VectorBase::init
Derived & init(size_type size)
Set this vector to have the given size.
Definition: statistics.hh:1040
gem5::SimpleExecContext::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: exec_context.hh:508
gem5::SimpleExecContext::getRegOperand
RegVal getRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:311
gem5::SimpleExecContext::ExecContextStats::numVecPredRegReads
statistics::Scalar numVecPredRegReads
Definition: exec_context.hh:253
gem5::SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:268
gem5::SimpleExecContext::ExecContextStats::numMemRefs
statistics::Scalar numMemRefs
Definition: exec_context.hh:265
gem5::SimpleExecContext::SimpleExecContext
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Definition: exec_context.hh:304
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:126
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Thu Jul 28 2022 13:32:27 for gem5 by doxygen 1.8.17