Data transmission method based on channel matching and related device

By presetting the matching relationship and handshake signal to determine the target data transmission channel, the problem of inconsistent bit width between the master and slave devices is solved, the technical problem of the bit of data transmission is realized, the data transmission error and anomaly problems in data transmission are solved, and the accuracy and reliability of data transmission are improved.

CN118708521BActive Publication Date: 2025-10-10VERISILICON MICROELECTRONICS (SHANGHAI) CO LTD +5
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410739961.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-10-10
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

In the prior art, the bit width of the ID between the master and slave devices on the AXI bus may be inconsistent due to upgrade or replacement, resulting in data transmission errors and anomalies.

Method used

By presetting the matching relationship, the matching relationship between the types of different data transmission operations and each data transmission channel is configured, the handshake signal is used to determine the target data transmission channel, and the channel status signal is assigned to the enabled state before data transmission, other requests are rejected, and the process status signal is recorded to reduce errors caused by ID matching.

Benefits of technology

It effectively reduces data transmission errors and anomalies and improves the accuracy and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708521B_ABST
    Figure CN118708521B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data transmission method based on channel matching and related equipment, and relates to the field of communication. The data transmission method based on channel matching comprises the following steps: obtaining a current data transmission request; determining a target data transmission channel required for performing the current data transmission operation according to the type of the data transmission operation requested to be performed by the current data transmission request and a preset matching relationship; the preset matching relationship comprises a matching relationship between different types of data transmission operations and each data transmission channel; and performing, based on the target data transmission channel, a data transmission operation corresponding to the target data transmission channel in the data transmission operation requested to be performed by the current data transmission request. The above method does not need to match ID, and effectively reduces data transmission errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of system verification, and in particular to a data transmission method based on channel matching and related equipment. Background Art

[0002] When an AXI (Advanced eXtensible Interface, a bus protocol) bus is used for data transmission between a master device and a slave device, data transmission is achieved through a write address channel, a write data channel, a write response channel, a read address channel, and a read data response channel.

[0003] When transmitting data on the AXI bus, the channels between the master and slave devices must be matched. For example, the read address channel must match the read data response channel, and the write address channel must match the write response channel. Currently, this is typically done using the master port ID (identification information) of the master device and the slave port ID of the slave device.

[0004] However, after prolonged use of the master and slave devices, the ID bit widths may become inconsistent due to upgrades, replacements, and other factors. To ensure proper data transmission between the master and slave ports, their bit widths must match. For example, if the master port's bit width is smaller than the slave port's, the data output from the master port is padded, and the data received by the master port is truncated according to the slave port's bit width. However, if the master port's bit width is larger than the slave port's, truncating the data output from the master port according to the slave port's bit width can result in data loss and transmission errors. Summary of the Invention

[0005] In view of this, the present application aims to provide a data transmission method and related equipment based on channel matching to reduce data transmission errors.

[0006] In a first aspect, an embodiment of the present application provides a data transmission method based on channel matching, comprising: obtaining a current data transmission request; determining a target data transmission channel required to perform the current data transmission operation based on the type of data transmission operation requested to be performed by the current data transmission request and a preset matching relationship; the preset matching relationship includes a matching relationship between the types of different data transmission operations and each data transmission channel; and performing the data transmission operation corresponding to the target data transmission channel in the data transmission operation requested to be performed by the current data transmission request based on the target data transmission channel.

[0007] The communication protocol can define data transmission operation channels corresponding to each type of data transmission operation performed during data transmission. In the embodiments of the present application, the matching relationship between the types of different data transmission operations and each data transmission channel is configured in the preset matching relationship. Thus, when the corresponding operation in the data transmission request is determined, the target data transmission channel for data transmission can be directly determined, so that the transmission channel does not need to be determined by the ID before data transmission, effectively reducing data transmission errors or abnormalities caused by the ID.

[0008] In an embodiment, the current data transmission request includes a plurality of handshake signals transmitted through different data transmission channels; and the target data transmission channel required for performing the current data transmission operation is determined according to the type of data transmission operation requested by the current data transmission request and the preset matching relationship, including: determining the type of data transmission operation requested by the current data transmission request according to any one of the handshake signals; determining each standby data transmission channel matched with the type in the preset matching relationship; and determining the target data transmission channel from each standby data transmission channel according to the combination of each handshake signal in the current data transmission request.

[0009] Since the handshake signal in the data transmission request can represent the type of data transmission operation requested by the handshake signal in the bus protocol, in the embodiments of the present application, the type of current data transmission operation can be determined according to the handshake signal, and the standby data transmission channel can be determined according to the type of data transmission operation. The combination of different handshake signals can represent the data transmission channel required for performing the data transmission operation, so that the target data transmission channel can be determined according to the combination of different handshake signals. The target data transmission channel is determined in the above manner, without the need for ID matching, thereby effectively reducing data transmission abnormality problems caused by the ID.

