gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cpu.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011, 2016-2018, 2020 ARM Limited
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Copyright (c) 2006 The Regents of The University of Michigan
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
42 #ifndef __CPU_CHECKER_CPU_HH__
43 #define __CPU_CHECKER_CPU_HH__
44 
45 #include <list>
46 #include <map>
47 #include <queue>
48 
49 #include "arch/types.hh"
50 #include "base/statistics.hh"
51 #include "cpu/base.hh"
52 #include "cpu/base_dyn_inst.hh"
53 #include "cpu/exec_context.hh"
54 #include "cpu/inst_res.hh"
55 #include "cpu/pc_event.hh"
56 #include "cpu/simple_thread.hh"
57 #include "cpu/static_inst.hh"
58 #include "debug/Checker.hh"
59 #include "mem/request.hh"
60 #include "params/CheckerCPU.hh"
61 #include "sim/eventq.hh"
62 
63 class BaseTLB;
64 template <class>
65 class BaseDynInst;
66 class ThreadContext;
67 class Request;
68 
85 class CheckerCPU : public BaseCPU, public ExecContext
86 {
87  protected:
90 
91  public:
92  void init() override;
93 
95  CheckerCPU(const Params &p);
96  virtual ~CheckerCPU();
97 
98  void setSystem(System *system);
99 
100  void setIcachePort(RequestPort *icache_port);
101 
102  void setDcachePort(RequestPort *dcache_port);
103 
104  Port &
105  getDataPort() override
106  {
107  // the checker does not have ports on its own so return the
108  // data port of the actual CPU core
109  assert(dcachePort);
110  return *dcachePort;
111  }
112 
113  Port &
114  getInstPort() override
115  {
116  // the checker does not have ports on its own so return the
117  // data port of the actual CPU core
118  assert(icachePort);
119  return *icachePort;
120  }
121 
122  protected:
123 
125 
127 
130 
132 
134 
135  // ISAs like ARM can have multiple destination registers to check,
136  // keep them all in a std::queue
137  std::queue<InstResult> result;
138 
141 
142  // number of simulated instructions
145 
146  std::queue<int> miscRegIdxs;
147 
148  public:
149 
150  // Primary thread being run.
152 
153  BaseMMU* getMMUPtr() { return mmu; }
154 
155  virtual Counter totalInsts() const override
156  {
157  return 0;
158  }
159 
160  virtual Counter totalOps() const override
161  {
162  return 0;
163  }
164 
165  // number of simulated loads
168 
169  void serialize(CheckpointOut &cp) const override;
170  void unserialize(CheckpointIn &cp) override;
171 
172  // The register accessor methods provide the index of the
173  // instruction's operand (e.g., 0 or 1), not the architectural
174  // register index, to simplify the implementation of register
175  // renaming. We find the architectural register index by indexing
176  // into the instruction's own operand index table. Note that a
177  // raw pointer to the StaticInst is provided instead of a
178  // ref-counted StaticInstPtr to redice overhead. This is fine as
179  // long as these methods don't copy the pointer into any long-term
180  // storage (which is pretty hard to imagine they would have reason
181  // to do).
182 
183  RegVal
184  readIntRegOperand(const StaticInst *si, int idx) override
185  {
186  const RegId& reg = si->srcRegIdx(idx);
187  assert(reg.isIntReg());
188  return thread->readIntReg(reg.index());
189  }
190 
191  RegVal
192  readFloatRegOperandBits(const StaticInst *si, int idx) override
193  {
194  const RegId& reg = si->srcRegIdx(idx);
195  assert(reg.isFloatReg());
196  return thread->readFloatReg(reg.index());
197  }
198 
203  readVecRegOperand(const StaticInst *si, int idx) const override
204  {
205  const RegId& reg = si->srcRegIdx(idx);
206  assert(reg.isVecReg());
207  return thread->readVecReg(reg);
208  }
209 
214  getWritableVecRegOperand(const StaticInst *si, int idx) override
215  {
216  const RegId& reg = si->destRegIdx(idx);
217  assert(reg.isVecReg());
218  return thread->getWritableVecReg(reg);
219  }
220 
224  virtual ConstVecLane8
225  readVec8BitLaneOperand(const StaticInst *si, int idx) const override
226  {
227  const RegId& reg = si->destRegIdx(idx);
228  assert(reg.isVecReg());
229  return thread->readVec8BitLaneReg(reg);
230  }
231 
233  virtual ConstVecLane16
234  readVec16BitLaneOperand(const StaticInst *si, int idx) const override
235  {
236  const RegId& reg = si->destRegIdx(idx);
237  assert(reg.isVecReg());
238  return thread->readVec16BitLaneReg(reg);
239  }
240 
242  virtual ConstVecLane32
243  readVec32BitLaneOperand(const StaticInst *si, int idx) const override
244  {
245  const RegId& reg = si->destRegIdx(idx);
246  assert(reg.isVecReg());
247  return thread->readVec32BitLaneReg(reg);
248  }
249 
251  virtual ConstVecLane64
252  readVec64BitLaneOperand(const StaticInst *si, int idx) const override
253  {
254  const RegId& reg = si->destRegIdx(idx);
255  assert(reg.isVecReg());
256  return thread->readVec64BitLaneReg(reg);
257  }
258 
260  template <typename LD>
261  void
262  setVecLaneOperandT(const StaticInst *si, int idx, const LD& val)
263  {
264  const RegId& reg = si->destRegIdx(idx);
265  assert(reg.isVecReg());
266  return thread->setVecLane(reg, val);
267  }
268  virtual void
269  setVecLaneOperand(const StaticInst *si, int idx,
270  const LaneData<LaneSize::Byte>& val) override
271  {
272  setVecLaneOperandT(si, idx, val);
273  }
274  virtual void
275  setVecLaneOperand(const StaticInst *si, int idx,
276  const LaneData<LaneSize::TwoByte>& val) override
277  {
278  setVecLaneOperandT(si, idx, val);
279  }
280  virtual void
281  setVecLaneOperand(const StaticInst *si, int idx,
282  const LaneData<LaneSize::FourByte>& val) override
283  {
284  setVecLaneOperandT(si, idx, val);
285  }
286  virtual void
287  setVecLaneOperand(const StaticInst *si, int idx,
288  const LaneData<LaneSize::EightByte>& val) override
289  {
290  setVecLaneOperandT(si, idx, val);
291  }
295  readVecElemOperand(const StaticInst *si, int idx) const override
296  {
297  const RegId& reg = si->srcRegIdx(idx);
298  return thread->readVecElem(reg);
299  }
300 
302  readVecPredRegOperand(const StaticInst *si, int idx) const override
303  {
304  const RegId& reg = si->srcRegIdx(idx);
305  assert(reg.isVecPredReg());
306  return thread->readVecPredReg(reg);
307  }
308 
310  getWritableVecPredRegOperand(const StaticInst *si, int idx) override
311  {
312  const RegId& reg = si->destRegIdx(idx);
313  assert(reg.isVecPredReg());
315  }
316 
317  RegVal
318  readCCRegOperand(const StaticInst *si, int idx) override
319  {
320  const RegId& reg = si->srcRegIdx(idx);
321  assert(reg.isCCReg());
322  return thread->readCCReg(reg.index());
323  }
324 
325  template<typename T>
326  void
328  {
329  result.push(InstResult(std::forward<T>(t),
331  }
332 
333  template<typename T>
334  void
336  {
337  result.push(InstResult(std::forward<T>(t),
339  }
340 
341  template<typename T>
342  void
344  {
345  result.push(InstResult(std::forward<T>(t),
347  }
348 
349  template<typename T>
350  void
352  {
353  result.push(InstResult(std::forward<T>(t),
355  }
356 
357  void
358  setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
359  {
360  const RegId& reg = si->destRegIdx(idx);
361  assert(reg.isIntReg());
362  thread->setIntReg(reg.index(), val);
364  }
365 
366  void
367  setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
368  {
369  const RegId& reg = si->destRegIdx(idx);
370  assert(reg.isFloatReg());
371  thread->setFloatReg(reg.index(), val);
373  }
374 
375  void
376  setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
377  {
378  const RegId& reg = si->destRegIdx(idx);
379  assert(reg.isCCReg());
380  thread->setCCReg(reg.index(), val);
381  setScalarResult((uint64_t)val);
382  }
383 
384  void
385  setVecRegOperand(const StaticInst *si, int idx,
386  const TheISA::VecRegContainer& val) override
387  {
388  const RegId& reg = si->destRegIdx(idx);
389  assert(reg.isVecReg());
390  thread->setVecReg(reg, val);
391  setVecResult(val);
392  }
393 
394  void
395  setVecElemOperand(const StaticInst *si, int idx,
396  const TheISA::VecElem val) override
397  {
398  const RegId& reg = si->destRegIdx(idx);
399  assert(reg.isVecElem());
402  }
403 
404  void setVecPredRegOperand(const StaticInst *si, int idx,
405  const TheISA::VecPredRegContainer& val) override
406  {
407  const RegId& reg = si->destRegIdx(idx);
408  assert(reg.isVecPredReg());
411  }
412 
413  bool readPredicate() const override { return thread->readPredicate(); }
414 
415  void
416  setPredicate(bool val) override
417  {
419  }
420 
421  bool
422  readMemAccPredicate() const override
423  {
424  return thread->readMemAccPredicate();
425  }
426 
427  void
428  setMemAccPredicate(bool val) override
429  {
431  }
432 
433  uint64_t
434  getHtmTransactionUid() const override
435  {
436  panic("not yet supported!");
437  return 0;
438  };
439 
440  uint64_t
441  newHtmTransactionUid() const override
442  {
443  panic("not yet supported!");
444  return 0;
445  };
446 
447  Fault
449  {
450  panic("not yet supported!");
451  return NoFault;
452  }
453 
454  bool
455  inHtmTransactionalState() const override
456  {
457  panic("not yet supported!");
458  return false;
459  }
460 
461  uint64_t
462  getHtmTransactionalDepth() const override
463  {
464  panic("not yet supported!");
465  return 0;
466  }
467 
468  TheISA::PCState pcState() const override { return thread->pcState(); }
469  void
470  pcState(const TheISA::PCState &val) override
471  {
472  DPRINTF(Checker, "Changing PC to %s, old PC %s.\n",
473  val, thread->pcState());
474  thread->pcState(val);
475  }
476  Addr instAddr() { return thread->instAddr(); }
478  MicroPC microPC() { return thread->microPC(); }
480 
481  RegVal
482  readMiscRegNoEffect(int misc_reg) const
483  {
484  return thread->readMiscRegNoEffect(misc_reg);
485  }
486 
487  RegVal
488  readMiscReg(int misc_reg) override
489  {
490  return thread->readMiscReg(misc_reg);
491  }
492 
493  void
495  {
496  DPRINTF(Checker, "Setting misc reg %d with no effect to check later\n",
497  misc_reg);
498  miscRegIdxs.push(misc_reg);
499  return thread->setMiscRegNoEffect(misc_reg, val);
500  }
501 
502  void
503  setMiscReg(int misc_reg, RegVal val) override
504  {
505  DPRINTF(Checker, "Setting misc reg %d with effect to check later\n",
506  misc_reg);
507  miscRegIdxs.push(misc_reg);
508  return thread->setMiscReg(misc_reg, val);
509  }
510 
511  RegVal
512  readMiscRegOperand(const StaticInst *si, int idx) override
513  {
514  const RegId& reg = si->srcRegIdx(idx);
515  assert(reg.isMiscReg());
516  return thread->readMiscReg(reg.index());
517  }
518 
519  void
520  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
521  {
522  const RegId& reg = si->destRegIdx(idx);
523  assert(reg.isMiscReg());
524  return this->setMiscReg(reg.index(), val);
525  }
526 
528 
529  void
531  {
532  changedPC = true;
533  newPCState = val;
534  }
535 
536  void
537  demapPage(Addr vaddr, uint64_t asn) override
538  {
539  mmu->demapPage(vaddr, asn);
540  }
541 
542  // monitor/mwait funtions
543  void armMonitor(Addr address) override { BaseCPU::armMonitor(0, address); }
544  bool mwait(PacketPtr pkt) override { return BaseCPU::mwait(0, pkt); }
545 
546  void
548  {
549  return BaseCPU::mwaitAtomic(0, tc, thread->mmu);
550  }
551 
553  { return BaseCPU::getCpuAddrMonitor(0); }
554 
571  RequestPtr genMemFragmentRequest(Addr frag_addr, int size,
572  Request::Flags flags,
573  const std::vector<bool>& byte_enable,
574  int& frag_size, int& size_left) const;
575 
576  Fault readMem(Addr addr, uint8_t *data, unsigned size,
577  Request::Flags flags,
578  const std::vector<bool>& byte_enable)
579  override;
580 
581  Fault writeMem(uint8_t *data, unsigned size, Addr addr,
582  Request::Flags flags, uint64_t *res,
583  const std::vector<bool>& byte_enable)
584  override;
585 
586  Fault amoMem(Addr addr, uint8_t* data, unsigned size,
587  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
588  {
589  panic("AMO is not supported yet in CPU checker\n");
590  }
591 
592  unsigned int
593  readStCondFailures() const override {
594  return thread->readStCondFailures();
595  }
596 
597  void setStCondFailures(unsigned int sc_failures) override {}
599 
600  void wakeup(ThreadID tid) override { }
601 
602  void
604  {
605  if (exitOnError)
606  dumpAndExit();
607  }
608 
609  bool checkFlags(const RequestPtr &unverified_req, Addr vAddr,
610  Addr pAddr, int flags);
611 
612  void dumpAndExit();
613 
614  ThreadContext *tcBase() const override { return tc; }
616 
620 
621  bool changedPC;
627 
629 };
630 
637 template <class Impl>
638 class Checker : public CheckerCPU
639 {
640  private:
641  typedef typename Impl::DynInstPtr DynInstPtr;
642 
643  public:
644  Checker(const Params &p)
645  : CheckerCPU(p), updateThisCycle(false), unverifiedInst(NULL)
646  { }
647 
648  void switchOut();
649  void takeOverFrom(BaseCPU *oldCPU);
650 
651  void advancePC(const Fault &fault);
652 
653  void verify(const DynInstPtr &inst);
654 
655  void validateInst(const DynInstPtr &inst);
656  void validateExecution(const DynInstPtr &inst);
657  void validateState();
658 
659  void copyResult(const DynInstPtr &inst, const InstResult& mismatch_val,
660  int start_idx);
661  void handlePendingInt();
662 
663  private:
664  void handleError(const DynInstPtr &inst)
665  {
666  if (exitOnError) {
667  dumpAndExit(inst);
668  } else if (updateOnError) {
669  updateThisCycle = true;
670  }
671  }
672 
673  void dumpAndExit(const DynInstPtr &inst);
674 
676 
678 
681  void dumpInsts();
682 };
683 
684 #endif // __CPU_CHECKER_CPU_HH__
CheckerCPU::readVecElemOperand
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
Definition: cpu.hh:295
CheckerCPU::readMiscReg
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Definition: cpu.hh:488
InstResult
Definition: inst_res.hh:46
CheckerCPU::startNumInst
Counter startNumInst
Definition: cpu.hh:144
BaseCPU::mwait
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:214
CheckerCPU::readVec16BitLaneOperand
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
Definition: cpu.hh:234
AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:239
SimpleThread::setVecReg
void setVecReg(const RegId &reg, const TheISA::VecRegContainer &val) override
Definition: simple_thread.hh:465
CheckerCPU::result
std::queue< InstResult > result
Definition: cpu.hh:137
BaseCPU::mwaitAtomic
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
Definition: base.cc:237
SimpleThread::getWritableVecPredReg
TheISA::VecPredRegContainer & getWritableVecPredReg(const RegId &reg) override
Definition: simple_thread.hh:417
SimpleThread::pcState
TheISA::PCState pcState() const override
Definition: simple_thread.hh:505
SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:559
CheckerCPU::setMiscReg
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Definition: cpu.hh:503
BaseMMU
Definition: mmu.hh:45
data
const char data[]
Definition: circlebuf.test.cc:47
ArmISA::VecRegContainer
VecReg::Container VecRegContainer
Definition: registers.hh:63
CheckerCPU::thread
SimpleThread * thread
Definition: cpu.hh:151
CheckerCPU::readCCRegOperand
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:318
CheckerCPU::serialize
void serialize(CheckpointOut &cp) const override
Serialize this object to the given output stream.
Definition: cpu.cc:124
CheckerCPU::amoMem
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Definition: cpu.hh:586
StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:85
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:233
SimpleThread::readVec8BitLaneReg
virtual ConstVecLane8 readVec8BitLaneReg(const RegId &reg) const override
Reads source vector 8bit operand.
Definition: simple_thread.hh:330
InstResult::ResultType::VecElem
@ VecElem
CheckerCPU::startNumLoad
Counter startNumLoad
Definition: cpu.hh:167
CheckerCPU::setVecResult
void setVecResult(T &&t)
Definition: cpu.hh:335
Flags< FlagsType >
CheckerCPU::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: cpu.hh:367
ArmISA::si
Bitfield< 6 > si
Definition: miscregs_types.hh:766
CheckerCPU::readMiscRegNoEffect
RegVal readMiscRegNoEffect(int misc_reg) const
Definition: cpu.hh:482
CheckerCPU::getWritableVecRegOperand
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Read destination vector register operand for modification.
Definition: cpu.hh:214
base_dyn_inst.hh
SimpleThread::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Definition: simple_thread.hh:521
CheckerCPU::workload
std::vector< Process * > workload
Definition: cpu.hh:124
SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:518
SimpleThread::readVec16BitLaneReg
virtual ConstVecLane16 readVec16BitLaneReg(const RegId &reg) const override
Reads source vector 16bit operand.
Definition: simple_thread.hh:337
CheckerCPU::setSystem
void setSystem(System *system)
Definition: cpu.cc:91
CheckerCPU::setMiscRegNoEffect
void setMiscRegNoEffect(int misc_reg, RegVal val)
Definition: cpu.hh:494
CheckerCPU::readVec32BitLaneOperand
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
Definition: cpu.hh:243
CheckerCPU::getInstPort
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
Definition: cpu.hh:114
CheckerCPU::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: cpu.hh:434
BaseCPU::armMonitor
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:202
ArmISA::VecPredRegContainer
VecPredReg::Container VecPredRegContainer
Definition: registers.hh:69
SimpleThread::setIntReg
void setIntReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:442
Checker
Templated Checker class.
Definition: cpu.hh:638
CheckerCPU::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: cpu.hh:455
SimpleThread::setCCReg
void setCCReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:496
CheckerCPU::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:512
SimpleThread::mmu
BaseMMU * mmu
Definition: simple_thread.hh:130
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:86
SimpleThread::readVec64BitLaneReg
virtual ConstVecLane64 readVec64BitLaneReg(const RegId &reg) const override
Reads source vector 64bit operand.
Definition: simple_thread.hh:351
CheckerCPU
CheckerCPU class.
Definition: cpu.hh:85
std::vector< Process * >
CheckerCPU::setVecPredResult
void setVecPredResult(T &&t)
Definition: cpu.hh:351
InstResult::ResultType::VecReg
@ VecReg
Checker::validateInst
void validateInst(const DynInstPtr &inst)
Definition: cpu_impl.hh:446
SimpleThread::readVecPredReg
const TheISA::VecPredRegContainer & readVecPredReg(const RegId &reg) const override
Definition: simple_thread.hh:405
CheckerCPU::numInst
Counter numInst
Definition: cpu.hh:143
Checker::validateExecution
void validateExecution(const DynInstPtr &inst)
Definition: cpu_impl.hh:467
SimpleThread::readCCReg
RegVal readCCReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:430
CheckerCPU::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: cpu.hh:441
inst_res.hh
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:88
CheckerCPU::readVecRegOperand
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Read source vector register operand.
Definition: cpu.hh:203
CheckerCPU::recordPCChange
void recordPCChange(const TheISA::PCState &val)
Definition: cpu.hh:530
request.hh
CheckerCPU::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: cpu.hh:537
BaseTLB
Definition: tlb.hh:50
Checker::validateState
void validateState()
Definition: cpu_impl.hh:560
CheckerCPU::~CheckerCPU
virtual ~CheckerCPU()
Definition: cpu.cc:86
CheckerCPU::setScalarResult
void setScalarResult(T &&t)
Definition: cpu.hh:327
AddressMonitor
Definition: base.hh:70
SimpleThread::readStCondFailures
unsigned readStCondFailures() const override
Definition: simple_thread.hh:550
SimpleThread::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:533
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
SimpleThread::getWritableVecReg
TheISA::VecRegContainer & getWritableVecReg(const RegId &reg) override
Definition: simple_thread.hh:303
CheckerCPU::warnOnlyOnLoadError
bool warnOnlyOnLoadError
Definition: cpu.hh:626
CheckerCPU::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: cpu.cc:56
Checker::switchOut
void switchOut()
Prepare for another CPU to take over execution.
Definition: cpu_impl.hh:433
SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:90
SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:539
Checker::dumpInsts
void dumpInsts()
Definition: cpu_impl.hh:678
CheckerCPU::newPCState
TheISA::PCState newPCState
Definition: cpu.hh:623
CheckerCPU::setVecElemOperand
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets a vector register to a value.
Definition: cpu.hh:395
CheckerCPU::dcachePort
RequestPort * dcachePort
Definition: cpu.hh:129
CheckerCPU::curStaticInst
StaticInstPtr curStaticInst
Definition: cpu.hh:139
CheckerCPU::numLoad
Counter numLoad
Definition: cpu.hh:166
RequestorID
uint16_t RequestorID
Definition: request.hh:89
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:54
CheckerCPU::getDataPort
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
Definition: cpu.hh:105
CheckerCPU::readFloatRegOperandBits
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
Definition: cpu.hh:192
CheckerCPU::youngestSN
InstSeqNum youngestSN
Definition: cpu.hh:628
CheckerCPU::setIntRegOperand
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Definition: cpu.hh:358
ArmISA::VecElem
uint32_t VecElem
Definition: registers.hh:60
CheckerCPU::armMonitor
void armMonitor(Addr address) override
Definition: cpu.hh:543
cp
Definition: cprintf.cc:37
CheckerCPU::readVecPredRegOperand
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
Definition: cpu.hh:302
CheckerCPU::unserialize
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
Definition: cpu.cc:129
CheckerCPU::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:520
CheckerCPU::handleError
void handleError()
Definition: cpu.hh:603
CheckerCPU::dumpAndExit
void dumpAndExit()
Definition: cpu.cc:367
SimpleThread::instAddr
Addr instAddr() const override
Definition: simple_thread.hh:514
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
ClockedObject::Params
ClockedObjectParams Params
Parameters of ClockedObject.
Definition: clocked_object.hh:237
CheckerCPU::PARAMS
PARAMS(CheckerCPU)
VecLaneT
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
Checker::Checker
Checker(const Params &p)
Definition: cpu.hh:644
System
Definition: system.hh:73
CheckerCPU::setCCRegOperand
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:376
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:237
Checker::handleError
void handleError(const DynInstPtr &inst)
Definition: cpu.hh:664
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:246
MipsISA::vaddr
vaddr
Definition: pra_constants.hh:275
CheckerCPU::setVecPredRegOperand
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
Definition: cpu.hh:404
Checker::updateThisCycle
bool updateThisCycle
Definition: cpu.hh:675
statistics.hh
SimpleThread::setVecElem
void setVecElem(const RegId &reg, const TheISA::VecElem &val) override
Definition: simple_thread.hh:475
CheckerCPU::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: cpu.hh:547
CheckerCPU::setPredicate
void setPredicate(bool val) override
Definition: cpu.hh:416
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
CheckerCPU::writeMem
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
Definition: cpu.cc:245
InstResult::ResultType::Scalar
@ Scalar
CheckerCPU::setIcachePort
void setIcachePort(RequestPort *icache_port)
Definition: cpu.cc:112
SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:527
SimpleThread::readVec32BitLaneReg
virtual ConstVecLane32 readVec32BitLaneReg(const RegId &reg) const override
Reads source vector 32bit operand.
Definition: simple_thread.hh:344
Checker::advancePC
void advancePC(const Fault &fault)
Definition: cpu_impl.hh:64
CheckerCPU::readVec8BitLaneOperand
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
Definition: cpu.hh:225
ExecContext
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:70
BaseDynInst
Definition: base_dyn_inst.hh:77
CheckerCPU::changedPC
bool changedPC
Definition: cpu.hh:621
SimpleThread::setVecPredReg
void setVecPredReg(const RegId &reg, const TheISA::VecPredRegContainer &val) override
Definition: simple_thread.hh:485
CheckerCPU::miscRegIdxs
std::queue< int > miscRegIdxs
Definition: cpu.hh:146
CheckerCPU::getWritableVecPredRegOperand
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
Definition: cpu.hh:310
static_inst.hh
BaseCPU::getCpuAddrMonitor
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:618
SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:553
CheckerCPU::unverifiedReq
RequestPtr unverifiedReq
Definition: cpu.hh:618
SimpleThread::readIntReg
RegVal readIntReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:270
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
Checker::DynInstPtr
Impl::DynInstPtr DynInstPtr
Definition: cpu.hh:641
SimpleThread::nextInstAddr
Addr nextInstAddr() const override
Definition: simple_thread.hh:515
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Definition: cpu.hh:287
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
InstSeqNum
uint64_t InstSeqNum
Definition: inst_seq.hh:37
NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:251
CheckerCPU::requestorId
RequestorID requestorId
id attached to all issued requests
Definition: cpu.hh:89
CheckerCPU::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: cpu.hh:593
CheckerCPU::totalOps
virtual Counter totalOps() const override
Definition: cpu.hh:160
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
Definition: cpu.hh:269
CheckerCPU::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: cpu.hh:428
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
SimpleThread::readFloatReg
RegVal readFloatReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:281
SimpleThread::microPC
MicroPC microPC() const override
Definition: simple_thread.hh:516
CheckerCPU::checkFlags
bool checkFlags(const RequestPtr &unverified_req, Addr vAddr, Addr pAddr, int flags)
Checks if the flags set by the Checker and Checkee match.
Definition: cpu.cc:350
Request
Definition: request.hh:91
CheckerCPU::totalInsts
virtual Counter totalInsts() const override
Definition: cpu.hh:155
SimpleThread::setFloatReg
void setFloatReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:452
Checker::takeOverFrom
void takeOverFrom(BaseCPU *oldCPU)
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
Definition: cpu_impl.hh:440
Checker::verify
void verify(const DynInstPtr &inst)
Definition: cpu_impl.hh:119
CheckerCPU::setVecElemResult
void setVecElemResult(T &&t)
Definition: cpu.hh:343
CheckerCPU::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: cpu.hh:614
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:80
BaseCPU
Definition: base.hh:104
CheckerCPU::wakeup
void wakeup(ThreadID tid) override
Definition: cpu.hh:600
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Definition: cpu.hh:275
CheckerCPU::readMem
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Definition: cpu.cc:161
CheckerCPU::systemPtr
System * systemPtr
Definition: cpu.hh:126
CheckerCPU::setVecRegOperand
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Sets a destination vector register operand to a value.
Definition: cpu.hh:385
CheckerCPU::readPredicate
bool readPredicate() const override
Definition: cpu.hh:413
simple_thread.hh
CheckerCPU::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: cpu.hh:422
base.hh
CheckerCPU::nextInstAddr
Addr nextInstAddr()
Definition: cpu.hh:477
pc_event.hh
BaseMMU::demapPage
void demapPage(Addr vaddr, uint64_t asn)
Definition: mmu.hh:72
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
CheckerCPU::curMacroStaticInst
StaticInstPtr curMacroStaticInst
Definition: cpu.hh:140
BaseCPU::system
System * system
Definition: base.hh:386
SimpleThread::readVecReg
const TheISA::VecRegContainer & readVecReg(const RegId &reg) const override
Definition: simple_thread.hh:292
CheckerCPU::instAddr
Addr instAddr()
Definition: cpu.hh:476
Checker::copyResult
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
Definition: cpu_impl.hh:585
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
Checker::InstListIt
std::list< DynInstPtr >::iterator InstListIt
Definition: cpu.hh:680
CheckerCPU::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: cpu.hh:462
CheckerCPU::updateOnError
bool updateOnError
Definition: cpu.hh:625
Checker::unverifiedInst
DynInstPtr unverifiedInst
Definition: cpu.hh:677
InstResult::ResultType::VecPredReg
@ VecPredReg
exec_context.hh
CheckerCPU::unverifiedResult
InstResult unverifiedResult
Definition: cpu.hh:617
CheckerCPU::setDcachePort
void setDcachePort(RequestPort *dcache_port)
Definition: cpu.cc:118
CheckerCPU::setVecLaneOperandT
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
Definition: cpu.hh:262
CheckerCPU::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: cpu.hh:552
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:64
CheckerCPU::willChangePC
bool willChangePC
Definition: cpu.hh:622
RefCountingPtr< StaticInst >
CheckerCPU::icachePort
RequestPort * icachePort
Definition: cpu.hh:128
RegId::index
const RegIndex & index() const
Index accessors.
Definition: reg_class.hh:171
CheckerCPU::tc
ThreadContext * tc
Definition: cpu.hh:131
CheckerCPU::CheckerCPU
CheckerCPU(const Params &p)
Definition: cpu.cc:61
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:368
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< DynInstPtr >
MicroPC
uint16_t MicroPC
Definition: types.hh:150
CheckerCPU::readIntRegOperand
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Definition: cpu.hh:184
CheckerCPU::initiateHtmCmd
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
Definition: cpu.hh:448
Checker::instList
std::list< DynInstPtr > instList
Definition: cpu.hh:679
CheckpointIn
Definition: serialize.hh:68
CheckerCPU::genMemFragmentRequest
RequestPtr genMemFragmentRequest(Addr frag_addr, int size, Request::Flags flags, const std::vector< bool > &byte_enable, int &frag_size, int &size_left) const
Helper function used to generate the request for a single fragment of a memory access.
Definition: cpu.cc:134
CheckerCPU::setStCondFailures
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: cpu.hh:597
SimpleThread::readVecElem
const TheISA::VecElem & readVecElem(const RegId &reg) const override
Definition: simple_thread.hh:393
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Definition: cpu.hh:281
LaneData
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Definition: vec_reg.hh:458
CheckerCPU::readVec64BitLaneOperand
virtual ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
Definition: cpu.hh:252
CheckerCPU::pcState
void pcState(const TheISA::PCState &val) override
Definition: cpu.hh:470
RegVal
uint64_t RegVal
Definition: types.hh:174
SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:517
Checker::handlePendingInt
void handlePendingInt()
Definition: cpu_impl.hh:85
CheckerCPU::threadBase
SimpleThread * threadBase()
Definition: cpu.hh:615
CheckerCPU::pcState
TheISA::PCState pcState() const override
Definition: cpu.hh:468
CheckerCPU::getMMUPtr
BaseMMU * getMMUPtr()
Definition: cpu.hh:153
CheckerCPU::unverifiedMemData
uint8_t * unverifiedMemData
Definition: cpu.hh:619
CheckerCPU::microPC
MicroPC microPC()
Definition: cpu.hh:478
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
CheckerCPU::mmu
BaseMMU * mmu
Definition: cpu.hh:133
CheckerCPU::mwait
bool mwait(PacketPtr pkt) override
Definition: cpu.hh:544
CheckerCPU::exitOnError
bool exitOnError
Definition: cpu.hh:624
eventq.hh

Generated on Tue Jun 22 2021 15:28:19 for gem5 by doxygen 1.8.17