CN106980595B - Multiprocessor communication system and communication method for sharing physical memory - Google Patents

Multiprocessor communication system and communication method for sharing physical memory Download PDF

Info

Publication number
CN106980595B
CN106980595B CN201710207715.8A CN201710207715A CN106980595B CN 106980595 B CN106980595 B CN 106980595B CN 201710207715 A CN201710207715 A CN 201710207715A CN 106980595 B CN106980595 B CN 106980595B
Authority
CN
China
Prior art keywords
data
processor
physical memory
processors
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710207715.8A
Other languages
Chinese (zh)
Other versions
CN106980595A (en
Inventor
唐红飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Semiconductor China R&D Co Ltd
Samsung Electronics Co Ltd
Original Assignee
Samsung Semiconductor China R&D Co Ltd
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Semiconductor China R&D Co Ltd, Samsung Electronics Co Ltd filed Critical Samsung Semiconductor China R&D Co Ltd
Priority to CN201710207715.8A priority Critical patent/CN106980595B/en
Publication of CN106980595A publication Critical patent/CN106980595A/en
Application granted granted Critical
Publication of CN106980595B publication Critical patent/CN106980595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Multi Processors (AREA)
  • Mathematical Physics (AREA)

Abstract

提供一种共享物理内存的多处理器通信系统及其通信方法,所述多处理器通信系统包括:多个处理器,其中,所述多个处理器互相发送和接收数据;物理内存,被划分为多个物理内存块,使得每个处理器具有一专用物理内存块;其中,所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块,并且,所述接收处理器从它的专用物理内存块读取所述数据。根据所述多处理器通信系统及其通信方法,多个处理器互相传递数据时,可减少内存空间的占用,提高内存的使用效率,从而提高数据的传输速度。

A multiprocessor communication system and a communication method thereof for sharing physical memory are provided, the multiprocessor communication system includes: a plurality of processors, wherein the plurality of processors send and receive data with each other; the physical memory is divided into be a plurality of physical memory blocks, so that each processor has a dedicated physical memory block; wherein, the sending processor of the plurality of processors that will send data sends data to the one of the plurality of processors that will receive data The receiving processor's dedicated physical memory block, and the receiving processor reads the data from its dedicated physical memory block. According to the multi-processor communication system and the communication method thereof, when multiple processors transmit data to each other, the occupation of memory space can be reduced, the use efficiency of memory can be improved, and the transmission speed of data can be increased.

Description

共享物理内存的多处理器通信系统及其通信方法Multiprocessor communication system and communication method for sharing physical memory

本申请是向中国知识产权局提交的申请日为2014年12月05日、申请号为201410734202.9、发明名称为“共享物理内存的多处理器通信系统及其通信方法”的申请的分案申请。This application is a divisional application of the application submitted to the China Intellectual Property Office with the application date of December 5, 2014, the application number 201410734202.9, and the invention title "Multiprocessor Communication System and Communication Method for Shared Physical Memory".

技术领域technical field

本发明总体说来涉及多处理器通信系统的设计。更具体地讲,涉及一种通过共享物理内存来实现多处理器间通信的通信系统及其通信方法。The present invention relates generally to the design of multiprocessor communication systems. More specifically, it relates to a communication system and a communication method for realizing communication between multiprocessors by sharing physical memory.

背景技术Background technique

在现有的多处理器通信系统中,多处理器间通过串行通信接口(例如,UART、USB、SPI等)进行数据通信,利用串行通信接口进行通信时外围电路复杂,传输速度缓慢,难以在多处理器间实现数据量大的通信或对速度要求高的通信。In the existing multiprocessor communication system, data communication is carried out between multiprocessors through serial communication interfaces (such as UART, USB, SPI, etc.), and the peripheral circuits are complex and the transmission speed is slow when using serial communication interfaces for communication. It is difficult to realize communication with a large amount of data or communication with high speed requirements between multiprocessors.

而在现有的共享物理内存的多处理器通信系统中,多处理器间进行数据通信时,不需要外围电路,存取速度快,实时性强。具体说来,在通过共享物理内存进行多处理器间通信的系统中,将物理内存划分为多个专用物理内存块,这样,每个处理器独占一个专用物理内存块以用于运行其专有的软件系统,此外,针对处理器间的数据通信,还会在物理内存中预留一个物理内存块,该物理内存块是全局内存共享区域,包括保存多处理器间通信数据的数据共享缓存区和用于保存并更新数据缓存区状态的状态共享缓存区。However, in the existing multi-processor communication system sharing physical memory, no peripheral circuit is required for data communication between multi-processors, and the access speed is fast and the real-time performance is strong. Specifically, in systems where multiprocessors communicate through shared physical memory, the physical memory is divided into dedicated blocks of physical memory so that each processor has a dedicated block of physical memory exclusively for running its own In addition, for inter-processor data communication, a physical memory block will be reserved in the physical memory, which is a global memory shared area, including a data shared cache area for storing multi-processor communication data Shared buffer with the state used to save and update the state of the data buffer.

通常,为了在现有的共享物理内存的多处理器通信系统进行通信,一般需要预留比较大的全局内存共享区域,而这部分内存空间需要根据特定的硬件系统进行构造(例如,产品的设计需求、处理器的实际数目、每个处理器的应用场景等)来制定相应的使用规划。这种方式存在几个明显的问题:Usually, in order to communicate in the existing multiprocessor communication system that shares physical memory, it is generally necessary to reserve a relatively large global memory shared area, and this part of memory space needs to be constructed according to a specific hardware system (for example, product design needs, the actual number of processors, the application scenarios of each processor, etc.) to formulate corresponding usage plans. There are several obvious problems with this approach:

第一、全局内存共享区域长期预留,比较浪费内存(全局内存共享区域一旦静态规划好,确定的数据共享缓存区和状态共享缓存区即无法被动态地释放或回收做其它用途);First, the global memory shared area is reserved for a long time, which is a waste of memory (once the global memory shared area is statically planned, the determined data shared buffer area and state shared buffer area cannot be dynamically released or recycled for other purposes);

第二、全局内存共享区域的使用规划不灵活(在因某些原因而要改变内存布局的情况下,需要计算并修改各个处理器上的软件系统中的参数,较为麻烦且容易出错);Second, the usage plan of the global memory shared area is inflexible (in the case of changing the memory layout for some reason, it is necessary to calculate and modify the parameters in the software system on each processor, which is troublesome and error-prone);

第三、多处理器间数据通信过程需要两次数据复制的操作(数据需要从发送处理器复制到全局内存共享区域,再从全局共享内存区域复制到接收处理器),效率不高。Third, the data communication process between multiprocessors requires two data copy operations (data needs to be copied from the sending processor to the global memory shared area, and then copied from the global shared memory area to the receiving processor), which is not efficient.

因此,在现有的通过共享物理内存在多处理器间进行通信的系统中传递数据时,物理内存的使用效率较低,数据传输的速度较慢。Therefore, when transferring data in an existing system that communicates among multiple processors by sharing physical memory, the usage efficiency of physical memory is low, and the speed of data transmission is relatively slow.

发明内容Contents of the invention

本发明的示例性实施例在于提供一种共享物理内存的多处理器通信系统及其通信方法,以解决现有多处理器通信系统中内存使用效率低、数据传输速度慢的问题。Exemplary embodiments of the present invention provide a multi-processor communication system and communication method for sharing physical memory, so as to solve the problems of low memory usage efficiency and slow data transmission speed in the existing multi-processor communication system.

根据本发明示例性实施例的一方面,提供一种共享物理内存的多处理器通信系统,包括:多个处理器,其中,所述多个处理器互相发送和接收数据;物理内存,被划分为多个物理内存块,使得每个处理器具有一专用物理内存块;其中,所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块,并且,所述接收处理器从它的专用物理内存块读取所述数据。According to an aspect of an exemplary embodiment of the present invention, there is provided a multiprocessor communication system sharing physical memory, including: a plurality of processors, wherein the plurality of processors send and receive data from each other; physical memory, divided into be a plurality of physical memory blocks, so that each processor has a dedicated physical memory block; wherein, the sending processor of the plurality of processors that will send data sends data to the one of the plurality of processors that will receive data The receiving processor's dedicated physical memory block, and the receiving processor reads the data from its dedicated physical memory block.

在所述系统中,发送处理器可请求接收处理器在它的专用物理内存块中分配用于缓存数据的临时数据缓存区,并且,接收处理器可响应于发送处理器的请求而分配临时数据缓存区。In the system, the sending processor may request the receiving processor to allocate a temporary data buffer for caching data in its dedicated physical memory block, and the receiving processor may allocate temporary data in response to the sending processor's request cache area.

在所述系统中,所述数据可以为突发数据,其中,用于缓存突发数据的临时数据缓存区可包括单个缓存区。In the system, the data may be burst data, wherein the temporary data buffer area for buffering the burst data may include a single buffer area.

在所述系统中,所述数据可以为流数据,其中,用于缓存流数据的临时数据缓存区可包括由多个分片组成的循环缓存区。In the system, the data may be streaming data, wherein the temporary data buffer for caching the streaming data may include a circular buffer composed of multiple slices.

所述系统可还包括:消息盒,暂存突发数据消息,其中,所述突发数据消息可包括指示突发数据传输事件的类型信息。The system may further include: a message box for temporarily storing burst data messages, wherein the burst data messages may include type information indicating burst data transmission events.

在所述系统中,所述突发数据传输事件可包括以下事件中的至少一项:请求分配临时数据缓存区、临时数据缓存区已分配、临时数据缓存区存有待读取数据、临时数据缓存区中的数据已被读取。In the system, the burst data transmission event may include at least one of the following events: a request for allocation of a temporary data buffer, allocation of a temporary data buffer, data to be read in a temporary data buffer, temporary data buffer Data in the zone has been read.

在所述系统中,当突发数据传输事件为请求分配临时数据缓存区时,所述突发数据消息可还包括关于请求分配临时数据缓存区的请求参数,其中,所述关于请求分配临时数据缓存区的请求参数包括请求的单个缓存区的大小以及应用标识、发送处理器和接收处理器的标识;当突发数据传输事件为临时数据缓存区已分配时,所述突发数据消息可还包括关于分配临时数据缓存区的分配参数,其中,所述关于分配临时数据缓存区的分配参数可包括实际分配的单个缓存区的大小和位置以及应用标识、发送处理器和接收处理器的标识;当突发传输事件为临时数据缓存区存有待读取数据时,所述突发数据消息可还包括关于临时数据缓存区存有待读取数据的参数,其中,所述关于临时数据缓存区存有待读取数据的参数可包括单个缓存区的地址、待读取数据的长度以及应用标识、发送处理器和接收处理器的标识;当突发传输事件为临时数据缓存区中的数据已被读取时,所述突发数据消息还包括关于临时数据缓存区中的数据已被读取的参数,其中,所述关于临时数据缓存区中的数据已被读取的参数可包括单个缓存区的地址以及应用标识、发送处理器和接收处理器的标识。In the system, when the burst data transmission event is a request to allocate a temporary data buffer, the burst data message may further include a request parameter about the request for the allocation of the temporary data buffer, wherein the request for the allocation of the temporary data The request parameters of the cache area include the size of the requested single cache area and the identification of the application, the sending processor and the receiving processor; when the burst data transmission event is that the temporary data buffer has been allocated, the burst data message can Including allocation parameters about allocating temporary data buffer areas, wherein the allocation parameters about allocating temporary data buffer areas may include the size and location of a single buffer area actually allocated and the identification of the application, the sending processor and the receiving processor; When the burst transmission event is that there is data to be read in the temporary data buffer, the burst data message may further include parameters about the data to be read in the temporary data buffer, wherein, the data to be read in the temporary data buffer The parameters for reading data may include the address of a single buffer area, the length of the data to be read, and the application identification, identification of the sending processor and the receiving processor; when the sudden transmission event is that the data in the temporary data buffer area has been read When , the burst data message also includes a parameter that the data in the temporary data buffer has been read, wherein the parameter that the data in the temporary data buffer has been read may include the address of a single buffer As well as the application ID, the ID of the sending processor, and the ID of the receiving processor.

所述系统可还包括:消息盒,暂存流数据消息,其中,所述流数据消息可包括指示流数据传输事件的类型信息。The system may further include: a message box for temporarily storing stream data messages, wherein the stream data messages may include type information indicating stream data transmission events.

在所述系统中,所述流数据传输事件可包括以下事件中的至少一项:请求建立流连接、流连接已建立、分片状态发生改变、请求断开流连接、流连接已断开。In the system, the stream data transmission event may include at least one of the following events: a request to establish a stream connection, a stream connection established, a fragmentation state changed, a request to disconnect a stream connection, and a stream connection disconnected.

在所述系统中,当流数据传输事件为请求建立流连接时,所述流数据消息还可包括关于请求建立流连接的请求参数,其中,所述关于请求建立流连接的请求参数可包括组成请求的循环缓存区的分片的数目和每个分片的大小以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为流连接已建立时,所述流数据消息可还包括关于流连接的唯一标识和实际分配临时数据缓存区的分配参数,其中,所述关于流连接的唯一标识用于全局唯一标识已建立的流连接;所述关于实际分配临时数据缓存区的分配参数可包括组成分配的循环缓存区的分片的数目以及每个分片的大小、位置和编号以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为请求断开流连接时,所述流数据消息可还包括关于断开流连接的请求参数,其中,所述关于断开流连接的请求参数可包括关于流连接的唯一标识以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为流连接已断开时,所述流数据消息可还包括关于流连接已断开的参数,其中,所述关于流连接已断开的参数可包括关于流连接的唯一标识以及应用标识、发送处理器和接收处理器的标识。In the system, when the stream data transmission event is a request to establish a stream connection, the stream data message may further include a request parameter for requesting to establish a stream connection, wherein the request parameter for requesting to establish a stream connection may include a composition The number of fragments of the requested circular buffer area and the size of each fragment and the identification of the application identifier, the sending processor and the receiving processor; when the streaming data transmission event is that the streaming connection has been established, the streaming data message can also be Including the unique identification of the stream connection and the allocation parameters of the actual allocation of the temporary data buffer area, wherein the unique identification of the stream connection is used to globally uniquely identify the established stream connection; the allocation of the actual allocation of the temporary data buffer area Parameters may include the number of fragments that make up the allocated circular buffer and the size, location and number of each fragment, as well as the identification of the application, sending processor, and receiving processor; when the stream data transfer event is a request to disconnect the stream When , the stream data message may further include a request parameter for disconnecting the stream connection, wherein the request parameter for disconnecting the stream connection may include the unique identifier and application identifier of the stream connection, the sending processor and the receiving processor when the stream data transmission event is that the stream connection has been disconnected, the stream data message may further include parameters about the stream connection being disconnected, wherein the parameters about the stream connection being disconnected may include information about the stream connection The unique ID of the , as well as the ID of the application, the ID of the sending processor, and the ID of the receiving processor.

在所述系统中,消息盒可以为从物理内存中划分出的专用区域,或者,消息盒可以为多处理器通信系统中设置的专用硬件寄存器。In the system, the message box may be a dedicated area divided from the physical memory, or the message box may be a dedicated hardware register set in the multiprocessor communication system.

在所述系统中,消息盒还可暂存常驻消息,其中,所述常驻消息适用于频繁进行消息传递的场景。In the system, the message box can also temporarily store resident messages, where the resident messages are suitable for scenarios where messages are frequently delivered.

在所述系统中,所述多处理器通信系统可集成在单芯片系统中,或者,所述多处理器通信系统可集成在共享多端口物理内存的多处理器系统中。In the system, the multiprocessor communication system may be integrated in a single chip system, or the multiprocessor communication system may be integrated in a multiprocessor system sharing multi-port physical memory.

根据本发明示例性实施例的另一方面,提供一种共享物理内存的多处理器通信系统的通信方法,其中,所述多处理器通信系统包括多个处理器和物理内存,所述多个处理器互相发送和接收数据,所述方法包括:(a)将物理内存划分为多个物理内存块,使得每个处理器具有一专用物理内存块;(b)由所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块;以及(c)由所述接收处理器从它的专用物理内存块读取所述数据。According to another aspect of an exemplary embodiment of the present invention, there is provided a communication method for a multiprocessor communication system sharing physical memory, wherein the multiprocessor communication system includes a plurality of processors and physical memories, and the plurality of Processors send and receive data from each other, the method comprising: (a) dividing physical memory into a plurality of physical memory blocks such that each processor has a dedicated physical memory block; (b) by one of the plurality of processors a sending processor that is to send data sends data to a dedicated physical memory block of a receiving processor of the plurality of processors that is to receive data; and (c) being read by the receiving processor from its dedicated physical memory block Get the data.

在所述方法中,在步骤(a)和(b)之间,可还包括:(d)发送处理器请求接收处理器在它的专用物理内存块中分配用于缓存数据的临时数据缓存区;(e)接收处理器响应于发送处理器的请求而分配临时数据缓存区;其中,在步骤(b)中,发送处理器将数据发送到分配的临时数据缓存区;在步骤(c)中,接收处理器从分配的临时数据缓存区读取所述数据。In the method, between steps (a) and (b), may further include: (d) the sending processor requests the receiving processor to allocate a temporary data buffer area for buffering data in its dedicated physical memory block (e) the receiving processor allocates a temporary data buffer area in response to the request of the sending processor; wherein, in step (b), the sending processor sends data to the allocated temporary data buffer area; in step (c) , the receiving processor reads the data from the allocated temporary data buffer.

在所述方法中,所述数据可以为突发数据,其中,用于缓存突发数据的临时数据缓存区可包括单个缓存区。In the method, the data may be burst data, wherein the temporary data buffer area for buffering the burst data may include a single buffer area.

在所述方法中,所述数据可以为流数据,其中,用于缓存流数据的临时数据缓存区可包括由多个分片组成的循环缓存区。In the method, the data may be stream data, wherein the temporary data buffer for caching the stream data may include a circular buffer composed of multiple fragments.

在根据本发明示例性实施例的共享物理内存的多处理器通信系统及其通信方法中,不需要预留全局内存共享区域,多个处理器可通过各自的专用物理内存块互相传递数据,从而提高内存的使用效率,并加快数据的传输速度。In the multiprocessor communication system and communication method for sharing physical memory according to an exemplary embodiment of the present invention, there is no need to reserve a global memory shared area, and multiple processors can transmit data to each other through their respective dedicated physical memory blocks, thereby Improve memory usage efficiency and speed up data transfer.

附图说明Description of drawings

通过下面结合示例性地示出实施例的附图进行的详细描述,本发明示例性实施例的上述和其他目的将会变得更加清楚,其中:The above and other objects of exemplary embodiments of the present invention will become more apparent from the following detailed description in conjunction with the accompanying drawings exemplarily showing embodiments, in which:

图1示出根据本发明示例性实施例的共享物理内存的多处理器通信系统的框图;1 shows a block diagram of a multiprocessor communication system sharing physical memory according to an exemplary embodiment of the present invention;

图2示出根据本发明示例性实施例的共享物理内存的多处理器通信系统的通信方法的流程图;2 shows a flowchart of a communication method of a multiprocessor communication system sharing physical memory according to an exemplary embodiment of the present invention;

图3示出根据本发明示例性实施例的共享物理内存的多处理器进行通信的示例;FIG. 3 shows an example of communication between multiprocessors sharing physical memory according to an exemplary embodiment of the present invention;

图4示出根据本发明另一示例性实施例的共享物理内存的多处理器通信系统的通信方法的流程图;4 shows a flowchart of a communication method of a multiprocessor communication system sharing physical memory according to another exemplary embodiment of the present invention;

图5示出根据本发明示例性实施例的消息盒的示例;Figure 5 shows an example of a message box according to an exemplary embodiment of the present invention;

图6示出根据本发明示例性实施例的共享物理内存的多处理器针对突发数据进行通信的示例;FIG. 6 shows an example in which multiprocessors sharing physical memory communicate for burst data according to an exemplary embodiment of the present invention;

图7A示出根据本发明示例性实施例的多处理器通信系统中的发送处理器针对突发数据进行通信的方法的流程图;FIG. 7A shows a flowchart of a method for transmitting processors in a multiprocessor communication system to communicate with respect to burst data according to an exemplary embodiment of the present invention;

图7B示出根据本发明示例性实施例的多处理器通信系统中的接收处理器针对突发数据进行通信的方法的流程图;FIG. 7B shows a flowchart of a method for a receiving processor in a multiprocessor communication system to communicate with respect to burst data according to an exemplary embodiment of the present invention;

图8示出根据本发明示例性实施例的共享物理内存的多处理器针对流数据进行通信的示例;FIG. 8 shows an example in which multiprocessors sharing physical memory communicate with respect to stream data according to an exemplary embodiment of the present invention;

图9A示出根据本发明示例性实施例的多处理器通信系统中的发送处理器针对流数据进行通信的方法的流程图;FIG. 9A shows a flowchart of a method for transmitting processors in a multiprocessor communication system to communicate with respect to stream data according to an exemplary embodiment of the present invention;

图9B示出根据本发明示例性实施例的多处理器通信系统中的接收处理器针对流数据进行通信的方法的流程图。FIG. 9B shows a flowchart of a method for receiving processors in a multiprocessor communication system to communicate with respect to stream data according to an exemplary embodiment of the present invention.

具体实施方式Detailed ways

现将详细参照本发明的示例性实施例,所述实施例的示例在附图中示出,其中,相同的标号始终指的是相同的部件。Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like numerals refer to like parts throughout.

图1示出根据本发明示例性实施例的共享物理内存的多处理器通信系统的框图。FIG. 1 shows a block diagram of a multiprocessor communication system sharing physical memory according to an exemplary embodiment of the present invention.

如图1所示,根据本发明示例性实施例的共享物理内存的多处理器通信系统(以下简称:“多处理器通信系统”)包括:多个处理器100、物理内存200。这里,作为示例,所述多处理器通信系统可集成在单芯片系统中,或者,所述多处理器通信系统可集成在共享多端口物理内存的多处理器系统中。所述处理器100可以是中央处理器、微处理器、物理处理器、数字信号处理器等处理器。所述物理内存200可以是随机存取存储器(RAM)。As shown in FIG. 1 , a multiprocessor communication system sharing physical memory (hereinafter referred to as “multiprocessor communication system”) according to an exemplary embodiment of the present invention includes: a plurality of processors 100 and a physical memory 200 . Here, as an example, the multiprocessor communication system may be integrated in a single chip system, or the multiprocessor communication system may be integrated in a multiprocessor system sharing multi-port physical memory. The processor 100 may be a processor such as a central processing unit, a microprocessor, a physical processor, or a digital signal processor. The physical memory 200 may be random access memory (RAM).

这里,所述多个处理器100(例如,图1所示的处理器100-1、处理器100-2、······、处理器100-N)互相发送和接收数据。Here, the plurality of processors 100 (for example, processor 100-1, processor 100-2, ..., processor 100-N shown in FIG. 1 ) transmit and receive data to and from each other.

此外,物理内存200被划分为多个物理内存块,使得每个处理器具有一专用物理内存块。如图1所示,物理内存200可被划分为:处理器100-1的专用物理内存块200-1、处理器100-2的专用物理内存块200-2、······、处理器100-N的专用物理内存块200-N。Additionally, physical memory 200 is divided into multiple physical memory blocks such that each processor has a dedicated physical memory block. As shown in FIG. 1, the physical memory 200 can be divided into: a dedicated physical memory block 200-1 of the processor 100-1, a dedicated physical memory block 200-2 of the processor 100-2, ..., processing Dedicated physical memory block 200-N of device 100-N.

相应地,所述多个处理器100中的将发送数据的发送处理器将数据发送到所述多个处理器100中的将接收数据的接收处理器的专用物理内存块,并且,所述接收处理器从它的专用物理内存块读取所述数据。这里,在以下的示例性实施例中,为了便于描述,假设处理器100-1指示将发送数据的发送处理器,处理器100-2指示将接收数据的接收处理器。这里,应理解,发送处理器和接收处理器不局限于处理器100-1和处理器100-2,还可以是多个处理器100中的其他处理器。此外,单个处理器既可用于发送数据,也可用于接收数据。也就是说,处理器在发送数据时被用作发送处理器,而在接收数据时被用作接收处理器。Correspondingly, the sending processor that will send data among the plurality of processors 100 sends data to the dedicated physical memory block of the receiving processor that will receive data among the plurality of processors 100, and the receiving processor The processor reads the data from its dedicated block of physical memory. Here, in the following exemplary embodiments, for convenience of description, it is assumed that the processor 100-1 indicates a transmission processor that will transmit data, and the processor 100-2 indicates a reception processor that will receive data. Here, it should be understood that the sending processor and the receiving processor are not limited to the processor 100 - 1 and the processor 100 - 2 , and may also be other processors among the multiple processors 100 . Additionally, a single processor can be used to both send and receive data. That is, the processor is used as a sending processor when sending data and as a receiving processor when receiving data.

具体说来,处理器100-1可将数据发送到处理器100-2的专用物理内存块200-2,并且,处理器100-2从所述处理器100-2的专用物理内存块200-2读取所述数据。Specifically, the processor 100-1 may send data to the dedicated physical memory block 200-2 of the processor 100-2, and the processor 100-2 may send data from the dedicated physical memory block 200-2 of the processor 100-2. 2. Read the data.

在上述根据本发明示例性实施例的共享物理内存的多处理器通信系统中,不需要预留全局内存共享区域,多个处理器可通过各自的专用物理内存块互相传递数据,从而提高内存的使用效率,并加快数据的传输速度。In the above-mentioned multiprocessor communication system sharing physical memory according to the exemplary embodiment of the present invention, there is no need to reserve a global memory shared area, and multiple processors can pass data to each other through their respective dedicated physical memory blocks, thereby improving memory utilization. Use efficiency and speed up data transfer.

图2示出根据本发明示例性实施例的共享物理内存的多处理器通信系统的通信方法(以下,称为“多处理器通信方法”)的流程图。这里,所述多处理器通信系统包括多个处理器和物理内存,并且,所述多个处理器互相发送和接收数据。作为示例,所述处理器可以是中央处理器、微处理器、物理处理器、数字信号处理器等处理器。所述物理内存可以是随机存取存储器(RAM)。此外,作为示例,所述多处理器通信系统可集成在单芯片系统中,或者,所述多处理器通信系统可集成在共享多端口物理内存的多处理器系统中。FIG. 2 shows a flow chart of a communication method of a multiprocessor communication system sharing physical memory (hereinafter referred to as "multiprocessor communication method") according to an exemplary embodiment of the present invention. Here, the multi-processor communication system includes multiple processors and physical memory, and the multiple processors send and receive data with each other. As an example, the processor may be a processor such as a central processing unit, a microprocessor, a physical processor, or a digital signal processor. The physical memory may be random access memory (RAM). Furthermore, as an example, the multiprocessor communication system may be integrated in a single chip system, or the multiprocessor communication system may be integrated in a multiprocessor system sharing multi-port physical memory.

如图2所示,在步骤S100,将物理内存划分为多个物理内存块,使得每个处理器具有一专用物理内存块。As shown in FIG. 2, in step S100, the physical memory is divided into multiple physical memory blocks, so that each processor has a dedicated physical memory block.

在步骤S200,由所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块。在步骤S300,由所述接收处理器从它的专用物理内存块读取所述数据。这里,作为示例,单个处理器既可用于发送数据,也可用于接收数据。也就是说,处理器在发送数据时被用作发送处理器,而在接收数据时被用作接收处理器。In step S200, the sending processor that will send data among the multiple processors sends data to the dedicated physical memory block of the receiving processor that will receive data among the multiple processors. At step S300, the data is read by the receiving processor from its dedicated physical memory block. Here, as an example, a single processor can be used for both sending and receiving data. That is, the processor is used as a sending processor when sending data and as a receiving processor when receiving data.

在上述根据本发明示例性实施例的共享物理内存的多处理器通信系统的通信方法中,不需要预留全局内存共享区域,多个处理器可通过各自的专用物理内存块互相传递数据,从而提高内存的使用效率,并加快数据的传输速度。In the communication method of the multiprocessor communication system sharing physical memory according to the above-mentioned exemplary embodiment of the present invention, there is no need to reserve a global memory shared area, and multiple processors can transmit data to each other through their respective dedicated physical memory blocks, thereby Improve memory usage efficiency and speed up data transfer.

图3示出根据本发明示例性实施例的共享物理内存的多处理器进行通信的示例。FIG. 3 shows an example of communication between multiple processors sharing physical memory according to an exemplary embodiment of the present invention.

作为示例,如图3所示,多个处理器100可包括发送处理器(即,处理器100-1)和接收处理器(即,处理器100-2),其中,处理器100-1请求处理器100-2在它的专用物理内存块200-2中分配用于缓存数据的临时数据缓存区B,并且,处理器100-2响应于处理器100-1的请求而分配临时数据缓存区B。应理解,所述缓存区B被用于暂时存放发送处理器期望发送到接收处理器的数据。As an example, as shown in FIG. 3, a plurality of processors 100 may include a sending processor (i.e., processor 100-1) and a receiving processor (i.e., processor 100-2), wherein processor 100-1 requests Processor 100-2 allocates temporary data buffer area B for buffering data in its dedicated physical memory block 200-2, and processor 100-2 allocates temporary data buffer area B in response to the request of processor 100-1 b. It should be understood that the buffer area B is used to temporarily store data that the sending processor expects to send to the receiving processor.

图4示出根据本发明另一示例性实施例的共享物理内存的多处理器通信系统的通信方法的流程图。Fig. 4 shows a flowchart of a communication method of a multiprocessor communication system sharing physical memory according to another exemplary embodiment of the present invention.

如图4所示,在步骤S100,将物理内存划分为多个物理内存块,使得每个处理器具有一专用物理内存块。在步骤S400,发送处理器可请求接收处理器在它的专用物理内存块中分配用于缓存数据的临时数据缓存区。在步骤S500,接收处理器可响应于发送处理器的请求而分配临时数据缓存区。在步骤S200,发送处理器可将数据发送到分配的临时数据缓存区。在步骤S300,接收处理器可从分配的临时数据缓存区读取所述数据。As shown in FIG. 4, in step S100, the physical memory is divided into multiple physical memory blocks, so that each processor has a dedicated physical memory block. In step S400, the sending processor may request the receiving processor to allocate a temporary data buffer area for buffering data in its dedicated physical memory block. In step S500, the receiving processor may allocate a temporary data buffer in response to the request of the sending processor. In step S200, the sending processor may send data to the allocated temporary data buffer. In step S300, the receiving processor may read the data from the allocated temporary data buffer.

这里,根据实际的应用场景的不同以及临时数据缓存区的分配和释放的策略的不同,多处理器通信系统中的多处理器通信的数据可包括突发数据(Burst Data)和流数据(Stream Data)。Here, according to different actual application scenarios and different strategies for allocation and release of temporary data buffer areas, the data communicated by multiprocessors in a multiprocessor communication system may include burst data (Burst Data) and stream data (Stream Data). Data).