[0010] In an embodiment, after the target data transmission channel required for performing the current data transmission operation is determined, before the data transmission operation corresponding to the target data transmission channel is performed based on the target data transmission channel requested by the current data transmission request, the method further includes: assigning a channel state signal of the target data transmission channel to a first state value; and the first state value is an identification value representing that the data transmission channel is in an enabled state.

[0011] In the embodiments of the present application, the channel state signal of the target data transmission channel is assigned to the first state value to represent that the target data channel is enabled, so that the data transmission operation can be correctly performed according to the enabled state, thereby reducing data transmission errors.

[0012] In an embodiment, the method further comprises: in a case where the channel state signal of the target data transmission channel is assigned the first state value, rejecting a data transmission operation requested to be performed based on the target data transmission channel and other than the current data transmission request.

[0013] In an embodiment, after the target data transmission channel is enabled, the target data transmission channel is caused to reject to perform other requested data transmission operations, so as to reduce abnormal situations such as data transmission inaccuracy and loss that may occur when multiple requested data transmission operations are simultaneously performed.

[0014] In an embodiment, the method further comprises: after a data transmission operation corresponding to any target data transmission channel is performed, updating a process state signal corresponding to the target data transmission channel to a second state value; the second state value is an identification value representing that a data transmission operation is completed.

[0015] In an embodiment, a process state signal is used to record a performance of a data transmission channel to a data transmission channel, and after a target data transmission channel completes transmission, the process state signal is updated to a second state value, so that a data transmission situation can be determined according to the process state signal, and data can be correctly transmitted, thereby reducing data transmission errors.

[0016] In an embodiment, the first state value and the second state value are the same; and updating the process state signal corresponding to the target data transmission channel to the second state value comprises: assigning a channel state signal of the data transmission channel to the process state signal.

[0017] In an embodiment, the first state value and the second state value are the same, so that the process state signal can be updated by assigning the channel state signal, and this mode can reduce the complexity of recording the process state signal and the channel state signal.

[0018] In an embodiment, after the process state signal corresponding to the target data transmission channel is updated to the second state value, the method further comprises: after all target data transmission channels complete respective data transmission operations, updating channel state signals of all target data transmission channels to a third state value, and updating process state signals of all target data transmission channels to a fourth state value; the third state value is an identification value representing that a data transmission channel is in an unenabled state; and the fourth state value is an identification value representing that a data transmission channel does not perform a data transmission operation.

[0019] In this embodiment of the present application, after a data transmission operation is completed, the channel status signal of the target data transmission channel is updated to a third state value, and the process status signals of all target data transmission channels are updated to a fourth state value, thereby indicating that new data transmission requests can be accepted. This allows data transmission requests to be accurately executed based on the channel status signals and process status signals, thereby improving data transmission reliability.

[0020] In one embodiment, the types of data transmission operations include write operation types and read operation types; data transmission channels include write address channels, write response channels, write data channels, read address channels, and read data response channels; the preset matching relationship includes: the write address channel, write response channel, and write data channel corresponding to the write operation type, and the read address channel and read data response channel corresponding to the read operation type; in the preset matching relationship, each standby data transmission channel that matches the type is determined, including: if the type of data transmission operation requested to be executed by the current data transmission request is a write operation type, then determining that the standby data transmission channels include the write address channel, the write response channel, and the write data channel; if the type of data transmission operation requested to be executed by the current data transmission request is a read operation type, then determining that the standby data transmission channels include the read address channel and the read data response channel.

[0021] The bus protocol stipulates that a write operation requires a write address channel, a write response channel, and a write data channel to jointly complete data transmission, and a read operation requires a read address channel and a read data response channel to jointly complete data transmission. Therefore, in an embodiment of the present application, a preset matching relationship including the above provisions is directly preset so that when data transmission is performed, the required data transmission channel can be directly determined according to the preset matching relationship, without performing ID matching between channels, thereby effectively reducing the problem of data transmission anomalies caused by ID.

[0022] In one embodiment, the type of data transmission operation requested to be executed by the current data transmission request is a write operation type; the handshake signal includes: a valid signal and a ready signal of the write address channel, a valid signal, a ready signal and an end signal of the write data channel, and a valid signal and a ready signal of the write response channel; based on the combination of each of the handshake signals in the current data transmission request, the target data transmission channel is determined from each of the standby data transmission channels, including: if the valid signal and the ready signal of each of the write address channel and the write response channel in the current data transmission request are valid values, then the channel status signal of each of the write address channel and the write response channel is assigned to the first state value; if the valid signal, the ready signal and the end signal of the write data channel in the current data transmission request are valid values, then the channel status signal of the write data channel is assigned to the first state value.

[0023] In the embodiment of the present application, through the combination of handshake signals, each data transmission channel can be accurately enabled, thereby improving the accuracy of the target data transmission channel determined based on the preset matching relationship, and further improving the accuracy of data transmission.

[0024] In one embodiment, the type of data transmission operation requested to be executed by the current data transmission request is a read operation type; the handshake signal includes: a valid signal and a ready signal of the read address channel, and a valid signal, a ready signal and an end signal of the read data response channel; based on the combination of each of the handshake signals in the current data transmission request, the target data transmission channel is determined from each of the standby data transmission channels, including: if the valid signal and the ready signal of the read address channel in the current data transmission request are valid values, then the channel status signal of the read address channel is assigned to the first state value; if the valid signal, the ready signal and the end signal of the read data response channel in the current data transmission request are valid values, then the channel status signal of the read data response channel is assigned to the first state value.

[0025] In the embodiment of the present application, through the combination of handshake signals, each data transmission channel can be accurately enabled, thereby improving the accuracy of the target data transmission channel determined based on the preset matching relationship, and further improving the accuracy of data transmission.

[0026] In one embodiment, before obtaining the current data transmission request, the method further includes: initializing the channel status signals and process status signals of all the data transmission channels so that the channel status signals of all the data transmission channels are a third state value, and the process status signals of all the data transmission channels are a fourth state value; the third state value is an identification value indicating that the data transmission channel is in an unenabled state; and the fourth state value is an identification value indicating that the data transmission channel is not performing a data transmission operation.

[0027] In an embodiment of the present application, after power-on, the channel status signal and process status signal of each data transmission channel are initialized so that the channel status signal and process status signal are restored to the initial state allowing the execution of the data transmission request, thereby enabling data to be transmitted normally.

[0028] In one embodiment, the data transmission channel includes a write address channel and a write response channel; the write response channel and the write address channel are bound with the same identification information.

[0029] In the bus protocol, the IDs of the write response channel and the write address channel need to match in order to complete the data transmission of a write operation. Therefore, in an embodiment of the present application, the write response channel and the write address channel are directly bound to the same identification information, and the identification information of the two is directly matched, so that the target data transmission channel determined by the preset matching relationship can normally perform the write operation of data transmission.

[0030] In one embodiment, the data transmission channel includes a read address channel and a read data response channel; the read data response channel and the read address channel have the same identification information.

[0031] In the bus protocol, the IDs of the read data response channel and the read address channel need to match in order to complete the data transmission of a read operation. Therefore, in an embodiment of the present application, the read data response channel and the read address channel are directly bound to the same identification information, and the identification information of the two is directly matched, so that the target data transmission channel determined by the preset matching relationship can normally perform the read operation of data transmission.

[0032] In a second aspect, an embodiment of the present application provides a communication module, comprising a communication port and a controller; the controller is connected to the communication port, and the controller is used to execute the channel matching-based data transmission method as described in any one of the first aspects, and output or receive data through the communication port.

[0033] In a third aspect, an embodiment of the present application provides an electronic device comprising the communication module as described in the second aspect.

[0034] In a fourth aspect, an embodiment of the present application provides a data transmission system, comprising: a first device, configured with the communication module as described in the second aspect; and a second device, communicatively connected to the communication module of the first device.

[0035] In a fifth aspect, an embodiment of the present application provides a readable storage medium, in which a program is stored. When the program runs on a controller, the controller executes the data transmission method based on channel matching as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For those skilled in the art, other relevant drawings can be obtained based on these drawings without creative work.

[0037] Figure 1A flow chart of a data transmission method based on channel matching provided in one embodiment of the present application;

[0038] Figure 2 A schematic diagram of the dependency relationship of the read channel provided in one embodiment of the present application;

[0039] Figure 3 A schematic diagram of the dependency relationship of the write channel provided in one embodiment of the present application;

[0040] Figure 4 A schematic diagram of an extended flow chart of a data transmission method based on channel matching provided in one embodiment of the present application;

[0041] Figure 5 A schematic structural diagram of a communication module provided in one embodiment of the present application;

[0042] Figure 6 A schematic diagram of a data transmission system provided in one embodiment of the present application.

[0043] Icons: communication module 200 ; controller 210 ; communication port 220 ; first device 310 ; first device communication module 311 ; second device 320 ; second device communication module 321 . DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] First, an embodiment of the present application provides a data transmission method based on channel matching, which can be applied to a communication module that performs data transmission based on the AXI bus protocol.

[0046] See also Figure 1 , Figure 1 A flow chart of a data transmission method based on channel matching provided in one embodiment of the present application is provided. The data transmission method based on channel matching includes:

[0047] S110, obtaining a current data transmission request.

[0048] In this embodiment, the current data transmission request can be generated by the master device for data transmission to the slave device, or can be generated by another device and sent to the master device for data transmission from the master device to the slave device. After receiving or generating the data transmission request, the master device outputs the data transmission request to the slave device via the communication module, so that the communication module can obtain the data transmission request.

[0049] In this embodiment, the bus protocol used may be an AXI bus protocol. The AXI bus includes five data transmission channels, namely a write address channel, a write data channel, a write response channel, a read address channel, and a read data response channel. Accordingly, the data transmission request of the AXI bus may include the type of data transmission operation, the address information of the slave device, information about the data to be transmitted, and may also include handshake signals, such as a valid signal and a ready signal. For another example, the write data channel may also include a last signal representing the last data. For details, please refer to the prior art and will not be elaborated here.

