]>Networks-On-Chip Based on Dynamic Wormhole Packet Identity Mapping Management : Algorithm 1
Xoffs=Xdest Xsource;
Yoffs=Ydest Ysource;
elseif Xoff > 0 and Yoffs > 0 then
if NumOfusedID(NORTH) < NumOfusedID(EAST) or
(NumOfUsedID(NORTH)=NumOfUsedID(EAST)
  and NumOfDataInFIFO(NORTH) < NumOfDatain
  FIFO(EAST)) then
route=north;
else route=east; end if;
end if;
Algorithm 1: Adaptivity for making North or East Routing.