gem5  [DEVELOP-FOR-23.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-2021 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/generic/pcstate.hh"
50 #include "base/statistics.hh"
51 #include "cpu/base.hh"
52 #include "cpu/exec_context.hh"
53 #include "cpu/inst_res.hh"
54 #include "cpu/pc_event.hh"
55 #include "cpu/simple_thread.hh"
56 #include "cpu/static_inst.hh"
57 #include "debug/Checker.hh"
58 #include "mem/request.hh"
59 #include "params/CheckerCPU.hh"
60 #include "sim/eventq.hh"
61 
62 namespace gem5
63 {
64 
65 class ThreadContext;
66 class Request;
67 
84 class CheckerCPU : public BaseCPU, public ExecContext
85 {
86  protected:
89 
90  public:
91  void init() override;
92 
94  CheckerCPU(const Params &p);
95  virtual ~CheckerCPU();
96 
97  void setSystem(System *system);
98 
99  void setIcachePort(RequestPort *icache_port);
100 
101  void setDcachePort(RequestPort *dcache_port);
102 
103  Port &
104  getDataPort() override
105  {
106  // the checker does not have ports on its own so return the
107  // data port of the actual CPU core
108  assert(dcachePort);
109  return *dcachePort;
110  }
111 
112  Port &
113  getInstPort() override
114  {
115  // the checker does not have ports on its own so return the
116  // data port of the actual CPU core
117  assert(icachePort);
118  return *icachePort;
119  }
120 
121  protected:
122 
124 
126 
129 
131 
133 
134  // ISAs like ARM can have multiple destination registers to check,
135  // keep them all in a std::queue
136  std::queue<InstResult> result;
137 
140 
141  // number of simulated instructions
144 
145  std::queue<int> miscRegIdxs;
146 
147  public:
148 
149  // Primary thread being run.
151 
152  BaseMMU* getMMUPtr() { return mmu; }
153 
154  virtual Counter totalInsts() const override { return 0; }
155 
156  virtual Counter totalOps() const override { return 0; }
157 
158  // number of simulated loads
161 
162  void serialize(CheckpointOut &cp) const override;
163  void unserialize(CheckpointIn &cp) override;
164 
165  // The register accessor methods provide the index of the
166  // instruction's operand (e.g., 0 or 1), not the architectural
167  // register index, to simplify the implementation of register
168  // renaming. We find the architectural register index by indexing
169  // into the instruction's own operand index table. Note that a
170  // raw pointer to the StaticInst is provided instead of a
171  // ref-counted StaticInstPtr to redice overhead. This is fine as
172  // long as these methods don't copy the pointer into any long-term
173  // storage (which is pretty hard to imagine they would have reason
174  // to do).
175 
176  RegVal
177  getRegOperand(const StaticInst *si, int idx) override
178  {
179  const RegId& id = si->srcRegIdx(idx);
180  if (id.is(InvalidRegClass))
181  return 0;
182  return thread->getReg(id);
183  }
184 
185  void
186  getRegOperand(const StaticInst *si, int idx, void *val) override
187  {
188  thread->getReg(si->srcRegIdx(idx), val);
189  }
190 
191  void *
192  getWritableRegOperand(const StaticInst *si, int idx) override
193  {
194  return thread->getWritableReg(si->destRegIdx(idx));
195  }
196 
197  void
198  setRegOperand(const StaticInst *si, int idx, RegVal val) override
199  {
200  const RegId& id = si->destRegIdx(idx);
201  if (id.is(InvalidRegClass))
202  return;
203  const RegId flat = id.flatten(*thread->getIsaPtr());
204  thread->setReg(flat, val);
205  result.emplace(flat.regClass(), val);
206  }
207 
208  void
209  setRegOperand(const StaticInst *si, int idx, const void *val) override
210  {
211  const RegId& id = si->destRegIdx(idx);
212  if (id.is(InvalidRegClass))
213  return;
214  const RegId flat = id.flatten(*thread->getIsaPtr());
215  thread->setReg(flat, val);
216  result.emplace(flat.regClass(), val);
217  }
218 
219  bool readPredicate() const override { return thread->readPredicate(); }
220 
221  void
222  setPredicate(bool val) override
223  {
225  }
226 
227  bool
228  readMemAccPredicate() const override
229  {
230  return thread->readMemAccPredicate();
231  }
232 
233  void
234  setMemAccPredicate(bool val) override
235  {
237  }
238 
239  uint64_t
240  getHtmTransactionUid() const override
241  {
242  panic("not yet supported!");
243  return 0;
244  };
245 
246  uint64_t
247  newHtmTransactionUid() const override
248  {
249  panic("not yet supported!");
250  return 0;
251  };
252 
253  Fault
255  {
256  panic("not yet supported!");
257  return NoFault;
258  }
259 
260  bool
261  inHtmTransactionalState() const override
262  {
263  return (getHtmTransactionalDepth() > 0);
264  }
265 
266  uint64_t
267  getHtmTransactionalDepth() const override
268  {
271  }
272 
273  const PCStateBase &
274  pcState() const override
275  {
276  return thread->pcState();
277  }
278  void
279  pcState(const PCStateBase &val) override
280  {
281  DPRINTF(Checker, "Changing PC to %s, old PC %s.\n",
282  val, thread->pcState());
283  thread->pcState(val);
284  }
286 
287  RegVal
288  readMiscRegNoEffect(int misc_reg) const
289  {
290  return thread->readMiscRegNoEffect(misc_reg);
291  }
292 
293  RegVal
294  readMiscReg(int misc_reg) override
295  {
296  return thread->readMiscReg(misc_reg);
297  }
298 
299  void
301  {
302  DPRINTF(Checker, "Setting misc reg %d with no effect to check later\n",
303  misc_reg);
304  miscRegIdxs.push(misc_reg);
305  return thread->setMiscRegNoEffect(misc_reg, val);
306  }
307 
308  void
309  setMiscReg(int misc_reg, RegVal val) override
310  {
311  DPRINTF(Checker, "Setting misc reg %d with effect to check later\n",
312  misc_reg);
313  miscRegIdxs.push(misc_reg);
314  return thread->setMiscReg(misc_reg, val);
315  }
316 
317  RegVal
318  readMiscRegOperand(const StaticInst *si, int idx) override
319  {
320  const RegId& reg = si->srcRegIdx(idx);
321  assert(reg.is(MiscRegClass));
322  return thread->readMiscReg(reg.index());
323  }
324 
325  void
326  setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
327  {
328  const RegId& reg = si->destRegIdx(idx);
329  assert(reg.is(MiscRegClass));
330  return this->setMiscReg(reg.index(), val);
331  }
332 
334 
335  void
337  {
338  changedPC = true;
339  set(newPCState, val);
340  }
341 
342  void
343  demapPage(Addr vaddr, uint64_t asn) override
344  {
345  mmu->demapPage(vaddr, asn);
346  }
347 
348  // monitor/mwait funtions
349  void armMonitor(Addr address) override { BaseCPU::armMonitor(0, address); }
350  bool mwait(PacketPtr pkt) override { return BaseCPU::mwait(0, pkt); }
351 
352  void
354  {
355  return BaseCPU::mwaitAtomic(0, tc, thread->mmu);
356  }
357 
359  getAddrMonitor() override
360  {
361  return BaseCPU::getCpuAddrMonitor(0);
362  }
363 
380  RequestPtr genMemFragmentRequest(Addr frag_addr, int size,
382  const std::vector<bool>& byte_enable,
383  int& frag_size, int& size_left) const;
384 
385  Fault readMem(Addr addr, uint8_t *data, unsigned size,
387  const std::vector<bool>& byte_enable) override;
388 
389  Fault writeMem(uint8_t *data, unsigned size, Addr addr,
390  Request::Flags flags, uint64_t *res,
391  const std::vector<bool>& byte_enable) override;
392 
393  Fault
394  amoMem(Addr addr, uint8_t* data, unsigned size,
395  Request::Flags flags, AtomicOpFunctorPtr amo_op) override
396  {
397  panic("AMO is not supported yet in CPU checker\n");
398  }
399 
400  unsigned int
401  readStCondFailures() const override
402  {
403  return thread->readStCondFailures();
404  }
405 
406  void setStCondFailures(unsigned int sc_failures) override {}
408 
409  void wakeup(ThreadID tid) override { }
410 
411  void
413  {
414  if (exitOnError)
415  dumpAndExit();
416  }
417 
418  bool checkFlags(const RequestPtr &unverified_req, Addr vAddr,
419  Addr pAddr, int flags);
420 
421  void dumpAndExit();
422 
423  ThreadContext *tcBase() const override { return tc; }
425 
429 
430  bool changedPC;
432  std::unique_ptr<PCStateBase> newPCState;
436 
438 };
439 
446 template <class DynInstPtr>
447 class Checker : public CheckerCPU
448 {
449  public:
450  Checker(const Params &p)
451  : CheckerCPU(p), updateThisCycle(false), unverifiedInst(NULL)
452  { }
453 
454  void switchOut();
455  void takeOverFrom(BaseCPU *oldCPU);
456 
457  void advancePC(const Fault &fault);
458 
459  void verify(const DynInstPtr &inst);
460 
461  void validateInst(const DynInstPtr &inst);
462  void validateExecution(const DynInstPtr &inst);
463  void validateState();
464 
465  void copyResult(const DynInstPtr &inst, const InstResult& mismatch_val,
466  int start_idx);
467  void handlePendingInt();
468 
469  private:
470  void
471  handleError(const DynInstPtr &inst)
472  {
473  if (exitOnError) {
474  dumpAndExit(inst);
475  } else if (updateOnError) {
476  updateThisCycle = true;
477  }
478  }
479 
480  void dumpAndExit(const DynInstPtr &inst);
481 
483 
485 
488  void dumpInsts();
489 };
490 
491 } // namespace gem5
492 
493 #endif // __CPU_CHECKER_CPU_HH__
gem5::SimpleThread::readMiscReg
RegVal readMiscReg(RegIndex misc_reg) override
Definition: simple_thread.hh:275
gem5::CheckerCPU::pcState
const PCStateBase & pcState() const override
Definition: cpu.hh:274
gem5::CheckerCPU::CheckerCPU
CheckerCPU(const Params &p)
Definition: cpu.cc:65
gem5::RegId::flatten
RegId flatten(const BaseISA &isa) const
Definition: reg_class.hh:279
gem5::SimpleThread::getWritableReg
void * getWritableReg(const RegId &arch_reg) override
Definition: simple_thread.hh:345
gem5::BaseCPU::armMonitor
void armMonitor(ThreadID tid, Addr address)
Definition: base.cc:242
gem5::NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:253
gem5::Checker::validateInst
void validateInst(const DynInstPtr &inst)
Definition: cpu_impl.hh:441
gem5::CheckerCPU::numInst
Counter numInst
Definition: cpu.hh:142
gem5::CheckerCPU::amoMem
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Definition: cpu.hh:394
gem5::SimpleThread::getReg
RegVal getReg(const RegId &arch_reg) const override
Definition: simple_thread.hh:313
gem5::CheckerCPU::totalInsts
virtual Counter totalInsts() const override
Definition: cpu.hh:154
gem5::Checker::verify
void verify(const DynInstPtr &inst)
Definition: cpu_impl.hh:119
gem5::SimpleThread::htmTransactionStops
int64_t htmTransactionStops
Definition: simple_thread.hh:136
gem5::RegVal
uint64_t RegVal
Definition: types.hh:173
gem5::BaseCPU::mwaitAtomic
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
Definition: base.cc:277
gem5::CheckerCPU::serialize
void serialize(CheckpointOut &cp) const override
Serialize this object to the given output stream.
Definition: cpu.cc:130
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::Checker::updateThisCycle
bool updateThisCycle
Definition: cpu.hh:482
gem5::CheckerCPU::getMMUPtr
BaseMMU * getMMUPtr()
Definition: cpu.hh:152
gem5::CheckerCPU::readPredicate
bool readPredicate() const override
Definition: cpu.hh:219
gem5::InvalidRegClass
@ InvalidRegClass
Definition: reg_class.hh:70
gem5::CheckerCPU::~CheckerCPU
virtual ~CheckerCPU()
Definition: cpu.cc:91
gem5::Checker::advancePC
void advancePC(const Fault &fault)
Definition: cpu_impl.hh:66
gem5::CheckerCPU::readMiscRegNoEffect
RegVal readMiscRegNoEffect(int misc_reg) const
Definition: cpu.hh:288
gem5::CheckerCPU::setStCondFailures
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Definition: cpu.hh:406
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::ArmISA::set
Bitfield< 12, 11 > set
Definition: misc_types.hh:760
gem5::CheckerCPU::unverifiedReq
RequestPtr unverifiedReq
Definition: cpu.hh:427
gem5::CheckerCPU::readStCondFailures
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
Definition: cpu.hh:401
gem5::o3::DynInstPtr
RefCountingPtr< DynInst > DynInstPtr
Definition: dyn_inst_ptr.hh:55
gem5::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:140
gem5::CheckerCPU::workload
std::vector< Process * > workload
Definition: cpu.hh:123
gem5::Checker::instList
std::list< DynInstPtr > instList
Definition: cpu.hh:486
gem5::CheckerCPU::setRegOperand
void setRegOperand(const StaticInst *si, int idx, const void *val) override
Definition: cpu.hh:209
gem5::CheckerCPU::armMonitor
void armMonitor(Addr address) override
Definition: cpu.hh:349
gem5::X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:776
gem5::CheckerCPU::setRegOperand
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:198
gem5::SimpleThread::setMiscReg
void setMiscReg(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:287
gem5::Checker::handleError
void handleError(const DynInstPtr &inst)
Definition: cpu.hh:471
gem5::BaseCPU::system
System * system
Definition: base.hh:392
gem5::CheckerCPU::thread
SimpleThread * thread
Definition: cpu.hh:150
std::vector
STL vector class.
Definition: stl.hh:37
gem5::CheckerCPU::readMemAccPredicate
bool readMemAccPredicate() const override
Definition: cpu.hh:228
gem5::CheckerCPU::readMiscRegOperand
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:318
gem5::CheckerCPU::getRegOperand
RegVal getRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:177
gem5::CheckerCPU::miscRegIdxs
std::queue< int > miscRegIdxs
Definition: cpu.hh:145
gem5::SimpleThread::setReg
void setReg(const RegId &arch_reg, RegVal val) override
Definition: simple_thread.hh:355
gem5::CheckerCPU::willChangePC
bool willChangePC
Definition: cpu.hh:431
gem5::SimpleThread::htmTransactionStarts
int64_t htmTransactionStarts
Definition: simple_thread.hh:135
inst_res.hh
gem5::Checker::copyResult
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
Definition: cpu_impl.hh:570
gem5::SimpleThread
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Definition: simple_thread.hh:93
gem5::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:251
request.hh
gem5::CheckerCPU::getHtmTransactionUid
uint64_t getHtmTransactionUid() const override
Definition: cpu.hh:240
gem5::CheckerCPU::wakeup
void wakeup(ThreadID tid) override
Definition: cpu.hh:409
gem5::Checker::handlePendingInt
void handlePendingInt()
Definition: cpu_impl.hh:85
gem5::MipsISA::is
Bitfield< 24, 22 > is
Definition: pra_constants.hh:235
gem5::RefCountingPtr< StaticInst >
gem5::BaseMMU
Definition: mmu.hh:53
gem5::AddressMonitor
Definition: base.hh:70
gem5::CheckerCPU::youngestSN
InstSeqNum youngestSN
Definition: cpu.hh:437
gem5::RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:118
gem5::Checker::Checker
Checker(const Params &p)
Definition: cpu.hh:450
gem5::CheckerCPU::dumpAndExit
void dumpAndExit()
Definition: cpu.cc:373
gem5::Checker::unverifiedInst
DynInstPtr unverifiedInst
Definition: cpu.hh:484
gem5::SimpleThread::readStCondFailures
unsigned readStCondFailures() const override
Definition: simple_thread.hh:292
gem5::SimpleThread::mmu
BaseMMU * mmu
Definition: simple_thread.hh:130
gem5::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:309
gem5::CheckerCPU::tc
ThreadContext * tc
Definition: cpu.hh:130
gem5::SimpleThread::readMemAccPredicate
bool readMemAccPredicate()
Definition: simple_thread.hh:295
gem5::Flags< FlagsType >
gem5::CheckerCPU::setMemAccPredicate
void setMemAccPredicate(bool val) override
Definition: cpu.hh:234
gem5::System
Definition: system.hh:74
gem5::StaticInst
Base, ISA-independent static instruction class.
Definition: static_inst.hh:87
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
gem5::Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:248
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::SimpleThread::readPredicate
bool readPredicate() const
Definition: simple_thread.hh:265
gem5::CheckerCPU::dcachePort
RequestPort * dcachePort
Definition: cpu.hh:128
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:210
gem5::SimpleThread::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Definition: simple_thread.hh:269
gem5::CheckerCPU::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Definition: cpu.hh:343
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::CheckerCPU::newHtmTransactionUid
uint64_t newHtmTransactionUid() const override
Definition: cpu.hh:247
statistics.hh
gem5::CheckerCPU::newPCState
std::unique_ptr< PCStateBase > newPCState
Definition: cpu.hh:432
gem5::CheckerCPU
CheckerCPU class.
Definition: cpu.hh:84
gem5::SimpleThread::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Definition: simple_thread.hh:281
gem5::SimpleThread::setMemAccPredicate
void setMemAccPredicate(bool val)
Definition: simple_thread.hh:301
gem5::RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:92
gem5::BaseMMU::demapPage
void demapPage(Addr vaddr, uint64_t asn)
Definition: mmu.cc:97
gem5::BaseCPU
Definition: base.hh:104
gem5::CheckerCPU::icachePort
RequestPort * icachePort
Definition: cpu.hh:127
gem5::CheckerCPU::mwaitAtomic
void mwaitAtomic(ThreadContext *tc) override
Definition: cpu.hh:353
gem5::CheckerCPU::systemPtr
System * systemPtr
Definition: cpu.hh:125
flags
uint8_t flags
Definition: helpers.cc:66
static_inst.hh
gem5::CheckerCPU::tcBase
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Definition: cpu.hh:423
gem5::Checker::validateExecution
void validateExecution(const DynInstPtr &inst)
Definition: cpu_impl.hh:462
gem5::CheckerCPU::result
std::queue< InstResult > result
Definition: cpu.hh:136
gem5::CheckerCPU::numLoad
Counter numLoad
Definition: cpu.hh:159
gem5::CheckerCPU::startNumInst
Counter startNumInst
Definition: cpu.hh:143
gem5::CheckerCPU::requestorId
RequestorID requestorId
id attached to all issued requests
Definition: cpu.hh:88
gem5::SimpleThread::pcState
const PCStateBase & pcState() const override
Definition: simple_thread.hh:256
gem5::CheckerCPU::recordPCChange
void recordPCChange(const PCStateBase &val)
Definition: cpu.hh:336
gem5::CheckerCPU::changedPC
bool changedPC
Definition: cpu.hh:430
gem5::CheckerCPU::pcState
void pcState(const PCStateBase &val) override
Definition: cpu.hh:279
gem5::ArmISA::si
Bitfield< 6 > si
Definition: misc_types.hh:914
gem5::BaseCPU::getCpuAddrMonitor
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
Definition: base.hh:656
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::CheckerCPU::setMiscRegOperand
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Definition: cpu.hh:326
gem5::SimpleThread::getIsaPtr
BaseISA * getIsaPtr() const override
Definition: simple_thread.hh:209
gem5::CheckerCPU::mmu
BaseMMU * mmu
Definition: cpu.hh:132
gem5::CheckerCPU::readMem
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Definition: cpu.cc:167
gem5::CheckerCPU::getWritableRegOperand
void * getWritableRegOperand(const StaticInst *si, int idx) override
Definition: cpu.hh:192
gem5::CheckerCPU::exitOnError
bool exitOnError
Definition: cpu.hh:433
gem5::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:356
gem5::CheckerCPU::getDataPort
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
Definition: cpu.hh:104
gem5::X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:92
gem5::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:294
pcstate.hh
gem5::CheckerCPU::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: cpu.cc:59
gem5::CheckerCPU::threadBase
SimpleThread * threadBase()
Definition: cpu.hh:424
gem5::CheckerCPU::getInstPort
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
Definition: cpu.hh:113
gem5::CheckerCPU::unserialize
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
Definition: cpu.cc:135
gem5::CheckerCPU::handleError
void handleError()
Definition: cpu.hh:412
simple_thread.hh
gem5::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:437
gem5::CheckerCPU::curStaticInst
StaticInstPtr curStaticInst
Definition: cpu.hh:138
gem5::CheckerCPU::setDcachePort
void setDcachePort(RequestPort *dcache_port)
Definition: cpu.cc:124
gem5::CheckerCPU::setPredicate
void setPredicate(bool val) override
Definition: cpu.hh:222
base.hh
gem5::Port
Ports are used to interface objects to each other.
Definition: port.hh:61
gem5::MiscRegClass
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:69
pc_event.hh
gem5::Checker::InstListIt
std::list< DynInstPtr >::iterator InstListIt
Definition: cpu.hh:487
gem5::CheckerCPU::PARAMS
PARAMS(CheckerCPU)
gem5::CheckerCPU::mwait
bool mwait(PacketPtr pkt) override
Definition: cpu.hh:350
exec_context.hh
gem5::statistics::Counter
double Counter
All counters are of 64-bit values.
Definition: types.hh:46
gem5::Checker::switchOut
void switchOut()
Prepare for another CPU to take over execution.
Definition: cpu_impl.hh:431
gem5::CheckerCPU::warnOnlyOnLoadError
bool warnOnlyOnLoadError
Definition: cpu.hh:435
gem5::CheckerCPU::setMiscRegNoEffect
void setMiscRegNoEffect(int misc_reg, RegVal val)
Definition: cpu.hh:300
gem5::CheckerCPU::initiateMemMgmtCmd
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
Definition: cpu.hh:254
gem5::CheckerCPU::getHtmTransactionalDepth
uint64_t getHtmTransactionalDepth() const override
Definition: cpu.hh:267
gem5::CheckerCPU::inHtmTransactionalState
bool inHtmTransactionalState() const override
Definition: cpu.hh:261
gem5::ExecContext
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:71
gem5::CheckerCPU::startNumLoad
Counter startNumLoad
Definition: cpu.hh:160
gem5::InstSeqNum
uint64_t InstSeqNum
Definition: inst_seq.hh:40
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::Checker::validateState
void validateState()
Definition: cpu_impl.hh:544
gem5::RequestorID
uint16_t RequestorID
Definition: request.hh:95
gem5::ClockedObject::Params
ClockedObjectParams Params
Parameters of ClockedObject.
Definition: clocked_object.hh:240
gem5::CheckerCPU::getAddrMonitor
AddressMonitor * getAddrMonitor() override
Definition: cpu.hh:359
gem5::BaseCPU::mwait
bool mwait(ThreadID tid, PacketPtr pkt)
Definition: base.cc:254
gem5::MipsISA::vaddr
vaddr
Definition: pra_constants.hh:278
gem5::PCStateBase
Definition: pcstate.hh:57
gem5::CheckerCPU::setIcachePort
void setIcachePort(RequestPort *icache_port)
Definition: cpu.cc:118
gem5::RegId::index
constexpr RegIndex index() const
Index accessors.
Definition: reg_class.hh:150
std::list< DynInstPtr >
gem5::AtomicOpFunctorPtr
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:269
gem5::CheckerCPU::getRegOperand
void getRegOperand(const StaticInst *si, int idx, void *val) override
Definition: cpu.hh:186
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::CheckerCPU::curMacroStaticInst
StaticInstPtr curMacroStaticInst
Definition: cpu.hh:139
gem5::Checker
Templated Checker class.
Definition: cpu.hh:447
gem5::CheckerCPU::updateOnError
bool updateOnError
Definition: cpu.hh:434
gem5::CheckerCPU::totalOps
virtual Counter totalOps() const override
Definition: cpu.hh:156
gem5::SimpleThread::setPredicate
void setPredicate(bool val)
Definition: simple_thread.hh:266
gem5::Checker::dumpInsts
void dumpInsts()
Definition: cpu_impl.hh:621
gem5::RegId::regClass
constexpr const RegClass & regClass() const
Class accessor.
Definition: reg_class.hh:153
gem5::InstResult
Definition: inst_res.hh:54
gem5::CheckerCPU::unverifiedMemData
uint8_t * unverifiedMemData
Definition: cpu.hh:428
gem5::ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:235
gem5::CheckerCPU::unverifiedResult
InstResult unverifiedResult
Definition: cpu.hh:426
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:92
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:188
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84
gem5::CheckerCPU::setSystem
void setSystem(System *system)
Definition: cpu.cc:96
eventq.hh

Generated on Sun Jul 30 2023 01:56:47 for gem5 by doxygen 1.8.17