CN1332334C - Multi-processor communication and its communication method - Google Patents

Multi-processor communication and its communication method Download PDF

Info

Publication number
CN1332334C
CN1332334C CNB200410000825XA CN200410000825A CN1332334C CN 1332334 C CN1332334 C CN 1332334C CN B200410000825X A CNB200410000825X A CN B200410000825XA CN 200410000825 A CN200410000825 A CN 200410000825A CN 1332334 C CN1332334 C CN 1332334C
Authority
CN
China
Prior art keywords
communication
processor
register
interrupt
multiprocessor
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.)
Expired - Fee Related
Application number
CNB200410000825XA
Other languages
Chinese (zh)
Other versions
CN1641619A (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.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CNB200410000825XA priority Critical patent/CN1332334C/en
Publication of CN1641619A publication Critical patent/CN1641619A/en
Application granted granted Critical
Publication of CN1332334C publication Critical patent/CN1332334C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

本发明涉及一种多处理机通信装置及其通信方法,包括通信端口和交叉交换单元,处理机的外部存储器接口与所述通信端口相连,所述通信端口间通过所述交叉交换单元进行数据传输,所述通信端口包括中断控制单元和通信端口寄存器组;所述多处理机通信装置和通信方法,实现了不同类型的处理机间全互联、直接的实时通信,提高了通信装置的通用性。该通信装置中还具有中断发生装置,一旦有其它处理机向该处理机产生通信请求时,会产生一个中断信号,该中断信号能适合电平触发和沿触发的要求,在多个处理机向同一个处理机同时发送通信请求时,也不会丢失中断信息;通信装置中使用交叉交换单元实现各通信端口的信息交换,系统中任何处理机间可以独立的进行通信。

Figure 200410000825

The invention relates to a multiprocessor communication device and a communication method thereof, comprising a communication port and a crossover unit, the external memory interface of a processor is connected to the communication port, and data transmission is performed between the communication ports through the crossover unit The communication port includes an interrupt control unit and a communication port register group; the multiprocessor communication device and communication method realize full interconnection and direct real-time communication among different types of processors, and improve the versatility of the communication device. The communication device also has an interrupt generating device. Once other processors generate a communication request to the processor, an interrupt signal will be generated. The interrupt signal can meet the requirements of level trigger and edge trigger. When the same processor sends communication requests at the same time, the interrupt information will not be lost; the communication device uses a cross-switch unit to realize the information exchange of each communication port, and any processor in the system can communicate independently.

Figure 200410000825

Description

一种多处理机通信装置及其通信方法A multiprocessor communication device and communication method thereof

技术领域technical field

本发明涉及一种通信装置及其通信方法,尤其涉及一种应用于多处理机间通信的通信装置及其通信方法。The invention relates to a communication device and a communication method thereof, in particular to a communication device and a communication method applied to multiprocessor communication.

背景技术Background technique

目前使用多处理机进行并行处理是提高系统性能的最好方法之一,大型嵌入式设备也经常被设计成多处理机系统。多处理机系统广泛应用于实时应用系统、及其它对计算能力要求很高的处理系统中。这些系统正日趋复杂,它们可能需要使用同一种类型的多个处理机来构成一个并行系统,也可能需要使用不同类型的多个处理机构成一个系统,无论哪一种情况,处理机之间一般都需要进行通信,尤其在实时应用中,更需要高速可靠的通信手段,以有效保证系统的实时性。Currently using multiprocessors for parallel processing is one of the best ways to improve system performance, and large embedded devices are often designed as multiprocessor systems. Multiprocessor systems are widely used in real-time application systems and other processing systems that require high computing power. These systems are becoming more and more complex. They may need to use multiple processors of the same type to form a parallel system, or they may need to use multiple processors of different types to form a system. All need to communicate, especially in real-time applications, more high-speed and reliable communication means are needed to effectively ensure the real-time performance of the system.

为了解决多个处理机的互联通信问题,现有技术中,采用处理机本身设计的高速接口进行互联通信,但高速接口是自行设计的处理机本身带有的端口,这些接口通常只是企业内部标准,一般只能与同类型的处理机通信。也就是说采用这种高速接口进行多处理机间互联通信不具通用性,大多数处理机并不具备这种直接通信的能力,给这些处理机间的快速通信带来了困难。In order to solve the problem of interconnection and communication of multiple processors, in the prior art, the high-speed interface designed by the processor itself is used for interconnection communication, but the high-speed interface is a self-designed port of the processor itself, and these interfaces are usually only the internal standards of the enterprise , generally only communicate with processors of the same type. That is to say, the use of this high-speed interface for inter-multiprocessor interconnection communication is not universal, and most processors do not have this direct communication capability, which brings difficulties to the rapid communication between these processors.

发明内容Contents of the invention

本发明要解决的技术问题是提供一种多处理机通信装置及其通信方法,提高其通用性,实现多处理机间全互联连接,通信信息可直接实时、稳定传输,避免了通信信息丢失,从而提高了通信可靠性。The technical problem to be solved by the present invention is to provide a multiprocessor communication device and its communication method, improve its versatility, realize full interconnection between multiprocessors, and communicate information directly in real time and stably, avoiding the loss of communication information, Communication reliability is thereby improved.

为了解决上述技术问题,本发明提供一种多处理机通信装置,包括多个通信端口和交叉交换单元,多处理机的每一个处理机的外部存储器接口与所述多个通信端口的一个相连,所述通信端口间通过所述交叉交换单元进行数据传输,所述通信端口包括中断控制单元和通信端口寄存器组,所述通信端口寄存器组包括通信设置寄存器、通信响应寄存器、通信源寄存器和消息寄存器组,其中:In order to solve the above technical problems, the present invention provides a multiprocessor communication device, including a plurality of communication ports and a crossover unit, the external memory interface of each processor of the multiprocessor is connected to one of the plurality of communication ports, Data transmission is performed between the communication ports through the cross switch unit, the communication port includes an interrupt control unit and a communication port register group, and the communication port register group includes a communication setting register, a communication response register, a communication source register and a message register group, where:

所述通信设置寄存器用于向其他通信端口发送通信请求;The communication setting register is used to send communication requests to other communication ports;

所述通信响应寄存器用于向其他通信端口发送通信响应信号;The communication response register is used to send communication response signals to other communication ports;

所述通信源寄存器用于指示通信源;The communication source register is used to indicate a communication source;

所述消息寄存器组用于存储来自中断信号源的通信信息。The message register group is used to store communication information from interrupt signal sources.

在上述方案中,所述交叉交换单元完全互联,每个通信相互独立,所述交叉交换单元使用统一的时钟信号,与所述通信装置连接的所述处理机的时钟无关。In the above solution, the cross-switch units are completely interconnected, and each communication is independent of each other, and the cross-switch units use a unified clock signal, which has nothing to do with the clock of the processor connected to the communication device.

在上述方案中,所述通信端口以中断方式响应通信,发出中断信号,所述中断控制单元接收所述通信端口发来的中断信号,进行中断服务处理;通过所述通信端口寄存器组,处理机的外部存储器接口直接控制所述通信端口寄存器组的读写。In the above scheme, the communication port responds to communication in an interrupt mode and sends an interrupt signal, and the interrupt control unit receives the interrupt signal sent by the communication port to perform interrupt service processing; through the communication port register set, the processor The external memory interface directly controls the reading and writing of the communication port register set.

在上述方案中,所述中断控制单元处理电平触发中断和沿触发中断,多端口向同一端口发送通信请求时,即多个处理机向同一处理机发送通信请求,所述中断控制单元多次发送中断请求。In the above solution, the interrupt control unit processes level-triggered interrupts and edge-triggered interrupts. When multiple ports send communication requests to the same port, that is, multiple processors send communication requests to the same processor, the interrupt control unit multiple times Send an interrupt request.

在上述方案中,所述通信设置寄存器由低位和高立两部分组成,低位是通信目标代码,高位用于描述通信信息。In the above scheme, the communication setting register is composed of a low bit and a high bit, the low bit is the communication object code, and the high bit is used to describe the communication information.

在上述方案中,所述通信响应寄存器和所述通信源寄存器的每一位代表一个处理机。In the above solution, each bit of the communication response register and the communication source register represents a processor.

在上述方案中,所述消息寄存器组中的每一个对应一个处理机。In the above solution, each of the message register groups corresponds to a processor.

在上述方案中,所述通信信息带有软件自定义的通信编码。In the above solution, the communication information has a software-defined communication code.

在上述方案中,所述通信端口以查询方式响应通信,处理机通过直接访问所述通信源寄存器组来查看通信请求。In the solution above, the communication port responds to communication in an inquiry manner, and the processor checks the communication request by directly accessing the communication source register set.

本发明提供一种多处理机通信方法,应用于多处理机系统中,包括以下步骤:The present invention provides a multiprocessor communication method, which is applied in a multiprocessor system, comprising the following steps:

a)源处理机通过所述通信装置向目标处理机发送通信请求,通信请求包括目标信息和通信信息;a) The source processor sends a communication request to the target processor through the communication device, and the communication request includes target information and communication information;

