summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpu-sim/shader.h')
-rw-r--r--src/gpgpu-sim/shader.h50
1 files changed, 4 insertions, 46 deletions
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 5db35d3..43121a1 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -72,7 +72,6 @@
class thread_ctx_t {
public:
- class ptx_thread_info *m_functional_model_thread_state;
unsigned m_cta_id; // hardware CTA this thread belongs
// per thread stats (ac stands for accumulative).
@@ -240,40 +239,6 @@ private:
inline unsigned hw_tid_from_wid(unsigned wid, unsigned warp_size, unsigned i){return wid * warp_size + i;};
inline unsigned wid_from_hw_tid(unsigned tid, unsigned warp_size){return tid/warp_size;};
-
-// bounded stack that implements simt reconvergence using pdom mechanism from MICRO'07 paper
-
-#define MAX_WARP_SIZE_SIMT_STACK MAX_WARP_SIZE
-typedef std::bitset<MAX_WARP_SIZE_SIMT_STACK> simt_mask_t;
-typedef std::vector<address_type> addr_vector_t;
-
-class simt_stack {
-public:
- simt_stack( unsigned wid, class shader_core_ctx *shdr );
-
- void reset();
- void launch( address_type start_pc, const simt_mask_t &active_mask );
- void update( simt_mask_t &thread_done, addr_vector_t &next_pc, address_type recvg_pc );
-
- const simt_mask_t &get_active_mask() const;
- void get_pdom_stack_top_info( unsigned *pc, unsigned *rpc ) const;
- unsigned get_rp() const;
- void print(FILE*fp) const;
-
-protected:
- unsigned m_warp_id;
- class shader_core_ctx *m_shader;
- unsigned m_stack_top;
- unsigned m_warp_size;
-
- address_type *m_pc;
- simt_mask_t *m_active_mask;
- address_type *m_recvg_pc;
- unsigned int *m_calldepth;
-
- unsigned long long *m_branch_div_cycle;
-};
-
const unsigned WARP_PER_CTA_MAX = 32;
typedef std::bitset<WARP_PER_CTA_MAX> warp_set_t;
@@ -1164,13 +1129,10 @@ public:
// used by functional simulation:
// modifiers
virtual void warp_exit( unsigned warp_id );
- class ptx_thread_info *get_thread_state( unsigned hw_thread_id );
- virtual class gpgpu_sim *get_gpu();
// accessors
virtual bool warp_waiting_at_barrier( unsigned warp_id ) const;
void get_pdom_stack_top_info( unsigned tid, unsigned *pc, unsigned *rpc ) const;
- bool ptx_thread_done( unsigned hw_thread_id ) const;
// used by pipeline timing model components:
// modifiers
@@ -1193,9 +1155,8 @@ public:
private:
void init_warps(unsigned cta_id, unsigned start_thread, unsigned end_thread);
-
+ virtual void checkExecutionStatusAndUpdate(warp_inst_t &inst, unsigned t, unsigned tid);
address_type next_pc( int tid ) const;
-
void fetch();
void register_cta_thread_exit( unsigned cta_num );
@@ -1206,7 +1167,7 @@ private:
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 );
- // Returns numbers of addresses in translated_addrs
+ // Returns numbers of addresses in translated_addrs
unsigned translate_local_memaddr( address_type localaddr, unsigned tid, unsigned num_shader, unsigned datasize, new_addr_type* translated_addrs );
void read_operands();
@@ -1227,9 +1188,7 @@ private:
const shader_core_config *m_config;
const memory_config *m_memory_config;
class simt_core_cluster *m_cluster;
- class gpgpu_sim *m_gpu;
- kernel_info_t *m_kernel;
-
+
// statistics
shader_core_stats *m_stats;
@@ -1240,7 +1199,7 @@ private:
std::bitset<MAX_THREAD_PER_SM> m_active_threads;
// thread contexts
- thread_ctx_t *m_thread; // functional state, per thread fetch state
+ thread_ctx_t *m_threadState;
// interconnect interface
shader_memory_interface *m_icnt;
@@ -1254,7 +1213,6 @@ private:
std::vector<shd_warp_t> m_warp; // per warp information array
barrier_set_t m_barriers;
ifetch_buffer_t m_inst_fetch_buffer;
- simt_stack **m_simt_stack; // pdom based reconvergence context for each warp
warp_inst_t **m_pipeline_reg;
Scoreboard *m_scoreboard;
opndcoll_rfu_t m_operand_collector;