| 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 Numbers a part of NoC structure. |
| Payload, a part of NoC structure that holds the data generated as Source NoC. |
| Output: Payload. |
| Initialize global variable |
| Set graph = |
| busy6 = |
| success4 = |
| (2) Form a class packet |
| Attributes: |
| PUBLIC header2: INTEGER |
| PUBLIC flit4: INTEGERs: |
| METHOD: PUBLIC packet() |
| BEGIN |
| flit0 = 0 |
| flit1 = 0 |
| flit2 = 0 |
| flit3 = 0 |
| End METHOD |
| End class packet |
| packet p4 |
| (3) Open the file “pairs.txt” with handle file1 |
| Open the file “pairs1.txt” with handle file2 |
| print(ar) |
| FOR pairs = 3 to pairs = 4 |
| WHILE (EOF of file1∣file2 is not reached) |
| IF (pairs = 3) |
| getline from file1 = ar |
| ELSE |
| getline from file2 = ar |
| call puts with arputs(ar) |
| FOR i = 0 to 2 |
| Input source and destination of NoC packet |
| initialize s and d Set = ar and d=ar |
| (4) IF s 2 THEN |
| Initialize headerheader0 = s−1 |
| ELSE |
| header0 = s |
| IF d 2 THEN |
| Initialize header header1 = d−1 |
| ELSE |
| Initialize header 1 header1 = d |
| End FOR |
| (5) Output header for all packets |
| Initialize flit and busy FOR all i = 0 to 3 |
| pi.flit = pi.header0 and busyi.headeri = 1 |
| (6) FOR k = 0 to value of pairs |
| IF flit = header and flit != 99 and flit != 100 THEN |
| flit = 99 |
| (7) IF graphflitheader = = 1 and flit != 99 and flit != 100 |
| THEN |
| IF busy = = 1 THEN |
| IF busy2 = = 0 THEN |
| Assign flit0 = 0 |
| Assign busy2 = 1 |
| Assign flit = 20 |
| (8) IF busy3 = 0 |
| Initialize flit0 = 0 |
| Assign busy3 = 1 |
| Assign flit0 = 3 |
| (9) ELSE DO |
| Assign flit0 = 0 |
| Assign flit0t = header1 |
| Assign flit0 = 1 |
| (10) ELSE IF flit0 != 9 and flit0 != 100 THEN |
| Initialize flag = 0 |
| Loop FOR x = 0 to 5 |
| Set flag = 0 |
| Loop FOR x = 0 to 5 |
| IF flit(x) = 1 and busy(x) = 0 |
| Assign flit0 = 0 |
| Assign flit0 = x |
| Assign flit0 = 1 |
| Assign flag = 1 |
| (11) IF flag = 0 |
| Assign flit0 =100 |
| (12) Print flitk FOR k = 0 to value of pairs |
| (13) Assign busypk.flit3 = 0 |
| Assign flit3 = flit2 |
| Assign busypk.flit3 = 1 |
| Assign flit2 = flit1 |
| Assign busypk.flit3 = 1 |
| Assign flit1 = flit0 |
| Assign busypk.flit3 = 1 |
| (14) Loop e = 1 to pairs |
| If flit(3) = 99 |
| increment successpairs − 1 |
| (15) Loop z = 1 to z = pairs |
| Assign successz = successz/z |
| Print [successz and efficiencyefficiency = (successz/totalz)*100 |
| The run time Complexity of the Algorithm: NoC_WS_REGULAR_HXN is |