Interface conversion method, device, product and computer readable storage medium

By using a state machine to track the effective range of data segments and dynamically allocate data processing channels in the interface conversion device, the structural contradiction between conversion between segmented interfaces and streaming interfaces is solved, efficient data conversion is achieved, data loss and throughput are avoided, and heterogeneous protocol interconnection performance is improved.

CN120186243AActive Publication Date: 2025-06-20LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510661949.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-06-20
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

The prior art lacks an efficient conversion scheme between segmented interfaces and streamed interfaces, especially in the direction of segmented data conversion, which leads to data loss, throughput limitation and protocol compatibility risks.

Method used

By determining the information corresponding to the start and terminators in the data to be converted by the segmented interface during the current clock cycle, the state machine is used to accurately track the effective range of the data segment and dynamically allocate the data processing channel to output the converted data that meets the transmission requirements of the streaming interface.

Benefits of technology

It solves the structural contradiction between segmented interfaces and streaming interfaces, avoids data loss and throughput limitations, improves the interconnection performance of heterogeneous protocols, and realizes data streamlined speed resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186243A_ABST
    Figure CN120186243A_ABST
Patent Text Reader

Abstract

The invention discloses an interface conversion method and device, a product and a computer readable storage medium, and relates to the technical field of communication, and the method comprises the steps: positioning the starting and ending boundaries of each data packet in real time based on information corresponding to a starting character and a terminating character in to-be-converted data received by a segmented interface, the effective range of a data segment is accurately tracked through the state machine, boundary dislocation or truncation caused by a compressed data stream format of a segmented interface is avoided, so that the problem of data loss is solved, data processing operations executed by the first channel and the second channel are dynamically allocated according to the current state and the next jump state of the state machine, and the data processing efficiency is improved. The technical problem that structural contradiction exists between the dynamic characteristics of the segmented interface and the continuity requirement of the streaming interface is solved, and the technical effect of data stream fast analysis is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to an interface conversion method, device, product, and computer-readable storage medium. Background Art

[0002] With the development of high-speed network communication technologies, the 400G / 200G Ethernet protocol has become the core transmission standard for data centers due to its ultra-high bandwidth characteristics. It adopts a fixed-segment compressed data stream format, while high-speed interconnect protocols such as PCIe (Peripheral Component Interconnect Express) usually implement data transmission based on the AXI4-Stream (Advanced eXtensible Interface 4-Stream) streaming interface. However, in the prior art, there is a lack of an efficient conversion scheme for segmented interfaces and streaming interfaces. In particular, there are significant defects in the direction of converting segmented data to streaming data (Segmented_to_AXIS). Due to the structural contradiction between the dynamic characteristics of the segmented interface and the continuity requirements of the streaming interface, there are risks of data loss, throughput limitation, and protocol compatibility in high-throughput scenarios, which affect the performance of heterogeneous protocol interconnection.

[0003] Therefore, how to provide a solution to the above technical problems is an issue that those skilled in the art need to solve currently. Summary of the Invention

[0004] The present invention provides an interface conversion method, device, product, and computer-readable storage medium to at least solve the technical problem of the structural contradiction between the dynamic characteristics of the segmented interface and the continuity requirements of the streaming interface in the related art.

[0005] The present invention provides an interface conversion method, including: determining information corresponding to a start symbol and an end symbol in data to be converted received by a segmented interface of an interface conversion device in a current clock cycle; determining a next transition state of a state machine based on the information and a current state of the state machine; and controlling a first channel and / or a second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state, so as to output converted data through the first channel and / or the second channel, and the converted data meets the transmission requirements of the streaming interface of the interface conversion device.

[0006] The present invention further provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of the above interface conversion method when executing the computer program.

[0007] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above interface conversion method are implemented.

[0008] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above interface conversion method are implemented.

[0009] Through the present invention, based on the information corresponding to the start symbol and end symbol in the data to be converted received by the segmented interface, the start and end boundaries of each data packet are located in real time. The effective range of the data segment is accurately tracked through a state machine, avoiding boundary misalignment or truncation caused by the compressed data stream format of the segmented interface, thereby solving the problem of data loss. According to the current state and the next-hop transition state of the state machine, the data processing operations executed by the first channel and the second channel are dynamically allocated to output the converted data that meets the transmission requirements of the streaming interface, solving the technical problem that there is a structural contradiction between the dynamic characteristics of the segmented interface and the continuity requirements of the streaming interface, and achieving the technical effect of line-speed parsing of the data stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0011] Figure 1 It is a flowchart of an interface conversion method provided by an embodiment of the present invention.

[0012] Figure 2 It is a schematic diagram of an interface conversion provided by an embodiment of the present invention.

[0013] Figure 3 It is a schematic diagram of packet splicing of a segmented interface provided by an embodiment of the present invention.

[0014] Figure 4 It is a schematic diagram of header interruption provided by an embodiment of the present invention.

[0015] Figure 5 It is a schematic diagram of middle-packet interruption provided by an embodiment of the present invention.

[0016] Figure 6 It is a schematic diagram of tail-packet interruption provided by an embodiment of the present invention.

[0017] Figure 7 It is a schematic diagram of small-packet transmission interruption provided by an embodiment of the present invention.

[0018] Figure 8A schematic diagram of idle state jump provided by an embodiment of the present invention.

[0019] Figure 9 The first schematic diagram of non-idle state jump provided by an embodiment of the present invention.

[0020] Figure 10 The second schematic diagram of non-idle state jump provided by an embodiment of the present invention. Detailed implementation manners

[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0022] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present invention are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0023] In order to enable those skilled in the art in the technical field to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0024] An embodiment of the present invention provides an interface conversion method. Refer to Figure 1 , and in combination with the execution flow of the interface conversion method, the method will be described in detail.

[0025] The interface conversion method provided by the embodiment of the present invention includes: S101: Determine the information corresponding to the start symbol and the end symbol in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle.

[0026] In this embodiment, the interface conversion is specifically the conversion from the segmented interface (Segment) to the streaming interface (AXIS). The conversion schematic diagram is referred to Figure 2 as shown in Figure 2Shows the conversion of a single-channel original 400G / 200G MAC Segment data interface into a dual-channel standard AXIS data interface. Among them, RX_MAC_VALID is the data valid flag, used to indicate whether the received data is valid; RX_MAC_DATA is the data, that is, the content of the transmitted data, with a bit width of 1024 / 512 bit, and each 64 bit is a Segmented; RX_MAC_INFRAME is the Segment valid flag (data segment valid flag), where each 1 bit corresponds to a Segmented, and can indicate sop (start symbol) and eop (end symbol); RX_EOP_EMPTY indicates the number of remaining bytes of the last Segmented when the frame ends, and the rest are indication signals (errors and statuses, such as Figure 2 RX_MAC_FCS_ERROR in it (FCS check error flag, used to indicate the frame check sequence (FCS) error of this Segment), RX_MAC_FCS_ERROR (receive error flag, used to indicate error type information), RX_MAC_STATUS (status information, used to provide status information related to reception)). The AXIS interface is a VALID-READY handshake. AXIS_TX_TVALID is the send data valid flag, used to indicate that the current output AXIS data is valid (VALID-READY handshake signal); AXIS_TX_TREADY is the send ready flag, which is set high when the downstream module is ready to receive data (VALID-READY handshake signal); AXIS_TX_TLAST is the frame end flag, used to indicate that the current transmission is the last data packet of the frame; AXIS_TX_TDATA

[1024] is the send data, representing the data signal of the AXIS interface, with a bit width of 1024 bits, and AXIS_TX_TKEEP[1024 / 8], is the data byte valid mask, and each 1 bit corresponds to a byte (8 bits) of TDATA, indicating whether the byte is valid. Is the sideband user signal, used to carry additional information related to the data (such as error flags, status information), and every 64 bits corresponds to 2 bits of user signal.

[0027] Taking the segmented interface of 400G MAC as an example, its bit width is 1024 bit, and it can be divided into 16 segments (data segments) in total. Each segment is 64 bit (8 bytes), inframe is 16 bit, and each bit corresponds to the valid flag of each segment, and valid corresponds to the valid flag of the global segment. The sop (start symbol) and eop (end symbol) of the data packet may fall into any one of the 16 segments, as Figure 3 Shown.

[0028] Considering that the minimum packet length of the data packet is 64 bytes and the minimum frame interval is 12 bytes, so 16 segments can contain at most two SOPs and two EOPs, and at least no SOPs and EOPs. Generally, there are roughly the following seven cases. In the first case, there are no SOPs and EOPs (the current is the middle data part of the data packet, inframe is FFFF); in the second case, only one SOP is included (which may appear at the beginning, middle or end); in the third case, only one EOP is included (which may appear at the beginning, middle or end); in the fourth case, one SOP and one EOP are included (the SOP to the EOP is regarded as a whole and appears at the beginning, middle or end); in the fifth case, two SOPs and one EOP are included; in the sixth case, two EOPs and one SOP are included; in the seventh case, two SOPs and two EOPs are included.

