Skip to main content
. 2019 Nov 9;19(22):4902. doi: 10.3390/s19224902
Algorithm 1 Initial Mapping and Frequency Assignment
  • 1:

    sort W in a descending order of exnpn·f1;

  • 2:

    n, set mapl(τn)=0                    ▹ (i) Logical core mapping

  • 3:

    forn=1 to N do

  • 4:

        find lpm with the minimum um value;

  • 5:

        set mapl(τn)=lpm and update um;

  • 6:

    end for

  • 7:

     

  • 8:

    form=1 to M do                     ▹ (ii) Frequency modulation

  • 9:

        while um>1 do

  • 10:

            if fa(lpm)=fLthen                     ▹ Highest frequency

  • 11:

               return not schedulable;

  • 12:

            else                     ▹ Scaling up the frequency by one level

  • 13:

               when fa(lpm)=fl, adjust fa(lpm) to fl+1;

  • 14:

            end if

  • 15:

        end while

  • 16:

    end for

  • 17:

    calculate P with Equation (1) (w/o Pleak)

  • 18:

     

  • 19:

    i, set mapp(lpi)=0;                  ▹ (iii) Physical core mapping

  • 20:

    while LPϕ do

  • 21:

        find lpiLP with the maximum P[i];

  • 22:

        Tcurr_min; ind_min1;

  • 23:

        for j=1 to M do                     ▹ Find the smallest temp

  • 24:

            set mapp(lpi)=pej;                  ▹ Try mapping lpi on pej

  • 25:

            evaluate the maximum temperature Tmax;

  • 26:

            if Tmax<Tcurr_min then

  • 27:

               Tcurr_minTmax; ind_minj;

  • 28:

            end if

  • 29:

            set mapp(lpi)=0;                    ▹ Restore the mapping

  • 30:

        end for

  • 31:

        set mapp(lpi)=peind_min;

  • 32:

        LPLP{lpi};

  • 33:

    end while

  • 34:

    return schedulable;