b)所述通信装置将通信信息写入目标处理机对应的通信端口中保存,在目标处理机对应的通信端口中指明通信源,同时向目标处理机发送中断信号;b) The communication device writes the communication information into the communication port corresponding to the target processor for storage, specifies the communication source in the communication port corresponding to the target processor, and simultaneously sends an interrupt signal to the target processor;

c)目标处理机接收到源处理机发出的中断信号后,进入中断处理服务,判断是源处理机发来的通信请求;c) After the target processor receives the interrupt signal sent by the source processor, it enters the interrupt processing service, and judges that it is a communication request sent by the source processor;

d)目标处理机读取已保存的通信信息的内容,对内容进行判断;d) The target processor reads the content of the stored communication information and judges the content;

e)目标处理机根据判断结果进行相应的处理;e) The target processor performs corresponding processing according to the judgment result;

f)目标处理机清除源处理机发来的中断;f) The target processor clears the interrupt sent by the source processor;

g)目标处理机判断是否需要向源处理机发送响应信息?如果是,转到步骤a),g) The target processor judges whether it needs to send a response message to the source processor? If yes, go to step a),

此时源处理机和目标处理机位置互换,如果否,执行下一步;At this time, the positions of the source processor and the target processor are exchanged, if not, go to the next step;

h)通信结束。h) The communication ends.