此外,作为附加部件,所述多处理器通信系统可还包括消息盒(Message Box),其中,所述消息盒可用于暂存若干条具备完整语义的消息。根据本发明示例性实施例的多处理器通信系统中的每个处理器都可以访问消息盒。作为示例,消息盒可以是从物理内存中划分出的专用区域(即,物理内存的一部分),或者,消息盒可以是多处理器通信系统中设置的专用硬件寄存器。应注意,在图3所示的示例性实施例中,所述消息盒210为从物理内存中划分出的专用区域(即,物理内存200的一部分)。In addition, as an additional component, the multiprocessor communication system may further include a message box (Message Box), wherein the message box may be used to temporarily store several messages with complete semantics. Each processor in a multi-processor communication system according to an exemplary embodiment of the present invention has access to a message box. As an example, the message box may be a dedicated area partitioned from the physical memory (ie, a portion of the physical memory), or the message box may be a dedicated hardware register set in a multiprocessor communication system. It should be noted that in the exemplary embodiment shown in FIG. 3 , the message box 210 is a dedicated area divided from the physical memory (ie, a part of the physical memory 200 ).

下面,将结合图5来描述根据本发明示例性实施例的消息盒210的示例。Next, an example of a message box 210 according to an exemplary embodiment of the present invention will be described with reference to FIG. 5 .

