diff options
| author | Tim Rogers <[email protected]> | 2019-08-26 14:57:01 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-08-26 14:57:01 -0400 |
| commit | 6be23a1b36a3311c7dafc45a5e692e38cb351337 (patch) | |
| tree | 65583782519448ef56e6b60e8067d94526f2b149 /src/gpgpu-sim/local_interconnect.h | |
| parent | fd91575e7dcc40653ea0279ef33d845d1d473ffa (diff) | |
| parent | a168a2c7224ea59c9ea7523be1f46893531bdc63 (diff) | |
Merge pull request #27 from mkhairy/dev
Merging a few latency fixes in the memory system
Diffstat (limited to 'src/gpgpu-sim/local_interconnect.h')
| -rw-r--r-- | src/gpgpu-sim/local_interconnect.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/gpgpu-sim/local_interconnect.h b/src/gpgpu-sim/local_interconnect.h index f4a2af1..a784da8 100644 --- a/src/gpgpu-sim/local_interconnect.h +++ b/src/gpgpu-sim/local_interconnect.h @@ -35,27 +35,35 @@ using namespace std; +enum Interconnect_type { + REQ_NET=0, + REPLY_NET=1 +}; + +enum Arbiteration_type { + NAIVE_RR=0, + iSLIP=1 +}; + struct inct_config { - //config for local interconnect unsigned in_buffer_limit; unsigned out_buffer_limit; unsigned subnets; + Arbiteration_type arbiter_algo; }; -enum Interconnect_type { - REQ_NET=0, - REPLY_NET=1 -}; class xbar_router { public: - 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(unsigned router_id, enum Interconnect_type m_type, unsigned n_shader, unsigned n_mem, unsigned m_in_buffer_limit, unsigned m_out_buffer_limit, enum Arbiteration_type m_arbit_type); ~xbar_router(); void Push(unsigned input_deviceID, unsigned output_deviceID, void* data, unsigned int size); void* Pop(unsigned ouput_deviceID); - void Advance(); + void Advance( ); + + bool Busy() const; bool Has_Buffer_In(unsigned input_deviceID, unsigned size, bool update_counter=false); bool Has_Buffer_Out(unsigned output_deviceID, unsigned size); @@ -70,6 +78,9 @@ public: unsigned long long packets_num; private: + void iSLIP_Advance(); + void RR_Advance(); + struct Packet{ Packet(void* m_data, unsigned m_output_deviceID) { data = m_data; @@ -82,11 +93,12 @@ private: vector<queue<Packet> > out_buffers; unsigned _n_shader, _n_mem, total_nodes; unsigned in_buffer_limit, out_buffer_limit; - vector<unsigned> next_node; -// unsigned next_node; + vector<unsigned> next_node; //used for iSLIP arbit + unsigned next_node_id; //used for RR arbit unsigned m_id; enum Interconnect_type router_type; unsigned active_in_buffers,active_out_buffers; + Arbiteration_type arbit_type; friend class LocalInterconnect; |
