Commit a3d030ed authored by Noah Wolfe's avatar Noah Wolfe

added slimfly mapping in model-net test

parent 3fe3d2b5
......@@ -16,6 +16,7 @@ PARAMS
modelnet_scheduler="fcfs";
chunk_size="256";
# modelnet_scheduler="round-robin";
num_vcs="4";
num_routers="5";
num_terminals="3";
global_channels="5";
......
......@@ -184,7 +184,7 @@ int main(
if(net_id == SLIMFLY)
{
strcpy(router_name, "modelnet_slimfly_router");
strcpy(router_name, "slimfly_router");
}
if(net_id == SLIMFLY || net_id == DRAGONFLY)
......@@ -355,9 +355,11 @@ static void handle_kickoff_event(
int opt_offset = 0;
int total_lps = num_servers * 2 + num_routers;
/* TODO: Noah, we need slimfly specific mapping here! */
if(net_id == DRAGONFLY && (lp->gid % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (lp->gid % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
/* each server sends a request to the next highest server */
int dest_id = (lp->gid + offset + opt_offset)%total_lps;
......@@ -448,9 +450,11 @@ static void handle_ack_event(
// printf("\n m->src %d lp->gid %d ", m->src, lp->gid);
int opt_offset = 0;
/* TODO: Noah, we need slimfly specific mapping here! */
if(net_id == DRAGONFLY && (lp->gid % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (lp->gid % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
tw_lpid dest_id = (lp->gid + offset + opt_offset)%(num_servers*2 + num_routers);
......@@ -506,10 +510,13 @@ static void handle_req_event(
/* safety check that this request got to the right server */
// printf("\n m->src %d lp->gid %d ", m->src, lp->gid);
int opt_offset = 0;
/* TODO: Noah, we need slimfly specific mapping here! */
if(net_id == DRAGONFLY && (m->src % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (m->src % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
assert(lp->gid == (m->src + offset + opt_offset)%(num_servers*2 + num_routers));
ns->msg_recvd_count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment