gem5  v20.1.0.0
lsq_unit.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2014,2017-2018,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  * Copyright (c) 2013 Advanced Micro Devices, Inc.
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_O3_LSQ_UNIT_HH__
43 #define __CPU_O3_LSQ_UNIT_HH__
44 
45 #include <algorithm>
46 #include <cstring>
47 #include <map>
48 #include <memory>
49 #include <queue>
50 
52 #include "arch/generic/vec_reg.hh"
53 #include "arch/locked_mem.hh"
54 #include "config/the_isa.hh"
55 #include "cpu/inst_seq.hh"
56 #include "cpu/timebuf.hh"
57 #include "debug/HtmCpu.hh"
58 #include "debug/LSQUnit.hh"
59 #include "mem/packet.hh"
60 #include "mem/port.hh"
61 
62 struct DerivO3CPUParams;
63 #include "base/circular_queue.hh"
64 
77 template <class Impl>
78 class LSQUnit
79 {
80  public:
81  static constexpr auto MaxDataBytes = MaxVecRegLenInBytes;
82 
83  typedef typename Impl::O3CPU O3CPU;
84  typedef typename Impl::DynInstPtr DynInstPtr;
85  typedef typename Impl::CPUPol::IEW IEW;
86  typedef typename Impl::CPUPol::LSQ LSQ;
87  typedef typename Impl::CPUPol::IssueStruct IssueStruct;
88 
90  using LSQRequest = typename Impl::CPUPol::LSQ::LSQRequest;
91  private:
92  class LSQEntry
93  {
94  private:
100  uint32_t _size;
102  bool _valid;
103  public:
106  : inst(nullptr), req(nullptr), _size(0), _valid(false)
107  {
108  }
109 
111  {
112  inst = nullptr;
113  if (req != nullptr) {
114  req->freeLSQEntry();
115  req = nullptr;
116  }
117  }
118 
119  void
121  {
122  inst = nullptr;
123  if (req != nullptr) {
124  req->freeLSQEntry();
125  }
126  req = nullptr;
127  _valid = false;
128  _size = 0;
129  }
130 
131  void
133  {
134  assert(!_valid);
135  this->inst = inst;
136  _valid = true;
137  _size = 0;
138  }
139  LSQRequest* request() { return req; }
140  void setRequest(LSQRequest* r) { req = r; }
141  bool hasRequest() { return req != nullptr; }
144  bool valid() const { return _valid; }
145  uint32_t& size() { return _size; }
146  const uint32_t& size() const { return _size; }
147  const DynInstPtr& instruction() const { return inst; }
149  };
150 
151  class SQEntry : public LSQEntry
152  {
153  private:
157  bool _canWB;
167  public:
168  static constexpr size_t DataSize = sizeof(_data);
171  : _canWB(false), _committed(false), _completed(false),
172  _isAllZeros(false)
173  {
174  std::memset(_data, 0, DataSize);
175  }
176 
178  {
179  }
180 
181  void
183  {
185  }
186 
187  void
189  {
190  LSQEntry::clear();
191  _canWB = _completed = _committed = _isAllZeros = false;
192  }
195  bool& canWB() { return _canWB; }
196  const bool& canWB() const { return _canWB; }
197  bool& completed() { return _completed; }
198  const bool& completed() const { return _completed; }
199  bool& committed() { return _committed; }
200  const bool& committed() const { return _committed; }
201  bool& isAllZeros() { return _isAllZeros; }
202  const bool& isAllZeros() const { return _isAllZeros; }
203  char* data() { return _data; }
204  const char* data() const { return _data; }
206  };
207  using LQEntry = LSQEntry;
208 
210  enum class AddrRangeCoverage
211  {
212  PartialAddrRangeCoverage, /* Two ranges partly overlap */
213  FullAddrRangeCoverage, /* One range fully covers another */
214  NoAddrRangeCoverage /* Two ranges are disjoint */
215  };
216 
217  public:
220 
221  public:
223  LSQUnit(uint32_t lqEntries, uint32_t sqEntries);
224 
229  LSQUnit(const LSQUnit &l): stats(nullptr)
230  {
231  panic("LSQUnit is not copy-able");
232  }
233 
235  void init(O3CPU *cpu_ptr, IEW *iew_ptr, DerivO3CPUParams *params,
236  LSQ *lsq_ptr, unsigned id);
237 
239  std::string name() const;
240 
242  void setDcachePort(RequestPort *dcache_port);
243 
245  void drainSanityCheck() const;
246 
248  void takeOverFrom();
249 
251  void insert(const DynInstPtr &inst);
253  void insertLoad(const DynInstPtr &load_inst);
255  void insertStore(const DynInstPtr &store_inst);
256 
263  Fault checkViolations(typename LoadQueue::iterator& loadIt,
264  const DynInstPtr& inst);
265 
270  void checkSnoop(PacketPtr pkt);
271 
273  Fault executeLoad(const DynInstPtr &inst);
274 
275  Fault executeLoad(int lq_idx) { panic("Not implemented"); return NoFault; }
277  Fault executeStore(const DynInstPtr &inst);
278 
280  void commitLoad();
282  void commitLoads(InstSeqNum &youngest_inst);
283 
285  void commitStores(InstSeqNum &youngest_inst);
286 
288  void writebackStores();
289 
292  void completeDataAccess(PacketPtr pkt);
293 
295  void squash(const InstSeqNum &squashed_num);
296 
300  bool violation() { return memDepViolator; }
301 
304 
306  unsigned numFreeLoadEntries();
307 
309  unsigned numFreeStoreEntries();
310 
312  int numLoads() { return loads; }
313 
315  int numStores() { return stores; }
316 
317  // hardware transactional memory
318  int numHtmStarts() const { return htmStarts; }
319  int numHtmStops() const { return htmStops; }
321  uint64_t getLatestHtmUid() const
322  {
323  const auto& htm_cpt = cpu->tcBase(lsqID)->getHtmCheckpointPtr();
324  return htm_cpt->getHtmUid();
325  }
326  void setLastRetiredHtmUid(uint64_t htm_uid)
327  {
328  assert(htm_uid >= lastRetiredHtmUid);
329  lastRetiredHtmUid = htm_uid;
330  }
331 
333  bool isFull() { return lqFull() || sqFull(); }
334 
336  bool isEmpty() const { return lqEmpty() && sqEmpty(); }
337 
339  bool lqFull() { return loadQueue.full(); }
340 
342  bool sqFull() { return storeQueue.full(); }
343 
345  bool lqEmpty() const { return loads == 0; }
346 
348  bool sqEmpty() const { return stores == 0; }
349 
351  unsigned getCount() { return loads + stores; }
352 
354  bool hasStoresToWB() { return storesToWB; }
355 
357  int numStoresToWB() { return storesToWB; }
358 
360  bool
362  {
363  return storeWBIt.dereferenceable() &&
364  storeWBIt->valid() &&
365  storeWBIt->canWB() &&
366  !storeWBIt->completed() &&
368  }
369 
371  void recvRetry();
372 
373  unsigned int cacheLineSize();
374  private:
376  void resetState();
377 
379  void writeback(const DynInstPtr &inst, PacketPtr pkt);
380 
382  void writebackBlockedStore();
383 
385  void completeStore(typename StoreQueue::iterator store_idx);
386 
388  void storePostSend();
389 
390  public:
395  bool trySendPacket(bool isLoad, PacketPtr data_pkt);
396 
397 
399  void dumpInsts() const;
400 
402  void schedule(Event& ev, Tick when) { cpu->schedule(ev, when); }
403 
404  BaseTLB* dTLB() { return cpu->dtb; }
405 
406  private:
409 
412 
415 
418 
421  {
422  using LSQSenderState::alive;
423  public:
424  LQSenderState(typename LoadQueue::iterator idx_)
425  : LSQSenderState(idx_->request(), true), idx(idx_) { }
426 
428  typename LoadQueue::iterator idx;
429  //virtual LSQRequest* request() { return idx->request(); }
430  virtual void
432  {
433  //if (alive())
434  // idx->request()->senderState(nullptr);
435  }
436  };
437 
440  {
441  using LSQSenderState::alive;
442  public:
444  : LSQSenderState(idx_->request(), false), idx(idx_) { }
447  //virtual LSQRequest* request() { return idx->request(); }
448  virtual void
450  {
451  //if (alive())
452  // idx->request()->senderState(nullptr);
453  }
454  };
455 
457  class WritebackEvent : public Event
458  {
459  public:
461  WritebackEvent(const DynInstPtr &_inst, PacketPtr pkt,
462  LSQUnit *lsq_ptr);
463 
465  void process();
466 
468  const char *description() const;
469 
470  private:
473 
476 
479  };
480 
481  public:
488  bool recvTimingResp(PacketPtr pkt);
489 
490  private:
493  public:
496 
499 
500  private:
504  unsigned depCheckShift;
505 
508 
510  int loads;
512  int stores;
515 
516  // hardware transactional memory
517  // nesting depth
519  int htmStops;
520  // sanity checks and debugging
522 
527 
530 
533 
535  bool stalled;
542 
545 
548 
551 
554 
558 
561 
563  bool needsTSO;
564 
565  protected:
566  // Will also need how many read/write ports the Dcache has. Or keep track
567  // of that in stage that is one level up, and only call executeLoad/Store
568  // the appropriate number of times.
569  struct LSQUnitStats : public Stats::Group{
570  LSQUnitStats(Stats::Group *parent);
571 
574 
577 
581 
584 
587 
590 
593  } stats;
594 
595  public:
597  Fault read(LSQRequest *req, int load_idx);
598 
600  Fault write(LSQRequest *req, uint8_t *data, int store_idx);
601 
603  int getLoadHead() { return loadQueue.head(); }
604 
606  InstSeqNum
608  {
609  return loadQueue.front().valid()
610  ? loadQueue.front().instruction()->seqNum
611  : 0;
612  }
613 
615  int getStoreHead() { return storeQueue.head(); }
617  InstSeqNum
619  {
620  return storeQueue.front().valid()
621  ? storeQueue.front().instruction()->seqNum
622  : 0;
623  }
624 
626  bool isStalled() { return stalled; }
627  public:
632 };
633 
634 template <class Impl>
635 Fault
636 LSQUnit<Impl>::read(LSQRequest *req, int load_idx)
637 {
638  LQEntry& load_req = loadQueue[load_idx];
639  const DynInstPtr& load_inst = load_req.instruction();
640 
641  load_req.setRequest(req);
642  assert(load_inst);
643 
644  assert(!load_inst->isExecuted());
645 
646  // Make sure this isn't a strictly ordered load
647  // A bit of a hackish way to get strictly ordered accesses to work
648  // only if they're at the head of the LSQ and are ready to commit
649  // (at the head of the ROB too).
650 
651  if (req->mainRequest()->isStrictlyOrdered() &&
652  (load_idx != loadQueue.head() || !load_inst->isAtCommit())) {
653  // Tell IQ/mem dep unit that this instruction will need to be
654  // rescheduled eventually
655  iewStage->rescheduleMemInst(load_inst);
656  load_inst->clearIssued();
657  load_inst->effAddrValid(false);
658  ++stats.rescheduledLoads;
659  DPRINTF(LSQUnit, "Strictly ordered load [sn:%lli] PC %s\n",
660  load_inst->seqNum, load_inst->pcState());
661 
662  // Must delete request now that it wasn't handed off to
663  // memory. This is quite ugly. @todo: Figure out the proper
664  // place to really handle request deletes.
665  load_req.setRequest(nullptr);
666  req->discard();
667  return std::make_shared<GenericISA::M5PanicFault>(
668  "Strictly ordered load [sn:%llx] PC %s\n",
669  load_inst->seqNum, load_inst->pcState());
670  }
671 
672  DPRINTF(LSQUnit, "Read called, load idx: %i, store idx: %i, "
673  "storeHead: %i addr: %#x%s\n",
674  load_idx - 1, load_inst->sqIt._idx, storeQueue.head() - 1,
675  req->mainRequest()->getPaddr(), req->isSplit() ? " split" : "");
676 
677  if (req->mainRequest()->isLLSC()) {
678  // Disable recording the result temporarily. Writing to misc
679  // regs normally updates the result, but this is not the
680  // desired behavior when handling store conditionals.
681  load_inst->recordResult(false);
682  TheISA::handleLockedRead(load_inst.get(), req->mainRequest());
683  load_inst->recordResult(true);
684  }
685 
686  if (req->mainRequest()->isLocalAccess()) {
687  assert(!load_inst->memData);
688  assert(!load_inst->inHtmTransactionalState());
689  load_inst->memData = new uint8_t[MaxDataBytes];
690 
691  ThreadContext *thread = cpu->tcBase(lsqID);
692  PacketPtr main_pkt = new Packet(req->mainRequest(), MemCmd::ReadReq);
693 
694  main_pkt->dataStatic(load_inst->memData);
695 
696  Cycles delay = req->mainRequest()->localAccessor(thread, main_pkt);
697 
698  WritebackEvent *wb = new WritebackEvent(load_inst, main_pkt, this);
699  cpu->schedule(wb, cpu->clockEdge(delay));
700  return NoFault;
701  }
702 
703  // hardware transactional memory
704  if (req->mainRequest()->isHTMStart() || req->mainRequest()->isHTMCommit())
705  {
706  // don't want to send nested transactionStarts and
707  // transactionStops outside of core, e.g. to Ruby
708  if (req->mainRequest()->getFlags().isSet(Request::NO_ACCESS)) {
709  Cycles delay(0);
710  PacketPtr data_pkt =
711  new Packet(req->mainRequest(), MemCmd::ReadReq);
712 
713  // Allocate memory if this is the first time a load is issued.
714  if (!load_inst->memData) {
715  load_inst->memData =
716  new uint8_t[req->mainRequest()->getSize()];
717  // sanity checks espect zero in request's data
718  memset(load_inst->memData, 0, req->mainRequest()->getSize());
719  }
720 
721  data_pkt->dataStatic(load_inst->memData);
722  if (load_inst->inHtmTransactionalState()) {
723  data_pkt->setHtmTransactional(
724  load_inst->getHtmTransactionUid());
725  }
726  data_pkt->makeResponse();
727 
728  WritebackEvent *wb = new WritebackEvent(load_inst, data_pkt, this);
729  cpu->schedule(wb, cpu->clockEdge(delay));
730  return NoFault;
731  }
732  }
733 
734  // Check the SQ for any previous stores that might lead to forwarding
735  auto store_it = load_inst->sqIt;
736  assert (store_it >= storeWBIt);
737  // End once we've reached the top of the LSQ
738  while (store_it != storeWBIt) {
739  // Move the index to one younger
740  store_it--;
741  assert(store_it->valid());
742  assert(store_it->instruction()->seqNum < load_inst->seqNum);
743  int store_size = store_it->size();
744 
745  // Cache maintenance instructions go down via the store
746  // path but they carry no data and they shouldn't be
747  // considered for forwarding
748  if (store_size != 0 && !store_it->instruction()->strictlyOrdered() &&
749  !(store_it->request()->mainRequest() &&
750  store_it->request()->mainRequest()->isCacheMaintenance())) {
751  assert(store_it->instruction()->effAddrValid());
752 
753  // Check if the store data is within the lower and upper bounds of
754  // addresses that the request needs.
755  auto req_s = req->mainRequest()->getVaddr();
756  auto req_e = req_s + req->mainRequest()->getSize();
757  auto st_s = store_it->instruction()->effAddr;
758  auto st_e = st_s + store_size;
759 
760  bool store_has_lower_limit = req_s >= st_s;
761  bool store_has_upper_limit = req_e <= st_e;
762  bool lower_load_has_store_part = req_s < st_e;
763  bool upper_load_has_store_part = req_e > st_s;
764 
765  auto coverage = AddrRangeCoverage::NoAddrRangeCoverage;
766 
767  // If the store entry is not atomic (atomic does not have valid
768  // data), the store has all of the data needed, and
769  // the load is not LLSC, then
770  // we can forward data from the store to the load
771  if (!store_it->instruction()->isAtomic() &&
772  store_has_lower_limit && store_has_upper_limit &&
773  !req->mainRequest()->isLLSC()) {
774 
775  const auto& store_req = store_it->request()->mainRequest();
776  coverage = store_req->isMasked() ?
777  AddrRangeCoverage::PartialAddrRangeCoverage :
778  AddrRangeCoverage::FullAddrRangeCoverage;
779  } else if (
780  // This is the partial store-load forwarding case where a store
781  // has only part of the load's data and the load isn't LLSC
782  (!req->mainRequest()->isLLSC() &&
783  ((store_has_lower_limit && lower_load_has_store_part) ||
784  (store_has_upper_limit && upper_load_has_store_part) ||
785  (lower_load_has_store_part && upper_load_has_store_part))) ||
786  // The load is LLSC, and the store has all or part of the
787  // load's data
788  (req->mainRequest()->isLLSC() &&
789  ((store_has_lower_limit || upper_load_has_store_part) &&
790  (store_has_upper_limit || lower_load_has_store_part))) ||
791  // The store entry is atomic and has all or part of the load's
792  // data
793  (store_it->instruction()->isAtomic() &&
794  ((store_has_lower_limit || upper_load_has_store_part) &&
795  (store_has_upper_limit || lower_load_has_store_part)))) {
796 
797  coverage = AddrRangeCoverage::PartialAddrRangeCoverage;
798  }
799 
800  if (coverage == AddrRangeCoverage::FullAddrRangeCoverage) {
801  // Get shift amount for offset into the store's data.
802  int shift_amt = req->mainRequest()->getVaddr() -
803  store_it->instruction()->effAddr;
804 
805  // Allocate memory if this is the first time a load is issued.
806  if (!load_inst->memData) {
807  load_inst->memData =
808  new uint8_t[req->mainRequest()->getSize()];
809  }
810  if (store_it->isAllZeros())
811  memset(load_inst->memData, 0,
812  req->mainRequest()->getSize());
813  else
814  memcpy(load_inst->memData,
815  store_it->data() + shift_amt,
816  req->mainRequest()->getSize());
817 
818  DPRINTF(LSQUnit, "Forwarding from store idx %i to load to "
819  "addr %#x\n", store_it._idx,
820  req->mainRequest()->getVaddr());
821 
822  PacketPtr data_pkt = new Packet(req->mainRequest(),
824  data_pkt->dataStatic(load_inst->memData);
825 
826  // hardware transactional memory
827  // Store to load forwarding within a transaction
828  // This should be okay because the store will be sent to
829  // the memory subsystem and subsequently get added to the
830  // write set of the transaction. The write set has a stronger
831  // property than the read set, so the load doesn't necessarily
832  // have to be there.
833  assert(!req->mainRequest()->isHTMCmd());
834  if (load_inst->inHtmTransactionalState()) {
835  assert (!storeQueue[store_it._idx].completed());
836  assert (
837  storeQueue[store_it._idx].instruction()->
838  inHtmTransactionalState());
839  assert (
840  load_inst->getHtmTransactionUid() ==
841  storeQueue[store_it._idx].instruction()->
842  getHtmTransactionUid());
843  data_pkt->setHtmTransactional(
844  load_inst->getHtmTransactionUid());
845  DPRINTF(HtmCpu, "HTM LD (ST2LDF) "
846  "pc=0x%lx - vaddr=0x%lx - "
847  "paddr=0x%lx - htmUid=%u\n",
848  load_inst->instAddr(),
849  data_pkt->req->hasVaddr() ?
850  data_pkt->req->getVaddr() : 0lu,
851  data_pkt->getAddr(),
852  load_inst->getHtmTransactionUid());
853  }
854 
855  if (req->isAnyOutstandingRequest()) {
856  assert(req->_numOutstandingPackets > 0);
857  // There are memory requests packets in flight already.
858  // This may happen if the store was not complete the
859  // first time this load got executed. Signal the senderSate
860  // that response packets should be discarded.
861  req->discardSenderState();
862  }
863 
864  WritebackEvent *wb = new WritebackEvent(load_inst, data_pkt,
865  this);
866 
867  // We'll say this has a 1 cycle load-store forwarding latency
868  // for now.
869  // @todo: Need to make this a parameter.
870  cpu->schedule(wb, curTick());
871 
872  // Don't need to do anything special for split loads.
873  ++stats.forwLoads;
874 
875  return NoFault;
876  } else if (coverage == AddrRangeCoverage::PartialAddrRangeCoverage) {
877  // If it's already been written back, then don't worry about
878  // stalling on it.
879  if (store_it->completed()) {
880  panic("Should not check one of these");
881  continue;
882  }
883 
884  // Must stall load and force it to retry, so long as it's the
885  // oldest load that needs to do so.
886  if (!stalled ||
887  (stalled &&
888  load_inst->seqNum <
889  loadQueue[stallingLoadIdx].instruction()->seqNum)) {
890  stalled = true;
891  stallingStoreIsn = store_it->instruction()->seqNum;
892  stallingLoadIdx = load_idx;
893  }
894 
895  // Tell IQ/mem dep unit that this instruction will need to be
896  // rescheduled eventually
897  iewStage->rescheduleMemInst(load_inst);
898  load_inst->clearIssued();
899  load_inst->effAddrValid(false);
900  ++stats.rescheduledLoads;
901 
902  // Do not generate a writeback event as this instruction is not
903  // complete.
904  DPRINTF(LSQUnit, "Load-store forwarding mis-match. "
905  "Store idx %i to load addr %#x\n",
906  store_it._idx, req->mainRequest()->getVaddr());
907 
908  // Must discard the request.
909  req->discard();
910  load_req.setRequest(nullptr);
911  return NoFault;
912  }
913  }
914  }
915 
916  // If there's no forwarding case, then go access memory
917  DPRINTF(LSQUnit, "Doing memory access for inst [sn:%lli] PC %s\n",
918  load_inst->seqNum, load_inst->pcState());
919 
920  // Allocate memory if this is the first time a load is issued.
921  if (!load_inst->memData) {
922  load_inst->memData = new uint8_t[req->mainRequest()->getSize()];
923  }
924 
925 
926  // hardware transactional memory
927  if (req->mainRequest()->isHTMCmd()) {
928  // this is a simple sanity check
929  // the Ruby cache controller will set
930  // memData to 0x0ul if successful.
931  *load_inst->memData = (uint64_t) 0x1ull;
932  }
933 
934  // For now, load throughput is constrained by the number of
935  // load FUs only, and loads do not consume a cache port (only
936  // stores do).
937  // @todo We should account for cache port contention
938  // and arbitrate between loads and stores.
939 
940  // if we the cache is not blocked, do cache access
941  if (req->senderState() == nullptr) {
942  LQSenderState *state = new LQSenderState(
943  loadQueue.getIterator(load_idx));
944  state->isLoad = true;
945  state->inst = load_inst;
946  state->isSplit = req->isSplit();
947  req->senderState(state);
948  }
949  req->buildPackets();
950  req->sendPacketToCache();
951  if (!req->isSent())
952  iewStage->blockMemInst(load_inst);
953 
954  return NoFault;
955 }
956 
957 template <class Impl>
958 Fault
959 LSQUnit<Impl>::write(LSQRequest *req, uint8_t *data, int store_idx)
960 {
961  assert(storeQueue[store_idx].valid());
962 
963  DPRINTF(LSQUnit, "Doing write to store idx %i, addr %#x | storeHead:%i "
964  "[sn:%llu]\n",
965  store_idx - 1, req->request()->getPaddr(), storeQueue.head() - 1,
966  storeQueue[store_idx].instruction()->seqNum);
967 
968  storeQueue[store_idx].setRequest(req);
969  unsigned size = req->_size;
970  storeQueue[store_idx].size() = size;
971  bool store_no_data =
972  req->mainRequest()->getFlags() & Request::STORE_NO_DATA;
973  storeQueue[store_idx].isAllZeros() = store_no_data;
974  assert(size <= SQEntry::DataSize || store_no_data);
975 
976  // copy data into the storeQueue only if the store request has valid data
977  if (!(req->request()->getFlags() & Request::CACHE_BLOCK_ZERO) &&
978  !req->request()->isCacheMaintenance() &&
979  !req->request()->isAtomic())
980  memcpy(storeQueue[store_idx].data(), data, size);
981 
982  // This function only writes the data to the store queue, so no fault
983  // can happen here.
984  return NoFault;
985 }
986 
987 #endif // __CPU_O3_LSQ_UNIT_HH__
CircularQueue::head
uint32_t head() const
Definition: circular_queue.hh:618
LSQUnit::insertLoad
void insertLoad(const DynInstPtr &load_inst)
Inserts a load instruction.
Definition: lsq_unit_impl.hh:330
LSQUnit::writebackBlockedStore
void writebackBlockedStore()
Try to finish a previously blocked write back attempt.
Definition: lsq_unit_impl.hh:784
LSQUnit::DynInstPtr
Impl::DynInstPtr DynInstPtr
Definition: lsq_unit.hh:84
LSQUnit::SQEntry::_isAllZeros
bool _isAllZeros
Does this request write all zeros and thus doesn't have any data attached to it.
Definition: lsq_unit.hh:166
LSQUnit::WritebackEvent::pkt
PacketPtr pkt
The packet that would have been sent to memory.
Definition: lsq_unit.hh:475
LSQUnit::dumpInsts
void dumpInsts() const
Debugging function to dump instructions in the LSQ.
Definition: lsq_unit_impl.hh:1268
LSQUnit::SQEntry::set
void set(const DynInstPtr &inst)
Definition: lsq_unit.hh:182
LSQUnit::commitLoad
void commitLoad()
Commits the head load.
Definition: lsq_unit_impl.hh:730
LSQUnit::depCheckShift
unsigned depCheckShift
The number of places to shift addresses in the LSQ before checking for dependency violations.
Definition: lsq_unit.hh:504
LSQUnit::SQEntry::_data
char _data[MaxDataBytes]
The store data.
Definition: lsq_unit.hh:155
LSQUnit::LSQUnitStats::memOrderViolation
Stats::Scalar memOrderViolation
Tota number of memory ordering violations.
Definition: lsq_unit.hh:583
data
const char data[]
Definition: circlebuf.test.cc:42
CircularQueue::iterator::dereferenceable
bool dereferenceable() const
Test dereferenceability.
Definition: circular_queue.hh:233
LSQUnit::pendingRequest
LSQRequest * pendingRequest
The packet that is pending free cache ports.
Definition: lsq_unit.hh:560
LSQUnit::getCount
unsigned getCount()
Returns the number of instructions in the LSQ.
Definition: lsq_unit.hh:351
LSQUnit::LSQEntry::set
void set(const DynInstPtr &inst)
Definition: lsq_unit.hh:132
LSQUnit::getStoreHeadSeqNum
InstSeqNum getStoreHeadSeqNum()
Returns the sequence number of the head store instruction.
Definition: lsq_unit.hh:618
Packet::getAddr
Addr getAddr() const
Definition: packet.hh:754
LSQUnit::SQEntry::data
const char * data() const
Definition: lsq_unit.hh:204
LSQUnit::storePostSend
void storePostSend()
Handles completing the send of a store to memory.
Definition: lsq_unit_impl.hh:1059
LSQUnit::SQEntry::clear
void clear()
Definition: lsq_unit.hh:188
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
LSQUnit::htmStarts
int htmStarts
Definition: lsq_unit.hh:518
LSQUnit::isFull
bool isFull()
Returns if either the LQ or SQ is full.
Definition: lsq_unit.hh:333
Request::NO_ACCESS
@ NO_ACCESS
The request should not cause a memory access.
Definition: request.hh:135
LSQUnit::dTLB
BaseTLB * dTLB()
Definition: lsq_unit.hh:404
LSQUnit::stallingStoreIsn
InstSeqNum stallingStoreIsn
The store that causes the stall due to partial store to load forwarding.
Definition: lsq_unit.hh:539
LSQUnit::iewStage
IEW * iewStage
Pointer to the IEW stage.
Definition: lsq_unit.hh:411
LSQUnit::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Handles writing back and completing the load or store that has returned from memory.
Definition: lsq_unit_impl.hh:93
LSQUnit::LSQUnitStats::forwLoads
Stats::Scalar forwLoads
Total number of loads forwaded from LSQ stores.
Definition: lsq_unit.hh:573
LSQUnit::numStoresToWB
int numStoresToWB()
Returns the number of stores to writeback.
Definition: lsq_unit.hh:357
LSQUnit::O3CPU
Impl::O3CPU O3CPU
Definition: lsq_unit.hh:83
LSQUnit::cacheLineSize
unsigned int cacheLineSize()
Definition: lsq_unit_impl.hh:1293
LSQUnit::SQSenderState::SQSenderState
SQSenderState(typename StoreQueue::iterator idx_)
Definition: lsq_unit.hh:443
CircularQueue< LQEntry >
MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:82
LSQUnit::SQEntry::SQEntry
SQEntry()
Constructs an empty store queue entry.
Definition: lsq_unit.hh:170
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
LSQUnit::cpu
O3CPU * cpu
Pointer to the CPU.
Definition: lsq_unit.hh:408
LSQUnit::isStalled
bool isStalled()
Returns whether or not the LSQ unit is stalled.
Definition: lsq_unit.hh:626
LSQUnit::checkSnoop
void checkSnoop(PacketPtr pkt)
Check if an incoming invalidate hits in the lsq on a load that might have issued out of order wrt ano...
Definition: lsq_unit_impl.hh:447
LSQUnit::isEmpty
bool isEmpty() const
Returns if both the LQ and SQ are empty.
Definition: lsq_unit.hh:336
LSQUnit::LSQEntry
Definition: lsq_unit.hh:92
Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:340
LSQUnit::getMemDepViolator
DynInstPtr getMemDepViolator()
Returns the memory ordering violator.
Definition: lsq_unit_impl.hh:413
LSQUnit::LSQEntry::_valid
bool _valid
Valid entry.
Definition: lsq_unit.hh:102
LSQUnit::init
void init(O3CPU *cpu_ptr, IEW *iew_ptr, DerivO3CPUParams *params, LSQ *lsq_ptr, unsigned id)
Initializes the LSQ unit with the specified number of entries.
Definition: lsq_unit_impl.hh:217
LSQUnit::storesToWB
int storesToWB
The number of store instructions in the SQ waiting to writeback.
Definition: lsq_unit.hh:514
MaxVecRegLenInBytes
constexpr unsigned MaxVecRegLenInBytes
Definition: vec_reg.hh:153
LSQUnit::LSQEntry::size
const uint32_t & size() const
Definition: lsq_unit.hh:146
LSQUnit::writeback
void writeback(const DynInstPtr &inst, PacketPtr pkt)
Writes back the instruction, sending it to IEW.
Definition: lsq_unit_impl.hh:1091
LSQUnit::SQEntry
Definition: lsq_unit.hh:151
LSQUnit::SQSenderState
Particularisation of the LSQSenderState to the SQ.
Definition: lsq_unit.hh:439
LSQUnit::numStores
int numStores()
Returns the number of stores in the SQ.
Definition: lsq_unit.hh:315
LSQUnit::storeInFlight
bool storeInFlight
Whether or not a store is in flight.
Definition: lsq_unit.hh:550
LSQUnit::commitLoads
void commitLoads(InstSeqNum &youngest_inst)
Commits loads older than a specific sequence number.
Definition: lsq_unit_impl.hh:745
CircularQueue::iterator
Iterator to the circular queue.
Definition: circular_queue.hh:155
LSQUnit::LQueue
CircularQueue< LQEntry > LQueue
Definition: lsq_unit.hh:630
LSQUnit::numFreeStoreEntries
unsigned numFreeStoreEntries()
Returns the number of free SQ entries.
Definition: lsq_unit_impl.hh:435
LSQUnit::MaxDataBytes
static constexpr auto MaxDataBytes
Definition: lsq_unit.hh:81
LSQUnit::LSQEntry::setRequest
void setRequest(LSQRequest *r)
Definition: lsq_unit.hh:140
BaseTLB
Definition: tlb.hh:50
LSQUnit::LSQEntry::hasRequest
bool hasRequest()
Definition: lsq_unit.hh:141
TimeBuffer
Definition: timebuf.hh:37
LSQUnit::LQSenderState
Particularisation of the LSQSenderState to the LQ.
Definition: lsq_unit.hh:420
packet.hh
LSQUnit::stores
int stores
The number of store instructions in the SQ.
Definition: lsq_unit.hh:512
LSQUnit::drainSanityCheck
void drainSanityCheck() const
Perform sanity checks after a drain.
Definition: lsq_unit_impl.hh:295
LSQUnit::SQEntry::committed
const bool & committed() const
Definition: lsq_unit.hh:200
CircularQueue::full
bool full() const
Is the queue full? A queue is full if the head is the 0^{th} element and the tail is the (size-1)^{th...
Definition: circular_queue.hh:744
LSQUnit::completeStore
void completeStore(typename StoreQueue::iterator store_idx)
Completes the store at the specified index.
Definition: lsq_unit_impl.hh:1153
timebuf.hh
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
LSQUnit::LSQUnitStats::blockedByCache
Stats::Scalar blockedByCache
Number of times the LSQ is blocked due to the cache.
Definition: lsq_unit.hh:592
LSQUnit::checkLoads
bool checkLoads
Should loads be checked for dependency issues.
Definition: lsq_unit.hh:507
LSQUnit::resetState
void resetState()
Reset the LSQ state.
Definition: lsq_unit_impl.hh:241
LSQUnit
Class that implements the actual LQ and SQ for each specific thread.
Definition: lsq_unit.hh:78
LSQUnit::WritebackEvent::inst
DynInstPtr inst
Instruction whose results are being written back.
Definition: lsq_unit.hh:472
LSQUnit::numHtmStarts
int numHtmStarts() const
Definition: lsq_unit.hh:318
LSQUnit::sqFull
bool sqFull()
Returns if the SQ is full.
Definition: lsq_unit.hh:342
LSQUnit::LSQEntry::size
uint32_t & size()
Definition: lsq_unit.hh:145
LSQUnit::takeOverFrom
void takeOverFrom()
Takes over from another CPU's thread.
Definition: lsq_unit_impl.hh:306
Request::CACHE_BLOCK_ZERO
@ CACHE_BLOCK_ZERO
This is a write that is targeted and zeroing an entire cache block.
Definition: request.hh:132
LSQUnit::LSQEntry::inst
DynInstPtr inst
The instruction.
Definition: lsq_unit.hh:96
LSQUnit::LSQUnitStats::ignoredResponses
Stats::Scalar ignoredResponses
Total number of responses from the memory system that are ignored due to the instruction already bein...
Definition: lsq_unit.hh:580
LSQUnit::lsq
LSQ * lsq
Pointer to the LSQ.
Definition: lsq_unit.hh:414
LSQUnit::loadQueue
LoadQueue loadQueue
The load queue.
Definition: lsq_unit.hh:498
CircularQueue::front
reference front()
Definition: circular_queue.hh:608
inst_seq.hh
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
LSQUnit::hasPendingRequest
bool hasPendingRequest
Whether or not there is a packet that couldn't be sent because of a lack of cache ports.
Definition: lsq_unit.hh:557
LSQ
Definition: lsq.hh:62
Event
Definition: eventq.hh:246
circular_queue.hh
LSQUnit::WritebackEvent::WritebackEvent
WritebackEvent(const DynInstPtr &_inst, PacketPtr pkt, LSQUnit *lsq_ptr)
Constructs a writeback event.
Definition: lsq_unit_impl.hh:62
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
LSQUnit::SQEntry::isAllZeros
bool & isAllZeros()
Definition: lsq_unit.hh:201
LSQUnit::getLatestHtmUid
uint64_t getLatestHtmUid() const
Definition: lsq_unit.hh:321
LSQUnit::SQEntry::isAllZeros
const bool & isAllZeros() const
Definition: lsq_unit.hh:202
LSQUnit::lqEmpty
bool lqEmpty() const
Returns if the LQ is empty.
Definition: lsq_unit.hh:345
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
LSQUnit::SQIterator
CircularQueue< SQEntry >::iterator SQIterator
Definition: lsq_unit.hh:629
LSQUnit::SQEntry::canWB
bool & canWB()
Member accessors.
Definition: lsq_unit.hh:195
LSQUnit::getLoadHead
int getLoadHead()
Returns the index of the head load instruction.
Definition: lsq_unit.hh:603
MipsISA::r
r
Definition: pra_constants.hh:95
LSQUnit::LQSenderState::idx
LoadQueue::iterator idx
The LQ index of the instruction.
Definition: lsq_unit.hh:428
LSQUnit::willWB
bool willWB()
Returns if the LSQ unit will writeback on this cycle.
Definition: lsq_unit.hh:361
LSQ::LSQSenderState
Derived class to hold any sender state the LSQ needs.
Definition: lsq.hh:73
LSQUnit::WritebackEvent::process
void process()
Processes the writeback event.
Definition: lsq_unit_impl.hh:73
LSQUnit::commitStores
void commitStores(InstSeqNum &youngest_inst)
Commits stores older than a specific sequence number.
Definition: lsq_unit_impl.hh:757
LSQUnit::insert
void insert(const DynInstPtr &inst)
Inserts an instruction.
Definition: lsq_unit_impl.hh:313
LSQUnit::resetHtmStartsStops
void resetHtmStartsStops()
Definition: lsq_unit.hh:320
port.hh
LSQUnit::storeWBIt
StoreQueue::iterator storeWBIt
The index of the first instruction that may be ready to be written back, and has not yet been written...
Definition: lsq_unit.hh:526
LSQUnit::AddrRangeCoverage
AddrRangeCoverage
Coverage of one address range with another.
Definition: lsq_unit.hh:210
Packet::setHtmTransactional
void setHtmTransactional(uint64_t val)
Stipulates that this packet/request originates in the CPU executing in transactional mode,...
Definition: packet.cc:537
LSQUnit::writebackStores
void writebackStores()
Writes back stores.
Definition: lsq_unit_impl.hh:795
LSQUnit::lqFull
bool lqFull()
Returns if the LQ is full.
Definition: lsq_unit.hh:339
LSQUnit::executeLoad
Fault executeLoad(int lq_idx)
Definition: lsq_unit.hh:275
LSQUnit::SQEntry::completed
const bool & completed() const
Definition: lsq_unit.hh:198
LSQUnit::LSQUnitStats::rescheduledLoads
Stats::Scalar rescheduledLoads
Number of loads that were rescheduled.
Definition: lsq_unit.hh:589
LSQUnit::numFreeLoadEntries
unsigned numFreeLoadEntries()
Returns the number of free LQ entries.
Definition: lsq_unit_impl.hh:424
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
LSQUnit::loads
int loads
The number of load instructions in the LQ.
Definition: lsq_unit.hh:510
InstSeqNum
uint64_t InstSeqNum
Definition: inst_seq.hh:37
NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:245
LSQUnit::LSQEntry::instruction
const DynInstPtr & instruction() const
Definition: lsq_unit.hh:147
LSQUnit::stallingLoadIdx
int stallingLoadIdx
The index of the above store.
Definition: lsq_unit.hh:541
LSQUnit::lsqID
ThreadID lsqID
The LSQUnit thread id.
Definition: lsq_unit.hh:492
ProbePoints::Packet
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:103
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Packet::makeResponse
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
Definition: packet.hh:1004
LSQUnit::SQEntry::data
char * data()
Definition: lsq_unit.hh:203
LSQUnit::LQSenderState::complete
virtual void complete()
Definition: lsq_unit.hh:431
LSQUnit::trySendPacket
bool trySendPacket(bool isLoad, PacketPtr data_pkt)
Attempts to send a packet to the cache.
Definition: lsq_unit_impl.hh:1218
LSQUnit::htmStops
int htmStops
Definition: lsq_unit.hh:519
LSQUnit::dcachePort
RequestPort * dcachePort
Pointer to the dcache port.
Definition: lsq_unit.hh:417
LSQUnit::fromIssue
TimeBuffer< IssueStruct >::wire fromIssue
Wire to read information from the issue stage time queue.
Definition: lsq_unit.hh:532
LSQUnit::retryPkt
PacketPtr retryPkt
The packet that needs to be retried.
Definition: lsq_unit.hh:544
LSQUnit::numLoads
int numLoads()
Returns the number of loads in the LQ.
Definition: lsq_unit.hh:312
LSQUnit::SQueue
CircularQueue< SQEntry > SQueue
Definition: lsq_unit.hh:631
LSQUnit::LSQEntry::req
LSQRequest * req
The request.
Definition: lsq_unit.hh:98
vec_reg.hh
LSQUnit::recvRetry
void recvRetry()
Handles doing the retry.
Definition: lsq_unit_impl.hh:1258
LSQUnit::LSQUnit
LSQUnit(const LSQUnit &l)
We cannot copy LSQUnit because it has stats for which copy contructor is deleted explicitly.
Definition: lsq_unit.hh:229
LSQUnit::LSQEntry::clear
void clear()
Definition: lsq_unit.hh:120
ArmISA::handleLockedRead
void handleLockedRead(XC *xc, const RequestPtr &req)
Definition: locked_mem.hh:91
LSQUnit::LSQ
Impl::CPUPol::LSQ LSQ
Definition: lsq_unit.hh:86
LSQUnit::getStoreHead
int getStoreHead()
Returns the index of the head store instruction.
Definition: lsq_unit.hh:615
LSQUnit::LSQRequest
typename Impl::CPUPol::LSQ::LSQRequest LSQRequest
Definition: lsq_unit.hh:90
LSQUnit::memDepViolator
DynInstPtr memDepViolator
The oldest load that caused a memory ordering violation.
Definition: lsq_unit.hh:553
LSQUnit::name
std::string name() const
Returns the name of the LSQ unit.
Definition: lsq_unit_impl.hh:261
LSQUnit::read
Fault read(LSQRequest *req, int load_idx)
Executes the load at the given index.
Definition: lsq_unit.hh:636
LSQUnit::setDcachePort
void setDcachePort(RequestPort *dcache_port)
Sets the pointer to the dcache port.
Definition: lsq_unit_impl.hh:288
LSQUnit::LQSenderState::LQSenderState
LQSenderState(typename LoadQueue::iterator idx_)
Definition: lsq_unit.hh:424
LSQUnit::LSQUnitStats::squashedStores
Stats::Scalar squashedStores
Total number of squashed stores.
Definition: lsq_unit.hh:586
LSQUnit::LQIterator
CircularQueue< LQEntry >::iterator LQIterator
Definition: lsq_unit.hh:628
LSQUnit::LSQEntry::valid
bool valid() const
Member accessors.
Definition: lsq_unit.hh:144
LSQUnit::executeStore
Fault executeStore(const DynInstPtr &inst)
Executes a store instruction.
Definition: lsq_unit_impl.hh:677
Packet::dataStatic
void dataStatic(T *p)
Set the data pointer to the following value that should not be freed.
Definition: packet.hh:1107
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
Stats::Group
Statistics container.
Definition: group.hh:83
LSQUnit::needsTSO
bool needsTSO
Flag for memory model.
Definition: lsq_unit.hh:563
LSQUnit::insertStore
void insertStore(const DynInstPtr &store_inst)
Inserts a store instruction.
Definition: lsq_unit_impl.hh:392
LSQUnit::violation
bool violation()
Returns if there is a memory ordering violation.
Definition: lsq_unit.hh:300
LSQUnit::numHtmStops
int numHtmStops() const
Definition: lsq_unit.hh:319
LSQUnit::stalled
bool stalled
Whether or not the LSQ is stalled.
Definition: lsq_unit.hh:535
LSQUnit::completeDataAccess
void completeDataAccess(PacketPtr pkt)
Completes the data access that has been returned from the memory system.
Definition: lsq_unit_impl.hh:111
LSQUnit::storeQueue
CircularQueue< SQEntry > storeQueue
The store queue.
Definition: lsq_unit.hh:495
LSQUnit::AddrRangeCoverage::PartialAddrRangeCoverage
@ PartialAddrRangeCoverage
LSQUnit::schedule
void schedule(Event &ev, Tick when)
Schedule event for the cpu.
Definition: lsq_unit.hh:402
LSQUnit::LSQUnit
LSQUnit(uint32_t lqEntries, uint32_t sqEntries)
Constructs an LSQ unit.
Definition: lsq_unit_impl.hh:204
LSQUnit::SQEntry::_committed
bool _committed
Whether or not the store is committed.
Definition: lsq_unit.hh:159
Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:83
LSQUnit::LSQUnitStats::squashedLoads
Stats::Scalar squashedLoads
Total number of squashed loads.
Definition: lsq_unit.hh:576
LSQUnit::SQEntry::_completed
bool _completed
Whether or not the store is completed.
Definition: lsq_unit.hh:161
LSQUnit::cacheBlockMask
Addr cacheBlockMask
Address Mask for a cache block (e.g.
Definition: lsq_unit.hh:529
LSQUnit::AddrRangeCoverage::NoAddrRangeCoverage
@ NoAddrRangeCoverage
LSQUnit::getLoadHeadSeqNum
InstSeqNum getLoadHeadSeqNum()
Returns the sequence number of the head load instruction.
Definition: lsq_unit.hh:607
LSQUnit::isStoreBlocked
bool isStoreBlocked
Whehter or not a store is blocked due to the memory system.
Definition: lsq_unit.hh:547
LSQUnit::LSQEntry::request
LSQRequest * request()
Definition: lsq_unit.hh:139
LSQUnit::lastRetiredHtmUid
uint64_t lastRetiredHtmUid
Definition: lsq_unit.hh:521
LSQUnit::SQEntry::_canWB
bool _canWB
Whether or not the store can writeback.
Definition: lsq_unit.hh:157
LSQUnit::SQSenderState::complete
virtual void complete()
Definition: lsq_unit.hh:449
LSQUnit::hasStoresToWB
bool hasStoresToWB()
Returns if there are any stores to writeback.
Definition: lsq_unit.hh:354
debugfaults.hh
LSQUnit::setLastRetiredHtmUid
void setLastRetiredHtmUid(uint64_t htm_uid)
Definition: lsq_unit.hh:326
LSQUnit::squash
void squash(const InstSeqNum &squashed_num)
Squashes all instructions younger than a specific sequence number.
Definition: lsq_unit_impl.hh:941
LSQUnit::sqEmpty
bool sqEmpty() const
Returns if the SQ is empty.
Definition: lsq_unit.hh:348
LSQUnit::IssueStruct
Impl::CPUPol::IssueStruct IssueStruct
Definition: lsq_unit.hh:87
Request::STORE_NO_DATA
static const FlagsType STORE_NO_DATA
Definition: request.hh:233
LSQUnit::SQEntry::committed
bool & committed()
Definition: lsq_unit.hh:199
LSQUnit::IEW
Impl::CPUPol::IEW IEW
Definition: lsq_unit.hh:85
LSQUnit::LSQUnitStats
Definition: lsq_unit.hh:569
LSQUnit::LSQEntry::LSQEntry
LSQEntry()
Constructs an empty store queue entry.
Definition: lsq_unit.hh:105
MipsISA::l
Bitfield< 5 > l
Definition: pra_constants.hh:320
LSQUnit::SQSenderState::idx
StoreQueue::iterator idx
The SQ index of the instruction.
Definition: lsq_unit.hh:446
LSQUnit::LSQUnitStats::LSQUnitStats
LSQUnitStats(Stats::Group *parent)
Definition: lsq_unit_impl.hh:271
LSQUnit::SQEntry::DataSize
static constexpr size_t DataSize
Definition: lsq_unit.hh:168
LSQUnit::SQEntry::~SQEntry
~SQEntry()
Definition: lsq_unit.hh:177
LSQUnit::executeLoad
Fault executeLoad(const DynInstPtr &inst)
Executes a load instruction.
Definition: lsq_unit_impl.hh:609
LSQUnit::LSQEntry::_size
uint32_t _size
The size of the operation.
Definition: lsq_unit.hh:100
LSQUnit::AddrRangeCoverage::FullAddrRangeCoverage
@ FullAddrRangeCoverage
LSQUnit::WritebackEvent::description
const char * description() const
Returns the description of this event.
Definition: lsq_unit_impl.hh:86
LSQUnit::SQEntry::completed
bool & completed()
Definition: lsq_unit.hh:197
LSQUnit::LSQEntry::~LSQEntry
~LSQEntry()
Definition: lsq_unit.hh:110
LSQUnit::stats
LSQUnit::LSQUnitStats stats
LSQUnit::LSQSenderState
typename LSQ::LSQSenderState LSQSenderState
Definition: lsq_unit.hh:89
LSQUnit::WritebackEvent
Writeback event, specifically for when stores forward data to loads.
Definition: lsq_unit.hh:457
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
LSQUnit::SQEntry::canWB
const bool & canWB() const
Definition: lsq_unit.hh:196
LSQUnit::write
Fault write(LSQRequest *req, uint8_t *data, int store_idx)
Executes the store at the given index.
Definition: lsq_unit.hh:959
LSQUnit::WritebackEvent::lsqPtr
LSQUnit< Impl > * lsqPtr
The pointer to the LSQ unit that issued the store.
Definition: lsq_unit.hh:478
LSQUnit::checkViolations
Fault checkViolations(typename LoadQueue::iterator &loadIt, const DynInstPtr &inst)
Check for ordering violations in the LSQ.
Definition: lsq_unit_impl.hh:528
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45

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