由上可知,通过所述通信装置和通信方法可实现不同类型的多处理机间全互联的直接、实时通信,通信装置中使用交叉交换单元实现各通信端口的信息交换,系统中任何处理机间可以独立地进行通信;所述通信装置可连接不同类型的处理机,提高了通用性。As can be seen from the above, the communication device and the communication method can realize the direct and real-time communication of full interconnection among different types of multiprocessors, and the communication device uses a crossover unit to realize the information exchange of each communication port. The communication can be carried out independently; the communication device can be connected with different types of processors, which improves the versatility.

此外,所述通信装置中有中断发生装置,在多个处理机向同一个处理机同时发送通信请求时,也不会丢失中断信息,从而提高了通信的可靠性。In addition, there is an interrupt generating device in the communication device, and when multiple processors send communication requests to the same processor at the same time, the interrupt information will not be lost, thereby improving the reliability of communication.

附图说明Description of drawings

图1是本发明实施例多处理机通信装置的结构框图;Fig. 1 is the structural block diagram of multiprocessor communication device of the embodiment of the present invention;

图2是本发明实施例多处理机通信装置中的通信端口组成图;Fig. 2 is a composition diagram of a communication port in a multiprocessor communication device according to an embodiment of the present invention;

图3是本发明实施例多处理机通信装置的通信端口中的中断控制逻辑图;Fig. 3 is an interrupt control logic diagram in a communication port of a multiprocessor communication device according to an embodiment of the present invention;

图4a是本发明多处理机通信装置的通信方法流程图;Fig. 4a is a flow chart of the communication method of the multiprocessor communication device of the present invention;

图4b是本发明实施例多处理机通信装置的通信方法流程图;FIG. 4b is a flowchart of a communication method of a multiprocessor communication device according to an embodiment of the present invention;

具体实施方式Detailed ways

多处理机间要进行通信,就需要通过通信装置来发送和接收通信信息,这就需要读写外部存储器。处理机的外部存储器接口可以分为2种类型,同步接口和异步接口。同步接口用于和同步存储器(如SDRAM、DDR RAM等)连接,异步接口用于和异步存储器(如DRAM、FLASH、ROM等)连接,异步存储器接口一般不需要时钟控制,在各种处理机中广泛存在,本发明使用异步存储器接口。To communicate between multiprocessors, it is necessary to send and receive communication information through a communication device, which requires reading and writing external memory. The external memory interface of the processor can be divided into 2 types, synchronous interface and asynchronous interface. Synchronous interface is used to connect with synchronous memory (such as SDRAM, DDR RAM, etc.), and asynchronous interface is used to connect with asynchronous memory (such as DRAM, FLASH, ROM, etc.). Asynchronous memory interface generally does not need clock control. In various processors Widely present, the present invention uses an asynchronous memory interface.

异步存储器接口通常有三部分组成:地址信号、控制信号、数据总线,根据特定处理机的地址映射情况和数据访问情况来定义地址总线宽度和数据总线宽度。The asynchronous memory interface usually consists of three parts: address signal, control signal, and data bus. The address bus width and data bus width are defined according to the address mapping and data access conditions of a specific processor.

下面参见附图详细说明本发明的技术方案。The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.

图1是多处理机通信装置的结构框图,如图所示,多处理机通信装置包括通信端口和交叉交换单元。连接N个处理机的通信装置具有N个通信端口,第一通信端口11,第二通信端口12,第三通信端口13,第四通信端口14,第五通信端口15,及第N通信端口16,以上通信端口之间通过交叉交换单元17进行数据交换。每个端口结构组成均相同,每个端口有一个中断信号,用于给处理机发送中断控制;另外,每个端口有一组寄存器,称为通信端口寄存器组,处理机的外部存储器接口直接控制这些通信端口寄存器组的读写。FIG. 1 is a structural block diagram of a multiprocessor communication device. As shown in the figure, the multiprocessor communication device includes a communication port and a crossover unit. The communication device connecting N processing machines has N communication ports, the first communication port 11, the second communication port 12, the third communication port 13, the fourth communication port 14, the fifth communication port 15, and the Nth communication port 16 , data exchange is performed between the above communication ports through the cross switch unit 17 . The structure of each port is the same, each port has an interrupt signal, which is used to send interrupt control to the processor; in addition, each port has a set of registers, called the communication port register set, and the external memory interface of the processor directly controls these Read and write of the communication port register set.

下面结合图2详细描述本发明实施例中的多处理机通信装置的通信端口。The communication ports of the multiprocessor communication device in the embodiment of the present invention will be described in detail below with reference to FIG. 2 .