[0029] Since the EOP and SOP can be used to indicate the start boundary and end boundary of the data packet, in order to facilitate subsequent processing such as direct output, cross-segment splicing and interruption recovery of the data, this embodiment first determines the information corresponding to the start symbol and end symbol in the data to be converted received by the segmentation interface of the interface conversion device within the current clock cycle. The information corresponding to the start symbol and end symbol at least includes the number of start symbols and the number of end symbols in the data to be converted received within the current clock cycle.

[0030] In an alternative embodiment, when the interface conversion method in this embodiment is applied in the intelligent network card scenario, it can be understood that the intelligent network card needs to efficiently process 400G data from the network, identify the data packet boundary for fast offloading (such as encryption / decryption). In this application scenario, the data packet length is variable, and there may be dense small packets (such as ARP requests / responses, ICMP messages) or large packets (video streams or storage data), and the frame interval is compact. Assume that in the data to be converted received within the current clock cycle (Ethernet frame, a MAC layer data frame conforming to the IEEE 802.3 standard), assume , each segment has a width of 64 bits (8 bytes). To determine the positions of sop and eop, only the INFRAM signal is required. Looking from right to left, the rightmost bit is bit0, and the leftmost bit is bit15. When it is detected that adjacent bits change from 0 to 1 (looking from right to left), this segment is considered as sop. When it is detected that adjacent bits change from 1 to 0, this segment is considered as eop. In this embodiment, the first sop is bit4 (segment4), the second sop is bit14 (segment14), the first eop position is bit10 (segment10), and eop_empty only indicates how many bytes are still needed in the segment corresponding to eop to make up a complete segment (8 bytes). If at this time , it means that the effective byte count of segment10 is 8 - 3 = 5 bytes, and three bytes are invalid.

[0031] In another alternative embodiment, the interface conversion method in this embodiment is applied in a network offloading scenario. The network offloading engine needs to handle TCP segment reassembly to ensure the integrity of data packets for offloading protocol parsing (such as HTTP header extraction). It can be understood that long data stream fragmentation (such as TCP stream fragmentation) may span multiple clock cycles. Assume that in the data to be converted received within the current clock cycle (which can be based on the network layer (IP packet) and transport layer (TCP segment) data fragmentation of the TCP / IP protocol stack), . Traverse RX_MAC_INFRAME. In this embodiment, the first sop is bit10 (segment10), the first eop is bit4 (segment4), and the second eop is bit14 (segment14).

[0032] In addition, when determining sop and eop, it is also necessary to combine the comparison of inframe between the previous and the next frames. For example, if the inframe of the first frame is 16'b0011_1111_1111_1111 and the inframe of the second frame is 16'b1111_1111_1111_1111, the bit0 of the second frame has a transition relative to the bit15 of the previous frame. Therefore, bit0 of the second frame is also a sop.

[0033] It can be understood that the minimum packet length of a network packet is 64 bytes. Therefore, at least 8 consecutive segments are considered as 1 for a data packet, and there is at least a distance of two segments between two data packets. The RX_MAC_INFRAME of the two frames provided in the above embodiments is only an example for identifying eop and sop, and it can be set specifically according to actual engineering needs. This embodiment does not make specific limitations here.

[0034] S102: Determine the next transition state of the state machine based on the current state of the information and the state machine.

[0035] In this embodiment, a state machine is established in advance based on the number of eops and sops that can be included in the data segments in the data that can be received by the segmented interface within one clock cycle. It includes IDLE (idle state), SOP2_EOP1 (including two sops and one eop), SOP1_EOP1 (including one sop and one eop and the eop position is ahead of the sop), EOP1_SOP1 (including one sop and one eop and the eop position lags behind the sop), EOP1 (only including one eop), SOP1 (only including one sop), NO_SOP_EOP (not including sop and eop), SOP2_EOP1 (including two sops and one eop), SOP1_EOP2 (including one sop and two eops). The specific state machine transitions and state controls are shown in Table 1.

[0036] Table 1 Schematic table of state machine transitions and state controls

[0037] According to the current state, as well as the number and relative positions of eops and sops, the next transition state can be determined. Exemplarily, assuming the current state is IDLE, the next state may be SOP2_EOP1, may also be EOP1_SOP1, may also be SOP1. If there is only one sop currently, the next state of the current state IDLE is SOP1, and so on.

