gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lsq.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2014, 2018 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  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  *
37  * Authors: Andrew Bardsley
38  */
39 
47 #ifndef __CPU_MINOR_NEW_LSQ_HH__
48 #define __CPU_MINOR_NEW_LSQ_HH__
49 
50 #include "cpu/minor/buffers.hh"
51 #include "cpu/minor/cpu.hh"
52 #include "cpu/minor/pipe_data.hh"
53 #include "cpu/minor/trace.hh"
54 
55 namespace Minor
56 {
57 
58 /* Forward declaration */
59 class Execute;
60 
61 class LSQ : public Named
62 {
63  protected:
67 
68  protected:
71  {
72  MemoryRunning, /* Default. Step dcache queues when possible. */
73  MemoryNeedsRetry /* Request rejected, will be asked to retry */
74  };
75 
77  friend std::ostream &operator <<(std::ostream &os,
79 
82  {
83  PartialAddrRangeCoverage, /* Two ranges partly overlap */
84  FullAddrRangeCoverage, /* One range fully covers another */
85  NoAddrRangeCoverage /* Two ranges are disjoint */
86  };
87 
90  {
91  protected:
93  LSQ &lsq;
94 
95  public:
96  DcachePort(std::string name, LSQ &lsq_, MinorCPU &cpu) :
97  MinorCPU::MinorCPUPort(name, cpu), lsq(lsq_)
98  { }
99 
100  protected:
101  bool recvTimingResp(PacketPtr pkt) override
102  { return lsq.recvTimingResp(pkt); }
103 
104  void recvReqRetry() override { lsq.recvReqRetry(); }
105 
106  bool isSnooping() const override { return true; }
107 
108  void recvTimingSnoopReq(PacketPtr pkt) override
109  { return lsq.recvTimingSnoopReq(pkt); }
110 
111  void recvFunctionalSnoop(PacketPtr pkt) override { }
112  };
113 
115 
116  public:
120  class LSQRequest :
121  public BaseTLB::Translation, /* For TLB lookups */
122  public Packet::SenderState /* For packing into a Packet */
123  {
124  public:
127 
130 
133  bool isLoad;
134 
138 
139  /* Requests carry packets on their way to the memory system.
140  * When a Packet returns from the memory system, its
141  * request needs to have its packet updated as this
142  * may have changed in flight */
144 
147 
149  uint64_t *res;
150 
154  bool skipped;
155 
159 
162 
164  {
165  NotIssued, /* Newly created */
166  InTranslation, /* TLB accessed, no reply yet */
167  Translated, /* Finished address translation */
168  Failed, /* The starting start of FailedDataRequests */
169  RequestIssuing, /* Load/store issued to memory in the requests
170  queue */
171  StoreToStoreBuffer, /* Store in transfers on its way to the
172  store buffer */
173  RequestNeedsRetry, /* Retry needed for load */
174  StoreInStoreBuffer, /* Store in the store buffer, before issuing
175  a memory transfer */
176  StoreBufferIssuing, /* Store in store buffer and has been
177  issued */
178  StoreBufferNeedsRetry, /* Retry needed for store */
179  /* All completed states. Includes
180  completed loads, TLB faults and skipped requests whose
181  seqNum's no longer match */
182  Complete
183  };
184 
186 
187  protected:
189  void markDelayed() { isTranslationDelayed = true; }
190 
193  void tryToSuppressFault();
194 
195  void disableMemAccess();
196  void completeDisabledMemAccess();
197 
198  public:
199  LSQRequest(LSQ &port_, MinorDynInstPtr inst_, bool isLoad_,
200  PacketDataPtr data_ = NULL, uint64_t *res_ = NULL);
201 
202  virtual ~LSQRequest();
203 
204  public:
206  void makePacket();
207 
209  bool skippedMemAccess() { return skipped; }
210 
213  void setSkipped() { skipped = true; }
214 
217  static AddrRangeCoverage containsAddrRangeOf(
218  Addr req1_addr, unsigned int req1_size,
219  Addr req2_addr, unsigned int req2_size);
220 
223  AddrRangeCoverage containsAddrRangeOf(LSQRequest *other_request);
224 
227  virtual void startAddrTranslation() = 0;
228 
233  virtual PacketPtr getHeadPacket() = 0;
234 
236  virtual void stepToNextPacket() = 0;
237 
239  virtual bool sentAllPackets() = 0;
240 
243  virtual bool hasPacketsInMemSystem() = 0;
244 
247  virtual void retireResponse(PacketPtr packet_) = 0;
248 
250  virtual bool isBarrier();
251 
254  bool needsToBeSentToStoreBuffer();
255 
257  void setState(LSQRequestState new_state);
258 
262  bool isComplete() const;
263 
265  void reportData(std::ostream &os) const;
266  };
267 
269 
270  friend std::ostream & operator <<(std::ostream &os,
272 
273  friend std::ostream & operator <<(std::ostream &os,
275 
276  protected:
279  {
280  protected:
282  void finish(const Fault &fault_, const RequestPtr &request_,
284  { }
285 
286  public:
289 
292  { fatal("No packets in a SpecialDataRequest"); }
293 
295  void stepToNextPacket() { }
296 
298  bool sentAllPackets() { return true; }
299 
301  bool hasPacketsInMemSystem() { return false; }
302 
305  void retireResponse(PacketPtr packet_) { }
306 
307  public:
309  /* Say this is a load, not actually relevant */
310  LSQRequest(port_, inst_, true, NULL, 0)
311  { }
312  };
313 
318  {
319  public:
321  SpecialDataRequest(port_, inst_)
322  { state = Failed; }
323  };
324 
328  {
329  public:
330  bool isBarrier() { return true; }
331 
332  public:
334  SpecialDataRequest(port_, inst_)
335  { state = Complete; }
336  };
337 
340  {
341  protected:
343  void finish(const Fault &fault_, const RequestPtr &request_,
345 
349 
352 
353  public:
355  void startAddrTranslation();
356 
358  PacketPtr getHeadPacket() { return packet; }
359 
361  void stepToNextPacket() { packetInFlight = true; packetSent = true; }
362 
364  bool hasPacketsInMemSystem() { return packetInFlight; }
365 
368  bool sentAllPackets() { return packetSent; }
369 
372  void retireResponse(PacketPtr packet_);
373 
374  public:
376  bool isLoad_, PacketDataPtr data_ = NULL, uint64_t *res_ = NULL) :
377  LSQRequest(port_, inst_, isLoad_, data_, res_),
378  packetInFlight(false),
379  packetSent(false)
380  { }
381  };
382 
384  {
385  protected:
388  protected:
390  unsigned int numFragments;
391 
394 
400 
402  unsigned int numIssuedFragments;
403 
405  unsigned int numRetiredFragments;
406 
410 
413 
414  protected:
416  void finish(const Fault &fault_, const RequestPtr &request_,
418 
419  public:
420  SplitDataRequest(LSQ &port_, MinorDynInstPtr inst_,
421  bool isLoad_, PacketDataPtr data_ = NULL,
422  uint64_t *res_ = NULL);
423 
424  ~SplitDataRequest();
425 
426  public:
429  void makeFragmentRequests();
430 
433  void makeFragmentPackets();
434 
439  void startAddrTranslation();
440 
442  PacketPtr getHeadPacket();
443 
445  void stepToNextPacket();
446 
448  { return numIssuedFragments != numRetiredFragments; }
449 
452  { return numIssuedFragments == numTranslatedFragments; }
453 
456  void retireResponse(PacketPtr packet_);
457 
459  void sendNextFragmentToTranslation();
460  };
461 
465  class StoreBuffer : public Named
466  {
467  public:
470 
472  const unsigned int numSlots;
473 
475  const unsigned int storeLimitPerCycle;
476 
477  public:
480 
483  unsigned int numUnissuedAccesses;
484 
485  public:
486  StoreBuffer(std::string name_, LSQ &lsq_,
487  unsigned int store_buffer_size,
488  unsigned int store_limit_per_cycle);
489 
490  public:
492  bool canInsert() const;
493 
495  void deleteRequest(LSQRequestPtr request);
496 
498  void insert(LSQRequestPtr request);
499 
505  AddrRangeCoverage canForwardDataToLoad(LSQRequestPtr request,
506  unsigned int &found_slot);
507 
510  void forwardStoreData(LSQRequestPtr load, unsigned int slot_number);
511 
514  unsigned int numUnissuedStores() { return numUnissuedAccesses; }
515 
519  void countIssuedStore(LSQRequestPtr request);
520 
522  bool isDrained() const { return slots.empty(); }
523 
525  void step();
526 
528  void minorTrace() const;
529  };
530 
531  protected:
536 
537  public:
540 
542  const unsigned int inMemorySystemLimit;
543 
545  const unsigned int lineWidth;
546 
547  public:
551  typedef Queue<LSQRequestPtr,
555 
569 
578 
579  /* The store buffer contains committed cacheable stores on
580  * their way to memory decoupled from subsequence instruction execution.
581  * Before trying to issue a cacheable read from 'requests' to memory,
582  * the store buffer is checked to see if a previous store contains the
583  * needed data (StoreBuffer::canForwardDataToLoad) which can be
584  * forwarded in lieu of a memory access. If there are outstanding
585  * stores in the transfers queue, they must be promoted to the store
586  * buffer (and so be commited) before they can be correctly checked
587  * for forwarding. */
589 
590  protected:
598 
600  unsigned int numAccessesInDTLB;
601 
604  unsigned int numStoresInTransfers;
605 
610 
613  LSQRequestPtr retryRequest;
614 
617 
618  protected:
622  void tryToSendToTransfers(LSQRequestPtr request);
623 
627  bool tryToSend(LSQRequestPtr request);
628 
630  void clearMemBarrier(MinorDynInstPtr inst);
631 
633  void moveFromRequestsToTransfers(LSQRequestPtr request);
634 
636  bool canSendToMemorySystem();
637 
639  void threadSnoop(LSQRequestPtr request);
640 
641  public:
642  LSQ(std::string name_, std::string dcache_port_name_,
643  MinorCPU &cpu_, Execute &execute_,
644  unsigned int max_accesses_in_memory_system, unsigned int line_width,
645  unsigned int requests_queue_size, unsigned int transfers_queue_size,
646  unsigned int store_buffer_size,
647  unsigned int store_buffer_cycle_store_limit);
648 
649  virtual ~LSQ();
650 
651  public:
659  void step();
660 
663  bool canRequest() { return requests.unreservedRemainingSpace() != 0; }
664 
669  LSQRequestPtr findResponse(MinorDynInstPtr inst);
670 
672  void popResponse(LSQRequestPtr response);
673 
675  bool canPushIntoStoreBuffer() const { return storeBuffer.canInsert(); }
676 
678  void sendStoreToStoreBuffer(LSQRequestPtr request);
679 
683  bool accessesInFlight() const
684  { return numAccessesIssuedToMemory != 0; }
685 
690 
693  { return lastMemBarrier[thread_id]; }
694 
696  bool isDrained();
697 
700  bool needsToTick();
701 
705  bool committed);
706 
709  Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data,
710  unsigned int size, Addr addr, Request::Flags flags,
711  uint64_t *res, AtomicOpFunctorPtr amo_op,
712  const std::vector<bool>& byte_enable =
714 
718 
720  bool recvTimingResp(PacketPtr pkt);
721  void recvReqRetry();
722  void recvTimingSnoopReq(PacketPtr pkt);
723 
726 
727  void minorTrace() const;
728 };
729 
733 PacketPtr makePacketForRequest(const RequestPtr &request, bool isLoad,
734  Packet::SenderState *sender_state = NULL, PacketDataPtr data = NULL);
735 }
736 
737 #endif /* __CPU_MINOR_NEW_LSQ_HH__ */
MemoryState
State of memory access for head access.
Definition: lsq.hh:70
SpecialDataRequest(LSQ &port_, MinorDynInstPtr inst_)
Definition: lsq.hh:308
DcachePort dcachePort
Definition: lsq.hh:114
MinorDynInstPtr inst
Instruction which made this request.
Definition: lsq.hh:129
void stepToNextPacket()
Remember that the packet has been sent.
Definition: lsq.hh:361
SingleDataRequest is used for requests that don&#39;t fragment.
Definition: lsq.hh:339
const unsigned int numSlots
Number of slots, this is a bound on the size of slots.
Definition: lsq.hh:472
unsigned int numAccessesIssuedToMemory
The number of accesses which have been issued to the memory system but have not been committed/discar...
Definition: lsq.hh:609
Execute stage.
Definition: execute.hh:62
LSQQueue transfers
Once issued to memory (or, for stores, just had their state changed to StoreToStoreBuffer) LSQRequest...
Definition: lsq.hh:577
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:175
PacketDataPtr data
Dynamically allocated and populated data carried for building write packets.
Definition: lsq.hh:137
Contains class definitions for data flowing between pipeline stages in the top-level structure portio...
EventFunctionWrapper translationEvent
Event to step between translations.
Definition: lsq.hh:387
LSQQueue requests
requests contains LSQRequests which have been issued to the TLB by calling ExecContext::readMem/write...
Definition: lsq.hh:568
friend std::ostream & operator<<(std::ostream &os, MemoryState state)
Print MemoryState values as shown in the enum definition.
Definition: lsq.cc:1736
bool isTranslationDelayed
Address translation is delayed due to table walk.
Definition: lsq.hh:161
std::vector< Packet * > fragmentPackets
Packets matching fragmentRequests to issue fragments to memory.
Definition: lsq.hh:412
void minorTrace() const
Definition: lsq.cc:1664
unsigned int numIssuedFragments
Number of fragments already issued (<= numFragments)
Definition: lsq.hh:402
void popResponse(LSQRequestPtr response)
Sanity check and pop the head response.
Definition: lsq.cc:1520
void issuedMemBarrierInst(MinorDynInstPtr inst)
A memory barrier instruction has been issued, remember its execSeqNum that we can avoid issuing memor...
Definition: lsq.cc:1708
unsigned int numUnissuedAccesses
Number of occupied slots which have not yet issued a memory access.
Definition: lsq.hh:483
void pushFailedRequest(MinorDynInstPtr inst)
Push a predicate failed-representing request into the queues just to maintain commit order...
Definition: lsq.cc:1657
std::shared_ptr< Request > RequestPtr
Definition: request.hh:83
std::deque< LSQRequestPtr > slots
Queue of store requests on their way to memory.
Definition: lsq.hh:479
std::vector< RequestPtr > fragmentRequests
Fragment Requests corresponding to the address ranges of each fragment.
Definition: lsq.hh:409
unsigned int numStoresInTransfers
The number of stores in the transfers queue.
Definition: lsq.hh:604
uint8_t * PacketDataPtr
Definition: packet.hh:72
unsigned int unreservedRemainingSpace() const
Like remainingSpace but does not count reserved spaces.
Definition: buffers.hh:488
const unsigned int storeLimitPerCycle
Maximum number of stores that can be issued per cycle.
Definition: lsq.hh:475
ip6_addr_t addr
Definition: inet.hh:335
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:230
void stepToNextPacket()
Step on numIssuedFragments.
Definition: lsq.hh:295
SingleDataRequest(LSQ &port_, MinorDynInstPtr inst_, bool isLoad_, PacketDataPtr data_=NULL, uint64_t *res_=NULL)
Definition: lsq.hh:375
Exposable data port.
Definition: lsq.hh:89
Special request types that don&#39;t actually issue memory requests.
Definition: lsq.hh:278
void retireResponse(PacketPtr packet_)
Keep the given packet as the response packet LSQRequest::packet.
Definition: lsq.hh:305
unsigned int numFragments
Number of fragments this request is split into.
Definition: lsq.hh:390
MinorCPUPort(const std::string &name_, MinorCPU &cpu_)
Definition: cpu.hh:107
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
Definition: activity.cc:46
bool canInsert() const
Can a new request be inserted into the queue?
Definition: lsq.cc:728
void startAddrTranslation()
Send single translation request.
Definition: lsq.hh:288
Bitfield< 4, 0 > mode
unsigned int numAccessesInMemorySystem
Count of the number of mem.
Definition: lsq.hh:597
LSQRequestPtr findResponse(MinorDynInstPtr inst)
Returns a response if it&#39;s at the head of the transfers queue and it&#39;s either complete or can be sent...
Definition: lsq.cc:1485
BarrierDataRequest(LSQ &port_, MinorDynInstPtr inst_)
Definition: lsq.hh:333
Wrapper for a queue type to act as a pipeline stage input queue.
Definition: buffers.hh:399
bool isBarrier()
Is this a request a barrier?
Definition: lsq.hh:330
ThreadContext is the external interface to all thread state for anything outside of the CPU...
This file contains miscellaneous classes and functions for formatting general trace information and a...
FailedDataRequest(LSQ &port_, MinorDynInstPtr inst_)
Definition: lsq.hh:320
Bitfield< 17 > os
Definition: misc.hh:805
bool sentAllPackets()
packetInFlight can become false again, so need to check packetSent
Definition: lsq.hh:368
Derived SenderState to carry data access info.
Definition: lsq.hh:120
LSQRequestState state
Definition: lsq.hh:185
bool isSnooping() const override
Determine if this master port is snooping or not.
Definition: lsq.hh:106
Provide a non-protected base class for Minor&#39;s Ports as derived classes are created by Fetch1 and Exe...
Definition: cpu.hh:100
std::vector< InstSeqNum > lastMemBarrier
Most recent execSeqNum of a memory barrier instruction or 0 if there are no in-flight barriers...
Definition: lsq.hh:535
Definition: trace.hh:151
bool canRequest()
Is their space in the request queue to be able to push a request by issuing an isMemRef instruction...
Definition: lsq.hh:663
Request for doing barrier accounting in the store buffer.
Definition: lsq.hh:327
void completeMemBarrierInst(MinorDynInstPtr inst, bool committed)
Complete a barrier instruction.
Definition: lsq.cc:921
A similar adaptor but for elements held by pointer ElemType should implement ReportIF.
Definition: buffers.hh:103
MemoryState state
Retry state of last issued memory transfer.
Definition: lsq.hh:539
bool skippedMemAccess()
Was no memory access attempted for this request?
Definition: lsq.hh:209
unsigned int numRetiredFragments
Number of fragments retired back to this request.
Definition: lsq.hh:405
PacketPtr getHeadPacket()
Get the head packet as counted by numIssuedFragments.
Definition: lsq.hh:358
StoreBuffer storeBuffer
Definition: lsq.hh:588
PacketPtr makePacketForRequest(const RequestPtr &request, bool isLoad, Packet::SenderState *sender_state, PacketDataPtr data)
Make a suitable packet for the given request.
Definition: lsq.cc:1687
PacketPtr getHeadPacket()
Get the head packet as counted by numIssuedFragments.
Definition: lsq.hh:291
bool issuedToMemory
This in an access other than a normal cacheable load that&#39;s visited the memory system.
Definition: lsq.hh:158
void finish(const Fault &fault_, const RequestPtr &request_, ThreadContext *tc, BaseTLB::Mode mode)
TLB interace.
Definition: lsq.hh:282
Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable=std::vector< bool >())
Single interface for readMem/writeMem/amoMem to issue requests into the LSQ.
Definition: lsq.cc:1582
bool tryToSend(LSQRequestPtr request)
Try to send (or resend) a memory request&#39;s next/only packet to the memory system. ...
Definition: lsq.cc:1172
bool isLoad
Load/store indication used for building packet.
Definition: lsq.hh:133
bool hasPacketsInMemSystem()
Has packet been sent.
Definition: lsq.hh:364
LSQ & lsq
My owner.
Definition: lsq.hh:93
MinorCPU::MinorCPUPort & getDcachePort()
Return the raw-bindable port.
Definition: lsq.hh:725
bool canSendToMemorySystem()
Can a request be sent to the memory system.
Definition: lsq.cc:1288
bool canPushIntoStoreBuffer() const
Must check this before trying to insert into the store buffer.
Definition: lsq.hh:675
uint64_t InstSeqNum
Definition: inst_seq.hh:40
FailedDataRequest represents requests from instructions that failed their predicates but need to ride...
Definition: lsq.hh:317
LSQRequest * LSQRequestPtr
Definition: lsq.hh:268
bool packetSent
Has the packet been at least sent to the memory system?
Definition: lsq.hh:351
unsigned int numInTranslationFragments
Number of fragments in the address translation mechanism.
Definition: lsq.hh:393
Classes for buffer, queue and FIFO behaviour.
void clearMemBarrier(MinorDynInstPtr inst)
Clear a barrier (if it&#39;s the last one marked up in lastMemBarrier)
Definition: lsq.cc:258
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
MinorCPU & cpu
My owner(s)
Definition: lsq.hh:65
bool sentAllPackets()
Have we stepped past the end of fragmentPackets?
Definition: lsq.hh:451
bool isDrained()
Is there nothing left in the LSQ.
Definition: lsq.cc:1555
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:255
unsigned int numUnissuedStores()
Number of stores in the store buffer which have not been completely issued to the memory system...
Definition: lsq.hh:514
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
Definition: lsq.hh:101
void tryToSendToTransfers(LSQRequestPtr request)
Try and issue a memory access for a translated request at the head of the requests queue...
Definition: lsq.cc:967
A virtual base opaque structure used to hold state associated with the packet (e.g., an MSHR), specific to a SimObject that sees the packet.
Definition: packet.hh:403
AddrRangeCoverage
Coverage of one address range with another.
Definition: lsq.hh:81
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: lsq.hh:104
void markDelayed()
BaseTLB::Translation interface.
Definition: lsq.hh:189
void step()
Step checks the queues to see if their are issuable transfers which were not otherwise picked up by t...
Definition: lsq.cc:1474
unsigned int numAccessesInDTLB
Number of requests in the DTLB in the requests queue.
Definition: lsq.hh:600
Mode
Definition: tlb.hh:59
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
void sendStoreToStoreBuffer(LSQRequestPtr request)
A store has been committed, please move it to the store buffer.
Definition: lsq.cc:1542
LSQRequestPtr retryRequest
The request (from either requests or the store buffer) which is currently waiting have its memory acc...
Definition: lsq.hh:613
bool recvTimingResp(PacketPtr pkt)
Memory interface.
Definition: lsq.cc:1295
uint64_t * res
Res from pushRequest.
Definition: lsq.hh:149
DcachePort(std::string name, LSQ &lsq_, MinorCPU &cpu)
Definition: lsq.hh:96
virtual ~LSQ()
Definition: lsq.cc:1456
bool skipped
Was skipped.
Definition: lsq.hh:154
LSQ & port
Owning port.
Definition: lsq.hh:126
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
Definition: lsq.hh:108
bool hasPacketsInMemSystem()
True if this request has any issued packets in the memory system and so can&#39;t be interrupted until it...
Definition: lsq.hh:447
Top level definition of the Minor in-order CPU model.
Addr cacheBlockMask
Address Mask for a cache block (e.g.
Definition: lsq.hh:616
PacketPtr packet
Definition: lsq.hh:143
const std::string name() const
Return port name (for DPRINTF).
Definition: port.hh:106
bool hasPacketsInMemSystem()
Never sends any requests.
Definition: lsq.hh:301
bool isDrained() const
Drained if there is absolutely nothing left in the buffer.
Definition: lsq.hh:522
LSQ(std::string name_, std::string dcache_port_name_, MinorCPU &cpu_, Execute &execute_, unsigned int max_accesses_in_memory_system, unsigned int line_width, unsigned int requests_queue_size, unsigned int transfers_queue_size, unsigned int store_buffer_size, unsigned int store_buffer_cycle_store_limit)
Definition: lsq.cc:1401
Store buffer.
Definition: lsq.hh:465
void recvReqRetry()
Definition: lsq.cc:1355
bool packetInFlight
Has my only packet been sent to the memory system but has not yet been responded to.
Definition: lsq.hh:348
LSQ & lsq
My owner.
Definition: lsq.hh:469
const unsigned int inMemorySystemLimit
Maximum number of in-flight accesses issued to the memory system.
Definition: lsq.hh:542
InstSeqNum getLastMemBarrier(ThreadID thread_id) const
Get the execSeqNum of the last issued memory barrier.
Definition: lsq.hh:692
const unsigned int lineWidth
Memory system access width (and snap) in bytes.
Definition: lsq.hh:545
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Definition: cpu.hh:79
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
Definition: lsq.hh:111
RequestPtr request
The underlying request of this LSQRequest.
Definition: lsq.hh:146
void threadSnoop(LSQRequestPtr request)
Snoop other threads monitors on memory system accesses.
Definition: lsq.cc:1773
void setSkipped()
Set this request as having been skipped before a memory transfer was attempt.
Definition: lsq.hh:213
const char data[]
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
bool accessesInFlight() const
Are there any accesses other than normal cached loads in the memory system or having received respons...
Definition: lsq.hh:683
Queue< LSQRequestPtr, ReportTraitsPtrAdaptor< LSQRequestPtr >, NoBubbleTraits< LSQRequestPtr > > LSQQueue
The LSQ consists of three queues: requests, transfers and the store buffer storeBuffer.
Definition: lsq.hh:554
void recvTimingSnoopReq(PacketPtr pkt)
Definition: lsq.cc:1753
Execute & execute
Definition: lsq.hh:66
bool sentAllPackets()
Has no packets to send.
Definition: lsq.hh:298
void moveFromRequestsToTransfers(LSQRequestPtr request)
Move a request between queues.
Definition: lsq.cc:1271
bool needsToTick()
May need to be ticked next cycle as one of the queues contains an actionable transfers or address tra...
Definition: lsq.cc:1562
unsigned int numTranslatedFragments
Number of fragments that have completed address translation, (numTranslatedFragments + numInTranslati...
Definition: lsq.hh:399

Generated on Fri Feb 28 2020 16:26:59 for gem5 by doxygen 1.8.13