Scheduling optimization method and system for data communication between integrated processing unit cards and storage medium

By designing a double-buffered data communication architecture and communication mailbox mechanism between integrated processing unit cards, the problem of low communication efficiency caused by mutually exclusive access to shared memory is solved, efficient and reliable data transmission is achieved, and the real-time and fault tolerance of the system are improved. .

CN118708374APending Publication Date: 2024-09-27CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410713376.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, the efficiency of data communication between integrated processing unit cards is low, especially due to the problem of reduced communication efficiency and excessive occupation of processor resources due to mutually exclusive access to shared memory.

Method used

Design a double-buffered data communication architecture based on shared memory, combine the communication mailbox and interrupt asynchronous data access control mechanism to achieve data transmission rate matching between the central processing unit and the unit card, and optimize data transmission through the double-buffering structure and communication data packet format.

Benefits of technology

It improves the efficiency and reliability of data transmission between integrated processing unit cards, reduces system resource occupation, and improves real-time performance and fault tolerance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708374A
    Figure CN118708374A
Patent Text Reader

Abstract

The invention discloses a scheduling optimization method and system for data communication between integrated processing unit cards and a storage medium, a double-buffer structure is established between the integrated processing unit cards, and a secondary shared memory buffer structure is directly connected with each integrated processing unit card. The second-level shared memory buffer structure is used for storing various data generated by each unit card, performing data exchange with each integrated processing unit card, and performing high-speed data transmission with the first-level shared memory buffer structure; the first-stage shared memory buffer structure is positioned between the central control unit and the second-stage shared memory buffer structure and is used for matching the speed between the central control unit and the memory; setting a format of data transmission between integrated processing unit cards; by using a communication mailbox and interrupt asynchronous data access control mechanism, the matching of the access rate of each unit card and the shared storage and the access rate of the central control unit is realized. The communication efficiency between the unit cards is improved, and the problems of data congestion, data loss and the like caused by mutual exclusion of resources are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of unit card communication, and the present invention relates to an integrated processing unit card data communication scheduling optimization method, system and storage medium. Background Art

[0002] At present, with the development of integrated circuit and other technologies, the types of various integrated processing units are increasing and their functions are constantly improving. High efficiency, high speed and high precision have become the development direction of various integrated circuits, embedded systems and other systems. In particular, higher requirements are put forward for the transmission of data between integrated processing unit cards. Therefore, the information exchange between integrated circuit unit cards has become a problem that must be solved in the design of various systems. The methods of data communication between integrated processing unit cards mainly include shared memory, pipelines, semaphores, message queues, sockets, etc. Among them, shared memory is widely used in industrial control fields such as numerical control, telecommunications, and automation due to its advantages of higher transmission speed and higher transmission efficiency. The use of shared memory can realize direct reading and writing of data information, improve the information transmission efficiency between each module and the central processing unit, and realize one-to-many data transmission; however, relying solely on shared memory cannot realize the data reading and writing function of parallel multi-processes. At the same time, due to the mutually exclusive operation of shared memory access, it is easy to reduce the communication efficiency of shared memory. In addition, the characteristics of shared memory mutually exclusive access will lead to a large number of polling and monitoring semaphore operations during the communication process, which squeezes more processor resources and easily causes the system operation efficiency to decrease. Therefore, the research on data transmission methods between integrated processing unit cards is of great significance to improving the real-time, reliability, security and fault tolerance of various electronic systems. Summary of the invention

[0003] The purpose of the present invention is to provide a method, system and storage medium for optimizing data communication scheduling between integrated processing unit cards, design a double-buffered data communication architecture based on shared memory to solve the speed matching problem between the central control unit and the memory, design the data communication format between integrated processing unit cards, and construct a scheduling optimization method for data communication between unit cards. The communication mailbox and interrupt asynchronous data access control mechanism complete the communication scheduling between the central processing unit and the unit card, and finally realize efficient and reliable data transmission.

[0004] The technical solution to achieve the purpose of the present invention is:

[0005] A method for optimizing data communication scheduling between integrated processing unit cards comprises the following steps:

[0006] S01: establishing a double buffer structure between the integrated processing unit cards, wherein the secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory;