[0038] S103: Control the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state, so as to output the converted data through the first channel and / or the second channel, and the converted data meets the transmission requirements of the streaming interface of the interface conversion device. In this embodiment, data processing operations to be performed by the first channel and the second channel in the interface conversion device are pre-configured for each state in the state machine, including but not limited to outputting data, caching data, etc., so as to realize combining the segmented data into the converted data that meets the transmission requirements of the streaming interface. Among them, the bidirectional one-hot code converts sops and eops, and the combinational logic controls the output valid tkeep.

[0039] Taking the above two application scenarios as examples again, in the smart network card application scenario, it is detected that the data to be converted in the current clock cycle includes 2 SOPs and 1 EOP. According to the jump rule in Table 1, assuming the current state is the idle state IDLE, it is necessary to jump to the SOP2_EOP1 state, that is, SOP2_EOP1 is the next jump state. At this time, the first channel outputs the current packet data (segment4 - segment10), and caches the next packet data (the starting position is segment14, starting to cache) to the next cycle, waiting for the subsequent EOP to arrive.

[0040] In the network offloading application scenario, assuming it is detected that the data to be converted in the current clock cycle includes 2 EOPs and 1 SOP. According to the rule in Table 1, if the current state is the SOP2_EOP1 state, it jumps to the SOP1_EOP2 state, that is, SOP1_EOP2 is the next jump state in this embodiment. At this time, there are two possible output actions. The first output action: the first channel outputs the current packet data (including the data after the second SOP in the SOP2_EOP1 state and the data before the first EOP in the current clock cycle), and the second channel outputs the next packet data (that is, the data between the first SOP and the second EOP in the current clock cycle). The second output action: the first channel outputs the current packet data, caches the remaining data of the current packet, and the second channel outputs the next packet data. For other jumps and output actions, similarly, they are not specifically limited in this embodiment. As an optional embodiment, the interface conversion device can be built based on programmable logic devices, including but not limited to FPGA (Field-Programmable Gate Array), CPLD (Complex Programmable Logic Device), ASIC (Application-Specific Integrated Circuit), SoC (System on Chip), etc., and can be implemented by RTL (Register-Transfer Level), which is convenient for system maintenance and function expansion. It at least includes a segmented interface for receiving the data to be converted, a processor, and a streaming interface including a dual channel for implementing the conversion and output of the data to be converted into the converted data that meets the transmission requirements of the streaming interface.

[0041] Through this embodiment, based on the information corresponding to the start symbol and end symbol in the data to be converted received by the segmented interface, the start and end boundaries of each data packet are located in real time, and the state machine is used to accurately track the valid range of the data segment, avoiding boundary misalignment or truncation caused by the compressed data stream format of the segmented interface, thereby solving the problem of data loss. According to the current state and the next jump state of the state machine, the data processing operations executed by the first channel and the second channel are dynamically allocated to output the converted data that meets the transmission requirements of the streaming interface, solving the technical problem of the structural contradiction between the dynamic characteristics of the segmented interface and the continuity requirements of the streaming interface, and achieving the technical effect of line speed parsing of the data stream.

[0042] Based on the above embodiment: In an exemplary embodiment, the information includes the number of start symbols and the number of end symbols; the process of determining the information corresponding to the start symbol and end symbol in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle includes: parsing the data segment valid flag carried in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle; determining the number of start symbols and the number of end symbols according to the data segment valid flag.

[0043] In this embodiment, each bit in the data segment valid flag RX_MAC_INFRAME corresponds to a Segment in the data to be converted, indicating whether the Segment is valid and whether it contains sop or eop, thereby accurately identifying the start position and end position of the data packet, avoiding the ambiguity of the data packet boundary, and precise boundary management reduces possible errors when splicing or splitting data packets, such as data loss, duplication, or mismatch.

[0044] In an exemplary embodiment, the data segment valid flag includes a start vector flag and an end vector flag; the process of determining the number of start symbols and the number of end symbols according to the data segment valid flag includes: determining the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag.

[0045] Among them, the process of determining the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag includes: performing a bitwise OR operation on the start vector flag and the end vector flag respectively to obtain the number of start symbols and the number of end symbols.

[0046] In this embodiment, since the minimum packet (64B) occupies at least 8 segments, the low 8 bits and high 8 bits of the start vector flag i_rx_mac_sop and the end vector flag i_rx_mac_eop can appear as 1 at most once. Therefore, only a bitwise OR operation needs to be performed respectively to calculate the number of sop and eop at the current moment, and then the next jump state can be known.