[0050] In the AXI bus, data transfer operations require ID matching between channels. For example, a write operation requires the IDs of the write address channel and the write response channel to match, while a read operation requires the IDs of the read address channel and the read data response channel to match. Only when the IDs match can the data transfer corresponding to a read or write operation be completed.

[0051] Therefore, in an embodiment of the present application, the write response channel and the write address channel may be bound with the same identification information.

[0052] Specifically, the handshake signal in the data transmission request includes the awid (write address identification information) signal and the bid (write response identification information). The write response channel and the write address channel are bound to the same identification information. This can be done by directly assigning the awid value to the bid so that the IDs of the write address channel and the write response channel are consistent, thereby achieving binding. Accordingly, the slave port adopts a fixed ID method and is configured so that the slave device ID does not need to be fed back.

[0053] Furthermore, the read data response channel and the read address channel may have the same identification information.

[0054] Similarly, the handshake signal in the data transmission request includes the arid (read address identification information) signal and rid (read data response identification information). The read data response channel and the read address channel are bound to the same identification information. This can be done by directly assigning arid to rid so that the IDs of the read address channel and the read data response channel are consistent, thus achieving binding. Similarly, the slave port uses a fixed ID method and is configured so that the slave device ID does not need to be fed back.

[0055] S120 , determining a target data transmission channel required to perform the current data transmission operation according to the type of the data transmission operation requested to be performed by the current data transmission request and a preset matching relationship.

[0056] In an embodiment of the present application, the preset matching relationship includes a matching relationship between different types of data transmission operations and each data transmission channel.

[0057] For example, the AXI bus protocol stipulates that write operations require the write address channel to transmit the write address information required by the slave device, the write data channel to transmit the data required to be written to the slave device, and the write response channel to receive the response information fed back by the slave device. Therefore, the data transmission channels that match the write operation type can be the write address channel, the write data channel, and the write response channel. Similarly, the AXI bus protocol stipulates that read operations require the participation of the read address channel and the read data response channel. The data transmission channels that match the read operation type can be the read address channel and the read data response channel.

[0058] It should be noted that the master device mentioned in the embodiments of the present application refers to the device that issues a data transmission request, and the slave device refers to the device that is read or written. The identity relationship between the two can be converted to each other. The master device and the slave device are only for the convenience of distinction and should not be a limitation to the present application.

[0059] Among them, it is necessary to distinguish that, in an embodiment of the present application, a request may include multiple operations, for example, it may include a transmission operation of a write address and a control signal (corresponding to using a write address channel), a transmission operation of write data (corresponding to using a write data channel), and a wait-to-receive operation of a write response (corresponding to using a write response channel). For another example, it may include a transmission operation of a read address (corresponding to using a read address channel), a transmission operation of read data and a response (corresponding to using a read data response channel). However, according to the protocol specification, the multiple operations included in the same request correspond to the same type, for example, all correspond to write operation types or all correspond to read operation types.

[0060] In one embodiment, the target data transmission channel can be determined in the following manner: determining the type of data transmission operation requested to be performed by the current data transmission request based on any handshake signal; determining each standby data transmission channel that matches the type in a preset matching relationship; and determining the target data transmission channel from each standby data transmission channel based on the combination of each handshake signal in the current data transmission request.

[0061] The AXI bus defines data transfer requests for write operations and read operations respectively, for example, distinguishes handshake signals. Therefore, in this embodiment, the type of data transfer operation requested by the current data transfer request can be determined based on the handshake signal.

[0062] Since each handshake signal differs between write and read operations, and each handshake signal must be executed in the corresponding data channel, the type of the corresponding data transfer operation is determined based on any handshake signal. For example, if the write address channel's awvalid (write address valid signal) or awready (write address ready signal) is detected, or the write response channel's bvalid (write response valid signal) or bready (write response ready signal) is detected; or any one of the write data channel's wvalid (write data valid signal), wready (write data ready signal), or wlast (write data end signal) is detected, then the request is determined to be a write operation. For another example, if the read address channel's arvalid (read address valid signal) or arready (read address ready signal) is detected, or any one of the read data response channel's rvalid (read data response valid signal), rready (read data response ready signal), or rlast (read data response end signal) is detected, then the request is determined to be a read operation.

[0063] After the type is determined, the data transmission channels required to perform the data transmission operation of this type can be determined according to a preset matching relationship, thereby obtaining the standby data transmission channels.

[0064] In an embodiment of the present application, the preset matching relationship may include: a write address channel, a write response channel, and a write data channel corresponding to a write operation type, and a read address channel and a read data response channel corresponding to a read operation type.

[0065] Correspondingly, in the preset matching relationship, each standby data transmission channel that matches the type is determined, including: if the type of data transmission operation requested to be executed by the current data transmission request is a write operation type, then it is determined that the standby data transmission channels include a write address channel, a write response channel, and a write data channel; if the type of data transmission operation requested to be executed by the current data transmission request is a read operation type, then it is determined that the standby data transmission channels include a read address channel and a read data response channel.

