summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotseefire <[email protected]>2022-04-07 23:29:09 +0800
committerGitHub <[email protected]>2022-04-07 23:29:09 +0800
commit33ad7c89b43cedc11dd645f2ae0215e6e4531230 (patch)
tree4dc331123899c3a2488785a9ac72408bca664c14 /src
parent371340d2bbe0cad6613e4ebf2bd321c7e93c63cd (diff)
Fixed constant_cycle
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/shader.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 814311d..ab84fc5 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -2092,10 +2092,11 @@ bool ldst_unit::constant_cycle(warp_inst_t &inst, mem_stage_stall_type &rc_fail,
mem_stage_stall_type fail;
if (m_config->perfect_inst_const_cache) {
fail = NO_RC_FAIL;
+ unsigned access_count = inst.accessq_count();
while (inst.accessq_count() > 0) inst.accessq_pop_back();
if (inst.is_load()) {
for (unsigned r = 0; r < MAX_OUTPUT_VALUES; r++)
- if (inst.out[r] > 0) m_pending_writes[inst.warp_id()][inst.out[r]]--;
+ if (inst.out[r] > 0) m_pending_writes[inst.warp_id()][inst.out[r]] -= access_count;
}
} else {
fail = process_memory_access_queue(m_L1C, inst);