gem5  v22.1.0.0
VIPERCoalescer.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2015 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its
16  * contributors may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef __MEM_RUBY_SYSTEM_VIPERCOALESCER_HH__
33 #define __MEM_RUBY_SYSTEM_VIPERCOALESCER_HH__
34 
35 #include <iostream>
36 
39 #include "mem/ruby/protocol/PrefetchBit.hh"
40 #include "mem/ruby/protocol/RubyAccessMode.hh"
41 #include "mem/ruby/protocol/RubyRequestType.hh"
44 
45 namespace gem5
46 {
47 
48 struct VIPERCoalescerParams;
49 
50 namespace ruby
51 {
52 
53 class DataBlock;
54 class CacheMsg;
55 struct MachineID;
56 class CacheMemory;
57 
59 {
60  public:
61  typedef VIPERCoalescerParams Params;
62  VIPERCoalescer(const Params &);
64  void writeCompleteCallback(Addr address, uint64_t instSeqNum);
65  void invTCPCallback(Addr address);
66  RequestStatus makeRequest(PacketPtr pkt) override;
67  void issueRequest(CoalescedRequest* crequest) override;
68 
69  private:
70  void invTCP();
71 
72  // make write-complete response packets from original write request packets
74 
75  // current cache invalidation packet
76  // nullptr if there is no active cache invalidation request
78 
79  // number of remaining cache lines to be invalidated in TCP
81 
82  // a map of instruction sequence number and corresponding pending
83  // write-complete response packets. Each write-complete response
84  // corresponds to a pending store request that is waiting for
85  // writeCompleteCallback. We may have multiple pending store requests per
86  // wavefront at a time. Each time writeCompleteCallback is called, an entry
87  // with a corresponding seqNum is popped off from map and returned to
88  // compute unit.
89  std::unordered_map<uint64_t, std::vector<PacketPtr>> m_writeCompletePktMap;
90 };
91 
92 } // namespace ruby
93 } // namespace gem5
94 
95 #endif //__MEM_RUBY_SYSTEM_VIPERCOALESCER_HH__
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
RubyGPUCoalescerParams Params
void makeWriteCompletePkts(CoalescedRequest *crequest)
void invTCP()
Invalidate TCP.
std::unordered_map< uint64_t, std::vector< PacketPtr > > m_writeCompletePktMap
RequestStatus makeRequest(PacketPtr pkt) override
void issueRequest(CoalescedRequest *crequest) override
VIPERCoalescer(const Params &)
void invTCPCallback(Addr address)
VIPERCoalescerParams Params
void writeCompleteCallback(Addr address, uint64_t instSeqNum)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147

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