图2是通信装置中的通信端口结构组成图,如图所示,通信端口包括一组用于处理机间通信的通信端口寄存器组26及中断控制单元25。通信端口寄存器组由通信设置寄存器21、通信响应寄存器22、通信源寄存器23和消息寄存器组24组成。其中:FIG. 2 is a structural diagram of the communication port in the communication device. As shown in the figure, the communication port includes a set of communication port registers 26 and an interrupt control unit 25 for inter-processor communication. The communication port register group is composed of a communication setting register 21 , a communication response register 22 , a communication source register 23 and a message register group 24 . in:

通信设置寄存器21是用于向其它处理机发送通信请求,它由两部分组成,低位是(N-1)位通信目标代码,高(M)位用于描述通信信息,通信信息是由软件自定义的通信编码,处理机之间可以通过这些通信信息进行高速的小量信息传输,达到快速响应的要求,也可以使用这些通信信息来说明此次通信的含义。也就是说,处理机之间不仅能完成互相发送中断的操作,还可以直接传送数据,对于具体的数据量,可根据需要自定义。The communication setting register 21 is used to send communication requests to other processors, and it is made up of two parts, and the low order is (N-1) position communication target code, and high (M) position is used for describing communication information, and communication information is automatically generated by the software. The defined communication code, the processors can use these communication information to carry out high-speed small amount of information transmission to meet the requirements of quick response, and these communication information can also be used to explain the meaning of this communication. That is to say, the processors can not only complete the operation of sending interrupts to each other, but also directly transmit data, and the specific amount of data can be customized according to needs.

通信响应寄存器22用于向其它处理机发送通信响应信号,它由(N-1)位组成,每位代表系统中除本处理机外的一个处理机,写1表示要清除与相对应的处理机的中断信号。The communication response register 22 is used to send communication response signals to other processors, and it is made up of (N-1) bits, and each represents a processor in the system except this processor, and writing 1 means to clear the corresponding processing Machine interrupt signal.

通信源寄存器23用于指示是哪些处理机是通信源,它由(N-1)位组成,每一位对应了一个处理机,如果某位值为1,则表示对应的处理机向本处理机发送了通信请求,为0表示没有通信请求。The communication source register 23 is used to indicate which processors are communication sources, and it is made up of (N-1) bits, and each bit corresponds to a processor, and if a certain bit value is 1, it means that the corresponding processor is processing The computer has sent a communication request, and 0 means there is no communication request.

(N-1个)消息寄存器组24中存放了来自中断信号源源的通信消息,每个寄存器的宽度是M位,每一个寄存器对应一个处理机,用于存储其它处理机发来的通信信息。The (N-1) message register group 24 stores communication messages from interrupt signal sources. The width of each register is M bits, and each register corresponds to a processor for storing communication information sent by other processors.

如图1和图2所示,如果某处理机向其端口寄存器组中的通信设置寄存器进行了写操作,交叉交换单元就会根据通信设置寄存器中的通信目标代码内容,把通信设置寄存器中的通信信息写到通信目标代码中值为1的对应处理机的消息寄存器中,并把目标处理机的通信源寄存器的对应位置1。通信装置中的交叉交换单元17是完全互联的,每个通信都是相互独立的。交叉交换单元17使用统一的时钟信号,与处理机的时钟无关,系统中的处理机可以工作在相同的频率,也可以工作在不同的频率,这些处理机还可以是不同类型。As shown in Figure 1 and Figure 2, if a processor writes to the communication setting register in its port register group, the cross-switch unit will write the communication object code content in the communication setting register to the communication setting register. The communication information is written into the message register of the corresponding processor whose value is 1 in the communication target code, and the corresponding position of the communication source register of the target processor is set to 1. The cross-switch units 17 in the communication device are fully interconnected, and each communication is independent of each other. The cross switch unit 17 uses a unified clock signal, which has nothing to do with the clocks of the processors. The processors in the system can work at the same frequency or at different frequencies, and these processors can also be of different types.

通信端口寄存器组中,需要进行通信的每个处理机都有对应的寄存器进行控制,它可以接受来自任何一个或者多个处理机发送的通信请求,也可以向任何一个或多个处理机发送通信请求信息,系统中的处理机能进行全互联的通信。当源处理机向目标处理机发送通信请求后,目标处理机的通信源寄存器在对应位就会置1,同时中断控制单元会向目标处理机发送中断信号,中断信号在通信端口的逻辑控制单元25中进行中断信号处理,然后目标处理机从源处理机读取信息。In the communication port register group, each processor that needs to communicate has a corresponding register to control, it can accept communication requests sent from any one or more processors, and can also send communications to any one or more processors Request information, and the processors in the system communicate fully interconnectedly. When the source processor sends a communication request to the target processor, the corresponding bit of the communication source register of the target processor will be set to 1, and at the same time, the interrupt control unit will send an interrupt signal to the target processor, and the interrupt signal will be sent to the logic control unit of the communication port. 25 for interrupt signal processing, and then the destination processor reads information from the source processor.

