summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2013-02-10 20:40:34 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:04 -0700
commitc591d13a90aad7d99bb40aef9e44d6bfce0b74c0 (patch)
tree1525326dfa44a4d7f28596bbbfdd6e7892a30088 /src/abstract_hardware_model.h
parente4d7bf562e8e90fa4523efc186322bff416c0506 (diff)
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]
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h9
1 files changed, 8 insertions, 1 deletions
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