gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
45namespace gem5
46{
47
48struct VIPERCoalescerParams;
49
50namespace ruby
51{
52
53class DataBlock;
54class CacheMsg;
55struct MachineID;
56class 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 void invTCCCallback(Addr address);
67 RequestStatus makeRequest(PacketPtr pkt) override;
68 void issueRequest(CoalescedRequest* crequest) override;
69
70 private:
71 void invTCP();
72 void invTCC(PacketPtr pkt);
73
74 // make write-complete response packets from original write request packets
76
77 // current cache invalidation packet
78 // nullptr if there is no active cache invalidation request
80
81 // number of remaining cache lines to be invalidated in TCP
83
84 // outstanding L2 invalidate packets
85 std::unordered_map<Addr, std::vector<PacketPtr>> m_pending_invl2s;
86
87 // a map of instruction sequence number and corresponding pending
88 // write-complete response packets. Each write-complete response
89 // corresponds to a pending store request that is waiting for
90 // writeCompleteCallback. We may have multiple pending store requests per
91 // wavefront at a time. Each time writeCompleteCallback is called, an entry
92 // with a corresponding seqNum is popped off from map and returned to
93 // compute unit.
94 std::unordered_map<uint64_t, std::vector<PacketPtr>> m_writeCompletePktMap;
95};
96
97} // namespace ruby
98} // namespace gem5
99
100#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:295
void makeWriteCompletePkts(CoalescedRequest *crequest)
void invTCP()
Invalidate TCP.
void invTCC(PacketPtr pkt)
std::unordered_map< uint64_t, std::vector< PacketPtr > > m_writeCompletePktMap
RequestStatus makeRequest(PacketPtr pkt) override
void issueRequest(CoalescedRequest *crequest) override
std::unordered_map< Addr, std::vector< PacketPtr > > m_pending_invl2s
void invTCCCallback(Addr address)
void invTCPCallback(Addr address)
VIPERCoalescerParams Params
void writeCompleteCallback(Addr address, uint64_t instSeqNum)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0