scieee AI-readable full text Open interactive document viewer

The implementation of XHiNoC based MPSoC

Mir Boada, Jordi

Abstract

[ANGLÈS] Nowadays, the electronic is advancing an extremely high rhythm. The new applications demand great computational load and high speeds. Therefore the electronic future is linked with multi-tasking concept and the multi-processor assembled on a single chip. It is known as MPSoC (Multi Processors System-on-chip). One of the main factors that affects directly to the chip performance is the interconnect system among the different cores. So far, there have developed several interconnect alternatives for systems that have less than tenth cores. However the problem gets out of control when the number of processing elements increases more than 10. Then start to appear problems like bottleneck performance, the effect of the high electromagnetism interference can disturb the interconnect functionality, the wiring complexity problems, in general no one is flexible. Root of all this, one solution that has won more strongly is known as NoC (Network on chip). The NoC is a communication infrastructure that provides better scalability and flexibility as well as a great bandwidth. In addition it has a large level of reconfiguration. This thesis is based on, firstly, a documentation chapter where examined two networks-on-chip completely different, HeMPS NoC and XHiNoC. Then there is a design and implementation chapter that involves the adaptation and commissioning of XHiNoC within design platform known as HeMPS. This platform allows us evaluate the NoC performance. The third point we find measures and comparatives between the two NoC and finally, at the end, there are some conclusion drawn during the project.

Full text