[0066] During the AXI bus data transmission process, the transmission of signals is indicated by handshake signals. For example, if valid is high, it means that the data is valid, the ready signal is high to indicate that data transmission is ready, and the last signal indicates the last data.

[0067] There are dependencies between the handshake signals, for example, see Figure 2 , Figure 2This is a diagram illustrating the dependency relationships of a read channel provided in an embodiment of the present application. In the AXI bus protocol, for read operations, the dependencies include: the master port cannot wait for the slave port to raise arready before raising arvalid; the slave port can wait for the master port to raise arvalid before raising arready; the slave port can raise arready before the master port raises arvalid; the slave port must raise rvalid only after raising arvalid and arready on the master port; the slave port cannot wait for the master port to raise rready before raising rvalid; the master port can wait for rvalid on the slave port before raising rready; the master port can raise rready before raising rvalid on the slave port. The master port refers to the port of the communication module of the master device, and the slave port refers to the port of the communication module of the slave device.

[0068] See also Figure 3 , Figure 3 This is a diagram of the dependency relationship of the write channel provided in an embodiment of the present application. In the AXI bus protocol, for write operations, the dependency relationship includes: the slave port must wait for the master port awvalid, awready, wvalid, and wready to be pulled high before pulling bvalid high; the master port cannot wait for the slave port (slave) to pull awready high or wready high before pulling awvalid or wvalid high; the slave port can wait for the master port to pull awvalid and wvalid high before pulling awready high; the slave port can pull awready high before the master port awvalid or wvalid is pulled high; the slave port can wait for the master port a Pull wvalid or wvalid, or both high, before pulling wready high; the slave port can pull wready high before the master port awvalid and wvalid are pulled high; the slave port must wait for the master port awvalid, awready, wvalid, and wready to be pulled high before pulling bvalid high, and the slave port must also wait for the master port wlast to be pulled high before pulling bvalid high; the slave port cannot wait for the master port (master) to pull bready high before pulling bvalid high; the master port can wait for the slave port bvalid to be pulled high before pulling bready high; the master port can pull bready high before the slave port bvalid is pulled high.

[0069] Therefore, the target data transmission channel can be determined from the inactive data transmission channels by the combination of the handshake signals in the current data transmission request, that is, whether to enable the corresponding data transmission channel can be determined according to the combination of the handshake signals.

[0070] In an embodiment of the present application, a channel status signal can be configured for each data transmission channel, and the channel status signal is used to record whether the data transmission channel is enabled. Therefore, when a subsequent data transmission request arrives, by detecting the channel status signal, it is determined whether the data transmission channel is in use, and thus it is determined whether the data transmission channel is allowed to continue to be used to transmit data.

[0071] Specifically, after the target transmission channel is determined, the channel state signal of the target data transmission channel is assigned a first state value; the first state value is an identification value indicating that the data transmission channel is in an enabled state.

[0072] For example, the channel state signal may be a binary number, and accordingly, the first state value may be high (value 1). The bit width of the channel state signal and the first state value may be defined as required and will not be elaborated here.

[0073] Accordingly, if the type of data transmission operation requested to be executed by the current data transmission request is a write operation type, determining the target data transmission channel from the standby data transmission channels based on the combination of the handshake signals in the current data transmission request may include: if the valid signal and ready signal of the write address channel and the write response channel in the current data transmission request are valid values, then assigning the channel status signal of the write address channel and the write response channel to the first state value; if the valid signal, ready signal and end signal of the write data channel in the current data transmission request are valid values, then assigning the channel status signal of the write data channel to the first state value.

[0074] Similarly, if the type of data transmission operation requested to be executed by the current data transmission request is a read operation type, determining the target data transmission channel from the standby data transmission channels based on the combination of the handshake signals in the current data transmission request may include: if the valid signal and the ready signal of the read address channel in the current data transmission request are valid values, then assigning the channel status signal of the read address channel to the first state value; if the valid signal, the ready signal and the end signal of the read data response channel in the current data transmission request are valid values, then assigning the channel status signal of the read data response channel to the first state value.

[0075] During data transmission, in order to enable each data transmission channel to accurately execute the data transmission operation corresponding to each data transmission request, each channel can be configured not to execute the data transmission operation of a new data transmission request before completing the current data transmission request.

[0076] In combination with the channel status signal, in one embodiment of the present application, when the channel status signal of the target data transmission channel is assigned a first status value, the data transmission operation requested by other data transmission requests other than the current data transmission request based on the target data transmission channel may be refused.

[0077] S130 , executing, based on the target data transmission channel, a data transmission operation corresponding to the target data transmission channel among the data transmission operations requested by the current data transmission request.

[0078] After determining the target data transmission channel, each channel performs the data transmission operation corresponding to the current data transmission request. For example, the write address channel or the read address channel transmits address data, the write response channel transmits the response signal of the write operation, the write data channel transmits the data written to the slave device, and the read data response channel is used to transmit the read data and response signal fed back by the slave device.

[0079] In an embodiment of the present application, a process status signal may also be configured for each data transmission channel, and the process status signal is used to record whether the data transmission is completed.