[0047] In an exemplary embodiment, the information further includes the positional relationship between the start symbol and the end symbol. The process of determining the positional relationship between the start symbol and the end symbol according to the valid identifier of the data segment includes: determining the positions of the start symbol and the end symbol according to the valid identifier of the data segment; when the position of the start symbol is greater than the position of the end symbol, the positional relationship is that the position of the end symbol precedes the position of the start symbol; when the position of the start symbol is less than the position of the end symbol, the positional relationship is that the position of the end symbol lags behind the position of the start symbol.

[0048] In this embodiment, considering that there is a moment when one sop and one eop are included, it is necessary to further clarify the relative positions of the sop and the eop at this time. If the position of the sop is greater than the position of the eop, the state SOP1_EOP1 state is entered; otherwise, the EOP1_SOP1 state is entered.

[0049] In an exemplary embodiment, the process of determining the next transition state of the state machine based on the information and the current state of the state machine includes: when the global valid identifier carried in the data to be converted corresponds to a valid state, determining the next transition state of the state machine based on the information and the current state of the state machine.

[0050] Considering that there is an interruption phenomenon during the data packet sending process of valid, it may occur at the packet header (refer to Figure 4 ), in the packet (refer to Figure 5 ), or at the packet tail (refer to Figure 6 ), and there may be an interruption of 1 to N clk. In addition, there is also an intermittent phenomenon during the small packet sending process (refer to Figure 7 , Figure 7 where dt0 represents data0 and dt1 represents data1, respectively representing two small packets).

[0051] In this embodiment, the next transition state is determined only when the global valid identifier carried in the data to be converted corresponds to a valid state. If the global valid identifier carried in the data to be converted corresponds to an invalid state, the data at this moment is not processed temporarily.

[0052] In an exemplary embodiment, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state includes: if the current state is the idle state, controlling the first channel of the interface conversion device to perform corresponding data processing operations according to the next transition state; the data processing operations are outputting the current packet data, caching the current packet data, or caching the next packet data.

[0053] In this embodiment, in combination with Figure 8As shown in Table 1, if the current state is the idle state, the next transition state may be SOP1, EOP1_SOP1, or SOP2_EOP1. If the current T is the initial value 01, the default output is on the first channel AXIS1. If the current sop_one (including only one sop), further calculate the position of the sop. If it is 0, control the first channel AXIS1 to directly output the current packet data. If it is not 0, control the first channel AXIS1 to shift and cache the current packet data; if the current eop1_sop1 (including one eop and one sop, and the sop is ahead of the eop), then control the first channel AXIS1 to directly shift and output the current packet data; if SOP2_EOP1 (including one eop and two sops), then control the first channel AXIS1 to directly shift and output the current packet data, and cache the next packet data.

[0054] In this embodiment, according to the current state and the characteristics of the data packet, it is possible to choose to directly output the current packet data or cache the data to adapt to different data transmission requirements. By calculating the position of the SOP, the output and caching operations of the data can be precisely controlled to ensure the correct start and end boundaries of the data packet.

[0055] In an exemplary embodiment, the process of determining the current channel activation mode includes: determining the offset corresponding to the current packet data; determining the output mode of the current packet data according to the offset and the end symbol position of the next packet data; determining the current channel activation mode based on the output mode.

[0056] In this embodiment, if it is necessary to output the data of packet A twice at a certain moment (usually at the end of packet A), then the data of packet B at this time is output by AXIS2. When it is necessary to output the data of packet B twice at a certain moment (usually at the end of packet B), the next packet A immediately switches back to output on AXIS1, as follows Figure 9 shown. Therefore, it is necessary to increase the judgment of the relative relationship between the current offset offset and the eop_pos (the end symbol position of the next packet data): when or the output mode is the single output of the current packet combination; when or the output mode is the double output of the current packet combination. Based on this, set a 2-bit T variable (used to represent the current channel activation mode), and each bit represents the corresponding AXIS channel: when the channel activation mode is that neither channel outputs; when the channel activation mode is to output only from AXIS1; the channel activation mode is to output only from AXIS2; the channel activation mode is to output from AXIS1 and AXI2 simultaneously.

[0057] In an exemplary embodiment, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state includes: If the current state is a non-idle state and the next jump state is a second target jump state corresponding to including at least one start symbol and / or at least one end symbol, control the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state and the current channel activation mode.

[0058] In addition, if the current state is a non-idle state and the next jump state is a first target jump state corresponding to not including a start symbol and an end symbol, control the first channel of the interface conversion device to output the current packet data and cache the next packet data.