[0007] S02: Setting the format of data transmission between integrated processing unit cards;

[0008] S03: Use the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

[0009] In the preferred technical solution, the format of data transmitted between the integrated processing unit cards in step S02 consists of two parts: metadata and data frame. The metadata part is 4 bytes long, the 27th to 31st bits are the unit card identifier, the 22nd to 26th bits are the task identifier, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the required data.

[0010] In the preferred technical solution, step S03 includes setting corresponding identification words in the primary and secondary shared memory buffer structures as mailboxes for each integrated processing unit card to communicate with the central control unit. When an integrated processing unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, it transmits data to the secondary and primary shared memory buffer structures.

[0011] In the preferred technical solution, step S03 also includes, when the central processing unit needs to transmit data to a certain integrated processing unit card, writing a semaphore in the corresponding identification word in the first-level shared memory buffer, the data bus generates a corresponding interrupt signal, and then transmits the data from the central processing unit to the corresponding integrated processing unit card through the double-buffered shared memory area.

[0012] The present invention also discloses an integrated processing unit inter-card data communication scheduling optimization system, comprising:

[0013] A double buffer structure building module is used to establish a double buffer structure between integrated processing unit cards, wherein a secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory;

[0014] The data transmission format building module sets the format of data transmission between integrated processing unit cards;

[0015] The data communication scheduling optimization module uses the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

[0016] In the preferred technical solution, the format of data transmitted between the integrated processing unit cards in the format construction module of the transmitted data consists of two parts: metadata and data frame, wherein the metadata part is 4 bytes long, the 27th to 31st bits are the unit card identifier, the 22nd to 26th bits are the task identifier, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the required data.

[0017] In the preferred technical solution, the data communication scheduling optimization module includes setting corresponding identification words in the primary and secondary shared memory buffer structures as mailboxes for each integrated processing unit card to communicate with the central control unit. When a certain integrated processing unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, it transmits data to the secondary and primary shared memory buffer structures.

[0018] In the preferred technical solution, the data communication scheduling optimization module also includes, when the central processing unit needs to transmit data to a certain integrated processing unit card, writing a semaphore in the corresponding identification word in the first-level shared memory buffer, the data bus generates a corresponding interrupt signal, and then transmits the data from the central processing unit to the corresponding integrated processing unit card through the double-buffered shared memory area.

[0019] The present invention further discloses a computer storage medium on which a computer program is stored. When the computer program is executed, the above-mentioned integrated processing unit inter-card data communication scheduling optimization method is implemented.

[0020] Compared with the prior art, the present invention has the following significant advantages:

[0021] Aiming at the communication and data transmission problems between integrated processing unit cards, a double-buffered data communication architecture based on shared memory is designed to solve the speed matching problem between the central control unit and the memory, the data communication format between integrated processing unit cards is designed, and the scheduling optimization method for data communication between unit cards is constructed. The communication mailbox and interrupt asynchronous data access control mechanism complete the communication scheduling between the central processing unit and the unit card, and finally realize efficient and reliable data transmission. It has good application value and broad market prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A flow chart of a method for optimizing data communication scheduling between integrated processing unit cards;

[0023] Figure 2 It is a schematic diagram of the communication architecture between integrated processing units;

[0024] Figure 3 This is a schematic diagram of the communication data packet format between integrated processing unit cards. DETAILED DESCRIPTION

[0025] The principle of the present invention is: in view of the communication and data transmission problems between integrated processing unit cards, a double-buffered data communication architecture based on shared memory is designed to solve the speed matching problem between the central control unit and the memory, a data communication format between integrated processing unit cards is designed, and a scheduling optimization method for data communication between unit cards is constructed. The communication mailbox and interrupt asynchronous data access control mechanism complete the communication scheduling between the central processing unit and the unit card, and finally realize efficient and reliable data transmission.

[0026] Embodiment 1:

[0027] like Figure 1 As shown, a method for optimizing data communication scheduling between integrated processing unit cards includes the following steps:

[0028] S01: establishing a double buffer structure between the integrated processing unit cards, wherein the secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory;

[0029] S02: Setting the format of data transmission between integrated processing unit cards;

[0030] S03: Use the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

