SRIO message conversion method, processor and device
By determining the effective data length and message header data of the SRIO message, determining the load data position according to the preset logic, converting the SRIO message, removing the CRC verification code and fill code, the message conversion in the embedded system is solved Effectiveness issues realize efficient message conversion and simplified circuit design.
Patent Information
- Application Number
- CN202211485778.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-11-24
AI Technical Summary
In embedded systems, SRIO messages carry CRC verification codes and fill codes, and the prior art fails to effectively remove these codes, resulting in the underlying devices being unable to directly use complete and valid messages.
By obtaining the effective data length and message header data of the SRIO message to be converted, the first load data position is determined according to the preset correspondence logic, the message is converted based on the message type, effective data length and load data position, and the CRC is removed Verification code and fill code to generate converted valid SRIO messages without these codes.
It simplifies circuit design, optimizes timing and logical area, reduces the calculation cost of later-stage equipment, and realizes effective conversion of SRIO messages, which is suitable for SRIO messages of different types and lengths.
Smart Images

Figure CN115842870B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of high-performance interconnection of embedded systems, and in particular to an SRIO message conversion method, processor and device. Background Art
[0002] SRIO (Serial Rapid I / O) is a new generation of high-speed interconnect technology based on packet switching and is highly reliable and high-performance for embedded system development. It was approved as the ISO / IECDIS 18372 standard by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) in 2004.
[0003] At present, in the field of high-performance interconnection technology for embedded systems, RapidIO (RapidIO is a high-performance, low-pin-count, data packet-switching-based interconnection architecture pioneered by companies such as Motorola and Mercury. It is an open interconnection technology standard designed to meet the needs of future high-performance embedded systems) endpoint devices often carry CRC checksums and paddings in SRIO messages. In order to forward SRIO messages, it is necessary to remove the above CRC checksums and paddings and obtain valid data before forwarding to the lower-level device (or downstream device), so that the lower-level device can obtain a complete and valid message. At present, there is no corresponding method to achieve the above function. Summary of the invention
[0004] The present disclosure provides an SRIO message conversion method, a processor, and a device.
[0005] In a first aspect, the present disclosure provides an SRIO message conversion method, which is applied to an SRIO protocol conversion device, and the method includes:
[0006] Acquire each beat message and the effective data length of each beat message of the input SRIO message to be converted, wherein the SRIO message to be converted includes a CRC check code and a padding code;
[0007] Determine the sum of the effective data lengths of each beat message of the SRIO message to be converted as the effective data length of the SRIO message to be converted;
[0008] Parsing the first beat message of the SRIO message to be converted to obtain valid message header data of the SRIO message to be converted, where the valid message header data includes a message type;
[0009] Determine, according to a first preset correspondence logic, a first payload data position corresponding to the valid message header data of the SRIO message to be converted, wherein the first preset correspondence logic is used to characterize the correspondence between the SRIO valid message header data and the first payload data position;
[0010] Determine the first payload data position corresponding to the valid message header data of the SRIO message to be converted as the first payload data position of the SRIO message to be converted;
[0011] Based on the message type, valid data length and first load data position of the SRIO message to be converted, message conversion is performed on each beat message of the SRIO message to be converted to obtain a converted valid SRIO message, wherein the converted valid SRIO message does not include a CRC check code and a padding code.
[0012] In some optional implementations, the performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length, and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion includes:
[0013] Determine whether the valid data length of the SRIO message to be converted is less than the first preset first beat message length;
[0014] In response to determining that the length of the first-beat message is less than the first preset first-beat message length, determining a first invalid data length corresponding to both the message type and the first payload data position of the SRIO message to be converted according to a second preset correspondence logic, wherein the second preset correspondence logic is used to characterize the correspondence between the SRIO message type and the first payload data position and the invalid data length;
[0015] Determine a difference between the valid data length of the SRIO message to be converted and the first invalid data length as a first valid data length;
[0016] The unique beat message of the converted valid SRIO message is generated by using the data of the first valid data length before the unique beat message of the SRIO message to be converted.
[0017] In some optional implementations, the first preset first beat message length is 84 bytes.
[0018] In some optional implementations, determining, according to the second preset correspondence logic, a first invalid data length corresponding to both the message type and the first load data position of the SRIO message to be converted includes:
[0019] Determine whether a first condition is met, wherein the first condition is that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 6th byte;
[0020] In response to determining that the first condition is satisfied, determining that the first invalid length is 4 bytes;
[0021] In response to determining that the first condition is not satisfied, determining whether a second condition is satisfied, the second condition being that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 8th byte or the 12th byte;
[0022] In response to determining that the second condition is satisfied, determining that the first invalid length is 2 bytes;
[0023] In response to determining that the second condition is not satisfied, determining whether a third condition is satisfied, the third condition being that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte, or the 18th byte;
[0024] In response to determining that the third condition is satisfied, determining that the first invalid length is 2 bytes;
[0025] In response to determining that the third condition is not satisfied, determining whether a fourth condition is satisfied, the fourth condition being that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte, or the 20th byte;
[0026] In response to determining that the fourth condition is satisfied, the first invalid length is determined to be 4 bytes.
[0027] In some optional implementations, the performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion further includes:
[0028] In response to determining that the effective data length of the SRIO message to be converted is not less than the first preset first beat message length, determining whether the effective data length of the SRIO message to be converted is greater than the first preset first beat message length and less than a second preset first beat message length, wherein the second preset first beat message length is greater than the first preset first beat message length;
[0029] In response to the determination being yes, determining, according to a third preset correspondence logic, a second invalid data length corresponding to a first payload data position of the SRIO message to be converted, wherein the third preset correspondence logic is used to characterize a correspondence between the first payload data position and the invalid data length;
[0030] Determine the difference between the valid data length of the SRIO message to be converted and the second invalid data length as the second valid data length;
[0031] The only one-beat message data of the SRIO message to be converted is moved forward by a single CRC check code length starting from the preset first check code end position;
[0032] The unique beat message of the converted valid SRIO message is generated by using the data of the second valid data length in the unique beat message of the to-be-converted SRIO message after the move.
[0033] In some optional implementations, the second preset first beat message length is 127 bytes.
[0034] In some optional implementations, determining the second invalid data length corresponding to the first load data position of the SRIO message to be converted according to the third preset correspondence logic includes:
[0035] In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte, determining that the second invalid length is 6 bytes;
[0036] In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte, the second invalid length is determined to be 4 bytes.
[0037] In some optional implementations, the performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion further includes:
[0038] In response to determining that the effective data length of the SRIO message to be converted is greater than the second preset first beat message length, a difference between the effective data length of the first beat message of the SRIO message to be converted and the length of a single CRC check code is determined as the converted effective data length of the first beat message in the SRIO message to be converted;
[0039] Determine the effective data length of the intermediate beat message of the SRIO message to be converted as the effective data length after conversion of the corresponding intermediate beat message;
[0040] Determine, according to a fourth preset corresponding relationship logic, a first tail beat invalid data length corresponding to a first payload data position of the SRIO message to be converted, wherein the fourth preset corresponding relationship logic is used to characterize the corresponding relationship between the first payload data position of the SRIO message and the tail beat invalid data length;
[0041] Determine the difference between the valid data length of the tail beat message of the SRIO message to be converted and the invalid data length of the first tail beat as the converted valid data length of the tail beat message in the SRIO message to be converted;
[0042] For each beat message of the SRIO message to be converted, the corresponding beat message of the converted valid SRIO message is generated by using the data of the converted valid data length of the previous beat message of the beat message.
[0043] In some optional implementations, the first preset first beat message length is 84 bytes, and the second preset first beat message length is 127 bytes; and
[0044] The determining, according to the fourth preset corresponding relationship logic, the first tail beat invalid data length corresponding to the first load data position of the SRIO message to be converted includes:
[0045] In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte, determining that the invalid data length of the first tail beat is 4 bytes;
[0046] In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte, determining that the invalid data length of the first tail beat is 2 bytes.
[0047] In a second aspect, the present disclosure provides an SRIO message conversion processor, which is configured to execute the method described in any implementation manner in the first aspect.
[0048] In a second aspect, the present disclosure provides an SRIO message conversion device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.
[0049] In order to realize the conversion of the SRIO message sent by the previous RapidIO endpoint device, remove the invalid data therein, including the CRC check code and the padding code, so as to facilitate the subsequent device to directly use the valid SRIO message, the SRIO message conversion method, processor and device provided by the present disclosure first determine the valid data length of the input SRIO message to be converted, and then determine the first load data position of the SRIO message to be converted according to the first preset corresponding relationship logic through the valid message header data in the message header of the SRIO message to be converted, and finally, based on the message type, valid data length and first load data position of the SRIO message to be converted, perform message conversion on each beat message of the SRIO message to be converted to obtain a valid SRIO message after conversion, wherein the valid SRIO message after conversion does not include the CRC check code and the padding code. The message conversion method does not limit the valid data length, message type and number of message beats included in the SRIO message to be converted, and the method can include but is not limited to the following technical effects through hardware circuit modularization:
[0050] First, the first payload data position of the SRIO message to be converted is determined in advance according to the valid message header data in the message header of the SRIO message to be converted through the first preset correspondence logic. Since there are similar first payload data positions in different types of SRIO messages, the combinational logic of how to remove the CRC check code and the padding code can be reduced, thereby simplifying the complexity of circuit design.
[0051] Second, the method has no restrictions on the effective data length of the SRIO message to be converted and the number of message beats included, and has a wide range of applications.
[0052] Third, optionally, by adopting a pipeline conditional judgment method, only the first load data position needs to be determined, which can reduce and remove the combinational logic of CRC and fill code judgment, thereby optimizing the timing and reducing the logic area occupied by the circuit structure.
[0053] Fourth, for the protocol conversion scenario, the calculated first load data position can be reused as the required data of the subsequent equipment, reducing the calculation cost of the subsequent equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0055] Figure 1 is a structural schematic diagram of an embodiment of an SRIO message conversion device according to the present disclosure;
[0056] Figure 2Ais a flow chart of an embodiment of a SRIO message conversion method applied to a SRIO message conversion device according to the present disclosure;
[0057] Figure 2B is a decomposed flow chart of an embodiment of step 206 in the SRIO message conversion method according to the present disclosure;
[0058] Figure 3 It is a decomposed flow chart of another embodiment of step 206 in the SRIO message conversion method according to the present disclosure. DETAILED DESCRIPTION
[0059] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0060] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0061] Figure 1 A system architecture diagram of an embodiment of an SRIO message conversion scenario in which the SRIO message conversion method according to the present disclosure can be applied is shown.
[0062] like Figure 1 As shown, a RapidIO endpoint device 101, an SRIO message conversion device 102 and a subsequent device 103.
[0063] The RapidIO endpoint device 101 is connected to the SRIO message conversion device 102. The SRIO message conversion device 102 is connected to the subsequent device 103.
[0064] The RapidIO endpoint device 101 can transmit the SRIO message to be converted to the SRIO message conversion device 102. The SRIO message conversion device 102 converts the SRIO message to be converted and removes the CRC check code and the padding code to obtain a converted valid SRIO message. Next, the SRIO message conversion device 102 can transmit the converted valid SRIO message to the subsequent device 103.
[0065] It should be noted that the subsequent device 103 here may be any other non-SRIO protocol device.
[0066] Please refer to the following Figure 2A , Figure 2AFIG. 2 is a process 200 of an embodiment of a SRIO message conversion method applied to an SRIO message conversion device according to the present disclosure. The process 200 can be applied to Figure 1 The SRIO message conversion device shown. The process 200 may include the following steps:
[0067] Step 201, obtaining each beat message and the effective data length of each beat message of the input SRIO message to be converted.
[0068] In this embodiment, the input SRIO message to be converted may be an SRIO message received by the SRIO message conversion device from a corresponding preceding device. The SRIO message to be converted may include a CRC check code and a padding code.
[0069] In practice, SRIO messages are divided into at least one beat for transmission in sequence, and the effective data length included in the corresponding message is also transmitted when each beat of the message is transmitted. When the start character "sop" marking the beginning of the message is received, it means that the next input data is the first beat message of a new SRIO message. When the end character "sop" marking the end of the message is received, it means that the next input data is the last beat message of the current SRIO message.
[0070] For example, when the length of each beat message is 128 bytes, if there is only 78 bytes of valid data in a beat message, the 78 bytes of valid message data can occupy a specified area in the beat message, such as a high-order area, while the other areas are invalid message data. In addition to the beat message, the effective data length of the beat message is also included with the input of the beat message, for example, the effective data length can be 78 bytes.
[0071] Step 202: Determine the sum of the effective data lengths of each beat of the SRIO message to be converted as the effective data length of the SRIO message to be converted.
[0072] Since the SRIO message to be converted is composed of different beats, the effective data length of the SRIO message to be converted can be obtained by accumulating the effective data length of each beat of the message.
[0073] Here, it is assumed that the SRIO message to be converted has N beats, N can be a natural number, n is a natural number between 1 and N, and it is assumed that the effective data length of the nth beat message in the SRIO message to be converted is keep n , the effective data length of the SRIO message to be converted is Length, and Length can be calculated by the following formula 1:
[0074] Length=keep1+keep2+…+keep n (Formula 1)
[0075] Step 203: parse the first beat message of the SRIO message to be converted to obtain valid message header data of the SRIO message to be converted.
[0076] The message header data of the SRIO message is in the first message of the SRIO message. Here, according to the provisions of the SRIO protocol, the first message of the SRIO message to be converted can be parsed to obtain the valid message header data of the SRIO message to be converted.
[0077] Here, the valid message header data may include a message type (i.e., an Ftype field in the SRIO protocol). Optionally, the valid message header data may also include a transaction type (i.e., a Ttype field in the SRIO protocol), a device identification length (i.e., a tt field in the SRIO protocol), and a number of address bits (in the SRIO protocol, for example, a value of 34, 50, or 66).
[0078] Step 204: Determine the first payload data position corresponding to the valid message header data of the SRIO message to be converted according to the first preset corresponding relationship logic.
[0079] Here, the first preset correspondence logic is used to characterize the correspondence between the SRIO valid message header data and the first load data position. Specifically, the first preset correspondence logic can be a logic formulated by technicians after summarizing various SRIO messages in advance, and the first preset correspondence logic can be implemented in the form of a circuit. The specific implementation method is not the focus of this patent application and will not be described in detail here.
[0080] For example, when the valid message header data of the SRIO message to be converted includes four data: message type, transaction type, device identification length and number of address bits, the input signal of the first preset corresponding relationship logic corresponding circuit can correspond to the four data signals of message type, transaction type, device identification length and number of address bits, and the output can include the first load data position signal.
[0081] Step 205: determine the first payload data position corresponding to the valid message header data of the SRIO message to be converted as the first payload data position of the SRIO message to be converted.
[0082] Step 206: Based on the message type, valid data length and first payload data position of the SRIO message to be converted, message conversion is performed on each beat message of the SRIO message to be converted to obtain a valid SRIO message after conversion.
[0083] After step 204 and step 205, the first load data position of the SRIO message to be converted has been determined based on the valid message header data in the SRIO message to be converted. Since there are similar first load data positions in different types of SRIO messages, the first load data positions of various types of SRIO messages can be summarized in advance and implemented with circuits, and the CRC check code and padding code in the SRIO message to be converted can be removed with corresponding processing logic. Since the circuit implementation here only needs to consider the message type, valid data length and first load data position of the SRIO message to be converted, the complexity of circuit design can be simplified.
[0084] That is, assuming that the message type of the SRIO message to be converted is Ftype, the valid data length is Length, and the first load data position is Skeep, the circuit involved here only needs three input data: Ftype, Length, and Skeep. The output data is the valid SRIO message after conversion.
[0085] The SRIO message conversion device can transmit the valid SRIO message after conversion to other subsequent devices that are not SRIO protocols.
[0086] In some optional implementations, step 206 may include: Figure 2B The following steps 20601 to 20604 are shown:
[0087] Step 20601, determining whether the valid data length of the SRIO message to be converted is less than the first preset first beat message length.
[0088] Assuming that the effective data length of the SRIO message to be converted is Length, and the first preset first beat message length is L1, then in step 2061, it is determined whether Length is less than L1.
[0089] Optionally, L1 may be 84 bytes.
[0090] When it is determined that the valid data length of the SRIO message to be converted is less than the first preset first beat message length, the process may proceed to step 20602 for execution.
[0091] Step 20602: Determine a first invalid data length corresponding to the message type of the SRIO message to be converted and the first payload data position according to the second preset corresponding relationship logic.
[0092] If it is determined in step 20601 that the valid data length of the SRIO message to be converted is less than the first preset first beat message length, the first invalid data length corresponding to the message type and the first load data position of the SRIO message to be converted can be determined according to the second preset corresponding relationship logic.
[0093] When the length of the SRIO message to be converted is less than the first preset first beat message length, the SRIO message to be converted includes only one beat message, and the invalid data to be removed in the only beat message (for example, including CRC check code and padding code) are all at the end of the only beat message, but the specific amount of invalid data, that is, the length of the invalid data is related to the message type Ftype of the SRIO message to be converted and the first load data position Skeep.
[0094] Specifically, the second preset correspondence logic can be a correspondence logic formulated by technicians after summarizing various SRIO messages in advance, and the second preset correspondence logic is used to characterize the correspondence between the SRIO message type and the first load data position and the invalid data length. The second preset correspondence logic can be implemented in circuit form, and its specific implementation method is not the focus of this patent application and is not described in detail here. It can be clearly seen that the second preset correspondence logic only requires two input data, namely the message type Ftype and the first load data position Skeep, and the output is the first invalid data length VL1.
[0095] Optionally, when the first preset first beat message length L1 is 84 bytes, step 20602 may be performed as follows:
[0096] The first step is to determine whether the first condition is met.
[0097] Here, the first condition is that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 6th byte.
[0098] If the first step determines that the first condition is met, it can be determined that the first invalid length VL1 is 4 bytes;
[0099] If the first step determines that the first condition is not satisfied, the second step may be performed, ie, determining whether the second condition is satisfied.
[0100] Here, the second condition is that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 8th byte or the 12th byte.
[0101] If the second step determines that the second condition is satisfied, it can be determined that the first invalid length VL1 is 2 bytes.
[0102] If the second step determines that the second condition is not satisfied, the third step may be executed, ie, determining whether the third condition is satisfied.
[0103] Here, the third condition is that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte.
[0104] If the third step determines that the third condition is satisfied, it can be determined that the first invalid length VL1 is 2 bytes.
[0105] If the third step determines that the third condition is not satisfied, the fourth step may be performed, ie, determining whether the fourth condition is satisfied.
[0106] Here, the fourth condition is that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte.
[0107] If the fourth step determines that the fourth condition is satisfied, it can be determined that the first invalid length VL1 is 4 bytes.
[0108] After executing step 20602, you can go to step 20603 for execution.
[0109] Step 20603: Determine the difference between the valid data length of the SRIO message to be converted and the first invalid data length as the first valid data length.
[0110] Here, in step 2062, the first invalid data length VL1 has been obtained, that is, the data of length VL1 in the only one-shot message corresponding to the SRIO message to be converted has been obtained as invalid data, and the difference between the valid data length Length of the SRIO message to be converted and the first invalid data length VL1, that is, the first valid data length, is assumed to be keep1', which is used to characterize the valid data length in the only one-shot message of the SRIO message to be converted. Specifically, it can be expressed as follows by Formula 2:
[0111] keep1' = Length - VL1 (Formula 2)
[0112] After executing step 20603, you can go to step 20604 for execution.
[0113] Step 20604: Generate a unique beat message of a valid SRIO message after conversion by using the data of the first valid data length in the unique beat message of the SRIO message to be converted.
[0114] Since the valid data in the SRIO message to be converted is in the front and the invalid data is in the back. In step 20603, it has been determined that the valid data length of the SRIO message to be converted is the first valid data length keep1', therefore, the data of the first keep1' length in the only one-beat message of the SRIO message to be converted can be used to generate the only one-beat message of the valid SRIO message after conversion. It can be understood that the generated valid SRIO message after conversion only includes one-beat message, and the only one-beat message does not include CRC check code and padding code.
[0115] After steps 20601 to 20604, when the effective data length Length of the SRIO message to be converted is less than the first preset first beat message length L1, the effective data length of the valid SRIO message after conversion, the first effective data length keep1', can be determined according to the message type Ftype of the SRIO message to be converted and the first load data position Skee, and the valid SRIO message after conversion is generated according to the above-mentioned first effective data length keep1'.
[0116] Based on the optional implementation of step 20601 to step 20604, if it is determined in step 20601 that the effective data length Length of the SRIO message to be converted is not less than the first preset first beat message length L1, the following step 20605 may be executed:
[0117] Step 20605, determining whether the valid data length of the SRIO message to be converted is greater than the first preset first beat message length and less than the second preset first beat message length.
[0118] That is, if it is determined in step 20601 that the effective data length Length of the SRIO message to be converted is not less than the first preset first beat message length L1, it is further determined whether the effective data length of the SRIO message to be converted is greater than the first preset first beat message length L1 and less than the second preset first beat message length L2, where the second preset first beat message length L2 is greater than the first preset first beat message length L1. If it is determined to be yes, go to step 20606 for execution.
[0119] Alternatively, L1 may be 84 bytes and L2 may be 127 bytes. That is, if it is determined in step 20601 that Length is not less than 84 bytes, the process proceeds to step 2065 to determine whether Length is greater than 84 bytes and less than 127 bytes.
[0120] After executing step 20605, you can go to step 20606 for execution.
[0121] Step 20606: Determine the second invalid data length corresponding to the first payload data position of the SRIO message to be converted according to the third preset corresponding relationship logic.
[0122] If it is determined in step 20605 that the valid data length Length of the SRIO message to be converted is greater than the first preset first beat message length L1 and less than the second preset first beat message length L2, it indicates that the SRIO message to be converted includes only one beat message, and the invalid data to be removed in the only one beat message includes two parts, one of which is a CRC check code, located between the preset first check code start position and the preset first check code end position, and the length is a single CRC check code length (for example, 2 bytes). The other part (for example, including the CRC check code and the padding code) is located at the tail of the only one beat message, but how much invalid data is at the tail, that is, how much the length of the invalid data at the tail is, is only related to the first load data position Skeep of the SRIO message to be converted.
[0123] Specifically, the third preset correspondence logic can be a correspondence logic formulated by technicians after pre-summarizing the regularity of the positions of CRC check codes and fill codes in SRIO messages whose valid data lengths are greater than the first preset first-beat message length L1 and less than the second preset first-beat message length L2. The third preset correspondence logic is used to characterize the correspondence between the first load data position and the invalid data length. The third preset correspondence logic can be implemented in circuit form, and its specific implementation method is not the focus of this patent application and is not described in detail here. It can be clearly seen that the third preset correspondence logic only requires one input data, namely the first load data position Skeep, and the output is the second invalid data length VL2 corresponding to the first load data position Skeep of the SRIO message to be converted.
[0124] Optionally, when L1 is 84 bytes and L2 is 127 bytes, step 20606 may be performed as follows:
[0125] In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte (ie, Skeep=6, 10, 14 or 18), the second invalid length is determined to be 6 bytes (ie, VL2=6 bytes).
[0126] In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte (ie, Skeep=8, 12, 16 or 20), the second invalid length is determined to be 4 bytes (ie, VL2=4 bytes).
[0127] After executing step 20606, you can go to step 20607 for execution.
[0128] Step 20607: Determine the difference between the valid data length of the SRIO message to be converted and the second invalid data length as the second valid data length.
[0129] Here, in step 20606, the second invalid data length VL2 has been obtained, that is, the data of the tail VL2 length in the only one-shot message corresponding to the SRIO message to be converted has been obtained as invalid data, and the difference between the valid data length Length of the SRIO message to be converted and the second invalid data length VL2, that is, the second valid data length, is assumed to be keep2', which is used to characterize the valid data length in the only one-shot message of the SRIO message to be converted. Specifically, it can be expressed as follows by Formula 3:
[0130] keep2' = Length – VL2 (Formula 3)
[0131] After executing step 20607, you can go to step 20608 for execution.
[0132] Step 20608: Move the unique message data of the SRIO message to be converted forward by the length of a single CRC check code starting from the preset first check code end position.
[0133] Since the data of a single CRC check code length between the preset first check code starting position and the preset first check code ending position in the only beat message data of the SRIO message to be converted is the CRC check code, the data of the only beat message data of the SRIO message to be converted is moved forward by a single CRC check code length from the preset first check code ending position, and the CRC check code in the middle part of the SRIO message to be converted will be removed.
[0134] After executing step 20608, you can go to step 20609 for execution.
[0135] Step 20609: Generate a unique beat message of a valid SRIO message after conversion by using the data of the first second valid data length in the unique beat message of the SRIO message to be converted after the shift.
[0136] Since the valid data in the SRIO message to be converted after the move operation in step 20608 is in the front, and the invalid data is in the back. In step 20607, the valid data length of the SRIO message to be converted has been determined to be the second valid data length keep2', therefore, the only one-beat message of the valid SRIO message after conversion can be generated by using the data of the first keep2' length in the only one-beat message of the SRIO message to be converted after the move. It can be understood that the generated valid SRIO message after conversion includes only one-beat message, and the only one-beat message does not include a CRC check code and a padding code.
[0137] Through steps 20605 to 20609, when the valid data length Length of the SRIO message to be converted is greater than the first preset first beat message length L1 and less than the second preset first beat message length L2, the CRC check code in the middle of the SRIO message to be converted and the invalid data at the end can be removed, and finally a valid SRIO message after conversion is generated.
[0138] Based on the optional implementation of steps 20605 to 20609, if it is determined in step 20605 that the valid data length of the SRIO message to be converted does not satisfy the requirement that it is greater than the first preset first beat message length L1 and less than the second preset first beat message length L2, the following steps 20610 may be performed:
[0139] Step 20610, determining whether the valid data length of the SRIO message to be converted is greater than the second preset first beat message length.
[0140] If it is determined that the effective data length Length of the SRIO message to be converted is greater than the second preset first beat message length L2, go to step 20611 for execution.
[0141] Step 20611: Determine the difference between the valid data length of the first beat message of the SRIO message to be converted and the length of a single CRC check code as the converted valid data length of the first beat message in the SRIO message to be converted.
[0142] If it is determined in step 20610 that the valid data length Length of the SRIO message to be converted is greater than the second preset first beat message length L2, it indicates that the SRIO message to be converted has at least two beat messages, and the invalid data of the SRIO message to be converted includes:
[0143] First, there is a CRC check code at the end of the first beat message.
[0144] Second, there are CRC checksum and padding codes at the end of the tail beat message, but the length of invalid data such as CRC checksum and padding codes at the end of the tail beat message is only related to the first payload data position of the SRIO message.
[0145] If the SRIO message to be converted has an intermediate beat that is neither the first beat nor the last beat, the intermediate beat message does not include a CRC check code and a filling code.
[0146] Here, in step 20611, in order to remove the CRC check code in the first beat message in the SRIO message to be converted, the difference between the effective data length of the first beat message in the SRIO message to be converted and the length of a single CRC check code can be determined as the converted effective data length of the first beat message in the SRIO message to be converted.
[0147] Here, it is assumed that the SRIO message to be converted has M beats, M is greater than or equal to 2, and m is a natural number between 1 and M.
[0148] When m is equal to 1, step 20611 can be specifically expressed by formula 4 as follows:
[0149] keep1” = keep1 - L CRC (Formula 4)
[0150] Wherein, "keep1" is the calculated effective data length of the first beat message in the SRIO message to be converted after conversion, L CRC The length of a single CRC check code (for example, 2 bytes).
[0151] After executing step 20611, you can go to step 20612 for execution.
[0152] Step 20612: determine the valid data length of the intermediate beat message of the SRIO message to be converted as the converted valid data length of the corresponding intermediate beat message.
[0153] Since the intermediate beat has no CRC check code and padding code, the effective data length after conversion of the intermediate beat message of the SRIO message to be converted can be the same as the effective data length of the corresponding intermediate beat message, instead of removing invalid data.
[0154] Specifically, it can be expressed as follows using Formula 5:
[0155] keep m ” = keep m (Formula 5)
[0156] Here, m is a natural number greater than 1 and less than M.
[0157] After executing step 20612, you can go to step 20613 for execution.
[0158] Step 20613: Determine the invalid data length of the first tail beat corresponding to the first payload data position of the SRIO message to be converted according to the fourth preset corresponding relationship logic.
[0159] Here, from the record in step 20611, it can be seen that at this time, the length of invalid data such as the CRC check code and the filling code at the tail of the SRIO message to be converted is only related to the first payload data position of the SRIO message.
[0160] The fourth preset correspondence logic is used to characterize the correspondence between the first load data position of the SRIO message and the invalid data length of the tail beat. Specifically, the fourth preset correspondence logic can be a correspondence logic formulated by technicians after pre-summarizing various SRIO messages with valid data lengths greater than the second preset first beat message length L2. The fourth preset correspondence logic is used to characterize the correspondence between the first load data position of SRIO and the invalid data length of the tail beat. The fourth preset correspondence logic can be implemented in circuit form, and its specific implementation method is not the focus of this patent application and will not be described in detail here. It can be clearly stated that the fourth preset correspondence logic only requires one input data, namely the first load data position Skeep, and the output is the first tail beat invalid data length VL last .
[0161] Optionally, when the first preset first beat message length L1 is 84 bytes and the second preset first beat message length L2 is 127 bytes, step 20613 may be performed as follows:
[0162] In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte (ie, Skeep=6, 10, 14 or 18), determining the first tail invalid data length VL last It is 4 bytes.
[0163] In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte (ie, Skeep=8, 12, 16 or 20), determining the first tail invalid data length VL last It is 2 bytes.
[0164] Step 20614: Determine the difference between the valid data length of the tail beat message of the SRIO message to be converted and the invalid data length of the first tail beat message as the converted valid data length of the tail beat message in the SRIO message to be converted.
[0165] Specifically, it can be expressed as follows using Formula 5:
[0166] keep M ” = keep M – VL last (Formula 6)
[0167] After executing step 20614, you can go to step 20615 for execution.
[0168] Step 20615: for each beat message of the SRIO message to be converted, use the data of the converted valid data length of the beat message before the beat message to generate the corresponding beat message of the converted valid SRIO message.
[0169] After step 20611 to step 20614, the valid data length after conversion of each beat message in the SRIO message to be converted has been obtained. Therefore, for each beat message of the SRIO message to be converted, the data of the valid data length after conversion of the beat message before the beat message can be used to generate the corresponding beat message of the valid SRIO message after conversion.
[0170] Through steps 20610 to 20615, when the valid data length of the SRIO message to be converted is greater than the second preset first beat message length, the corresponding message beats in the valid SRIO message after conversion can be generated according to the specific invalid data locations and lengths of the first beat, middle beat and last beat of the SRIO message to be converted.
[0171] The SRIO message conversion method provided by the above-mentioned embodiment of the present disclosure first determines the effective data length of the input SRIO message to be converted, and then determines the first load data position of the SRIO message to be converted according to the first preset corresponding relationship logic through the effective message header data in the message header of the SRIO message to be converted, and finally, based on the message type, effective data length and first load data position of the SRIO message to be converted, performs message conversion on each beat message of the SRIO message to be converted to obtain a valid SRIO message after conversion, wherein the valid SRIO message after conversion does not include a CRC check code and a padding code. The message conversion method does not limit the effective data length, message type and number of message beats included in the SRIO message to be converted, and the method can include but is not limited to the following technical effects through hardware circuit modularization:
[0172] First, the first payload data position of the SRIO message to be converted is determined in advance according to the valid message header data in the message header of the SRIO message to be converted through the first preset correspondence logic. Since there are similar first payload data positions in different types of SRIO messages, the combinational logic of how to remove the CRC check code and the padding code can be reduced, thereby simplifying the complexity of circuit design.
[0173] Second, the method has no restrictions on the effective data length of the SRIO message to be converted and the number of message beats included, and has a wide range of applications.
[0174] Third, optionally, by adopting a pipeline conditional judgment method, only the first load data position needs to be determined, which can reduce and remove the combinational logic of CRC and fill code judgment, thereby optimizing the timing and reducing the logic area occupied by the circuit structure.
[0175] Fourth, for the protocol conversion scenario, the calculated first load data position can be reused as the required data of the subsequent equipment, reducing the calculation cost of the subsequent equipment.
[0176] Reference below Figure 3 , Figure 3 It is a decomposed flow chart of another embodiment of step 206 in the SRIO message conversion method applied to the SRIO message conversion device according to the present disclosure.
[0177] exist Figure 3 In the decomposition flow chart, it is assumed that the SRIO message to be converted has N beats, N can be a natural number, n is a natural number between 1 and N, and the effective data length of the nth beat message in the SRIO message to be converted is keep n The effective data length of the SRIO message to be converted is Length, Length = keep1 + keep2 + ... + keep n The first preset first beat message length L1 is 84 bytes, and the second preset first beat message length L2 is 127 bytes. The message type of the SRIO message to be converted is Ftype, and the first payload data position is the Skeepth byte.
[0178] Step 206 in the SRIO message conversion method flow may specifically include the following steps:
[0179] It should be noted that the numerical units corresponding to the table lengths in the following steps are bytes, and the numerical units corresponding to the table positions mean the corresponding number of bytes.
[0180] Step 3100, determine whether Length is less than 84.
[0181] If yes, go to step 3200.
[0182] If no, go to step 3300.
[0183] Step 3200, determine whether Ftype=1010&&Skeep=6.
[0184] Here && means that two conditions are true at the same time, that is, it represents logical "and".
[0185] If yes, go to step 3210.
[0186] If no, go to step 3220.
[0187] Step 3210, keep1'=Length-4.
[0188] Then, go to step 3250.
[0189] Step 3220, determine whether Ftype=1010&&Skeep=8,12.
[0190] If yes, go to step 3221.
[0191] If no, go to step 3230.
[0192] Step 3221, keep1'=Length–2.
[0193] Then, go to step 3250.
[0194] Step 3230, determine whether Skeep=6,10,14,18.
[0195] If yes, go to step 3231.
[0196] If no, go to step 3240.
[0197] Step 3231, keep1'=Length–2.
[0198] Then, go to step 3250.
[0199] Step 3240, determine whether Skeep=8,12,16,20.
[0200] If yes, go to step 3241.
[0201] Step 3241, keep1'=Length–4.
[0202] Then, go to step 3250.
[0203] Step 3250: Use the data of the first keep1 length in the only beat message of the SRIO message to be converted to generate the only beat message of the valid SRIO message after conversion.
[0204] Then, step 206 ends.
[0205] Step 3300, determine whether 84 <Length<127。
[0206] If yes, go to step 3310.
[0207] If no, go to step 3400.
[0208] Step 3310, determine whether Skeep=6,10,14,18.
[0209] If yes, go to step 3311.
[0210] If no, go to step 3320.
[0211] Step 3311, keep2'=Length-6.
[0212] Then, go to step 3330.
[0213] Step 3320, determine whether Skeep=8,12,16,20.
[0214] If yes, go to step 3321.
[0215] Step 3321, keep2'=Length–4.
[0216] Then, go to step 3330.
[0217] Step 3330, the unique message data of the SRIO message to be converted is moved forward by LCRC bytes starting from the 83rd byte.
[0218] Here, LCRC is a single CRC check code length (eg, 2 bytes).
[0219] Then, go to step 3340.
[0220] Step 3340: Use the data of the first keep2' length in the only beat message of the moved SRIO message to be converted to generate the only beat message of the converted valid SRIO message.
[0221] Then, step 206 ends.
[0222] Step 3400, determine whether Length>127.
[0223] If yes, go to step 3410.
[0224] Step 3410, determine whether it is the first beat, the middle beat or the last beat.
[0225] If it is the first shot, go to step 3420.
[0226] If it is an intermediate shot, go to step 3430.
[0227] If it is the tail beat, go to step 3440.
[0228] Step 3420, keep1"=keep1-LCRC.
[0229] Then, go to step 3460.
[0230] Step 3430, keepn"=keepn.
[0231] Then, go to step 3460.
[0232] Step 3440, determine whether Skeep=6,10,14,18.
[0233] If yes, go to step 3441.
[0234] If no, go to step 3450.
[0235] Step 3441, keepN”=keepN–4.
[0236] Then, go to step 3460.
[0237] Step 3450, determine whether Skeep=8,12,16,20.
[0238] If yes, go to step 3451.
[0239] Step 3451, keepN”=keepN–2.
[0240] Then, go to step 3460.
[0241] Step 3460: for the nth beat of the SRIO message to be converted, use keep n "The length of data generates the nth beat message of the valid SRIO message after conversion.
[0242] Then, step 206 ends.
[0243] As another aspect, the present disclosure further provides a SRIO message conversion processor, which can be configured to perform the following steps: Figure 2A And the SRIO message conversion method recorded in its optional implementation manner.
[0244] As another aspect, the present disclosure further provides an SRIO message conversion device, which may include: one or more processors; a storage device having one or more programs stored thereon, and when the one or more programs are executed by the one or more processors, the one or more processors implement Figure 2A And the SRIO message conversion method recorded in its optional implementation manner.
[0245] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0246] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A SRIO message conversion method, applied to a SRIO protocol conversion device, the method comprising: Acquire each beat message and the effective data length of each beat message of the input SRIO message to be converted, wherein the SRIO message to be converted includes a CRC check code and a padding code; Determine the sum of the effective data lengths of each beat message of the SRIO message to be converted as the effective data length of the SRIO message to be converted; Parsing the first beat message of the SRIO message to be converted to obtain valid message header data of the SRIO message to be converted, where the valid message header data includes a message type; Determine, according to a first preset correspondence logic, a first payload data position corresponding to the valid message header data of the SRIO message to be converted, wherein the first preset correspondence logic is used to characterize the correspondence between the SRIO valid message header data and the first payload data position; Determine the first payload data position corresponding to the valid message header data of the SRIO message to be converted as the first payload data position of the SRIO message to be converted; Based on the message type, valid data length and first load data position of the SRIO message to be converted, message conversion is performed on each beat message of the SRIO message to be converted to obtain a converted valid SRIO message, wherein the converted valid SRIO message does not include a CRC check code and a padding code.
2. The method according to claim 1, wherein: The method of performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion includes: Determine whether the valid data length of the SRIO message to be converted is less than the first preset first beat message length; In response to determining that the length of the first-beat message is less than the first preset first-beat message length, determining a first invalid data length corresponding to both the message type and the first payload data position of the SRIO message to be converted according to a second preset correspondence logic, wherein the second preset correspondence logic is used to characterize the correspondence between the SRIO message type and the first payload data position and the invalid data length; Determine a difference between the valid data length of the SRIO message to be converted and the first invalid data length as a first valid data length; The unique beat message of the converted valid SRIO message is generated by using the data of the first valid data length before the unique beat message of the SRIO message to be converted.
3. The method according to claim 2, wherein: The first preset first beat message length is 84 bytes.
4. The method according to claim 3, wherein: Determining, according to the second preset corresponding relationship logic, a first invalid data length corresponding to the message type of the SRIO message to be converted and the first load data position includes: Determine whether a first condition is met, where the first condition is that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 6th byte; In response to determining that the first condition is satisfied, determining that the first invalid data length is 4 bytes; In response to determining that the first condition is not satisfied, determining whether a second condition is satisfied, the second condition being that the message type of the SRIO message to be converted is a doorbell type and the first payload data position of the SRIO message to be converted is the 8th byte or the 12th byte; In response to determining that the second condition is satisfied, determining that the first invalid data length is 2 bytes; In response to determining that the second condition is not satisfied, determining whether a third condition is satisfied, the third condition being that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte, or the 18th byte; In response to determining that the third condition is satisfied, determining that the first invalid data length is 2 bytes; In response to determining that the third condition is not satisfied, determining whether a fourth condition is satisfied, the fourth condition being that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte, or the 20th byte; In response to determining that the fourth condition is satisfied, the first invalid data length is determined to be 4 bytes.
5. The method according to claim 2, wherein: The method of performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion also includes: In response to determining that the effective data length of the SRIO message to be converted is not less than the first preset first beat message length, determining whether the effective data length of the SRIO message to be converted is greater than the first preset first beat message length and less than a second preset first beat message length, wherein the second preset first beat message length is greater than the first preset first beat message length; In response to the determination being yes, determining, according to a third preset correspondence logic, a second invalid data length corresponding to a first payload data position of the SRIO message to be converted, wherein the third preset correspondence logic is used to characterize a correspondence between the first payload data position and the invalid data length; Determine the difference between the valid data length of the SRIO message to be converted and the second invalid data length as the second valid data length; The only one-beat message data of the SRIO message to be converted is moved forward by a single CRC check code length starting from the preset first check code end position; The unique beat message of the converted valid SRIO message is generated by using the data of the second valid data length in the unique beat message of the to-be-converted SRIO message after the move.
6. The method according to claim 5, wherein: The second preset first beat message length is 127 bytes.
7. The method according to claim 6, wherein: The determining, according to the third preset corresponding relationship logic, a second invalid data length corresponding to the first load data position of the SRIO message to be converted includes: In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte, determining that the second invalid data length is 6 bytes; In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte, determining that the second invalid data length is 4 bytes.
8. The method according to claim 5, wherein: The method of performing message conversion on each beat message of the SRIO message to be converted based on the message type, valid data length and first load data position of the SRIO message to be converted to obtain a valid SRIO message after conversion also includes: In response to determining that the effective data length of the SRIO message to be converted is greater than the second preset first beat message length, a difference between the effective data length of the first beat message of the SRIO message to be converted and the length of a single CRC check code is determined as the converted effective data length of the first beat message in the SRIO message to be converted; Determine the effective data length of the intermediate beat message of the SRIO message to be converted as the effective data length after conversion of the corresponding intermediate beat message; Determine, according to a fourth preset corresponding relationship logic, a first tail beat invalid data length corresponding to a first payload data position of the SRIO message to be converted, wherein the fourth preset corresponding relationship logic is used to characterize the corresponding relationship between the first payload data position of the SRIO message and the tail beat invalid data length; Determine the difference between the valid data length of the tail beat message of the SRIO message to be converted and the invalid data length of the first tail beat as the converted valid data length of the tail beat message in the SRIO message to be converted; For each beat message of the SRIO message to be converted, the corresponding beat message of the converted valid SRIO message is generated by using the data of the converted valid data length of the previous beat message of the beat message.
9. The method according to claim 8, wherein: The first preset first beat message length is 84 bytes, and the second preset first beat message length is 127 bytes; as well as The determining, according to the fourth preset corresponding relationship logic, the first tail beat invalid data length corresponding to the first load data position of the SRIO message to be converted includes: In response to determining that the first payload data position of the SRIO message to be converted is the 6th byte, the 10th byte, the 14th byte or the 18th byte, determining that the invalid data length of the first tail beat is 4 bytes; In response to determining that the first payload data position of the SRIO message to be converted is the 8th byte, the 12th byte, the 16th byte or the 20th byte, determining that the invalid data length of the first tail beat is 2 bytes.
10. An SRIO message conversion processor, configured to execute the method according to any one of claims 1 to 9.
11. An SRIO message conversion device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 9.
