public override int rank(Flit f1, Flit f2) { if (Config.bLowMPKIPrio) { bool f1Low = (Simulator.controller.MPKI[f1.packet.src.ID] <= Config.lowMPKIPrio) ? true : false; bool f2Low = (Simulator.controller.MPKI[f2.packet.src.ID] <= Config.lowMPKIPrio) ? true : false; if (f1Low && f2Low) { return(0); } else if (f1Low && !f2Low) { return(-1); } else if (!f1Low && f2Low) { return(1); } else { return(Router_Flit_OldestFirst._rank(f1, f2)); } } else { return(Router_Flit_OldestFirst._rank(f1, f2)); } }
public int CompareTo(object o) { if (o is AFCBufferSlot) { return(Router_Flit_OldestFirst._rank(m_f, (o as AFCBufferSlot).m_f)); } else { throw new ArgumentException("bad comparison"); } }
public int CompareTo(object o) { if (o is AFCBufferSlot) { if (Config.controller == ControllerType.STC) { return(Simulator.controller.rankFlits(m_f, (o as AFCBufferSlot).m_f)); } return(Router_Flit_OldestFirst._rank(m_f, (o as AFCBufferSlot).m_f)); } else { throw new ArgumentException("bad comparison"); } }
public override int rankFlits(Flit f1, Flit f2) { if (Config.cluster_prios) { if (f1.packet.requesterID != -1 && f2.packet.requesterID != -1) { if ((int)m_nodeStates[f1.packet.requesterID] < (int)m_nodeStates[f2.packet.requesterID]) { return(-1); } if ((int)m_nodeStates[f1.packet.requesterID] > (int)m_nodeStates[f2.packet.requesterID]) { return(1); } } } return(Router_Flit_OldestFirst._rank(f1, f2)); }
public override int rank(Flit f1, Flit f2) { return(Router_Flit_OldestFirst._rank(f1, f2)); }
/* ------------- PRIORITIZATION ---------------- */ // rank flits at router arbitration public virtual int rankFlits(Flit f1, Flit f2) { //return Simulator.rand.Next(3) - 1; // one of {-1, 0, 1} return(Router_Flit_OldestFirst._rank(f1, f2)); }