Search

CN-121979577-A - Data transmission method and device, electronic equipment and medium

CN121979577ACN 121979577 ACN121979577 ACN 121979577ACN-121979577-A

Abstract

The disclosure provides a data transmission method and device, electronic equipment and medium, and relates to the technical field of chips. The method comprises the steps of writing a first descriptor in a buffer area into a descriptor storage area, updating a write pointer in a local register, wherein the write pointer indicates the position of the first descriptor in the descriptor storage area, the first descriptor indicates storage information of data to be transmitted, pushing the write pointer to a mirror image register local to a transmitting end to form a write pointer mirror image in the mirror image register, and the write pointer mirror image is used for the transmitting end to read the first descriptor from the descriptor storage area to acquire the data to be transmitted. According to the data transmission method, the pointer mirror image of the opposite terminal is stored in the local maintenance mirror image register, and the opposite terminal does not need to be crossed by buses to acquire pointers, so that the descriptor interaction rate is accelerated, software participation is not needed, complex software and hardware interaction is reduced, software overhead is effectively reduced, and the descriptor cross-domain interaction rate is improved.

Inventors

  • WANG ZHONGZHONG
  • ZHENG KAN

Assignees

  • 北京玄戒技术有限公司

Dates

Publication Date
20260505
Application Date
20251230

Claims (20)

  1. 1.A data transmission method, the method being performed by a receiving end, the method comprising: writing a first descriptor in a buffer area into a descriptor storage area, and updating a write pointer in a local register, wherein the write pointer indicates the position of the first descriptor in the descriptor storage area, and the first descriptor indicates storage information of data to be transmitted; pushing the write pointer to a mirror register local to a sending end to form a write pointer mirror in the mirror register, wherein the write pointer mirror is used for the sending end to read the first descriptor from the descriptor storage area to acquire the data to be transmitted.
  2. 2. The method of claim 1, wherein the first descriptor is at least one descriptor in the buffer region, the method further comprising: Determining a number of empty spaces in the descriptor store in response to the number of stored descriptors in the buffer reaching a receive buffer threshold; Determining a pushing number based on the number of stored descriptors and the number of spaces; and determining the descriptors of the pushing quantity in the buffer area as the first descriptors.
  3. 3. The method of claim 2, wherein the determining the number of spaces in the descriptor store comprises: Determining a spare position in the descriptor storage area based on a locally stored read pointer mirror image, wherein the read pointer mirror image is formed by a mirror image register locally at the receiving end based on a read pointer pushed by the transmitting end; and determining the number of the vacant positions as the vacant number.
  4. 4. A method according to claim 3, wherein said writing said first descriptor into a descriptor storage region and updating a write pointer in a local register comprises: Writing the first descriptor into the spare position through a system bus, and determining a position identifier of the first descriptor; Determining a first write pointer corresponding to the first descriptor based on the location identifier; storing the first write pointer to the local register.
  5. 5. The method of claim 4, wherein pushing the write pointer to a mirror register local to a sender to form a write pointer mirror in the mirror register comprises: And pushing the first write pointer in the local register to a mirror register local to the transmitting end through the system bus to form a first write pointer mirror image of the first write pointer.
  6. 6. The method according to claim 1, wherein the method further comprises: Responding to a descriptor writing instruction, and storing a first descriptor corresponding to the descriptor writing instruction into the buffer area; And after the first descriptor is written into the descriptor storage area, managing a storage position corresponding to the first descriptor in the buffer area based on a preset buffer strategy.
  7. 7. A data transmission method, wherein the method is performed by a transmitting end, the method comprising: storing a first descriptor corresponding to a write pointer mirror image in a descriptor storage area into a local buffer area based on the write pointer mirror image in a local mirror image register, wherein the write pointer mirror image is formed by the transmitting end based on a write pointer pushed by a receiving end; Based on the first descriptor in the buffer area, updating a read pointer in a local register and pushing the read pointer to a mirror register local to the receiving end.
  8. 8. The method of claim 7, wherein storing the first descriptor corresponding to the write pointer image in the descriptor storage area to the local buffer area based on the write pointer image in the local image register comprises: determining a read number of the first descriptor in response to the number of descriptors in the buffer area not reaching a transmit buffer threshold; determining, in the local mirror register, a mirror of the read number of write pointers; determining a location identification of the first descriptor in the descriptor storage region based on the write pointer image; And storing the first descriptor corresponding to the position identifier in the descriptor storage area into the buffer area.
  9. 9. The method of claim 8, wherein the determining the read number of the first descriptor comprises: determining the number of storable descriptors in the buffer area; Determining a number of unread descriptors in the descriptor store; the read number is determined based on the number of storable descriptors, the number of unread descriptors.
  10. 10. The method of claim 8, wherein updating the read pointer in the local register and pushing the read pointer to the mirrored register local to the receiving end based on the first descriptor in the buffer region comprises: Storing a pre-read pointer corresponding to a first descriptor in the buffer area to the local register based on the first descriptor; Responding to a descriptor call instruction, and determining a pre-read pointer corresponding to the descriptor call instruction in the local register as the read pointer; And in response to the number of the read pointers reaching a pushing threshold, pushing the read pointers to a mirror image register local to the receiving end through a system bus to form a read pointer mirror image, wherein the read pointer mirror image is used for determining the spare positions of the descriptor storage area by the receiving end.
  11. 11. The method of claim 10, wherein the determining, in response to a descriptor call instruction, a pre-read pointer in the local register corresponding to the descriptor call instruction as the read pointer comprises: responding to the descriptor call instruction, and determining a second descriptor corresponding to the descriptor call instruction in the buffer area; Determining stored information based on the second descriptor; And based on the storage information, reading the data to be transmitted corresponding to the second descriptor, and determining a pre-read pointer corresponding to the second descriptor as the read pointer.
  12. 12. A data transmission method, performed by a data transmission system, the data transmission system including a transmitting end and a receiving end, the method comprising: The receiving end writes a first descriptor in a buffer area into a descriptor storage area and updates a write pointer in a local register, wherein the write pointer indicates the position of the first descriptor in the descriptor storage area, and the first descriptor indicates the storage information of data to be transmitted; Pushing the write pointer to a mirror register local to the transmitting end through a system bus to form a write pointer mirror in the mirror register, wherein the write pointer mirror is used for the transmitting end to read the first descriptor from the descriptor storage area to acquire the data to be transmitted; The sending end stores the first descriptor corresponding to the write pointer mirror image in the descriptor storage area into a local buffer area based on the write pointer mirror image in a local mirror image register; Based on a first descriptor in a buffer area of the sending end, updating a read pointer in a local register of the sending end, and pushing the read pointer to a mirror register local to the receiving end.
  13. 13. A receiving device is characterized by comprising an access module and a transceiver module, The access module is used for writing a first descriptor in the buffer area into a descriptor storage area and updating a write pointer in a local register, wherein the write pointer indicates the position of the first descriptor in the descriptor storage area, and the first descriptor indicates the storage information of data to be transmitted; The receiving-transmitting module is used for pushing the write pointer to a mirror register local to a transmitting end so as to form a write pointer mirror image in the mirror register, and the write pointer mirror image is used for the transmitting end to read the first descriptor from the descriptor storage area so as to acquire the data to be transmitted.
  14. 14. The receiving device of claim 13, further comprising a processing module configured to: Determining a number of empty spaces in the descriptor store in response to the number of stored descriptors in the buffer reaching a receive buffer threshold; Determining a pushing number based on the number of stored descriptors and the number of spaces; and determining the descriptors of the pushing quantity in the buffer area as the first descriptors.
  15. 15. The receiving device of claim 14, wherein the access module is configured to: Writing the first descriptor into the spare position through a system bus, and determining a position identifier of the first descriptor; Determining a first write pointer corresponding to the first descriptor based on the location identifier; storing the first write pointer to the local register.
  16. 16. The receiving device of claim 15, wherein the transceiver module is configured to: And pushing the first write pointer in the local register to a mirror register local to the transmitting end through the system bus to form a first write pointer mirror image of the first write pointer.
  17. 17. A transmitting device is characterized by comprising an access module and a transceiver module, The access module is used for storing a first descriptor corresponding to the write pointer mirror image in the descriptor storage area to a local buffer area based on the write pointer mirror image in a local mirror image register, wherein the write pointer mirror image is formed by the transmitting end based on a write pointer pushed by the receiving end; The receiving and transmitting module is used for updating a read pointer in a local register based on a first descriptor in the buffer area and pushing the read pointer to a mirror image register local to the receiving end.
  18. 18. The transmitting device of claim 17, wherein the access module is configured to: determining a read number of the first descriptor in response to the number of descriptors in the buffer area not reaching a transmit buffer threshold; determining, in the local mirror register, a mirror of the read number of write pointers; determining a location identification of the first descriptor in the descriptor storage region based on the write pointer image; And storing the first descriptor corresponding to the position identifier in the descriptor storage area into the buffer area.
  19. 19. The transmitting device of claim 18, wherein the access module is configured to: Storing a pre-read pointer corresponding to a first descriptor in the buffer area to the local register based on the first descriptor; The receiving and transmitting module is used for responding to a descriptor calling instruction and determining a pre-reading pointer corresponding to the descriptor calling instruction in the local register as the reading pointer; And in response to the number of the read pointers reaching a pushing threshold, pushing the read pointers to a mirror image register local to the receiving end through a system bus to form a read pointer mirror image, wherein the read pointer mirror image is used for determining the spare positions of the descriptor storage area by the receiving end.
  20. 20. The transmitting device of claim 19, further comprising a processing module configured to: responding to the descriptor call instruction, and determining a second descriptor corresponding to the descriptor call instruction in the buffer area; Determining stored information based on the second descriptor; And based on the storage information, reading the data to be transmitted corresponding to the second descriptor, and determining a pre-read pointer corresponding to the second descriptor as the read pointer.