下面结合图3详细说明通信端口中的中断控制单元对中断信号的处理。The processing of the interrupt signal by the interrupt control unit in the communication port will be described in detail below in conjunction with FIG. 3 .

图3是通信装置中通信端口的中断控制单元原理图,如图所示,系统复位后,计数逻辑的输出端(B)为1。通信源寄存器的任何一位或几位置0(由1变为0)时,计数逻辑的输入端(A端)有一个周期的高电平,计数逻辑检测到输入A的高电平后,把计数器复位为0,并把输出B置为0,计数器开始进行加1计数,当计数器满时,停止计数,输出B置为1,这样就强制在通信源寄存器的任何一位或几位置1时,中断信号有一个低电平。FIG. 3 is a schematic diagram of the interrupt control unit of the communication port in the communication device. As shown in the figure, after the system is reset, the output terminal (B) of the counting logic is 1. When any one or several positions of the communication source register are 0 (change from 1 to 0), the input terminal (A terminal) of the counting logic has a high level for one cycle, and after the counting logic detects the high level of the input A, it will The counter is reset to 0, and the output B is set to 0, and the counter starts counting by 1. When the counter is full, it stops counting, and the output B is set to 1, which forces any one or several positions of the communication source register to be 1. , the interrupt signal has a low level.

中断控制单元可以避免丢失通信信息。如果图3中处理机A发来了中断请求,这时将产生一个中断信号,目标处理机读其通信源寄存器时,处理机B又发来一个通信请求,这时处理机将不能立刻处理这个请求。在目标处理机处理完处理机A的通信请求后,将向其通信源寄存器的A位置写0,中断控制逻辑将在一定的延时(由计数器控制)后,再次给出处理机B的中断。Interrupting the control unit avoids loss of communication information. If processor A in Figure 3 sends an interrupt request, an interrupt signal will be generated at this time. When the target processor reads its communication source register, processor B will send another communication request. At this time, the processor will not be able to process this immediately. ask. After the target processor finishes processing the communication request of processor A, it will write 0 to the A position of its communication source register, and the interrupt control logic will give the interrupt of processor B again after a certain delay (controlled by the counter). .

由于计数逻辑的作用,中断控制单元产生的中断信号能同时满足处理机的沿触发中断和电平触发中断的要求。中断控制单元保证了在多个处理机向同一个处理机同时发送通信请求时,中断控制单元能多次发送中断请求,不会丢失中断信息。Due to the function of the counting logic, the interrupt signal generated by the interrupt control unit can meet the requirements of edge-triggered interrupt and level-triggered interrupt of the processor at the same time. The interrupt control unit ensures that when multiple processors send communication requests to the same processor at the same time, the interrupt control unit can send interrupt requests multiple times without losing interrupt information.

处理机除了可以使用中断的方式响应通信外,也可以直接访问其通信源寄存器来判断是否有其它处理机的通信请求,这种方式称为查询方式,使用这种通信方式,处理机可以不需要外部中断接口。由于每个中断源都有相对应的消息寄存器,多个处理机向同一个处理机发送通信请求时,通信信息也是相互独立的,目标处理机也可以识别出每一个通信请求。In addition to using interrupts to respond to communication, the processor can also directly access its communication source registers to determine whether there are communication requests from other processors. This method is called query mode. Using this communication method, the processor does not need to External interrupt interface. Since each interrupt source has a corresponding message register, when multiple processors send communication requests to the same processor, the communication information is also independent of each other, and the target processor can also identify each communication request.

如图4a所示,一种应用于多处理机系统中的多处理机通信方法,包括以下步骤:As shown in Figure 4a, a multiprocessor communication method applied in a multiprocessor system comprises the following steps:

a)源处理机通过通信装置向目标处理机发送通信请求,通信请求包括目标信息和通信信息;a) The source processor sends a communication request to the target processor through the communication device, and the communication request includes target information and communication information;

b)通信装置将通信信息写入目标处理机对应的通信端口中保存,在目标处理机对应的通信端口中指明通信源,同时向目标处理机发送中断信号;b) The communication device writes the communication information into the communication port corresponding to the target processor for preservation, specifies the communication source in the communication port corresponding to the target processor, and sends an interrupt signal to the target processor simultaneously;

c)目标处理机接收到源处理机发出的中断信号后,进入中断处理服务,判断是源处理机发来的通信请求;c) After the target processor receives the interrupt signal sent by the source processor, it enters the interrupt processing service, and judges that it is a communication request sent by the source processor;

d)目标处理机读取已保存的通信信息的内容,对内容进行判断;d) The target processor reads the content of the stored communication information and judges the content;

e)目标处理机根据判断结果进行相应的处理;e) The target processor performs corresponding processing according to the judgment result;

f)目标处理机清除源处理机发来的中断;f) The target processor clears the interrupt sent by the source processor;

