From 7a47f9cd62902d960a989a920d882f3b77fe7b2a Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Mon, 29 Nov 2010 19:53:45 -0800 Subject: make an explicit read operands stage [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8174] --- src/gpgpu-sim/shader.cc | 7 ++++++- src/gpgpu-sim/shader.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 10845e5..169adbe 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -692,6 +692,11 @@ void shader_core_ctx::decode() m_stats->shader_cycle_distro[2]++; // pipeline stalled } +void shader_core_ctx::read_operands() +{ + m_operand_collector.step(); +} + address_type coalesced_segment(address_type addr, unsigned segment_size_lg2bytes) { return (addr >> segment_size_lg2bytes); @@ -1470,7 +1475,7 @@ void shader_core_ctx::cycle() { writeback(); execute(); - m_operand_collector.step(); + read_operands(); decode(); fetch(); } diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index e015b11..c312d62 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -1168,6 +1168,8 @@ private: void issue_warp( warp_inst_t *&warp, const warp_inst_t *pI, const active_mask_t &active_mask, unsigned warp_id ); void func_exec_inst( warp_inst_t &inst ); address_type translate_local_memaddr(address_type localaddr, unsigned tid, unsigned num_shader ); + + void read_operands(); void execute(); -- cgit v1.3