Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
0a984024
Commit
0a984024
authored
Apr 10, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusting vcs with df-dally, making vc optional for df-dally
parent
0a22a582
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
src/networks/model-net/dragonfly-custom.C
src/networks/model-net/dragonfly-custom.C
+22
-12
No files found.
src/networks/model-net/dragonfly-custom.C
View file @
0a984024
...
...
@@ -25,7 +25,6 @@
#include <cortex/topology.h>
#endif
#define DF_DALLY 1
#define DUMP_CONNECTIONS 1
#define CREDIT_SIZE 8
#define DFLY_HASH_TABLE_SIZE 4999
...
...
@@ -44,6 +43,8 @@
#define LP_CONFIG_NM_ROUT (model_net_lp_config_names[DRAGONFLY_CUSTOM_ROUTER])
#define LP_METHOD_NM_ROUT (model_net_method_names[DRAGONFLY_CUSTOM_ROUTER])
static
int
DF_DALLY
=
0
;
using
namespace
std
;
struct
Link
{
int
offset
,
type
;
...
...
@@ -519,6 +520,10 @@ static void dragonfly_read_config(const char * anno, dragonfly_param *params){
fprintf
(
stderr
,
"Buffer size of global channels not specified, setting to %d
\n
"
,
p
->
global_vc_size
);
}
rc
=
configuration_get_value_int
(
&
config
,
"PARAMS"
,
"df-dally-vc"
,
anno
,
&
DF_DALLY
);
if
(
rc
)
{
DF_DALLY
=
0
;
}
rc
=
configuration_get_value_int
(
&
config
,
"PARAMS"
,
"cn_vc_size"
,
anno
,
&
p
->
cn_vc_size
);
if
(
rc
)
{
p
->
cn_vc_size
=
1024
;
...
...
@@ -589,18 +594,21 @@ static void dragonfly_read_config(const char * anno, dragonfly_param *params){
// else {
// printf("Overriding num_vcs: p->num_vcs=%d\n",p->num_vcs);
// }
#ifndef DF_DALLY
if
(
DF_DALLY
==
0
)
{
if
(
routing
==
PROG_ADAPTIVE
)
p
->
num_vcs
=
10
;
else
p
->
num_vcs
=
8
;
#else
}
else
{
if
(
routing
==
PROG_ADAPTIVE
)
p
->
num_vcs
=
4
;
else
p
->
num_vcs
=
3
;
#endif
}
rc
=
configuration_get_value_int
(
&
config
,
"PARAMS"
,
"num_groups"
,
anno
,
&
p
->
num_groups
);
if
(
rc
)
{
printf
(
"Number of groups not specified. Aborting"
);
...
...
@@ -2920,25 +2928,27 @@ router_packet_receive( router_state * s,
output_chan
=
0
;
if
(
output_port
<
s
->
params
->
intra_grp_radix
)
{
#ifndef DF_DALLY
if
(
DF_DALLY
==
0
)
{
if
(
cur_chunk
->
msg
.
my_g_hop
==
1
)
{
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
!=
4
)
{
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
<
4
)
{
cur_chunk
->
msg
.
my_l_hop
=
4
;
}
else
if
(
cur_chunk
->
msg
.
my_l_hop
<
2
)
{
cur_chunk
->
msg
.
my_l_hop
=
2
;
}
}
else
if
(
cur_chunk
->
msg
.
my_g_hop
==
2
)
{
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
!=
6
)
{
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
<
6
)
{
cur_chunk
->
msg
.
my_l_hop
=
6
;
}
else
if
(
cur_chunk
->
msg
.
my_l_hop
<
4
)
{
cur_chunk
->
msg
.
my_l_hop
=
4
;
}
}
#else
}
else
{
if
(
cur_chunk
->
msg
.
my_g_hop
==
1
)
{
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
!=
2
){
cur_chunk
->
msg
.
my_l_hop
=
2
;
}
else
if
(
cur_chunk
->
msg
.
my_l_hop
<
1
){
}
else
if
(
cur_chunk
->
msg
.
my_l_hop
!=
1
){
cur_chunk
->
msg
.
my_l_hop
=
1
;
}
}
...
...
@@ -2946,10 +2956,10 @@ router_packet_receive( router_state * s,
if
(
routing
==
PROG_ADAPTIVE
&&
cur_chunk
->
msg
.
my_l_hop
!=
3
)
{
cur_chunk
->
msg
.
my_l_hop
=
3
;
}
else
if
(
cur_chunk
->
msg
.
my_l_hop
<
2
)
else
if
(
cur_chunk
->
msg
.
my_l_hop
!=
2
)
cur_chunk
->
msg
.
my_l_hop
=
2
;
}
#endif
}
output_chan
=
cur_chunk
->
msg
.
my_l_hop
;
max_vc_size
=
s
->
params
->
local_vc_size
;
cur_chunk
->
msg
.
my_l_hop
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment