From da6a16a990a007edb7a760a2eb5b9b48ccc06e4c Mon Sep 17 00:00:00 2001 From: Rodrigo Huerta Date: Fri, 25 Feb 2022 10:33:46 +0000 Subject: Fixed old bug that happens when there are different latencies to the same execution unit --- src/gpgpu-sim/shader.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index c6e7b8f..90bb900 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -2294,8 +2294,10 @@ void pipelined_simd_unit::cycle() { if (!m_dispatch_reg->dispatch_delay()) { int start_stage = m_dispatch_reg->latency - m_dispatch_reg->initiation_interval; - move_warp(m_pipeline_reg[start_stage], m_dispatch_reg); - active_insts_in_pipeline++; + if(m_pipeline_reg[start_stage]->empty()) { + move_warp(m_pipeline_reg[start_stage], m_dispatch_reg); + active_insts_in_pipeline++; + } } } occupied >>= 1; -- cgit v1.3