diff options
| author | Mahmoud <[email protected]> | 2019-04-11 22:32:08 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-04-11 22:32:08 -0400 |
| commit | ec2ada3b5f2ef91341d30e8f56f3c4d9ecafb2a4 (patch) | |
| tree | 8dc5adbbde6c74c5665e348bfea7e2bc7f5988f5 /src/gpgpu-sim/local_interconnect.h | |
| parent | bb7ed349e146ea6b9ef1100d81fa7ac5ef2751cb (diff) | |
adding some stats and random hashing
Diffstat (limited to 'src/gpgpu-sim/local_interconnect.h')
| -rw-r--r-- | src/gpgpu-sim/local_interconnect.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gpgpu-sim/local_interconnect.h b/src/gpgpu-sim/local_interconnect.h index 727a782..0f83d05 100644 --- a/src/gpgpu-sim/local_interconnect.h +++ b/src/gpgpu-sim/local_interconnect.h @@ -44,22 +44,29 @@ struct inct_config unsigned subnets; }; +enum Interconnect_type { + REQ_NET=0, + REPLY_NET=1 +}; class xbar_router { public: - xbar_router(unsigned router_id, unsigned n_shader, unsigned n_mem, unsigned m_in_buffer_limit, unsigned m_out_buffer_limit); + xbar_router(unsigned router_id, enum Interconnect_type m_type, unsigned n_shader, unsigned n_mem, unsigned m_in_buffer_limit, unsigned m_out_buffer_limit); ~xbar_router(); void Push(unsigned input_deviceID, unsigned output_deviceID, void* data, unsigned int size); void* Pop(unsigned ouput_deviceID); void Advance(); bool Busy() const; - bool Has_Buffer_In(unsigned input_deviceID, unsigned size) const; - bool Has_Buffer_Out(unsigned output_deviceID, unsigned size) const; + bool Has_Buffer_In(unsigned input_deviceID, unsigned size, bool update_counter=false); + bool Has_Buffer_Out(unsigned output_deviceID, unsigned size); //some stats unsigned long long cycles; unsigned long long conflicts; unsigned long long out_buffer_full; + unsigned long long out_buffer_util; + unsigned long long in_buffer_full; + unsigned long long in_buffer_util; unsigned long long packets_num; private: @@ -77,6 +84,10 @@ private: unsigned in_buffer_limit, out_buffer_limit; unsigned next_node; unsigned m_id; + enum Interconnect_type router_type; + unsigned active_in_buffers,active_out_buffers; + + friend class LocalInterconnect; }; |
