gem5  v20.1.0.0
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 
93  public:
94  void init() override;
95 
96  typedef CheckerCPUParams Params;
98  virtual ~CheckerCPU();
99 
100  void setSystem(System *system);
101 
102  void setIcachePort(RequestPort *icache_port);
103 
104  void setDcachePort(RequestPort *dcache_port);
105 
106  Port &
107  getDataPort() override
108  {
109  // the checker does not have ports on its own so return the
110  // data port of the actual CPU core
111  assert(dcachePort);
112  return *dcachePort;
113  }
114 
115  Port &
116  getInstPort() override
117  {
118  // the checker does not have ports on its own so return the
119  // data port of the actual CPU core
120  assert(icachePort);
121  return *icachePort;
122  }
123 
124  protected:
125 
127 
129 
132 
134 
137 
138  // ISAs like ARM can have multiple destination registers to check,
139  // keep them all in a std::queue
140  std::queue<InstResult> result;
141 
144 
145  // number of simulated instructions
148 
149  std::queue<int> miscRegIdxs;
150 
151  public:
152 
153  // Primary thread being run.
155 
156  BaseTLB* getITBPtr() { return itb; }
157  BaseTLB* getDTBPtr() { return dtb; }
158 
159  virtual Counter totalInsts() const override
160  {
161  return 0;
162  }
163 
164  virtual Counter totalOps() const override
165  {
166  return 0;
167  }
168 
169  // number of simulated loads
172 
173  void serialize(CheckpointOut &cp) const override;
174  void unserialize(CheckpointIn &cp) override;
175 
176  // The register accessor methods provide the index of the
177  // instruction's operand (e.g., 0 or 1), not the architectural
178  // register index, to simplify the implementation of register
179  // renaming. We find the architectural register index by indexing
180  // into the instruction's own operand index table. Note that a
181  // raw pointer to the StaticInst is provided instead of a
182  // ref-counted StaticInstPtr to redice overhead. This is fine as
183  // long as these methods don't copy the pointer into any long-term
184  // storage (which is pretty hard to imagine they would have reason
185  // to do).
186 
187  RegVal
188  readIntRegOperand(const StaticInst *si, int idx) override
189  {
190  const RegId& reg = si->srcRegIdx(idx);
191  assert(reg.isIntReg());
192  return thread->readIntReg(reg.index());
193  }
194 
195  RegVal
196  readFloatRegOperandBits(const StaticInst *si, int idx) override
197  {
198  const RegId& reg = si->srcRegIdx(idx);
199  assert(reg.isFloatReg());
200  return thread->readFloatReg(reg.index());
201  }
202 
206  const VecRegContainer &
207  readVecRegOperand(const StaticInst *si, int idx) const override
208  {
209  const RegId& reg = si->srcRegIdx(idx);
210  assert(reg.isVecReg());
211  return thread->readVecReg(reg);
212  }
213 
218  getWritableVecRegOperand(const StaticInst *si, int idx) override
219  {
220  const RegId& reg = si->destRegIdx(idx);
221  assert(reg.isVecReg());
222  return thread->getWritableVecReg(reg);
223  }
224 
228  virtual ConstVecLane8
229  readVec8BitLaneOperand(const StaticInst *si, int idx) const override
230  {
231  const RegId& reg = si->destRegIdx(idx);
232  assert(reg.isVecReg());
233  return thread->readVec8BitLaneReg(reg);
234  }
235 
237  virtual ConstVecLane16
238  readVec16BitLaneOperand(const StaticInst *si, int idx) const override
239  {
240  const RegId& reg = si->destRegIdx(idx);
241  assert(reg.isVecReg());
242  return thread->readVec16BitLaneReg(reg);
243  }
244 
246  virtual ConstVecLane32
247  readVec32BitLaneOperand(const StaticInst *si, int idx) const override
248  {
249  const RegId& reg = si->destRegIdx(idx);
250  assert(reg.isVecReg());
251  return thread->readVec32BitLaneReg(reg);
252  }
253 
255  virtual ConstVecLane64
256  readVec64BitLaneOperand(const StaticInst *si, int idx) const override
257  {
258  const RegId& reg = si->destRegIdx(idx);
259  assert(reg.isVecReg());
260  return thread->readVec64BitLaneReg(reg);
261  }
262 
264  template <typename LD>
265  void
266  setVecLaneOperandT(const StaticInst *si, int idx, const LD& val)
267  {
268  const RegId& reg = si->destRegIdx(idx);
269  assert(reg.isVecReg());
270  return thread->setVecLane(reg, val);
271  }
272  virtual void
273  setVecLaneOperand(const StaticInst *si, int idx,
274  const LaneData<LaneSize::Byte>& val) override
275  {
276  setVecLaneOperandT(si, idx, val);
277  }
278  virtual void
279  setVecLaneOperand(const StaticInst *si, int idx,
280  const LaneData<LaneSize::TwoByte>& val) override
281  {
282  setVecLaneOperandT(si, idx, val);
283  }
284  virtual void
285  setVecLaneOperand(const StaticInst *si, int idx,
286  const LaneData<LaneSize::FourByte>& val) override
287  {
288  setVecLaneOperandT(si, idx, val);
289  }
290  virtual void
291  setVecLaneOperand(const StaticInst *si, int idx,
292  const LaneData<LaneSize::EightByte>& val) override
293  {
294  setVecLaneOperandT(si, idx, val);
295  }
298  VecElem
299  readVecElemOperand(const StaticInst *si, int idx) const override
300  {
301  const RegId& reg = si->srcRegIdx(idx);
302  return thread->readVecElem(reg);
303  }
304 
305  const VecPredRegContainer&
306  readVecPredRegOperand(const StaticInst *si, int idx) const override
307  {
308  const RegId& reg = si->srcRegIdx(idx);
309  assert(reg.isVecPredReg());
310  return thread->readVecPredReg(reg);
311  }
312 
314  getWritableVecPredRegOperand(const StaticInst *si, int idx) override
315  {
316  const RegId& reg = si->destRegIdx(idx);
317  assert(reg.isVecPredReg());
319  }
320 
321  RegVal
322  readCCRegOperand(const StaticInst *si, int idx) override
323  {
324  const RegId& reg = si->srcRegIdx(idx);
325  assert(reg.isCCReg());
326  return thread->readCCReg(reg.index());
327  }
328 
329  template<typename T>
330  void
332  {
333  result.push(InstResult(std::forward<T>(t),
335  }
336 
337  template<typename T>
338  void
340  {
341  result.push(InstResult(std::forward<T>(t),
343  }
344 
345  template<typename T>
346  void
348  {
349  result.push(InstResult(std::forward<T>(t),
351  }
352 
353  template<typename T>
354  void
356  {
357  result.push(InstResult(std::forward<T>(t),
359  }
360 
361  void
362  setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
363  {
364  const RegId& reg = si->destRegIdx(idx);
365  assert(reg.isIntReg());
366  thread->setIntReg(reg.index(), val);
368  }
369 
370  void
371  setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
372  {
373  const RegId& reg = si->destRegIdx(idx);
374  assert(reg.isFloatReg());
375  thread->setFloatReg(reg.index(), val);
377  }
378 
379  void
380  setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
381  {
382  const RegId& reg = si->destRegIdx(idx);
383  assert(reg.isCCReg());
384  thread->setCCReg(reg.index(), val);
385  setScalarResult((uint64_t)val);
386  }
387 
388  void
389  setVecRegOperand(const StaticInst *si, int idx,
390  const VecRegContainer& val) override
391  {
392  const RegId& reg = si->destRegIdx(idx);
393  assert(reg.isVecReg());
394  thread->setVecReg(reg, val);
395  setVecResult(val);
396  }
397 
398  void
399  setVecElemOperand(const StaticInst *si, int idx,
400  const VecElem val) override
401  {
402  const RegId& reg = si->destRegIdx(idx);
403  assert(reg.isVecElem());
406  }
407 
408  void setVecPredRegOperand(const StaticInst *si, int idx,
409  const VecPredRegContainer& val) override
410  {
411  const RegId& reg = si->destRegIdx(idx);
412  assert(reg.isVecPredReg());
415  }
416 
417  bool readPredicate() const override { return thread->readPredicate(); }
418 
419  void
420  setPredicate(bool val) override
421  {
423  }
424 
425  bool
426  readMemAccPredicate() const override
427  {
428  return thread->readMemAccPredicate();
429  }
430 
431  void
432  setMemAccPredicate(bool val) override
433  {
435  }
436 
437  uint64_t
438  getHtmTransactionUid() const override
439  {
440  panic("not yet supported!");
441  return 0;
442  };
443 
444  uint64_t
445  newHtmTransactionUid() const override
446  {
447  panic("not yet supported!");
448  return 0;
449  };
450 
451  Fault
453  {
454  panic("not yet supported!");
455  return NoFault;
456  }
457 
458  bool
459  inHtmTransactionalState() const override
460  {
461  panic("not yet supported!");
462  return false;
463  }
464 
465  uint64_t
466  getHtmTransactionalDepth() const override
467  {
468  panic("not yet supported!");
469  return 0;
470  }
471 
472  TheISA::PCState pcState() const override { return thread->pcState(); }
473  void
474  pcState(const TheISA::PCState &val) override
475  {
476  DPRINTF(Checker, "Changing PC to %s, old PC %s.\n",
477  val, thread->pcState());
478  thread->pcState(val);
479  }
480  Addr instAddr() { return thread->instAddr(); }
482  MicroPC microPC() { return thread->microPC(); }
484 
485  RegVal
486  readMiscRegNoEffect(int misc_reg) const
487  {
488  return thread->readMiscRegNoEffect(misc_reg);
489  }
490 
491  RegVal
492  readMiscReg(int misc_reg) override
493  {
494  return thread->readMiscReg(misc_reg);
495  }
496 
497  void
499  {
500  DPRINTF(Checker, "Setting misc reg %d with no effect to check later\n",
501  misc_reg);
502  miscRegIdxs.push(misc_reg);
503  return thread->setMiscRegNoEffect(misc_reg, val);
504  }
505 
506  void
507  setMiscReg(int misc_reg, RegVal val) override
508  {
509  DPRINTF(Checker, "Setting misc reg %d with effect to check later\n",
510  misc_reg);
511  miscRegIdxs.push(misc_reg);
512  return thread->setMiscReg(misc_reg, val);
513  }
514 
515  RegVal
516  readMiscRegOperand(const StaticInst *si, int idx) override
517  {
518  const RegId& reg = si->srcRegIdx(idx);
519  assert(reg.isMiscReg());
520  return thread->readMiscReg(reg.index());
521  }
522 
523  void
524  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
525  {
526  const RegId& reg = si->destRegIdx(idx);
527  assert(reg.isMiscReg());
528  return this->setMiscReg(reg.index(), val);
529  }
530 
532 
533  void
535  {
536  changedPC = true;
537  newPCState = val;
538  }
539 
540  void
541  demapPage(Addr vaddr, uint64_t asn) override
542  {
543  this->itb->demapPage(vaddr, asn);
544  this->dtb->demapPage(vaddr, asn);
545  }
546 
547  // monitor/mwait funtions
548  void armMonitor(Addr address) override { BaseCPU::armMonitor(0, address); }
549  bool mwait(PacketPtr pkt) override { return BaseCPU::mwait(0, pkt); }
550  void mwaitAtomic(ThreadContext *tc) override
551  { return BaseCPU::mwaitAtomic(0, tc, thread->dtb); }
553  { return BaseCPU::getCpuAddrMonitor(0); }
554 
555  void
556  demapInstPage(Addr vaddr, uint64_t asn)
557  {
558  this->itb->demapPage(vaddr, asn);
559  }
560 
561  void
562  demapDataPage(Addr vaddr, uint64_t asn)
563  {
564  this->dtb->demapPage(vaddr, asn);
565  }
566 
583  RequestPtr genMemFragmentRequest(Addr frag_addr, int size,
584  Request::Flags flags,
585  const std::vector<bool>& byte_enable,
586  int& frag_size, int& size_left) const;
587 
588  Fault readMem(Addr addr, uint8_t *data, unsigned size,
589  Request::Flags flags,
590  const std::vector<bool>& byte_enable = std::vector<bool>())
591  override;
592 
593  Fault writeMem(uint8_t *data, unsigned size, Addr addr,
594  Request::Flags flags, uint64_t *res,
595  const std::vector<bool>& byte_enable = std::vector<bool>())
596  override;
597 
598  Fault amoMem(Addr addr, uint8_t* data, unsigned size,
599  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
600  {
601  panic("AMO is not supported yet in CPU checker\n");
602  }
603 
604  unsigned int
605  readStCondFailures() const override {
606  return thread->readStCondFailures();
607  }
608 
609  void setStCondFailures(unsigned int sc_failures) override {}
611 
612  void wakeup(ThreadID tid) override { }
613  // Assume that the normal CPU's call to syscall was successful.
614  // The checker's state would have already been updated by the syscall.
615  void syscall() override { }
616 
617  void
619  {
620  if (exitOnError)
621  dumpAndExit();
622  }
623 
624  bool checkFlags(const RequestPtr &unverified_req, Addr vAddr,
625  Addr pAddr, int flags);
626 
627  void dumpAndExit();
628 
629  ThreadContext *tcBase() const override { return tc; }
631 
635 
636  bool changedPC;
642 
644 };
645 
652 template <class Impl>
653 class Checker : public CheckerCPU
654 {
655  private:
656  typedef typename Impl::DynInstPtr DynInstPtr;
657 
658  public:
660  : CheckerCPU(p), updateThisCycle(false), unverifiedInst(NULL)
661  { }
662 
663  void switchOut();
664  void takeOverFrom(BaseCPU *oldCPU);
665 
666  void advancePC(const Fault &fault);
667 
668  void verify(const DynInstPtr &inst);
669 
670  void validateInst(const DynInstPtr &inst);
671  void validateExecution(const DynInstPtr &inst);
672  void validateState();
673 
674  void copyResult(const DynInstPtr &inst, const InstResult& mismatch_val,
675  int start_idx);
676  void handlePendingInt();
677 
678  private:
679  void handleError(const DynInstPtr &inst)
680  {
681  if (exitOnError) {
682  dumpAndExit(inst);
683  } else if (updateOnError) {
684  updateThisCycle = true;
685  }
686  }
687 
688  void dumpAndExit(const DynInstPtr &inst);
689 
691 
693 
696  void dumpInsts();
697 };
698 
699 #endif // __CPU_CHECKER_CPU_HH__
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:492
InstResult
Definition: inst_res.hh:46
CheckerCPU::startNumInst
Counter startNumInst
Definition: cpu.hh:147
BaseCPU::mwait
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:212
CheckerCPU::readVec16BitLaneOperand
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
Definition: cpu.hh:238
CheckerCPU::getDTBPtr
BaseTLB * getDTBPtr()
Definition: cpu.hh:157
AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:239
CheckerCPU::result
std::queue< InstResult > result
Definition: cpu.hh:140
CheckerCPU::writeMem
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Definition: cpu.cc:255
CheckerCPU::getWritableVecRegOperand
VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Read destination vector register operand for modification.
Definition: cpu.hh:218
SimpleThread::pcState
TheISA::PCState pcState() const override
Definition: simple_thread.hh:517
SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:571
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:507
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
CheckerCPU::setVecElemOperand
void setVecElemOperand(const StaticInst *si, int idx, const VecElem val) override
Sets a vector register to a value.
Definition: cpu.hh:399
CheckerCPU::demapInstPage
void demapInstPage(Addr vaddr, uint64_t asn)
Definition: cpu.hh:556
data
const char data[]
Definition: circlebuf.test.cc:42
ArmISA::VecRegContainer
VecReg::Container VecRegContainer
Definition: registers.hh:71
SimpleThread::readVecReg
const VecRegContainer & readVecReg(const RegId &reg) const override
Definition: simple_thread.hh:308
CheckerCPU::thread
SimpleThread * thread
Definition: cpu.hh:154
CheckerCPU::readCCRegOperand
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:322
CheckerCPU::serialize
void serialize(CheckpointOut &cp) const override
Definition: cpu.cc:128
CheckerCPU::amoMem
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Definition: cpu.hh:598
StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:85
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
SimpleThread::readVec8BitLaneReg
virtual ConstVecLane8 readVec8BitLaneReg(const RegId &reg) const override
Reads source vector 8bit operand.
Definition: simple_thread.hh:346
InstResult::ResultType::VecElem
@ VecElem
ArmISA::MachInst
uint32_t MachInst
Definition: types.hh:52
CheckerCPU::startNumLoad
Counter startNumLoad
Definition: cpu.hh:171
CheckerCPU::setVecResult
void setVecResult(T &&t)
Definition: cpu.hh:339
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:371
ArmISA::si
Bitfield< 6 > si
Definition: miscregs_types.hh:766
SimpleThread::getWritableVecReg
VecRegContainer & getWritableVecReg(const RegId &reg) override
Definition: simple_thread.hh:319
CheckerCPU::readMiscRegNoEffect
RegVal readMiscRegNoEffect(int misc_reg) const
Definition: cpu.hh:486
base_dyn_inst.hh
SimpleThread::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Definition: simple_thread.hh:533
CheckerCPU::workload
std::vector< Process * > workload
Definition: cpu.hh:126
SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:530
SimpleThread::readVec16BitLaneReg
virtual ConstVecLane16 readVec16BitLaneReg(const RegId &reg) const override
Reads source vector 16bit operand.
Definition: simple_thread.hh:353
CheckerCPU::setSystem
void setSystem(System *system)
Definition: cpu.cc:95
CheckerCPU::setMiscRegNoEffect
void setMiscRegNoEffect(int misc_reg, RegVal val)
Definition: cpu.hh:498
CheckerCPU::readVec32BitLaneOperand
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
Definition: cpu.hh:247
CheckerCPU::getInstPort
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
Definition: cpu.hh:116
CheckerCPU::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: cpu.hh:438
BaseCPU::armMonitor
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:200
SimpleThread::setIntReg
void setIntReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:455
CheckerCPU::readMem
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Definition: cpu.cc:171
Checker
Templated Checker class.
Definition: cpu.hh:653
CheckerCPU::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: cpu.hh:459
SimpleThread::setCCReg
void setCCReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:508
CheckerCPU::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:516
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
CheckerCPU::getWritableVecPredRegOperand
VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
Definition: cpu.hh:314
SimpleThread::readVec64BitLaneReg
virtual ConstVecLane64 readVec64BitLaneReg(const RegId &reg) const override
Reads source vector 64bit operand.
Definition: simple_thread.hh:367
CheckerCPU
CheckerCPU class.
Definition: cpu.hh:85
BaseCPU::mwaitAtomic
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
Definition: base.cc:235
CheckerCPU::Params
CheckerCPUParams Params
Definition: cpu.hh:96
std::vector< Process * >
CheckerCPU::setVecPredResult
void setVecPredResult(T &&t)
Definition: cpu.hh:355
InstResult::ResultType::VecReg
@ VecReg
Checker::validateInst
void validateInst(const DynInstPtr &inst)
Definition: cpu_impl.hh:449
CheckerCPU::numInst
Counter numInst
Definition: cpu.hh:146
Checker::validateExecution
void validateExecution(const DynInstPtr &inst)
Definition: cpu_impl.hh:470
SimpleThread::readCCReg
RegVal readCCReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:443
CheckerCPU::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: cpu.hh:445
CheckerCPU::itb
BaseTLB * itb
Definition: cpu.hh:135
inst_res.hh
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:87
CheckerCPU::recordPCChange
void recordPCChange(const TheISA::PCState &val)
Definition: cpu.hh:534
request.hh
Checker::Checker
Checker(Params *p)
Definition: cpu.hh:659
CheckerCPU::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: cpu.hh:541
BaseTLB
Definition: tlb.hh:50
Checker::validateState
void validateState()
Definition: cpu_impl.hh:563
CheckerCPU::~CheckerCPU
virtual ~CheckerCPU()
Definition: cpu.cc:90
CheckerCPU::setScalarResult
void setScalarResult(T &&t)
Definition: cpu.hh:331
AddressMonitor
Definition: base.hh:70
SimpleThread::readStCondFailures
unsigned readStCondFailures() const override
Definition: simple_thread.hh:562
SimpleThread::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:545
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
CheckerCPU::CheckerCPU
CheckerCPU(Params *p)
Definition: cpu.cc:64
CheckerCPU::warnOnlyOnLoadError
bool warnOnlyOnLoadError
Definition: cpu.hh:641
CheckerCPU::init
void init() override
Definition: cpu.cc:59
Checker::switchOut
void switchOut()
Prepare for another CPU to take over execution.
Definition: cpu_impl.hh:436
SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:89
CheckerCPU::setVecPredRegOperand
void setVecPredRegOperand(const StaticInst *si, int idx, const VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
Definition: cpu.hh:408
SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:551
Checker::dumpInsts
void dumpInsts()
Definition: cpu_impl.hh:681
CheckerCPU::getITBPtr
BaseTLB * getITBPtr()
Definition: cpu.hh:156
CheckerCPU::newPCState
TheISA::PCState newPCState
Definition: cpu.hh:638
CheckerCPU::dcachePort
RequestPort * dcachePort
Definition: cpu.hh:131
CheckerCPU::curStaticInst
StaticInstPtr curStaticInst
Definition: cpu.hh:142
CheckerCPU::numLoad
Counter numLoad
Definition: cpu.hh:170
RequestorID
uint16_t RequestorID
Definition: request.hh:85
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:58
CheckerCPU::getDataPort
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
Definition: cpu.hh:107
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:196
CheckerCPU::dtb
BaseTLB * dtb
Definition: cpu.hh:136
CheckerCPU::youngestSN
InstSeqNum youngestSN
Definition: cpu.hh:643
CheckerCPU::setIntRegOperand
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Definition: cpu.hh:362
CheckerCPU::armMonitor
void armMonitor(Addr address) override
Definition: cpu.hh:548
cp
Definition: cprintf.cc:40
CheckerCPU::MachInst
TheISA::MachInst MachInst
Definition: cpu.hh:88
CheckerCPU::unserialize
void unserialize(CheckpointIn &cp) override
Definition: cpu.cc:133
CheckerCPU::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:524
CheckerCPU::handleError
void handleError()
Definition: cpu.hh:618
CheckerCPU::dumpAndExit
void dumpAndExit()
Definition: cpu.cc:377
SimpleThread::instAddr
Addr instAddr() const override
Definition: simple_thread.hh:526
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
CheckerCPU::demapDataPage
void demapDataPage(Addr vaddr, uint64_t asn)
Definition: cpu.hh:562
VecLaneT
Vector Lane abstraction Another view of a container.
Definition: vec_reg.hh:262
System
Definition: system.hh:73
CheckerCPU::setCCRegOperand
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:380
CheckerCPU::setVecRegOperand
void setVecRegOperand(const StaticInst *si, int idx, const VecRegContainer &val) override
Sets a destination vector register operand to a value.
Definition: cpu.hh:389
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
SimpleThread::getWritableVecPredReg
VecPredRegContainer & getWritableVecPredReg(const RegId &reg) override
Definition: simple_thread.hh:431
Checker::handleError
void handleError(const DynInstPtr &inst)
Definition: cpu.hh:679
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
MipsISA::vaddr
vaddr
Definition: pra_constants.hh:275
Checker::updateThisCycle
bool updateThisCycle
Definition: cpu.hh:690
statistics.hh
CheckerCPU::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: cpu.hh:550
CheckerCPU::setPredicate
void setPredicate(bool val) override
Definition: cpu.hh:420
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
InstResult::ResultType::Scalar
@ Scalar
CheckerCPU::setIcachePort
void setIcachePort(RequestPort *icache_port)
Definition: cpu.cc:116
SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:539
SimpleThread::readVec32BitLaneReg
virtual ConstVecLane32 readVec32BitLaneReg(const RegId &reg) const override
Reads source vector 32bit operand.
Definition: simple_thread.hh:360
Checker::advancePC
void advancePC(const Fault &fault)
Definition: cpu_impl.hh:67
CheckerCPU::readVec8BitLaneOperand
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
Definition: cpu.hh:229
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:76
CheckerCPU::readVecElemOperand
VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
Definition: cpu.hh:299
CheckerCPU::changedPC
bool changedPC
Definition: cpu.hh:636
CheckerCPU::miscRegIdxs
std::queue< int > miscRegIdxs
Definition: cpu.hh:149
SimpleThread::setVecElem
void setVecElem(const RegId &reg, const VecElem &val) override
Definition: simple_thread.hh:488
static_inst.hh
BaseCPU::getCpuAddrMonitor
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:599
SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:565
CheckerCPU::unverifiedReq
RequestPtr unverifiedReq
Definition: cpu.hh:633
SimpleThread::readIntReg
RegVal readIntReg(RegIndex reg_idx) const override
Definition: simple_thread.hh:286
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:656
SimpleThread::nextInstAddr
Addr nextInstAddr() const override
Definition: simple_thread.hh:527
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Definition: cpu.hh:291
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:245
CheckerCPU::requestorId
RequestorID requestorId
id attached to all issued requests
Definition: cpu.hh:92
CheckerCPU::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: cpu.hh:605
CheckerCPU::totalOps
virtual Counter totalOps() const override
Definition: cpu.hh:164
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:273
SimpleThread::setVecPredReg
void setVecPredReg(const RegId &reg, const VecPredRegContainer &val) override
Definition: simple_thread.hh:498
CheckerCPU::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: cpu.hh:432
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
SimpleThread::microPC
MicroPC microPC() const override
Definition: simple_thread.hh:528
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:360
Request
Definition: request.hh:87
CheckerCPU::totalInsts
virtual Counter totalInsts() const override
Definition: cpu.hh:159
SimpleThread::setFloatReg
void setFloatReg(RegIndex reg_idx, RegVal val) override
Definition: simple_thread.hh:465
SimpleThread::readVecPredReg
const VecPredRegContainer & readVecPredReg(const RegId &reg) const override
Definition: simple_thread.hh:420
CheckerCPU::readVecPredRegOperand
const VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
Definition: cpu.hh:306
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:443
Checker::verify
void verify(const DynInstPtr &inst)
Definition: cpu_impl.hh:122
CheckerCPU::setVecElemResult
void setVecElemResult(T &&t)
Definition: cpu.hh:347
CheckerCPU::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: cpu.hh:629
BaseCPU
Definition: cpu_dummy.hh:43
CheckerCPU::wakeup
void wakeup(ThreadID tid) override
Definition: cpu.hh:612
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Definition: cpu.hh:279
CheckerCPU::systemPtr
System * systemPtr
Definition: cpu.hh:128
BaseTLB::demapPage
virtual void demapPage(Addr vaddr, uint64_t asn)=0
BaseCPU::Params
BaseCPUParams Params
Definition: base.hh:295
CheckerCPU::readPredicate
bool readPredicate() const override
Definition: cpu.hh:417
simple_thread.hh
CheckerCPU::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: cpu.hh:426
base.hh
CheckerCPU::nextInstAddr
Addr nextInstAddr()
Definition: cpu.hh:481
pc_event.hh
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:143
BaseCPU::system
System * system
Definition: base.hh:371
CheckerCPU::instAddr
Addr instAddr()
Definition: cpu.hh:480
Checker::copyResult
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
Definition: cpu_impl.hh:588
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
Checker::InstListIt
std::list< DynInstPtr >::iterator InstListIt
Definition: cpu.hh:695
CheckerCPU::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: cpu.hh:466
CheckerCPU::updateOnError
bool updateOnError
Definition: cpu.hh:640
Checker::unverifiedInst
DynInstPtr unverifiedInst
Definition: cpu.hh:692
SimpleThread::dtb
BaseTLB * dtb
Definition: simple_thread.hh:134
CheckerCPU::readVecRegOperand
const VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Read source vector register operand.
Definition: cpu.hh:207
InstResult::ResultType::VecPredReg
@ VecPredReg
exec_context.hh
addr
ip6_addr_t addr
Definition: inet.hh:423
CheckerCPU::unverifiedResult
InstResult unverifiedResult
Definition: cpu.hh:632
CheckerCPU::setDcachePort
void setDcachePort(RequestPort *dcache_port)
Definition: cpu.cc:122
CheckerCPU::setVecLaneOperandT
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
Definition: cpu.hh:266
CheckerCPU::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: cpu.hh:552
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
CheckerCPU::willChangePC
bool willChangePC
Definition: cpu.hh:637
RefCountingPtr< StaticInst >
CheckerCPU::icachePort
RequestPort * icachePort
Definition: cpu.hh:130
RegId::index
const RegIndex & index() const
Index accessors.
Definition: reg_class.hh:173
CheckerCPU::tc
ThreadContext * tc
Definition: cpu.hh:133
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
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< DynInstPtr >
MicroPC
uint16_t MicroPC
Definition: types.hh:144
CheckerCPU::readIntRegOperand
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Definition: cpu.hh:188
CheckerCPU::initiateHtmCmd
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
Definition: cpu.hh:452
Checker::instList
std::list< DynInstPtr > instList
Definition: cpu.hh:694
CheckpointIn
Definition: serialize.hh:67
CheckerCPU::syscall
void syscall() override
Executes a syscall.
Definition: cpu.hh:615
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:138
CheckerCPU::setStCondFailures
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: cpu.hh:609
SimpleThread::readVecElem
const VecElem & readVecElem(const RegId &reg) const override
Definition: simple_thread.hh:409
CheckerCPU::setVecLaneOperand
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Definition: cpu.hh:285
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:256
CheckerCPU::pcState
void pcState(const TheISA::PCState &val) override
Definition: cpu.hh:474
RegVal
uint64_t RegVal
Definition: types.hh:168
SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:529
Checker::handlePendingInt
void handlePendingInt()
Definition: cpu_impl.hh:88
VecRegContainer
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition: vec_reg.hh:156
CheckerCPU::threadBase
SimpleThread * threadBase()
Definition: cpu.hh:630
CheckerCPU::pcState
TheISA::PCState pcState() const override
Definition: cpu.hh:472
CheckerCPU::unverifiedMemData
uint8_t * unverifiedMemData
Definition: cpu.hh:634
CheckerCPU::microPC
MicroPC microPC()
Definition: cpu.hh:482
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
CheckerCPU::mwait
bool mwait(PacketPtr pkt) override
Definition: cpu.hh:549
CheckerCPU::exitOnError
bool exitOnError
Definition: cpu.hh:639
eventq.hh

Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17