gem5 v24.0.0.0
Loading...
Searching...
No Matches
comm.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 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 __GPU_COMPUTE_COMM_HH__
33#define __GPU_COMPUTE_COMM_HH__
34
35#include <array>
36#include <vector>
37
39#include "gpu-compute/misc.hh"
40
41namespace gem5
42{
43
44struct ComputeUnitParams;
45class Wavefront;
46
48{
49 public:
56 virtual void reset() = 0;
57};
58
63{
64 public:
66 ScoreboardCheckToSchedule(const ComputeUnitParams &p);
67 void reset() override;
72 void markWFReady(Wavefront *wf, int func_unit_id);
78 int numReadyLists() const;
86 std::vector<Wavefront*>& readyWFs(int func_unit_id);
87
88 // TODO: Leftover from old CU code, needs to go away.
89 void updateReadyList(int func_unit_id);
90
91 private:
93};
94
99{
100 public:
102 ScheduleToExecute(const ComputeUnitParams &p);
103 void reset() override;
104 GPUDynInstPtr& readyInst(int func_unit_id);
112 void dispatchTransition(const GPUDynInstPtr &gpu_dyn_inst,
113 int func_unit_id, DISPATCH_STATUS disp_status);
114 void dispatchTransition(int func_unit_id, DISPATCH_STATUS disp_status);
115 DISPATCH_STATUS dispatchStatus(int func_unit_id) const;
116
117 private:
120};
121
122} // namespace gem5
123
124#endif // __GPU_COMPUTE_COMM_HH__
virtual void reset()=0
Reset the pipe stage interface.
Communication interface between Schedule and Execute stages.
Definition comm.hh:99
DISPATCH_STATUS dispatchStatus(int func_unit_id) const
Definition comm.cc:150
std::vector< GPUDynInstPtr > _readyInsts
Definition comm.hh:118
void reset() override
Reset the pipe stage interface.
Definition comm.cc:115
GPUDynInstPtr & readyInst(int func_unit_id)
Definition comm.cc:127
void dispatchTransition(const GPUDynInstPtr &gpu_dyn_inst, int func_unit_id, DISPATCH_STATUS disp_status)
Once the scheduler has chosen a winning WF for execution, and after the WF's oldest instruction's ope...
Definition comm.cc:133
std::vector< DISPATCH_STATUS > _dispatchStatus
Definition comm.hh:119
Communication interface between ScoreboardCheck and Schedule stages.
Definition comm.hh:63
int numReadyLists() const
Returns the number of ready lists (i.e., the number of functional units).
Definition comm.cc:73
std::vector< Wavefront * > & readyWFs(int func_unit_id)
TODO: These methods expose this class' implementation too much by returning references to its interna...
Definition comm.cc:79
void reset() override
Reset the pipe stage interface.
Definition comm.cc:59
void markWFReady(Wavefront *wf, int func_unit_id)
Mark the WF as ready for execution on a particular functional unit.
Definition comm.cc:67
void updateReadyList(int func_unit_id)
Delete all wavefronts that have been marked as ready at scoreboard stage but are found to have empty ...
Definition comm.cc:89
std::vector< std::vector< Wavefront * > > _readyWFs
Definition comm.hh:92
STL vector class.
Definition stl.hh:37
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition misc.hh:49
DISPATCH_STATUS
Definition exec_stage.hh:60

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