示例#1
0
文件: RouterFlit.cs 项目: hirous/test
        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));
            }
        }
示例#2
0
 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");
     }
 }
示例#3
0
文件: RouterAFC.cs 项目: hirous/test
 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");
     }
 }
示例#4
0
 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));
 }
示例#5
0
文件: RouterSort.cs 项目: hirous/test
 public override int rank(Flit f1, Flit f2)
 {
     return(Router_Flit_OldestFirst._rank(f1, f2));
 }
示例#6
0
        /* ------------- 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));
        }