summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-sim.h
diff options
context:
space:
mode:
authortgrogers <[email protected]>2019-07-12 10:30:08 -0400
committertgrogers <[email protected]>2019-07-12 10:30:08 -0400
commit89e913f7b28e342b9023a01105cb441cfafbee8b (patch)
tree39224ede8f55cac67884b92100e3d50451e635ba /src/gpgpu-sim/gpu-sim.h
parent3429bfacff71a0da92ffb05e964c90dbf26ccac0 (diff)
parentaa12db699a540ea7b4ed4b913be6ef3155fc68d6 (diff)
Merge branch 'dev' of github.com:purdue-aalp/gpgpu-sim_distribution into dev
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.h')
-rw-r--r--src/gpgpu-sim/gpu-sim.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h
index e2c913a..119b934 100644
--- a/src/gpgpu-sim/gpu-sim.h
+++ b/src/gpgpu-sim/gpu-sim.h
@@ -62,6 +62,8 @@
#define SAMPLELOG 222
#define DUMPLOG 333
+class gpgpu_context;
+
extern tr1_hash_map<new_addr_type,unsigned> address_random_interleaving;
enum dram_ctrl_t {
@@ -295,7 +297,10 @@ extern bool g_interactive_debugger_enabled;
class gpgpu_sim_config : public power_config, public gpgpu_functional_sim_config {
public:
- gpgpu_sim_config() { m_valid = false; }
+ gpgpu_sim_config(gpgpu_context* ctx): m_shader_config(ctx) {
+ m_valid = false;
+ gpgpu_ctx = ctx;
+ }
void reg_options(class OptionParser * opp);
void init()
{
@@ -341,6 +346,8 @@ private:
void init_clock_domains(void );
+ // backward pointer
+ class gpgpu_context* gpgpu_ctx;
bool m_valid;
shader_core_config m_shader_config;
memory_config m_memory_config;
@@ -473,7 +480,7 @@ public:
/*!
* Returning the configuration of the shader core, used by the functional simulation only so far
*/
- const struct shader_core_config * getShaderCoreConfig();
+ const shader_core_config * getShaderCoreConfig();
//! Get shader core Memory Configuration
@@ -489,6 +496,8 @@ public:
*/
simt_core_cluster * getSIMTCluster();
+ // backward pointer
+ class gpgpu_context* gpgpu_ctx;
private:
// clocks
@@ -506,8 +515,6 @@ private:
void gpgpu_debug();
///// data /////
-// backward pointer
- class gpgpu_context* gpgpu_ctx;
class simt_core_cluster **m_cluster;
class memory_partition_unit **m_memory_partition_unit;
@@ -537,7 +544,7 @@ private:
const gpgpu_sim_config &m_config;
const struct cudaDeviceProp *m_cuda_properties;
- const struct shader_core_config *m_shader_config;
+ const shader_core_config *m_shader_config;
const struct memory_config *m_memory_config;
// stats