gem5  v21.1.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  * 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 namespace gem5
44 {
45 
46 struct ComputeUnitParams;
47 class Wavefront;
48 
50 {
51  public:
58  virtual void reset() = 0;
59 };
60 
65 {
66  public:
67  ScoreboardCheckToSchedule() = delete;
68  ScoreboardCheckToSchedule(const ComputeUnitParams &p);
69  void reset() override;
74  void markWFReady(Wavefront *wf, int func_unit_id);
80  int numReadyLists() const;
88  std::vector<Wavefront*>& readyWFs(int func_unit_id);
89 
90  // TODO: Leftover from old CU code, needs to go away.
91  void updateReadyList(int func_unit_id);
92 
93  private:
95 };
96 
101 {
102  public:
103  ScheduleToExecute() = delete;
104  ScheduleToExecute(const ComputeUnitParams &p);
105  void reset() override;
106  GPUDynInstPtr& readyInst(int func_unit_id);
114  void dispatchTransition(const GPUDynInstPtr &gpu_dyn_inst,
115  int func_unit_id, DISPATCH_STATUS disp_status);
116  void dispatchTransition(int func_unit_id, DISPATCH_STATUS disp_status);
117  DISPATCH_STATUS dispatchStatus(int func_unit_id) const;
118 
119  private:
122 };
123 
124 } // namespace gem5
125 
126 #endif // __GPU_COMPUTE_COMM_HH__
gem5::PipeStageIFace
Definition: comm.hh:49
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:69
gem5::ScheduleToExecute::_readyInsts
std::vector< GPUDynInstPtr > _readyInsts
Definition: comm.hh:120
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:91
gem5::ScoreboardCheckToSchedule::ScoreboardCheckToSchedule
ScoreboardCheckToSchedule()=delete
gem5::ScheduleToExecute
Communication interface between Schedule and Execute stages.
Definition: comm.hh:100
gem5::Wavefront
Definition: wavefront.hh:62
misc.hh
gem5::ScheduleToExecute::dispatchStatus
DISPATCH_STATUS dispatchStatus(int func_unit_id) const
Definition: comm.cc:152
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:61
gem5::ScheduleToExecute::readyInst
GPUDynInstPtr & readyInst(int func_unit_id)
Definition: comm.cc:129
gem5::PipeStageIFace::reset
virtual void reset()=0
Reset the pipe stage interface.
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::ScheduleToExecute::reset
void reset() override
Reset the pipe stage interface.
Definition: comm.cc:117
gem5::DISPATCH_STATUS
DISPATCH_STATUS
Definition: exec_stage.hh:61
gem5::ScheduleToExecute::_dispatchStatus
std::vector< DISPATCH_STATUS > _dispatchStatus
Definition: comm.hh:121
gem5::GPUDynInstPtr
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Definition: misc.hh:51
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:81
gem5::ScoreboardCheckToSchedule
Communication interface between ScoreboardCheck and Schedule stages.
Definition: comm.hh:64
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:135
gem5::ScoreboardCheckToSchedule::_readyWFs
std::vector< std::vector< Wavefront * > > _readyWFs
Definition: comm.hh:94
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
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:75

Generated on Tue Sep 21 2021 12:25:03 for gem5 by doxygen 1.8.17