diff options
| author | Tor Aamodt <[email protected]> | 2010-08-29 14:55:25 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-08-29 14:55:25 -0800 |
| commit | 80e1b49ff823190d0316623d414a343575c93eae (patch) | |
| tree | 273e041128687af72e31161cce5759f6819aef97 /src/gpgpu-sim/scoreboard.h | |
| parent | 5cb919d7fbe3e5b388b9c83b22762dad96da56b1 (diff) | |
- integrate changes from fermi-test (CL's under that path in range 7261-7418).
(add scoreboard logic from ptxplus branch and modified operand collector
with parallel ALU/SFU pipelines)
passing regressions
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7419]
Diffstat (limited to 'src/gpgpu-sim/scoreboard.h')
| -rw-r--r-- | src/gpgpu-sim/scoreboard.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/gpgpu-sim/scoreboard.h b/src/gpgpu-sim/scoreboard.h new file mode 100644 index 0000000..4139948 --- /dev/null +++ b/src/gpgpu-sim/scoreboard.h @@ -0,0 +1,43 @@ +/* + * scoreboard.h + * + * Created on: Aug 10, 2010 + * Author: inder + */ + +#include <stdio.h> +#include <stdlib.h> +#include <vector> +#include <set> +#include "assert.h" + +#ifndef SCOREBOARD_H_ +#define SCOREBOARD_H_ + +typedef unsigned op_type; + +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; + + void reserveRegister(int wid, int regnum); + void releaseRegister(int wid, int regnum); + + public: + Scoreboard( int sid, int n_warps ); + + void printContents(); + + void reserveRegisters(int wid, void *inst_void); + void releaseRegisters(int wid, void *inst_void); + + bool checkCollision(int wid, void *inst_void); + +}; + + +#endif /* SCOREBOARD_H_ */ |