Description

Data transmission method and device, electronic equipment and medium Technical Field The disclosure relates to the field of computer technology, and in particular, to a data transmission method and device, an electronic device and a medium. Background In the chip design, descriptor interaction is needed between modules for transmitting data, instructions and the like, and with the rapid development of high-speed service, the requirements on the descriptor interaction rate between the modules are higher and higher. Disclosure of Invention An embodiment of a first aspect of the present disclosure proposes a data transmission method, including writing a first descriptor in a buffer area into a descriptor storage area, and updating a write pointer in a local register, the write pointer indicating a location of the first descriptor in the descriptor storage area, the first descriptor indicating storage information of data to be transmitted, pushing the write pointer to a mirror register local to a sender to form a write pointer mirror in the mirror register, the write pointer mirror being used by the sender to read the first descriptor from the descriptor storage area to obtain the data to be transmitted. In some embodiments of the present disclosure, the first descriptor is at least one descriptor in the buffer region, the method further comprising determining a number of empty in the descriptor storage region in response to the number of stored descriptors in the buffer region reaching a receive buffer threshold, determining a number of pushes based on the number of stored descriptors and the number of empty, and determining the number of pushed descriptors in the buffer region as the first descriptor. In some embodiments of the present disclosure, determining the number of empty locations in the descriptor storage area includes determining the empty locations in the descriptor storage area based on a locally stored mirror of read pointers formed by a mirror register local to the receiving end based on read pointers pushed by the transmitting end, and determining the number of empty locations as the number of empty locations. In some embodiments of the present disclosure, writing a first descriptor into a descriptor storage region and updating a write pointer in a local register includes writing the first descriptor into a spare location via a system bus, determining a location identification of the first descriptor, determining a first write pointer corresponding to the first descriptor based on the location identification, and storing the first write pointer to the local register. In some embodiments of the present disclosure, pushing a write pointer to a mirror register local to a sender to form a write pointer mirror in the mirror register includes pushing a first write pointer in the local register to the mirror register local to the sender over a system bus to form a first write pointer mirror of the first write pointer. In some embodiments of the present disclosure, the method further includes storing a first descriptor corresponding to the descriptor write instruction to the buffer area in response to the descriptor write instruction, and managing a storage location corresponding to the first descriptor in the buffer area based on a preset caching policy after the first descriptor is written to the descriptor storage area. In the above embodiment, an efficient, decoupled and low-overhead receiver-driven data transmission mechanism is constructed. The high-bandwidth data/descriptor transmission is converted into low-bandwidth pointer synchronization, and system bus contention and access delay are remarkably reduced through batch pushing, buffer management, mirror image pointer cooperation and other strategies. The method gives the receiving end the capability of actively managing the data transmission flow, ensures efficient and safe cooperation with the sending end through shared storage and lock-free pointer communication, and finally improves the overall performance and expandability of the data transmission system. An embodiment of a second aspect of the present disclosure provides a data transmission method, which is executed by a transmitting end, and includes storing a first descriptor corresponding to a write pointer mirror image in a descriptor storage area into a local buffer area based on the write pointer mirror image in a local mirror image register, where the write pointer mirror image is formed by the transmitting end based on a write pointer pushed by a receiving end, updating a read pointer in the local register based on the first descriptor in the buffer area, and pushing the read pointer to the local mirror image register of the receiving end. In some embodiments of the present disclosure, storing a first descriptor corresponding to a write pointer image in a descriptor storage area to a local buffer area based on the write pointer image in a local image register includes determining