From c591d13a90aad7d99bb40aef9e44d6bfce0b74c0 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Sun, 10 Feb 2013 20:40:34 -0800 Subject: Merging //depot/gpgpu_sim_research/fermi_locality/... to //depot/gpgpu_sim_research/fermi/... Adding in some protected constructors to the core cache classes. This allows us to customize caches (for example having them use a custom tag array) more easily. Also I made the in-class tag_array object in the baseline_cache into a pointer. This allows derived classes to easily create custom tag arrays. I think in general, class extendibility is increased when pointers are used instead of in-object storage. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15223] --- src/abstract_hardware_model.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/abstract_hardware_model.h') diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h index cc7a4b7..ce428da 100644 --- a/src/abstract_hardware_model.h +++ b/src/abstract_hardware_model.h @@ -769,12 +769,13 @@ public: { m_empty=true; } - void issue( const active_mask_t &mask, unsigned warp_id, unsigned long long cycle ) + void issue( const active_mask_t &mask, unsigned warp_id, unsigned long long cycle, int dynamic_warp_id ) { m_warp_active_mask = mask; m_warp_issued_mask = mask; m_uid = ++sm_next_uid; m_warp_id = warp_id; + m_dynamic_warp_id = dynamic_warp_id; issue_cycle = cycle; cycles = initiation_interval; m_cache_hit=false; @@ -857,6 +858,11 @@ public: assert( !m_empty ); return m_warp_id; } + unsigned dynamic_warp_id() const + { + assert( !m_empty ); + return m_dynamic_warp_id; + } bool has_callback( unsigned n ) const { return m_warp_active_mask[n] && m_per_scalar_thread_valid && @@ -901,6 +907,7 @@ protected: bool m_isatomic; bool m_is_printf; unsigned m_warp_id; + unsigned m_dynamic_warp_id; const core_config *m_config; active_mask_t m_warp_active_mask; // dynamic active mask for timing model (after predication) active_mask_t m_warp_issued_mask; // active mask at issue (prior to predication test) -- for instruction counting -- cgit v1.3