gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
VIPERSequencer.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 The University of Wisconsin
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * 3. Neither the name of the copyright holder nor the names of its
15 * contributors may be used to endorse or promote products derived from this
16 * software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
32
33#include "debug/RubyHitMiss.hh"
34#include "debug/RubySequencer.hh"
37#include "params/VIPERSequencer.hh"
38
39namespace gem5
40{
41
42namespace ruby
43{
44
49
50
54
55void
57 bool llscSuccess,
58 const MachineType mach, const bool externalHit,
59 const Cycles initialRequestTime,
60 const Cycles forwardRequestTime,
61 const Cycles firstResponseTime,
62 const bool was_coalesced)
63{
64 if (srequest->m_type != RubyRequestType_hasNoAddr) {
66 srequest, data, llscSuccess, mach, externalHit, initialRequestTime,
67 forwardRequestTime, firstResponseTime, was_coalesced);
68 }
69
70 PacketPtr pkt = srequest->pkt;
71
72 assert(!was_coalesced);
73 DPRINTF(RubySequencer, "Setting hasNoAddr ticks\n");
77 ->_gpuDynInst->computeUnit()->curCycle();
78 pkt->setData((const uint8_t *)&curCycle);
79
80 // If using the RubyTester, update the RubyTester sender state's
81 // subBlock with the recieved data. The tester will later access
82 // this state.
83 assert(!m_usingRubyTester);
88}
89
90bool
93 const bool ruby_request,
94 bool externalHit,
95 const MachineType mach,
96 Cycles initialRequestTime,
97 Cycles forwardRequestTime,
98 Cycles firstResponseTime)
99{
100 if (seq_req.m_type != RubyRequestType_hasNoAddr) {
102 seq_req, data, ruby_request, externalHit, mach, initialRequestTime,
103 forwardRequestTime, firstResponseTime);
104 }
105 return false;
106}
107
108} // namespace ruby
109} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:209
const char data[]
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Cycles is a wrapper class for representing cycle counts, i.e.
Definition types.hh:79
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
T * findNextSenderState() const
Go through the sender state stack and return the first instance that is of type T (as determined by a...
Definition packet.hh:575
void setData(const uint8_t *p)
Copy data into the packet from the provided pointer.
Definition packet.hh:1293
void ruby_hit_callback(PacketPtr pkt)
Definition RubyPort.cc:462
RubySystem * m_ruby_system
Definition Sequencer.hh:257
virtual void hitCallback(SequencerRequest *srequest, DataBlock &data, bool llscSuccess, const MachineType mach, const bool externalHit, const Cycles initialRequestTime, const Cycles forwardRequestTime, const Cycles firstResponseTime, const bool was_coalesced)
Definition Sequencer.cc:696
virtual bool processReadCallback(SequencerRequest &seq_req, DataBlock &data, const bool rubyRequest, bool externalHit, const MachineType mach, Cycles initialRequestTime, Cycles forwardRequestTime, Cycles firstResponseTime)
Definition Sequencer.cc:568
bool processReadCallback(SequencerRequest &seq_req, DataBlock &data, const bool rubyRequest, bool externalHit, const MachineType mach, Cycles initialRequestTime, Cycles forwardRequestTime, Cycles firstResponseTime)
VIPERSequencerParams Params
VIPERSequencer(const Params &p)
void hitCallback(SequencerRequest *srequest, DataBlock &data, bool llscSuccess, const MachineType mach, const bool externalHit, const Cycles initialRequestTime, const Cycles forwardRequestTime, const Cycles firstResponseTime, const bool was_coalesced)
Bitfield< 0 > p
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36

Generated on Mon Jan 13 2025 04:28:41 for gem5 by doxygen 1.9.8