diff options
| author | Mahmoud Khairy A. Abdallah <[email protected]> | 2020-03-31 13:00:34 -0400 |
|---|---|---|
| committer | Mahmoud Khairy A. Abdallah <[email protected]> | 2020-03-31 13:00:34 -0400 |
| commit | ed97d2a5b0096fb8afa4bc83fe2df515b2a2399c (patch) | |
| tree | 2afd8adc73d93479eab95ae01d01db53aa038653 | |
| parent | 38a5c4d70539cdacf1ce20394027d9b705ff9c76 (diff) | |
adding inst fetch throughput
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.cc | 4 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 9 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.h | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index 4e38f67..4ef9a7d 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -470,7 +470,9 @@ void shader_core_config::reg_options(class OptionParser * opp) option_parser_register(opp, "-perfect_inst_const_cache", OPT_BOOL, &perfect_inst_const_cache, "perfect inst and const cache mode, so all inst and const hits in the cache(default = disabled)", "0"); - + option_parser_register(opp, "-inst_fetch_throughput", OPT_INT32, &inst_fetch_throughput, + "the number of fetched intruction per warp each cycle", + "1"); } void gpgpu_sim_config::reg_options(option_parser_t opp) diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index a2850d0..297f3bc 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -3175,10 +3175,9 @@ void shader_core_ctx::cycle() execute(); read_operands(); issue(); - for(int i=0; i<8; ++i) { - decode(); - fetch(); - printf("Hello! \n"); + for(int i=0; i< m_config->inst_fetch_throughput; ++i) { + decode(); + fetch(); } } @@ -3235,6 +3234,7 @@ std::list<opndcoll_rfu_t::op_t> opndcoll_rfu_t::arbiter_t::allocate_reads() ///// wavefront allocator from booksim... ---> // Loop through diagonals of request matrix + printf("####\n"); for ( int p = 0; p < _square; ++p ) { output = ( _pri + p ) % _square; @@ -3250,6 +3250,7 @@ std::list<opndcoll_rfu_t::op_t> opndcoll_rfu_t::arbiter_t::allocate_reads() // Grant! _inmatch[input] = output; _outmatch[output] = input; + printf("Register File: granting banks %d to OC % \n", input, output); } output = ( output + 1 ) % _square; diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index d41c220..43c448b 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -1524,6 +1524,7 @@ class shader_core_config : public core_config bool gpgpu_concurrent_kernel_sm; bool perfect_inst_const_cache; + unsigned inst_fetch_throughput; }; |