[0080] Specifically, after any target data transmission channel completes the data transmission operation corresponding to the target data transmission channel, the process state signal corresponding to the target data transmission channel is updated to a second state value. The second state value is an identification value indicating that the data transmission channel has completed the data transmission operation.

[0081] For example, the process status signal can also be a binary number, and the second status value can be high (value 1). The bit width of the channel status signal and the first status value can be defined as needed and will not be expanded here.

[0082] Among them, the first state value of the channel state signal and the second state value of the process state signal can be the same, for example, both are 1. Then, accordingly, the process state signal corresponding to the target data transmission channel is updated to the second state value, which can be achieved by assigning the channel state signal of the data transmission channel to the process state signal.

[0083] In some embodiments, the first state value and the second state value may also be different, and the update of the process state value may be directly modified to the second state value.

[0084] When all target data transmission channels have completed data transmission operations, new data transmission requests can be executed. However, at this time, the channel status signal is in the first state value and the process status signal is in the second state value, which makes it impossible for each channel to execute new data requests. The channel status signal and process status signal need to be adjusted.

[0085] In one embodiment of the present application, after all target data transmission channels complete their corresponding data transmission operations, the channel status signals of all target data transmission channels are updated to the third status value, and the process status signals of all target data transmission channels are updated to the fourth status value.

[0086] In this embodiment, the third state value is an identification value indicating that the data transmission channel is in an inactive state, and the third state value has the opposite meaning to the first state value. The fourth state value is an identification value indicating that the data transmission channel is not performing a data transmission operation, or an identification value indicating that the data transmission channel is performing a data transmission operation.

[0087] Accordingly, if the first state value is 1, the third state value may be 0. Similarly, if the second state value is 1, the fourth state value may be 0. Accordingly, the channel state signal and the process state signal may be updated by setting or clearing.

[0088] In some other embodiments, other numerical values ​​may be defined as the first state value, the second state value, the third state value, and the fourth state value, which are not limited here.

[0089] By updating the channel status signals of all target data transmission channels to the third status signal and the process status signal to the fourth status signal, it is indicated that each target data transmission channel is allowed to execute a new data transmission instruction or can accept a new data transmission request.

[0090] Accordingly, after the device is started, the channel status signals and process status signals of each channel may not be restored to a state that allows the execution of new data transmission instructions. Therefore, before obtaining the current data transmission request, the channel status signals and process status signals of all data transmission channels can also be initialized to make the channel status signals of all data transmission channels the third state value, and make the process status signals of all data transmission channels the fourth state value.

[0091] In an embodiment of the present application, by configuring the matching relationship between the types of different data transmission operations and each data transmission channel in a preset matching relationship, when the corresponding operation in the data transmission request is determined, the target data transmission channel for data transmission can be directly determined, so that there is no need to use the ID for the transmission channel before data transmission, effectively reducing data transmission errors or anomalies caused by the ID.

[0092] For ease of understanding, corresponding embodiments are provided for description of write and read operations. In the embodiment, the first state value and the second state value are 1, and the third state value and the fourth state value are 0. Figure 4 , Figure 4This is a schematic diagram of an extended flow chart of a data transmission method based on channel matching provided in one embodiment of the present application.

[0093] For write operations:

[0094] S210, initializing each state signal and assigning a channel ID. This step includes setting the process state signals and channel state signals of the write address channel, write data channel, and write response channel to zero, and assigning the ID of the write address channel to the write response channel.

[0095] S220: Receive the current data transmission request and determine the target data transmission channel. For example, when the data transmission operation type corresponding to the data transmission request is determined to be a write operation, the corresponding standby data transmission channels are determined to be a write address channel, a write data channel, and a write response channel according to a preset matching relationship.

[0096] S230: Update the channel status signals. The channel status signals of the write address channel and the write response channel are set high (i.e., 1) when the valid and ready data response signals are simultaneously high (valid values). The write data channel is set high when the valid, ready, and last data signals are simultaneously high. Meanwhile, each channel with a high channel status signal is prevented from receiving new requests.

[0097] S240 updates the process status signal. Each channel performs the corresponding data transmission operation in the current data transmission request. When the write address channel completes transmission, the channel status signal of the write address channel is assigned to the process status signal, setting the process status signal high. Similarly, when the write data channel and the write response channel complete transmission, their respective channel status signals are assigned to the process status signal, setting the process status signal high.

[0098] S250: End data transmission and reset the channel status signal and process status signal. When the channel status signal and process status signal of all target data transmission channels are high, data transmission is completed. The channel status signal and process status signal are reset to zero to indicate that the next round of data transmission is allowed.

[0099] For read operations:

[0100] S210, initializing each status signal and assigning a channel ID. This step includes setting the process status signal and channel status signal of the read address channel and the read data response channel to zero, and assigning the ID of the read address channel to the read data response channel.

[0101] S220, receiving the current data transmission request and determining the target data transmission channel. For example, when the data transmission operation type corresponding to the data transmission request is determined to be a read operation, the corresponding standby data transmission channel is determined to be a read address channel and a read data response channel according to a preset matching relationship.