The implementation of XHiNoC based MPSoC Study: Electronic engineer Author: Jordi Mir Boada Advisor: Haoyuan Ying Any: 2011-2012 2 3 Acknowledgements I would like to dedicate a few lines to everyone who has made possible this thesis, to everyone who has supported and help me during my stay in TU Darmstatd. First of all, I would like to express my deep gratitude to Professor K. Hofmann for giving me the chance of working with his team. Without him, this thesis would not have been possible. Secondly, I would like to sincerely thank to my advisor Haoyuan Ying for his very valuable and always helpful advices as well as for his feedback and support. In these lines, I cannot forget my “friends abroad”, you have made the best of my stay, we have laughed, shared and been happy altogether. I would have never expected to find anyone like you. Last but not least, I would like to dedicate some words to my family and in special for Anna. I know that it hasn’t been easy for both but I am sure it has made us stronger. Thanks you, family, for the infinite support you have given to me and all the love I have gotten from you. 4 Abstract Nowadays, the electronic is advancing an extremely high rhythm. The new applications demand great computational load and high speeds. Therefore the electronic future is linked with multi-tasking concept and the multi-processor assembled on a single chip. It is known as MPSoC (Multi Processors System-on-chip). One of the main factors that affects directly to the chip performance is the interconnect system among the different cores. So far, there have developed several interconnect alternatives for systems that have less than tenth cores. However the problem gets out of control when the number of processing elements increases more than 10. Then start to appear problems like bottleneck performance, the effect of the high electromagnetism interference can disturb the interconnect functionality, the wiring complexity problems, in general no one is flexible. Root of all this, one solution that has won more strongly is known as NoC (Network on chip). The NoC is a communication infrastructure that provides better scalability and flexibility as well as a great bandwidth. In addition it has a large level of reconfiguration. This thesis is based on, firstly, a documentation chapter where examined two networks-on-chip completely different, HeMPS NoC and XHiNoC. Then there is a design and implementation chapter that involves the adaptation and commissioning of XHiNoC within design platform known as HeMPS. This platform allows us evaluate the NoC performance. The third point we find a measures and comparatives between the two NoC and finally, at the end, there are some conclusion drawn during the project. 5 Resum del projecte L’electrònica d’avui en dia està avançant a un ritme extremadament alt. Les noves aplicacions exigeixen unes carreges computacionals i unes velocitats elevadíssimes. És per això que el futur de l’electrònica està lligat en el concepte de multi-tasca i a la integració de multi-processadors en un sol xip, el que es conegut com a MPSoCs. (Multi Processors System-on-chip). Un dels principals factors que afecten directament en el rendiment del chip és el sistema de interconnexió entre els diferents nuclis. Fins el dia d’avui s’han desenvolupat diferents sistemes per a xips que no arriben a la desena de nuclis. Ara bé, el problema es descontrola quan el número d’elements integrats supera als 10. Llavors comencen aparèixer problemes de coll de botella, nivells alts de electromagnetisme i els sistemes de interconnexió és compliquen. Arrel de tot això, una de les solucions que s’ha imposat amb més força és la coneguda com a NoC (Network-on-chip). La NoC és una infraestructura de comunicació que proveeix una millor escalabilitat i flexibilitat, a part de un gran ample de banda de comunicació. A més posseeix un gran grau de reconfiguració. Aquesta projecte està basat en, primerament, una part documentaria on s’estudien dues networks-on-chip totalment diferents, HeMPS NoC i XHiNoC. Seguidament una part de disseny i implementació que consisteix en l’adaptació i posta en marxa de XHiNoC dins una plataforma de disseny coneguda com a HeMPS, la qual ens permetrà avaluar el seu rendiment. En tercer punt hi trobarem una part de mesures i comparatives entre les dues NoC i finalment unes conclusions extretes durant la realització del projecte. 6 Table of contents 1. Introduction ....................................................................................................................... 7 1.1 Motivation .................................................................................................................. 7 1.2 Objectives ................................................................................................................... 9 1.3 Thesis outline .............................................................................................................. 9 2. Analysis ............................................................................................................................ 11 2.1 Work tools ................................................................................................................ 11 2.2 Important aspects..................................................................................................... 22 2.3 Alternatives............................................................................................................... 23 2.3 Justification of the adopted solution ....................................................................... 28 3. Design .............................................................................................................................. 29 3.1 Network Interface general diagram ......................................................................... 29 3.1 Network Interface Sending Unit ............................................................................... 32 3.2 Network Interface Receiving Unit ............................................................................ 38 4. Measures ......................................................................................................................... 45 4.1 Latency comparison .................................................................................................. 45 4.2 Execution time comparison ...................................................................................... 51 5. Conclusions ...................................................................................................................... 54 6. Bibliography..................................................................................................................... 56 7 Chapter 1 Introduction Contents 1.1 Motivation .................................................................................................... 7 1.2 Objective ...................................................................................................... 9 1.3 Thesis outline ............................................................................................... 9 1.1 Motivation Nowadays, the electronic is subjected to a strong tendency towards the System-on- Chip (SoC). SoC is an integrated circuit (IC) that integrates all components into a single chip and it is one of the potential solutions for system level design. In a near future, SoCs will integrate dozens of processing elements, achieving a great computational power in a single chip. This computational power is commonly used by complexes multimedia algorithms. Thus, systems based on a single processor are not suitable for this technological trend and the development of SoCs with more complexity will be multi processed, known as MPSoCs. One of the main points on SoC or MPSoCs is the interconnect system, which interconnects several components such as microprocessor cores, MCU, DSP ,memories and other intellectual properties components (IP). Since interconnect technology affects more profoundly on chip performance and power consumption, improving on-chip communication technology has become increasingly important to researchers [1]. A high-throughput communication infrastructure is required to meet the bandwidth requirement of each data communication flows generated due to interacting processors in the MPSoC systems. So far, there have been several alternatives in order to solve the interconnect system such as bus-based interconnected system, a full crossbar interconnect, point-to-point interconnect (dedicated wires), but the problems become when the number of IP increase more than ten, then start to appear problems like bottleneck performance [2], the effect of 8 the high electromagnetism interference can disturb the interconnect functionality, the wiring complexity problems, in general no one is flexible. This issue can be potentially handled by a communication infrastructure based on the Network-on-Chip (NoC), which has better scalability to provide sufficient communication bandwidth [3]. Network-on-Chip infrastructure also enables advanced intellectual properties communication concepts for MPSoC. In embedded MPSoC systems, NoC can provide a flexible communication infrastructure, in which several components such as microprocessor cores, MCU, DSP, memories and other intellectual property components can be interconnected by using reusable NoC routers via general modular interfaces. The MPSoC systems can also be reconfigured for certain embedded computing application and can be customized to improve the communication performance in the application. Hence, the NoC-based systems combine performance with design modularity. The main component of the NoC system is an on-chip router. Research in the field of off-chip interconnection network is not a new activity. The off-chip interconnection network has been a mature technology. However, there are some issues that should be addressed regarding the adoption of the “off-chip network” concepts into the “on-chip network” implementations. We are sure that the new innovation related to switching method, adaptive routing algorithm, network flow control and buffering scheme suitable for NoCs are still required. Until now, there is no standard for the NoC architecture similar to that of the internet world. This thesis is motivated to adaptive a new NoC called XHiNoC (eXtendable Hierarchical Network-on Chip) with new switching method, new adaptive routing strategies, a new deadlock-free theory and methodology for tree-based multicast routing, first in the simulation platform called HeMPS (HERMES Multiprocessor System) and then on the FPGA. HeMPS Station is a dedicated environment for MPSoC, basically a concept for a system structure to evaluate the performance of distributed applications in a given architecture running on an FPGA. 9 1.2 Objectives The main purpose of this thesis is to develop and evaluate XHiNoC, the new networkon-chip based MPEG application for multiprocessor systems. First using HeMPS simulation and then loading it into a FPGA. Concretely we deal with two NoC, HeMPS NoC and XHiNoC. Both with different features such as switching method, routing algorithm, network flow control and the internal NoC router pipeline microarchitecture. However, note that basically we work with XHiNoC. The specific objectives are explained in the following points: • Know the two NoC, HeMPS NoC and XHiNoC, understand how they work and be able to differentiate their main features • Become familiar with HeMPS platform, understand its structure and each part of its communication as well as set up all the software for testing. • Replace HeMPS NoC within HeMPS system by XHiNoC, and adapt all that it entails. • Simulate the function of the XHiNoC using HeMPS platform, loading different application and applying multi-task in the processors. Afterward check the execution time and the latency with different applications and compare both systems as well. Finally run the whole system inside a FPGA virtex5. 1.2 Thesis outline The following points present the structure and a brief description of the rest of this report divided into 4 chapters groups, i.e. analysis, design, measures and conclusions: 1 Chapter 2: This chapter describes, first, the two networks on chip that we use. Then explain the objectives and the important aspects that we have to consider. It continuous talking about the possible alternatives and finally there is the justification of the adopted solution. 2 Chapter 3: This chapter describes all the implementation process of Network Interface block divided in two sub-blocks: Network Interface Sending Unit and Network Interface Receiving Unit. The work methodology consists firstly in explain 16 Fig. 2.4: XY Routing algorithm [3] • Credit-based flow control. The Fig. 2.5 shows the data structure from HeMPS NoC [8]. It is divided in 3 different packets of 16 bits size. The target or header which informs about the destination, then there is the size that says the payload size and last the payload. The plasma sends the data in flits of 32 bits each one (Fig.2.5a) but the HeMPS NoC works in flits of 16 (Fig.2.5b). So to solve this conflict, each PLASMA-IP is connected to NoC using a Network interface block which adapts the data. Fig. 2.5: HeMPS NoC data form The target or header flit of each packet makes a routing direction on each node and reserves a set of routing paths, while the payload flits will follow the path set up by the header flit. During the transmission, others messages cannot acquire the reserved buffers. 17 So the whole packet is transmitted without interruption due to there is only one slot for each port. The tail flit of each packet at the end will then terminate the reservation. Unfortunately, the main problem of this traditional wormhole switching method is a head- of-line blocking problem. If the header flit is blocked then it will also block the remaining paths that are still used by the wormhole packet. • 8-flits buffer depth. HeMPS NoC uses 8 flits buffer depth. Depending on the switching method, it allows to set this buffer with more or less slots. 2.1.1.3 HeMPS Network Interface The great objective of Network interface is to adapt the signals between PLASMA-IP or core and the NoC router and works with their protocols. In sending to the NoC it must divide the 32 bits of each PLASMA flit in 2 of 16 bits for NoC protocol and in the opposite size, it must packet 2 flits of 16 bits to make 1 of 32 bits. To do it, Network interface uses a memory RAM of 32x16 bits. It is vital to use a RAM to store the information because the core doesn’t read immediately. Fig. 2.6 shows the Network Interface block with its signals to connect, On one hand to the PLASMA-IP and for the other to the NoC. Network Interface Clock_tx tx Data_out[15:0] Credit_i Clock_rx rx Data_in[15:0] Credit_o Send_av Read_av intr Send_data Read_data Data_write[31:0] Data_read[31:0] Config[31:0] Rst ClkClk Fig. 2.6: Network Interface block 18 2.1.2 XHiNoC The XHiNoC is developed not only to provide a communication infrastructure for embedded multiprocessor systems-on-chip (MPSoC) devices, but also for further implementation of chip-level multiprocessor (CMP) systems, which are designed for generalpurpose multicore computer systems. The main purpose of the XHiNoC is to give a flexible shared communication media of the on-chip interconnection network. In order to provide such flexible communication media sharing, a concept of locally organized packet identity (ID) division multiple access (IDMA) method suitable for NoCs is introduced. Local ID slots are distributed over every communication link, which can be attached to every flit of a packet or data stream as its local ID-tag. The generic microarchitecture of XHiNoC router is presented in Fig. 2.7 [3]. In general, the router consists of two main component groups; component groups at input and output ports. At every input port, there are a First-In First-Out (FIFO) buffer and a Routing Engine with Data Buffering (REB) components. The REB components consists of three modules; Router Buffer, a Routing Engine (RE) and a Grant Controller (GC). • The FIFO Buffer is used to buffer data coming from a neighbor to the input of the NoC router. The depth of the FIFO buffer can be set to only 2 registers. • The RE module is used to make a routing decision such that a message can be routed from an input port to an output port. Fig. 2. 7 : Microarchitecture of XHiNoC router 19 • The Route Buffer is used to buffer a message flit soon after the routing decision has been made for the flit. • The GC module is a combinatorial logic used to control the data read operation of the FIFO buffer. At each output port, there are two main modules; an Arbiter (A) unit and a Crossbar Multiplexor with ID Management (IDM) Unit (MIM). In each MIM modules, there is an ID Slot Table. The functionality of the output port component group is described briefly in the following items. • The Arbiter or Arbitration unit at an output is used to select a message flit from an input port that will be switched out to the output port. • The MIM module is used to multiplex message flits from input ports and concurrently used to update the ID-tag of each message and manages the ID Slot Table in such a away that flits belonging to the same message will have the same ID- tag. Fig. 2.8 shows the detailed component and architecture of XHiNoC [3]. Fig. 2.8: Detailed component and architecture of XHiNoC 20 In the following points we mention some characteristics of the XHiNoC that makes it a unique NoC router. Of course there are more interesting features of the XHiNoC but to explain all them would take a long time and it is not the objective of this thesis. • Specific Wormhole Switching with Flit-Level Packet Interleaving. One of the special interesting features of the XHiNoC design concept is the implementation of a unique wormhole switching technique where flits of different messages can be interleaved and share the same communication media based on the locally organized message identity. Flits belonging to the same message will always have the same local ID-tag when acquiring a communication media (network link). By applying the flit-by- flit circulating arbitration technique, the wormhole messages can be interleaved at flit-level because every flit brings a local ID-tag to differentiate it from other flits of different flits. The local ID tag is updated by an ID management unit implemented in output port. By using this kind of wormhole switching, the head-of-line blocking problem commonly happen in the traditional wormhole switching can be solved partially without implementing virtual channels. • Hold-Release Tagging Policy for Deadlock-Free Multicast Routing. By using the local- ID-based method to switch wormhole packet over the network and by using further the flit-by-flit arbitration technique, a multicast deadlock configuration problem due to a multicast data request dependency can be solved effectively by using a so called hold/release-tagging-based multicast policy implemented on every NoC router. The multicast conflicts, which potentially lead to deadlock configuration (multicast dependency), are allowed and well organized by using the multicast conflict control and management resulting in a new deadlock-free multicast routing methodology. The multicast flow control is based on the fact that a multicast data will not be released from FIFO buffer at input port if the set of all multicast routing requests has not been granted to access the multiple output ports. If a subset of the requests is granted, then the granted requests will be reset to avoid improper multicast flit replications. 21 • Packet format The detail packet format and the control bits used in the XHiNoC architecture are presented in Fig. 2.9. The message is split into several flits and has 39-bit width, 32 bits for data word plus 7 extra bits; 3-bit field to define the type of flits and 4-bit field to determine the local identity label or ID-tag of the message. The ID-tag field is set 4 bits, resulting in 16 available ID-tag which conforms to the number of available ID slots on every communication link. Head ID-tag Source Addr. Dest. Addr. Extension DBod ID-tag Payload Data DBod ID-tag Payload Data Tail ID-tag Payload Data Extension Resp ‘1111’ Source Addr. Dest. Addr. Extension Type ID field Address field Extension field DatawordControl bits 3 bits 4 bits 12 bits 8 bits 12 bits Fig. 2.9: XHiNoC data form The types of flits can be identified into four types that are described in the following. • Header flit is a flit that is attached in the probe of a message. As the leading flit, the address of the destination node is written on the bit-field of the flit. The header flit initiates the ID slot reservation including routing table slot reservation and ID tag updating function. The header flit is used basically to establish routing path or to configure connection. • Databody flit is identified as the payload data of a message/stream. Hence, the substantial word of the message is injected into the NoC as databody flits. • Tail flit is used to mark the end of a message/stream. The tail flit is basically used to close the routing path or to terminate the connection. 22 • Response flit is used when a connection-oriented guaranteed-service communication protocol is implemented in the NoC router, where the response flit is sent by a destination node to inform the source node about the status of the connection, i.e. successful or fail. When a best-effort data communication protocol is implemented, the response flit is used to initiate data retransmission when data drop mechanism is allowed, because one free ID tag in the acquired link cannot be allocated for the message, since all available ID slots have been reserved by other messages (run out of ID slots). Besides these tools, we also use the software “ModelSim” to simulate the whole system and it allows us to check whatever signal that we want. 2.2 Important aspects As mentioned earlier, this thesis is motivated to evaluate the operation and performance of XHiNoC NoC when it is embedded inside of MPSoC and is subject to different workloads. Such as multimedia application which require high communications bandwidth or also in case of multitask. Once we know, on one side, how HeMPS NoC is structured and interconnected with the core and, for the other side, the same but with XHiNoC, then our task is to replace HeMPS NoC for XHiNoC and adapt the signals and the operation protocol. Basically there are two important aspects to solve: 1. Adapt the data form Both systems use a completely different data form. On one hand, HeMPS Network-on- Chip uses 16 bits per flit and there are three different flit types; Target, Size and Payload as show Fig. 2.5. But no one have extra bits for information. Also the all flits which belong to the same packet travel together and they arrive to the destination in order. On the other hand, XHiNoC uses 39 bits per flit, 32 for data and 7 for header. 4 of this 7 are for the concept of locally organized packet identity (ID) division multiple access method and the rest determines the flit type; Header, Databody, Tail and Response as present the Fig. 2.9. In that case not all the flits travel together and it is possible that they arrive disordered at the destination. 23 2. The interleaved The XHiNoC wormhole switching technique makes that flits of different messages can be interleaved. So it is possible to receive some flits from different source interleaved at the Network Interface buffer. Hence, the Network Interface block must be able to select all the flits belong to the same messages and order them before delivery them to the core. After analyzing the main aspects, we are able to know that us task is focused on change, redesign the Network Interface block in order to expire with the aims. So the next step is practically VHDL design. 2.3 Alternatives Before starting to redesign the Network Interface block is recommended to study the possible alternatives and choose the most suitable. Concerning the data form, there are two alternatives but each one affects differently on the second aspect. • The first alternative is to put 32 bits of PLASMA-IP information in each XHiNoC flit and then add 7 bits of ID and flit type. It is represented in Fig. 2.10. Using this alternative then the Network Interface block would be a little bit more complex to solve the interleaved aspect. PayloadDbody ID-tag Header ID-tag PayloadDbody ID-tag PayloadDbody ID-tag PayloadDbody ID-tag PayloadTail ID-tag Fig. 2.10: Alternative to adapt data form using 32 data bits 24 • The second alternative to adapt the data form is to keep the actual dimension and put the 16 bits in each XHiNoC flit. That means in every flit there are 7 bits of header, 16 bits of data and 16 extra for information that would be useful for the reception Network Interface block and facilitate its work. The Fig. 2.11 depicts this second alternative. PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info PayloadTail ID-tag Info PayloadDbody ID-tag Info PayloadDbody ID-tag Info Header ID-tag Fig. 2.11: Alternative to adapt data form using 16 data bits Regarding the interleaved, there are some points to consider: 1. All flits which belong the same packet could be interleaved with others flits belong different packet that comes from another source. 2. At time to send the packet to the PLASMA-IP is necessary to keep the correct order. 3. Could be the possibility that two different packets come from different source have the same ID-tag at the destination Network Interface buffer before delivered them to the PLASMA-IP. The Fig. 2.12 presents one case where all the source want transmit to router C local port. The data from router D is longer than A and B. The ID slot table present in the picture is from Router C local port. In the first vignette we can see how the packet D with identification 1 and packet A with identification 2 have been transmitted but the Network Interface block starts with packet D to 25 send to the PLASMA-IP. In the second vignette we can see how the packet A is transmitted and the identification is released. Finally, in the thirds vignette the packet B has been transmitted using the identification 2 again. Hence, there are two different packets, A and B inside of Network Interface buffer with the same identification. freefreefreeID-tag 1 2 3 4 1 1 0 0 A B DC D A freefreefreeID-tag 1 2 3 4 1 0 0 0 A B DC D freefreefreeID-tag 1 2 3 4 1 1 0 0 A B DC D B 12 3 Local Port Local Port Local Port PLASMA-IP D PLASMA-IP D PLASMA-IP D PLASMA-IP A PLASMA-IP B NoC NoC NoC Fig. 2.12: Conflict case where two different sources have the same ID-tag at the destination Basically we have opted for two alternatives to solve the interleaved problem. The first consist in implement a flow control protocol. So each source before start the transmission, send a request to the destination and until don’t received the acknowledge, they must wait (Fig. 2.13a). It doesn’t mean that the network link is reserved, only the destination. The Fig. 2.13b shows how effectively the link is not reserved. 32 3.2 Network Interface Sending Unit 3.2.1 Objective and specification This part is responsible for sending packages from the PLASMA-IP to XHiNoC. So the objective is received the information from the core, change the data form, adapt and send it though the new NoC. Also, it should control the XHiNoC flow control system. Before to start the design we must be considered the next points: - The XHiNoC duty cycle is 50%. That means after to send one flit, we must wait one cycle clock before send the next flit. - We cannot deliver one flit to the NoC if the signal flow control system is activated. On the other hand it must control the data flow for PLASMA-IP side. - Among the different types of XHiNoC flits, the RESP has priority over others. - Due to the flow control protocol that we want to implement to solve the interleaved problem, firstly it must send the HEADER type and until it doesn’t received the permission from the destination, it cannot start to send the rest of the data. 3.2.2 Implementation The working meteorology of Sending Unit consists in following the states of the state machine for every packet. So there are 5 states: Header XHiNoC, Waiting permission, sending destination, sending 16 higher bits and sending 16 lower bits. The state machine starts in Header XHiNoC state and when it receives the first flit from PLASMA-IP, it sends the Header XHiNoC flit to NoC and goes to the next state that must wait for the permission. When it gets the permission from the destination, sends the DBody XHiNoC flits; first the destination, then the payload size and finally all the data. Exactly the same as HeMPS NoC works. Notice that the PLASMA-IP flit is 32 bits. Hence there are two states to send and adapt this flit in XHiNoC system; sending 16 higher bits and sending 16 lower bits. In the following point we present the ASM diagram of Sending Unit. Notice the 5 states and see how all the specification such as the 50% duty cycle, the RESP has priority over others or flow control system as well have been respected. 33 ASM Diagram : Network Interface unit sending Header XHiNoC Condition 1: New data ACTION 1 Yes Duty_50=’0' No Duty_50<=’1'; Tx_reg<=’0'; Yes Credit_i=’1'No No Condition 2: Is there any Response? Yes Condition 3: Is the new data stored? No ACTION 3 Yes Waiting Permission ACTION 4 Condition 4: Now is the new data coming? No Yes No Condition 1: New data ACTION 1 Yes No Duty_50=’0' Duty_50<=’1'; Tx_reg<=’0'; Yes Credit_i=’1' No Condition 2: Is there any Response? Yes Go_Ahead=’1' No Sending destination Go_Ahead<=’0'; No Condition 1: New data ACTION 1Yes No Duty_50=’0' Duty_50<=’1'; Tx_reg<=’0'; Yes Credit_i=’1' No Yes Yes No ACTION 2 Yes ACTION 2 Busy_control=’1' Destination_busy <= '0'; Yes rx_RESPON = '1' Go_ahead <= '1'; Yes No No LOOP 1 LOOP 2 Fig. 3.2: ASM diagram of NI Sending Unit (part 1) 34 ACTION 5 Sending 16 Higher bits Condition 1: New data ACTION 1Yes Duty_50=’0' No Duty_50<=’1'; Tx_reg<=’0'; Yes Credit_i=’1' No Condition 2: Is there any Response? Yes Condition 3: Is the new data stored? No ACTION 9ACTION 8 Condition 4: Now is the new data coming? No No Send Payload:size=1 Yes Send Payload:size=1 Yes ACTION 6ACTION 7 Sending 16 Lower bits Duty_50=’0' Duty_50<=’1'; Tx_reg<=’0'; No Credit_i=’1' No Yes Condition 2: Is there any Response? Yes Yes No CONDITION 5 ACTION 11ACTION 10 Yes ACTION 3 ACTION 2 No Fig. 3.3: ASM diagram of NI Sending Unit (part 2) 35 Notes of Network Interface unit sending ASM Diagram CONDITION 1: send_data = '1' and send_av_aux = '1' ( Send_data = ‘1’ means the PLASMA-IP has a new data in the bus and send_av_aux = ‘1’ means the Network Interface is waiting a new data) CONDITION 2: write_punter /= read_punter and Destination_busy = '0' (write_punter/=read_punter means there are some source which want transmit and Destination_busy=’0' means that now the reception block is free) CONDITION 3: send_av_aux='0' (that means the next data is stored in payload_high_lowbuffer) CONDITION 4: send_data = '1' (That means the new Data is just coming in this clock edge) CONDITION 5: payload_size ='0' (If it is the last flit , then go to start again the loop ) ACTION 1: Disenable the signal send_av_auxand store the new data in a buffer called payload_high_low. ACTION 2: Destination_busy <= '1'; => Now the reception block is busy. Make the RESPONSE data form with the XHiNoC type, ”1111" ID, the destination and other information and enable the transmission . Also increase the punter of waiting source table. ACTION 3: Make the HEADER data form of the XHiNoC with Header flit type, “0000” ID, the router address, the destination and extension information. Also enable the transmission, change to the next state (Waiting_PERMISSION) and enable the next new data from PLASMA-IP. All the information using to make the XHiNoC data form is stored in payload_high_low buffer Because the data has been stored before.. ACTION 4: Do exactly the same of ACTION 3 but now the information is in the Data_write bus. ACTION 5: Here it makes the second XHiNoC flit that consist to send the destination , so it is a DBODY type with “ 0000” ID, the router address, the order of this flit and the last 16 bits are for the destination information . Also enable the transmission and the Signal Send_payload. This signal helps us to know that the next flit should be the payload size . Finally change the state . ACTION 6: Here it sends the payload size using a DBODY XHiNoC type and then disenable the signal Send_payload. All the information is stored in payload_high_low buffer Because the data has been stored before.. Keep the same state to send the first 32 data bits. Also it stores the payload size in the payload_size buffer. ACTION 7: Exactly the same of ACTION 6 but now reading from directly the data_write bus. Keep the same state to send the first 32 data bits. ACTION 8: The same of ACTION 3 but using DBODY flit type and sending the 16 higher bits of 32 bits from PLASMA-IP. Jump to the next state and decrement the payload_size buffer. ACTION 9: The same of ACTION 4 but using DBODY flit tipe and sending the 16 higher bits of 32 bits from PLASMA-IP. Jump to the next state and decrement the payload_size buffer. ACTION 10: Here it sends the Tail flit type and the 16 lower bits of 32 bits from PLASMA-IP and go back to the initial state .So Header XHiNoC. ACTION 11: The same of ACTION 9 but sending the 16 lower bits of 32 bits from PLASMA-IP and go back to SENDING 16 HIGH BITS state . LOOP 1: This is a loop that every clock edge is checking if the destination is free or not. If it is free, then allows sending Unit makes a RESPONSE flit for the next source that want transmit. LOOP 2: This loop is checking every clock edge and control when the destination gives the permission to start the transmission. Fig. 3.4: ASM diagram of NI Sending Unit (part 3) 3.2.3 Simulation The first simulation aims to show how Sending Unit works (Fig. 3.5). The idea is to send one packets to one destination and see how the system follow the ASM diagram shown in Fig. 3.2 and respect the 50% duty cycle or flow control system as well. The second simulation represents what could be the destination of the first simulation (Fig. 3.6). While the destination is working to send a packet to another core it can receive the request to receive another packet. Concretely represent the point 3 of the Fig. 3.5. 36 1 2 3 74 5 6 Fig. 3.5: Sending Unit Simulation 1 The simulation starts at point 1 where the NI is waiting for the PLASMA-IP (trans_state = Header_XHiNoC, send_av = 1). When the first flit arrives, point 2, automatically NI sends the Header XHiNoC flit (point 3) and jump to the next state (trans_state = Waiting_permission). While NI is waiting for the answer of the destination, keeps send_av = 1 because it is ready to receive the next flit from the PLASMA-IP (Payload_size) which arrives at point 4, then the NI goes down the send_av signal. Is at point 5 when the Sending Unit receives the authorization to continuous the transmission and at point 6 it sends, first, the destination and second, the payload size. At the same time it asked to PLASMA-IP for the next 32 bits. Afterwards the state machine is commuted between Sending 16 higher bits and Sending 16 lower bits to send the rest of the data as long as the next data is available (marked in yellow). Remember that each PLASMA-IP flit is 32 bits. Notice that after receive a PLASMA-IP flit, NI goes down the send_av signal because it can’t asked the next one until the last is not sent. 37 2 3 1 4 Fig. 3.6: Sending Unit Simulation 2 In this simulation we can see how the Sending Unit is working. It is sending the 32 bits of the core in two times as indicated point 1. But suddenly at point 2 appears a reception request. The source is stored at waiting table. So the next step is to answer this request due to the destination is not receiving anything and it has priority. After answering (point 3) the destination continues working (point 4). Remember that: RESPONSE type = “111” = 7 and ID =”1111” = A DBODY type = “010” = 2 and the ID =”0000” = 0 because all ID in the origin have to start with 0. 38 3.3 Network Interface Receiving Unit 3.3.1 Objective and specification This part is responsible for receiving packages from the XHiNoC to PLASMA-IP. So the objective is received the information from the NoC, classify and process it depend on its type and also, it should control the XHiNoC flow control system. As in Sending Unit, there are some points to be considered before to start the design: - There are 4 different types of XHiNoC flits and each one should be classified for its back custom processing. - Only one source can be transmitting due to flow control protocol implemented to solve the interleaved, the rest have to wait their turn that should be according to the order of arrival. - When it received a RESPONSE flit, immediately it has to alert the Sending Unit. - The payload should be stored in a RAM memory until it is sent to the PLASMA-IP. - The PLASMA-IP expects a 32 bits data format. - Just when there are data to be transmitted, it should alert the PLASMA-IP. - It also should control the XHiNoC flow data control. 3.3.2 Implementation To explain this point we prefer to divide it in sub-blocks as shows the Fig. 3.1. At least we can explain it in more detail and everything will be clear and more understandable. We suggest start with the MUX block. The function of this block is classified the incoming data depend on the flit type (HEADER, RESPONSE or DBODY/TAIL) and decides the back processing. The Fig. 3.7 shows the ASM diagram of MUX, it is totally asynchronous, so it doesn’t depend on the clock edge. 39 ASM Diagram : MUX (Network interface unit receiving ) Flit Type= HEADER Rx_WAITING<=rx;Yes Flit Type = DBODY or TAIL No Flit Type= RESPONSE No Rx_RAM<=rx;Yes Rx_RESPON<=rx;Yes No Before to process the incoming data in Network interface receiving unit, there is a MUX block that select the process that corresponds depend on the flit type. -CASE 1: Store the destination in the WAITING _TABLE because the source wants transmit. - CASE2 : Store the data in the RAM memory. - CASE3 : This is the RESPONSE of the destination that allow the unit sending to start the data transition . CASE 1 CASE 2 CASE 3 Fig. 3.7: ASM diagram of MUX block The first case is when it received a Header XHiNoC flit. It means someone want transmit. So the idea is store the source in a buffer called Waitind_table and that is handled by Store the Header block. Then when the Send data to PLASMA-IP block is free, the Sending Unit sends the permission to the source that is store in the next position of this table. Fig. 3.8 shows the ASM diagram of Store the Header block. ASM Diagram of PROCESS CASE 1: Store the HEADER flit in the WAITIN G _TABLE INITIAL STATE CONDITION 1 ACTION 1 Yes No CONDITION 1: rx_WAITING = '1' (This process is only activated when the incoming data is a HEADER flit) ACTION 1: Store the Data or the source in the Waiting_table and increase the number of the sources which want transmit (write_punter). Fig. 3.8: ASM diagram of Store the Header block 40 The second case is when it receives a DBODY or a TAIL flit, so this information must be store in the RAM. This is the job of the Store the DBody/Tail block. It also controls the state of the RAM and decides when the flow control system has to activated. So when the RAM is full it actives the tem_espaco signal that is the same as credit_o. Fig. 3.9 shows the ASM diagram of Store the DBody/Tail block. ASM Diagram of PROCESS CASE 2: Store the Ddody /Tail in the RAM memory INITIAL STATE CONDITION 1 CONDITION 1: rx_RAM = '1' and tem_espaco = '1' (rx_RAM=’1' means there is a DBODY or TAIL flit and tem_espaco=’1' means there is still space in the memory RAM) CONDITION 2: first /= last(Address_var downto 1) + 1 (first is the punter to write the data in the RAM and last is the punter to read. When this condition is true means the RAM is full and the XHiNoC flow control system is activated) ACTION 1: it increases the RAM write address. ACTION 2: tem_espaco <= '0'; RAM isn’t full. ACTION 3: tem_espaco <= '1'; RAM is full. ACTION 1 CONDITION 2 ACTION 3ACTION 2 Fig. 3.9: ASM diagram of Store the DDody or Tail block The depth of the RAM and the punter size as well is configured using one variable called Address_var. Also, we decided to make our own RAM for two reasons; the first is because you can change the depth easy using one variable (Address_var) and the second is because we preferred that the reading process was asynchronous, hence we don’t wait the clock cycles to have the data. For this design we decided to use two RAM memories. Its dimension is calculated by: 162 _  1 So each memory has 16 bits wide and a variable depth. When we want to store the data, we use the LSB (Least Significant Bit) of last (punter to write) to alternate the RAM enable. This bit is not connected to manage the internal address. We increase the last bus 1 by 1. 41 In the other side, when we want to read, directly read 32 by 32 bits. Fig. 3.10 shows the memory connections. RAM 16*2^Address_var Clock Reset WR_Enable Addr_out[X:0] D_out[15:0] Addr_in[X:0] D_in[15:0] Data_read[15:0] first[X:0] last[X+1:1] Data_in[15:0] last[0]*rx_RAM Reset Clock RAM 16*2^Address_var Clock Reset WR_Enable Addr_out[X:0] D_out[15:0] Addr_in[X:0] D_in[15:0] Data_read[31:16] first[X:0] last[X+1:1] Data_in[15:0] Not(last[0])*rx_RAM Reset Clock Fig. 3.10: RAM connections The third case is when it receives a RESPONSE flit, but it is directly connected with LOOP 2 that appear in Fig. 3.2. It allows to start sending the data. Another block that belongs in Receiving Unit is Sending data to PLASMA-IP. This block has the function of taking the data from the RAM and sends to the core when he asks for it. When it detects the last flit using the Payload signal, automatically that is transferred to LOOP 1 seen in Fig. 3.2. That means it is ready to start the next transmission. Loop 3 is responsible for warning the core when there are data. Fig. 3.11 shows the ASM diagram of Sending data to PLASMA-IP block. Sending data to PLASMA-IP block has three states; S0, S1, S2. S0 is the initial state and jump to S1 when the transmission starts. The state S1 is basically to store the payload size which one is decreased while the machine is running in S2 state. When payload size is 0 means the packet is finished and return to S0. 48 Also we can see how affectively the latency of XHiNoC is more than double the HeMPS. Anyway XHiNoC has some features that haven’t been demonstrated until now. This is the aim of the following point. Fig. 4.3a shows the structure that has made and Fig. 4.3b the specific scenery that has simulated. Router 1 Router 2 Router 3 Router 4 MASTER TASK C TASK D TASK A TASK B (a) Router 1 Router 2 Router 3 Router 4 MASTER TASK C TASK D TASK A TASK B (b) Fig. 4.3: Specific scenery that has made and simulated With this scenery and with the follow simulation we can see how XHiNoC can transmit simultaneously both transmissions due to it doesn’t reserve the network link end to end while HeMPS cannot. HeMPS sends one packet and when it finishes then sends the second. The two sceneries are shown in the Fig. 4.4. 49 (b) Fig. 4.4: Simulation of scenery of Fig. 4.3 (a) 50 Just to end this latency section, do a simple comparison between the number of flits of different packets and the time that each system spend to transmit it. Through the graph we can observe how for small packets the time that XHiNoC spends for every flit is more than double the time that HeMPS spends. But as the packets are bigger these times are balancing. Of course these results are directly conditioned by the RAM dimensions. If we increased the HeMPS RAM the difference between the two systems would be bigger. Number of flits HeMPS latency (ns) XHiNoC latency (ns) HeMPS: Flit/ns XHiNoC: Flit/ns 6 180 440 30 73.3 12 290 680 24.16 56.6 408 7180 8950 17.59 24.14 738 11400 15730 15.44 21.31 882 10800 18320 12.24 20.77 0 10 20 30 40 50 60 70 80 0 200 400 600 800 flit/ns number of the flits HeMPS XHiNoC 51 4.2 Execution time The execution time or CPU time of a given task is defined as the time spent by the system executing that task, including the time spent executing run-time or system services on its behalf. There are a lot of factors that influence the execution time such as the application, implementation defined, the tasks distribution and the multi-tasking as well. To check the execution time we have done an experiment which consists in choosing an application, for instants Communication application. Communication is divided in 4 tasks: A, B, C and D. Some task like A or B needs to communication with C before to finish its work. That means the communication is not only master-slave or slave-master but also there are small communication slave-slave. This experiment involves changed the place the various tasks using a 2x3 mesh NoC topology and evaluated the execution time. We can see the result below. The last case is an exception that has made to corroborate the conclusion of this section.   1130115   1151465 "#$%&'(    1091005   1112515 "#%#&'( 52   1082905   1112515 "+,#&'(   1148735   1168335 #+,&&'(    1311555   1354195 ."&"&'(   1145755   1164925 #+#/&'( 53 Making a look at previous results, quickly we can see that always HeMPS is faster than XHiNoC. It is not something new because it could theoretically predict as well as with latency results. However it is interesting to see how, in cases when all the tasks are in the same column, the execution time is smaller than when the tasks are divided into two columns. That is because there is only one way where all the communications must use. In this case XHiNoC is better. Except on the case that there are more than 2 tasks in one core where it isn’t able to work parallel and then the execution time increases. 54 Chapter 5 Conclusion The main purpose of this work has been to study two Networks-on-chip and understand the working each, focus on the advantages and disadvantages. From this point began the design chapter that consisted of replacing the HeMPS NoC by XHiNoC and adapt it. It allow us, first, commissioning XHiNoC within an evaluate platform for MPSoC and second, do a comparison between the two intercommunication systems. Obviously, the decisions taken during the design chapter have affected directly the results and therefore also in the conclusions. It is true that, theoretically, XHiNoC provides some features which make it better for application that require high bandwidth, as long as the interleaved problem could be solved. Thus it allows us do simultaneous transmissions from different sources to the same destination, either using the same network link or different. Of course our adopted solution solves the interleaved problem but maybe not the best form to increase the NoC performance. Because it doesn’t allow that different sources can transmit simultaneously to the same receiver but allows they can use the same link. The new system need to request permission and wait for the acknowledge to start the communication. In addition XHiNoC duty cycle is 50%. All this makes that the latency and the execution time as well are bigger than the original network on chip of HeMPS as seen in chapter 4. Seen the characteristics that XHiNoC gives in opposition of HeMPS and the range of applications that HeMPS evaluation platform contains, I dare say that it hasn’t been the best way to evaluate the functioning of the new NoC because of the few application which were available, the communication of almost all tasks were between Master-Slave or Slave- Master. This means we cannot see the XHiNoC advantages. As we can see in the last part of measures, the system is more efficient when there are simultaneous transmissions. 55 Anyway is inevitable to use more FPGA resources when you want adapt the XHiNoC. In our case affects the increase of RAM but any case, the fact to solve the interleaved involve a complex processing system. Another experiment that has done but it haven’t mentioned previously is to packet in one flit 32 bits of data instead of 16. Remember that in our design we left 16 bits for extra information that so far have been wasted. So the conclusion is not because the transmission is faster the core read before. That means the time between you alert the core that there are data to read and the core starts to read is exactly the same. So, we improve on latency but lose on FPGA resource because the RAM memory should be double to avoid the locked situation. To conclude this thesis, I would like to discuss some directions for future works. As we seen, our solution is not the most optimal or appropriate for the computational time. So, one way to improve the performance would be solving the interleaved problem in a way more efficient. Although the resource used are bigger. We could see also, we were limited to the HeMPS platform and its applications because the measures have been done using an old HeMPS version. Therefore, it would be better commissioning the update version of HeMPS. I am sure it incorporates more and complex applications which require a great bandwidth and a great processing capacity. 56 Bibliography [1] D. GEER. “Networks on Processors Improve On-Chip Communications”. Computer, 42(3):17–20, March 2009. [2] A. JANTSCH and H. TENHUNEN. Networks on Chip. Kluwer Academic Publishers, 2003. [3] Faizal Arya Samman. “Microarchitecture and Implementation of Networks-on-Chip with a Flexible Concept for Communication Media Sharing”. 2010. [4] Cezar R. W. Reinbrecht, Gerson Scartezzini, Thiago R. da Rosa, Fernando G. Moraes. “HeMPS Station: an environment to evaluate distributed applications in NoC-based MPSoCs”. In: Pontifícia Universidade Católica do Rio Grande do Sul, 2009. [5] Benini, L.; De Micheli, G. “Networks On Chip: A New SoC Paradigm”. Computer, v. 35(1), 2002, pp. 70-78. [6] PLASMA Processor. Captured on July 2006 at http://www.opencores.org/projects.cgi/web/mips/overview. [7] Moraes, F.; Calazans, N.; Mello, A.; Mello, A.; Moller, L.; Ost, L. “HERMES: an Infrastructure for Low Area Overhead Packet-switching Networks on Chip”. Integration the VLSI Journal, Amsterdam, v. 38(1), 2004, p. 69-93. [8] Raquel, C. “Alocação de tarefas e comunicação entre tarefas en MPSoCs”. Porto Alegre. Março 2007. [9] C. J. GLASS and L. M. NI. “The Turn Model for Adaptive Routing”. In Proc. The 19th Int’l Symposium on Computer Architecture, pages 278–287, 1992. [10] Eduardo Weber Wächter, Adelcio Biazi, Fernando G. Moraes. “HeMPS-S: A Homogeneous NoC-Based MPSoCs Framework Prototyped in FPGAs”. In: RECOSOC, 2011. [11] Moraes, F.; Calazans, N.; Mello, A.; Möller, L.; Ost, L. “HERMES: an Infrastructure for Low Area Overhead Packet-switching Networks on Chip”. Integration the VLSI Journal, v.38 (1), 2004, pp. 69-93. 57 [12] Carara, E.; Oliveira, R.; Calazans, N.; Moraes, F. “HeMPS - A Framework for NoC-Based MPSoC Generation”. In: ISCAS, 2009, pp. 1345-1348. [13] GAPH Projects. https://corfu.pucrs.br/redmine/projects/hemps/wiki.