summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-08-30 03:08:52 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:48:54 -0700
commit66a788b7463bb92595977c7540afa8a2adba2726 (patch)
treece1bcd41bcfcae274f9ff28fb30fc95b03829521 /src/abstract_hardware_model.h
parentfc37c72f0681d142371ff4f5fff5cd972faf51a9 (diff)
Fixed incorrect counting of predicated instruction. (Bug #15 external)
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13918]
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index fda4763..766dff1 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -689,7 +689,8 @@ public:
}
void issue( const active_mask_t &mask, unsigned warp_id, unsigned long long cycle )
{
- m_warp_active_mask=mask;
+ m_warp_active_mask = mask;
+ m_warp_issued_mask = mask;
m_uid = ++sm_next_uid;
m_warp_id = warp_id;
issue_cycle = cycle;
@@ -763,6 +764,7 @@ public:
}
bool active( unsigned thread ) const { return m_warp_active_mask.test(thread); }
unsigned active_count() const { return m_warp_active_mask.count(); }
+ unsigned issued_count() const { assert(m_empty == false); return m_warp_issued_mask.count(); } // for instruction counting
bool empty() const { return m_empty; }
unsigned warp_id() const
{
@@ -810,7 +812,8 @@ protected:
bool m_is_printf;
unsigned m_warp_id;
const core_config *m_config;
- active_mask_t m_warp_active_mask;
+ 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
struct per_thread_info {
per_thread_info() {