[0059] In this embodiment, if the current state is any state in the states of SOP2_EOP1 / SOP1_EOP1 / SOP1 / NO_SOP_EOP / SOP2_EOP2: When i_rx_mac_valid is valid, the next state may be EOP1, SOP1_EOP1, SOP1_EOP2, SOP2_EOP2 or NO_SOP_EOP, and the output channel selection depends on the current T value. If the current is eop1, further judge the T type. If , the main channel shifts and outputs the current packet data, otherwise the main channel shifts and outputs the current packet data, and shifts and caches the remaining data; if the current is sop1_eop1, further judge the T type. If , the main channel shifts and outputs the current data and caches the next packet data; otherwise the main channel outputs the current packet data, caches the remaining data of the current packet, and the auxiliary channel caches the next packet data; if the current is sop_eop2, further judge the T type. If , the main channel shifts and outputs the current data, and the auxiliary channel outputs the next packet data; otherwise the main channel outputs the current packet data, caches the remaining data of the current packet, and the auxiliary channel outputs the next packet data; if the current is sop2_eop2, further judge the T type. If , the main channel shifts and outputs the current data and caches and outputs the next packet data; otherwise the main channel outputs the current packet data, caches the remaining data of the current packet, the auxiliary channel outputs the next packet data, and caches the next packet data of the next packet data; if it is no_sop_eop, the main channel outputs the current packet data and caches the next packet data, as shown in Figure 10 shown.

[0060] In an exemplary embodiment, if the current state is a non-idle state, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state and the current channel activation mode includes: if the current state is a first type of non-idle state, controlling the first channel of the interface conversion device to perform a corresponding third data processing operation and / or controlling the second channel of the interface conversion device to perform a corresponding fourth data processing operation according to the next jump state and the current channel activation mode; the third data processing operation includes outputting the next packet of data, or caching the next packet of data, or outputting the end data of the previous packet, or outputting the previous packet of data, or outputting the next packet of data and caching the next packet of data of the next packet of data; the fourth data processing operation includes outputting the next packet of data, or caching the next packet of data, or outputting the next packet of data and caching the next packet of data of the next packet of data.

[0061] If the current state is any of the EOP1 / EOP1_SOP1 / SOP1_EOP2 states: When i_rx_mac_valid is valid, the next state may be SOP1, EOP1_SOP1, SOP2_EOP1, and the output channel selection depends on the current T value. If the next jump state is SOP1, if , the first channel outputs or caches the next packet of data, otherwise, the first channel outputs the end data of the previous packet, and the second channel outputs or caches the next packet of data. If the next jump state is EOP1_SOP1, if , the first channel outputs or caches the next packet of data, otherwise, the first channel outputs the previous packet of data, and the second channel outputs the next packet of data. If the next jump state is SOP2_EOP1, if , the first channel outputs the next packet of data and caches the next packet of data of the next packet of data. Otherwise, the first channel outputs the previous packet of data, and the second channel outputs the next packet of data and caches the downloaded packet data.

[0062] In summary, the present invention implements a conversion method from a Segmented interface to an AXIS interface based on a programmable logic device FPGA. This method proposes a synchronous conversion method based on state machine control, dual-channel pipeline output + dual buffering for the Segmented interface provided by the existing Intel FPGA 400G / 200G MAC, which effectively realizes the bridging of the MAC interface and the PCIe user interface, opens up the system data flow architecture, is easy to use, flexible, and adaptable to multiple application scenarios.

[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0064] An embodiment of the present invention further provides an interface conversion system, including: a first determination module, configured to determine information corresponding to a start symbol and an end symbol in the data to be converted received by the segmented interface of the interface conversion device in the current clock cycle; a second determination module, configured to determine the next transition state of the state machine based on the information and the current state of the state machine; and a processing module, configured to control the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state, so as to output the converted data through the first channel and / or the second channel, and the converted data meets the transmission requirements of the streaming interface of the interface conversion device.

[0065] In an exemplary embodiment, the information includes the number of start symbols and the number of end symbols; the process of determining the information corresponding to the start symbol and the end symbol in the data to be converted received by the segmented interface of the interface conversion device in the current clock cycle includes: parsing the data segment valid flag carried in the data to be converted received by the segmented interface of the interface conversion device in the current clock cycle; and determining the number of start symbols and the number of end symbols according to the data segment valid flag.

[0066] In an exemplary embodiment, the data segment valid flag includes a start vector flag and an end vector flag; the process of determining the number of start symbols and the number of end symbols according to the data segment valid flag includes: determining the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag.