[0102] S230: Update the channel status signals. The channel status signals of the read address channel are set high (i.e., 1) when valid and ready in the data transmission request are both high (valid values). The channel status signals of the read data response channel are set high when valid, ready, and last are both high. Meanwhile, each channel with a high channel status signal is prevented from receiving new requests.

[0103] S240 updates the process status signal. Each channel performs the corresponding data transmission operation in the current data transmission request. When the read address channel completes transmission, the channel status signal of the read address channel is assigned to the process status signal, setting the process status signal high. Similarly, when the read data response channel completes transmission, the channel status signal of each read data response channel is assigned to the process status signal, setting the process status signal high.

[0104] S250: End data transmission and reset the channel status signal and process status signal. When the channel status signal and process status signal of all target data transmission channels are high, data transmission is complete. The channel status signal and process status signal are reset to zero to indicate that the next round of data transmission is allowed, thus completing one round of read operation.

[0105] Based on the same inventive concept, the present application embodiment also provides a communication module, see Figure 5 , Figure 5 This is a schematic diagram of the structure of a communication module provided in one embodiment of the present application. The communication module 200 includes: a communication port 220 and a controller 210.

[0106] The controller 210 is connected to the communication port 220, and the communication port 220 is used to access the device. The controller 210 is used to execute the data transmission method based on channel matching provided in any of the above embodiments of the present application.

[0107] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which may include the communication module 200 provided in the above embodiment.

[0108] Based on the unified inventive concept, the present application embodiment also provides a data transmission system, see Figure 6 , Figure 6This is a schematic diagram of a data transmission system provided in an embodiment of the present application. The data transmission system includes: a first device 310 and a second device 320.

[0109] In this embodiment, the first device 310 is configured with a first device communication module 311, and the second device 320 is configured with a second device communication module 321. Of the first device communication module 311 and the second device communication module 321, at least the first device communication module 311 is the communication module 200 provided in the above embodiment.

[0110] For example, in other embodiments, the second device communication module 321 of the second device may also be the communication module 200 provided in the above embodiment, that is, both the first device 310 and the second device 320 have the communication module 200 provided in the above embodiment.

[0111] In this embodiment, the first device and the second device can be devices that use the same bus protocol. For example, the first device 310 and the second device 320 both use the AXI bus. The first device 310 and the second device 320 can be functional units in the device, a PCIe (Peripheral Component Interconnect express, a high-speed serial computer expansion bus standard) system, etc.

[0112] Based on the same inventive concept, an embodiment of the present application further provides a readable storage medium on which a program is stored. When the program runs on a controller, the controller executes the data transmission method based on channel matching provided in the above embodiment.

[0113] The readable storage medium can be any available medium that can be accessed by the processor or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD (digital video disc)), or a semiconductor medium (such as an SSD (solid state disk)).

[0114] If the data transmission method based on channel matching is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, ROM, RAM, a magnetic disk, or an optical disk.

[0115] In the embodiments provided herein, it should be understood that the disclosed methods and devices may also be implemented in other ways. The device embodiments described above are merely illustrative. The functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0116] The above embodiments can be freely combined without conflict, and the embodiments obtained by the combination are included in the protection scope of this application.

[0117] The above detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments derived by persons of ordinary skill in the art based on the embodiments in the present application without creative effort shall fall within the scope of protection of the present application.

[0118] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0119] It should also be noted that, in the description of this application, unless otherwise specified or limited, the term "connection" should be understood in a broad sense. For example, it can mean a fixed connection, a detachable connection, or an integral connection; it can mean an electrical connection; it can mean a direct connection, an indirect connection through an intermediate medium, or internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0120] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A data transmission method based on channel matching, characterized in that: Applicable to a communication module for data transmission based on the AXI bus protocol, the data transmission method based on channel matching includes: Get the current data transmission request; determining a target data transmission channel required to perform the current data transmission operation based on the type of the data transmission operation requested by the current data transmission request and a preset matching relationship; the preset matching relationship includes a matching relationship between different types of data transmission operations and various data transmission channels; executing, based on the target data transmission channel, a data transmission operation corresponding to the target data transmission channel among the data transmission operations requested by the current data transmission request; The current data transmission request includes multiple handshake signals transmitted through different data transmission channels; the target data transmission channel required to perform the current data transmission operation is determined based on the type of data transmission operation requested to be performed by the current data transmission request and the preset matching relationship, including: determining the type of data transmission operation requested to be performed by the current data transmission request based on any one of the handshake signals; determining each standby data transmission channel that matches the type in the preset matching relationship; and determining the target data transmission channel from each standby data transmission channel based on a combination of each handshake signal in the current data transmission request.

2. The data transmission method based on channel matching according to claim 1, characterized in that: After determining a target data transmission channel required for performing the current data transmission operation, the method further includes: performing the data transmission operation requested by the current data transmission request based on the target data transmission channel, and before performing the data transmission operation corresponding to the target data transmission channel: Assigning a channel status signal of the target data transmission channel to a first status value; the first status value is an identification value indicating that the data transmission channel is in an enabled state.

