CN-121996303-A - RNDIS driving optimization method supporting high-speed acquisition of vibration data and adaptive to HPM5361 and related device
Abstract
The invention discloses an RNDIS driving optimization method supporting high-speed acquisition of vibration data and a related device, which are adaptive to HPM5361, and comprise the steps of configuring a physical layer interface of a universal serial bus controller to work in a super-high speed mode, setting a double-buffer batch transmission mode for a data communication endpoint, initializing a direct memory access controller, transferring a special memory pool in a system memory, dividing the special memory pool into memory buffer areas with fixed sizes, pre-filling physical addresses of the free memory buffer areas in the special memory pool into a receiving channel descriptor queue, responding to a data receiving notification of the universal serial bus controller, controlling the direct memory access controller to directly write data into the free memory buffer areas, and directly submitting memory buffer area pointers of the filled data to a network protocol stack in an interrupt service routine.
Inventors
- YIN YUXIONG
- LI SHENGHAO
- QIU HUA
- GE XIANG
- KONG LINGHUI
- ZHENG XIANGHUA
- FAN YANHONG
- LI JIN
- Mao Xuecheng
- Feng Ruzhan
Assignees
- 华能云南滇东能源有限责任公司
- 西安热工研究院有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260121
Claims (10)
- 1. An RNDIS driving optimization method supporting high-speed acquisition of vibration data, which is adapted to HPM5361, is characterized by comprising the following steps: Configuring a physical layer interface of the universal serial bus controller to work in an ultra-high speed mode, setting a double-buffer batch transmission mode for a data communication endpoint, initializing a direct memory access controller to establish an annular descriptor queue of a receiving and transmitting channel, and transferring a special memory pool in a system memory and dividing the special memory pool into memory buffer areas with fixed sizes; The physical address of an idle memory buffer in the special memory pool is pre-filled into a receiving channel descriptor queue, a direct memory access controller is controlled to directly write data into the idle memory buffer in response to a data receiving notification of a universal serial bus controller, and a memory buffer pointer filled with data is directly submitted to a network protocol stack in an interrupt service routine; And receiving the physical address and the length of a data buffer area to be transmitted, which are transmitted by a network protocol stack, configuring a transmission channel descriptor entry, triggering a direct memory access controller to push data from a memory buffer area to a hardware FIFO of a transmission endpoint of a universal serial bus controller, and recovering the memory buffer area and the descriptor after transmission is completed.
- 2. The RNDIS driving optimization method for supporting high-speed vibration data acquisition of the HPM5361 of claim 1, further comprising parsing a packet header, identifying a transmission control protocol or user datagram protocol packet, configuring a hardware checksum calculation unit, and synchronously completing checksum calculation and insertion during data transmission.
- 3. The method for optimizing RNDIS drive supporting high-speed acquisition of vibration data for HPM5361 as defined in claim 1, further comprising setting an interrupt trigger threshold of the direct memory access controller, realizing interrupt batch processing, and improving scheduling priority of data transceiving tasks in an operating system or a real-time kernel.
- 4. The RNDIS driving optimization method supporting high speed acquisition of vibration data adapted to HPM5361 according to claim 1, wherein each descriptor entry of the ring descriptor queue contains a data buffer physical address, a data transfer length, and a pointer to the next descriptor.
- 5. The RNDIS driving optimization method for supporting high-speed acquisition of vibration data adapted to HPM5361 according to claim 1, wherein the calculation range of the calculation unit is pseudo header and data payload of the data packet.
- 6. The RNDIS driving optimization method for supporting high-speed acquisition of vibration data according to claim 1, wherein the size of the dedicated memory pool is sixteen megabytes, the size of each memory buffer is one thousand five hundred thirty six bytes, and the physical addresses of all memory buffers are statically mapped with free entries in the descriptor queue during the initialization phase.
- 7. The RNDIS driven optimization method supporting high speed acquisition of vibration data adapted to HPM5361 according to claim 1, wherein the configuration of the hardware checksum calculation unit is done by writing a dedicated control register, the register fields include a start offset, a calculation length, and a target protocol type identification, and the checksum calculation is performed by a hardware pipeline.
- 8. An RNDIS driving optimization system supporting high-speed acquisition of vibration data adapted to HPM5361, comprising: The hardware resource initialization and depth configuration module is used for configuring a physical layer interface of the universal serial bus controller to work in an ultra-high speed mode, setting a double-buffer batch transmission mode for a data communication endpoint, initializing the direct memory access controller to establish an annular descriptor queue of a receiving and transmitting channel, and transferring a special memory pool in a system memory and dividing the special memory pool into memory buffer areas with fixed sizes; The zero copy receiving data path construction module is used for pre-filling physical addresses of idle memory buffer areas in the special memory pool into a receiving channel descriptor queue, responding to a data receiving notification of the universal serial bus controller, controlling the direct memory access controller to directly write data into the idle memory buffer areas, and directly submitting memory buffer area pointers filled with data to a network protocol stack in an interrupt service routine; The zero copy sending data path construction module is used for receiving the physical address and the length of a data buffer area to be sent, which are transmitted by a network protocol stack, configuring a sending channel descriptor item, triggering a direct memory access controller to push data from the memory buffer area to a sending endpoint hardware FIFO of a universal serial bus controller, and recovering the memory buffer area and the descriptor after the sending is completed; The hardware checksum unloading processing module is used for analyzing the data packet protocol header before sending, identifying a transmission control protocol or user datagram protocol data packet, configuring a hardware checksum calculation unit and synchronously completing checksum calculation and insertion in the data transmission process; the interrupt aggregation and task scheduling optimization module is used for setting an interrupt trigger threshold of the direct memory access controller, realizing interrupt batch processing, and improving the scheduling priority of the data receiving and transmitting task in an operating system or a real-time kernel.
- 9. Computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of the RNDIS drive optimization method of adapting HPM5361 according to any one of claims 1-7.
- 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor performs the steps of the RNDIS drive optimization method of adapting HPM5361 according to any one of claims 1-7.
Description
RNDIS driving optimization method supporting high-speed acquisition of vibration data and adaptive to HPM5361 and related device Technical Field The invention belongs to the technical field of computers, and relates to an RNDIS driving optimization method supporting high-speed acquisition of vibration data and a related device, which are adaptive to HPM 5361. Background With the continuous improvement of network communication performance requirements of industrial automation, intelligent networking automobiles and high-real-time embedded systems, the fusion application of time-sensitive networks (TSNs) and high-speed Universal Serial Bus (USB) technologies becomes a key path for realizing low-delay, high-synchronization and large-bandwidth data interaction. The TSN realizes sub microsecond time synchronization through protocols such AS IEEE 802.1AS and the like to provide time sequence guarantee for cooperative control of multiple devices, and RNDIS (Remote NDIS) is used AS a virtual network interface protocol based on USB to realize inter-device Ethernet communication without additional physical network cards. The two can be combined to construct an embedded communication architecture with high-precision time sequence synchronization and high-speed data transmission capability, and the embedded communication architecture is widely applicable to scenes such as edge computing nodes, vehicle-mounted domain controllers, industrial field devices and the like. The driving scheme of RNDIS over USB3.0 is realized based on the HPM5361 main control chip, and the method becomes a core link for breaking through the traditional USB 2.0 bandwidth bottleneck and supporting TSN data efficient feedback. The HPM5361 integrates the USB OTG controller and supports the high-speed transmission mode, but the native driver stack does not perform deep adaptation for the RNDIS protocol, which results in problems of buffer overflow, interrupt response delay, low protocol parsing efficiency, etc. occurring under high-load data flow. Meanwhile, the RNDIS specification lacks a unified hardware abstraction for timing control, packet boundary alignment and error recovery mechanisms of the underlying USB transmission, so that the driver faces compatibility fragmentation challenges when deployed across an operating system (such as Windows, linux, android), and it is difficult to stably maintain the sustained throughput performance under the USB3.0 theoretical 5Gbps bandwidth. In the prior art, on one hand, the general RNDIS driver is mostly based on the simplified realization of a standard USB CDC-ECM model, DMA transmission, multi-terminal concurrency and zero copy mechanism potential of an HPM5361 chip are not fully utilized, so that the CPU occupancy rate is high and the data path is redundant, and on the other hand, a driving layer and an upper layer TSN protocol stack (such AS IEEE 802.1AS firmware running on a CH564 coprocessor) are lack of a cooperative scheduling interface, and the USB transmission scheduling strategy cannot be dynamically adjusted according to the priority of time-sensitive traffic, so that a critical synchronous message encounters non-deterministic delay on a USB bus. In addition, the existing driver lacks adaptive reconnection and parameter negotiation capability in the face of USB link jitter, hot plug event or host side driver version difference, and is easy to cause communication interruption or bandwidth dip. The above problems severely restrict the end-to-end performance of the TSN system on the HPM5361 platform, and there is a need for an RNDIS driving optimization method and system that deeply adapts to the chip architecture and combines high bandwidth throughput and protocol compatibility. Disclosure of Invention The invention aims to overcome the defects of the prior art, and provides an RNDIS driving optimization method supporting high-speed acquisition of vibration data and a related device, which are adaptive to HPM 5361. In order to achieve the above purpose, the present invention discloses an RNDIS driving optimization method for supporting vibration data high-speed acquisition, which is adapted to HPM5361, and comprises: Configuring a physical layer interface of the universal serial bus controller to work in an ultra-high speed mode, setting a double-buffer batch transmission mode for a data communication endpoint, initializing a direct memory access controller to establish an annular descriptor queue of a receiving and transmitting channel, and transferring a special memory pool in a system memory and dividing the special memory pool into memory buffer areas with fixed sizes; The physical address of an idle memory buffer in the special memory pool is pre-filled into a receiving channel descriptor queue, a direct memory access controller is controlled to directly write data into the idle memory buffer in response to a data receiving notification of a universal serial bus controller, and a memory b