summaryrefslogtreecommitdiff
path: root/src/intersim2
diff options
context:
space:
mode:
authorAaron Barnes <[email protected]>2023-08-07 12:27:43 -0400
committerGitHub <[email protected]>2023-08-07 12:27:43 -0400
commit57452f0afc9f25118ef03aa317669331feaa8571 (patch)
treec617f1a97f6549642034de7d6f3b70723bc6ba75 /src/intersim2
parent712b6104e7399b2dd42c25b4cd788f0f36b5b39d (diff)
parenta42b72214b92b6a97f16c180ad09631cbe50da33 (diff)
Merge branch 'dev' into fix-stats
Diffstat (limited to 'src/intersim2')
-rw-r--r--src/intersim2/Makefile4
-rw-r--r--src/intersim2/networks/dragonfly.cpp26
-rw-r--r--src/intersim2/networks/flatfly_onchip.cpp4
3 files changed, 17 insertions, 17 deletions
diff --git a/src/intersim2/Makefile b/src/intersim2/Makefile
index 3eeeb70..dad436a 100644
--- a/src/intersim2/Makefile
+++ b/src/intersim2/Makefile
@@ -136,10 +136,10 @@ depend:
makedepend -f$(OBJDIR)/Makefile.makedepend -I$(INCPATH) -p$(OBJDIR)/ $(ALL_SRCS) 2> /dev/null
${LEX_OBJS}: $(OBJDIR)/lex.yy.c $(OBJDIR)/y.tab.h
- $(CC) $(CPPFLAGS) -c $< -o $@
+ $(CC) -Wno-unused-function $(CPPFLAGS) -c $< -o $@
${YACC_OBJS}: $(OBJDIR)/y.tab.c $(OBJDIR)/y.tab.h
- $(CC) $(CPPFLAGS) -c $< -o $@
+ $(CC) -Wno-unused-function $(CPPFLAGS) -c $< -o $@
${OBJDIR}/%.o: %.cpp
$(CXX) $(CPPFLAGS) -c $< -o $@
diff --git a/src/intersim2/networks/dragonfly.cpp b/src/intersim2/networks/dragonfly.cpp
index 01a2281..f5b637e 100644
--- a/src/intersim2/networks/dragonfly.cpp
+++ b/src/intersim2/networks/dragonfly.cpp
@@ -111,7 +111,7 @@ int dragonfly_port(int rID, int source, int dest){
int dest_grp_ID = int(dest/_grp_num_nodes);
int grp_output=-1;
int grp_RID=-1;
- int group_dest=-1;
+ // int group_dest=-1;
//which router within this group the packet needs to go to
if (dest_grp_ID == grp_ID) {
@@ -123,7 +123,7 @@ int dragonfly_port(int rID, int source, int dest){
grp_output = dest_grp_ID - 1;
}
grp_RID = int(grp_output /gP) + grp_ID * _grp_num_routers;
- group_dest = grp_RID * gP;
+ // group_dest = grp_RID * gP;
}
//At the last hop
@@ -221,7 +221,7 @@ void DragonFlyNew::_BuildNet( const Configuration &config )
int _input=-1;
int _dim_ID=-1;
int _num_ports_per_switch=-1;
- int _dim_size=-1;
+ // int _dim_size=-1;
int c;
ostringstream router_name;
@@ -314,7 +314,7 @@ void DragonFlyNew::_BuildNet( const Configuration &config )
// intra-group GROUP channels
for ( int dim = 0; dim < _n; ++dim ) {
- _dim_size = powi(_k,dim);
+ // _dim_size = powi(_k,dim);
_dim_ID = ((int) (node / ( powi(_p, dim))));
@@ -356,16 +356,16 @@ void DragonFlyNew::_BuildNet( const Configuration &config )
// add INPUT channels -- "optical" channels connecting the groups
- int _grp_num_routers;
+ // int _grp_num_routers;
int grp_output;
- int grp_ID2;
+ // int grp_ID2;
for ( int cnt = 0; cnt < _p; ++cnt ) {
// _dim_ID
grp_output = _dim_ID* _p + cnt;
- _grp_num_routers = powi(_k, _n-1);
- grp_ID2 = (int) ((grp_ID - 1) / (_k - 1));
+ // _grp_num_routers = powi(_k, _n-1);
+ // grp_ID2 = (int) ((grp_ID - 1) / (_k - 1));
if ( grp_ID > grp_output) {
@@ -495,8 +495,8 @@ void ugal_dragonflynew( const Router *r, const Flit *f, int in_channel,
int debug = f->watch;
int out_port = -1;
int out_vc = 0;
- int min_queue_size, min_hopcnt;
- int nonmin_queue_size, nonmin_hopcnt;
+ int min_queue_size; //, min_hopcnt;
+ int nonmin_queue_size; //, nonmin_hopcnt;
int intm_grp_ID;
int intm_rID;
@@ -523,13 +523,13 @@ void ugal_dragonflynew( const Router *r, const Flit *f, int in_channel,
f->ph = 1;
} else {
//congestion metrics using queue length, obtained by GetUsedCredit()
- min_hopcnt = dragonflynew_hopcnt(f->src, f->dest);
+ // min_hopcnt = dragonflynew_hopcnt(f->src, f->dest);
min_router_output = dragonfly_port(rID, f->src, f->dest);
min_queue_size = max(r->GetUsedCredit(min_router_output), 0) ;
- nonmin_hopcnt = dragonflynew_hopcnt(f->src, f->intm) +
- dragonflynew_hopcnt(f->intm,f->dest);
+ // nonmin_hopcnt = dragonflynew_hopcnt(f->src, f->intm) +
+ // dragonflynew_hopcnt(f->intm,f->dest);
nonmin_router_output = dragonfly_port(rID, f->src, f->intm);
nonmin_queue_size = max(r->GetUsedCredit(nonmin_router_output), 0);
diff --git a/src/intersim2/networks/flatfly_onchip.cpp b/src/intersim2/networks/flatfly_onchip.cpp
index fd17c1a..df43371 100644
--- a/src/intersim2/networks/flatfly_onchip.cpp
+++ b/src/intersim2/networks/flatfly_onchip.cpp
@@ -1204,7 +1204,7 @@ void ugal_pni_flatfly_onchip( const Router *r, const Flit *f, int in_channel,
int find_distance (int src, int dest) {
int dist = 0;
int _dim = gN;
- int _dim_size;
+ // int _dim_size;
int src_tmp= (int) src / gC;
int dest_tmp = (int) dest / gC;
@@ -1212,7 +1212,7 @@ int find_distance (int src, int dest) {
// cout << " HOP CNT between src: " << src << " dest: " << dest;
for (int d=0;d < _dim; d++) {
- _dim_size = powi(gK, d )*gC;
+ // _dim_size = powi(gK, d )*gC;
//if ((int)(src / _dim_size) != (int)(dest / _dim_size))
// dist++;
src_id = src_tmp % gK;