[0067] In an exemplary embodiment, the process of determining the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag includes: performing a bitwise OR operation on the start vector flag and the end vector flag respectively to obtain the number of start symbols and the number of end symbols.

[0068] In an exemplary embodiment, the information further includes the positional relationship between the start symbol and the end symbol; the process of determining the positional relationship between the start symbol and the end symbol according to the data segment valid flag includes: determining the start symbol position and the end symbol position according to the data segment valid flag; when the start symbol position is greater than the end symbol position, the positional relationship is that the end symbol position is ahead of the start symbol position; when the start symbol position is less than the end symbol position, the positional relationship is that the end symbol position lags behind the start symbol position.

[0069] In an exemplary embodiment, the process of determining the next transition state of the state machine based on the information and the current state of the state machine includes: when the global valid flag carried in the data to be converted corresponds to a valid state, determining the next transition state of the state machine based on the information and the current state of the state machine.

[0070] In an exemplary embodiment, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next-hop state includes: if the current state is the idle state, controlling the first channel of the interface conversion device to perform the corresponding data processing operation; the data processing operation is to output the current packet data, cache the current packet data, or cache the next packet data.

[0071] In an exemplary embodiment, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next-hop state includes: if the current state is a non-idle state and the next-hop state is a first target jump state corresponding to not including a start symbol and an end symbol, controlling the first channel of the interface conversion device to output the current packet data and cache the next packet data.

[0072] In an exemplary embodiment, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next-hop state includes: if the current state is a non-idle state and the next-hop state is a second target jump state corresponding to including at least one start symbol and / or at least one end symbol, controlling the first channel and / or the second channel of the interface conversion device to perform the corresponding data processing operation according to the next-hop state and the current channel activation mode.

[0073] In an exemplary embodiment, the process of determining the current channel activation mode includes: determining the offset corresponding to the current packet data; determining the output mode of the current packet data according to the offset and the end symbol position of the next packet data; determining the current channel activation mode based on the output mode.

[0074] In an exemplary embodiment, if the current state is a non-idle state, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next-hop state and the current channel activation mode includes: if the current state is a first type of non-idle state, controlling the first channel of the interface conversion device to perform the corresponding first data processing operation according to the next-hop state and the current channel activation mode and / or controlling the second channel of the interface conversion device to perform the corresponding second data processing operation; the first data processing operation includes outputting the current packet data, or outputting the current packet data and caching the remaining data of the current packet, or outputting the current packet data and caching the next packet data; the second data processing operation includes caching the next packet data, or outputting the next packet data, or outputting the next packet data and caching the next packet data of the next packet data.

[0075] In an exemplary embodiment, when the current state is a non-idle state, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state and the current channel activation mode includes: when the current state is a first type of non-idle state, controlling the first channel of the interface conversion device to perform a corresponding third data processing operation and / or controlling the second channel of the interface conversion device to perform a corresponding fourth data processing operation according to the next transition state and the current channel activation mode; the third data processing operation includes outputting the next packet of data, or caching the next packet of data, or outputting the end data of the previous packet, or outputting the previous packet of data, or outputting the next packet of data and caching the next packet of the next packet of data; the fourth data processing operation includes outputting the next packet of data, or caching the next packet of data, or outputting the next packet of data and caching the next packet of the next packet of data.

[0076] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the interface conversion method.

[0077] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the interface conversion method when running.

[0078] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs, etc., various media that can store computer programs.

[0079] An embodiment of the present invention also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the interface conversion method are implemented.

[0080] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the interface conversion method are implemented.

[0081] For the descriptions of the features in the corresponding embodiments of the interface conversion system, computer program product, electronic device, and computer-readable storage medium, reference may be made to the relevant descriptions of the corresponding embodiments of the interface conversion method, which will not be elaborated here one by one.

[0082] Those skilled in the art may further realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0083] The above has introduced in detail an interface conversion method, device, product, and computer-readable storage medium provided by the present invention. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. An interface conversion method, characterized in that, Including: Determine the information corresponding to the start symbol and the end symbol in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle; Determine the next transition state of the state machine based on the information and the current state of the state machine; Control the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state, so as to output the converted data through the first channel and / or the second channel, and the converted data meets the transmission requirements of the streaming interface of the interface conversion device.

2. The interface conversion method according to claim 1, characterized in that, The information includes the number of start symbols and the number of end symbols; The process of determining the information corresponding to the start symbol and the end symbol in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle includes: Parse the data segment valid flag carried in the data to be converted received by the segmented interface of the interface conversion device within the current clock cycle; Determine the number of start symbols and the number of end symbols according to the data segment valid flag.

