gem5  v20.1.0.0
exec_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018, 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 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/registers.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 class BaseSimpleCPU;
56 
58  protected:
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
74 
77  // Number of simulated instructions
82 
83  // Number of integer alu accesses
85 
86  // Number of float alu accesses
88 
89  // Number of vector alu accesses
91 
92  // Number of function calls/returns
94 
95  // Conditional control instructions;
97 
98  // Number of int instructions
100 
101  // Number of float instructions
103 
104  // Number of vector instructions
106 
107  // Number of integer register file accesses
110 
111  // Number of float register file accesses
114 
115  // Number of vector register file accesses
118 
119  // Number of predicate register file accesses
122 
123  // Number of condition code register file accesses
126 
127  // Number of simulated memory references
131 
132  // Number of idle cycles
134 
135  // Number of busy cycles
137 
138  // Number of simulated loads
140 
141  // Number of idle cycles
144 
145  // Number of cycles stalled for I-cache responses
148 
149  // Number of cycles stalled for D-cache responses
152 
161 
162  // Instruction mix histogram by OpClass
164 
165  public:
168  : cpu(_cpu), thread(_thread), fetchOffset(0), stayAtPC(false),
170  { }
171 
173  RegVal
174  readIntRegOperand(const StaticInst *si, int idx) override
175  {
176  numIntRegReads++;
177  const RegId& reg = si->srcRegIdx(idx);
178  assert(reg.isIntReg());
179  return thread->readIntReg(reg.index());
180  }
181 
183  void
184  setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
185  {
186  numIntRegWrites++;
187  const RegId& reg = si->destRegIdx(idx);
188  assert(reg.isIntReg());
189  thread->setIntReg(reg.index(), val);
190  }
191 
194  RegVal
195  readFloatRegOperandBits(const StaticInst *si, int idx) override
196  {
197  numFpRegReads++;
198  const RegId& reg = si->srcRegIdx(idx);
199  assert(reg.isFloatReg());
200  return thread->readFloatReg(reg.index());
201  }
202 
205  void
206  setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
207  {
208  numFpRegWrites++;
209  const RegId& reg = si->destRegIdx(idx);
210  assert(reg.isFloatReg());
211  thread->setFloatReg(reg.index(), val);
212  }
213 
215  const VecRegContainer &
216  readVecRegOperand(const StaticInst *si, int idx) const override
217  {
218  numVecRegReads++;
219  const RegId& reg = si->srcRegIdx(idx);
220  assert(reg.isVecReg());
221  return thread->readVecReg(reg);
222  }
223 
226  getWritableVecRegOperand(const StaticInst *si, int idx) override
227  {
228  numVecRegWrites++;
229  const RegId& reg = si->destRegIdx(idx);
230  assert(reg.isVecReg());
231  return thread->getWritableVecReg(reg);
232  }
233 
235  void
236  setVecRegOperand(const StaticInst *si, int idx,
237  const VecRegContainer& val) override
238  {
239  numVecRegWrites++;
240  const RegId& reg = si->destRegIdx(idx);
241  assert(reg.isVecReg());
242  thread->setVecReg(reg, val);
243  }
244 
248  template <typename VecElem>
250  readVecLaneOperand(const StaticInst *si, int idx) const
251  {
252  numVecRegReads++;
253  const RegId& reg = si->srcRegIdx(idx);
254  assert(reg.isVecReg());
255  return thread->readVecLane<VecElem>(reg);
256  }
258  virtual ConstVecLane8
259  readVec8BitLaneOperand(const StaticInst *si, int idx) const
260  override
261  { return readVecLaneOperand<uint8_t>(si, idx); }
262 
264  virtual ConstVecLane16
265  readVec16BitLaneOperand(const StaticInst *si, int idx) const
266  override
267  { return readVecLaneOperand<uint16_t>(si, idx); }
268 
270  virtual ConstVecLane32
271  readVec32BitLaneOperand(const StaticInst *si, int idx) const
272  override
273  { return readVecLaneOperand<uint32_t>(si, idx); }
274 
276  virtual ConstVecLane64
277  readVec64BitLaneOperand(const StaticInst *si, int idx) const
278  override
279  { return readVecLaneOperand<uint64_t>(si, idx); }
280 
282  template <typename LD>
283  void
285  const LD& val)
286  {
287  numVecRegWrites++;
288  const RegId& reg = si->destRegIdx(idx);
289  assert(reg.isVecReg());
290  return thread->setVecLane(reg, val);
291  }
293  virtual void
294  setVecLaneOperand(const StaticInst *si, int idx,
295  const LaneData<LaneSize::Byte>& val) override
296  { return setVecLaneOperandT(si, idx, val); }
298  virtual void
299  setVecLaneOperand(const StaticInst *si, int idx,
300  const LaneData<LaneSize::TwoByte>& val) override
301  { return setVecLaneOperandT(si, idx, val); }
303  virtual void
304  setVecLaneOperand(const StaticInst *si, int idx,
305  const LaneData<LaneSize::FourByte>& val) override
306  { return setVecLaneOperandT(si, idx, val); }
308  virtual void
309  setVecLaneOperand(const StaticInst *si, int idx,
310  const LaneData<LaneSize::EightByte>& val) override
311  { return setVecLaneOperandT(si, idx, val); }
315  VecElem
316  readVecElemOperand(const StaticInst *si, int idx) const override
317  {
318  numVecRegReads++;
319  const RegId& reg = si->srcRegIdx(idx);
320  assert(reg.isVecElem());
321  return thread->readVecElem(reg);
322  }
323 
325  void
326  setVecElemOperand(const StaticInst *si, int idx,
327  const VecElem val) override
328  {
329  numVecRegWrites++;
330  const RegId& reg = si->destRegIdx(idx);
331  assert(reg.isVecElem());
333  }
334 
335  const VecPredRegContainer&
336  readVecPredRegOperand(const StaticInst *si, int idx) const override
337  {
339  const RegId& reg = si->srcRegIdx(idx);
340  assert(reg.isVecPredReg());
341  return thread->readVecPredReg(reg);
342  }
343 
345  getWritableVecPredRegOperand(const StaticInst *si, int idx) override
346  {
348  const RegId& reg = si->destRegIdx(idx);
349  assert(reg.isVecPredReg());
351  }
352 
353  void
355  const VecPredRegContainer& val) override
356  {
358  const RegId& reg = si->destRegIdx(idx);
359  assert(reg.isVecPredReg());
361  }
362 
363  RegVal
364  readCCRegOperand(const StaticInst *si, int idx) override
365  {
366  numCCRegReads++;
367  const RegId& reg = si->srcRegIdx(idx);
368  assert(reg.isCCReg());
369  return thread->readCCReg(reg.index());
370  }
371 
372  void
373  setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
374  {
375  numCCRegWrites++;
376  const RegId& reg = si->destRegIdx(idx);
377  assert(reg.isCCReg());
378  thread->setCCReg(reg.index(), val);
379  }
380 
381  RegVal
382  readMiscRegOperand(const StaticInst *si, int idx) override
383  {
384  numIntRegReads++;
385  const RegId& reg = si->srcRegIdx(idx);
386  assert(reg.isMiscReg());
387  return thread->readMiscReg(reg.index());
388  }
389 
390  void
391  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
392  {
393  numIntRegWrites++;
394  const RegId& reg = si->destRegIdx(idx);
395  assert(reg.isMiscReg());
396  thread->setMiscReg(reg.index(), val);
397  }
398 
403  RegVal
404  readMiscReg(int misc_reg) override
405  {
406  numIntRegReads++;
407  return thread->readMiscReg(misc_reg);
408  }
409 
414  void
415  setMiscReg(int misc_reg, RegVal val) override
416  {
417  numIntRegWrites++;
418  thread->setMiscReg(misc_reg, val);
419  }
420 
421  PCState
422  pcState() const override
423  {
424  return thread->pcState();
425  }
426 
427  void
428  pcState(const PCState &val) override
429  {
430  thread->pcState(val);
431  }
432 
433  Fault
434  readMem(Addr addr, uint8_t *data, unsigned int size,
435  Request::Flags flags,
436  const std::vector<bool>& byte_enable = std::vector<bool>())
437  override
438  {
439  assert(byte_enable.empty() || byte_enable.size() == size);
440  return cpu->readMem(addr, data, size, flags, byte_enable);
441  }
442 
443  Fault
444  initiateMemRead(Addr addr, unsigned int size,
445  Request::Flags flags,
446  const std::vector<bool>& byte_enable = std::vector<bool>())
447  override
448  {
449  assert(byte_enable.empty() || byte_enable.size() == size);
450  return cpu->initiateMemRead(addr, size, flags, byte_enable);
451  }
452 
453  Fault
454  writeMem(uint8_t *data, unsigned int size, Addr addr,
455  Request::Flags flags, uint64_t *res,
456  const std::vector<bool>& byte_enable = std::vector<bool>())
457  override
458  {
459  assert(byte_enable.empty() || byte_enable.size() == size);
460  return cpu->writeMem(data, size, addr, flags, res, byte_enable);
461  }
462 
463  Fault amoMem(Addr addr, uint8_t *data, unsigned int size,
464  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
465  {
466  return cpu->amoMem(addr, data, size, flags, std::move(amo_op));
467  }
468 
469  Fault initiateMemAMO(Addr addr, unsigned int size,
470  Request::Flags flags,
471  AtomicOpFunctorPtr amo_op) override
472  {
473  return cpu->initiateMemAMO(addr, size, flags, std::move(amo_op));
474  }
475 
477  {
478  return cpu->initiateHtmCmd(flags);
479  }
480 
484  void
485  setStCondFailures(unsigned int sc_failures) override
486  {
487  thread->setStCondFailures(sc_failures);
488  }
489 
493  unsigned int
494  readStCondFailures() const override
495  {
496  return thread->readStCondFailures();
497  }
498 
502  void syscall() override { thread->syscall(); }
503 
505  ThreadContext *tcBase() const override { return thread->getTC(); }
506 
507  bool
508  readPredicate() const override
509  {
510  return thread->readPredicate();
511  }
512 
513  void
514  setPredicate(bool val) override
515  {
517 
518  if (cpu->traceData) {
520  }
521  }
522 
523  bool
524  readMemAccPredicate() const override
525  {
526  return thread->readMemAccPredicate();
527  }
528 
529  void
530  setMemAccPredicate(bool val) override
531  {
533  }
534 
535  uint64_t
536  getHtmTransactionUid() const override
537  {
538  return tcBase()->getHtmCheckpointPtr()->getHtmUid();
539  }
540 
541  uint64_t
542  newHtmTransactionUid() const override
543  {
544  return tcBase()->getHtmCheckpointPtr()->newHtmUid();
545  }
546 
547  bool
548  inHtmTransactionalState() const override
549  {
550  return (getHtmTransactionalDepth() > 0);
551  }
552 
553  uint64_t
554  getHtmTransactionalDepth() const override
555  {
558  }
559 
563  void
564  demapPage(Addr vaddr, uint64_t asn) override
565  {
566  thread->demapPage(vaddr, asn);
567  }
568 
569  void
570  armMonitor(Addr address) override
571  {
572  cpu->armMonitor(thread->threadId(), address);
573  }
574 
575  bool
576  mwait(PacketPtr pkt) override
577  {
578  return cpu->mwait(thread->threadId(), pkt);
579  }
580 
581  void
583  {
585  }
586 
588  getAddrMonitor() override
589  {
590  return cpu->getCpuAddrMonitor(thread->threadId());
591  }
592 };
593 
594 #endif // __CPU_EXEC_CONTEXT_HH__
SimpleExecContext::readIntRegOperand
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Definition: exec_context.hh:174
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:415
SimpleExecContext::numVecInsts
Stats::Scalar numVecInsts
Definition: exec_context.hh:105
BaseCPU::mwait
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:212
AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:239
SimpleExecContext::armMonitor
void armMonitor(Addr address) override
Definition: exec_context.hh:570
SimpleExecContext
Definition: exec_context.hh:57
SimpleThread::pcState
TheISA::PCState pcState() const override
Definition: simple_thread.hh:517
BaseSimpleCPU::traceData
Trace::InstRecord * traceData
Definition: base.hh:95
SimpleExecContext::numCCRegReads
Stats::Scalar numCCRegReads
Definition: exec_context.hh:124
SimpleExecContext::numFpRegWrites
Stats::Scalar numFpRegWrites
Definition: exec_context.hh:113
SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:571
SimpleExecContext::readPredicate
bool readPredicate() const override
Definition: exec_context.hh:508
SimpleExecContext::lastDcacheStall
Counter lastDcacheStall
Definition: exec_context.hh:151
VecPredRegContainer
Generic predicate register container.
Definition: vec_pred_reg.hh:47
SimpleThread::setVecReg
void setVecReg(const RegId &reg, const VecRegContainer &val) override
Definition: simple_thread.hh:478
SimpleExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Write a lane of the destination vector operand.
Definition: exec_context.hh:304
SimpleExecContext::cpu
BaseSimpleCPU * cpu
Definition: exec_context.hh:63
data
const char data[]
Definition: circlebuf.test.cc:42
SimpleExecContext::readVec64BitLaneOperand
virtual ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
Definition: exec_context.hh:277
ArmISA::VecRegContainer
VecReg::Container VecRegContainer
Definition: registers.hh:71
SimpleThread::readVecReg
const VecRegContainer & readVecReg(const RegId &reg) const override
Definition: simple_thread.hh:308
SimpleExecContext::initiateHtmCmd
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
Definition: exec_context.hh:476
SimpleExecContext::numIdleCycles
Stats::Formula numIdleCycles
Definition: exec_context.hh:133
SimpleExecContext::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: exec_context.hh:494
SimpleExecContext::setStCondFailures
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: exec_context.hh:485
StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:85
Flags< FlagsType >
ArmISA::si
Bitfield< 6 > si
Definition: miscregs_types.hh:766
SimpleThread::getWritableVecReg
VecRegContainer & getWritableVecReg(const RegId &reg) override
Definition: simple_thread.hh:319
SimpleExecContext::numLoadInsts
Stats::Scalar numLoadInsts
Definition: exec_context.hh:129
SimpleExecContext::readVec16BitLaneOperand
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
Definition: exec_context.hh:265
SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:530
BaseCPU::armMonitor
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:200
BaseSimpleCPU::initiateHtmCmd
virtual Fault initiateHtmCmd(Request::Flags flags)=0
Hardware transactional memory commands (HtmCmds), e.g.
SimpleThread::setIntReg
void setIntReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:455
SimpleExecContext::numOps
Stats::Scalar numOps
Definition: exec_context.hh:81
SimpleThread::setCCReg
void setCCReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:508
BaseCPU::mwaitAtomic
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
Definition: base.cc:235
SimpleExecContext::setVecElemOperand
void setVecElemOperand(const StaticInst *si, int idx, const VecElem val) override
Sets an element of a vector register to a value.
Definition: exec_context.hh:326
std::vector< bool >
SimpleExecContext::getWritableVecPredRegOperand
VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
Definition: exec_context.hh:345
SimpleExecContext::setVecLaneOperandT
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
Definition: exec_context.hh:284
SimpleExecContext::VecElem
TheISA::VecElem VecElem
Definition: exec_context.hh:60
SimpleExecContext::pcState
PCState pcState() const override
Definition: exec_context.hh:422
SimpleExecContext::numIntAluAccesses
Stats::Scalar numIntAluAccesses
Definition: exec_context.hh:84
SimpleThread::readCCReg
RegVal readCCReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:443
SimpleExecContext::readVecElemOperand
VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Reads an element of a vector register.
Definition: exec_context.hh:316
Stats::Vector
A vector of scalar stats.
Definition: statistics.hh:2575
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:87
request.hh
SimpleExecContext::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: exec_context.hh:530
AddressMonitor
Definition: base.hh:70
SimpleThread::readStCondFailures
unsigned readStCondFailures() const override
Definition: simple_thread.hh:562
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
SimpleExecContext::setPredicate
void setPredicate(bool val) override
Definition: exec_context.hh:514
SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:89
SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:551
SimpleExecContext::numFpInsts
Stats::Scalar numFpInsts
Definition: exec_context.hh:102
ExecContext::PCState
TheISA::PCState PCState
Definition: exec_context.hh:72
SimpleExecContext::numVecPredRegWrites
Stats::Scalar numVecPredRegWrites
Definition: exec_context.hh:121
SimpleExecContext::numIntRegReads
Stats::Scalar numIntRegReads
Definition: exec_context.hh:108
SimpleExecContext::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: exec_context.hh:582
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
SimpleThread::demapPage
void demapPage(Addr vaddr, uint64_t asn)
Definition: simple_thread.hh:171
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:463
SimpleExecContext::numIntRegWrites
Stats::Scalar numIntRegWrites
Definition: exec_context.hh:109
SimpleExecContext::readVecPredRegOperand
const VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
Definition: exec_context.hh:336
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:58
SimpleExecContext::setVecPredRegOperand
void setVecPredRegOperand(const StaticInst *si, int idx, const VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
Definition: exec_context.hh:354
SimpleExecContext::numPredictedBranches
Stats::Scalar numPredictedBranches
Number of branches predicted as taken.
Definition: exec_context.hh:157
SimpleExecContext::writeMem
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.
Definition: exec_context.hh:454
ArmISA::VecElem
uint32_t VecElem
Definition: registers.hh:68
SimpleExecContext::getWritableVecRegOperand
VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Reads a vector register for modification.
Definition: exec_context.hh:226
SimpleThread::htmTransactionStops
int64_t htmTransactionStops
Definition: simple_thread.hh:140
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
SimpleExecContext::numInsts
Stats::Scalar numInsts
Definition: exec_context.hh:79
translation.hh
SimpleExecContext::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: exec_context.hh:588
SimpleThread::getTC
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
Definition: simple_thread.hh:169
SimpleExecContext::readVecLaneOperand
VecLaneT< VecElem, true > readVecLaneOperand(const StaticInst *si, int idx) const
Vector Register Lane Interfaces.
Definition: exec_context.hh:250
VecLaneT
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
SimpleExecContext::dcacheStallCycles
Stats::Scalar dcacheStallCycles
Definition: exec_context.hh:150
SimpleThread::getWritableVecPredReg
VecPredRegContainer & getWritableVecPredReg(const RegId &reg) override
Definition: simple_thread.hh:431
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:144
SimpleThread::setStCondFailures
void setStCondFailures(unsigned sc_failures) override
Definition: simple_thread.hh:577
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
MipsISA::vaddr
vaddr
Definition: pra_constants.hh:275
SimpleExecContext::readVec32BitLaneOperand
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
Definition: exec_context.hh:271
SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:539
SimpleExecContext::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: exec_context.hh:524
SimpleExecContext::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: exec_context.hh:564
ExecContext
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:70
BaseSimpleCPU::amoMem
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:162
SimpleExecContext::icacheStallCycles
Stats::Scalar icacheStallCycles
Definition: exec_context.hh:146
SimpleExecContext::readVec8BitLaneOperand
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 8bit operand.
Definition: exec_context.hh:259
SimpleExecContext::thread
SimpleThread * thread
Definition: exec_context.hh:64
SimpleExecContext::setVecRegOperand
void setVecRegOperand(const StaticInst *si, int idx, const VecRegContainer &val) override
Sets a vector register to a value.
Definition: exec_context.hh:236
BaseSimpleCPU::initiateMemAMO
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Definition: base.hh:167
SimpleExecContext::numFpRegReads
Stats::Scalar numFpRegReads
Definition: exec_context.hh:112
BaseSimpleCPU::initiateMemRead
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Definition: base.hh:150
SimpleThread::syscall
void syscall() override
Definition: simple_thread.hh:588
SimpleThread::readVecLane
VecLaneT< T, true > readVecLane(const RegId &reg) const
Vector Register Lane Interfaces.
Definition: simple_thread.hh:334
SimpleExecContext::numVecRegWrites
Stats::Scalar numVecRegWrites
Definition: exec_context.hh:117
SimpleThread::setVecElem
void setVecElem(const RegId &reg, const VecElem &val) override
Definition: simple_thread.hh:488
BaseSimpleCPU
Definition: base.hh:80
BaseCPU::getCpuAddrMonitor
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:599
SimpleExecContext::pcState
void pcState(const PCState &val) override
Definition: exec_context.hh:428
SimpleExecContext::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:382
SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:565
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:469
SimpleThread::readIntReg
RegVal readIntReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:286
SimpleExecContext::numMemRefs
Stats::Scalar numMemRefs
Definition: exec_context.hh:128
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
SimpleThread::setVecPredReg
void setVecPredReg(const RegId &reg, const VecPredRegContainer &val) override
Definition: simple_thread.hh:498
SimpleExecContext::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: exec_context.hh:554
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
SimpleThread::readFloatReg
RegVal readFloatReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:297
SimpleExecContext::readVecRegOperand
const VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Reads a vector register.
Definition: exec_context.hh:216
SimpleExecContext::numIntInsts
Stats::Scalar numIntInsts
Definition: exec_context.hh:99
SimpleExecContext::numOp
Counter numOp
Definition: exec_context.hh:80
SimpleExecContext::numVecRegReads
Stats::Scalar numVecRegReads
Definition: exec_context.hh:116
SimpleThread::setFloatReg
void setFloatReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:465
SimpleExecContext::mwait
bool mwait(PacketPtr pkt) override
Definition: exec_context.hh:576
SimpleThread::readVecPredReg
const VecPredRegContainer & readVecPredReg(const RegId &reg) const override
Definition: simple_thread.hh:420
SimpleExecContext::numCallsReturns
Stats::Scalar numCallsReturns
Definition: exec_context.hh:93
SimpleExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Write a lane of the destination vector operand.
Definition: exec_context.hh:299
SimpleExecContext::numLoad
Counter numLoad
Definition: exec_context.hh:139
SimpleExecContext::numBranches
Stats::Scalar numBranches
Definition: exec_context.hh:155
SimpleExecContext::idleFraction
Stats::Formula idleFraction
Definition: exec_context.hh:143
Stats::Average
A stat that calculates the per tick average of a value.
Definition: statistics.hh:2549
base.hh
SimpleExecContext::initiateMemRead
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.
Definition: exec_context.hh:444
SimpleExecContext::predPC
TheISA::PCState predPC
Definition: exec_context.hh:73
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:404
SimpleExecContext::numInst
Counter numInst
PER-THREAD STATS.
Definition: exec_context.hh:78
base.hh
SimpleExecContext::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: exec_context.hh:542
SimpleThread::htmTransactionStarts
int64_t htmTransactionStarts
Definition: simple_thread.hh:139
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
types.hh
SimpleExecContext::setIntRegOperand
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Definition: exec_context.hh:184
SimpleExecContext::numBusyCycles
Stats::Formula numBusyCycles
Definition: exec_context.hh:136
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:156
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3037
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
SimpleExecContext::numStoreInsts
Stats::Scalar numStoreInsts
Definition: exec_context.hh:130
SimpleThread::dtb
BaseTLB * dtb
Definition: simple_thread.hh:134
static_inst_fwd.hh
SimpleExecContext::setCCRegOperand
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:373
exec_context.hh
addr
ip6_addr_t addr
Definition: inet.hh:423
reg_class.hh
SimpleExecContext::fetchOffset
Addr fetchOffset
Definition: exec_context.hh:67
SimpleThread::threadId
int threadId() const override
Definition: simple_thread.hh:214
SimpleExecContext::readFloatRegOperandBits
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
Definition: exec_context.hh:195
Trace::InstRecord::setPredicate
void setPredicate(bool val)
Definition: insttracer.hh:226
SimpleExecContext::numCondCtrlInsts
Stats::Scalar numCondCtrlInsts
Definition: exec_context.hh:96
SimpleExecContext::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: exec_context.hh:391
ExecContext::VecElem
TheISA::VecElem VecElem
Definition: exec_context.hh:75
SimpleThread::setVecLane
virtual void setVecLane(const RegId &reg, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
Definition: simple_thread.hh:384
SimpleExecContext::numVecAluAccesses
Stats::Scalar numVecAluAccesses
Definition: exec_context.hh:90
SimpleExecContext::numFpAluAccesses
Stats::Scalar numFpAluAccesses
Definition: exec_context.hh:87
ThreadContext::getHtmCheckpointPtr
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
SimpleExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Write a lane of the destination vector operand.
Definition: exec_context.hh:309
SimpleExecContext::numBranchMispred
Stats::Scalar numBranchMispred
Number of misprediced branches.
Definition: exec_context.hh:159
SimpleExecContext::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: exec_context.hh:548
SimpleExecContext::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: exec_context.hh:536
SimpleExecContext::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
Definition: exec_context.hh:294
SimpleThread::readVecElem
const VecElem & readVecElem(const RegId &reg) const override
Definition: simple_thread.hh:409
SimpleExecContext::syscall
void syscall() override
Executes a syscall specified by the callnum.
Definition: exec_context.hh:502
SimpleExecContext::notIdleFraction
Stats::Average notIdleFraction
Definition: exec_context.hh:142
SimpleExecContext::readMem
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.
Definition: exec_context.hh:434
LaneData
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Definition: vec_reg.hh:458
SimpleExecContext::numVecPredRegReads
Stats::Scalar numVecPredRegReads
Definition: exec_context.hh:120
SimpleExecContext::readCCRegOperand
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Definition: exec_context.hh:364
SimpleExecContext::stayAtPC
bool stayAtPC
Definition: exec_context.hh:70
RegVal
uint64_t RegVal
Definition: types.hh:168
SimpleExecContext::setFloatRegOperandBits
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.
Definition: exec_context.hh:206
SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:529
VecRegContainer
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition: vec_reg.hh:156
SimpleExecContext::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: exec_context.hh:505
SimpleExecContext::statExecutedInstType
Stats::Vector statExecutedInstType
Definition: exec_context.hh:163
SimpleExecContext::numCCRegWrites
Stats::Scalar numCCRegWrites
Definition: exec_context.hh:125
SimpleExecContext::lastIcacheStall
Counter lastIcacheStall
Definition: exec_context.hh:147
SimpleExecContext::SimpleExecContext
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Definition: exec_context.hh:167

Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17