gem5  v22.0.0.2
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 
41 namespace gem5
42 {
43 
44 struct ComputeUnitParams;
45 class Wavefront;
46 
48 {
49  public:
56  virtual void reset() = 0;
57 };
58 
63 {
64  public:
65  ScoreboardCheckToSchedule() = delete;
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:
101  ScheduleToExecute() = delete;
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__
gem5::PipeStageIFace
Definition: comm.hh:47
gem5::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:67
gem5::ScheduleToExecute::_readyInsts
std::vector< GPUDynInstPtr > _readyInsts
Definition: comm.hh:118
gem5::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:89
gem5::ScoreboardCheckToSchedule::ScoreboardCheckToSchedule
ScoreboardCheckToSchedule()=delete
gem5::ScheduleToExecute
Communication interface between Schedule and Execute stages.
Definition: comm.hh:98
gem5::Wavefront
Definition: wavefront.hh:60
misc.hh
gem5::ScheduleToExecute::dispatchStatus
DISPATCH_STATUS dispatchStatus(int func_unit_id) const
Definition: comm.cc:150
std::vector
STL vector class.
Definition: stl.hh:37
gem5::ScheduleToExecute::ScheduleToExecute
ScheduleToExecute()=delete
gem5::ScoreboardCheckToSchedule::reset
void reset() override
Reset the pipe stage interface.
Definition: comm.cc:59
gem5::ScheduleToExecute::readyInst
GPUDynInstPtr & readyInst(int func_unit_id)
Definition: comm.cc:127
gem5::PipeStageIFace::reset
virtual void reset()=0
Reset the pipe stage interface.
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::ScheduleToExecute::reset
void reset() override
Reset the pipe stage interface.
Definition: comm.cc:115
gem5::DISPATCH_STATUS
DISPATCH_STATUS
Definition: exec_stage.hh:59
gem5::ScheduleToExecute::_dispatchStatus
std::vector< DISPATCH_STATUS > _dispatchStatus
Definition: comm.hh:119
gem5::GPUDynInstPtr
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition: misc.hh:49
gem5::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:79
gem5::ScoreboardCheckToSchedule
Communication interface between ScoreboardCheck and Schedule stages.
Definition: comm.hh:62
gem5::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:133
gem5::ScoreboardCheckToSchedule::_readyWFs
std::vector< std::vector< Wavefront * > > _readyWFs
Definition: comm.hh:92
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
exec_stage.hh
gem5::ScoreboardCheckToSchedule::numReadyLists
int numReadyLists() const
Returns the number of ready lists (i.e., the number of functional units).
Definition: comm.cc:73

Generated on Thu Jul 28 2022 13:32:28 for gem5 by doxygen 1.8.17