Search

CN-121985051-A - Protocol conversion method, device, medium and product

CN121985051ACN 121985051 ACN121985051 ACN 121985051ACN-121985051-A

Abstract

The invention relates to the technical field of chips and provides a protocol conversion method, equipment, medium and product, wherein the method comprises the steps of receiving a write transaction transmitted based on a first bus protocol, wherein the write transaction at least comprises write data and a corresponding original byte strobe signal; and according to the format requirement of the second bus protocol, the target mark is encapsulated into a preset field of the data packet, and a target data packet serving as a protocol conversion result is generated and output, wherein the target mark is used for indicating the validity of the data bytes in the write data. The invention uses the regularity of byte strobe signals, uses the target mark with smaller bit width to replace the original byte strobe signals with larger bit width for transmission, thereby obviously reducing the invalid load cost of the data packet after protocol conversion on the premise of ensuring that the data validity indication function is not lost.

Inventors

  • Request for anonymity
  • Request for anonymity
  • Request for anonymity

Assignees

  • 上海壁仞科技股份有限公司

Dates

Publication Date
20260505
Application Date
20260311

Claims (11)

  1. 1. A method of protocol conversion, comprising: Receiving a write transaction transmitted based on a first bus protocol, wherein the write transaction at least comprises write data and corresponding original byte strobe signals; Searching a matched target mark identifier in a pre-established mapping relation table according to the original byte strobe signal, wherein the mapping relation table records the corresponding relation between the mark identifier and the byte strobe signal; and according to the format requirement of the second bus protocol, the target mark identifier is packaged into a preset field of the data packet, and the target data packet serving as a protocol conversion result is generated and output, wherein the target mark identifier is used for indicating the validity of the data bytes in the write data.
  2. 2. The protocol conversion method according to claim 1, wherein the write transaction based on the first bus protocol transmission includes continuously receiving a plurality of write transactions in a reception time sequence; The encapsulating the target mark identification into a preset field of a data packet, generating and outputting a target data packet as a protocol conversion result, including: Under the condition that the plurality of write transactions meet the aggregation condition, retaining the data packet head information of the first write transaction, and removing the data packet head information of the subsequent write transaction; Constructing an aggregate data load according to the target mark identification, the write address channel information and the write data corresponding to each write transaction; And combining the aggregate data load with the reserved data packet header information to generate the target data packet.
  3. 3. The protocol conversion method according to claim 2, wherein the constructing an aggregate data payload according to the target flag identifier, the write address channel information, and the write data corresponding to each write transaction includes: for each writing transaction, filling the corresponding target mark identification into a preset field, filling the corresponding writing address channel information into an address control field, filling the corresponding writing data into a data load field, and combining to form a sub-data packet corresponding to each writing transaction; Splicing all the sub data packets corresponding to the plurality of write transactions according to the receiving time sequence to form the aggregate data load.
  4. 4. The protocol conversion method according to claim 2, wherein the constructing an aggregate data payload according to the target flag identifier, the write address channel information, and the write data corresponding to each write transaction includes: splicing the target mark marks corresponding to each write transaction to form an aggregate mark, and splicing the write data contained in each write transaction to form aggregate write data; Acquiring the write address channel information of the first write transaction, and filling the write address channel information of the first write transaction into an address control field; And filling the aggregation mark identification into a preset field, filling the aggregation write data into a data load field, and combining the data load field with the address control field to form the aggregation data load.
  5. 5. The protocol conversion method according to claim 3 or 4, wherein the filling the write address channel information into the address control field includes: acquiring a plurality of transmission attribute parameters transmitted in a write address channel of the first bus protocol; Combining the transmission attribute parameters; and filling the combined transmission attribute parameters into the address control field.
  6. 6. The protocol conversion method according to claim 2, wherein the write transaction further includes an original boundary signal for indicating the end of transmission; after the target data packet is generated by combining the reserved data packet header information, the method further comprises: Masking original boundary signals in the first write transaction and other subsequent write transactions except the last subsequent write transaction; generating a target boundary signal conforming to the second bus protocol using the original boundary signal of the last subsequent write transaction; and associating the target boundary signal to the end of the target data packet.
  7. 7. The protocol conversion method according to claim 2, wherein before retaining the header information of the first write transaction and removing the header information of the subsequent write transaction, further comprising: analyzing user-defined fields in each write transaction; Extracting a destination endpoint of a corresponding write transaction from each user-defined field; And under the condition that destination endpoints of adjacent write transactions in the plurality of write transactions are consistent, determining that the plurality of write transactions meet the aggregation condition.
  8. 8. The protocol conversion method according to claim 1, wherein the mapping relation table is constructed based on the steps of: identifying at least one preset byte strobe signal mode existing in the first bus protocol; allocating a unique mark identifier for each preset byte strobe signal mode; And establishing a corresponding relation between the mark identifier and the preset byte gating signal mode to form the mapping relation table.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the protocol conversion method according to any one of claims 1 to 8 when executing the computer program.
  10. 10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the protocol conversion method according to any one of claims 1 to 8.
  11. 11. A computer program product comprising a computer program which, when executed by a processor, implements the protocol conversion method according to any one of claims 1 to 8.

