Research Article

On Asymptotic Analysis of Packet and Wormhole Switched Routing Algorithm for Application-Specific Networks-on-Chip

Algorithm 4

NoC_PS_REGULAR_HXN.
Input: n, stores Number of parallel processing NoC.
Source, a NoC type array, stores the Source NoC Numbers a part of NoC structure.
Destination, a NoC type array, stores the Destination NoC Number a part of NoC structure.
Payload, a part of NoC structure that holds the data generated as Source NoC.
Output: Payload.
BEGIN
(2) FOR (I = 0 to 6) DO /*Initialization of Elements of Switching Element structure*/
(3)   Info = NULL
(4)   Info1 = NULL
(5)   Source = −999
(6)   Destination = −999
(7)END FOR
(8)FOR (I = 0 to 4) DO
(9)    Payload = 0 /*Initializing payload of all the 4 NoC to 0*/
(10)  Number = I /*Numbering of all the 4 NoC from 0 to 3*/
(11)END FOR
(12) Get the Number of parallel communicating NoC, n
(13)  FOR (l = 0 to n) DO
(14) Get the Source and Destination NoC S l , D l
(15) Get the respective payloads
(16)  END FOR
(17)  FOR (x = 0 to 6) DO
(18)  BEGIN
/*Stage1: Transferring the “Payload” values from the NoC to the respective “Info” values of Switching
Element structure*/
(19)  FOR (y = 0 to n−1) DO
(20)  Transfer the payloads of NoC to the Info of next immediate Switching Elements
(21)  Transfer the Source NoC Number to the Source of Switching Element
(22)  Transfer the Destination Number to the Switching Element
(23)  END FOR
/*Stage2: If the communicating NoC are on the same side then check the source and respective destination
number of the Switching Element and transferring it to the next Switching Element having empty “Info” value*/
(24)  FOR (t = 0 to 2) DO
(25)   Check Source and respective Destination pair DO
(26)   Check Info of chain linked Switching Element DO
(27)   IF Info = NULL
(28)     Transfer Info into this Switching Element
(29)     Transfer the Source and Destination Number to this Switching Element
/*If “Info” of first linked Switching Element is not empty then transfer the packet to the “Info” of second linked Switching
Element*/
(30)   ELSE
(31)    Check Info of first linked Switching Element DO
(32)      IF Info = NULL
(33)      Transfer Info into Switching Element
(34)      Transfer the Source and Destination Number to the Switching Element
(35)   ELSE
(36)    Check Info of second linked Switching Element DO
(37)      IF Info = NULL
(38)      Transfer Info into Switching Element
(39)      Transfer the Source and Destination Number to the Switching Element
/*Stage3: If communicating NoC are on the opposite side checking the source and respective destination number of the
Switching Element and transferring it to Switching Element having empty “Info” value*/
(40)     Check Source and respective Destination pair DO
(41)     Check Info of first linked Switching Element DO
(42)     Transfer Info into this Switching Element
(42)          IF Info = NULL
(44)    Transfer the Source and Destination Number to this Switching Element
/*If the “Info” of first linked Switching Element is not empty then transfer of packet to “Info” of second linked Switching
Element*/
(45)     ELSE
(46)     Check Info of second linked Switching Element DO
(47)      Transfer Info into Switching Element
(48)       IF Info = NULL
(49)       Transfer the Source and Destination Number to the Switching Element
/*If the “Info” of first and second linked Switching Elements are not empty then transfer “Info” to third linked Switching
Element*/
(50)     ELSE
(51)     Check Info of chain linked Switching Element DO
(52)     Transfer Info into Switching Element
(53)       IF Info = NULL
(54)       Transfer the Source and Destination Number to the Switching Element
(55)      Check Source and respective Destination pair DO
(56)      Check Info of first linked Switching Element DO
(57)      IF Info = NULL DO
(58)     Transfer Info into this Switching Element
(59)     Transfer the Source and Destination Number to this Switching Element
/*If the “Info” of first linked Switching Element is not empty then transfer of packet to “Info” of second linked Switching
Element*/
(60)     ELSE
(61)      Check Info of second linked Switching Element DO
(62)      IF Info = NULL DO
(63)     Transfer Info into Switching Element
(64)     Transfer the Source and Destination Number to the Switching Element
/*If the “Info” of first and second linked Switching Elements are not empty then transfer “Info” to third linked Switching
Element*/
(65)      ELSE
(66)      Check Info of chain linked Switching Element DO
(67)      IF Info = NULL DO
(68)     Transfer Info into Switching Element
(69)     Transfer the Source and Destination Number to the Switching Element
/*Stage4: If the linked NoC is the destination, that is, NoC-0 for SE 0 , NoC-1 for SE 1 NoC-3 for SE 4 , NoC-4 for SE 5
then transfer the “Info” of the Switching Element to their respective linked NoC*/
(70)   IF Destination of SE 0 = 0 DO
(71)    Transfer Info to payload of NoC-0
(72)    ELSE
(73)     Transfer Info to first linked Switching Element
(74)    END IF
(75)    IF Destination of SE 1 = 1 DO
(76)   Transfer Info to payload of NoC-1
(77)    ELSE
(78)      Transfer Info to first linked Switching Element
(79)    END IF
(80)    IF Destination of SE 3 = 2 DO
(81)    Transfer Info to payload of NoC-2
(82)     ELSE
(83)      Transfer Info to first linked Switching Element
(84)    END IF
(85)    IF Destination of SE 4 = 3
(86)    Transfer Info to payload of NoC-3
(87)     ELSE
(88)     Transfer Info to first linked Switching Element
(89)   END IF
/*Stage5: Transfer the Info of the Switching Element that could not be transferred in the previous stage) to the destination
NoC*/
(90)   Transfer Info of Switching Element to the payload of the destination NoC
(91)   END FOR
(92)  END BEGIN
(93) END FOR
(94) END BEGIN
The run time complexity of the algorithm: NoC_PS_REGULAR_HXN is .