Dual-core communication method, electronic device, storage medium, and computer program product
Through the dual-core communication method, the transmission control module is used to uniformly manage flow control and framing strategies, which solves the problem of low utilization of shared storage space in multi-core processors and achieves more efficient data transmission and core performance improvement.
Patent Information
- Application Number
- CN202411440216.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-08-15
AI Technical Summary
Multi-core processors have low utilization of shared storage space and low transmission efficiency.
A dual-core communication method is adopted, and the flow control parameters and framing strategies are uniformly managed through the transmission control module. The first and second read-write control modules are connected to the processor and shared storage module respectively to realize the writing and reading of data streams, avoid data overflow, and improve storage space utilization and transmission bandwidth.
It effectively avoids data overflow when dual-cores write data at the same time, improves storage space utilization and transmission bandwidth, and enhances core performance.
Smart Images

Figure CN119357118B_ABST
Abstract
Description
Technical Field
[0001] This invention is a divisional application of application number 2023110300389, entitled "Dual-core Communication Device, Method, and Electronic Device," filed on August 15, 2023. The present invention relates to the field of information processing technology, and more particularly 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, which 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 multi-core processor has low utilization rate of shared storage space and low transmission efficiency. 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. 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, 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;
[0006] 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;
[0007] 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;
[0008] The second read-write control module is configured to read the data stream from the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module, and transmit the data stream to the second processor;
[0009] The shared storage module includes a memory and a CROSSBAR module, and the CROSSBAR module is used to complete read and write operations on the shared storage.
[0010] The present invention provides a dual-core communication method, wherein 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;
[0011] 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;
[0012] 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;
[0013] The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame;
[0014] 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;
[0015] 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.
[0016] The present invention provides a dual-core communication method, wherein 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;
[0017] 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;
[0018] 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.
[0019] The present invention provides a dual-core communication method, wherein the second read-write control module includes: a second flow control module, a second frame encoder and a second write controller, wherein the second frame encoder is communicatively connected to the second flow control module and the second write controller respectively;
[0020] 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;
[0021] 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;
[0022] The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame;
[0023] 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;
[0024] 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.
[0025] The present invention provides a dual-core communication method, wherein 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;
[0026] 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;
[0027] 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.
[0028] The present invention provides a dual-core communication method, characterized in that the transmission control module is specifically used to:
[0029] 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.
[0030] 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 the processor implements any of the above-described dual-core communication methods when executing the program.
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the dual-core communication methods described above when executed by a processor.
[0032] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned dual-core communication methods.
[0033] The dual-core communication method, electronic device, storage medium, and computer program product provided by the present invention utilize both the first read-write control module and the second read-write control module to perform flow control based on the same transmission control module. Therefore, when writing and reading data, data overflow can be effectively avoided when both cores simultaneously write data, thereby improving storage space utilization and increasing transmission bandwidth. Furthermore, since both the first read-write control module and the second read-write control module perform frame encoding processing based on the same transmission control module, the other module can effectively decode the information generated during frame encoding, eliminating the need for subsequent maintenance of data transmission and improving core performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to 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 any creative work.
[0035] Figure 1 A schematic diagram of the dual-core communication method flow provided in an embodiment of the present application;
[0036] Figure 2 This is one of the schematic diagrams of the dual-core communication processor structure provided in an embodiment of the present application;
[0037] Figure 3 This is a second schematic diagram of the dual-core communication processor structure provided in an embodiment of the present application;
[0038] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0039] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0040] 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 Shown, including:
[0041] 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;
[0042] 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.
[0043] 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, including:
[0044] The first read / write control module is configured to control the writing of the data stream according to the flow control parameter information, and perform frame encoding processing on the written data stream according to the framing strategy information to obtain a data frame;
[0045] Integrate the N data frames into a frame group, and write the frame group into the shared storage module.
[0046] 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, including:
[0047] 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;
[0048] The data stream is transmitted to the second processor.
[0049] In the embodiment of the present application, since both the first read-write control module and the second read-write control module perform flow control based on the same transmission control module, data overflow can be effectively avoided when both cores simultaneously write data when writing and reading data, thereby improving storage space utilization and increasing transmission bandwidth. Furthermore, since both the first read-write control module and the second read-write control module perform frame encoding processing based on the same transmission control module, the other module can effectively sense the information during frame encoding and decode when performing decoding, eliminating the need for subsequent maintenance of data transmission and improving core performance.
[0050] 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 2As shown, it comprises: 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 with the first processor 25 and the shared storage module 24 in communication, the second read-write control module 22 is respectively connected with the second processor 26 and the shared storage module 24, and the transmission control module 23 is respectively connected with the first read-write control module 21 and the second read-write control module 22 in communication;
[0051] The transmission control module 23 is used for determining flow control parameter information and framing parameter information according to the residual space capacity of the shared storage module 24 and the data stream information of the data stream to be written;
[0052] The first read-write control module 21 is used for reading or writing the data stream of the first processor 25 into the shared storage module 24 according to the flow control parameter information and the framing strategy information sent by the transmission control module 23;
[0053] The second read-write control module 22 is used for reading or writing the data stream of the second processor 26 into the shared storage module 24 according to the flow control parameter information and the framing strategy information sent by the transmission control module 23.
[0054] In the embodiment of the present application, the transmission control module can specifically realize dynamic scheduling, flow control management, frame encoding and decoding control, read-write control and interruption control of the shared storage space according to the pre-configured adoption number.
[0055] The transmission control module in the embodiment of the present application can share the framing strategy information and the like of the first read-write control module and the second read-write control module, so that another module can efficiently perform decoding by using the framing strategy information and the like shared by the transmission control module when performing frame decoding processing.
[0056] On the other hand, the transmission control module in the embodiment of the present application can also share the residual space capacity of the shared storage module, effectively control the flow writing speed of the first read-write control module and the second read-write control module at the same time, improve the utilization rate of the storage space and increase the transmission bandwidth.
[0057] The transmission control module directly controls the framing strategy, so that the frame encoding module encodes the data stream according to the continuity of the data stream, the maximum frame length limit, the minimum frame length limit, the available space of the shared storage and the like.
[0058] 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 realize the maximization of resource utilization; the kernel can view the transmission rate, whether the data is read by the opposite kernel, the working state of each module, the storage space usage and the like in real time through the transmission control module.
[0059] The shared storage module in the embodiment of the present application specifically comprises a memory and a CROSSBAR module, which is specifically used for completing read and write operations on the shared storage. The module writes the data frame into the specified storage address according to the current frame storage address in the data frame; and reads out the corresponding data frame from the shared storage according to the read request issued by the read control module.
[0060] The memory can be a DDR memory, a flash memory, an SRAM, a single-port or double-port RAM, or any other form of memory.
[0061] In the embodiment of the present application, the first read-write control module and the second read-write control module both control the transmission speed of the data stream according to the flow control parameter information. Meanwhile, after the data stream is processed by the first read-write control module for frame encoding, the encoded frame 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 when reading the data stream, thereby reading the data stream.
[0062] 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 data writing and data reading are performed, the data overflow situation when the two cores simultaneously perform data writing can be effectively avoided, the utilization rate of the storage space is improved, and the transmission bandwidth is increased. Meanwhile, 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 is performed by the other module, the information during frame encoding can be effectively decoded, and subsequent maintenance of data transmission is not required, thereby improving the performance of the core.
[0063] Optionally, the first read-write control module comprises a first flow control module, a first frame encoder, and a first write controller, and the first frame encoder is in communication connection with the first flow control module and the first write controller respectively.
[0064] The first flow control module is configured to control the transmission bandwidth of the data stream according to the flow control parameter sent by the transmission control module.
[0065] The first frame encoder is configured to perform frame encoding processing on the data stream written by the first flow control module according to the frame encoding parameter information and the frame encoding strategy, to obtain a data frame.
[0066] The frame encoding parameter information comprises the remaining space capacity and the maximum frame length of the data frame.
[0067] The first write controller is configured to add frame group information to each data frame, integrate N data frames into a frame group, and write the frame group into the shared storage module.
[0068] The frame group information includes at least one of a frame group number, a frame number, a current frame storage start address, a next frame storage start address, and whether the current frame is the last frame of the frame group.
[0069] 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 in communication connection with the second flow control module and the second write controller respectively.
[0070] The second flow control module is configured to control the transmission bandwidth of the data stream according to the flow control parameter sent by the transmission control module.
[0071] The second frame encoder is configured to perform frame encoding processing on the data stream written by the second flow control module according to frame encoding parameter information and the frame encoding strategy, to obtain data frames.
[0072] The frame encoding parameter information includes the remaining space capacity and the maximum frame length of the data frame.
[0073] The second write controller is configured to add frame group information to each data frame, integrate N data frames into a frame group, and write the frame group into the shared storage module.
[0074] The frame group information includes at least one of a frame group number, a frame number, a current frame storage start address, a next frame storage start address, and whether the current frame is the last frame of the frame group.
[0075] In the embodiments, the first flow control module and the second flow control module control the transmission bandwidth of the data stream according to the flow control parameter, so as to effectively control the writing and writing speed of the data stream, and thus improve the utilization rate of the storage space and increase the transmission bandwidth when the two processors access the shared storage space at the same time.
[0076] The frame encoding strategy described in the embodiments can be a strategy written in advance into the transmission control module.
[0077] The frame encoding parameter information in the embodiments can include the remaining space capacity and the maximum frame length of the data frame.
[0078] In the embodiments, the first frame encoder and the second frame encoder frame the data stream according to parameters such as the continuity of the data stream, the available space of the shared storage, the maximum frame length, and the frame encoding strategy. The added frame information includes but is not limited to a frame header, a frame tail, a frame length, a frame encoding strategy, and CRC check information.
[0079] In the embodiments of the present application, the first write controller and the second write controller can integrate several data frames according to parameters such as continuity of the data frames, maximum number of frames that can be accommodated by the frame group, etc., form a frame group, and add frame group information to each data frame. The frame group information includes but is not limited to frame group number, frame number, current frame storage starting address, next frame storage starting address, whether the current frame is the last frame of the frame group, etc.
[0080] In the embodiments of the present application, the first flow control module and the second flow control module can be used to control data flow of the first processor and the second processor, the first frame encoder and the second frame encoder can be used to effectively implement data frame processing on the data stream, thereby facilitating data storage, and the frame encoded data can be synchronized to other modules through the transmission control module, facilitating frame decoding when data is read, improving the efficiency of data reading, and the first write controller and the second write controller can efficiently write the data frames into the shared storage module.
[0081] Optionally, the first read-write control module further comprises a first frame decoder and a first read controller, and the first frame decoder is in communication connection with the first read controller and the first flow control module respectively.
[0082] The first read controller is configured to read the frame group from the shared storage module and delete the read frame group in the shared storage module.
[0083] The first frame decoder is configured to perform frame decoding processing on the frame group read by the first read controller according to the frame group information, obtain the data stream, and transmit the data stream to the first processor through the flow control module.
[0084] Optionally, the second read-write control module further comprises a second frame decoder and a second read controller, and the second frame decoder is in communication connection with the second read controller and the second flow control module respectively.
[0085] The second read controller is configured to read the frame group from the shared storage module and delete the read frame group in the shared storage module.
[0086] The second frame decoder is configured to perform frame decoding processing on the frame group read by the second read controller according to the frame group information, obtain the data stream, and transmit the data stream to the second processor through the flow control module.
[0087] Specifically, in the embodiments 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.
[0088] In the embodiment of the present application, the first frame decoder and the second frame decoder can perform frame decoding processing on the data frames according to the frame group information shared from the transmission control module, obtain the data stream, and transmit the data stream to the second processor through the flow control module.
[0089] In the embodiment of the present application, the first read controller and the second read controller can effectively obtain the frame group from the shared storage module and convert the frame group into data frames, and the first read controller and the second read controller can effectively convert the data frames into data streams.
[0090] In an optional embodiment, Figure 3 The dual-core communication processor structure schematic diagram provided in the embodiment of the present application is shown in FIG. 1. 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 encoding_0 module through the flow control module. The frame encoding_0 module will encode the data stream into a plurality of data frames according to the continuity of the data stream, the maximum frame length, the available space of the shared storage and other information, add frame header, frame length, CRC check, frame tail and other information, and output the data frames to the write control_0 module.
[0091] The write control_0 module will group the plurality of data frames into a frame group according to the continuity of the data frames, the maximum number of frames that can be accommodated by the frame group and other parameters, add frame group number, frame number, current frame storage starting address, next frame storage starting 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 starting address and the next frame storage starting address are allocated by the transmission control module.
[0092] The CROSSBAR module will write the data frames into the corresponding address space in the shared storage according to the current frame storage starting address in each frame in the frame group.
[0093] 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 read the second frame according to the next frame storage starting address in the first 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 frames to the frame decoding_1 module.
[0094] The frame decoding_1 module is the inverse operation of the frame encoding_0 module, recovers the data stream from the data frames, and transmits the data stream to CORE_1 through the flow control module.
[0095] Figure 4A schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As 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 via the communication bus 440. The processor 410 may call logic instructions in the memory 430 to execute a 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 framing strategy information sent by the transmission control module;
[0096] 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.
[0097] Furthermore, the logic instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0098] On the other hand, the present invention further provides a computer program product, comprising a computer program, which may 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 comprising: the first read-write control module writing the data stream of the first processor to the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module;
[0099] 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.
[0100] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the dual-core communication method provided by the above methods is implemented, the method comprising: the first read / write control module writing the data stream of the first processor to the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module;
[0101] 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.
[0102] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0103] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0104] 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 invalidate the corresponding technical solutions.
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, 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; 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 configured 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; wherein the first read-write control module further includes: a first frame decoder and a first read controller; the first read controller is configured to read a frame group from the shared storage module and delete the read frame group from the shared storage module; The second read-write control module is configured to read the data stream from the shared storage module according to the flow control parameter information and framing strategy information sent by the transmission control module, and transmit 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 read and write operations on the shared storage; The first read-write control module includes: a first flow control module, a first frame encoder and a first write controller, and the first frame encoder is respectively communicated 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 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 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; 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 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.
2. The dual-core communication method according to claim 1, characterized in that: The framing parameter information includes: the remaining space capacity and the maximum frame length of the data frame; 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, wherein: The first frame decoder is communicatively connected to the first read controller and the first flow control module respectively; 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, wherein: 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.
5. The dual-core communication method according to claim 1, wherein: 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.
6. 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, the dual-core communication method according to any one of claims 1 to 5 is implemented.
7. 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 5 is implemented.
8. 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 5 is implemented.
Citation Information
Patent Citations
Instruction prefetch-based multi-core shared memory control equipment
CN102207916A
Dynamic address negotiation for shared memory regions in heterogeneous muliprocessor systems
CN105431827A