From 87e4da5fc6086c3d0a661af1929255a8cbd728d7 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Mon, 18 Oct 2010 02:43:17 -0800 Subject: Re-designed cache model: - read only cache model with integrated mshrs (no L1D, yet); new cache interface should be easily extendable to support texture cache with latency fifo and separate tag/data arrays, though this is not yet added (currently tags and data arrays are not decoupled for texture) - new partition model using the above removes all old MSHRs, L1D etc... passing CUDA 3.1 regression [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7875] --- src/gpgpu-sim/delayqueue.h | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/gpgpu-sim/delayqueue.h') diff --git a/src/gpgpu-sim/delayqueue.h b/src/gpgpu-sim/delayqueue.h index 050a916..cb5ded0 100644 --- a/src/gpgpu-sim/delayqueue.h +++ b/src/gpgpu-sim/delayqueue.h @@ -77,14 +77,14 @@ template struct fifo_data { T *m_data; fifo_data *m_next; - unsigned long long push_time; //for stat collection }; template class fifo_pipeline { public: - fifo_pipeline(const char* nm, unsigned int minlen, unsigned int maxlen, unsigned long long current_time ) + fifo_pipeline(const char* nm, unsigned int minlen, unsigned int maxlen ) { + assert(maxlen); m_name = nm; m_min_len = minlen; m_max_len = maxlen; @@ -93,8 +93,7 @@ public: m_head = NULL; m_tail = NULL; for (unsigned i=0;im_data || m_length < m_min_len) { m_tail->m_next = new fifo_data(); @@ -123,17 +122,15 @@ public: } m_tail->m_next = NULL; m_tail->m_data = data; - m_tail->push_time = current_time; } - T* pop( unsigned long long current_time ) + T* pop() { fifo_data* next; T* data; if (m_head) { next = m_head->m_next; data = m_head->m_data; - StatAddSample(m_lat_stat, LOGB2 (current_time - m_head->push_time)); if ( m_head == m_tail ) { assert( next == NULL ); m_tail = NULL; @@ -147,7 +144,7 @@ public: } m_n_element--; if (m_min_len && m_length < m_min_len) { - push(NULL,current_time); + push(NULL); m_n_element--; // uncount NULL elements inserted to create delays } } else { @@ -165,14 +162,14 @@ public: } } - void set_min_length(unsigned int new_min_len, unsigned long long current_time) + void set_min_length(unsigned int new_min_len) { if (new_min_len == m_min_len) return; if (new_min_len > m_min_len) { m_min_len = new_min_len; while (m_length < m_min_len) { - push(NULL,current_time); + push(NULL); m_n_element--; // uncount NULL elements inserted to create delays } } else { @@ -188,7 +185,7 @@ public: if (!iter) { // there is only one node, and that node is empty assert(m_head->m_data == 0); - pop(current_time); + pop(); } else { // there are more than one node, and tail node is empty assert(iter->m_next == m_tail); @@ -206,7 +203,6 @@ public: unsigned get_n_element() const { return m_n_element; } unsigned get_length() const { return m_length; } unsigned get_max_len() const { return m_max_len; } - void* get_lat_stat() { return m_lat_stat; } void print() const { @@ -229,8 +225,6 @@ private: fifo_data *m_head; fifo_data *m_tail; - - void* m_lat_stat; //a pointer to latency stats distribution structure }; #endif -- cgit v1.3