summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gpgpu-sim/gpu-sim.cc9
-rw-r--r--src/gpgpu-sim/local_interconnect.h30
2 files changed, 27 insertions, 12 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 92d5366..4f071c7 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -257,9 +257,12 @@ void shader_core_config::reg_options(class OptionParser * opp)
"per-shader L1 data cache config "
" {<nsets>:<bsize>:<assoc>,<rep>:<wr>:<alloc>:<wr_alloc>,<mshr>:<N>:<merge>,<mq> | none}",
"none" );
+ option_parser_register(opp, "-l1_banks", OPT_UINT32, &m_L1D_config.l1_banks,
+ "The number of L1 cache banks",
+ "1");
option_parser_register(opp, "-l1_latency", OPT_UINT32, &m_L1D_config.l1_latency,
"L1 Hit Latency",
- "0");
+ "1");
option_parser_register(opp, "-smem_latency", OPT_UINT32, &smem_latency,
"smem Latency",
"3");
@@ -320,8 +323,8 @@ void shader_core_config::reg_options(class OptionParser * opp)
option_parser_register(opp, "-gpgpu_shmem_size", OPT_UINT32, &gpgpu_shmem_size,
"Size of shared memory per shader core (default 16kB)",
"16384");
- option_parser_register(opp, "-adaptive_volta_cache_config", OPT_BOOL, &adaptive_volta_cache_config,
- "adaptive_volta_cache_config",
+ option_parser_register(opp, "-adaptive_cache_config", OPT_BOOL, &adaptive_volta_cache_config,
+ "adaptive_cache_config",
"0");
option_parser_register(opp, "-gpgpu_shmem_sizeDefault", OPT_UINT32, &gpgpu_shmem_sizeDefault,
"Size of shared memory per shader core (default 16kB)",
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;