Commit 70746264 authored by mubarak's avatar mubarak

fixing lookahead issue in conservative mode caused by zero timestamp events in model-net

parent babae02f
......@@ -38,6 +38,9 @@ struct terminal_message
short saved_vc;
/* last hop of the message, can be a terminal, local router or global router */
short last_hop;
/* for reverse computation */
short path_type;
// For buffer message
short vc_index;
int input_chan;
......
......@@ -225,7 +225,7 @@ void handle_new_msg(
if (ns->in_sched_loop == 0){
b->c0 = 1;
tw_event *e = codes_event_new(lp->gid, codes_local_latency(lp), lp);
tw_event *e = codes_event_new(lp->gid, g_tw_lookahead + codes_local_latency(lp), lp);
model_net_wrap_msg *m = tw_event_data(e);
m->event_type = MN_BASE_SCHED_NEXT;
m->magic = model_net_base_magic;
......@@ -265,7 +265,7 @@ void handle_sched_next(
}
else {
tw_event *e = codes_event_new(lp->gid,
poffset+codes_local_latency(lp), lp);
poffset+codes_local_latency(lp) + g_tw_lookahead, lp);
model_net_wrap_msg *m = tw_event_data(e);
m->event_type = MN_BASE_SCHED_NEXT;
m->magic = model_net_base_magic;
......
......@@ -178,7 +178,7 @@ static void model_net_event_impl_base(
}
tw_lpid mn_lp = model_net_find_local_device(net_id, sender);
tw_stime poffset = codes_local_latency(sender);
tw_stime poffset = g_tw_lookahead + codes_local_latency(sender);
if (in_sequence){
tw_stime tmp = mn_msg_offset;
mn_msg_offset += poffset;
......
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