Description

Protocol conversion method, device, medium and product Technical Field The present invention relates to the field of chip technologies, and in particular, to a protocol conversion method, device, medium, and product. Background Existing AXI Stream (AXI Stream) protocol schemes based on advanced extensible interface (Advanced eXtensible Interface, AXI) protocol generally pack and encapsulate data of AXI channels into a data Stream in a specific format. For example, the Write address channel information, the Write data, and byte Strobe (WSTRB) are combined and encapsulated into a data packet containing a header and a payload for transmission, wherein the byte Strobe is transmitted directly with the data as part of the payload. In addition, each AXI write transaction is packaged into an independent data packet, so that the overhead of a message header is overlarge, and the bus transmission efficiency is limited. Disclosure of Invention The invention provides a protocol conversion method, equipment, medium and product, which are used for solving the defects in the related technology. The invention provides a protocol conversion method, which comprises the following steps: Receiving a write transaction transmitted based on a first bus protocol, wherein the write transaction at least comprises write data and corresponding original byte strobe signals; Searching a matched target mark identifier in a pre-established mapping relation table according to the original byte strobe signal, wherein the mapping relation table records the corresponding relation between the mark identifier and the byte strobe signal; and according to the format requirement of the second bus protocol, the target mark identifier is packaged into a preset field of the data packet, and the target data packet serving as a protocol conversion result is generated and output, wherein the target mark identifier is used for indicating the validity of the data bytes in the write data. According to the protocol conversion method provided by the invention, the write transaction transmitted based on the first bus protocol comprises the steps of continuously receiving a plurality of write transactions according to the receiving time sequence; The encapsulating the target mark identification into a preset field of a data packet, generating and outputting a target data packet as a protocol conversion result, including: Under the condition that the plurality of write transactions meet the aggregation condition, retaining the data packet head information of the first write transaction, and removing the data packet head information of the subsequent write transaction; Constructing an aggregate data load according to the target mark identification, the write address channel information and the write data corresponding to each write transaction; And combining the aggregate data load with the reserved data packet header information to generate the target data packet. According to the protocol conversion method provided by the invention, the aggregate data load is constructed according to the target mark identifier, the write address channel information and the write data corresponding to each write transaction, and the method comprises the following steps: for each writing transaction, filling the corresponding target mark identification into a preset field, filling the corresponding writing address channel information into an address control field, filling the corresponding writing data into a data load field, and combining to form a sub-data packet corresponding to each writing transaction; Splicing all the sub data packets corresponding to the plurality of write transactions according to the receiving time sequence to form the aggregate data load. According to the protocol conversion method provided by the invention, the aggregate data load is constructed according to the target mark identifier, the write address channel information and the write data corresponding to each write transaction, and the method comprises the following steps: splicing the target mark marks corresponding to each write transaction to form an aggregate mark, and splicing the write data contained in each write transaction to form aggregate write data; Acquiring the write address channel information of the first write transaction, and filling the write address channel information of the first write transaction into an address control field; And filling the aggregation mark identification into a preset field, filling the aggregation write data into a data load field, and combining the data load field with the address control field to form the aggregation data load. According to the protocol conversion method provided by the invention, the filling of the write address channel information into the address control field comprises the following steps: acquiring a plurality of transmission attribute parameters transmitted in a write address channel of the first bus protocol; Combining the trans