gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
comm.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * For use for simulation and test purposes only
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef __GPU_COMPUTE_COMM_HH__
35 #define __GPU_COMPUTE_COMM_HH__
36 
37 #include <array>
38 #include <vector>
39 
41 #include "gpu-compute/misc.hh"
42 
43 struct ComputeUnitParams;
44 class Wavefront;
45 
47 {
48  public:
55  virtual void reset() = 0;
56 };
57 
62 {
63  public:
64  ScoreboardCheckToSchedule() = delete;
65  ScoreboardCheckToSchedule(const ComputeUnitParams &p);
66  void reset() override;
71  void markWFReady(Wavefront *wf, int func_unit_id);
77  int numReadyLists() const;
85  std::vector<Wavefront*>& readyWFs(int func_unit_id);
86 
87  // TODO: Leftover from old CU code, needs to go away.
88  void updateReadyList(int func_unit_id);
89 
90  private:
92 };
93 
98 {
99  public:
100  ScheduleToExecute() = delete;
101  ScheduleToExecute(const ComputeUnitParams &p);
102  void reset() override;
103  GPUDynInstPtr& readyInst(int func_unit_id);
111  void dispatchTransition(const GPUDynInstPtr &gpu_dyn_inst,
112  int func_unit_id, DISPATCH_STATUS disp_status);
113  void dispatchTransition(int func_unit_id, DISPATCH_STATUS disp_status);
114  DISPATCH_STATUS dispatchStatus(int func_unit_id) const;
115 
116  private:
119 };
120 
121 #endif // __GPU_COMPUTE_COMM_HH__
ScoreboardCheckToSchedule::ScoreboardCheckToSchedule
ScoreboardCheckToSchedule()=delete
ScheduleToExecute::reset
void reset() override
Reset the pipe stage interface.
Definition: comm.cc:114
PipeStageIFace
Definition: comm.hh:46
ScheduleToExecute::readyInst
GPUDynInstPtr & readyInst(int func_unit_id)
Definition: comm.cc:126
misc.hh
ScoreboardCheckToSchedule::reset
void reset() override
Reset the pipe stage interface.
Definition: comm.cc:58
ScheduleToExecute::_readyInsts
std::vector< GPUDynInstPtr > _readyInsts
Definition: comm.hh:117
ScheduleToExecute::dispatchStatus
DISPATCH_STATUS dispatchStatus(int func_unit_id) const
Definition: comm.cc:149
std::vector< Wavefront * >
ScoreboardCheckToSchedule::_readyWFs
std::vector< std::vector< Wavefront * > > _readyWFs
Definition: comm.hh:91
ScoreboardCheckToSchedule::markWFReady
void markWFReady(Wavefront *wf, int func_unit_id)
Mark the WF as ready for execution on a particular functional unit.
Definition: comm.cc:66
ScoreboardCheckToSchedule::updateReadyList
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:88
ScheduleToExecute::_dispatchStatus
std::vector< DISPATCH_STATUS > _dispatchStatus
Definition: comm.hh:118
ScheduleToExecute::dispatchTransition
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:132
ScheduleToExecute
Communication interface between Schedule and Execute stages.
Definition: comm.hh:97
ScoreboardCheckToSchedule
Communication interface between ScoreboardCheck and Schedule stages.
Definition: comm.hh:61
Wavefront
Definition: wavefront.hh:59
GPUDynInstPtr
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition: misc.hh:48
ScoreboardCheckToSchedule::readyWFs
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:78
ScheduleToExecute::ScheduleToExecute
ScheduleToExecute()=delete
ScoreboardCheckToSchedule::numReadyLists
int numReadyLists() const
Returns the number of ready lists (i.e., the number of functional units).
Definition: comm.cc:72
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
PipeStageIFace::reset
virtual void reset()=0
Reset the pipe stage interface.
DISPATCH_STATUS
DISPATCH_STATUS
Definition: exec_stage.hh:58
exec_stage.hh

Generated on Tue Jun 22 2021 15:28:26 for gem5 by doxygen 1.8.17