[0031] In a preferred embodiment, the format of data transmitted between the integrated processing unit cards in step S02 consists of two parts: metadata and data frame. The metadata part is 4 bytes long, 1 byte is 8 binary bits, 4 bytes have a total of 32 bits, and the sequence number is from 0 to 31. The 27th to 31st bits are the unit card identifier, the 22nd to 26th bits are the task identifier, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the required data.

[0032] In a preferred embodiment, step S03 includes setting corresponding identification words in the primary and secondary shared memory buffer structures as mailboxes for each integrated processing unit card to communicate with the central control unit. When a certain integrated processing unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, it transmits data to the secondary and primary shared memory buffer structures.

[0033] In a preferred embodiment, step S03 also includes, when the central processing unit needs to transmit data to a certain integrated processing unit card, writing a semaphore in the corresponding identification word in the first-level shared memory buffer, the data bus generates a corresponding interrupt signal, and then transmitting the data from the central processing unit to the corresponding integrated processing unit card through the double-buffered shared memory area.

[0034] In another embodiment, a computer storage medium stores a computer program, and when the computer program is executed, the above-mentioned method for optimizing data communication scheduling between integrated processing unit cards is implemented. The above-mentioned identification method is adopted and will not be described in detail here.

[0035] In another embodiment, a data communication scheduling optimization system between integrated processing unit cards includes:

[0036] A double buffer structure building module is used to establish a double buffer structure between integrated processing unit cards, wherein a secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory;

[0037] The data transmission format building module sets the format of data transmission between integrated processing unit cards;

[0038] The data communication scheduling optimization module uses the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

[0039] Specifically, the workflow of the integrated processing unit inter-card data communication scheduling optimization system is described below by taking a preferred embodiment as an example:

[0040] Step 1: Design of data communication architecture between integrated processing unit cards.

[0041] The communication mode between integrated processing unit cards usually includes shared memory, pipeline, semaphore, etc., among which the shared memory communication mode is widely used due to its high speed, but it will occupy more system resources due to factors such as memory mutual exclusion during multi-party communication, thereby reducing system efficiency. In order to solve the problem of high-speed data communication between integrated processing unit cards, the present invention is based on the shared memory communication mode, and by establishing a double buffer structure between unit cards, the efficient communication function between unit cards is realized, and the resource mutual exclusion problem in the shared memory communication mode is solved.

[0042] The inter-unit card communication architecture designed by the present invention is as follows Figure 2 As shown, the secondary shared memory buffer is directly connected to each unit card, has a large storage capacity, is used to store various types of data generated by each unit card, exchange data with each unit card, and transmit data with the primary shared memory buffer at high speed; the primary shared memory buffer is located between the central control unit and the secondary shared memory buffer, is used to solve the speed matching problem between the central control unit and the memory, can exchange data with the central control unit at a faster storage speed, and transmit data with the secondary shared memory buffer at a matching speed. By using the "double buffer" structure, the data blocking and data loss problems caused by speed inconsistency, resource mutual exclusion, etc. between the data sender and receiver are solved, the problem of long waiting time when there is a lot of data between the unit cards is avoided, and the load of system data communication can be effectively reduced.

[0043] Step 2: Design of communication data packet format between integrated processing unit cards.

[0044] In order to complete the communication between the integrated processing unit cards, it is necessary to specify the format of the data transmitted between the cards. The data packet format designed by the present invention is as follows: Figure 3As shown in the figure, it consists of two parts: metadata and data frame, among which the 27th to 31st bits are the unit card identification, the 22nd to 26th bits are the task identification, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the data that is really needed. By unifying the data format, reliable transmission of data between integrated processing unit cards can be achieved, and the system has excellent scalability. As long as the same data packet format is followed, normal communication can be carried out.

[0045] Step 3: Scheduling optimization of data communication between integrated processing unit cards.

