diff options
| author | Tor Aamodt <[email protected]> | 2010-10-01 08:55:28 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-10-01 08:55:28 -0800 |
| commit | 11b308e7363e937966b035b4891db32b4eece3bf (patch) | |
| tree | 50ca4c9ad6f163ac4acb2bf505e64dfebed66947 /src/gpgpu-sim/scoreboard.h | |
| parent | bb820c116764d7a1b8e071137d32b74e7f34dd2f (diff) | |
integrating recent changes from fermi-test into fermi
(i'll use "fermi" for more disruptive changes to the pipeline model such
as updating the MSHRs and getting rid of the warp tracker, ripping out DWF, etc...)
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7805]
Diffstat (limited to 'src/gpgpu-sim/scoreboard.h')
| -rw-r--r-- | src/gpgpu-sim/scoreboard.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/gpgpu-sim/scoreboard.h b/src/gpgpu-sim/scoreboard.h index 4139948..6cec22c 100644 --- a/src/gpgpu-sim/scoreboard.h +++ b/src/gpgpu-sim/scoreboard.h @@ -14,29 +14,28 @@ #ifndef SCOREBOARD_H_ #define SCOREBOARD_H_ -typedef unsigned op_type; +#include "../abstract_hardware_model.h" -class Scoreboard -{ - private: - int sid; // Shader id - // Table to keep track of write-pending registers - // Indexed by warp id (wid) - std::vector< std::set<int> > reg_table; +class Scoreboard { +public: + Scoreboard( unsigned sid, unsigned n_warps ); - void reserveRegister(int wid, int regnum); - void releaseRegister(int wid, int regnum); + void printContents(); - public: - Scoreboard( int sid, int n_warps ); + void reserveRegisters(unsigned wid, const inst_t *inst); + void releaseRegisters(unsigned wid, const inst_t *inst); - void printContents(); + bool checkCollision(unsigned wid, const inst_t *inst); + bool pendingWrites(unsigned wid) const; +private: + void reserveRegister(unsigned wid, unsigned regnum); + void releaseRegister(unsigned wid, unsigned regnum); - void reserveRegisters(int wid, void *inst_void); - void releaseRegisters(int wid, void *inst_void); - - bool checkCollision(int wid, void *inst_void); + unsigned m_sid; + // keeps track of pending writes to registers + // indexed by warp id + std::vector< std::set<int> > reg_table; }; |
