summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-07-17 08:42:20 -0800
committerTor Aamodt <[email protected]>2010-07-17 08:42:20 -0800
commitca7e2e58e7fd932d67c6d28477a5c15ed3b156b0 (patch)
tree1a66586b291019476ec06715d259560818baf923 /src/gpgpu-sim
parentb6661da800739b0fca9e01ba6d5afaca4f286d84 (diff)
- add support for cvta and isspacep instructions (currently assuming
a fixed address mapping between shared,local to generic that depends upon hardware thread context used... might be interesting to explore tradeoffs at some point) - remove util.h... we don't need TRUE, FALSE anymore now that everything is C++ - remove some dead code from shader_decode [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6867]
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/cflogger.h2
-rw-r--r--src/gpgpu-sim/delayqueue.h2
-rw-r--r--src/gpgpu-sim/dram_sched.cc2
-rw-r--r--src/gpgpu-sim/dwf.h2
-rw-r--r--src/gpgpu-sim/gpu-cache.h2
-rw-r--r--src/gpgpu-sim/gpu-sim.cc4
-rw-r--r--src/gpgpu-sim/l2cache.cc1
-rw-r--r--src/gpgpu-sim/mem_fetch.h1
-rw-r--r--src/gpgpu-sim/mem_latency_stat.h2
-rw-r--r--src/gpgpu-sim/shader.cc12
-rw-r--r--src/gpgpu-sim/shader.h2
-rw-r--r--src/gpgpu-sim/stack.h2
-rw-r--r--src/gpgpu-sim/stat-tool.cc2
-rw-r--r--src/gpgpu-sim/warp_tracker.h2
14 files changed, 14 insertions, 24 deletions
diff --git a/src/gpgpu-sim/cflogger.h b/src/gpgpu-sim/cflogger.h
index bdf57e5..2afe732 100644
--- a/src/gpgpu-sim/cflogger.h
+++ b/src/gpgpu-sim/cflogger.h
@@ -66,6 +66,8 @@
#ifndef CFLOGGER_H
#define CFLOGGER_H
+#include "../abstract_hardware_model.h"
+
void try_snap_shot (unsigned long long current_cycle);
void set_spill_interval (unsigned long long interval);
void spill_log_to_file (FILE *fout, int final, unsigned long long current_cycle);
diff --git a/src/gpgpu-sim/delayqueue.h b/src/gpgpu-sim/delayqueue.h
index baa3892..a8d6fc1 100644
--- a/src/gpgpu-sim/delayqueue.h
+++ b/src/gpgpu-sim/delayqueue.h
@@ -70,8 +70,6 @@
#ifndef DELAYQUEUE_H
#define DELAYQUEUE_H
-#include "../util.h"
-
typedef struct delay_data_t delay_data;
struct delay_data_t {
void *data;
diff --git a/src/gpgpu-sim/dram_sched.cc b/src/gpgpu-sim/dram_sched.cc
index 24b518f..f6fdeca 100644
--- a/src/gpgpu-sim/dram_sched.cc
+++ b/src/gpgpu-sim/dram_sched.cc
@@ -67,7 +67,7 @@
#include "dram_sched.h"
#include "gpu-misc.h"
#include "gpu-sim.h"
-#include "../util.h"
+#include "../abstract_hardware_model.h"
extern unsigned long long gpu_sim_cycle;
extern signed long long gpu_tot_sim_cycle;
diff --git a/src/gpgpu-sim/dwf.h b/src/gpgpu-sim/dwf.h
index 6328f1a..9771af5 100644
--- a/src/gpgpu-sim/dwf.h
+++ b/src/gpgpu-sim/dwf.h
@@ -78,7 +78,7 @@
#endif
-#include "../util.h"
+#include "../abstract_hardware_model.h"
extern unsigned *acc_dyn_pcs;
diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h
index e82ad05..cdb3414 100644
--- a/src/gpgpu-sim/gpu-cache.h
+++ b/src/gpgpu-sim/gpu-cache.h
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "../util.h"
+#include "../abstract_hardware_model.h"
#ifndef GPU_CACHE_H
#define GPU_CACHE_H
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 6ae7430..d77d1e0 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -168,7 +168,7 @@ char *gpgpu_cache_dl2_opt;
extern int gpgpu_l2_readoverwrite;
int gpgpu_partial_write_mask = 0;
-int gpgpu_perfect_mem = FALSE;
+bool gpgpu_perfect_mem = false;
char *gpgpu_shader_core_pipeline_opt;
extern unsigned int *requests_by_warp;
unsigned int gpgpu_dram_buswidth = 4;
@@ -258,7 +258,7 @@ extern unsigned int warp_size;
extern int pipe_simd_width;
extern unsigned int gpgpu_dwf_heuristic;
extern unsigned int gpgpu_dwf_regbk;
-int gpgpu_reg_bankconflict = FALSE;
+bool gpgpu_reg_bankconflict = false;
extern int gpgpu_shmem_port_per_bank;
extern int gpgpu_cache_port_per_bank;
extern int gpgpu_const_port_per_bank;
diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc
index aef837b..03a6a25 100644
--- a/src/gpgpu-sim/l2cache.cc
+++ b/src/gpgpu-sim/l2cache.cc
@@ -13,6 +13,7 @@
#include "histogram.h"
#include "l2cache.h"
#include "../intersim/statwraper.h"
+#include "../abstract_hardware_model.h"
class L2c_mshr;
class L2c_miss_tracker;
diff --git a/src/gpgpu-sim/mem_fetch.h b/src/gpgpu-sim/mem_fetch.h
index 0e12a2d..dbd3a2a 100644
--- a/src/gpgpu-sim/mem_fetch.h
+++ b/src/gpgpu-sim/mem_fetch.h
@@ -69,6 +69,7 @@
#include "shader.h"
#include "addrdec.h"
+#include "../abstract_hardware_model.h"
enum mf_type {
RD_REQ = 0,
diff --git a/src/gpgpu-sim/mem_latency_stat.h b/src/gpgpu-sim/mem_latency_stat.h
index 2fa6b1c..150a1be 100644
--- a/src/gpgpu-sim/mem_latency_stat.h
+++ b/src/gpgpu-sim/mem_latency_stat.h
@@ -80,7 +80,7 @@ extern unsigned int gpu_mem_n_bk;
#define EXTERN_DEF extern
#endif
-EXTERN_DEF int gpgpu_memlatency_stat = FALSE;
+EXTERN_DEF bool gpgpu_memlatency_stat = false;
EXTERN_DEF unsigned max_mrq_latency;
EXTERN_DEF unsigned max_dq_latency;
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 8f3f700..c173206 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -223,7 +223,6 @@ extern unsigned g_max_regs_per_thread;
void ptx_decode_inst( void *thd, unsigned *op, int *i1, int *i2, int *i3, int *i4, int *o1, int *o2, int *o3, int *o4, int *vectorin, int *vectorout, int *arch_reg );
unsigned ptx_get_inst_op( void *thd);
void ptx_exec_inst( void *thd, address_type *addr, unsigned *space, unsigned *data_size, dram_callback_t* callback, unsigned warp_active_mask);
-int ptx_branch_taken( void *thd );
void ptx_sim_free_sm( void** thread_info );
unsigned ptx_sim_init_thread( void** thread_info, int sid, unsigned tid,unsigned threads_left,unsigned num_threads, core_t *core, unsigned hw_cta_id, unsigned hw_warp_id);
unsigned ptx_sim_cta_size();
@@ -1750,7 +1749,6 @@ void shader_decode( shader_core_ctx_t *shader,
address_type addr;
dram_callback_t callback;
op_type op = NO_OP;
- register int is_write;
int tid;
int i1, i2, i3, i4, o1, o2, o3, o4; //4 outputs needed for texture fetches in cuda-sim
int i;
@@ -1950,16 +1948,6 @@ void shader_decode( shader_core_ctx_t *shader,
shader->pipeline_reg[IF_ID][i].out[2] = o3;
shader->pipeline_reg[IF_ID][i].out[3] = o4;
- if ( op == STORE_OP ) {
- is_write = TRUE;
- }
-
- if ( op == BRANCH_OP ) {
- int taken=0;
- assert( gpgpu_cuda_sim );
- taken = ptx_branch_taken(shader->thread[tid].ptx_thd_info);
- }
-
// go to the next instruction
// - done implicitly in ptx_exec_inst()
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 8333202..1567d6a 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -139,7 +139,7 @@ typedef struct {
int reg_bank_access_pending;
int reg_bank_conflict_stall_checked; // flag to turn off register bank conflict checker to avoid double stalling
- unsigned char inst_type;
+ unsigned inst_type;
unsigned priority;
diff --git a/src/gpgpu-sim/stack.h b/src/gpgpu-sim/stack.h
index b00e25b..9ddab6d 100644
--- a/src/gpgpu-sim/stack.h
+++ b/src/gpgpu-sim/stack.h
@@ -69,7 +69,7 @@
#ifndef _MY_STACK_
#define _MY_STACK_
-#include "../util.h"
+#include "../abstract_hardware_model.h"
typedef struct {
address_type *v;
diff --git a/src/gpgpu-sim/stat-tool.cc b/src/gpgpu-sim/stat-tool.cc
index 2dc9c0b..9845e06 100644
--- a/src/gpgpu-sim/stat-tool.cc
+++ b/src/gpgpu-sim/stat-tool.cc
@@ -88,6 +88,7 @@
#endif
#include "histogram.h"
+#include "../abstract_hardware_model.h"
binned_histogram::binned_histogram (std::string name, int nbins, int* bins)
: m_name(name), m_nbins(nbins), m_bins(NULL), m_bin_cnts(new int[m_nbins]), m_maximum(0)
@@ -178,7 +179,6 @@ void linear_histogram::add2bin (int sample) {
#include <map>
#include <algorithm>
#include <string>
-#include "../util.h"
#include "cflogger.h"
diff --git a/src/gpgpu-sim/warp_tracker.h b/src/gpgpu-sim/warp_tracker.h
index a4faa09..5375543 100644
--- a/src/gpgpu-sim/warp_tracker.h
+++ b/src/gpgpu-sim/warp_tracker.h
@@ -79,7 +79,7 @@
#endif
-#include "../util.h"
+#include "../abstract_hardware_model.h"
#include "shader.h"
void init_warp_tracker( );