diff options
| author | Aaron Barnes <[email protected]> | 2021-05-10 18:50:34 -0400 |
|---|---|---|
| committer | Aaron Barnes <[email protected]> | 2021-05-10 18:50:34 -0400 |
| commit | a72b84e0f6e90754728d0309aac5dca1e00b7874 (patch) | |
| tree | 9aab114e536c5c9901dc7683f4a77ef5443bc874 /src | |
| parent | c905726ae9921e6ba67df77fd4ba5bb87215d69d (diff) | |
fix find_ready reg_id
Diffstat (limited to 'src')
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 2 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index c3b8d39..d9d4411 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -3962,7 +3962,7 @@ void opndcoll_rfu_t::dispatch_ready_cu() { } } unsigned cusPerSched = du.get_num_collectors() / m_num_warp_scheds; - unsigned reg_id = p / cusPerSched; + unsigned reg_id = cu->get_id() / cusPerSched; cu->dispatch(sub_core_model, reg_id); } } diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index 74bf320..9b14bfd 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -917,9 +917,10 @@ class opndcoll_rfu_t { // operand collector based register file unit m_next_cu = 0; } - collector_unit_t *find_ready(bool sub_core_model, unsigned reg_id) { + collector_unit_t *find_ready(bool sub_core_model) { for (unsigned n = 0; n < m_num_collectors; n++) { unsigned c = (m_last_cu + n + 1) % m_num_collectors; + unsigned reg_id = c / m_num_collectors; if ((*m_collector_units)[c].ready(sub_core_model, reg_id)) { m_last_cu = c; return &((*m_collector_units)[c]); @@ -929,7 +930,7 @@ class opndcoll_rfu_t { // operand collector based register file unit } unsigned get_num_collectors(){return m_num_collectors;} - + private: unsigned m_num_collectors; std::vector<collector_unit_t> *m_collector_units; |