3. The interface conversion method according to claim 2, characterized in that, The data segment valid flag includes a start vector flag and an end vector flag; The process of determining the number of start symbols and the number of end symbols according to the data segment valid flag includes: Determine the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag.

4. The interface conversion method according to claim 3, characterized in that, The process of determining the number of start symbols and the number of end symbols based on the start vector flag and the end vector flag includes: Perform a bitwise OR operation on the start vector flag and the end vector flag respectively to obtain the number of start symbols and the number of end symbols.

5. The interface conversion method according to claim 2, characterized in that, The information further includes the positional relationship between the start symbol and the end symbol. The process of determining the positional relationship between the start symbol and the end symbol according to the data segment valid flag includes: Determine the start symbol position and the end symbol position according to the data segment valid flag; When the start symbol position is greater than the end symbol position, the positional relationship is that the end symbol position is ahead of the start symbol position; When the start symbol position is less than the end symbol position, the positional relationship is that the end symbol position lags behind the start symbol position.

6. The interface conversion method according to claim 1, characterized in that, The process of determining the next transition state of the state machine based on the information and the current state of the state machine includes: In response to the global valid flag carried in the data to be converted corresponding to the valid state, determine the next transition state of the state machine based on the information and the current state of the state machine.

7. The interface conversion method according to claim 1, characterized in that, The process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state includes: If the current state is the idle state, control the first channel of the interface conversion device to perform corresponding data processing operations according to the next transition state; the data processing operations are to output the current packet data, cache the current packet data, or cache the next packet data.

8. The interface conversion method according to claim 1, characterized in that, The process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next transition state includes: If the current state is a non - idle state and the next jump state is a first target jump state corresponding to a state without a start symbol and an end symbol, control the first channel of the interface conversion device to output the current packet data and cache the next packet data.

9. The interface conversion method according to any one of claims 1-8, characterized in that, The process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state includes: If the current state is a non - idle state and the next jump state is a second target jump state corresponding to a state including at least one start symbol and / or at least one end symbol, control the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state and the current channel activation mode.

10. The interface conversion method according to claim 9, characterized in that, The process of determining the current channel activation mode includes: Determine the offset corresponding to the current packet data; Determine the output mode of the current packet data according to the offset and the end - symbol position of the next packet data; Determine the current channel activation mode based on the output mode.

11. The interface conversion method according to claim 9, wherein If the current state is a non - idle state, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state and the current channel activation mode includes: If the current state is a first - type non - idle state, control the first channel of the interface conversion device to perform a corresponding first data processing operation according to the next jump state and the current channel activation mode and / or control the second channel of the interface conversion device to perform a corresponding second data processing operation; the first data processing operation includes outputting the current packet data, or outputting the current packet data and caching the remaining data of the current packet, or outputting the current packet data and caching the next packet data; the second data processing operation includes caching the next packet data, or outputting the next packet data, or outputting the next packet data and caching the next - next packet data of the next packet data.

12. The interface conversion method according to claim 9, wherein If the current state is a non - idle state, the process of controlling the first channel and / or the second channel of the interface conversion device to perform corresponding data processing operations according to the next jump state and the current channel activation mode includes: If the current state is a first - type non - idle state, control the first channel of the interface conversion device to perform a corresponding third data processing operation according to the next jump state and the current channel activation mode and / or control the second channel of the interface conversion device to perform a corresponding fourth data processing operation; the third data processing operation includes outputting the next packet data, or caching the next packet data, or outputting the end data of the previous packet, or outputting the previous packet data, or outputting the next packet data and caching the next - next packet data of the next packet data; the fourth data processing operation includes outputting the next packet data, or caching the next packet data, or outputting the next packet data and caching the next - next packet data of the next packet data.

13. A computer program product, comprising a computer program / instructions, wherein When the computer program / instructions are executed by a processor, the steps of the interface conversion method according to any one of claims 1 to 12 are implemented.

14. An electronic device, wherein Including: A memory for storing a computer program; A processor for implementing the steps of the interface conversion method according to any one of claims 1 to 12 when executing the computer program.

15. A computer-readable storage medium, wherein A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the interface conversion method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Interface transformation transmission and receiving method and device between PF interface and SPI3 interface

    CN101127785A

  • Message matching method, state machine compiling method and equipment

    CN103685280A

  • Data flow packing method and system and data flow unpacking method and system based on length escape

    CN112887054A

  • Multi-device ARINC818-to-PCIE communication system

    CN119292980A

  • Data transmission processing method and related equipment

    CN119966933A