The present invention generally relates to a data processing method and system, and more specifically to a bus bridge from Processor Local Bus (PLB) of a System-on-a-chip (SoC) to Advanced Extensible Interface (AXI) and an associated mapping.
As the rapid development of the semiconductor process technology, System-on-a-chip (SoC) has increasingly become a mainstream development trend in the integrated circuit design. SoC refers to a technology in which a complete system is integrated on a single chip and all or partial necessary electronic circuits are packaged thereon. The so-called complete system generally includes a Central Processing Unit (CPU), a memory, a peripheral circuit and so on. SoC can provide an enhanced clock frequency, thereby reducing the power consumption of the chip. SoC is often used in miniature and increasingly complicated consumer electronic equipments. For example, a SoC of sound detection equipment provides, on a single chip, devices such as an audio receiver, analog-to-digital converter (ADC), microprocessor, necessary memories, and input/output logics.
SoC chip needs to integrate a complicated system and thus has a more complicated structure. Obviously, considerable human power and material resources will be spent if the chip design is completed from the beginning. Moreover, nowadays, the lifespan of electronic products are increasingly reduced, which requires the chip design to be completed in a shorter period. In order to accelerate the speed of SoC chip design, integrated circuit designers invoke in the SoC chip design existing IC circuits in the form of modules, to thereby simplify the chip design, shorten the design period and improve the design efficiency. IC modules that can be reused are called IP modules (or system macro cells, IP cores, chip cores, virtual devices, etc.). An IP module is a shortened form of an IC core with intellectual property, and has a function of integrating a group of circuit designs with intellectual property together to constitute basic units of the chip for use in building blocks in design. The IP module is designed in advance, is verified and has a certain determined function.
Processor Local Bus (PLB) and Advanced Extensible Interface (AXI) are popular communication architectures of the SoC, and interfaces of many IP modules are compatible with PLB or AXI. PLB bus is a high performance on-chip bus applied to a highly integrated Core+ASIC system and has a 64-bit address bus and a 128-bit data bus. PLB bus provides a standard interface between a processor core and an integrated bus controller, such that designers can develop a processor core library and a bus controller for the design of Core+ASIC and SoC system. PLB bus supports read/write data transmission between devices compatible with PLB bus interfaces.
AXI is a bus protocol which is a most important part of Advanced Microcontroller Bus Architecture (AMBA) 3.0 protocol proposed by ARM Corporation, and is a high performance, high bandwidth and low delay on-chip bus. The address/control and data transmission phases of AXI are separated from each other and use byte strobe to support unaligned data transmission, required for providing the first address for burst transmission. Separate read/write data channels of the AXI bus effectively support low-cost direct memory access operations, enable simultaneous emission of a plurality of addresses, support out-of-order transmission, and can add registers to provide timing convergence.
In order to seamlessly integrate different IP modules, the application is required to introduce the concept of bus bridge. Bus bridge enables IP modules supporting different buses to communicate with each other.
This summary is not intended as a comprehensive description of the claimed subject matter but, rather, is intended to provide a brief overview of some of the functionality associated therewith. Other systems, methods, functionality, features and advantages of the claimed subject matter will be or will become apparent to one with skill in the art upon examination of the following figures and detailed description.
The above and other objects, features and advantages of the invention become more apparent through the more detailed descriptions of the exemplary embodiments of the invention in the drawings, wherein the same reference signs generally represent the same components in the exemplary embodiments of the invention.
In order to integrate the IP modules supported by PLB and AXI, the application requires a PLB to AXI bus bridge and a mapping method thereof. According to one aspect of the invention, a method of processing a read/write request conforming to a PLB bus protocol is disclosed, the method comprising the steps of: receiving the read/write request conforming to the PLB bus protocol without waiting for an acknowledgement of successful execution of a previous read/write request conforming to the PLB bus protocol; buffering the read/write request conforming to the PLB bus protocol; mapping the buffered read/write request conforming to the PLB bus protocol to a read/write request conforming to a AXI bus protocol; and outputting the mapped read/write request conforming to the AXI bus protocol.
According to another aspect of the invention, a bus bridge between a PLB bus and an AXI bus is disclosed, the bus bridge comprising: a PLB device interface module arranged to receive a read/write request conforming to a PLB bus protocol without waiting for an acknowledgement of successful execution of a previous read/write request conforming to the PLB bus protocol; a buffer arranged to buffer the read/write request conforming to the PLB bus protocol; a mapping module arranged to map the buffered read/write request conforming to the PLB bus protocol to a read/write request conforming to an AXI bus protocol; and an AXI device interface module arranged to output the mapped read/write request conforming to the AXI bus protocol.
The processing method and the bus bridge enable the IP modules which conform to the PLB bus protocol and the AXI bus protocol to communicate with each other, perform transaction mapping during communication, guarantee that all transactions are performed in an order desired by the PLB devices, and improve communication efficiency of the SoC.
Preferred embodiments of the invention will be described in detail by referencing to the drawings where preferred embodiments of the invention are shown. However, the invention can be carried out in various forms and shall not be understood as being restricted by the embodiments set forth here. On the contrary, the embodiments are provided here for making the invention more thorough and comprehensive and conveying the scope of the invention completely to those skilled in the art.
The bus bridge of the invention can be used to transmit a read/write request of a PLB device to an AXI device, such that IP modules compatible with the PLB and IP modules compatible with the AXI on the SoC are integrated seamlessly.
PLB bus 102 only supports in order transfer, and AXI bus 104 supports both in order transfer and out-of-order transfer. For this reason, when the read/write request issued by PLB device 101 goes to AXI device 105 through bus bridge 103, bus bridge 103 can be either in order transfer or out-of-order transfer.
In mapping module 203, with respect to the PLB write request, the bus bridge from PLB bus to AXI bus firstly converts the control signals (e.g., signals representing the type and size of the transmission) of the PLB write request into AXI write transfer control signals and sends them to an AXI write address channel together with the received PLB write addresses; sends write data coming form the PLB bus to an AXI write data channel; and converts signals from an AXI write response channel to control signals conforming to the PLB protocol and transfers them to a PLB related device through the PLB bus. With respect to the PLB read request, mapping module 203 of the bus bridge from PLB bus to AXI bus firstly converts the control signals (e.g., signals representing the type and size of the transmission) of the PLB read request into AXI read transfer control signals and sends them through an AXI read address channel together with the received PLB read addresses; after receiving read data and read response from an AXI read data channel, the bus bridge from PLB bus to AXI bus is responsible for converting the read data and read responses into read data and signals conforming to the PLB protocol according to the requirements of the PLB protocol, and transfers them to the PLB related device through the PLB bus. The bus bridge from PLB bus to AXI bus using the buffered write may result in read/write collisions, that is, a read/write collision occurs if an uncompleted write operation is carried out at an address to be read by the read request, and the execution of the read operation that collides with the write operation shall be paused.
In one embodiment, buffer 202 buffers the received read/write request using a FIFO memory. Specifically, buffer 202 may comprise a Write Request FIFO memory (WR FIFO) and a Read Request FIFO memory (RR FIFO). In addition, with regard to the data operation, buffer 202 preferably further comprises a Write Data FIFO memory (WD FIFO) and a Read Data FIFO memory (RD FIFO). Preferably, the PLB to AXI bus bridge further comprises a buffer controller arranged to control data buffering of buffer 202, and one of the functions of the buffer controller is: judging whether buffer 202 is full or not; if the buffer is full, waiting until buffer 202 has free spaces to buffer the read/write request; and if buffer 202 isn't full, buffering the received read/write request by buffer 202. The buffer controller can control the WR FIFO memory, the RR FIFO memory, or even the WD FIFO memory and the RD FIFO memory. Specifically, if a write request is received, the buffer controller judges whether the WR FIFO memory is full or not; if it is full, the buffer controller waits until the WR FIFO memory has free spaces to perform the buffering operation; if write data is received, the buffer controller judges whether the space of the WD FIFO memory is full or not, and needs waiting if it is full. In practice, the write request and the write data get ready simultaneously, and the write data is received as soon as the acknowledgement of successful execution of the write request is received. In addition, the WD FIFO memory may have a space large enough so as to support a maximum PLB write burst transfer. All PLB write transactions are processed as buffered write, that is, if the WD FIFO memory of the PLB to AXI bus bridge has free spaces, the acknowledgement of the write data can be returned back to the PLB device directly, thus the write data can be received immediately. If what is received is a read request, it is judged that whether the RR FIFO memory is full or not, and waiting is needed if it is full; otherwise, the buffer can buffer the read request.
In one embodiment, PLB to AXI bus bridge 200 further comprises a decider, a write address register file (WARF) and a write address controller. The decider is arranged to judge whether the received read/write request conforming to the PLB bus protocol is a write request or a read request. If the received read/write request conforming to the PLB bus protocol is a write request, the WARF stores a start address and an end address of the write request. The storing of the start address and the end address of the write request by the WARF and the buffering of the read/write request conforming to the PLB bus protocol by the buffer can be done simultaneously or successively. The writing of the start address and the end address is obtained on the basis of the type and size of the transmission of the write request and can be saved as an item in the WARF. Each item has a label for indicating whether the item is valid or not currently. The write address controller can be used to control the label of the item to indicate whether it is valid or not. The write address controller updates the label of the corresponding item when the acknowledgement of successful execution of the AXI write returns, to indicate that the corresponding write start address and end address are invalid; In another embodiment, the write start address and end address in the WARF may not be labeled either, and only the valid write start address and end address are held in the WARF, and the stored start address and end address of the write request are deleted if an acknowledgement of successful execution of the write request is received. The above can be used in the AXI device of in order transfer.
For the AXI device of out-of-order transfer, if the received read/write request conforming to the PLB bus protocol is a write request, PLB to AXI bus bridge 200 can label that write request, and store the label of the write request together with the start address and end address of the valid write request at the WARF; and the write request conforming to the AXI bus protocol to be outputted contains the label of that write request.
The main purpose of the valid write start address and end address stored in WARF is to prevent read operation from colliding. Since the write request and the read request both are buffered by the buffer in the operations of the bus bridge, if the execution of the previous write operation isn't completed and the subsequent read operation has been performed, a collision may occur and this causes incorrect readout data. When the PLB read request arrives, PLB to AXI 200 bus bridge makes a collision detection by comparing the read address with all valid items in the WARF. Therefore, in one embodiment, PLB to AXI bus bridge 200 further comprises a collision detector which obtains the start address and end address of the read request if the decider judges that the received read/write request conforming to the PLB bus protocol is a read request; and judges whether or not the start address and end address of the read request is within the scope of the stored start address and end address of the valid write request; if it is, then waits until the start address and end address of the read request isn't within the scope of the stored start address and end address of the valid write request. In this way, the read operation which collides with the valid write operation waits until the colliding write operation is finished, and then the read operation is executed, thus the read/write collision is resolved.
After a collision is resolved or if it is judged that no collision exists, mapping module 203 maps the buffered read request conforming to the PLB bus protocol to a read request conforming to the AXI bus protocol. AXI device interface module 204 outputs the mapped read/write request conforming to the AXI bus protocol. AXI device interface module 204 outputs the mapped read/write request conforming to the AXI bus protocol to the AXI devices through the AXI bus protocol. The AXI device will return an acknowledgement after it completes the read/write operation. For a read operation, the AXI bus will put the readout data in a data channel, buffer it to the RD FIFO memory through the data channel of AXI device interface module 204, and transfer it to the PLB bus through the data channel of PLB device interface module 201; and an acknowledgement information of successful execution of the reading is also transferred to the PLB device through a signal channel of the same path. In addition, a signal indicative of successful execution of the write request is also transferred to the PLB device through the signal channel of the path.
In one embodiment, the AXI device interface module of the PLB to AXI bus bridge receives from the AXI device an acknowledgement of successful execution of the valid write request, so it can update the start address and end address of the valid write request stored in the WARF to be invalid according to the label of the write request. In this way, a quick update is allowed and a probability of the occurrence of read/write collisions is lower; moreover, since the PLB device interface module outputs the acknowledgement of successful execution of the successfully executed write request according to the label of the write request, thus the out-of-order transfer of the AXE device can be restored to the in order transfer required by the PLB device in the bus bridge.
Under the same inventive concept, the invention further discloses a method of processing a read/write request conforming to the PLB bus protocol.
The method according to
In other embodiments of the invention, if the received read/write request conforming to the PLB bus protocol is a write request, the method further comprises: labeling the write request; storing the label of the write request together with the start address and end address of the valid write request; wherein the outputted write request conforming to the AXI bus protocol contains the label of the write request. Thus, if an acknowledgement of successful execution of the valid write request is received, the acknowledgement contains the label of the write request, and the stored start address and end address of the valid write request can be updated to be invalid according to the label of the write request, so the speed of updating is accelerated and read/write collisions can be avoided more effectively. Then the acknowledgement of successful execution of the successfully executed write request is outputted according to the label of the write request, and the out-of-order transfer of the AXI device can be restored to the in order transfer required by the PLB device.
If in the block 501, it is judged that the received read/write request conforming to the PLB bus protocol is a read request, firstly in block 514, it is judged whether the RR FIFO memory to buffer the read request conforming to the PLB bus protocol is full or not, wherein the RR FIFO is used to buffer the read address and control signal of the read request; if it is full, waiting until the memory has free spaces to buffer the read request. If it isn't full, then in block 515, buffering the read request conforming to the PLB bus protocol, and in block 516, gaining the read address of the read request, and executing collision detection in block 517, i.e. judging whether the start address and end address of the read request is within the scope of the stored start address and end address of the valid write request or not; At block 518, judging a result of the collision detection. If there is a collision, waiting and judging repeatedly until the start address and end address of the read request aren't within the scope of the stored start address and end address of the valid write request. If there is not a collision, then in block 519, mapping the buffered read request conforming to the PLB bus protocol to a read request conforming to the AXI bus; then in block 520, outputting the mapped read request conforming to the AXI bus. The read request conforming to the AXI bus is outputted to the AXI device and then is executed; when an acknowledgement of successful execution of the read request from the AXI bus and the outputted data are received in block 521, because the read request received in the step from the AXI bus protocol is possibly not the same with the read request issued in the block 520 and it may be an acknowledgement of successful execution of the previous read request, the block 521 isn't linked to the block 520. In block 522, buffering the read-out data; and then in block 523, outputting the read-out data and the acknowledgement of successful execution of the read request.
Although the exemplary embodiments of the invention are described herein with reference to the drawings, it should be understood that the invention is not limited to these precise embodiments, and various variations and modifications can be made to the embodiments by those skilled in the art without departing from the scope and spirit of the invention. All these variations and modifications are intended to be contained in the scope of the invention defined in appended claims.
Those skilled in the art could know from the above description that, the invention can be embodied as devices, methods or computer program products. Therefore, the invent can be implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode etc.), or a combination of software parts and hardware parts generally called “circuit”, “module” or “system” in this text. Moreover, the invention can also adopt the form of computer program products embodied in any tangible medium of expression, the medium comprising computer usable program codes.
Any combinations of one or more computer usable or computer readable medium can be used. The computer usable or computer readable medium may be but not limited to, for example, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, appliances or propagation medium. Specific examples of the computer readable medium (a non-exhaustive list) comprise: electrical connection with one or more conductors, portable computer disk, hard disk, Random-Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read-Only Memory (EPROM or flash memory), optical fiber, portable Compact-Disk Read-Only-Memory (CD-ROM), optical memory device, transmission medium supporting such as Internet or intranet, or magnetic memory device. Note that the computer usable or computer readable medium even can be papers or other suitable medium on which programs are printed, this is because the programs can be obtained electronically by electrically scanning the papers or other medium, and then be compiled, interpreted or processed in an appropriate way, and be stored in a computer memory if necessary. In the context of this document, the computer usable or computer readable medium may be any medium which contains, stores, conveys, propagates or transmits programs which are to be used by an instruction executing system, device or appliance or are associated with the instruction executing system, device or appliance. The computer usable medium may include data signals which are contained in the baseband or propagated as a part of the carrier wave and are embodied as computer usable program codes. The computer usable program codes may be transmitted with any suitable medium including but not limited to radio, electrical wire, optical cable, RF and etc.
The computer program codes for executing the operation of the invention can be written with any combination of one or more programming languages, the programming languages including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as “C” programming languages and similar programming languages. The program codes can be completely run on the user's computer, partly run on the user's computer, run as an independent software package, partly run on the user's computer and partly run on a remote computer, or completely run on a remote computer or server. In the last case, the remote computer can be connected to the user's computer through any kind of network including Local Area Network (LAN) or Wide Area Network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet Service Provider).
Furthermore, each block in the flow charts and/or block diagrams of the invention and combinations of the blocks in the flow charts and/or block diagrams can be implemented using computer program instructions. These computer program instructions can be provided to processors of a general purpose computer, a special purpose computer or other programmable data processing devices so as to produce a machine which produces means for realizing the functions/operations specified in the blocks of the flow charts and/or block diagrams, through the instructions executed by the computer or the other programmable data processing devices.
The computer program instructions can be stored in a computer readable medium which can instruct the computer or other programmable data processing devices to operate in a specific manner, thus the instructions stored in the computer readable medium produce a product comprising instruction means for realizing the functions/operations specified in the blocks of the flow charts and/or block diagrams.
The computer program instructions can also be loaded into the computer or other programmable data processing devices, thus a series of operation steps are executed on the computer or other programmable data processing devices, so as to produce a computer-implemented process, thereby the instructions executed on the computer or other programmable devices provide a process of realizing the functions/operations specified in the blocks of the flow charts and/or block diagrams.
Number | Date | Country | Kind |
---|---|---|---|
200910171388.0 | Aug 2009 | CN | national |