3. The data transmission method based on channel matching according to claim 2, characterized in that: The method further comprises: In a case where the channel status signal of the target data transmission channel is assigned a first status value, data transmission operations requested by other data transmission requests except the current data transmission request are refused to be executed based on the target data transmission channel.

4. The data transmission method based on channel matching according to claim 2, characterized in that: The method further comprises: After any of the target data transmission channels completes the data transmission operation corresponding to the target data transmission channel, the process status signal corresponding to the target data transmission channel is updated to a second status value; the second status value is an identification value representing that the data transmission channel completes the data transmission operation.

5. The data transmission method based on channel matching according to claim 4, characterized in that: The first state value and the second state value are the same; The updating of the process status signal corresponding to the target data transmission channel to a second status value includes: The channel status signal of the data transmission channel is assigned to the process status signal.

6. The data transmission method based on channel matching according to claim 4, characterized in that: After updating the process status signal corresponding to the target data transmission channel to the second status value, the method further includes: After all the target data transmission channels have completed their corresponding data transmission operations, the channel status signals of all the target data transmission channels are updated to a third status value, and the process status signals of all the target data transmission channels are updated to a fourth status value; the third status value is an identification value indicating that the data transmission channel is in an unenabled state; and the fourth status value is an identification value indicating that the data transmission channel is not performing a data transmission operation.

7. The data transmission method based on channel matching according to claim 2, characterized in that: The types of data transmission operations include write operation type and read operation type; The data transmission channel includes a write address channel, a write response channel, a write data channel, a read address channel, and a read data response channel; The preset matching relationship includes: a write address channel, a write response channel, and a write data channel corresponding to the write operation type, and a read address channel and a read data response channel corresponding to the read operation type; Determining each standby data transmission channel that matches the type in the preset matching relationship includes: If the type of the data transmission operation requested to be executed by the current data transmission request is a write operation type, determining that the standby data transmission channel includes the write address channel, the write response channel, and the write data channel; If the type of the data transmission operation requested to be executed by the current data transmission request is a read operation type, it is determined that the standby data transmission channel includes the read address channel and the read data response channel.

8. The data transmission method based on channel matching according to claim 7, characterized in that: The type of data transmission operation requested to be executed by the current data transmission request is a write operation type; the handshake signal includes: a valid signal and a ready signal of the write address channel, a valid signal, a ready signal and an end signal of the write data channel, and a valid signal and a ready signal of the write response channel; Determining the target data transmission channel from the standby data transmission channels according to a combination of the handshake signals in the current data transmission request includes: If the valid signal and the ready signal of the write address channel and the write response channel in the current data transmission request are valid values, assigning the channel status signal of the write address channel and the write response channel to the first status value; If the valid signal, the ready signal, and the end signal of the write data channel in the current data transmission request are valid values, the channel status signal of the write data channel is assigned the first status value.

9. The data transmission method based on channel matching according to claim 7, characterized in that: The type of data transmission operation requested to be executed by the current data transmission request is a read operation type; the handshake signal includes: a valid signal and a ready signal of the read address channel, and a valid signal, a ready signal and an end signal of the read data response channel; Determining the target data transmission channel from the standby data transmission channels according to a combination of the handshake signals in the current data transmission request includes: If the valid signal and the ready signal of the read address channel in the current data transmission request are valid values, assigning the channel state signal of the read address channel to the first state value; If the valid signal, the ready signal and the end signal of the read data response channel in the current data transmission request are valid values, the channel status signal of the read data response channel is assigned to the first status value.

10. The data transmission method based on channel matching according to claim 1, characterized in that: Before obtaining the current data transmission request, the method further includes: Initialize the channel status signals and process status signals of all the data transmission channels so that the channel status signals of all the data transmission channels are a third state value, and the process status signals of all the data transmission channels are a fourth state value; the third state value is an identification value representing that the data transmission channel is in an unenabled state; and the fourth state value is an identification value representing that the data transmission channel is not performing a data transmission operation.

11. The data transmission method based on channel matching according to any one of claims 1 to 10, characterized in that: The data transmission channel includes a write address channel and a write response channel; The write response channel and the write address channel are bound with the same identification information.

12. The data transmission method based on channel matching according to any one of claims 1 to 10, characterized in that: The data transmission channel includes a read address channel and a read data response channel; The read data response channel and the read address channel have the same identification information.

13. A communication module, characterized in that: include: Communication ports and controllers; The controller is connected to the communication port, and is used to execute the data transmission method based on channel matching according to any one of claims 1 to 12, and output or receive data through the communication port.

14. A data transmission system, characterized in that: include: A first device, configured with the communication module according to claim 13; The second device is communicatively connected to the communication module of the first device.

15. A readable storage medium, characterized in that The readable storage medium stores a program, and when the program is executed on the controller, the controller executes the data transmission method based on channel matching according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Transmission information matching method and device based on AXI protocol, chip and medium

    CN116881190A

  • Multi-channel arbitration method and system and medium

    CN118072807A