具体说来,如图5所示,消息盒210可被划分为X个单元槽(SLOT),其中,所述单元槽可被设计成固定的相同大小。一般地,依据实际应用,X可取16、32、64或其它整数。每一个单元槽可以承载一条具备完整语意的消息。这里,所述消息可以是数据通信的一方请求另一方执行某操作(例如,发送处理器请求接收处理器分配临时数据缓存区)的命令,或者,所述消息可以是命令执行(例如,接收处理器响应于发送处理器的命令而分配临时数据缓存区)之后的响应。这里,作为示例,每一条消息都包含了通信双方的处理器标识,用于指示消息的发出者和消息的接收者。此外,所述单元槽还可承载常驻消息,所述承载常驻消息的单元槽将在较长时间内被占用,不会被设置为空闲可用状态,从而通信双方将优先使用该单元槽,通过这种方式,可提高消息传递的效率。Specifically, as shown in FIG. 5 , the message box 210 can be divided into X unit slots (SLOTs), wherein the unit slots can be designed to be fixed and of the same size. Generally, X can be 16, 32, 64 or other integers according to practical applications. Each unit slot can carry a message with complete semantics. Here, the message may be a command for one party of data communication to request the other party to perform an operation (for example, the sending processor requests the receiving processor to allocate a temporary data buffer area), or the message may be a command execution (for example, receiving processing The response after the processor allocates a temporary data buffer in response to a command from the sending processor). Here, as an example, each message includes the processor identifiers of both communicating parties, which are used to indicate the sender of the message and the receiver of the message. In addition, the unit slot can also carry a resident message, and the unit slot carrying the resident message will be occupied for a long time, and will not be set to an idle and available state, so that both parties to the communication will preferentially use the unit slot, In this way, the efficiency of message delivery can be improved.