g)目标处理机判断是否需要向源处理机发送响应信息?如果是,执行步骤a),g) The target processor judges whether it needs to send a response message to the source processor? If yes, go to step a),

此时源处理机和目标处理机位置互换,如果否,执行下一步;At this time, the positions of the source processor and the target processor are exchanged, if not, go to the next step;

h)通信结束。h) The communication ends.

以下用通信示例来说明多处理机的通信方法。系统中有4个处理机,通信设置寄存器中用3位表示通信目标代码,用4位描述通信信息。每个处理机访问的通信目标代码和通信源寄存器的每一位对应关系如下:The communication method of the multiprocessor is described below with a communication example. There are 4 processors in the system, 3 bits are used to represent the communication target code in the communication setup register, and 4 bits are used to describe the communication information. The corresponding relationship between the communication object code accessed by each processor and each bit of the communication source register is as follows:

    位1 bit 1     位2 Bit 2     位3 Bit 3     处理机1 Processor 1     处理机2 Processor 2     处理机3 Processor 3     处理机4 Processor 4     处理机2 Processor 2     处理机1 Processor 1     处理机3 Processor 3     处理机4 Processor 4     处理机3 Processor 3     处理机1 Processor 1     处理机2 Processor 2     处理机4 Processor 4     处理机4 Processor 4     处理机1 Processor 1     处理机2 Processor 2     处理机3 Processor 3

如图4b所示,当第一处理机向第三处理机发送通信信息(0001)时,通信装置完成通信过程包括以下步骤:As shown in Figure 4b, when the first processor sends communication information (0001) to the third processor, the communication device completes the communication process including the following steps:

步骤100,第一处理机向其通信设置寄存器中写入(0001010),其中后三位010中的“1”代表向该位对应处理机发送通信信息0001,即第一处理机向第三处理机发送通信请求0001;Step 100, the first processor writes (0001010) into its communication setting register, wherein "1" in the last three digits 010 represents sending communication information 0001 to the processor corresponding to the bit, that is, the first processor sends the communication information to the third processor The computer sends a communication request 0001;

步骤110,交叉单元根据通信设置寄存器中的目标信息内容(010),把通信信息(0001)写到第三处理机的第一消息寄存器中,并向第三处理机发送中断信号,同时把连接第三处理机的第三通信端口中的通信源寄存器的对应位置1,即100(对照上表);Step 110, the crossover unit writes the communication information (0001) into the first message register of the third processor according to the target information content (010) in the communication setting register, and sends an interrupt signal to the third processor, and at the same time connects The corresponding position of the communication source register in the third communication port of the third processor is 1, i.e. 100 (compare the table above);

步骤120,第三处理机接收第一处理单元发出的中断信号,进入中断处理服务,在连接第三处理机的通信端口内的中断控制单元中进行中断信号处理,读取其通信源寄存器的值100,可以判断第一处理机发过来的通信请求;Step 120, the third processor receives the interrupt signal sent by the first processing unit, enters the interrupt processing service, performs interrupt signal processing in the interrupt control unit connected to the communication port of the third processor, and reads the value of its communication source register 100. It is possible to determine the communication request sent by the first processor;

步骤130,第三处理机读取通信端口中的第一消息寄存器的信息,判断通信内容;Step 130, the third processor reads the information of the first message register in the communication port, and judges the communication content;

步骤140,第三处理机进行相应的处理;Step 140, the third processor performs corresponding processing;

步骤150,第三处理机在通信端口内的通信响应寄存器上写000,清除从第一处理机发过来的中断。Step 150, the third processor writes 000 to the communication response register in the communication port to clear the interrupt sent from the first processor.

步骤160,第三处理机对通信信息处理完成后,如果需要给第一处理机发送通信反馈信息,就可以按照以上方法向第一处理机发送信息。Step 160, after the third processor finishes processing the communication information, if it needs to send communication feedback information to the first processor, it can send information to the first processor according to the above method.

在上述通信过程中,如果第三处理机先后接收到第一处理机和第二处理机发来的中断信号时,由上述中断控制单元功能的描述可知,连接第三处理机的通信端口内的中断控制单元在处理完第一处理机发来的中断信号后,中断控制单元在一定延时后,再次给出第二处理机的中断信号,然后对其进行处理。中断信号的处理与步骤130相同,只是读取通信源寄存器的值不同。In the above communication process, if the third processor successively receives the interrupt signals sent by the first processor and the second processor, it can be known from the description of the function of the interrupt control unit that the communication port connected to the third processor After the interrupt control unit has processed the interrupt signal sent by the first processor, the interrupt control unit gives the interrupt signal of the second processor again after a certain delay, and then processes it. The processing of the interrupt signal is the same as step 130, except that the value of the read communication source register is different.

在多处理机(大于3)互联的情况下,上述通信过程步骤和中断处理过程同样适用,只是通信设置寄存器、通信响应寄存器、通信源寄存器的长度随着处理机的个数发生变化,每位的值随着通信对象的不同根据每个寄存器的规定发生变化。In the case of multi-processors (more than 3) interconnected, the above-mentioned communication process steps and interrupt processing process are also applicable, except that the length of the communication setting register, communication response register, and communication source register changes with the number of processors. The value of varies with the communication object according to the regulations of each register.

