diff options
| author | Davit Grigoryan <[email protected]> | 2026-04-29 00:02:46 +0000 |
|---|---|---|
| committer | Davit Grigoryan <[email protected]> | 2026-04-29 00:02:46 +0000 |
| commit | 314fb652d8a27a38599eeeec121d45327a405bb0 (patch) | |
| tree | d3fa263f05e8b40c766b68eb1771b619b847802f /src/gpgpu-sim/scoreboard.h | |
| parent | fbb90ef3a76cd6c469782c84668d25c5f3bfdd22 (diff) | |
impl option w/ only 2 SBs; stall so SBs are cleared before div or reconv
Diffstat (limited to 'src/gpgpu-sim/scoreboard.h')
| -rw-r--r-- | src/gpgpu-sim/scoreboard.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/gpgpu-sim/scoreboard.h b/src/gpgpu-sim/scoreboard.h index 660587e..da34af5 100644 --- a/src/gpgpu-sim/scoreboard.h +++ b/src/gpgpu-sim/scoreboard.h @@ -32,6 +32,7 @@ #include <set> #include <utility> #include <vector> +#include <array> #include "assert.h" #ifndef SCOREBOARD_H_ @@ -83,8 +84,29 @@ class Scoreboard { // Per-set release dispatcher used at writeback. In mode 0, picks // primary vs secondary release based on `is_intra_legacy`. In mode 1, // releases (reg, mask) from mask_reg_table; `is_intra_legacy` ignored. + // In mode 2, releases (reg) from slot_reg_table[wid][slot_id]. void releaseSetReg(unsigned wid, unsigned reg, const active_mask_t &mask, - bool is_intra_legacy); + bool is_intra_legacy, unsigned slot_id = 0); + + // Mode 2: slot-pinned per-half scoreboards. Each warp has two + // independent scoreboards (one per ibuffer half). Hazard tracking + // ignores masks since slot ownership guarantees lane-disjoint + // operation between the two halves. See + // for_claude/docs/scoreboard_redesign_plan.md. + static const unsigned NUM_SLOTS = 2; + void reserveRegisterSlot(unsigned wid, unsigned slot, unsigned regnum); + void releaseRegisterSlot(unsigned wid, unsigned slot, unsigned regnum); + bool checkCollisionSlot(unsigned wid, unsigned slot, + const inst_t *inst) const; + bool pendingWritesSlot(unsigned wid, unsigned slot) const { + return !slot_reg_table[wid][slot].empty(); + } + bool slotClean(unsigned wid, unsigned slot) const { + return slot_reg_table[wid][slot].empty(); + } + bool bothSlotsClean(unsigned wid) const { + return slot_reg_table[wid][0].empty() && slot_reg_table[wid][1].empty(); + } public: // Accounting / leak-detection (called from gpu-sim end-of-run dump). @@ -113,6 +135,10 @@ class Scoreboard { // Secondary path register tracking (for I-Buffer half 1, intra-warp co-issue) std::vector<std::set<unsigned> > sec_reg_table; + // Mode 2: per-warp, per-slot register sets. + // slot_reg_table[wid][slot] = set of reserved register numbers. + std::vector<std::array<std::set<unsigned>, NUM_SLOTS> > slot_reg_table; + // Mode 1: per-warp list of mask-aware reservations. struct mask_resv { unsigned reg; |
