Dual-core communication method, electronic equipment, storage medium and computer program product
By adopting the dual-core communication method in multi-core processors and utilizing the collaborative work of the transmission control module and the read-write control module, the problems of low utilization of shared storage space and low transmission efficiency of multi-core processors are solved, and a more efficient storage space is achieved. Utilization and Data Transfer.
Patent Information
- Application Number
- CN202411440216.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2043-08-15
AI Technical Summary
Existing multi-core processors have low utilization of shared storage space and low transmission efficiency.
The dual -core communication method is adopted to determine the flow control parameters and frame parameters by transmitting control modules according to the remaining space capacity and data flow information of the shared storage module. And reading, avoid data overflow, improve the utilization rate of storage space and transmission bandwidth.
Effectively avoid the data overflow of dual -core data when writing data, improve the utilization rate and transmission bandwidth of the storage space, and improve the kernel performance.
Smart Images

Figure CN119357118A_ABST
Abstract
Description
Technical Field
[0001] The present invention is a divisional application of the invention with application number 2023110300389, invention name "dual-core communication device, method and electronic device", and application date of August 15, 2023. The present invention relates to the field of information processing technology, and in particular to a dual-core communication method, electronic device, storage medium and computer program product. Background Art
[0002] In embedded systems, the embedded processor is the core of the entire system. Most embedded processors are multi-core processors. The data transmission efficiency between multiple cores directly affects the performance of the entire system.
[0003] Currently, most multi-core embedded processors use shared memory to achieve data communication between multiple cores, that is, a memory space is opened up in the physical space, and this memory space can be accessed by multiple cores. One core writes data into the space, and another core reads the data. In this way, data communication between cores can be completed. However, in related technologies, the utilization rate of shared storage space by multi-core processors is not high, and the transmission efficiency is low. Summary of the invention
[0004] The present invention provides a dual-core communication method, electronic equipment, storage medium and computer program product, which are used to solve the defects of low utilization rate of shared storage space and low transmission efficiency of multi-core processors in the prior art.
[0005] The present invention provides a dual-core communication method, which is applied to a dual-core processor, wherein the dual-core processor comprises: a first processor, a second processor, a first read-write control module, a second read-write control module, a transmission control module and a shared storage module; the first read-write control module is respectively connected to the first processor and the shared storage module for communication, the second read-write control module is respectively connected to the second processor and the shared storage module, and the transmission control module is respectively connected to the first read-write control module and the second read-write control module for communication; The transmission control module is used to determine flow control parameter information and framing parameter information according to the remaining space capacity of the shared storage module and the data flow information of the written data flow; The first read-write control module is used to write the data stream of the first processor into the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module; The second read-write control module is used for reading the data stream from the shared storage module according to the flow control parameter information and the framing strategy information sent by the transmission control module, and transmitting the data stream to the second processor; The shared storage module includes a memory and a CROSSBAR module, and the CROSSBAR module is used to complete the read and write operations on the shared storage.
[0006] The present invention provides a dual-core communication method, wherein the first read-write control module comprises: a first flow control module, a first frame encoder and a first write controller, wherein the first frame encoder is respectively connected to the first flow control module and the first write controller for communication; Wherein, the first flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The first frame encoder is used to perform frame encoding processing on the data stream written by the first flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the first write controller is used to add frame group information to each of the data frames, integrate N data frames into a frame group, and write the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
[0007] The present invention provides a dual-core communication method, wherein the first read-write control module further comprises: a first frame decoder and a first read controller, wherein the first frame decoder is respectively connected to the first read controller and the first flow control module for communication; Wherein, the first read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The first frame decoder is used to perform frame decoding processing on the frame group read by the first read controller according to the frame group information to obtain the data stream, and transmit the data stream to the first processor through the flow control module.
[0008] The present invention provides a dual-core communication method, wherein the second read-write control module comprises: a second flow control module, a second frame encoder and a second write controller, wherein the second frame encoder is respectively connected to the second flow control module and the second write controller for communication; Wherein, the second flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The second frame encoder performs frame encoding processing on the data stream written by the second flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the second write controller adds frame group information to each of the data frames, integrates N data frames into a frame group, and writes the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
[0009] The present invention provides a dual-core communication method, wherein the second read-write control module further comprises: a second frame decoder and a second read controller, wherein the second frame decoder is respectively connected to the second read controller and the second flow control module for communication; Wherein, the second read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The second frame decoder is used to perform frame decoding processing on the frame group read by the second read controller according to the frame group information to obtain the data stream, and transmit the data stream to the second processor through the flow control module.
[0010] The present invention provides a dual-core communication method, characterized in that the transmission control module is specifically used to: The same set of flow control parameter information and framing strategy information is transmitted to the first read-write control module and the second read-write control module respectively.
[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the dual-core communication methods described above is implemented.
[0012] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the dual-core communication method described in any one of the above is implemented.
[0013] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the dual-core communication method described above is implemented.
[0014] The dual-core communication method, electronic device, storage medium and computer program product provided by the present invention, because the first read-write control module and the second read-write control module both perform flow control according to the same transmission control module, therefore, when writing and reading data, data overflow when the dual cores simultaneously write data can be effectively avoided, the utilization rate of the storage space is improved, and the transmission bandwidth is increased. At the same time, because the first read-write control module and the second read-write control module both perform frame coding processing according to the same transmission control module, when decoding, the other module can effectively sense the information during frame coding for decoding, and there is no need to subsequently maintain data transmission to improve the core performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of a dual-core communication method flow chart provided in an embodiment of the present application; Figure 2 One of the schematic diagrams of the dual-core communication processor structure provided in the embodiment of the present application; Figure 3 The second schematic diagram of the dual-core communication processor structure provided in the embodiment of the present application; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Figure 1 A schematic diagram of the dual-core communication method flow provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, including: Step 110, the first read-write control module writes the data stream of the first processor into the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module; Step 120: The second read / write control module reads the data stream from the shared storage module according to the framing strategy information, and transmits the data stream to the second processor.
[0019] The first read-write control module writes the data stream of the first processor into the shared storage module according to the flow control parameter information and the framing strategy information sent by the transmission control module, including: The first read-write control module is used to control the writing of the data stream according to the flow control parameter information, and to perform frame encoding processing on the written data stream according to the framing strategy information to obtain a data frame; Integrate the N data frames into a frame group, and write the frame group into the shared storage module.
[0020] After the second read / write control module reads the data stream from the shared storage module according to the framing strategy information, the second read / write control module transmits the data stream to the second processor, including: After the second read / write control module reads the frame group data from the shared storage module, the second read / write control module performs frame decoding processing on the frame group data according to the framing strategy information to obtain the data stream; The data stream is transmitted to the second processor.
[0021] In the embodiment of the present application, since the first read-write control module and the second read-write control module both perform flow control according to the same transmission control module, when writing and reading data, data overflow when the dual cores simultaneously write data can be effectively avoided, the utilization rate of the storage space is improved, and the transmission bandwidth is increased. At the same time, since the first read-write control module and the second read-write control module both perform frame encoding processing according to the same transmission control module, when decoding, the other module can effectively sense the information during frame encoding for decoding, and there is no need to subsequently maintain data transmission to improve the core performance.
[0022] Figure 2 This is one of the schematic diagrams of the dual-core communication processor structure provided in the embodiment of the present application, such as Figure 2 As shown, it includes: a first read-write control module 21, a second read-write control module 22, a transmission control module 23 and a shared storage module 24; the first read-write control module 21 is respectively connected to the first processor 25 and the shared storage module 24 in communication, the second read-write control module 22 is respectively connected to the second processor 26 and the shared storage module 24, and the transmission control module 23 is respectively connected to the first read-write control module 21 and the second read-write control module 22 in communication; The transmission control module 23 is used to determine the flow control parameter information and the framing parameter information according to the remaining space capacity of the shared storage module 24 and the data flow information of the written data flow; The first read / write control module 21 is used to read or write the data stream of the first processor 25 into the shared storage module 24 according to the flow control parameter information and framing strategy information sent by the transmission control module 23; The second read / write control module 22 is used to read or write the data stream of the second processor 26 into the shared storage module 24 according to the flow control parameter information and framing strategy information sent by the transmission control module 23 .
[0023] In an embodiment of the present application, the transmission control module can specifically implement dynamic scheduling, flow control management, frame encoding and decoding control, read and write control, and interrupt control for the shared storage space according to a pre-configured adoption number.
[0024] The transmission control module in the embodiment of the present application can share information such as the framing strategy of the first read-write control module and the second read-write control module, so that another module can efficiently decode the frame through the information such as the framing strategy shared by the transmission control module when performing frame decoding processing.
[0025] On the other hand, the transmission control module in the embodiment of the present application can also share the remaining space capacity of the storage module, effectively and simultaneously control the flow writing speed of the first read-write control module and the second read-write control module, thereby improving the utilization rate of the storage space and increasing the transmission bandwidth.
[0026] The transmission control module directly controls the framing strategy, so that the frame encoding module frames the data stream according to parameters such as the continuity of the data stream, the maximum frame length limit, the minimum frame length limit, and the available space of the shared storage.
[0027] The transmission control module can also dynamically manage the shared storage space, dynamically allocate storage space for each written data frame through the write control module, and maximize resource utilization; the kernel can use the transmission control module to view real-time information such as the transmission rate, whether the data is read by the opposite kernel, the working status of each module, and the usage of storage space.
[0028] The shared storage module in the embodiment of the present application specifically includes a memory and a CROSSBAR module, and the CROSSBAR module is specifically used to complete the read and write operations on the shared storage. The module writes the data frame to the specified storage address according to the current frame storage first address in the data frame; and reads the corresponding data frame from the shared storage according to the read request issued by the read control module.
[0029] The memory may be a DDR memory, a flash memory, an SRAM, a single-port or dual-port RAM, or any other form of memory.
[0030] In an embodiment of the present application, the first read-write control module and the second read-write control module will both control the transmission speed of the data stream according to the flow control parameter information. At the same time, after the data stream is frame encoded by the first read-write control module, the framing code data can be synchronized to the second read-write control module through the transmission control module, so that the second read-write control module can effectively perform encoding and decoding processing when reading the data, thereby reading the data stream.
[0031] In the embodiment of the present application, since the first read-write control module and the second read-write control module both perform flow control according to the same transmission control module, when writing and reading data, data overflow when the dual cores simultaneously write data can be effectively avoided, the utilization rate of the storage space is improved, and the transmission bandwidth is increased. At the same time, since the first read-write control module and the second read-write control module both perform frame encoding processing according to the same transmission control module, when decoding, the other module can effectively sense the information during frame encoding for decoding, and there is no need to subsequently maintain data transmission to improve the core performance.
[0032] Optionally, the first read-write control module includes: a first flow control module, a first frame encoder and a first write controller, wherein the first frame encoder is respectively communicatively connected with the first flow control module and the first write controller; Wherein, the first flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The first frame encoder is used to perform frame encoding processing on the data stream written by the first flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the first write controller is used to add frame group information to each of the data frames, integrate N data frames into a frame group, and write the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
[0033] The second read-write control module includes: a second flow control module, a second frame encoder and a second write controller, and the second frame encoder is respectively connected to the second flow control module and the second write controller for communication; Wherein, the second flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The second frame encoder performs frame encoding processing on the data stream written by the second flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the second write controller adds frame group information to each of the data frames, integrates N data frames into a frame group, and writes the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
[0034] In an embodiment of the present application, the first flow control module and the second flow control module will control the transmission bandwidth of the data stream according to the flow control parameters, thereby effectively controlling the speed of writing and writing out the data stream, and further improving the utilization of the storage space and increasing the transmission bandwidth when two processors access the shared storage space at the same time.
[0035] The framing strategy described in the embodiments of the present application may specifically be a strategy pre-written into the transmission control module.
[0036] The framing parameter information in the embodiment of the present application may include remaining space capacity and maximum frame length of the data frame.
[0037] In the embodiment of the present application, the first frame encoder and the second frame encoder frame the data stream according to the continuity of the data stream, the available space of the shared storage, the maximum frame length, the framing strategy and other parameters. The added frame information includes but is not limited to the frame header, frame tail, frame length, framing strategy, CRC check information, etc.
[0038] In the embodiment of the present application, the first write controller and the second write controller can integrate a plurality of data frames together to form a frame group according to parameters such as the continuity of the data frames and the maximum number of frames that the frame group can accommodate, and add frame group information to each data frame. The frame group information includes but is not limited to the frame group number, the frame number, the first address of the current frame storage, the first address of the next frame storage, whether the current frame is the last frame of the frame group, and other information.
[0039] In an embodiment of the present application, data flow control for the first processor and the second processor can be implemented through the first flow control module and the second flow control module, and the data stream can be effectively processed into data frames through the first frame encoder and the second frame encoder, thereby facilitating data storage, and the frame-encoded data can be synchronized to other modules through the transmission control module, which is convenient for frame decoding when data is read, thereby improving the efficiency of data reading, and at the same time, the first write controller and the second write controller can efficiently write data frames into the shared storage module.
[0040] Optionally, the first read-write control module further includes: a first frame decoder and a first read controller, wherein the first frame decoder is communicatively connected to the first read controller and the first flow control module respectively; Wherein, the first read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The first frame decoder is used to perform frame decoding processing on the frame group read by the first read controller according to the frame group information to obtain the data stream, and transmit the data stream to the first processor through the flow control module.
[0041] Optionally, the second read-write control module further includes: a second frame decoder and a second read controller, wherein the second frame decoder is communicatively connected to the second read controller and the second flow control module respectively; Wherein, the second read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The second frame decoder is used to perform frame decoding processing on the frame group read by the second read controller according to the frame group information to obtain the data stream, and transmit the data stream to the second processor through the flow control module.
[0042] Specifically, in an embodiment of the present application, the first read controller and the second read controller can read the frame group from the shared storage module, delete the frame group information, and output the data frame to the frame decoder.
[0043] In an embodiment of the present application, the first frame decoder and the second frame decoder can perform frame decoding processing on the data frame according to the frame group information shared from the transmission control module to obtain the data stream, and transmit the data stream to the second processor through the flow control module.
[0044] In an embodiment of the present application, the first read controller and the second read controller can effectively obtain frame groups from the shared storage module and convert the frame groups into data frames, and the first read controller and the second read controller can effectively convert the data frames into data streams.
[0045] In an alternative embodiment, Figure 3The schematic diagram of the dual-core communication processor structure provided in the embodiment of the present application, the first processor and the second processor are CORE_0 and CORE_1 respectively, taking the transmission from CORE_0 to CORE_1 as an example, if there is free space in the shared storage module, the data stream sent by CORE_0 will enter the frame coding_0 module through the flow control module. The frame coding_0 module will compile the data stream into several data frames according to the continuity of the data stream, the maximum frame length, the available space of the shared storage, and other information, and add the frame header, frame length, CRC check, frame tail, and other information, and output the data frame to the write control_0 module.
[0046] The write control_0 module will group multiple data frames into a frame group according to the continuity of the data frames, the maximum number of frames that the frame group can accommodate, and other parameters, and add the frame group number, frame number, current frame storage first address, next frame storage first address, whether the current frame is the last frame of the frame group, and other information to each data frame, and then send the frame group to the CROSSBAR module. The current frame storage first address and the next frame storage first address are allocated by the transmission control module.
[0047] The CROSSBAR module writes the data frame to the corresponding address space in the shared storage according to the current frame storage head address in each frame in the frame group.
[0048] When there is a complete frame group written by CORE_0 but not read by CORE_1 in the shared storage, the transmission control module will send the address of the first frame of the frame group to the read control_1 module, triggering the read control_1 module to read the frame group. The read control_1 module will read the first frame of the frame group according to the address, and store the first address of the next frame in the first frame, read the second frame, and so on until the entire frame group is read. The read control_1 module will delete the frame group information and transmit the data frame to the frame decoding_1 module.
[0049] The frame decoding_1 module is the reverse operation of the frame encoding_0 module. It recovers the data stream from the data frame and transmits it to CORE_1 through the flow control module.
[0050] Figure 4 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the dual-core communication method, which includes: the first read-write control module writes the data stream of the first processor into the shared storage module according to the flow control parameter information and the framing strategy information sent by the transmission control module; The second read / write control module reads the data stream from the shared storage module according to the framing strategy information, and then transmits the data stream to the second processor.
[0051] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0052] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the dual-core communication method provided by the above methods, the method includes: the first read-write control module writes the data stream of the first processor into the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module; The second read / write control module reads the data stream from the shared storage module according to the framing strategy information, and then transmits the data stream to the second processor.
[0053] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being implemented when executed by a processor to execute the dual-core communication method provided by the above methods, the method comprising: the first read-write control module writing the data stream of the first processor into the shared storage module according to the flow control parameter information and the framing strategy information sent by the transmission control module; The second read / write control module reads the data stream from the shared storage module according to the framing strategy information, and then transmits the data stream to the second processor.
[0054] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A dual-core communication method, characterized in that: Applied to a dual-core processor, the dual-core processor includes: a first processor, a second processor, a first read-write control module, a second read-write control module, a transmission control module and a shared storage module; the first read-write control module is respectively connected to the first processor and the shared storage module in communication, the second read-write control module is respectively connected to the second processor and the shared storage module, and the transmission control module is respectively connected to the first read-write control module and the second read-write control module in communication; The transmission control module is used to determine flow control parameter information and framing parameter information according to the remaining space capacity of the shared storage module and the data flow information of the written data flow; The first read-write control module is used to write the data stream of the first processor into the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module; The second read-write control module is used for reading the data stream from the shared storage module according to the flow control parameter information and the framing strategy information sent by the transmission control module, and transmitting the data stream to the second processor; The shared storage module includes a memory and a CROSSBAR module, and the CROSSBAR module is used to complete the read and write operations on the shared storage.
2. The dual-core communication method according to claim 1, characterized in that: The first read-write control module includes: a first flow control module, a first frame encoder and a first write controller, wherein the first frame encoder is respectively connected to the first flow control module and the first write controller for communication; Wherein, the first flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The first frame encoder is used to perform frame encoding processing on the data stream written by the first flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the first write controller is used to add frame group information to each of the data frames, integrate N data frames into a frame group, and write the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
3. The dual-core communication method according to claim 2, characterized in that: The first read-write control module further includes: a first frame decoder and a first read controller, wherein the first frame decoder is communicatively connected to the first read controller and the first flow control module respectively; Wherein, the first read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The first frame decoder is used to perform frame decoding processing on the frame group read by the first read controller according to the frame group information to obtain the data stream, and transmit the data stream to the first processor through the flow control module.
4. The dual-core communication method according to claim 1, characterized in that: The second read-write control module includes: a second flow control module, a second frame encoder and a second write controller, and the second frame encoder is respectively connected to the second flow control module and the second write controller for communication; Wherein, the second flow control module is used to control the transmission bandwidth of the data stream according to the flow control parameters sent by the transmission control module; The second frame encoder performs frame encoding processing on the data stream written by the second flow control module according to the framing parameter information and the framing strategy to obtain a data frame; The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; Wherein, the second write controller adds frame group information to each of the data frames, integrates N data frames into a frame group, and writes the frame group into the shared storage module; The frame group information includes at least one of the following: frame group number, frame number, current frame storage first address, next frame storage first address, and whether the current frame is the last frame of the frame group.
5. The dual-core communication method according to claim 4, characterized in that: The second read-write control module further includes: a second frame decoder and a second read controller, wherein the second frame decoder is communicatively connected to the second read controller and the second flow control module respectively; Wherein, the second read controller is used to read the frame group from the shared storage module and delete the read frame group in the shared storage module; The second frame decoder is used to perform frame decoding processing on the frame group read by the second read controller according to the frame group information to obtain the data stream, and transmit the data stream to the second processor through the flow control module.
6. The dual-core communication method according to claim 1, characterized in that: The transmission control module is specifically used for: The same set of flow control parameter information and framing strategy information is transmitted to the first read-write control module and the second read-write control module respectively.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the dual-core communication method as described in any one of claims 1 to 6 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the dual-core communication method according to any one of claims 1 to 6 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the dual-core communication method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Instruction prefetch-based multi-core shared memory control equipment
CN102207916A
Dual processor communication system
CN105279132A
Dynamic address negotiation for shared memory regions in heterogeneous muliprocessor systems
CN105431827A
Inter-core secure communication system of multi-core heterogeneous domain controller
CN113312299A
Dual-core communication method and electronic equipment
CN113760559A