A fast sending device and method for message transmission buffer
By using a buffer unit composed of register groups during message sending, the transmission priority and valid registers are configured, the search bottleneck and radiation interference problems are solved, and fast and accurate message sending is achieved.
Patent Information
- Application Number
- CN202410423381.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-04-09
AI Technical Summary
In the prior art, there are bottlenecks in the search buffer and radiation interference problems during the sending of messages, resulting in insufficient fast and accurate retrieval.
A buffer unit consisting of 32 registers is used to configure the buffer unit valid register, send register and send priority register. The buffer unit number is calculated through the number selection module to reduce software resource overhead and reduce radiation interference.
Fast and accurate message information retrieval is realized, reducing the search time and radiation interference risks, and improving the transmission efficiency.
Smart Images

Figure CN118488118B_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the technical field of message sending, and in particular to a fast sending device and method for a message transmission buffer. Background Art
[0002] During the message sending process, operations such as configuring message information, caching message information, selecting message information, and sending message information are usually performed. When sending a large number of messages, it is necessary to search the buffer storing message information according to a certain priority to obtain the message information with the highest sending priority.
[0003] Generally, the buffer uses a random access memory, and when working, it starts to search sequentially from the starting address of the buffer until the message information to be sent is obtained, which is also the bottleneck of message sending.
[0004] In addition, the use of random access memory may cause radiation interference, which may lead to the problem of erroneous storage. Therefore, how to quickly and accurately retrieve the message information to be sent according to a certain priority becomes the key to message transmission. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a fast sending device and method for a message transmission buffer with a simple structure, easy implementation and good reliability.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A fast sending device for a message transmission buffer, comprising:
[0008] The message buffer includes a plurality of buffer units composed of register groups and the number of the buffer units is the same as that of the register groups, and is used to store message information according to the number;
[0009] A buffer unit valid generation module includes a buffer unit valid register, a buffer unit sending register, and a sending priority register corresponding to each buffer unit; the buffer unit valid generation module is used to calculate the combination of the sending valid signal and the buffer unit priority signal corresponding to each buffer unit, and use it as the input of the number selection module;
[0010] The number selection module is used to calculate the buffer unit number of the priority transmission, obtain the message information from the buffer unit of the corresponding message buffer according to the buffer unit number, and send it to the message sending module;
[0011] The message sending module is used to complete the message sending.
[0012] As a further improvement of the device of the present invention: the buffer unit valid generation module configures a 32-bit buffer unit valid register CANME, a 32-bit buffer unit sending register CANTRS and 32 5-bit sending priority registers TPL0-TPL31 through the central processing unit.
[0013] As a further improvement of the device of the present invention: if a certain bit of the buffer unit validity register CANME is 1, it indicates that the buffer unit with the corresponding number is valid; if it is 0, it indicates that the buffer unit with the corresponding number is invalid; the buffer unit being valid means that the information in the buffer unit is valid, which can provide the message sending module with message length, identifier and message data information.
[0014] As a further improvement of the device of the present invention: a certain bit of the buffer unit sending register CANTRS is 1, indicating that the buffer unit with the corresponding number can be used for sending, and 0 indicates that the buffer unit with the corresponding number cannot be used for sending; the buffer unit can be used for sending means that the message information in the buffer unit can be used for sending.
[0015] As a further improvement of the device of the present invention: the sending priority register TPL0 is the sending priority information of buffer unit 0; TPLN is the sending priority information of buffer unit N, where N = 0, 1, 2, ..., 31, and the larger the value, the higher the sending priority; when the sending priorities of two buffer units are the same, the buffer unit with the larger number is sent first.
[0016] As a further improvement of the device of the present invention: the number selection module is composed of 31 sending priority comparison modules in five cascade levels, and calculates the buffer unit number MsgObjNum[4:0] of the priority sending according to the MSG_TPL0-MSG_TPL31 combination signal and the respective numbers of the 32 buffer units.
[0017] As a further improvement of the device of the present invention: at the first stage of cascading, the buffer units with adjacent numbers are divided into a group; buffer unit 0 and buffer unit 1 are divided into a group, MSG_TPL0 is combined with the A port of the signal input module, 0 is input with the A_Num port of the module, MSG_TPL1 is combined with the B port of the signal input module, and 1 is input with the B_Num port; and so on, buffer unit 30 and buffer unit 31 are divided into a group, MSG_TPL30 is combined with the A port of the signal input module, 30 is input with the A_Num port of the module, MSG_TPL31 is combined with the B port of the signal input module, and 31 is input with the B_Num port; at the first stage of cascading, each sending priority comparison module, after calculation, outputs the MSG_TPLN combination signal with a high sending priority from the C port, and outputs the buffer unit number N with a high sending priority from the C_Num port, both of which serve as inputs to the sending priority comparison module at the second stage of cascading;
[0018] At the second cascade level, the MSG_TPLN combination signal with a low number and the buffer unit number N obtained from the previous cascade level are used as inputs to the A port and A_Num port of the transmission priority comparison module, respectively. The MSG_TPLM combination signal with a high number and the buffer unit number M obtained from the previous cascade level are used as inputs to the B port and B_Num port of the transmission priority comparison module, respectively. At the second cascade level, each transmission priority comparison module, after calculation, outputs the MSG_TPLP combination signal with a high transmission priority from the C port and the buffer unit number P with a high transmission priority from the C_Num port, both of which serve as inputs to the transmission priority comparison module at the third cascade level. The same process is repeated at the third, fourth, and fifth cascade levels.
[0019] Finally, the buffer unit number MsgObjNum[4:0] with the highest current sending priority is output from the C_Num port of the sending priority comparison module of the fifth cascade stage.
[0020] As a further improvement of the device of the present invention: it also includes a sending priority comparison module, which has a total of 4 input ports: A[5:0], B[5:0], A_Num[4:0], B_Num[4:0]; A represents the MSG_TPLN combination signal of the buffer unit with a lower number; B represents the MSG_TPLM combination signal of the buffer unit with a higher number; A_Num represents the number N of the buffer unit with a lower number; B_Num represents the number M of the buffer unit with a higher number.
[0021] As a further improvement of the device of the present invention: the sending priority comparison module has two output ports: C[5:0] and C_Num[4:0]; wherein C represents the MSG_TPLP combination signal of the buffer unit with high sending priority; and C_Num represents the number P of the buffer unit with high sending priority.
[0022] As a further improvement of the device of the present invention: the message buffer has a total of 32 buffer units, which are indexed according to the buffer unit number; each buffer unit is composed of 4 32-bit registers, namely the message length register DLC, the identifier register MSGID, the message data high 4-byte register MSGDH, and the message data low 4-byte register MSGDL.
[0023] The present invention further provides a sending method based on the fast sending device of the message transmission buffer, which comprises:
[0024] Step S1: The central processing unit initializes 32 buffer units of the message buffer; configures the message length register DLC, the identifier register MSGID, the message data high 4-byte register MSGDH, and the message data low 4-byte register MSGDL of each buffer unit;
[0025] Step S2: The central processing unit configures a 32-bit buffer unit valid register CANME, a 32-bit buffer unit sending register CANTRS and 32 5-bit sending priority registers TPL0-TPL31 for the buffer unit valid generation module;
[0026] Step S3: In the buffer unit valid generation module, a send valid signal MsgObjVal[N] is generated for each buffer unit, and combined with the send priority information TPLN of the configured buffer unit N to form a 6-bit signal MSG_TPLN; finally, the combined signal MSG_TPL0-MSG_TPL31 is output;
[0027] Step S4: In the number selection module, the buffer unit number MsgObjNum[4:0] to be sent first is calculated according to the input MSG_TPL0-MSG_TPL31 combination signal and the numbers of the 32 buffer units.
[0028] Step S5: According to the calculated priority buffer unit number MsgObjNum[4:0], index to the corresponding buffer unit and obtain the message information to be sent: message length DLC, identifier MSGID, message data high 4 bytes MSGDH, message data low 4 bytes MSGDL;
[0029] Step S6: input the message information obtained from the buffer unit into the message sending module, and finally complete the sending.
[0030] Compared with the prior art, the advantages of the present invention are:
[0031] The fast sending device and method of the message transmission buffer of the present invention have a simple structure, simple implementation and good reliability. The buffer no longer uses random access memory, but uses 32 register groups to form 32 buffer units. The 32 buffer units are respectively configured with sending priority registers TPL0 to TPL31, and the buffer unit valid register CANME and the buffer unit sending register CANTRS are configured. Then, the number of the buffer unit to be sent with priority is calculated by the number selection module. Finally, the message information is obtained from the corresponding buffer unit according to the buffer unit number and sent to the message sending module for sending. During the process of sending message information, this device only needs to configure a small number of registers to quickly and accurately index the buffer unit to be sent, without having to start sequential retrieval from the starting address of the buffer until the buffer unit to be sent is indexed. It not only reduces software resource overhead, but also improves the speed of searching the buffer zone. In addition, compared with using random access memory, using register groups as buffer units also reduces the risk of radiation interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the topological structure principle of the buffer zone fast sending device of the present invention.
[0033] Figure 2 It is a schematic diagram of the structural principle of the effective generation module of the buffer unit in a specific application example of the present invention.
[0034] Figure 3 It is a schematic diagram of the structural principle of a part of the number selection module in a specific application example of the present invention.
[0035] Figure 4 It is a schematic diagram of the structural principle of another part of the number selection module in a specific application example of the present invention.
[0036] Figure 5 It is a schematic diagram of the structural principle of the sending priority comparison module in a specific application example of the present invention.
[0037] Figure 6 It is a schematic diagram of the structural principle of the message buffer in a specific application example of the present invention.
[0038] Figure 7 It is a flowchart of a buffer zone fast sending method in a specific application example of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] In the description of this application, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.
[0041] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0042] In this application, unless otherwise specified or limited, the terms "assemble," "connect," "connect," "fix," and the like should be understood in a broad sense. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; and internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0043] like Figure 1 and Figure 2 As shown, the fast sending device of the message transmission buffer of the present invention includes:
[0044] The message buffer includes a plurality of buffer units composed of register groups and the number of the buffer units is the same as that of the register groups, and is used to store message information according to the number;
[0045] A buffer unit valid generation module includes a buffer unit valid register, a buffer unit sending register, and a sending priority register corresponding to each buffer unit; the buffer unit valid generation module is used to calculate the combination of the sending valid signal and the buffer unit priority signal corresponding to each buffer unit, and use it as the input of the number selection module;
[0046] The number selection module is used to calculate the buffer unit number of the priority transmission, obtain the message information from the buffer unit of the corresponding message buffer according to the buffer unit number, and send it to the message sending module;
[0047] The message sending module is used to complete the message sending.
[0048] In a specific application example, the buffer unit valid generation module has a 32-bit buffer unit valid register CANME, a 32-bit buffer unit sending register CANTRS and 32 5-bit sending priority registers TPL0-TPL31 configured by a central processing unit.
[0049] Among them, a bit of CANME is 1, which means that the corresponding numbered buffer unit is valid, and a bit of 0 means that the corresponding numbered buffer unit is invalid. The buffer unit is valid, which means that the information in the buffer unit is valid, and it can provide the message sending module with message length, identifier and message data information.
[0050] Wherein, if a bit of CANTRS is 1, it indicates that the corresponding buffer unit can be used for sending, and if it is 0, it indicates that the corresponding buffer unit cannot be used for sending. The buffer unit being used for sending means that the message information in the buffer unit can be used for sending.
[0051] TPL0 is the transmit priority of buffer unit 0. TPLN is the transmit priority of buffer unit N (N = 0, 1, 2, ..., 31). A larger value indicates a higher transmit priority. If two buffer units have the same transmit priority, the buffer with the larger number is sent first.
[0052] like Figure 2 As shown, CANME[0]&CANTRS[0] generates the valid sending signal MsgObjVal[0] of buffer unit 0, CANME[1]&CANTRS[1] generates the valid sending signal MsgObjVal[1] of buffer unit 1...CANME
[31] &CANTRS
[31] generates the valid sending signal MsgObjVal
[31] of buffer unit 31.
[0053] The sending valid signal MsgObjVal[N] is 1, indicating that the message information in the buffer unit N can be used for sending.
[0054] MsgObjVal[0] and TPL0 are combined into a 6-bit signal MSG_TPL0.
[0055] MsgObjVal[N] and TPLN are combined into a 6-bit signal MSG_TPLN.
[0056] In the specific application example, the number selection module is composed of 31 transmission priority comparison modules in a five-level cascade. This module calculates the priority buffer unit number MsgObjNum[4:0] based on the combined signals MSG_TPL0-MSG_TPL31 and the individual numbers of the 32 buffer units.
[0057] like Figure 3 and Figure 4As shown, in the first cascade level, buffer units with adjacent numbers are grouped together. Buffer units 0 and 1 are grouped together, with the MSG_TPL0 signal input module's A port and the 0 signal input module's A_Num port, and the MSG_TPL1 signal input module's B port and the 1 signal input module's B_Num port. Similarly, buffer units 30 and 31 are grouped together, with the MSG_TPL30 signal input module's A port and the 30 signal input module's A_Num port, and the MSG_TPL31 signal input module's B port and the 31 signal input module's B_Num port. In the first cascade level, each transmit priority comparison module calculates and outputs the MSG_TPLN signal combination with the highest transmit priority from its C port and the buffer unit number N with the highest transmit priority from its C_Num port. These signals serve as inputs to the transmit priority comparison module in the second cascade level.
[0058] In the second cascaded stage, the lower-numbered MSG_TPLN signal combination and buffer unit number N obtained from the previous cascaded stage serve as inputs to the transmit priority comparison module's A port and A_Num port, respectively. The higher-numbered MSG_TPLM signal combination and buffer unit number M obtained from the previous cascaded stage serve as inputs to the transmit priority comparison module's B port and B_Num port, respectively. In the second cascaded stage, each transmit priority comparison module calculates and outputs the higher-priority MSG_TPLP signal combination from port C and the higher-priority buffer unit number P from port C_Num. These signals are then input to the transmit priority comparison module in the third cascaded stage.
[0059] The same applies to the third, fourth and fifth cascade levels.
[0060] Finally, the buffer unit number MsgObjNum[4:0] with the highest current sending priority is output from the C_Num port of the sending priority comparison module of the fifth cascade stage.
[0061] In a specific application example, the present invention further includes a transmission priority comparison module having four input ports: A[5:0], B[5:0], A_Num[4:0], and B_Num[4:0]. A represents the MSG_TPLN combined signal of the lower-numbered buffer unit; B represents the MSG_TPLM combined signal of the higher-numbered buffer unit; A_Num represents the number N of the lower-numbered buffer unit; and B_Num represents the number M of the higher-numbered buffer unit.
[0062] As a preferred embodiment, the transmission priority comparison module has a total of 2 output ports: C[5:0] and C_Num[4:0]. Among them, C represents the MSG_TPLP combined signal of the buffer unit with a high transmission priority; C_Num represents the number P of the buffer unit with a high transmission priority.
[0063] As Figure 5 shown, A[5]>B[5] indicates that the message information in the buffer unit corresponding to port A can be used for transmission, while the message information in the buffer unit corresponding to port B cannot be used for transmission. Therefore, the MSG_TPLN combined signal of the buffer unit corresponding to port A is output from port C; the number N of the buffer unit corresponding to port A is output from port C_Num.
[0064] A[5]<B[5] indicates that the message information in the buffer unit corresponding to port A cannot be used for transmission, while the message information in the buffer unit corresponding to port B can be used for transmission. Therefore, the MSG_TPLN combined signal of the buffer unit corresponding to port B is output from port C; the number N of the buffer unit corresponding to port B is output from port C_Num.
[0065] A[4:0]>B[4:0] indicates that the transmission priority of the buffer unit corresponding to port A is higher than that of the buffer unit corresponding to port B. Therefore, the MSG_TPLN combined signal of the buffer unit corresponding to port A is output from port C; the number N of the buffer unit corresponding to port A is output from port C_Num.
[0066] Otherwise, it indicates that the transmission priority of the buffer unit corresponding to port B is higher than that of the buffer unit corresponding to port A. Therefore, the MSG_TPLN combined signal of the buffer unit corresponding to port B is output from port C; the number N of the buffer unit corresponding to port B is output from port C_Num.
[0067] In a specific application example, as Figure 6 shown, the message buffer has a total of 32 buffer units, which are indexed according to the buffer unit number. Each buffer unit consists of 4 32-bit registers, namely the message length register DLC, the identifier register MSGID, the high 4-byte register MSGDH of the message data, and the low 4-byte register MSGDL of the message data.
[0068] See Figure 7 shown, the working process of the present invention is as follows:
[0069] Step S1: The central processing unit initializes 32 buffer units of the message buffer, configures the message length register DLC, identifier register MSGID, message data high 4-byte register MSGDH, and message data low 4-byte register MSGDL of each buffer unit;
[0070] Step S2: The central processing unit configures a 32-bit buffer unit valid register CANME, a 32-bit buffer unit sending register CANTRS and 32 5-bit sending priority registers TPL0-TPL31 for the buffer unit valid generation module;
[0071] Step S3: In the buffer unit valid generation module, a send valid signal MsgObjVal[N] is generated for each buffer unit and combined with the send priority information TPLN of the configured buffer unit N to form a 6-bit signal MSG_TPLN. Finally, the combined signals MSG_TPL0-MSG_TPL31 are output.
[0072] Step S4: In the number selection module, the buffer unit number MsgObjNum[4:0] to be sent first is calculated according to the input MSG_TPL0-MSG_TPL31 combination signal and the numbers of the 32 buffer units.
[0073] Step S5: According to the calculated priority buffer unit number MsgObjNum[4:0], index to the buffer unit with the corresponding number and obtain the message information to be sent: message length DLC, identifier MSGID, message data high 4 bytes MSGDH, message data low 4 bytes MSGDL.
[0074] Step S6: input the message information obtained from the buffer unit into the message sending module, and finally complete the sending.
[0075] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A fast sending device for a message transmission buffer, characterized in that: include: The message buffer includes a plurality of buffer units composed of register groups and the number of the buffer units is the same as that of the register groups, and is used to store message information according to the number; A buffer unit valid generation module includes a buffer unit valid register, a buffer unit sending register, and a sending priority register corresponding to each buffer unit; the buffer unit valid generation module is used to calculate the combination of the sending valid signal and the buffer unit priority signal corresponding to each buffer unit, and use it as the input of the number selection module; The number selection module is used to calculate the buffer unit number of the priority transmission, obtain the message information from the buffer unit of the corresponding message buffer according to the buffer unit number, and send it to the message sending module; Message sending module, used to complete message sending; The number selection module is composed of 31 sending priority comparison modules in 5-level cascade, with 16 in the first level, 8 in the second level, 4 in the third level, 2 in the fourth level, and 1 in the fifth level; the sending priority comparison module has 4 input ports: A, B, A_Num, and B_Num; A represents the MSG_TPLN combination signal of the buffer unit with a lower number; B represents the MSG_TPLM combination signal of the buffer unit with a higher number; A_Num represents the number N of the buffer unit with a lower number; B_Num represents the number M of the buffer unit with a higher number; The buffer units with adjacent numbers in the first-level sending priority comparison module are divided into a group: buffer unit 0 and buffer unit 1 are divided into a group, the MSG_TPL0 combination signal input module A port, constant 0 is input to the sending priority comparison module A_Num port, the MSG_TPL1 combination signal input module B port, constant 1 is input to the sending priority comparison module B_Num port; buffer unit 2 and buffer unit 3 are divided into a group, and so on, buffer unit 30 and buffer unit 31 are divided into a group; in the first level of cascade, each sending priority comparison module outputs the MSG_TPLN combination signal with high sending priority from the C port after calculation, and outputs the buffer unit number N with high sending priority from the C_Num port, both of which serve as inputs to the sending priority comparison module of the second level of cascade; and so on; the same applies to the second, third, fourth and fifth levels of the cascade; finally, the buffer unit number MsgObjNum with the highest current sending priority is output from the C_Num port of the sending priority comparison module of the fifth level of cascade; Input A[5:0] and B[5:0]. If A[5] > B[5], it means the message information in the buffer unit corresponding to port A is used for transmission, while the message information in the buffer unit corresponding to port B cannot be used for transmission. If A[5] < B[5], it means the message information in the buffer unit corresponding to port A cannot be used for transmission, while the message information in the buffer unit corresponding to port B is used for transmission. If A[4:0] > B[4:0], it means the transmission priority of the buffer unit corresponding to port A is higher than that of the buffer unit corresponding to port B, and the message information of the buffer unit corresponding to port A can be used for transmission. Otherwise, it means the transmission priority of the buffer unit corresponding to port B is higher than that of the buffer unit corresponding to port A, and the message information of the buffer unit corresponding to port B can be used for transmission. The numbers in A[5] and A[5:0] represent the number of bits. [5] represents the fifth bit, and [5:0] represents the number of bits from 5 to 0. In the buffer unit valid generation module, the transmission valid signal MsgObjVal[N] of each buffer unit is generated, and combined with the transmission priority information TPLN of the configured buffer unit N to form a 6-bit signal MSG_TPLN. Finally, the combined signal of MSG_TPL0 - MSG_TPL31 is output. In the number selection module, according to the input combined signal of MSG_TPL0 - MSG_TPL31 and the numbers of 32 buffer units respectively, the number MsgObjNum of the buffer unit with the highest priority for transmission is calculated.
2. The fast sending device of the message transmission buffer according to claim 1, characterized in that: The buffer unit valid generation module has a 32-bit buffer unit valid register CANME, a 32-bit buffer unit transmission register CANTRS, and 32 5-bit transmission priority registers TPL0 - TPL31 configured by the central processor.
3. The fast sending device of the message transmission buffer according to claim 2, characterized in that: If a certain bit of the buffer unit valid register CANME is 1, it means the buffer unit corresponding to the number is valid; if it is 0, it means the buffer unit corresponding to the number is invalid. The buffer unit being valid means the information in this buffer unit is valid, and it provides message length, identifier, and message data information to the message transmission module.
4. The fast sending device of the message transmission buffer according to claim 2, characterized in that: If a certain bit of the buffer unit transmission register CANTRS is 1, it means the buffer unit corresponding to the number is used for transmission; if it is 0, it means the buffer unit corresponding to the number cannot be used for transmission. The buffer unit being used for transmission means the message information in this buffer unit can be used for transmission.
5. The fast sending device of the message transmission buffer according to claim 2, characterized in that The transmission priority register TPL0 is the transmission priority information of buffer unit 0; TPLN is the transmission priority information of buffer unit N, where N = 0, 1, 2, ……, 31. The larger the value, the higher the transmission priority. When the transmission priorities of two buffer units are the same, the buffer unit with the larger number is transmitted first.
6. The fast sending device of the message transmission buffer according to claim 1, characterized in that: The transmission priority comparison module has a total of 2 output ports: C, C_Num. Among them, C represents the combined signal MSG_TPLP of the buffer unit with the higher transmission priority; C_Num represents the number P of the buffer unit with the higher transmission priority.
7. The fast sending device of the message transmission buffer according to any one of claims 1 to 5, characterized in that: The message buffer has a total of 32 buffer units, which are indexed according to the buffer unit number; each buffer unit consists of four 32-bit registers, namely the message length register DLC, the identifier register MSGID, the message data high 4-byte register MSGDH, and the message data low 4-byte register MSGDL.
8. The sending method of the fast sending device of the message transmission buffer according to any one of claims 1 to 7, characterized in that: include: Step S1: The central processing unit initializes 32 buffer units of the message buffer; Configure the message length register DLC, identifier register MSGID, message data high 4-byte register MSGDH, and message data low 4-byte register MSGDL of each buffer unit; Step S2: The central processing unit configures a 32-bit buffer unit valid register CANME, a 32-bit buffer unit sending register CANTRS and 32 5-bit sending priority registers TPL0-TPL31 for the buffer unit valid generation module; Step S3: In the buffer unit valid generation module, a send valid signal MsgObjVal[N] is generated for each buffer unit, and combined with the send priority information TPLN of the configured buffer unit N to form a 6-bit signal MSG_TPLN; finally, the combined signal MSG_TPL0-MSG_TPL31 is output; Step S4: In the number selection module, the buffer unit number MsgObjNum to be sent first is calculated according to the input MSG_TPL0-MSG_TPL31 combination signal and the numbers of the 32 buffer units; Step S5: According to the calculated priority buffer unit number MsgObjNum, index to the corresponding buffer unit and obtain the message information to be sent: message length DLC, identifier MSGID, message data high 4 bytes MSGDH, message data low 4 bytes MSGDL; Step S6: input the message information obtained from the buffer unit into the message sending module to complete the sending.
Citation Information
Patent Citations
Rapid retrieval method and circuit for message transmission buffer area
CN116016397A
Packet buffering
US20180026902A1