Skip to main content
. 2023 Oct 7;14(10):1913. doi: 10.3390/mi14101913
Algorithm 1 XYX Routing
  •   1:

    procedure xyx routing

  •   2:

        Xi:address of surrounding router in X direction

  •   3:

        Yi:address of surrounding router in Y direction

  •   4:

        Xr:position of removed row in X direction

  •   5:

        Yr:position of removed column in Y direction

  •   6:

        Xd:destination address in X direction

  •   7:

        Yd:destination address in Y direction

  •   8:

        For each router (Xi, Yi) neighbors to removed columns or rows:

  •   9:

        if Xr=Xd then //destination in the same Row

  • 10:

            follow Yi.

  • 11:

            close;

  • 12:

        else if Xr<XdorXr>Xd then //destination in different Row

  • 13:

            then follow Xi.

  • 14:

            close;

  • 15:

        else if Yr=Yd then //destination in the same Column

  • 16:

            then follow Xi.

  • 17:

            close;

  • 18:

        else if Yr<YdorYr>Yd then //destination in different column

  • 19:

            then follow Yi.

  • 20:

            close;

  • 21:

        end if

  • 22:

    end procedure