gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
exec_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018 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  * Authors: Kevin Lim
41  * Andreas Sandberg
42  * Mitch Hayenga
43  */
44 
45 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
46 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
47 
48 #include "arch/registers.hh"
49 #include "base/types.hh"
50 #include "config/the_isa.hh"
51 #include "cpu/base.hh"
52 #include "cpu/exec_context.hh"
53 #include "cpu/reg_class.hh"
54 #include "cpu/simple/base.hh"
55 #include "cpu/static_inst_fwd.hh"
56 #include "cpu/translation.hh"
57 #include "mem/request.hh"
58 
59 class BaseSimpleCPU;
60 
62  protected:
65 
66  public:
69 
70  // This is the offset from the current pc that fetch should be performed
72  // This flag says to stay at the current pc. This is useful for
73  // instructions which go beyond MachInst boundaries.
74  bool stayAtPC;
75 
76  // Branch prediction
78 
81  // Number of simulated instructions
86 
87  // Number of integer alu accesses
89 
90  // Number of float alu accesses
92 
93  // Number of vector alu accesses
95 
96  // Number of function calls/returns
98 
99  // Conditional control instructions;
101 
102  // Number of int instructions
104 
105  // Number of float instructions
107 
108  // Number of vector instructions
110 
111  // Number of integer register file accesses
114 
115  // Number of float register file accesses
118 
119  // Number of vector register file accesses
122 
123  // Number of predicate register file accesses
126 
127  // Number of condition code register file accesses
130 
131  // Number of simulated memory references
135 
136  // Number of idle cycles
138 
139  // Number of busy cycles
141 
142  // Number of simulated loads
144 
145  // Number of idle cycles
148 
149  // Number of cycles stalled for I-cache responses
152 
153  // Number of cycles stalled for D-cache responses
156 
165 
166  // Instruction mix histogram by OpClass
168 
169  public:
172  : cpu(_cpu), thread(_thread), fetchOffset(0), stayAtPC(false),
173  numInst(0), numOp(0), numLoad(0), lastIcacheStall(0), lastDcacheStall(0)
174  { }
175 
177  RegVal
178  readIntRegOperand(const StaticInst *si, int idx) override
179  {
180  numIntRegReads++;
181  const RegId& reg = si->srcRegIdx(idx);
182  assert(reg.isIntReg());
183  return thread->readIntReg(reg.index());
184  }
185 
187  void
188  setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
189  {
190  numIntRegWrites++;
191  const RegId& reg = si->destRegIdx(idx);
192  assert(reg.isIntReg());
193  thread->setIntReg(reg.index(), val);
194  }
195 
198  RegVal
199  readFloatRegOperandBits(const StaticInst *si, int idx) override
200  {
201  numFpRegReads++;
202  const RegId& reg = si->srcRegIdx(idx);
203  assert(reg.isFloatReg());
204  return thread->readFloatReg(reg.index());
205  }
206 
209  void
210  setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
211  {
212  numFpRegWrites++;
213  const RegId& reg = si->destRegIdx(idx);
214  assert(reg.isFloatReg());
215  thread->setFloatReg(reg.index(), val);
216  }
217 
219  const VecRegContainer &
220  readVecRegOperand(const StaticInst *si, int idx) const override
221  {
222  numVecRegReads++;
223  const RegId& reg = si->srcRegIdx(idx);
224  assert(reg.isVecReg());
225  return thread->readVecReg(reg);
226  }
227 
230  getWritableVecRegOperand(const StaticInst *si, int idx) override
231  {
232  numVecRegWrites++;
233  const RegId& reg = si->destRegIdx(idx);
234  assert(reg.isVecReg());
235  return thread->getWritableVecReg(reg);
236  }
237 
239  void
240  setVecRegOperand(const StaticInst *si, int idx,
241  const VecRegContainer& val) override
242  {
243  numVecRegWrites++;
244  const RegId& reg = si->destRegIdx(idx);
245  assert(reg.isVecReg());
246  thread->setVecReg(reg, val);
247  }
248 
252  template <typename VecElem>
254  readVecLaneOperand(const StaticInst *si, int idx) const
255  {
256  numVecRegReads++;
257  const RegId& reg = si->srcRegIdx(idx);
258  assert(reg.isVecReg());
259  return thread->readVecLane<VecElem>(reg);
260  }
262  virtual ConstVecLane8
263  readVec8BitLaneOperand(const StaticInst *si, int idx) const
264  override
265  { return readVecLaneOperand<uint8_t>(si, idx); }
266 
268  virtual ConstVecLane16
269  readVec16BitLaneOperand(const StaticInst *si, int idx) const
270  override
271  { return readVecLaneOperand<uint16_t>(si, idx); }
272 
274  virtual ConstVecLane32
275  readVec32BitLaneOperand(const StaticInst *si, int idx) const
276  override
277  { return readVecLaneOperand<uint32_t>(si, idx); }
278 
280  virtual ConstVecLane64
281  readVec64BitLaneOperand(const StaticInst *si, int idx) const
282  override
283  { return readVecLaneOperand<uint64_t>(si, idx); }
284 
286  template <typename LD>
287  void
289  const LD& val)
290  {
291  numVecRegWrites++;
292  const RegId& reg = si->destRegIdx(idx);
293  assert(reg.isVecReg());
294  return thread->setVecLane(reg, val);
295  }
297  virtual void
298  setVecLaneOperand(const StaticInst *si, int idx,
299  const LaneData<LaneSize::Byte>& val) override
300  { return setVecLaneOperandT(si, idx, val); }
302  virtual void
303  setVecLaneOperand(const StaticInst *si, int idx,
304  const LaneData<LaneSize::TwoByte>& val) override
305  { return setVecLaneOperandT(si, idx, val); }
307  virtual void
308  setVecLaneOperand(const StaticInst *si, int idx,
309  const LaneData<LaneSize::FourByte>& val) override
310  { return setVecLaneOperandT(si, idx, val); }
312  virtual void
313  setVecLaneOperand(const StaticInst *si, int idx,
314  const LaneData<LaneSize::EightByte>& val) override
315  { return setVecLaneOperandT(si, idx, val); }
319  VecElem
320  readVecElemOperand(const StaticInst *si, int idx) const override
321  {
322  numVecRegReads++;
323  const RegId& reg = si->srcRegIdx(idx);
324  assert(reg.isVecElem());
325  return thread->readVecElem(reg);
326  }
327 
329  void
330  setVecElemOperand(const StaticInst *si, int idx,
331  const VecElem val) override
332  {
333  numVecRegWrites++;
334  const RegId& reg = si->destRegIdx(idx);
335  assert(reg.isVecElem());
336  thread->setVecElem(reg, val);
337  }
338 
339  const VecPredRegContainer&
340  readVecPredRegOperand(const StaticInst *si, int idx) const override
341  {
342  numVecPredRegReads++;
343  const RegId& reg = si->srcRegIdx(idx);
344  assert(reg.isVecPredReg());
345  return thread->readVecPredReg(reg);
346  }
347 
349  getWritableVecPredRegOperand(const StaticInst *si, int idx) override
350  {
351  numVecPredRegWrites++;
352  const RegId& reg = si->destRegIdx(idx);
353  assert(reg.isVecPredReg());
354  return thread->getWritableVecPredReg(reg);
355  }
356 
357  void
359  const VecPredRegContainer& val) override
360  {
361  numVecPredRegWrites++;
362  const RegId& reg = si->destRegIdx(idx);
363  assert(reg.isVecPredReg());
364  thread->setVecPredReg(reg, val);
365  }
366 
367  RegVal
368  readCCRegOperand(const StaticInst *si, int idx) override
369  {
370  numCCRegReads++;
371  const RegId& reg = si->srcRegIdx(idx);
372  assert(reg.isCCReg());
373  return thread->readCCReg(reg.index());
374  }
375 
376  void
377  setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
378  {
379  numCCRegWrites++;
380  const RegId& reg = si->destRegIdx(idx);
381  assert(reg.isCCReg());
382  thread->setCCReg(reg.index(), val);
383  }
384 
385  RegVal
386  readMiscRegOperand(const StaticInst *si, int idx) override
387  {
388  numIntRegReads++;
389  const RegId& reg = si->srcRegIdx(idx);
390  assert(reg.isMiscReg());
391  return thread->readMiscReg(reg.index());
392  }
393 
394  void
395  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
396  {
397  numIntRegWrites++;
398  const RegId& reg = si->destRegIdx(idx);
399  assert(reg.isMiscReg());
400  thread->setMiscReg(reg.index(), val);
401  }
402 
407  RegVal
408  readMiscReg(int misc_reg) override
409  {
410  numIntRegReads++;
411  return thread->readMiscReg(misc_reg);
412  }
413 
418  void
419  setMiscReg(int misc_reg, RegVal val) override
420  {
421  numIntRegWrites++;
422  thread->setMiscReg(misc_reg, val);
423  }
424 
425  PCState
426  pcState() const override
427  {
428  return thread->pcState();
429  }
430 
431  void
432  pcState(const PCState &val) override
433  {
434  thread->pcState(val);
435  }
436 
437  Fault
438  readMem(Addr addr, uint8_t *data, unsigned int size,
439  Request::Flags flags,
440  const std::vector<bool>& byte_enable = std::vector<bool>())
441  override
442  {
443  assert(byte_enable.empty() || byte_enable.size() == size);
444  return cpu->readMem(addr, data, size, flags, byte_enable);
445  }
446 
447  Fault
448  initiateMemRead(Addr addr, unsigned int size,
449  Request::Flags flags,
450  const std::vector<bool>& byte_enable = std::vector<bool>())
451  override
452  {
453  assert(byte_enable.empty() || byte_enable.size() == size);
454  return cpu->initiateMemRead(addr, size, flags, byte_enable);
455  }
456 
457  Fault
458  writeMem(uint8_t *data, unsigned int size, Addr addr,
459  Request::Flags flags, uint64_t *res,
460  const std::vector<bool>& byte_enable = std::vector<bool>())
461  override
462  {
463  assert(byte_enable.empty() || byte_enable.size() == size);
464  return cpu->writeMem(data, size, addr, flags, res, byte_enable);
465  }
466 
467  Fault amoMem(Addr addr, uint8_t *data, unsigned int size,
468  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
469  {
470  return cpu->amoMem(addr, data, size, flags, std::move(amo_op));
471  }
472 
473  Fault initiateMemAMO(Addr addr, unsigned int size,
474  Request::Flags flags,
475  AtomicOpFunctorPtr amo_op) override
476  {
477  return cpu->initiateMemAMO(addr, size, flags, std::move(amo_op));
478  }
479 
483  void
484  setStCondFailures(unsigned int sc_failures) override
485  {
486  thread->setStCondFailures(sc_failures);
487  }
488 
492  unsigned int
493  readStCondFailures() const override
494  {
495  return thread->readStCondFailures();
496  }
497 
501  void
502  syscall(Fault *fault) override
503  {
504  thread->syscall(fault);
505  }
506 
508  ThreadContext *tcBase() override { return thread->getTC(); }
509 
510  bool
511  readPredicate() const override
512  {
513  return thread->readPredicate();
514  }
515 
516  void
517  setPredicate(bool val) override
518  {
519  thread->setPredicate(val);
520 
521  if (cpu->traceData) {
522  cpu->traceData->setPredicate(val);
523  }
524  }
525 
526  bool
527  readMemAccPredicate() const override
528  {
529  return thread->readMemAccPredicate();
530  }
531 
532  void
533  setMemAccPredicate(bool val) override
534  {
535  thread->setMemAccPredicate(val);
536  }
537 
541  void
542  demapPage(Addr vaddr, uint64_t asn) override
543  {
544  thread->demapPage(vaddr, asn);
545  }
546 
547  void
548  armMonitor(Addr address) override
549  {
550  cpu->armMonitor(thread->threadId(), address);
551  }
552 
553  bool
554  mwait(PacketPtr pkt) override
555  {
556  return cpu->mwait(thread->threadId(), pkt);
557  }
558 
559  void
561  {
562  cpu->mwaitAtomic(thread->threadId(), tc, thread->dtb);
563  }
564 
566  getAddrMonitor() override
567  {
568  return cpu->getCpuAddrMonitor(thread->threadId());
569  }
570 };
571 
572 #endif // __CPU_EXEC_CONTEXT_HH__
void setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
Sets the bits of a floating point register of single width to a binary value.
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:163
virtual void setVecLane(const RegId &reg, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
Stats::Scalar numFpAluAccesses
Definition: exec_context.hh:91
virtual ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Write a lane of the destination vector operand.
Bitfield< 5, 3 > reg
Definition: types.hh:89
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:614
bool isMiscReg() const
true if it is a condition-code physical register.
Definition: reg_class.hh:167
Stats::Average notIdleFraction
VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
A stat that calculates the per tick average of a value.
Definition: statistics.hh:2524
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Perform an atomic memory read operation.
Stats::Scalar numVecPredRegReads
Vector Register Abstraction This generic class is the model in a particularization of MVC...
Definition: vec_reg.hh:160
bool readPredicate() const
Stats::Scalar numLoadInsts
Stats::Scalar numIntAluAccesses
Definition: exec_context.hh:88
unsigned readStCondFailures() const override
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
RegVal readCCReg(RegIndex reg_idx) const override
Stats::Vector statExecutedInstType
VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Reads an element of a vector register.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Write a lane of the destination vector operand.
BaseSimpleCPU * cpu
Definition: exec_context.hh:67
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
ip6_addr_t addr
Definition: inet.hh:335
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:230
TheISA::PCState PCState
Definition: exec_context.hh:75
Stats::Scalar numCCRegReads
TheISA::PCState pcState() const override
Stats::Scalar numFpRegWrites
Stats::Scalar numIntRegReads
uint64_t RegVal
Definition: types.hh:168
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i&#39;th source reg.
Definition: static_inst.hh:220
A vector of scalar stats.
Definition: statistics.hh:2550
Stats::Formula numIdleCycles
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
void setMemAccPredicate(bool val)
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
void setVecElemOperand(const StaticInst *si, int idx, const VecElem val) override
Sets an element of a vector register to a value.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
VecPredRegContainer & getWritableVecPredReg(const RegId &reg) override
RegVal readMiscReg(RegIndex misc_reg) override
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2508
PCState pcState() const override
Bitfield< 63 > val
Definition: misc.hh:771
const VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
VecRegContainer & getWritableVecReg(const RegId &reg) override
void setVecPredRegOperand(const StaticInst *si, int idx, const VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
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:145
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:214
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
For atomic-mode contexts, perform an atomic memory write operation.
bool isCCReg() const
true if it is a condition-code physical register.
Definition: reg_class.hh:164
Bitfield< 15, 0 > si
Definition: types.hh:55
VecLaneT< T, true > readVecLane(const RegId &reg) const
Vector Register Lane Interfaces.
void setVecElem(const RegId &reg, const VecElem &val) override
bool isVecElem() const
true if it is a condition-code physical register.
Definition: reg_class.hh:158
void setIntReg(RegIndex reg_idx, RegVal val) override
Stats::Scalar numOps
Definition: exec_context.hh:85
Stats::Scalar icacheStallCycles
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 8bit operand.
AddressMonitor * getAddrMonitor() override
void setPredicate(bool val) override
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Definition: vec_reg.hh:457
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:73
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
Stats::Scalar numVecPredRegWrites
void mwaitAtomic(ThreadContext *tc) override
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:168
bool readMemAccPredicate()
void setCCReg(RegIndex reg_idx, RegVal val) override
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
RegVal readIntReg(RegIndex reg_idx) const override
void setFloatReg(RegIndex reg_idx, RegVal val) override
Stats::Scalar numPredictedBranches
Number of branches predicted as taken.
ThreadContext * tcBase() override
Returns a pointer to the ThreadContext.
const VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Reads a vector register.
void setMemAccPredicate(bool val) override
::DummyVecRegContainer VecRegContainer
Definition: registers.hh:53
Stats::Scalar numVecRegReads
VecLaneT< VecElem, true > readVecLaneOperand(const StaticInst *si, int idx) const
Vector Register Lane Interfaces.
const VecPredRegContainer & readVecPredReg(const RegId &reg) const override
Stats::Scalar dcacheStallCycles
Stats::Scalar numFpInsts
Stats::Scalar numVecRegWrites
Stats::Scalar numIntRegWrites
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) ...
void setPredicate(bool val)
Definition: insttracer.hh:222
Stats::Scalar numMemRefs
bool isIntReg() const
Definition: reg_class.hh:149
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
Definition: base.cc:249
void setMiscReg(RegIndex misc_reg, RegVal val) override
VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Reads a vector register for modification.
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Stats::Scalar numIntInsts
void demapPage(Addr vaddr, uint64_t asn)
Stats::Scalar numInsts
Definition: exec_context.hh:83
bool isFloatReg() const
Definition: reg_class.hh:152
SimpleThread * thread
Definition: exec_context.hh:68
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
ThreadContext * getTC()
Returns the pointer to this SimpleThread&#39;s ThreadContext.
void setVecRegOperand(const StaticInst *si, int idx, const VecRegContainer &val) override
Sets a vector register to a value.
Stats::Formula numBusyCycles
int64_t Counter
Statistics counter type.
Definition: types.hh:58
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:255
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
void pcState(const PCState &val) override
Stats::Scalar numBranches
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:157
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) ...
int threadId() const override
Counter numInst
PER-THREAD STATS.
Definition: exec_context.hh:82
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3012
bool isVecReg() const
true if it is a condition-code physical register.
Definition: reg_class.hh:155
bool readMemAccPredicate() const override
void setStCondFailures(unsigned sc_failures) override
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:226
bool mwait(PacketPtr pkt) override
Stats::Scalar numCallsReturns
Definition: exec_context.hh:97
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Stats::Scalar numFpRegReads
void syscall(Fault *fault) override
Executes a syscall specified by the callnum.
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Initiate a timing memory read operation.
Trace::InstRecord * traceData
Definition: base.hh:99
GenericISA::SimplePCState< MachInst > PCState
Definition: types.hh:43
TheISA::PCState predPC
Definition: exec_context.hh:77
const VecElem & readVecElem(const RegId &reg) const override
Generic predicate register container.
Definition: vec_pred_reg.hh:51
RegVal readFloatReg(RegIndex reg_idx) const override
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Base, ISA-independent static instruction class.
Definition: static_inst.hh:83
const RegIndex & index() const
Index accessors.
Definition: reg_class.hh:179
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Write a lane of the destination vector operand.
Stats::Scalar numStoreInsts
void setVecPredReg(const RegId &reg, const VecPredRegContainer &val) override
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i&#39;th destination reg.
Definition: static_inst.hh:216
Stats::Scalar numVecAluAccesses
Definition: exec_context.hh:94
Stats::Scalar numCCRegWrites
Stats::Formula idleFraction
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:79
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register...
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register...
Stats::Scalar numVecInsts
::DummyVecElem VecElem
Definition: registers.hh:50
void armMonitor(Addr address) override
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Definition: base.hh:151
bool isVecPredReg() const
true if it is a predicate physical register.
Definition: reg_class.hh:161
void setVecReg(const RegId &reg, const VecRegContainer &val) override
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
TheISA::VecElem VecElem
Definition: exec_context.hh:78
bool readPredicate() const override
const char data[]
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
const VecRegContainer & readVecReg(const RegId &reg) const override
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Stats::Scalar numBranchMispred
Number of misprediced branches.
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
void syscall(Fault *fault) override
BaseTLB * dtb
void setPredicate(bool val)
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
Stats::Scalar numCondCtrlInsts

Generated on Fri Feb 28 2020 16:26:59 for gem5 by doxygen 1.8.13