[0046] The core issues of communication between integrated processing unit cards mainly include two aspects: one is the matching of data communication rate; the second is address access conflict. The present invention uses a communication mailbox and an interrupt asynchronous data access control mechanism to achieve matching of the access rate of each unit card and shared storage with the access rate of the central control unit. First, in the primary and secondary shared memory buffers, corresponding identification words are set as mailboxes for each unit card to communicate with the central control unit. When a unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, data can be transmitted to the secondary and primary shared memory buffers; accordingly, when the central processing unit needs to transmit data to a unit card, a semaphore is written to the corresponding identification word in the primary shared memory buffer, and the data bus generates a corresponding interrupt signal, and then the data is transmitted from the central processing unit to the corresponding unit card through the double-buffered shared memory area.

[0047] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A method for optimizing data communication scheduling between integrated processing unit cards, characterized in that: The following steps are involved: S01: establishing a double buffer structure between the integrated processing unit cards, wherein the secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory; S02: Setting the format of data transmission between integrated processing unit cards; S03: Use the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

2. The method for optimizing data communication scheduling between integrated processing unit cards according to claim 1, characterized in that: In step S02, the format of data transmitted between the integrated processing unit cards consists of two parts: metadata and data frame. The metadata part is 4 bytes long, the 27th to 31st bits are the unit card identifier, the 22nd to 26th bits are the task identifier, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the required data.

3. The method for optimizing data communication scheduling between integrated processing unit cards according to claim 1, characterized in that: Step S03 includes setting corresponding identification words in the primary and secondary shared memory buffer structures as mailboxes for each integrated processing unit card to communicate with the central control unit. When an integrated processing unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, it transmits data to the secondary and primary shared memory buffer structures.

4. The method for optimizing data communication scheduling between integrated processing unit cards according to claim 1, characterized in that: Step S03 also includes, when the central processing unit needs to transmit data to a certain integrated processing unit card, writing a semaphore in the corresponding identification word in the first-level shared memory buffer, the data bus generates a corresponding interrupt signal, and then transmits the data from the central processing unit to the corresponding integrated processing unit card through the double-buffered shared memory area.

5. An integrated processing unit inter-card data communication scheduling optimization system, characterized in that: include: A double buffer structure building module is used to establish a double buffer structure between integrated processing unit cards, wherein a secondary shared memory buffer structure is directly connected to each integrated processing unit card, the secondary shared memory buffer structure is used to store various types of data generated by each unit card, exchange data with each integrated processing unit card, and transmit data at high speed with the primary shared memory buffer structure; the primary shared memory buffer structure is located between the central control unit and the secondary shared memory buffer structure, and is used to match the speed between the central control unit and the memory; The data transmission format building module sets the format of data transmission between integrated processing unit cards; The data communication scheduling optimization module uses the communication mailbox and interrupt asynchronous data access control mechanism to match the access rate of each unit card and shared storage with the access rate of the central control unit.

6. The data communication scheduling optimization system between integrated processing unit cards according to claim 5, characterized in that: The format of data transmission between the integrated processing unit cards in the data transmission format construction module consists of two parts: metadata and data frame. The metadata part is 4 bytes long, the 27th to 31st bits are the unit card identifier, the 22nd to 26th bits are the task identifier, the 14th to 21st bits are the data packet index number, the 4th to 13th bits are the data packet length in bytes, and the 0th to 3rd bits are reserved by the system for subsequent functional expansion. After the metadata is the data frame part, which stores the required data.

7. The data communication scheduling optimization system between integrated processing unit cards according to claim 5, characterized in that: The data communication scheduling optimization module includes setting corresponding identification words in the primary and secondary shared memory buffer structures as mailboxes for each integrated processing unit card to communicate with the central control unit. When an integrated processing unit card needs to transmit data to the central control unit, a semaphore is first written to the corresponding identification word. At this time, the data bus will generate a low-level interrupt signal. After the central processing unit responds to the signal, it transmits data to the secondary and primary shared memory buffer structures.

8. The data communication scheduling optimization system between integrated processing unit cards according to claim 5, characterized in that: The data communication scheduling optimization module also includes, when the central processing unit needs to transmit data to a certain integrated processing unit card, writing a semaphore in the corresponding identification word in the first-level shared memory buffer, the data bus generates a corresponding interrupt signal, and then transmits the data from the central processing unit to the corresponding integrated processing unit card through the double-buffered shared memory area.

9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method for optimizing data communication scheduling between integrated processing unit cards according to any one of claims 1 to 4 is implemented.