Claims (10)

1、一种多处理机通信装置,包括交叉交换单元,其特征在于,还包括多个通信端口,多处理机的每一个处理机的外部存储器接口与所述多个通信端口中的一个相连,所述通信端口间通过所述交叉交换单元进行数据传输,所述通信端口包括中断控制单元和通信端口寄存器组,所述通信端口寄存器组包括通信设置寄存器、通信响应寄存器、通信源寄存器和消息寄存器组,其中:1. A multiprocessor communication device, comprising a crossover unit, characterized in that it also includes a plurality of communication ports, and the external memory interface of each processor of the multiprocessor is connected to one of the plurality of communication ports, Data transmission is performed between the communication ports through the cross switch unit, the communication port includes an interrupt control unit and a communication port register group, and the communication port register group includes a communication setting register, a communication response register, a communication source register and a message register group, where: 所述通信设置寄存器用于向其他通信端口发送通信请求;The communication setting register is used to send communication requests to other communication ports; 所述通信响应寄存器用于向其他通信端口发送通信响应信号;The communication response register is used to send communication response signals to other communication ports; 所述通信源寄存器用于指示通信源;The communication source register is used to indicate a communication source; 所述消息寄存器组用于存储来自中断信号源的通信信息。The message register group is used to store communication information from interrupt signal sources. 2、如权利要求1所述的多处理机通信装置,其特征在于,所述交叉交换单元完全互联,每个通信相互独立,所述交叉交换单元使用统一的时钟信号,与所述通信装置连接的所述处理机的时钟无关。2. The multiprocessor communication device according to claim 1, wherein the crossover unit is completely interconnected, and each communication is independent of each other, and the crossover unit uses a unified clock signal to connect with the communication device The clock of the processor is irrelevant. 3、如权利要求1所述的多处理机通信装置,其特征在于,所述通信端口以中断方式响应通信,由所述中断控制单元发出中断信号;通过所述通信端口寄存器组,处理机的外部存储器接口直接控制所述通信端口寄存器组的读写。3. The multiprocessor communication device according to claim 1, wherein the communication port responds to communication in an interrupt mode, and the interrupt control unit sends an interrupt signal; through the communication port register group, the processor's The external memory interface directly controls the reading and writing of the communication port register set. 4、如权利要求1所述的多处理机通信装置,其特征在于,所述中断控制单元处理电平触发中断和沿触发中断,多端口向同一端口发送通信请求时,即多个处理机向同一处理机发送通信请求,所述中断控制单元能多次发送中断请求。4. The multiprocessor communication device according to claim 1, wherein the interrupt control unit processes level-triggered interrupts and edge-triggered interrupts, and when multiple ports send a communication request to the same port, that is, multiple processors send a communication request to the same port. The same processor sends a communication request, and the interrupt control unit can send the interrupt request multiple times. 5、如权利要求1所述的多处理机通信装置,其特征在于,所述通信设置寄存器由低位和高位两部分组成,低位是通信目标代码,高位用于描述通信信息。5. The multiprocessor communication device according to claim 1, wherein the communication setting register is composed of low bits and high bits, the low bits are communication object codes, and the high bits are used to describe communication information. 6、如权利要求1所述的多处理机通信装置,其特征在于,所述通信响应寄存器和所述通信源寄存器的每一位代表一个处理机。6. The multiprocessor communication device according to claim 1, wherein each bit of said communication response register and said communication source register represents a processor. 7、如权利要求1所述的多处理机通信装置,其特征在于,所述消息寄存器组中的每一个对应一个处理机。7. The multiprocessor communication device of claim 1, wherein each of said message register groups corresponds to a processor. 8、如权利要求5所述的多处理机通信装置,其特征在于,所述通信信息带有软件自定义的通信编码。8. The multiprocessor communication device according to claim 5, wherein said communication information carries a software-defined communication code. 9、如权利要求1或2所述的多处理机通信装置,其特征在于,所述通信端口以查询方式响应通信,直接访问所述通信源寄存器组查看通信请求。9. The multiprocessor communication device according to claim 1 or 2, wherein the communication port responds to the communication in a query mode, and directly accesses the communication source register group to check the communication request. 10、一种应用权利要求1所述的多处理机通信装置进行处理机通信方法,包括以下步骤:10. A method for processor communication using the multiprocessor communication device described in claim 1, comprising the following steps: a)源处理机通过所述通信装置向目标处理机发送通信请求,通信请求包括目标信息和通信信息;a) The source processor sends a communication request to the target processor through the communication device, and the communication request includes target information and communication information; b)所述通信装置将通信信息写入目标处理机对应的通信端口中保存,在目标处理机对应的通信端口中指明通信源,同时向目标处理机发送中断信号;b) The communication device writes the communication information into the communication port corresponding to the target processor for storage, specifies the communication source in the communication port corresponding to the target processor, and simultaneously sends an interrupt signal to the target processor; c)目标处理机接收到源处理机发出的中断信号后,进入中断处理服务,判断是源处理机发来的通信请求;c) After the target processor receives the interrupt signal sent by the source processor, it enters the interrupt processing service, and judges that it is a communication request sent by the source processor; d)目标处理机读取已保存的通信信息的内容,对内容进行判断;d) The target processor reads the content of the stored communication information and judges the content; e)目标处理机限据判断结果进行相应的处理;e) The target processor performs corresponding processing according to the judgment result; f)目标处理机清除源处理机发来的中断;f) The target processor clears the interrupt sent by the source processor; g)目标处理机判断是否需要向源处理机发送响应信息,如果是,转到步骤a),此时源处理机和目标处理机位置互换,如果否,执行下一步;g) The target processor judges whether it needs to send a response message to the source processor, if yes, go to step a), at this time, the source processor and the target processor are exchanged, if not, execute the next step; h)通信结束。h) The communication ends.
CNB200410000825XA 2004-01-17 2004-01-17 Multi-processor communication and its communication method Expired - Fee Related CN1332334C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410000825XA CN1332334C (en) 2004-01-17 2004-01-17 Multi-processor communication and its communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410000825XA CN1332334C (en) 2004-01-17 2004-01-17 Multi-processor communication and its communication method

