From b5741101e3ef2f9f8b008a906de7fbd5ddbbe82f Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 3 Mar 2011 22:33:14 -0800 Subject: refactor pipeline stage names [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8544] --- src/gpgpu-sim/shader.cc | 8 ++++++-- src/gpgpu-sim/shader.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 608b29c..855e1c2 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -544,7 +544,7 @@ void shader_core_stats::visualizer_print( gzFile visualizer_file ) #define PROGRAM_MEM_START 0xF0000000 /* should be distinct from other memory spaces... check ptx_ir.h to verify this does not overlap other memory spaces */ -void shader_core_ctx::fetch() +void shader_core_ctx::decode() { if( m_inst_fetch_buffer.m_valid ) { // decode 1 or 2 instructions and place them into ibuffer @@ -561,7 +561,10 @@ void shader_core_ctx::fetch() } m_inst_fetch_buffer.m_valid = false; } +} +void shader_core_ctx::fetch() +{ if( !m_inst_fetch_buffer.m_valid ) { // find an active warp with space in instruction buffer that is not already waiting on a cache miss // and get next 1-2 instructions from i-cache... @@ -694,7 +697,7 @@ void shader_core_ctx::issue_warp( warp_inst_t *&pipe_reg, const warp_inst_t *nex m_warp[warp_id].set_next_pc(next_inst->pc + next_inst->isize); } -void shader_core_ctx::decode(){ +void shader_core_ctx::issue(){ //really is issue; for (unsigned i = 0; i < schedulers.size(); i++) { schedulers[i].cycle(); @@ -1595,6 +1598,7 @@ void shader_core_ctx::cycle() writeback(); execute(); read_operands(); + issue(); decode(); fetch(); } diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index e3a4c62..8d6c290 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -1235,8 +1235,10 @@ private: void fetch(); void register_cta_thread_exit( unsigned cta_num ); - + void decode(); + + void issue(); friend class scheduler_unit; //this is needed to use private issue warp. 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 ); -- cgit v1.3