gem5  v20.1.0.0
mem_dep_unit_impl.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, 2014, 2020 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2004-2006 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 #ifndef __CPU_O3_MEM_DEP_UNIT_IMPL_HH__
42 #define __CPU_O3_MEM_DEP_UNIT_IMPL_HH__
43 
44 #include <map>
45 #include <vector>
46 
47 #include "cpu/o3/inst_queue.hh"
48 #include "cpu/o3/mem_dep_unit.hh"
49 #include "debug/MemDepUnit.hh"
50 #include "params/DerivO3CPU.hh"
51 
52 template <class MemDepPred, class Impl>
54  : iqPtr(NULL)
55 {
56 }
57 
58 template <class MemDepPred, class Impl>
60  : _name(params->name + ".memdepunit"),
61  depPred(params->store_set_clear_period, params->SSITSize,
62  params->LFSTSize),
63  iqPtr(NULL)
64 {
65  DPRINTF(MemDepUnit, "Creating MemDepUnit object.\n");
66 }
67 
68 template <class MemDepPred, class Impl>
70 {
71  for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
72 
73  ListIt inst_list_it = instList[tid].begin();
74 
75  MemDepHashIt hash_it;
76 
77  while (!instList[tid].empty()) {
78  hash_it = memDepHash.find((*inst_list_it)->seqNum);
79 
80  assert(hash_it != memDepHash.end());
81 
82  memDepHash.erase(hash_it);
83 
84  instList[tid].erase(inst_list_it++);
85  }
86  }
87 
88 #ifdef DEBUG
89  assert(MemDepEntry::memdep_count == 0);
90 #endif
91 }
92 
93 template <class MemDepPred, class Impl>
94 void
95 MemDepUnit<MemDepPred, Impl>::init(DerivO3CPUParams *params, ThreadID tid)
96 {
97  DPRINTF(MemDepUnit, "Creating MemDepUnit %i object.\n",tid);
98 
99  _name = csprintf("%s.memDep%d", params->name, tid);
100  id = tid;
101 
102  depPred.init(params->store_set_clear_period, params->SSITSize,
103  params->LFSTSize);
104 }
105 
106 template <class MemDepPred, class Impl>
107 void
109 {
110  insertedLoads
111  .name(name() + ".insertedLoads")
112  .desc("Number of loads inserted to the mem dependence unit.");
113 
114  insertedStores
115  .name(name() + ".insertedStores")
116  .desc("Number of stores inserted to the mem dependence unit.");
117 
118  conflictingLoads
119  .name(name() + ".conflictingLoads")
120  .desc("Number of conflicting loads.");
121 
122  conflictingStores
123  .name(name() + ".conflictingStores")
124  .desc("Number of conflicting stores.");
125 }
126 
127 template <class MemDepPred, class Impl>
128 bool
130 {
131  bool drained = instsToReplay.empty()
132  && memDepHash.empty()
133  && instsToReplay.empty();
134  for (int i = 0; i < Impl::MaxThreads; ++i)
135  drained = drained && instList[i].empty();
136 
137  return drained;
138 }
139 
140 template <class MemDepPred, class Impl>
141 void
143 {
144  assert(instsToReplay.empty());
145  assert(memDepHash.empty());
146  for (int i = 0; i < Impl::MaxThreads; ++i)
147  assert(instList[i].empty());
148  assert(instsToReplay.empty());
149  assert(memDepHash.empty());
150 }
151 
152 template <class MemDepPred, class Impl>
153 void
155 {
156  // Be sure to reset all state.
157  loadBarrierSNs.clear();
158  storeBarrierSNs.clear();
159  depPred.clear();
160 }
161 
162 template <class MemDepPred, class Impl>
163 void
165 {
166  iqPtr = iq_ptr;
167 }
168 
169 template <class MemDepPred, class Impl>
170 void
172 {
173  InstSeqNum barr_sn = barr_inst->seqNum;
174  // Memory barriers block loads and stores, write barriers only stores.
175  // Required also for hardware transactional memory commands which
176  // can have strict ordering semantics
177  if (barr_inst->isMemBarrier() || barr_inst->isHtmCmd()) {
178  loadBarrierSNs.insert(barr_sn);
179  storeBarrierSNs.insert(barr_sn);
180  DPRINTF(MemDepUnit, "Inserted a memory barrier %s SN:%lli\n",
181  barr_inst->pcState(), barr_sn);
182  } else if (barr_inst->isWriteBarrier()) {
183  storeBarrierSNs.insert(barr_sn);
184  DPRINTF(MemDepUnit, "Inserted a write barrier %s SN:%lli\n",
185  barr_inst->pcState(), barr_sn);
186  }
187 
188  if (loadBarrierSNs.size() || storeBarrierSNs.size()) {
189  DPRINTF(MemDepUnit, "Outstanding load barriers = %d; "
190  "store barriers = %d\n",
191  loadBarrierSNs.size(), storeBarrierSNs.size());
192  }
193 }
194 
195 template <class MemDepPred, class Impl>
196 void
198 {
199  ThreadID tid = inst->threadNumber;
200 
201  MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(inst);
202 
203  // Add the MemDepEntry to the hash.
204  memDepHash.insert(
205  std::pair<InstSeqNum, MemDepEntryPtr>(inst->seqNum, inst_entry));
206 #ifdef DEBUG
207  MemDepEntry::memdep_insert++;
208 #endif
209 
210  instList[tid].push_back(inst);
211 
212  inst_entry->listIt = --(instList[tid].end());
213 
214  // Check any barriers and the dependence predictor for any
215  // producing memrefs/stores.
216  std::vector<InstSeqNum> producing_stores;
217  if ((inst->isLoad() || inst->isAtomic()) && hasLoadBarrier()) {
218  DPRINTF(MemDepUnit, "%d load barriers in flight\n",
219  loadBarrierSNs.size());
220  producing_stores.insert(std::end(producing_stores),
221  std::begin(loadBarrierSNs),
222  std::end(loadBarrierSNs));
223  } else if ((inst->isStore() || inst->isAtomic()) && hasStoreBarrier()) {
224  DPRINTF(MemDepUnit, "%d store barriers in flight\n",
225  storeBarrierSNs.size());
226  producing_stores.insert(std::end(producing_stores),
227  std::begin(storeBarrierSNs),
228  std::end(storeBarrierSNs));
229  } else {
230  InstSeqNum dep = depPred.checkInst(inst->instAddr());
231  if (dep != 0)
232  producing_stores.push_back(dep);
233  }
234 
235  std::vector<MemDepEntryPtr> store_entries;
236 
237  // If there is a producing store, try to find the entry.
238  for (auto producing_store : producing_stores) {
239  DPRINTF(MemDepUnit, "Searching for producer [sn:%lli]\n",
240  producing_store);
241  MemDepHashIt hash_it = memDepHash.find(producing_store);
242 
243  if (hash_it != memDepHash.end()) {
244  store_entries.push_back((*hash_it).second);
245  DPRINTF(MemDepUnit, "Producer found\n");
246  }
247  }
248 
249  // If no store entry, then instruction can issue as soon as the registers
250  // are ready.
251  if (store_entries.empty()) {
252  DPRINTF(MemDepUnit, "No dependency for inst PC "
253  "%s [sn:%lli].\n", inst->pcState(), inst->seqNum);
254 
255  assert(inst_entry->memDeps == 0);
256 
257  if (inst->readyToIssue()) {
258  inst_entry->regsReady = true;
259 
260  moveToReady(inst_entry);
261  }
262  } else {
263  // Otherwise make the instruction dependent on the store/barrier.
264  DPRINTF(MemDepUnit, "Adding to dependency list\n");
265  for (auto M5_VAR_USED producing_store : producing_stores)
266  DPRINTF(MemDepUnit, "\tinst PC %s is dependent on [sn:%lli].\n",
267  inst->pcState(), producing_store);
268 
269  if (inst->readyToIssue()) {
270  inst_entry->regsReady = true;
271  }
272 
273  // Clear the bit saying this instruction can issue.
274  inst->clearCanIssue();
275 
276  // Add this instruction to the list of dependents.
277  for (auto store_entry : store_entries)
278  store_entry->dependInsts.push_back(inst_entry);
279 
280  inst_entry->memDeps = store_entries.size();
281 
282  if (inst->isLoad()) {
283  ++conflictingLoads;
284  } else {
285  ++conflictingStores;
286  }
287  }
288 
289  // for load-acquire store-release that could also be a barrier
290  insertBarrierSN(inst);
291 
292  if (inst->isStore() || inst->isAtomic()) {
293  DPRINTF(MemDepUnit, "Inserting store/atomic PC %s [sn:%lli].\n",
294  inst->pcState(), inst->seqNum);
295 
296  depPred.insertStore(inst->instAddr(), inst->seqNum, inst->threadNumber);
297 
298  ++insertedStores;
299  } else if (inst->isLoad()) {
300  ++insertedLoads;
301  } else {
302  panic("Unknown type! (most likely a barrier).");
303  }
304 }
305 
306 template <class MemDepPred, class Impl>
307 void
309 {
310  insertBarrier(inst);
311 
312  // Might want to turn this part into an inline function or something.
313  // It's shared between both insert functions.
314  if (inst->isStore() || inst->isAtomic()) {
315  DPRINTF(MemDepUnit, "Inserting store/atomic PC %s [sn:%lli].\n",
316  inst->pcState(), inst->seqNum);
317 
318  depPred.insertStore(inst->instAddr(), inst->seqNum, inst->threadNumber);
319 
320  ++insertedStores;
321  } else if (inst->isLoad()) {
322  ++insertedLoads;
323  } else {
324  panic("Unknown type! (most likely a barrier).");
325  }
326 }
327 
328 template <class MemDepPred, class Impl>
329 void
331 {
332  ThreadID tid = barr_inst->threadNumber;
333 
334  MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(barr_inst);
335 
336  // Add the MemDepEntry to the hash.
337  memDepHash.insert(
338  std::pair<InstSeqNum, MemDepEntryPtr>(barr_inst->seqNum, inst_entry));
339 #ifdef DEBUG
340  MemDepEntry::memdep_insert++;
341 #endif
342 
343  // Add the instruction to the instruction list.
344  instList[tid].push_back(barr_inst);
345 
346  inst_entry->listIt = --(instList[tid].end());
347 
348  insertBarrierSN(barr_inst);
349 }
350 
351 template <class MemDepPred, class Impl>
352 void
354 {
355  DPRINTF(MemDepUnit, "Marking registers as ready for "
356  "instruction PC %s [sn:%lli].\n",
357  inst->pcState(), inst->seqNum);
358 
359  MemDepEntryPtr inst_entry = findInHash(inst);
360 
361  inst_entry->regsReady = true;
362 
363  if (inst_entry->memDeps == 0) {
364  DPRINTF(MemDepUnit, "Instruction has its memory "
365  "dependencies resolved, adding it to the ready list.\n");
366 
367  moveToReady(inst_entry);
368  } else {
369  DPRINTF(MemDepUnit, "Instruction still waiting on "
370  "memory dependency.\n");
371  }
372 }
373 
374 template <class MemDepPred, class Impl>
375 void
377 {
378  DPRINTF(MemDepUnit, "Marking non speculative "
379  "instruction PC %s as ready [sn:%lli].\n",
380  inst->pcState(), inst->seqNum);
381 
382  MemDepEntryPtr inst_entry = findInHash(inst);
383 
384  moveToReady(inst_entry);
385 }
386 
387 template <class MemDepPred, class Impl>
388 void
390 {
391  instsToReplay.push_back(inst);
392 }
393 
394 template <class MemDepPred, class Impl>
395 void
397 {
398  DynInstPtr temp_inst;
399 
400  // For now this replay function replays all waiting memory ops.
401  while (!instsToReplay.empty()) {
402  temp_inst = instsToReplay.front();
403 
404  MemDepEntryPtr inst_entry = findInHash(temp_inst);
405 
406  DPRINTF(MemDepUnit, "Replaying mem instruction PC %s [sn:%lli].\n",
407  temp_inst->pcState(), temp_inst->seqNum);
408 
409  moveToReady(inst_entry);
410 
411  instsToReplay.pop_front();
412  }
413 }
414 
415 template <class MemDepPred, class Impl>
416 void
418 {
419  DPRINTF(MemDepUnit, "Completed mem instruction PC %s [sn:%lli].\n",
420  inst->pcState(), inst->seqNum);
421 
422  ThreadID tid = inst->threadNumber;
423 
424  // Remove the instruction from the hash and the list.
425  MemDepHashIt hash_it = memDepHash.find(inst->seqNum);
426 
427  assert(hash_it != memDepHash.end());
428 
429  instList[tid].erase((*hash_it).second->listIt);
430 
431  (*hash_it).second = NULL;
432 
433  memDepHash.erase(hash_it);
434 #ifdef DEBUG
435  MemDepEntry::memdep_erase++;
436 #endif
437 }
438 
439 template <class MemDepPred, class Impl>
440 void
442 {
443  wakeDependents(inst);
444  completed(inst);
445  InstSeqNum barr_sn = inst->seqNum;
446 
447  if (inst->isMemBarrier() || inst->isHtmCmd()) {
448  assert(hasLoadBarrier());
449  assert(hasStoreBarrier());
450  loadBarrierSNs.erase(barr_sn);
451  storeBarrierSNs.erase(barr_sn);
452  DPRINTF(MemDepUnit, "Memory barrier completed: %s SN:%lli\n",
453  inst->pcState(), inst->seqNum);
454  } else if (inst->isWriteBarrier()) {
455  assert(hasStoreBarrier());
456  storeBarrierSNs.erase(barr_sn);
457  DPRINTF(MemDepUnit, "Write barrier completed: %s SN:%lli\n",
458  inst->pcState(), inst->seqNum);
459  }
460 }
461 
462 template <class MemDepPred, class Impl>
463 void
465 {
466  // Only stores, atomics, barriers and
467  // hardware transactional memory commands have dependents.
468  if (!inst->isStore() && !inst->isAtomic() && !inst->isMemBarrier() &&
469  !inst->isWriteBarrier() && !inst->isHtmCmd()) {
470  return;
471  }
472 
473  MemDepEntryPtr inst_entry = findInHash(inst);
474 
475  for (int i = 0; i < inst_entry->dependInsts.size(); ++i ) {
476  MemDepEntryPtr woken_inst = inst_entry->dependInsts[i];
477 
478  if (!woken_inst->inst) {
479  // Potentially removed mem dep entries could be on this list
480  continue;
481  }
482 
483  DPRINTF(MemDepUnit, "Waking up a dependent inst, "
484  "[sn:%lli].\n",
485  woken_inst->inst->seqNum);
486 
487  assert(woken_inst->memDeps > 0);
488  woken_inst->memDeps -= 1;
489 
490  if ((woken_inst->memDeps == 0) &&
491  woken_inst->regsReady &&
492  !woken_inst->squashed) {
493  moveToReady(woken_inst);
494  }
495  }
496 
497  inst_entry->dependInsts.clear();
498 }
499 
500 template <class MemDepPred, class Impl>
501 void
503  ThreadID tid)
504 {
505  if (!instsToReplay.empty()) {
506  ListIt replay_it = instsToReplay.begin();
507  while (replay_it != instsToReplay.end()) {
508  if ((*replay_it)->threadNumber == tid &&
509  (*replay_it)->seqNum > squashed_num) {
510  instsToReplay.erase(replay_it++);
511  } else {
512  ++replay_it;
513  }
514  }
515  }
516 
517  ListIt squash_it = instList[tid].end();
518  --squash_it;
519 
520  MemDepHashIt hash_it;
521 
522  while (!instList[tid].empty() &&
523  (*squash_it)->seqNum > squashed_num) {
524 
525  DPRINTF(MemDepUnit, "Squashing inst [sn:%lli]\n",
526  (*squash_it)->seqNum);
527 
528  loadBarrierSNs.erase((*squash_it)->seqNum);
529 
530  storeBarrierSNs.erase((*squash_it)->seqNum);
531 
532  hash_it = memDepHash.find((*squash_it)->seqNum);
533 
534  assert(hash_it != memDepHash.end());
535 
536  (*hash_it).second->squashed = true;
537 
538  (*hash_it).second = NULL;
539 
540  memDepHash.erase(hash_it);
541 #ifdef DEBUG
542  MemDepEntry::memdep_erase++;
543 #endif
544 
545  instList[tid].erase(squash_it--);
546  }
547 
548  // Tell the dependency predictor to squash as well.
549  depPred.squash(squashed_num, tid);
550 }
551 
552 template <class MemDepPred, class Impl>
553 void
555  const DynInstPtr &violating_load)
556 {
557  DPRINTF(MemDepUnit, "Passing violating PCs to store sets,"
558  " load: %#x, store: %#x\n", violating_load->instAddr(),
559  store_inst->instAddr());
560  // Tell the memory dependence unit of the violation.
561  depPred.violation(store_inst->instAddr(), violating_load->instAddr());
562 }
563 
564 template <class MemDepPred, class Impl>
565 void
567 {
568  DPRINTF(MemDepUnit, "Issuing instruction PC %#x [sn:%lli].\n",
569  inst->instAddr(), inst->seqNum);
570 
571  depPred.issued(inst->instAddr(), inst->seqNum, inst->isStore());
572 }
573 
574 template <class MemDepPred, class Impl>
577 {
578  MemDepHashIt hash_it = memDepHash.find(inst->seqNum);
579 
580  assert(hash_it != memDepHash.end());
581 
582  return (*hash_it).second;
583 }
584 
585 template <class MemDepPred, class Impl>
586 inline void
588 {
589  DPRINTF(MemDepUnit, "Adding instruction [sn:%lli] "
590  "to the ready list.\n", woken_inst_entry->inst->seqNum);
591 
592  assert(!woken_inst_entry->squashed);
593 
594  iqPtr->addReadyMemInst(woken_inst_entry->inst);
595 }
596 
597 
598 template <class MemDepPred, class Impl>
599 void
601 {
602  for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
603  cprintf("Instruction list %i size: %i\n",
604  tid, instList[tid].size());
605 
606  ListIt inst_list_it = instList[tid].begin();
607  int num = 0;
608 
609  while (inst_list_it != instList[tid].end()) {
610  cprintf("Instruction:%i\nPC: %s\n[sn:%llu]\n[tid:%i]\nIssued:%i\n"
611  "Squashed:%i\n\n",
612  num, (*inst_list_it)->pcState(),
613  (*inst_list_it)->seqNum,
614  (*inst_list_it)->threadNumber,
615  (*inst_list_it)->isIssued(),
616  (*inst_list_it)->isSquashed());
617  inst_list_it++;
618  ++num;
619  }
620  }
621 
622  cprintf("Memory dependence hash size: %i\n", memDepHash.size());
623 
624 #ifdef DEBUG
625  cprintf("Memory dependence entries: %i\n", MemDepEntry::memdep_count);
626 #endif
627 }
628 
629 #endif//__CPU_O3_MEM_DEP_UNIT_IMPL_HH__
MemDepUnit::MemDepHashIt
MemDepHash::iterator MemDepHashIt
Definition: mem_dep_unit.hh:244
MemDepUnit::replay
void replay()
Replays all instructions that have been rescheduled by moving them to the ready list.
Definition: mem_dep_unit_impl.hh:396
MemDepUnit::DynInstConstPtr
Impl::DynInstConstPtr DynInstConstPtr
Definition: mem_dep_unit.hh:87
MemDepUnit::takeOverFrom
void takeOverFrom()
Takes over from another CPU's thread.
Definition: mem_dep_unit_impl.hh:154
MemDepUnit::ListIt
std::list< DynInstPtr >::iterator ListIt
Definition: mem_dep_unit.hh:168
MemDepUnit::nonSpecInstReady
void nonSpecInstReady(const DynInstPtr &inst)
Indicate that a non-speculative instruction is ready.
Definition: mem_dep_unit_impl.hh:376
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
MemDepUnit::wakeDependents
void wakeDependents(const DynInstPtr &inst)
Wakes any dependents of a memory instruction.
Definition: mem_dep_unit_impl.hh:464
MemDepUnit::isDrained
bool isDrained() const
Determine if we are drained.
Definition: mem_dep_unit_impl.hh:129
MemDepUnit::issue
void issue(const DynInstPtr &inst)
Issues the given instruction.
Definition: mem_dep_unit_impl.hh:566
std::vector< InstSeqNum >
MemDepUnit::MemDepUnit
MemDepUnit()
Empty constructor.
Definition: mem_dep_unit_impl.hh:53
MemDepUnit::completeInst
void completeInst(const DynInstPtr &inst)
Notifies completion of an instruction.
Definition: mem_dep_unit_impl.hh:441
MemDepUnit::violation
void violation(const DynInstPtr &store_inst, const DynInstPtr &violating_load)
Indicates an ordering violation between a store and a younger load.
Definition: mem_dep_unit_impl.hh:554
MemDepUnit::findInHash
MemDepEntryPtr & findInHash(const DynInstConstPtr &inst)
Finds the memory dependence entry in the hash map.
Definition: mem_dep_unit_impl.hh:576
MemDepUnit::squash
void squash(const InstSeqNum &squashed_num, ThreadID tid)
Squashes all instructions up until a given sequence number for a specific thread.
Definition: mem_dep_unit_impl.hh:502
MemDepUnit::dumpLists
void dumpLists()
Debugging function to dump the lists of instructions.
Definition: mem_dep_unit_impl.hh:600
MemDepUnit::insertNonSpec
void insertNonSpec(const DynInstPtr &inst)
Inserts a non-speculative memory instruction.
Definition: mem_dep_unit_impl.hh:308
cprintf
void cprintf(const char *format, const Args &...args)
Definition: cprintf.hh:152
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
MemDepUnit::~MemDepUnit
~MemDepUnit()
Frees up any memory allocated.
Definition: mem_dep_unit_impl.hh:69
mem_dep_unit.hh
MemDepUnit::reschedule
void reschedule(const DynInstPtr &inst)
Reschedules an instruction to be re-executed.
Definition: mem_dep_unit_impl.hh:389
MemDepUnit::moveToReady
void moveToReady(MemDepEntryPtr &ready_inst_entry)
Moves an entry to the ready list.
Definition: mem_dep_unit_impl.hh:587
std::pair
STL pair class.
Definition: stl.hh:58
InstSeqNum
uint64_t InstSeqNum
Definition: inst_seq.hh:37
MemDepUnit::setIQ
void setIQ(InstructionQueue< Impl > *iq_ptr)
Sets the pointer to the IQ.
Definition: mem_dep_unit_impl.hh:164
name
const std::string & name()
Definition: trace.cc:50
MemDepUnit::insertBarrier
void insertBarrier(const DynInstPtr &barr_inst)
Inserts a barrier instruction.
Definition: mem_dep_unit_impl.hh:330
MemDepUnit::regsReady
void regsReady(const DynInstPtr &inst)
Indicate that an instruction has its registers ready.
Definition: mem_dep_unit_impl.hh:353
MemDepUnit::insert
void insert(const DynInstPtr &inst)
Inserts a memory instruction.
Definition: mem_dep_unit_impl.hh:197
MemDepUnit::insertBarrierSN
void insertBarrierSN(const DynInstPtr &barr_inst)
Inserts the SN of a barrier inst.
Definition: mem_dep_unit_impl.hh:171
InstructionQueue
A standard instruction queue class.
Definition: inst_queue.hh:81
MemDepUnit::DynInstPtr
Impl::DynInstPtr DynInstPtr
Definition: mem_dep_unit.hh:86
MemDepUnit::MemDepEntryPtr
std::shared_ptr< MemDepEntry > MemDepEntryPtr
Definition: mem_dep_unit.hh:170
MemDepUnit::init
void init(DerivO3CPUParams *params, ThreadID tid)
Initializes the unit with parameters and a thread id.
Definition: mem_dep_unit_impl.hh:95
MemDepUnit::drainSanityCheck
void drainSanityCheck() const
Perform sanity checks after a drain.
Definition: mem_dep_unit_impl.hh:142
inst_queue.hh
MemDepUnit
Memory dependency unit class.
Definition: mem_dep_unit.hh:80
MemDepUnit::regStats
void regStats()
Registers statistics.
Definition: mem_dep_unit_impl.hh:108
MemDepUnit::completed
void completed(const DynInstPtr &inst)
Completes a memory instruction.
Definition: mem_dep_unit_impl.hh:417
csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:158
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171

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