Publications (2)

Publication Number Publication Date
CN1641619A CN1641619A (en) 2005-07-20
CN1332334C true CN1332334C (en) 2007-08-15

Family

ID=34866905

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410000825XA Expired - Fee Related CN1332334C (en) 2004-01-17 2004-01-17 Multi-processor communication and its communication method

Country Status (1)

Country Link
CN (1) CN1332334C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236576B (en) * 2008-01-31 2011-12-07 复旦大学 Interconnecting model suitable for heterogeneous reconfigurable processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1248021A (en) * 1999-08-23 2000-03-22 张科峰 Super-Internet server with exchanging multi-processor
WO2003046749A1 (en) * 2001-11-28 2003-06-05 Interactive Content Engines, Llc. Interactive broadband server system
CN1423460A (en) * 2001-12-01 2003-06-11 深圳市中兴通讯股份有限公司上海第二研究所 Multi-processing unit route system
WO2003048951A1 (en) * 2001-11-30 2003-06-12 Advanced Micro Devices, Inc. A switching i/o node for connection in a multiprocessor computer system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1248021A (en) * 1999-08-23 2000-03-22 张科峰 Super-Internet server with exchanging multi-processor
WO2003046749A1 (en) * 2001-11-28 2003-06-05 Interactive Content Engines, Llc. Interactive broadband server system
WO2003048951A1 (en) * 2001-11-30 2003-06-12 Advanced Micro Devices, Inc. A switching i/o node for connection in a multiprocessor computer system
CN1423460A (en) * 2001-12-01 2003-06-11 深圳市中兴通讯股份有限公司上海第二研究所 Multi-processing unit route system

Also Published As

Publication number Publication date
CN1641619A (en) 2005-07-20

Similar Documents

Publication Publication Date Title
US20250284629A1 (en) Memory space expansion method and apparatus, and electronic device and computer-readable storage medium
US11093388B2 (en) Method, apparatus, device and storage medium for accessing static random access memory
CN110119304B (en) Interrupt processing method, device and server
CN107391400A (en) A kind of memory expanding method and system for supporting complicated access instruction
CN101727414A (en) Techniques for delivering interrupts in a computer system
US7007126B2 (en) Accessing a primary bus messaging unit from a secondary bus through a PCI bridge
CN118467453B (en) A data transmission method, device, equipment, medium and computer program product
CN113923061B (en) GPU network communication method based on intelligent network card, medium and equipment
CN112256331B (en) Virtual machine instruction analysis acceleration method and device and computer storage medium
US12111779B2 (en) Node identification allocation in a multi-tile system with multiple derivatives
CN102591817A (en) Multi-bus bridge controller and implementing method thereof
WO2023124304A1 (en) Chip cache system, data processing method, device, storage medium, and chip
CN120872868A (en) Software and hardware combined PCIE address conversion and networking design device and method
CN1332334C (en) Multi-processor communication and its communication method
CN116745754A (en) A system and method for accessing remote resources
CN108234147A (en) DMA broadcast data transmission method based on host counting in GPDSP
CN111078618A (en) Electronic device and communication method of dual processors
US10002087B1 (en) Communication between an external processor and FPGA controller
CN112181878B (en) RapidIO interface architecture and data processing method
CN115408010A (en) Data processing method, device, equipment, readable storage medium and program product
CN103853692B (en) A kind of multiprocessor data means of communication based on interruption judgment mechanism
US20220237132A1 (en) Data transmission method and ping-pong dma architecture
US11249918B2 (en) Mapping entry invalidation
KR0145932B1 (en) Dma controller in high speed computer system
CN117435527A (en) Chip data transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070815

Termination date: 20190117