图6示出根据本发明示例性实施例的共享物理内存的多处理器针对突发数据进行通信的示例。FIG. 6 shows an example in which multiprocessors sharing physical memory communicate with respect to burst data according to an exemplary embodiment of the present invention.

如图6所示,作为示例,在发送处理器期望发送到接收处理器的数据为突发数据的情况下,用于缓存突发数据的临时数据缓存区B可包括单个缓存区B1。应理解,突发数据可指示数据通信中以突发方式传输的数据。在这种情况下,消息盒210中可暂存包括指示突发数据传输事件的类型信息的突发数据消息,这里,作为示例,所述突发数据传输事件可包括以下事件中的至少一项:请求分配临时数据缓存区、临时数据缓存区已分配、临时数据缓存区存有待读取数据、临时数据缓存区中的数据已被读取。此外,作为示例,当突发数据传输事件为请求分配临时数据缓存区时,所述突发数据消息还包括关于请求分配临时数据缓存区的请求参数,其中,所述关于请求分配临时数据缓存区的请求参数包括请求的单个缓存区B1的大小以及应用标识(用于区分同一个处理器上的不同的请求)、发送处理器和接收处理器的标识;当突发数据传输事件为临时数据缓存区已分配时,所述突发数据消息还包括关于分配临时数据缓存区的分配参数,其中,所述关于分配临时数据缓存区的分配参数包括实际分配的单个缓存区B1的大小和位置以及应用标识、发送处理器和接收处理器的标识;当突发传输事件为临时数据缓存区存有待读取数据时,所述突发数据消息还包括关于临时数据缓存区存有待读取数据的参数,其中,所述关于临时数据缓存区存有待读取数据的参数包括单个缓存区的地址、待读取数据的长度以及应用标识、发送处理器和接收处理器的标识;当突发传输事件为临时数据缓存区中的数据已被读取时,所述突发数据消息还包括关于临时数据缓存区中的数据已被读取的参数,其中,所述关于临时数据缓存区中的数据已被读取的参数包括单个缓存区的地址以及应用标识、发送处理器和接收处理器的标识。As shown in FIG. 6 , as an example, when the data that the sending processor expects to send to the receiving processor is burst data, the temporary data buffer area B for buffering the burst data may include a single buffer area B1. It should be understood that bursty data may indicate data transmitted in bursts in data communications. In this case, the burst data message including information indicating the type of the burst data transmission event may be temporarily stored in the message box 210. Here, as an example, the burst data transmission event may include at least one of the following events : Request to allocate a temporary data buffer, the temporary data buffer has been allocated, the temporary data buffer has data to be read, and the data in the temporary data buffer has been read. In addition, as an example, when the burst data transmission event is a request to allocate a temporary data buffer, the burst data message further includes request parameters for requesting allocation of a temporary data buffer, wherein the request for allocating a temporary data buffer The request parameters include the size of the requested single buffer B1 and the application identifier (used to distinguish different requests on the same processor), the identifiers of the sending processor and the receiving processor; when a sudden data transmission event is a temporary data cache When the area has been allocated, the burst data message also includes allocation parameters for allocating a temporary data buffer area, wherein the allocation parameters for allocating a temporary data buffer area include the size and location of the actually allocated single buffer area B1 and the application Identification, the identification of the sending processor and the receiving processor; when the burst transmission event is that the temporary data buffer stores data to be read, the burst data message also includes parameters about the temporary data buffer area storing data to be read, Wherein, the parameters about the data to be read in the temporary data buffer area include the address of a single buffer area, the length of the data to be read, and the application identification, the identification of the sending processor and the receiving processor; when the burst transmission event is temporary When the data in the data buffer has been read, the burst data message also includes a parameter that the data in the temporary data buffer has been read, wherein the data about the temporary data buffer has been read The parameters taken include the address of a single buffer area and the identification of the application, the identification of the sending processor and the receiving processor.

以下将结合图7A和图7B来描述根据本发明示例性实施例的多处理器通信系统针对突发数据进行通信的方法。其中,图7A示出根据本发明示例性实施例的多处理器通信系统中的发送处理器针对突发数据进行通信的方法的流程图;图7B示出根据本发明示例性实施例的多处理器通信系统中的接收处理器针对突发数据进行通信的方法的流程图。A method for communicating burst data in a multiprocessor communication system according to an exemplary embodiment of the present invention will be described below with reference to FIG. 7A and FIG. 7B . Among them, FIG. 7A shows a flowchart of a method for transmitting processors in a multiprocessor communication system to communicate with burst data according to an exemplary embodiment of the present invention; FIG. 7B shows a multiprocessing method according to an exemplary embodiment of the present invention A flowchart of a method for a receiver processor in a communication system to communicate with respect to burst data.

具体说来,如图7A所示,在步骤S101,发送处理器(即,处理器100-1)进行初始化。如图7B所示,在步骤S201,接收处理器(即,处理器100-2)进行初始化。Specifically, as shown in FIG. 7A, in step S101, the sending processor (ie, processor 100-1) performs initialization. As shown in FIG. 7B, in step S201, the receiving processor (ie, the processor 100-2) performs initialization.

