diff options
| author | Ayub Gubran <[email protected]> | 2012-01-09 13:17:31 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:19:02 -0700 |
| commit | 15819dff8c2eec408379cae0bf42e275404885cb (patch) | |
| tree | 636704dfc87f148647f33044228e6a497ca4cd58 /src/cuda-sim/ptx_sim.h | |
| parent | c8f254ab524238b93322546e4fd898a26cf0f42d (diff) | |
Integrating the pure functional simulation
Merging
//depot/gpgpu_sim_research/fermi_ayoub/distribution/src/cuda-sim/cuda-sim.cc
//depot/gpgpu_sim_research/fermi_ayoub/distribution/src/cuda-sim/cuda-sim.h
//depot/gpgpu_sim_research/fermi_ayoub/distribution/src/cuda-sim/instructions.cc
//depot/gpgpu_sim_research/fermi_ayoub/distribution/src/cuda-sim/ptx_sim.h
to //depot/gpgpu_sim_research/fermi/distribution/src/cuda-sim/...
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11288]
Diffstat (limited to 'src/cuda-sim/ptx_sim.h')
| -rw-r--r-- | src/cuda-sim/ptx_sim.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index 4d54245..3c12cc8 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -237,7 +237,7 @@ public: ~ptx_thread_info(); ptx_thread_info( kernel_info_t &kernel ); - void init(gpgpu_t *gpu, core_t *core, unsigned sid, unsigned cta_id, unsigned wid, unsigned tid ) + void init(gpgpu_t *gpu, core_t *core, unsigned sid, unsigned cta_id, unsigned wid, unsigned tid, bool fsim) { m_gpu = gpu; m_core = core; @@ -245,6 +245,7 @@ public: m_hw_ctaid=cta_id; m_hw_wid=wid; m_hw_tid=tid; + m_functionalSimulationMode = fsim; } void ptx_fetch_inst( inst_t &inst ) const; @@ -276,7 +277,7 @@ public: dim3 get_ctaid() const { return m_ctaid; } dim3 get_tid() const { return m_tid; } - class gpgpu_sim *get_gpu() { return m_core->get_gpu(); } + class gpgpu_sim *get_gpu() { return (gpgpu_sim*)m_gpu;} unsigned get_hw_tid() const { return m_hw_tid;} unsigned get_hw_ctaid() const { return m_hw_ctaid;} unsigned get_hw_wid() const { return m_hw_wid;} @@ -392,6 +393,15 @@ public: memory_space *get_surf_memory() { return m_gpu->get_surf_memory(); } memory_space *get_param_memory() { return m_kernel.get_param_memory(); } const gpgpu_functional_sim_config &get_config() const { return m_gpu->get_config(); } + bool isInFunctionalSimulationMode(){ return m_functionalSimulationMode;} + void exitCore() + { + //m_core is not used in case of functional simulation mode + if(!m_functionalSimulationMode) + m_core->warp_exit(m_hw_wid); + } + + void registerExit(){m_cta_info->register_thread_exit(this);} public: addr_t m_last_effective_address; @@ -405,7 +415,7 @@ public: private: - + bool m_functionalSimulationMode; unsigned m_uid; kernel_info_t &m_kernel; core_t *m_core; |
