gem5  v22.1.0.0
cpu_impl.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011, 2016 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_IMPL_HH__
43 #define __CPU_CHECKER_CPU_IMPL_HH__
44 
45 #include <list>
46 #include <string>
47 
48 #include "base/refcnt.hh"
49 #include "cpu/exetrace.hh"
50 #include "cpu/null_static_inst.hh"
51 #include "cpu/reg_class.hh"
52 #include "cpu/simple_thread.hh"
53 #include "cpu/static_inst.hh"
54 #include "cpu/thread_context.hh"
55 #include "cpu/checker/cpu.hh"
56 #include "debug/Checker.hh"
57 #include "sim/full_system.hh"
58 #include "sim/sim_object.hh"
59 #include "sim/stats.hh"
60 
61 namespace gem5
62 {
63 
64 template <class DynInstPtr>
65 void
67 {
68  if (fault != NoFault) {
69  curMacroStaticInst = nullStaticInstPtr;
70  fault->invoke(tc, curStaticInst);
71  thread->decoder->reset();
72  } else {
73  if (curStaticInst) {
74  if (curStaticInst->isLastMicroop())
75  curMacroStaticInst = nullStaticInstPtr;
76  curStaticInst->advancePC(thread);
77  DPRINTF(Checker, "Advancing PC to %s.\n", thread->pcState());
78  }
79  }
80 }
82 
83 template <class DynInstPtr>
84 void
86 {
87  DPRINTF(Checker, "IRQ detected at PC: %s with %d insts in buffer\n",
88  thread->pcState(), instList.size());
89  DynInstPtr boundaryInst = NULL;
90  if (!instList.empty()) {
91  // Set the instructions as completed and verify as much as possible.
92  DynInstPtr inst;
94 
95  for (itr = instList.begin(); itr != instList.end(); itr++) {
96  (*itr)->setCompleted();
97  }
98 
99  inst = instList.front();
100  boundaryInst = instList.back();
101  verify(inst); // verify the instructions
102  inst = NULL;
103  }
104  if ((!boundaryInst && curMacroStaticInst &&
105  curStaticInst->isDelayedCommit() &&
106  !curStaticInst->isLastMicroop()) ||
107  (boundaryInst && boundaryInst->isDelayedCommit() &&
108  !boundaryInst->isLastMicroop())) {
109  panic("%lli: Trying to take an interrupt in middle of "
110  "a non-interuptable instruction!", curTick());
111  }
112  boundaryInst = NULL;
113  thread->decoder->reset();
114  curMacroStaticInst = nullStaticInstPtr;
115 }
116 
117 template <class DynInstPtr>
118 void
120 {
121  DynInstPtr inst;
122 
123  // Make sure serializing instructions are actually
124  // seen as serializing to commit. instList should be
125  // empty in these cases.
126  if ((completed_inst->isSerializing() ||
127  completed_inst->isSerializeBefore()) &&
128  (!instList.empty() ?
129  (instList.front()->seqNum != completed_inst->seqNum) : 0)) {
130  panic("%lli: Instruction sn:%lli at PC %s is serializing before but is"
131  " entering instList with other instructions\n", curTick(),
132  completed_inst->seqNum, completed_inst->pcState());
133  }
134 
135  // Either check this instruction, or add it to a list of
136  // instructions waiting to be checked. Instructions must be
137  // checked in program order, so if a store has committed yet not
138  // completed, there may be some instructions that are waiting
139  // behind it that have completed and must be checked.
140  if (!instList.empty()) {
141  if (youngestSN < completed_inst->seqNum) {
142  DPRINTF(Checker, "Adding instruction [sn:%lli] PC:%s to list\n",
143  completed_inst->seqNum, completed_inst->pcState());
144  instList.push_back(completed_inst);
145  youngestSN = completed_inst->seqNum;
146  }
147 
148  if (!instList.front()->isCompleted()) {
149  return;
150  } else {
151  inst = instList.front();
152  instList.pop_front();
153  }
154  } else {
155  if (!completed_inst->isCompleted()) {
156  if (youngestSN < completed_inst->seqNum) {
157  DPRINTF(Checker, "Adding instruction [sn:%lli] PC:%s to list\n",
158  completed_inst->seqNum, completed_inst->pcState());
159  instList.push_back(completed_inst);
160  youngestSN = completed_inst->seqNum;
161  }
162  return;
163  } else {
164  if (youngestSN < completed_inst->seqNum) {
165  inst = completed_inst;
166  youngestSN = completed_inst->seqNum;
167  } else {
168  return;
169  }
170  }
171  }
172 
173  // Make sure a serializing instruction is actually seen as
174  // serializing. instList should be empty here
175  if (inst->isSerializeAfter() && !instList.empty()) {
176  panic("%lli: Instruction sn:%lli at PC %s is serializing after but is"
177  " exiting instList with other instructions\n", curTick(),
178  completed_inst->seqNum, completed_inst->pcState());
179  }
180  unverifiedInst = inst;
181  inst = NULL;
182 
183  auto &decoder = thread->decoder;
184  const Addr pc_mask = decoder->pcMask();
185 
186  // Try to check all instructions that are completed, ending if we
187  // run out of instructions to check or if an instruction is not
188  // yet completed.
189  while (1) {
190  DPRINTF(Checker, "Processing instruction [sn:%lli] PC:%s.\n",
191  unverifiedInst->seqNum, unverifiedInst->pcState());
192  unverifiedReq = NULL;
193  unverifiedReq = unverifiedInst->reqToVerify;
194  unverifiedMemData = unverifiedInst->memData;
195  // Make sure results queue is empty
196  while (!result.empty()) {
197  result.pop();
198  }
199  baseStats.numCycles++;
200 
201  Fault fault = NoFault;
202 
203  // Check if any recent PC changes match up with anything we
204  // expect to happen. This is mostly to check if traps or
205  // PC-based events have occurred in both the checker and CPU.
206  if (changedPC) {
207  DPRINTF(Checker, "Changed PC recently to %s\n",
208  thread->pcState());
209  if (willChangePC) {
210  if (*newPCState == thread->pcState()) {
211  DPRINTF(Checker, "Changed PC matches expected PC\n");
212  } else {
213  warn("%lli: Changed PC does not match expected PC, "
214  "changed: %s, expected: %s",
215  curTick(), thread->pcState(), *newPCState);
217  }
218  willChangePC = false;
219  }
220  changedPC = false;
221  }
222 
223  // Try to fetch the instruction
224  uint64_t fetchOffset = 0;
225  bool fetchDone = false;
226  while (!fetchDone) {
227  Addr fetch_PC = thread->pcState().instAddr();
228  fetch_PC = (fetch_PC & pc_mask) + fetchOffset;
229 
230  // If not in the middle of a macro instruction
231  if (!curMacroStaticInst) {
232  // set up memory request for instruction fetch
233  auto mem_req = std::make_shared<Request>(
234  fetch_PC, decoder->moreBytesSize(), 0, requestorId,
235  fetch_PC, thread->contextId());
236 
237  mem_req->setVirt(fetch_PC, decoder->moreBytesSize(),
238  Request::INST_FETCH, requestorId,
239  thread->pcState().instAddr());
240 
241  fault = mmu->translateFunctional(
242  mem_req, tc, BaseMMU::Execute);
243 
244  if (fault != NoFault) {
245  if (unverifiedInst->getFault() == NoFault) {
246  // In this case the instruction was not a dummy
247  // instruction carrying an ITB fault. In the single
248  // threaded case the ITB should still be able to
249  // translate this instruction; in the SMT case it's
250  // possible that its ITB entry was kicked out.
251  warn("%lli: Instruction PC %s was not found in the "
252  "ITB!", curTick(), thread->pcState());
253  handleError(unverifiedInst);
254 
255  // go to the next instruction
256  advancePC(NoFault);
257 
258  // Give up on an ITB fault..
259  unverifiedInst = NULL;
260  return;
261  } else {
262  // The instruction is carrying an ITB fault. Handle
263  // the fault and see if our results match the CPU on
264  // the next tick().
265  fault = unverifiedInst->getFault();
266  break;
267  }
268  } else {
269  PacketPtr pkt = new Packet(mem_req, MemCmd::ReadReq);
270 
271  pkt->dataStatic(decoder->moreBytesPtr());
272  icachePort->sendFunctional(pkt);
273 
274  delete pkt;
275  }
276  }
277 
278  if (fault == NoFault) {
279  std::unique_ptr<PCStateBase> pc_state(
280  thread->pcState().clone());
281 
282  if (isRomMicroPC(pc_state->microPC())) {
283  fetchDone = true;
284  curStaticInst = decoder->fetchRomMicroop(
285  pc_state->microPC(), nullptr);
286  } else if (!curMacroStaticInst) {
287  //We're not in the middle of a macro instruction
288  StaticInstPtr instPtr = nullptr;
289 
290  //Predecode, ie bundle up an ExtMachInst
291  //If more fetch data is needed, pass it in.
292  Addr fetch_pc =
293  (pc_state->instAddr() & pc_mask) + fetchOffset;
294  decoder->moreBytes(*pc_state, fetch_pc);
295 
296  //If an instruction is ready, decode it.
297  //Otherwise, we'll have to fetch beyond the
298  //memory chunk at the current pc.
299  if (decoder->instReady()) {
300  fetchDone = true;
301  instPtr = decoder->decode(*pc_state);
302  thread->pcState(*pc_state);
303  } else {
304  fetchDone = false;
305  fetchOffset += decoder->moreBytesSize();
306  }
307 
308  //If we decoded an instruction and it's microcoded,
309  //start pulling out micro ops
310  if (instPtr && instPtr->isMacroop()) {
311  curMacroStaticInst = instPtr;
312  curStaticInst =
313  instPtr->fetchMicroop(pc_state->microPC());
314  } else {
315  curStaticInst = instPtr;
316  }
317  } else {
318  // Read the next micro op from the macro-op
319  curStaticInst =
320  curMacroStaticInst->fetchMicroop(pc_state->microPC());
321  fetchDone = true;
322  }
323  }
324  }
325  // reset decoder on Checker
326  decoder->reset();
327 
328  // Check Checker and CPU get same instruction, and record
329  // any faults the CPU may have had.
330  Fault unverifiedFault;
331  if (fault == NoFault) {
332  unverifiedFault = unverifiedInst->getFault();
333 
334  // Checks that the instruction matches what we expected it to be.
335  // Checks both the machine instruction and the PC.
336  validateInst(unverifiedInst);
337  }
338 
339  // keep an instruction count
340  numInst++;
341 
342 
343  // Either the instruction was a fault and we should process the fault,
344  // or we should just go ahead execute the instruction. This assumes
345  // that the instruction is properly marked as a fault.
346  if (fault == NoFault) {
347  // Execute Checker instruction and trace
348  if (!unverifiedInst->isUnverifiable()) {
349  trace::InstRecord *traceData = tracer->getInstRecord(curTick(),
350  tc,
351  curStaticInst,
352  pcState(),
353  curMacroStaticInst);
354  fault = curStaticInst->execute(this, traceData);
355  if (traceData) {
356  traceData->dump();
357  delete traceData;
358  }
359  }
360 
361  if (fault == NoFault && unverifiedFault == NoFault) {
362  // Checks to make sure instrution results are correct.
363  validateExecution(unverifiedInst);
364 
365  if (curStaticInst->isLoad()) {
366  ++numLoad;
367  }
368  } else if (fault != NoFault && unverifiedFault == NoFault) {
369  panic("%lli: sn: %lli at PC: %s took a fault in checker "
370  "but not in driver CPU\n", curTick(),
371  unverifiedInst->seqNum, unverifiedInst->pcState());
372  } else if (fault == NoFault && unverifiedFault != NoFault) {
373  panic("%lli: sn: %lli at PC: %s took a fault in driver "
374  "CPU but not in checker\n", curTick(),
375  unverifiedInst->seqNum, unverifiedInst->pcState());
376  }
377  }
378 
379  // Take any faults here
380  if (fault != NoFault) {
381  if (FullSystem) {
382  fault->invoke(tc, curStaticInst);
383  willChangePC = true;
384  set(newPCState, thread->pcState());
385  DPRINTF(Checker, "Fault, PC is now %s\n", *newPCState);
386  curMacroStaticInst = nullStaticInstPtr;
387  }
388  } else {
389  advancePC(fault);
390  }
391 
392  if (FullSystem) {
393  // @todo: Determine if these should happen only if the
394  // instruction hasn't faulted. In the SimpleCPU case this may
395  // not be true, but in the O3 case this may be true.
396  Addr oldpc;
397  int count = 0;
398  do {
399  oldpc = thread->pcState().instAddr();
400  thread->pcEventQueue.service(oldpc, tc);
401  count++;
402  } while (oldpc != thread->pcState().instAddr());
403  if (count > 1) {
404  willChangePC = true;
405  set(newPCState, thread->pcState());
406  DPRINTF(Checker, "PC Event, PC is now %s\n", *newPCState);
407  }
408  }
409 
410  // @todo: Optionally can check all registers. (Or just those
411  // that have been modified).
412  validateState();
413 
414  // Continue verifying instructions if there's another completed
415  // instruction waiting to be verified.
416  if (instList.empty()) {
417  break;
418  } else if (instList.front()->isCompleted()) {
419  unverifiedInst = NULL;
420  unverifiedInst = instList.front();
421  instList.pop_front();
422  } else {
423  break;
424  }
425  }
426  unverifiedInst = NULL;
427 }
428 
429 template <class DynInstPtr>
430 void
432 {
433  instList.clear();
434 }
435 
436 template <class DynInstPtr>
438 
439 template <class DynInstPtr>
440 void
442 {
443  if (inst->pcState().instAddr() != thread->pcState().instAddr()) {
444  warn("%lli: PCs do not match! Inst: %s, checker: %s",
445  curTick(), inst->pcState(), thread->pcState());
446  if (changedPC) {
447  warn("%lli: Changed PCs recently, may not be an error",
448  curTick());
449  } else {
450  handleError(inst);
451  }
452  }
453 
454  if (curStaticInst != inst->staticInst) {
455  warn("%lli: StaticInstPtrs don't match. (%s, %s).\n", curTick(),
456  curStaticInst->getName(), inst->staticInst->getName());
457  }
458 }
459 
460 template <class DynInstPtr>
461 void
463 {
464  InstResult checker_val;
465  InstResult inst_val;
466  int idx = -1;
467  bool result_mismatch = false;
468 
469  if (inst->isUnverifiable()) {
470  // Unverifiable instructions assume they were executed
471  // properly by the CPU. Grab the result from the
472  // instruction and write it to the register.
473  copyResult(inst, InstResult(), idx);
474  } else if (inst->numDestRegs() > 0 && !result.empty()) {
475  DPRINTF(Checker, "Dest regs %d, number of checker dest regs %d\n",
476  inst->numDestRegs(), result.size());
477  for (int i = 0; i < inst->numDestRegs() && !result.empty(); i++) {
478  checker_val = result.front();
479  result.pop();
480  inst_val = inst->popResult();
481  if (checker_val != inst_val) {
482  result_mismatch = true;
483  idx = i;
484  }
485  }
486  } // Checker CPU checks all the saved results in the dyninst passed by
487  // the cpu model being checked against the saved results present in
488  // the static inst executed in the Checker. Sometimes the number
489  // of saved results differs between the dyninst and static inst, but
490  // this is ok and not a bug. May be worthwhile to try and correct this.
491 
492  if (result_mismatch) {
493  warn("%lli: Instruction results (%i) do not match! Inst: %s, "
494  "checker: %s",
495  curTick(), idx, inst_val.asString(), checker_val.asString());
496 
497  // It's useful to verify load values from memory, but in MP
498  // systems the value obtained at execute may be different than
499  // the value obtained at completion. Similarly DMA can
500  // present the same problem on even UP systems. Thus there is
501  // the option to only warn on loads having a result error.
502  // The load/store queue in Detailed CPU can also cause problems
503  // if load/store forwarding is allowed.
504  if (inst->isLoad() && warnOnlyOnLoadError) {
505  copyResult(inst, inst_val, idx);
506  } else {
507  handleError(inst);
508  }
509  }
510 
511  if (inst->pcState() != thread->pcState()) {
512  warn("%lli: Instruction PCs do not match! Inst: %s, checker: %s",
513  curTick(), inst->pcState(), thread->pcState());
514  handleError(inst);
515  }
516 
517  // Checking side effect registers can be difficult if they are not
518  // checked simultaneously with the execution of the instruction.
519  // This is because other valid instructions may have modified
520  // these registers in the meantime, and their values are not
521  // stored within the DynInst.
522  while (!miscRegIdxs.empty()) {
523  int misc_reg_idx = miscRegIdxs.front();
524  miscRegIdxs.pop();
525 
526  if (inst->tcBase()->readMiscRegNoEffect(misc_reg_idx) !=
527  thread->readMiscRegNoEffect(misc_reg_idx)) {
528  warn("%lli: Misc reg idx %i (side effect) does not match! "
529  "Inst: %#x, checker: %#x",
530  curTick(), misc_reg_idx,
531  inst->tcBase()->readMiscRegNoEffect(misc_reg_idx),
532  thread->readMiscRegNoEffect(misc_reg_idx));
533  handleError(inst);
534  }
535  }
536 }
537 
538 
539 // This function is weird, if it is called it means the Checker and
540 // O3 have diverged, so panic is called for now. It may be useful
541 // to resynch states and continue if the divergence is a false positive
542 template <class DynInstPtr>
543 void
545 {
546  if (updateThisCycle) {
547  // Change this back to warn if divergences end up being false positives
548  panic("%lli: Instruction PC %#x results didn't match up, copying all "
549  "registers from main CPU", curTick(),
550  unverifiedInst->pcState().instAddr());
551 
552  // Terribly convoluted way to make sure O3 model does not implode
553  bool no_squash_from_TC = unverifiedInst->thread->noSquashFromTC;
554  unverifiedInst->thread->noSquashFromTC = true;
555 
556  // Heavy-weight copying of all registers
557  thread->copyArchRegs(unverifiedInst->tcBase());
558  unverifiedInst->thread->noSquashFromTC = no_squash_from_TC;
559 
560  // Set curStaticInst to unverifiedInst->staticInst
561  curStaticInst = unverifiedInst->staticInst;
562  // Also advance the PC. Hopefully no PC-based events happened.
563  advancePC(NoFault);
564  updateThisCycle = false;
565  }
566 }
567 
568 template <class DynInstPtr>
569 void
571  const DynInstPtr &inst, const InstResult& mismatch_val, int start_idx)
572 {
573  // We've already popped one dest off the queue,
574  // so do the fix-up then start with the next dest reg;
575  if (start_idx >= 0) {
576  const RegId& idx = inst->destRegIdx(start_idx);
577 
578  if (idx.classValue() == InvalidRegClass)
579  ; // Do nothing.
580  else if (idx.classValue() == MiscRegClass)
581  thread->setMiscReg(idx.index(), mismatch_val.asRegVal());
582  else if (mismatch_val.isBlob())
583  thread->setReg(idx, mismatch_val.asBlob());
584  else
585  thread->setReg(idx, mismatch_val.asRegVal());
586  }
587  start_idx++;
588  InstResult res;
589  for (int i = start_idx; i < inst->numDestRegs(); i++) {
590  const RegId& idx = inst->destRegIdx(i);
591  res = inst->popResult();
592 
593  if (idx.classValue() == InvalidRegClass)
594  ; // Do nothing.
595  else if (idx.classValue() == MiscRegClass)
596  thread->setMiscReg(idx.index(), 0);
597  else if (res.isBlob())
598  thread->setReg(idx, res.asBlob());
599  else
600  thread->setReg(idx, res.asRegVal());
601  }
602 }
603 
604 template <class DynInstPtr>
605 void
607 {
608  cprintf("Error detected, instruction information:\n");
609  cprintf("PC:%s\n[sn:%lli]\n[tid:%i]\n"
610  "Completed:%i\n",
611  inst->pcState(),
612  inst->seqNum,
613  inst->threadNumber,
614  inst->isCompleted());
615  inst->dump();
617 }
618 
619 template <class DynInstPtr>
620 void
622 {
623  int num = 0;
624 
625  InstListIt inst_list_it = --(instList.end());
626 
627  cprintf("Inst list size: %i\n", instList.size());
628 
629  while (inst_list_it != instList.end())
630  {
631  cprintf("Instruction:%i\n",
632  num);
633 
634  cprintf("PC:%s\n[sn:%lli]\n[tid:%i]\n"
635  "Completed:%i\n",
636  (*inst_list_it)->pcState(),
637  (*inst_list_it)->seqNum,
638  (*inst_list_it)->threadNumber,
639  (*inst_list_it)->isCompleted());
640 
641  cprintf("\n");
642 
643  inst_list_it--;
644  ++num;
645  }
646 
647 }
648 
649 } // namespace gem5
650 
651 #endif//__CPU_CHECKER_CPU_IMPL_HH__
#define DPRINTF(x,...)
Definition: trace.hh:186
@ Execute
Definition: mmu.hh:56
void handleError()
Definition: cpu.hh:412
const PCStateBase & pcState() const override
Definition: cpu.hh:274
void dumpAndExit()
Definition: cpu.cc:373
Templated Checker class.
Definition: cpu.hh:448
void validateState()
Definition: cpu_impl.hh:544
void validateExecution(const DynInstPtr &inst)
Definition: cpu_impl.hh:462
void verify(const DynInstPtr &inst)
Definition: cpu_impl.hh:119
void validateInst(const DynInstPtr &inst)
Definition: cpu_impl.hh:441
void advancePC(const Fault &fault)
Definition: cpu_impl.hh:66
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
Definition: cpu_impl.hh:570
void handlePendingInt()
Definition: cpu_impl.hh:85
void dumpInsts()
Definition: cpu_impl.hh:621
void switchOut()
Prepare for another CPU to take over execution.
Definition: cpu_impl.hh:431
std::list< DynInstPtr >::iterator InstListIt
Definition: cpu.hh:487
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
RegVal asRegVal() const
Definition: inst_res.hh:156
const void * asBlob() const
Definition: inst_res.hh:163
std::string asString() const
Definition: inst_res.hh:170
bool isBlob() const
Definition: inst_res.hh:153
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
void dataStatic(T *p)
Set the data pointer to the following value that should not be freed.
Definition: packet.hh:1162
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:91
constexpr RegClassType classValue() const
Definition: reg_class.hh:272
constexpr RegIndex index() const
Index accessors.
Definition: reg_class.hh:148
@ INST_FETCH
The request was an instruction fetch.
Definition: request.hh:115
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
Definition: static_inst.cc:39
virtual void advancePC(PCStateBase &pc_state) const =0
bool isMacroop() const
Definition: static_inst.hh:185
virtual void dump()=0
STL list class.
Definition: stl.hh:51
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:178
#define warn(...)
Definition: logging.hh:246
Bitfield< 7 > i
Definition: misc_types.hh:67
Bitfield< 12, 11 > set
Definition: misc_types.hh:709
RefCountingPtr< DynInst > DynInstPtr
Definition: dyn_inst_ptr.hh:55
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:109
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< FaultBase > Fault
Definition: types.hh:248
void cprintf(const char *format, const Args &...args)
Definition: cprintf.hh:155
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Definition: root.cc:220
static bool isRomMicroPC(MicroPC upc)
Definition: types.hh:166
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.
constexpr decltype(nullptr) NoFault
Definition: types.hh:253
@ InvalidRegClass
Definition: reg_class.hh:69
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:68
output decoder
Definition: nop.cc:61
Classes for managing reference counted objects.

Generated on Wed Dec 21 2022 10:22:30 for gem5 by doxygen 1.9.1