Exemple #1
0
        public int tick()
        {        //Clock in RBLA, make decision when Cycles is multiples of Interval
            //If Migration



            if (target)
            {
                //	Console.WriteLine("Info------------");
                //	Console.WriteLine(target_req.addr.bid);
                //Console.WriteLine(target_req.addr.cid);
                BankStat bank_stat = Stat.banks2[target_req.addr.cid, target_req.addr.rid, target_req.addr.bid];

                //Console.WriteLine(bank_stat.access.Count);
            }



            if (Cycles == 0)
            {
                if (Config.proc.cache_insertion_policy == "RBLA")
                {
                    RBLA.initialize();
                }
                else if (Config.proc.cache_insertion_policy == "PFA")
                {
                    PFA.initialize();
                }
            }
            else
            {
                if (Cycles % Interval == 0)
                {
                    MigrationDecision();
                }
                if (target)
                {
                    target = false;
                    if (Config.proc.cache_insertion_policy == "RBLA")
                    {
                        RBLA.tick();
                    }
                    else if (Config.proc.cache_insertion_policy == "PFA" && Cycles >= Interval)
                    {
                        PFA.tick();
                    }
                }
                if (Cycles % Interval == 0)
                {
                    RowStat.ClearPerInterval();
                }
            }
            Migration.tick();
            Cycles++;
            return(0);
        }
Exemple #2
0
        public int tick()
        {        //Clock in RBLA, make decision when Cycles is multiples of Interval
                 //If Migration

            if (Cycles == 0)
            {
                if (Config.proc.cache_insertion_policy == "RBLA")
                {
                    RBLA.initialize();
                }
                else if (Config.proc.cache_insertion_policy == "PFA")
                {
                    PFA.initialize();
                }
                else if (Config.proc.cache_insertion_policy == "AC")
                {
                    AC.initialize();
                }
            }
            else
            {
                if (Cycles % Interval == 0)
                {
                    MigrationDecision();
                }

                if (target)
                {
                    target = false;
                    if (Config.proc.cache_insertion_policy == "RBLA")
                    {
                        RBLA.tick();
                    }
                    else if (Config.proc.cache_insertion_policy == "PFA" && Cycles >= Interval)
                    {
                        PFA.tick();
                    }
                    else if (Config.proc.cache_insertion_policy == "AC" && Cycles >= Interval)
                    {
                        AC.tick();
                    }
                }

                if (Cycles % Interval == 0)
                {
                    RowStat.ClearPerInterval();
                }
            }
            Migration.tick();
            Cycles++;
            return(0);
        }