再次参照图7A,在步骤S102,处理器100-1构造一条突发数据消息,该突发数据消息可包括指示“请求分配临时数据缓存区”这一突发数据传输事件的类型信息(这里,类型信息用于指示突发数据传输事件)以及相应的请求参数(这里,请求参数可包括请求分配的缓存区的大小、应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的突发数据消息写入消息盒中的某一空闲槽中。在步骤S103,处理器100-1向处理器100-2发送中断。Referring again to FIG. 7A , in step S102, the processor 100-1 constructs a burst data message, which may include type information indicating a burst data transmission event of "request to allocate a temporary data buffer area" (here, The type information is used to indicate the burst data transmission event) and corresponding request parameters (here, the request parameters may include information such as the size of the cache area requested for allocation, the application identification, the identification of the processor 100-1 and the processor 100-2) , and then write the constructed burst data message into a free slot in the message box. In step S103, the processor 100-1 sends an interrupt to the processor 100-2.

再次参照图7B,在步骤S202,处理器100-2等待处理器100-1发送的中断。在处理器100-2从处理器100-1接收到中断时,在步骤S203,从消息盒中读取突发数据消息并获取类型信息。在步骤S204,判断所述类型信息用于指示哪种突发数据传输事件。在根据类型信息判断突发数据传输事件为请求分配临时数据缓存区的情况下,在步骤S205,获取关于分配临时数据缓存区的请求参数。在步骤S206,根据请求参数分配单个缓存区。在步骤S207,处理器100-2构造一条突发数据消息,该突发数据消息可包括指示“临时数据缓存区已分配”这一突发数据传输事件的类型信息以及相应的分配参数(这里,分配参数可包括实际分配的单个缓存区的大小和位置、应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的突发数据消息写入消息盒中的某一空闲槽中。在步骤S208,处理器100-2向处理器100-1发送中断。然后处理器100-2返回执行步骤S202。Referring again to FIG. 7B, in step S202, the processor 100-2 waits for an interrupt sent by the processor 100-1. When the processor 100-2 receives an interrupt from the processor 100-1, in step S203, reads the burst data message from the message box and acquires the type information. In step S204, it is determined which kind of burst data transmission event the type information is used to indicate. If it is judged according to the type information that the burst data transmission event is a request for allocation of a temporary data buffer, in step S205, request parameters for allocating a temporary data buffer are obtained. In step S206, a single cache area is allocated according to the request parameters. In step S207, the processor 100-2 constructs a burst data message, and the burst data message may include the type information indicating the burst data transmission event "temporary data buffer has been allocated" and corresponding allocation parameters (here, The allocation parameters may include the size and location of a single buffer actually allocated, the application identification, the identification of the processor 100-1 and the identification of the processor 100-2, etc.), and then write the constructed burst data message into the message box in a free slot. In step S208, the processor 100-2 sends an interrupt to the processor 100-1. Then the processor 100-2 returns to execute step S202.

返回再次参照图7A,在步骤S104,处理器100-1等待处理器100-2发送的中断。在处理器100-1从处理器100-2接收到中断时,在步骤S105,从消息盒中读取突发数据消息并获取类型信息。在步骤S106,判断所述类型信息用于指示哪种突发数据传输事件。在根据类型信息判断突发数据传输事件为临时数据缓存区已分配的情况下,在步骤S107,获取关于分配的临时数据缓存区的分配参数。在步骤S108,根据分配参数将数据写入单个缓存区。在步骤S109,处理器100-1构造一条突发数据消息,该突发数据消息包括指示“临时数据缓存区存有待读取数据”这一突发数据传输事件的类型信息以及相应的参数(这里,参数可包括单个缓存区的地址、待读取数据的长度以及应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的突发数据消息写入消息盒中的某一空闲槽中。在步骤S110,处理器100-1向处理器100-2发送中断。然后处理器100-1返回执行步骤S104。Referring back to FIG. 7A again, in step S104, the processor 100-1 waits for an interrupt sent by the processor 100-2. When the processor 100-1 receives an interrupt from the processor 100-2, in step S105, the burst data message is read from the message box and the type information is acquired. In step S106, it is determined which kind of burst data transmission event the type information is used to indicate. If it is determined according to the type information that the temporary data buffer has been allocated for the burst data transmission event, in step S107, the allocation parameters of the allocated temporary data buffer are acquired. In step S108, data is written into a single buffer area according to the allocation parameters. In step S109, the processor 100-1 constructs a burst data message, and the burst data message includes indicating the type information of the burst data transmission event "temporary data buffer stores data to be read" and corresponding parameters (here , the parameters can include the address of a single cache area, the length of the data to be read, and the application identification, the identification of the processor 100-1 and the identification of the processor 100-2, etc.), and then write the constructed burst data message into the message box in one of the free slots. In step S110, the processor 100-1 sends an interrupt to the processor 100-2. Then the processor 100-1 returns to execute step S104.

返回再次参照图7B,在处理器100-2从处理器100-1接收到中断时,在步骤S203,从消息盒中读取突发数据消息并获取类型信息。在步骤S204,判断所述类型信息用于指示哪种突发数据传输事件。在根据类型信息判断突发数据传输事件为临时数据缓存区存有待读取数据的情况下,在步骤S209,从单个缓存区中读取处理器100-1写入的数据。在步骤S210,释放单个缓存区。在步骤S211,处理器100-2构造一条突发数据消息,该突发数据消息可包括指示“临时数据缓存区中的数据已被读取”的类型信息以及相应的参数(这里,参数包括单个缓存区的地址以及应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的突发数据消息写入消息盒中的某一空闲槽中。在步骤S212,处理器100-2向处理器100-1发送中断。在步骤S213,判断是否退出本次数据通信,若确定退出本次数据通信,则结束本次数据通信;若确定不退出本次数据通信,则返回执行步骤S202。Referring back to FIG. 7B again, when the processor 100-2 receives an interrupt from the processor 100-1, in step S203, reads the burst data message from the message box and acquires the type information. In step S204, it is determined which kind of burst data transmission event the type information is used to indicate. If it is determined according to the type information that the data to be read is stored in the temporary data buffer, in step S209, the data written by the processor 100-1 is read from the single buffer. In step S210, a single buffer is released. In step S211, the processor 100-2 constructs a burst data message, which may include type information indicating that "the data in the temporary data buffer area has been read" and corresponding parameters (here, the parameters include a single The address of the cache area, the application identification, the identification of the processor 100-1 and the identification of the processor 100-2, etc.), and then write the constructed burst data message into a certain free slot in the message box. In step S212, the processor 100-2 sends an interrupt to the processor 100-1. In step S213, it is judged whether to exit the current data communication, if it is determined to exit the current data communication, then end the current data communication; if it is determined not to exit the current data communication, then return to step S202.

返回再次参照图7A,在处理器100-1从处理器100-2接收到中断时,在步骤S105,从消息盒中读取突发数据消息并获取类型信息。在步骤S106,判断所述类型信息用于指示哪种突发数据传输事件。在根据类型信息判断突发数据传输事件为临时数据缓存区中的数据已被读取的情况下,在步骤S111,判断数据是否全部已发送,若数据全部已发送,则结束本次数据通信;若数据未全部发送,则返回执行步骤S102。Referring back to FIG. 7A again, when the processor 100-1 receives an interrupt from the processor 100-2, in step S105, the burst data message is read from the message box and the type information is acquired. In step S106, it is determined which kind of burst data transmission event the type information is used to indicate. In the case that the data in the temporary data buffer area has been read in the sudden data transmission event according to the type information, in step S111, it is judged whether all the data has been sent, and if all the data has been sent, the current data communication is ended; If not all data are sent, return to step S102.

通过上述方式发送突发数据时,传输方式简单,突发数据所需的单个缓存区可以即用即分配,用完即释放,防止了内存的泄露。由于单个缓存区的分配和释放需要一定的系统开销,因此,优选地,可将这种传输方式适用于少量的、偶发的数据通信情景。When sending burst data through the above method, the transmission method is simple, and the single buffer area required by the burst data can be allocated as soon as it is used, and released when it is used up, which prevents memory leaks. Since the allocation and release of a single buffer requires certain system overhead, preferably, this transmission method can be applied to a small amount of occasional data communication scenarios.

图8示出根据本发明示例性实施例的共享物理内存的多处理器针对流数据进行通信的示例。FIG. 8 shows an example in which multiprocessors sharing physical memory communicate with respect to stream data according to an exemplary embodiment of the present invention.

如图8所示,作为另一示例,在发送处理器期望发送到接收处理器的数据为流数据的情况下,用于缓存流数据的临时数据缓存区B可包括循环缓存区B2,其中,所述循环缓存区B2可由多个分片(例如,B2-1、B2-2、······、B2-K)组成。应理解,流数据可指示连续传输的数据序列。在这种情况下,消息盒210中可暂存包括指示流数据传输事件的类型信息的流数据消息,这里,作为示例,所述流数据传输事件可包括以下事件中的至少一项:请求建立流连接、流连接已建立、分片状态发生改变、请求断开流连接、流连接已断开。此外,作为示例,当流数据传输事件为请求建立流连接时,所述流数据消息可还包括关于请求建立流连接的请求参数,其中,所述关于请求建立流连接的请求参数可包括组成请求的循环缓存区B2的分片的数目和每个分片的大小以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为流连接已建立时,所述流数据消息可还包括关于流连接的唯一标识和实际分配临时数据缓存区的分配参数,其中,所述关于流连接的唯一标识用于全局唯一标识已建立的流连接;所述关于实际分配临时数据缓存区的分配参数可包括组成分配的循环缓存区B2的分片的数目以及每个分片的大小、位置和编号以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为请求断开流连接时,所述流数据消息可还包括关于断开流连接的请求参数,其中,所述关于断开流连接的请求参数可包括流连接的唯一标识以及应用标识、发送处理器和接收处理器的标识;当流数据传输事件为流连接已断开时,所述流数据消息可还包括关于流连接已断开的参数,其中,所述关于流连接已断开的参数包括流连接的唯一标识以及应用标识、发送处理器和接收处理器的标识。此外,作为示例,消息盒210还暂存常驻消息,其中,所述常驻消息可指示循环缓存区B2的每个分片的状态(例如,可指示循环缓存区B2的每个分片中是否存有待读取的数据以及待读取数据的长度),换句话说,常驻消息可保存指示循环缓存区B2的每个分片中是否缓存有数据的信息(例如,“有数据”或者“无数据”)以及“有数据”时待读取数据的长度。As shown in FIG. 8 , as another example, in the case that the data that the sending processor expects to send to the receiving processor is streaming data, the temporary data buffer area B for buffering the streaming data may include a circular buffer area B2, wherein, The circular buffer B2 may be composed of multiple slices (for example, B2-1, B2-2, . . . , B2-K). It should be understood that streaming data may indicate a continuously transmitted sequence of data. In this case, the message box 210 may temporarily store a stream data message including information indicating the type of the stream data transmission event. Here, as an example, the stream data transmission event may include at least one of the following events: request to establish Stream connection, stream connection established, shard status changed, request to disconnect stream connection, stream connection disconnected. In addition, as an example, when the stream data transmission event is a request to establish a stream connection, the stream data message may further include a request parameter for requesting to establish a stream connection, wherein the request parameter for requesting to establish a stream connection may include a composition request The number of fragments and the size of each fragment of the circular buffer area B2 and the identification of the application identifier, the sending processor and the receiving processor; when the streaming data transmission event is that the streaming connection has been established, the streaming data message can also be Including the unique identification of the stream connection and the allocation parameters of the actual allocation of the temporary data buffer area, wherein the unique identification of the stream connection is used to globally uniquely identify the established stream connection; the allocation of the actual allocation of the temporary data buffer area Parameters may include the number of fragments constituting the allocated circular buffer area B2 and the size, location and number of each fragment, as well as the identification of the application, the sending processor and the receiving processor; When connected, the stream data message may further include a request parameter for disconnecting the stream connection, wherein the request parameter for disconnecting the stream connection may include the unique identifier and application identifier of the stream connection, the sending processor and the receiving processor when the stream data transmission event is that the stream connection has been disconnected, the stream data message may further include parameters about the stream connection being disconnected, wherein the parameters about the stream connection being disconnected include the unique ID and ID of the application, ID of the sending processor, and ID of the receiving processor. In addition, as an example, the message box 210 also temporarily stores resident messages, wherein the resident messages may indicate the state of each fragment of the circular buffer area B2 (for example, may indicate the status of each fragment in the circular buffer area B2). Whether there is data to be read and the length of the data to be read), in other words, the resident message can save information indicating whether there is data cached in each fragment of the circular buffer area B2 (for example, "has data" or "No data") and the length of the data to be read when "with data".

以下将结合图9A和图9B来描述根据本发明示例性实施例的多处理器通信系统针对流数据进行通信的方法。其中,图9A示出根据本发明示例性实施例的多处理器通信系统中的发送处理器针对流数据进行通信的方法的流程图;图9B示出根据本发明示例性实施例的多处理器通信系统中的接收处理器针对流数据进行通信的方法的流程图。A method for communicating stream data in a multiprocessor communication system according to an exemplary embodiment of the present invention will be described below with reference to FIGS. 9A and 9B . Wherein, FIG. 9A shows a flow chart of a method for communicating stream data by a sending processor in a multiprocessor communication system according to an exemplary embodiment of the present invention; FIG. 9B shows a multiprocessor according to an exemplary embodiment of the present invention A flowchart of a method of communicating streaming data for a receive processor in a communication system.

具体说来,如图9A所示,在步骤S301,发送处理器(即,处理器100-1)进行初始化。如图9B所示,在步骤S401,接收处理器(即,处理器100-2)进行初始化。Specifically, as shown in FIG. 9A, in step S301, the sending processor (ie, the processor 100-1) performs initialization. As shown in FIG. 9B, in step S401, the receiving processor (ie, the processor 100-2) performs initialization.

再次参照图9A,在步骤S302,处理器100-1构造一条流数据消息,该流数据消息可包括指示“请求建立流连接”这一流数据传输事件的类型信息(这里,类型信息用于指示流数据传输事件)以及相应的请求参数(这里,请求参数可包括请求的循环缓存区的分片的数目和每个分片的大小以及应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的流数据消息写入消息盒中的某一空闲槽中。在步骤S303,处理器100-1向处理器100-2发送中断。Referring to FIG. 9A again, in step S302, the processor 100-1 constructs a stream data message, which may include type information indicating a stream data transmission event of "request to establish a stream connection" (here, the type information is used to indicate stream data transfer event) and corresponding request parameters (here, the request parameters may include the number of fragments and the size of each fragment of the requested circular buffer area and the identification of the application, processor 100-1 and processor 100-2 and other information), and then write the constructed stream data message into a free slot in the message box. In step S303, the processor 100-1 sends an interrupt to the processor 100-2.

再次参照图9B,在步骤S402,处理器100-2等待处理器100-1发送的中断。在处理器100-2从处理器100-1接收到中断时,在步骤S403,从消息盒中读取流数据消息并获取类型信息。在步骤S404,判断所述类型信息用于指示哪种流数据传输事件。在根据类型信息判断流数据传输事件为请求建立流连接的情况下,在步骤S405,获取关于请求建立流连接的请求参数。在步骤S406,根据请求参数分配包括多个分片的循环缓存区。在步骤S407,处理器100-2构造一条流数据消息,该流数据消息可包括关于流连接的唯一标识、指示“流连接已建立”的类型信息、应用标识、处理器100-1和处理器100-2的标识等信息以及相应的分配参数(这里,分配参数可包括实际分配的循环缓存区的分片的数目以及每个分片的大小、位置和编号),然后将所构造的流数据消息写入消息盒中的某一空闲槽中。在步骤S408,处理器100-2向处理器100-1发送中断,并返回执行步骤S402。Referring again to FIG. 9B, in step S402, the processor 100-2 waits for an interrupt sent by the processor 100-1. When the processor 100-2 receives an interrupt from the processor 100-1, in step S403, reads the stream data message from the message box and acquires the type information. In step S404, it is determined which type of streaming data transmission event the type information is used for. If it is judged according to the type information that the stream data transmission event is a request to establish a stream connection, in step S405, a request parameter related to the request to establish a stream connection is acquired. In step S406, a circular buffer including multiple fragments is allocated according to the request parameters. In step S407, the processor 100-2 constructs a stream data message, which may include a unique identifier about the stream connection, type information indicating "the stream connection has been established", an application identifier, the processor 100-1 and the processor 100-2 information such as identification and corresponding allocation parameters (here, the allocation parameters may include the number of fragments of the circular buffer actually allocated and the size, position and number of each fragment), and then the constructed stream data The message is written to one of the free slots in the message box. In step S408, the processor 100-2 sends an interrupt to the processor 100-1, and returns to step S402.

返回再次参照图9A,在步骤S304,处理器100-1等待处理器100-2发送的中断。在处理器100-1从处理器100-2接收到中断时,在步骤S305,从消息盒中读取流数据消息并获取类型信息。在步骤S306,判断所述类型信息用于指示哪种流数据传输事件。在根据类型信息判断流数据传输事件为流连接已建立的情况下,在步骤S307,获取流连接的唯一标识、应用标识以及关于实际分配临时数据缓存区的分配参数,并根据分配参数得到分片的数目以及每个分片的大小、位置和编号。处理器100-1再构造一条常驻消息,其中,该常驻消息包含了循环缓冲区各分片的状态信息,然后处理器100-1将所构造的常驻消息写入消息盒中的某一空闲槽中(常驻消息并非必须,而是可选地,它在流连接的整个数据传输周期内始终驻留在其所在的槽中,借助于该常驻消息,处理器100-1和处理器100-2可以在数据传输时快速交换循环缓冲区各分片的状态信息)。在步骤S308,处理器100-1等待有数据发送。在步骤S309,判断数据是否全部已发送。在数据未全部已发送的情况下,在步骤S310,从常驻消息中依次读取分片的状态信息,确定是否存在“无数据”分片。在存在“无数据”分片的情况下,在步骤S311,依次将数据写入循环缓存区的“无数据”分片。在步骤S312,将状态发生改变的分片的状态(包括该分片中待读取的数据长度)以及将指示“分片状态发生改变”的类型信息更新到消息盒中的常驻消息中,以表明所述分片存有待读取的数据。在步骤S313,处理器100-1向处理器100-2发送中断,返回执行步骤S309。另一方面,在没有“无数据”分片的情况下,返回执行步骤S304。Referring back to FIG. 9A again, in step S304, the processor 100-1 waits for an interrupt sent by the processor 100-2. When the processor 100-1 receives an interrupt from the processor 100-2, in step S305, the stream data message is read from the message box and the type information is acquired. In step S306, it is determined which type of streaming data transmission event the type information is used to indicate. When judging from the type information that the streaming data transmission event is that the streaming connection has been established, in step S307, obtain the unique identifier of the streaming connection, the application identifier, and the allocation parameters about the actual allocation of the temporary data buffer area, and obtain the fragmentation according to the allocation parameters and the size, location, and number of each shard. The processor 100-1 constructs a resident message again, wherein the resident message includes the state information of each fragment of the circular buffer, and then the processor 100-1 writes the constructed resident message into a message box. In a free slot (the resident message is not necessary, but optional, it always stays in the slot where it is located during the entire data transmission cycle of the stream connection, by means of the resident message, the processor 100-1 and The processor 100-2 can quickly exchange state information of each segment of the circular buffer during data transmission). In step S308, the processor 100-1 waits for data to be sent. In step S309, it is judged whether all the data has been sent. If not all the data has been sent, in step S310, the status information of the fragments is sequentially read from the resident message, and it is determined whether there is a "no data" fragment. If there are "no data" fragments, in step S311, data is sequentially written into the "no data" fragments of the circular buffer. In step S312, update the state of the fragment whose state has changed (including the length of data to be read in the fragment) and the type information indicating "the state of the fragment has changed" into the resident message in the message box, to indicate that the shard has data to be read. In step S313, the processor 100-1 sends an interrupt to the processor 100-2, and returns to step S309. On the other hand, if there is no "no data" fragment, return to step S304.

具体说来,在步骤S311,当处理器100-1向循环缓存区中的一个“无数据”分片B2-1写入数据后,在步骤S312,处理器100-1可将常驻消息中暂存的分片B2-1的状态信息改为“有数据”状态(包括暂存该分片中待读取的数据长度),同时处理器100-1在步骤S313向处理器100-2发送中断。其中,在步骤S309和S310,若处理器100-1还有数据需要向分片写入且存在“无数据”分片,则可继续向分片写入数据。若处理器100-1还有数据需要向分片写入但所有分片均为“有数据”,则中止处理器100-1向分片写入数据的处理,并返回步骤S304,等待处理器100-2向处理器100-1发送的中断。Specifically, in step S311, after the processor 100-1 writes data to a "no data" slice B2-1 in the circular buffer, in step S312, the processor 100-1 can write the data in the resident message The status information of the temporarily stored fragment B2-1 is changed to "has data" status (including temporarily storing the data length to be read in this fragment), and the processor 100-1 sends the data to the processor 100-2 in step S313 simultaneously. interruption. Wherein, in steps S309 and S310, if the processor 100-1 still has data to be written to the slice and there is a "no data" slice, it can continue to write data to the slice. If the processor 100-1 still has data to be written to the slices but all the slices are "with data", the process of writing data to the slices by the processor 100-1 is terminated, and returns to step S304, waiting for the processor to Interrupt sent by 100-2 to processor 100-1.

另一方面,在数据全部已发送的情况下,在步骤S314,处理器100-1判断是否断开流连接。在断开流连接的情况下,在步骤315,处理器100-1将构造一条流数据消息,该流数据消息可包括指示“请求断开流连接”的类型信息以及相应的请求参数(这里,请求参数可包括流连接的唯一标识、应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的流数据消息写入消息盒中的某一空闲槽中(如果传输数据过程中使用了常驻消息,则此时常驻消息已不再需要,可以直接使用该常驻消息所在的槽来暂存待发送的消息)。在步骤S316,处理器100-1向处理器100-2发送中断,返回执行步骤S304。On the other hand, in the case that all data has been transmitted, in step S314, processor 100-1 determines whether to disconnect the stream connection. In the case of disconnecting the stream connection, in step 315, the processor 100-1 will construct a stream data message, which may include type information indicating "request to disconnect the stream connection" and corresponding request parameters (here, The request parameters may include information such as the unique identifier of the stream connection, the application identifier, the identifiers of the processor 100-1 and the processor 100-2), and then write the constructed stream data message into a certain free slot in the message box ( If a resident message is used during data transmission, the resident message is no longer needed at this time, and the slot where the resident message is located can be directly used to temporarily store the message to be sent). In step S316, the processor 100-1 sends an interrupt to the processor 100-2, and returns to step S304.

返回再次参照图9B,在步骤S402,处理器100-2等待处理器100-1发送的中断。在处理器100-2从处理器100-1接收到中断时,在步骤S403,从消息盒中读取流数据消息并获取类型信息。在步骤S404,判断所述类型信息用于指示哪种流数据传输事件。在根据类型信息判断流数据传输事件为分片状态发生改变(即,分片存有待读取的数据)的情况下,在步骤S409,依次从消息盒中的常驻消息中确定是否存在有待读取的数据的分片,这里,处理器100-2从常驻消息中确定是否存在有待读取的数据的分片时,可从上一次读取的分片开始确定后续分片的状态,而不是从头确定每个分片的状态。在存在“有数据”分片的情况下,在步骤S410,从“有数据”分片中读取数据并清空该分片。在步骤S411,将指示“分片状态发生改变”的类型信息、以及状态发生改变的分片的状态更新到消息盒中的常驻消息中,以表明所述分片中无数据。在步骤S412,处理器100-2向处理器100-1发送中断,返回执行步骤S409。也就是说,每当处理器100-2从处理器100-1接收到用于通知分片存有待读取的数据的中断时,则处理器100-2将依次从“有数据”分片读取数据,直到不存在可读取的数据(即,读取到“无数据”分片),在这种情况下,处理器100-2停止读取数据,并返回步骤S402以等待处理器100-1之后再次发送中断。Referring back to FIG. 9B again, in step S402, the processor 100-2 waits for an interrupt sent by the processor 100-1. When the processor 100-2 receives an interrupt from the processor 100-1, in step S403, reads the stream data message from the message box and acquires the type information. In step S404, it is determined which type of streaming data transmission event the type information is used for. When judging from the type information that the stream data transmission event is a fragmentation state change (that is, the fragmentation stores data to be read), in step S409, it is determined from the resident messages in the message box in turn whether there is a fragmentation state to be read. Fragmentation of the data fetched, here, when the processor 100-2 determines whether there is a fragmentation of the data to be read from the resident message, it can determine the state of the subsequent fragmentation from the fragmentation read last time, and The state of each shard is not determined from scratch. If there is a "data" shard, at step S410, read data from the "has data" shard and clear the shard. In step S411, update the type information indicating "shard status changes" and the status of the segment whose status has changed to the resident message in the message box to indicate that there is no data in the segment. In step S412, the processor 100-2 sends an interrupt to the processor 100-1, and returns to step S409. That is to say, whenever the processor 100-2 receives an interrupt from the processor 100-1 for notifying the fragment that there is data to be read, the processor 100-2 will sequentially read from the "has data" fragment. Fetch data until there is no data that can be read (that is, read the "no data" fragment), in this case, the processor 100-2 stops reading data, and returns to step S402 to wait for the processor 100 Send interrupt again after -1.

另一方面,在根据类型信息判断流数据传输事件为请求断开流连接的情况下,在步骤S413,处理器100-2获取关于断开流连接的请求参数。在步骤S414,根据所述关于断开流连接的请求参数释放分配的循环缓存区,在步骤S415,处理器100-2构造一条流数据消息,该流数据消息可包括指示“流连接已断开”的类型信息以及相应的参数(这里,参数包括流连接的唯一标识、应用标识、处理器100-1和处理器100-2的标识等信息),然后将所构造的流数据消息写入消息盒中的某一空闲槽中,在步骤S416,处理器100-2向处理器100-1发送中断。最后结束本次数据通信。On the other hand, in the case that the streaming data transmission event is determined to be a request to disconnect the streaming connection according to the type information, in step S413, the processor 100-2 acquires request parameters for disconnecting the streaming connection. In step S414, the allocated circular buffer area is released according to the request parameter about disconnecting the stream connection. In step S415, the processor 100-2 constructs a stream data message, which may include an indication that "the stream connection has been disconnected." " type information and corresponding parameters (here, the parameters include information such as the unique identifier of the stream connection, the application identifier, the identifiers of the processor 100-1 and the processor 100-2), and then write the constructed stream data message into the message In a certain free slot in the cartridge, the processor 100-2 sends an interrupt to the processor 100-1 in step S416. Finally, end this data communication.

返回再次参照图9A,在步骤S304,处理器100-1等待处理器100-2发送的中断。在处理器100-1从处理器100-2接收到中断时,在步骤S305,从消息盒中读取流数据消息并获取类型信息。在步骤S306,判断所述类型信息用于指示哪种流数据传输事件。在根据类型信息判断流数据传输事件为分片中的数据已被读取的情况下,执行步骤S309。另一方面,在根据类型信息判断流数据传输事件为流连接已断开的情况下,结束本次数据通信。Referring back to FIG. 9A again, in step S304, the processor 100-1 waits for an interrupt sent by the processor 100-2. When the processor 100-1 receives an interrupt from the processor 100-2, in step S305, the stream data message is read from the message box and the type information is acquired. In step S306, it is determined which type of streaming data transmission event the type information is used to indicate. When it is judged according to the type information that the stream data transmission event is that the data in the segment has been read, step S309 is executed. On the other hand, if it is judged according to the type information that the stream data transmission event is that the stream connection has been disconnected, the current data communication is terminated.

通过上述方式发送流数据时,可以循环重复利用循环缓存区,不需要频繁的执行缓存区的分配与释放操作,提高了通信效率,因此,这种传输方式适合大量、频繁传输数据的数据通信情景。流连接的管理策略可以有效地防止内存的泄露,例如,当通信的一方不需要进行通信时,可以通知通信的另一方断开流连接,使得负责分配缓冲区的数据接收处理器能够及时地释放循环缓存区,防止内存泄露,避免引起数据接收处理器的错误(例如,系统崩溃)。When streaming data is sent through the above method, the circular buffer area can be recycled and reused, and the allocation and release operations of the buffer area do not need to be performed frequently, which improves the communication efficiency. Therefore, this transmission method is suitable for data communication scenarios where a large amount of data is transmitted frequently. . The management strategy of the stream connection can effectively prevent memory leaks. For example, when one party of the communication does not need to communicate, the other party of the communication can be notified to disconnect the stream connection, so that the data receiving processor responsible for allocating the buffer can be released in time. The circular buffer area prevents memory leaks and avoids errors (such as system crashes) that cause data receiving processors.

综上所述,在根据本发明示例性实施例的共享物理内存的多处理器通信系统及其通信方法中,不需要预留全局内存共享区域,多个处理器可通过各自的专用物理内存块互相传递数据,从而提高内存的使用效率,并且,数据传输中减少了数据的复制次数,从而加快数据的传输速度。In summary, in the multiprocessor communication system and communication method for sharing physical memory according to the exemplary embodiments of the present invention, there is no need to reserve a global memory shared area, and multiple processors can use their own dedicated physical memory blocks Transfer data to each other, thereby improving the efficiency of memory usage, and reducing the number of data copies during data transmission, thereby speeding up the speed of data transmission.

应注意,本发明的以上各个实施例仅仅是示例性的,而本发明并不受限于此。本领域技术人员应该理解:在不脱离本发明的原理和精神的情况下,可对这些实施例进行改变,其中,本发明的范围在权利要求及其等同物中限定。It should be noted that the above respective embodiments of the present invention are merely exemplary, and the present invention is not limited thereto. It should be understood by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the present invention, wherein the scope of the present invention is defined in the claims and their equivalents.

Claims (9)

1.一种共享物理内存的多处理器通信系统,包括:1. A multiprocessor communication system sharing physical memory, comprising: 多个处理器,其中,所述多个处理器互相发送和接收数据;a plurality of processors, wherein the plurality of processors send and receive data from each other; 物理内存,被划分为多个物理内存块,使得每个处理器具有一专用物理内存块;Physical memory, divided into multiple physical memory blocks such that each processor has a dedicated physical memory block; 其中,所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块,并且,所述接收处理器从它的专用物理内存块读取所述数据,Wherein, the sending processor that will send the data among the plurality of processors sends the data to the dedicated physical memory block of the receiving processor that will receive the data among the plurality of processors, and the receiving processor receives the data from its dedicated block of physical memory to read said data, 其中,发送处理器请求接收处理器在它的专用物理内存块中分配用于缓存数据的临时数据缓存区,并且,接收处理器响应于发送处理器的请求而分配临时数据缓存区,Wherein, the sending processor requests the receiving processor to allocate a temporary data buffer area for buffering data in its dedicated physical memory block, and the receiving processor allocates the temporary data buffer area in response to the sending processor's request, 其中,所述系统还包括:消息盒,其中,所述消息盒用于暂存若干条具备完整语义的消息,其中,所述发送处理器和所述接收处理器通过所述消息盒进行消息交互,Wherein, the system further includes: a message box, wherein the message box is used to temporarily store several messages with complete semantics, wherein the sending processor and the receiving processor perform message interaction through the message box , 其中,所述临时数据缓存区使用完毕后释放。Wherein, the temporary data buffer area is released after use. 2.如权利要求1所述的系统,其中,所述数据为突发数据,其中,用于缓存突发数据的临时数据缓存区包括单个缓存区。2. The system of claim 1, wherein the data is burst data, wherein the temporary data buffer area for buffering the burst data comprises a single buffer area. 3.如权利要求1所述的系统,其中,所述数据为流数据,其中,用于缓存流数据的临时数据缓存区包括由多个分片组成的循环缓存区。3. The system according to claim 1, wherein the data is streaming data, wherein the temporary data buffer area for buffering the streaming data comprises a circular buffer area composed of a plurality of fragments. 4.如权利要求2所述的系统,其中,消息盒用于暂存突发数据消息,其中,所述突发数据消息包括指示突发数据传输事件的类型信息。4. The system of claim 2, wherein the message box is used to temporarily store burst data messages, wherein the burst data messages include type information indicating a burst data transmission event. 5.如权利要求3所述的系统,其中,消息盒用于暂存流数据消息,其中,所述流数据消息包括指示流数据传输事件的类型信息。5. The system of claim 3, wherein the message box is used to temporarily store streaming data messages, wherein the streaming data messages include type information indicating streaming data transmission events. 6.如权利要求4或5所述的系统,其中,消息盒为从物理内存中划分出的专用区域,或者,消息盒为多处理器通信系统中设置的专用硬件寄存器。6. The system according to claim 4 or 5, wherein the message box is a dedicated area divided from the physical memory, or the message box is a dedicated hardware register set in a multiprocessor communication system. 7.如权利要求6所述的系统,其中,消息盒还暂存常驻消息,其中,所述常驻消息适用于频繁进行消息传递的场景。7. The system according to claim 6, wherein the message box also temporarily stores resident messages, wherein the resident messages are suitable for scenarios where messages are frequently delivered. 8.如权利要求1所述的系统,其中,所述多处理器通信系统集成在单芯片系统中,或者,所述多处理器通信系统集成在共享多端口物理内存的多处理器系统中。8. The system according to claim 1, wherein the multi-processor communication system is integrated in a single-chip system, or the multi-processor communication system is integrated in a multi-processor system sharing a multi-port physical memory. 9.一种共享物理内存的多处理器通信系统的通信方法,其中,所述多处理器通信系统包括多个处理器和物理内存,其中,所述物理内存还包括消息盒,其中,所述消息盒用于暂存若干条具备完整语义的消息,所述多个处理器互相发送和接收数据,所述多个处理器通过所述消息盒进行消息交互,所述方法包括:9. A communication method for a multiprocessor communication system sharing physical memory, wherein the multiprocessor communication system includes a plurality of processors and physical memory, wherein the physical memory also includes a message box, wherein the The message box is used to temporarily store several messages with complete semantics, the multiple processors send and receive data with each other, and the multiple processors perform message interaction through the message box, and the method includes: (a)将物理内存划分为多个物理内存块,使得每个处理器具有一专用物理内存块;(a) dividing the physical memory into a plurality of physical memory blocks such that each processor has a dedicated physical memory block; (b)由所述多个处理器中的将发送数据的发送处理器将数据发送到所述多个处理器中的将接收数据的接收处理器的专用物理内存块;以及(b) sending data, by a sending processor of the plurality of processors that is to send the data, to a dedicated block of physical memory of a receiving processor of the plurality of processors that is to receive the data; and (c)由所述接收处理器从它的专用物理内存块读取所述数据,(c) reading said data by said receiving processor from its dedicated block of physical memory, 其中,在步骤(a)和(b)之间,还包括:Wherein, between steps (a) and (b), also include: (d)发送处理器请求接收处理器在它的专用物理内存块中分配用于缓存数据的临时数据缓存区;(d) The sending processor requests the receiving processor to allocate a temporary data buffer for caching data in its dedicated physical memory block; (e)接收处理器响应于发送处理器的请求而分配临时数据缓存区;(e) the receiving processor allocates a temporary data buffer in response to the sending processor's request; 其中,在步骤(b)中,发送处理器将数据发送到分配的临时数据缓存区;在步骤(c)中,接收处理器从分配的临时数据缓存区读取所述数据,Wherein, in step (b), the sending processor sends data to the allocated temporary data buffer; in step (c), the receiving processor reads the data from the allocated temporary data buffer, 其中,所述临时数据缓存区使用完毕后释放。Wherein, the temporary data buffer area is released after use.
CN201710207715.8A 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory Active CN106980595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710207715.8A CN106980595B (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710207715.8A CN106980595B (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory
CN201410734202.9A CN104462008A (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201410734202.9A Division CN104462008A (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory

Publications (2)

Publication Number Publication Date
CN106980595A CN106980595A (en) 2017-07-25
CN106980595B true CN106980595B (en) 2019-08-13

Family

ID=52908083

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201410734202.9A Pending CN104462008A (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory
CN201710207715.8A Active CN106980595B (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201410734202.9A Pending CN104462008A (en) 2014-12-05 2014-12-05 Multiprocessor communication system and communication method for sharing physical memory

Country Status (2)

Country Link
KR (1) KR20160068633A (en)
CN (2) CN104462008A (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368449A (en) * 2016-05-13 2017-11-21 展讯通信(上海)有限公司 Communication system and method between a kind of processor
CN106383742B (en) * 2016-09-23 2019-10-18 郑州云海信息技术有限公司 A Linux-based IO scheduling method
CN109117268A (en) * 2018-07-20 2019-01-01 首钢集团有限公司 A kind of implementation method and device of mill control system communication middleware
CN109254860A (en) * 2018-09-28 2019-01-22 中国科学院长春光学精密机械与物理研究所 A kind of data processing system and terminal device of heterogeneous polynuclear platform
CN109542830B (en) * 2018-11-21 2022-03-01 北京灵汐科技有限公司 A data processing system and data processing method
CN109933438B (en) * 2019-01-31 2022-12-20 西南电子技术研究所(中国电子科技集团公司第十研究所) High-speed shared memory data receiving and transmitting system
CN110445578B (en) * 2019-07-29 2020-06-23 广芯微电子(广州)股份有限公司 SPI data transmission method and device
CN112015692A (en) * 2020-07-21 2020-12-01 华东理工大学 An optimization method for inter-core communication for Simulink to automatically generate multi-threaded code
CN116010332B (en) * 2023-03-28 2023-06-16 苏州旗芯微半导体有限公司 Multi-core SoC system and memory communication method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178701A (en) * 2007-12-11 2008-05-14 华为技术有限公司 A method and system for communication between multiprocessors
CN102567275A (en) * 2010-12-08 2012-07-11 中国科学院声学研究所 Method and system for memory access among multiple operation systems on multi-core processor

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0926910A (en) * 1995-07-11 1997-01-28 Canon Inc Information processing apparatus and method, information processing system and control method thereof
US6633960B1 (en) * 2000-08-31 2003-10-14 Hewlett-Packard Development Company, L.P. Scalable directory based cache coherence protocol
CN1222882C (en) * 2002-12-05 2005-10-12 华为技术有限公司 Realization method for communication between tasks
US8099777B1 (en) * 2004-08-26 2012-01-17 Rockwell Collins, Inc. High security, multi-level processor and method of operating a computing system
CN100458757C (en) * 2005-07-28 2009-02-04 大唐移动通信设备有限公司 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
US7447846B2 (en) * 2006-04-12 2008-11-04 Mediatek Inc. Non-volatile memory sharing apparatus for multiple processors and method thereof
US8286188B1 (en) * 2007-04-27 2012-10-09 Marvell Israel (M.I.S.L.) Ltd. Method and apparatus for advanced interprocess communication
US9251108B2 (en) * 2012-11-05 2016-02-02 International Business Machines Corporation Managing access to shared buffer resources

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178701A (en) * 2007-12-11 2008-05-14 华为技术有限公司 A method and system for communication between multiprocessors
CN102567275A (en) * 2010-12-08 2012-07-11 中国科学院声学研究所 Method and system for memory access among multiple operation systems on multi-core processor

Also Published As

Publication number Publication date
CN106980595A (en) 2017-07-25
CN104462008A (en) 2015-03-25
KR20160068633A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN106980595B (en) Multiprocessor communication system and communication method for sharing physical memory
CN110209601B (en) Memory interface
CN107690622B9 (en) Method, equipment and system for realizing hardware acceleration processing
US5282272A (en) Interrupt distribution scheme for a computer bus
KR100516286B1 (en) Method and apparatus for transmitting packets within a symmetric multiprocessor system
US20150254104A1 (en) Method and system for work scheduling in a multi-chip system
CN108874687B (en) Non-uniform bus (NUB) interconnect protocol for tiled last level caches
US20080162872A1 (en) Data processing system, method and interconnect fabric supporting high bandwidth communication between nodes
KR20000022712A (en) Non-uniform memory access(numa) data processing system that speculatively issues requests on a node interconnect
TW201543218A (en) Chip device and method for multi-core network processor interconnect with multi-node connection
EP3788492B1 (en) Separating completion and data responses for higher read throughput and lower link utilization in a data processing network
US20090083496A1 (en) Method for Improved Performance With New Buffers on NUMA Systems
CN107341114A (en) A kind of method of directory management, Node Controller and system
US20110179246A1 (en) Apparatus and method for processing data in a massively parallel processor array system
CN103324599A (en) Inter-processor communication method and system on chip
CN111290983A (en) USB transmission equipment and transmission method
CN120104043A (en) Data processing method, device and computing equipment
WO2007096979A1 (en) Information processor and data transfer method
EP3788494B1 (en) Transfer protocol in a data processing network
KR101087811B1 (en) Cache Line Ownership Transfer Method and Cache Line Ownership Transfer Device
US20140082300A1 (en) Apparatus and method for maintaining cache coherency, and multiprocessor apparatus using the method
US20160162199A1 (en) Multi-processor communication system sharing physical memory and communication method thereof
JPWO2010119932A1 (en) Multiprocessor system, memory management method and communication program in multiprocessor system
CN101278277B (en) Operation processing device
US20240411680A1 (en) Dynamic memory allocation using a shared free list

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant