USB data transmission method and system based on BMC chip
By monitoring the concurrency processing mechanism and time-sharing scheduling strategy of USB signal transmission path, the problems of signal attenuation and resource competition in BMC chips are solved, and the stability and efficiency of USB data transmission are improved.
Patent Information
- Application Number
- CN202510545329.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The BMC chip in the server has signal attenuation and electromagnetic interference due to the long USB signal, and the hardware resources are limited, resulting in data transmission delay and resource competition when multiple devices are transmitted simultaneously, increasing system complexity.
By monitoring the duration of the USB signal transmission path, determining the risk status, dynamically allocating hardware resources, and using concurrency processing mechanisms and time-sharing scheduling strategies, the signal transmission path and resource utilization are optimized.
It improves the stability and efficiency of USB data transmission, reduces signal interference and noise, and ensures the efficiency and reliability of the system.
Smart Images

Figure CN120508524A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a USB data transmission method and system based on a BMC chip. Background Art
[0002] The Baseboard Management Controller (BMC) chip is a chip commonly used for server management. It is often necessary to place the BMC chip in a specific position on the motherboard to meet heat dissipation and spatial layout requirements. However, this design will result in excessively long USB signal routing. Specifically, when the USB signal is transmitted from the external interface to the BMC chip, the signal path is several centimeters or even tens of centimeters long. This long-distance signal transmission introduces signal attenuation and electromagnetic interference, especially at high-speed transmission (such as USB 3.0 and above), where signal integrity is difficult to ensure. On the other hand, the BMC chip on the server motherboard needs to process data from multiple USB devices simultaneously, but its hardware resources are limited, which easily leads to resource competition. When multiple USB devices transmit data simultaneously, the data transmission delay will increase. The BMC chip needs to select different transmission paths based on the device type (USB 2.0 or USB 3.0). This data scheduling process increases the complexity of the system. Summary of the Invention
[0003] Based on this, it is necessary to provide a USB data transmission method and system based on a BMC chip to solve at least one of the above technical problems.
[0004] To achieve the above object, a USB data transmission method based on a BMC chip is provided, the method comprising the following steps:
[0005] Step S1: monitoring the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detecting the signal transmission duration of the signal transmission path information, and determining that a signal transmission risk state exists when the signal transmission duration exceeds a preset transmission duration threshold;
[0006] Step S2: In the signal transmission risk state, the BMC chip detects the number of simultaneous USB device requests; when it is detected that multiple USB devices initiate data transmission requests simultaneously, the concurrent processing mechanism is activated to dynamically allocate the hardware resources of the BMC chip; and the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling policy;
[0007] Step S3: If the BMC chip continuously detects a signal transmission risk state within a preset time, a transmission risk control instruction is generated; transmission balancing is performed on the USB signal transmission path according to the transmission risk control instruction; when the USB device is detected to be disconnected and continues to be idle for a preset time, the BMC chip returns to the initial standby state;
[0008] Step S4: monitor the USB device connection status in real time. When the USB device is reconnected and it is detected that the signal transmission duration matches the signal transmission risk status, the BMC chip executes USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0009] By monitoring the signal transmission duration of a USB signal transmission path, the present invention can promptly determine the signal transmission risk state when the signal transmission duration exceeds a preset threshold, identifying potential transmission issues and avoiding data loss or errors caused by signal transmission delays. In the signal transmission risk state, the present invention dynamically allocates the hardware resources of the BMC chip by detecting the number of simultaneous USB device requests and initiating a concurrent processing mechanism, effectively addressing situations where multiple devices simultaneously initiate data transmission requests. This method optimizes resource allocation and improves data transmission efficiency by scheduling data transmission tasks for different devices in a time-sharing manner. When the BMC chip continuously detects the signal transmission risk state for a preset period of time, it generates a transmission risk control instruction and performs transmission balancing on the USB signal transmission path, effectively adjusting the parameters of the signal transmission path, optimizing signal integrity, and reducing interference and noise during signal transmission. Furthermore, when a USB device is detected to be disconnected for a preset idle time, the BMC chip returns to its initial standby state, effectively conserving system resources and improving system stability and reliability. The present invention monitors the USB device connection status in real time and, when a USB device is reconnected and the signal transmission duration matches the signal transmission risk state, executes USB signal transmission optimization measures based on the USB multi-device transmission scheduling strategy. This method dynamically adjusts transmission strategies based on real-time monitoring data, ensuring efficient data transmission regardless of device connection and transmission status. Therefore, by monitoring signal transmission paths in real time, dynamically allocating resources, balancing transmissions, and optimizing scheduling strategies, the present invention addresses transmission stability issues under concurrent and risky conditions for multiple devices, significantly improving USB data transmission efficiency.
[0010] Preferably, monitoring the USB signal transmission path of the motherboard where the BMC chip is located in step S1 includes:
[0011] Identify the USB interface type identifier on the motherboard through the built-in I / O controller of the BMC chip;
[0012] Determine a USB signal transmission path according to a USB interface type identifier;
[0013] Real-time monitoring of the USB signal transmission path. During the monitoring process, the signal transmission path is segmented through the D+ and D- signal lines of the USB interface, and the level parameters of each transmission path are monitored separately;
[0014] If the level parameter of either the D+ or D- signal line is non-zero, the USB interface is determined to be in the connected state, and the time when the level parameter of the USB interface changes is recorded to obtain signal transmission path information.
[0015] The present invention can accurately distinguish different types of USB devices by using a built-in I / O controller in a BMC chip to identify the USB interface type identifier on the motherboard, thereby providing a basis for subsequent data transmission path selection. The USB signal transmission path is determined based on the USB interface type identifier to ensure the correctness and efficiency of the data transmission path. The USB signal transmission path is monitored in real time, and the signal transmission path is segmented and detected through the D+ and D- signal lines of the USB interface. The level parameters of each transmission path are monitored separately, which can timely detect abnormal conditions in signal transmission and improve the reliability of signal transmission. If the level parameter of any one of the D+ or D- signal lines is non-zero, the USB interface is judged to be in the interface connected state, and the level parameter change time of the USB interface is recorded. This can effectively monitor the connection status of the USB device and provide a guarantee for the stability and reliability of signal transmission.
[0016] Preferably, in step S1, detecting the signal transmission duration of the signal transmission path information, and determining that the signal transmission risk state is in a condition where the signal transmission duration exceeds a preset transmission duration threshold, includes:
[0017] The timing component of the BMC chip is used to time the level change of the signal. When the level on the D+ or D- signal line is detected to change from a non-zero state, the timing unit is started;
[0018] Identify the level waveform on the D+ or D- signal line. When the level waveform does not show overshoot jitter and the level on the D+ or D- signal line maintains constant parameters, stop the timing component and record the signal transmission duration.
[0019] When the signal transmission duration exceeds a preset transmission duration threshold, it is determined to be a signal transmission risk state.
[0020] The present invention uses the timing component of the BMC chip to time signal level changes, accurately measuring the temporal characteristics of level changes during signal transmission. When the level on the D+ or D- signal line is detected to have changed from a non-zero state, the timing unit is activated, ensuring precise timing from the starting point of the signal change, thereby providing an accurate time reference for subsequent signal stability analysis. By identifying the level waveform on the D+ or D- signal line and stopping the timing component and recording the signal transmission duration when the waveform exhibits no overshoot or jitter and the level remains constant, it effectively distinguishes between stable and abnormal signal transmission. This method ensures accurate recording of transmission duration when signal transmission is stable, providing reliable data support for signal transmission risk assessment. When the signal transmission duration exceeds a preset transmission duration threshold, a signal transmission risk state is determined, enabling timely identification of potential problems in signal transmission. This time threshold-based risk assessment method effectively identifies delays or blockages in signal transmission, providing a basis for implementing appropriate risk management measures to ensure signal transmission reliability and data integrity.
[0021] Preferably, in step S2, in the signal transmission risk state, detecting the simultaneous request quantity of the USB device through the BMC chip includes:
[0022] Start the I / O controller of the BMC chip;
[0023] Initialize the counter to 0 and record the number of USB devices requesting data transfer at the same time;
[0024] In the signal transmission risk state, the BMC chip monitors the D+ and D- signal lines in real time;
[0025] Each time a request signal is detected on the D+ or D- signal line, the counter is incremented by 1;
[0026] If no new request signal is detected within 100 milliseconds, the counter remains unchanged;
[0027] When the counter value reaches or exceeds 3, it is determined to be in the multiple USB device request quantity state.
[0028] The present invention can monitor the number of USB devices requesting data transmission simultaneously in real time by starting the I / O controller of the BMC chip and initializing the counter to 0. In the signal transmission risk state, the BMC chip monitors the D+ and D- signal lines in real time, and each time a request signal on the D+ or D- signal line is detected, the counter increases by 1. If no new request signal is detected within 100 milliseconds, the counter remains unchanged. When the value of the counter reaches or exceeds 3, it is determined to be in a state of multiple USB device requests; this monitoring and judgment mechanism can effectively identify the situation where multiple USB devices request data transmission simultaneously, and provide accurate data support for subsequent resource allocation and task scheduling; through precise monitoring and counting, high-concurrency request scenarios can be identified in a timely manner, thereby optimizing resource allocation strategies, improving data transmission efficiency and the overall performance of the system.
[0029] Preferably, the concurrent processing mechanism in step S2 is specifically as follows:
[0030] The BMC chip's I / O controller monitors the USB interface's D+ and D- signal lines in real time, identifies each USB device's data transfer request, and adds a reception timestamp.
[0031] Dividing data transmission requests into data read request types and data write request types, and determining high priority and low priority to obtain a data transmission request mode;
[0032] The data transmission request pattern is grouped according to the receiving timestamp, and a fixed time slice is allocated to each request group. The time slice length is 10 milliseconds to obtain a data transmission request group;
[0033] In each time slice, the BMC chip processes the request tasks in the data transmission request group in turn, records the processing results and processing time, and transmits the processing results and processing time to the USB device;
[0034] If the requested task is not processed within the allocated time slice, the BMC chip records the timeout status of the requested task and reschedules the requested task in the next time slice.
[0035] The present invention uses the I / O controller of the BMC chip to monitor the D+ and D- signal lines of the USB interface in real time and adds a reception timestamp to each data transfer request initiated by the USB device. This accurately records the request initiation time and provides an accurate time reference for subsequent task scheduling. Data transfer requests are divided into data read request type and data write request type, and high priority and low priority are determined to form data transfer request patterns. This enables the BMC chip to perform differentiated processing based on the urgency and data type of the request. Data transfer request patterns are grouped according to the reception timestamp, and a fixed time slice (10 milliseconds) is allocated to each request group. This ensures that requests are processed in sequence and prevents high-priority tasks from being excessively delayed by low-priority tasks. Within each time slice, the request tasks are processed sequentially, and the processing results and time are recorded. The results are then fed back to the USB device. This helps to promptly identify and resolve problems during the processing process and ensures that the device can obtain the processing status in real time. If the request task is not completed within the allocated time slice, the timeout status is recorded and the task is rescheduled for processing in the next time slice. This mechanism effectively prevents permanent task failure due to temporary resource shortages, improving the system's fault tolerance and task completion rate.
[0036] Preferably, in step S2, when it is detected that multiple USB devices initiate data transmission requests simultaneously, starting the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip includes:
[0037] When multiple USB devices are detected to initiate data transmission requests at the same time, the concurrent processing mechanism is started;
[0038] The requests are grouped into high and low priority groups according to the data transmission request mode, and BMC chip CPU resource allocation is performed. The high-priority request group is allocated 70% of the BMC chip CPU time, and the low-priority request group is allocated 30% of the BMC chip CPU time.
[0039] The requests are grouped according to the data read request type and the data write request type of the data transmission request mode to allocate BMC chip memory space; among them, the data write request group is allocated 2-5MB of memory space, and the data read request group is allocated 1-2MB of memory space;
[0040] The requests are grouped according to the data read request type and data write request type of the data transmission request mode for BMC chip I / O bandwidth allocation; among them, the data write request group is allocated 10-20MB / s of I / O bandwidth, and the data read request group is allocated 5-10MB / s of I / O bandwidth.
[0041] In scenarios where multiple USB devices simultaneously initiate data transfer requests, the present invention activates a concurrent processing mechanism to effectively manage multiple requests, avoiding resource conflicts and data transfer delays. Resources are allocated based on the priority of the data transfer request mode, with the high-priority request group allocated 70% of the BMC chip CPU time and the low-priority request group allocated 30%. This allocation method ensures that critical tasks receive sufficient computing resources, thereby improving the system's response speed and data processing efficiency. Memory space is also allocated based on the data read and write types of the data transfer request mode, with the data write request group allocated 2-5MB of memory space and the data read request group allocated 1-2MB of memory space. This allocation strategy can meet the storage requirements of different types of tasks and avoid data transfer interruptions caused by insufficient memory. Furthermore, I / O bandwidth is allocated based on the data read and write types of the data transfer request mode, with the data write request group allocated 10-20MB / s of I / O bandwidth and the data read request group allocated 5-10MB / s of I / O bandwidth. This allocation method optimizes data transfer rates and ensures that data can be efficiently transferred from the USB device to the target location.
[0042] Preferably, in step S2, the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling strategy, including:
[0043] Perform USB device identifier detection on the data transfer request mode and determine the data transfer tasks of different devices based on the USB device identifier;
[0044] Predict the time required for data transmission tasks of different devices to obtain the predicted time required for the tasks;
[0045] The data transmission tasks of different devices are scheduled in time-sharing mode according to the predicted time required for the task, and the execution status of the data transmission tasks of different devices is monitored in real time. If the data transmission task is not completed within the time-sharing scheduling time, the device task timeout status is recorded;
[0046] The data transmission tasks of different devices are scheduled based on the device task timeout status, increasing the CPU time to 1.5 times the original allocation and the I / O bandwidth to 1.5 times the original allocation, which is finally stored as the USB multi-device transmission scheduling strategy.
[0047] The present invention detects USB device identifiers in data transmission request patterns and can accurately identify data transmission tasks of different USB devices based on device identifiers (such as vendor ID, product ID, device class code, etc.). Based on this, the time required for data transmission tasks of different devices is predicted to obtain the predicted time required for the tasks. Time-sharing scheduling is performed on the data transmission tasks of different devices based on the predicted time required for the tasks, which can reasonably arrange the order of task execution and optimize resource utilization efficiency. Simultaneously, the execution status of data transmission tasks of different devices is monitored in real time. If a task is not completed within the time-sharing scheduling time, the device task timeout status is recorded. Based on the device task timeout status, data transmission tasks of different devices are scheduled for transmission, increasing the CPU time to 1.5 times the original allocation and the I / O bandwidth to 1.5 times the original allocation. Finally, these scheduling strategies are stored as a USB multi-device transmission scheduling strategy, which can effectively deal with task timeouts and ensure the efficiency and stability of data transmission.
[0048] Preferably, in step S3, if the BMC chip continuously detects the signal transmission risk state within a preset time, the process includes:
[0049] The BMC chip continuously monitors the duration of the signal transmission risk state. If the duration exceeds 500 milliseconds, the risk handling mechanism is triggered;
[0050] When the risk handling mechanism is triggered, the BMC chip monitors CPU usage, memory usage, and I / O bandwidth usage in real time to identify abnormal resource usage.
[0051] The abnormal resource usage is evaluated for abnormality, and control instructions are matched according to the abnormality to obtain transmission risk control instructions.
[0052] In the data transmission scenario of multiple USB devices, the present invention can trigger the risk handling mechanism in a timely manner when the risk state lasts for more than 500 milliseconds by continuously monitoring the duration of the signal transmission risk state. Under the risk handling mechanism, the BMC chip monitors the CPU usage rate, memory occupancy rate and I / O bandwidth usage in real time, so as to accurately grasp the current resource usage status. By evaluating the abnormality level of abnormal resource usage and pairing control instructions according to the abnormality level, and generating transmission risk control instructions, dynamic adjustment and optimal allocation of resources can be achieved. This mechanism can effectively deal with signal transmission risks and ensure that in complex data transmission environments, the BMC chip can efficiently and stably handle USB data transmission tasks.
[0053] Preferably, performing transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction in step S3 includes:
[0054] Redistribute the resources required for transmission tasks on the USB signal transmission path according to the transmission risk control instructions. The balanced allocation of required resources includes reducing the CPU time of the high-priority task group by 10% and reducing the I / O bandwidth by 10%; and increasing the CPU time of the low-priority task group by 10% and increasing the I / O bandwidth by 10%.
[0055] According to the transmission risk control instructions, the resources required for transmission tasks on the USB signal transmission path are balanced. If the CPU usage of the high-priority task group exceeds 80%, its CPU time is reduced by 10% and the reduced CPU time is allocated to the low-priority task group.
[0056] The present invention performs resource redistribution and load balancing operations on USB signal transmission paths based on transmission risk control instructions, effectively optimizing resource utilization efficiency in multi-USB device data transmission scenarios. Specifically, by reducing the CPU time of the high-priority task group by 10% and reducing the I / O bandwidth by 10%, while increasing the CPU time of the low-priority task group by 10% and increasing the I / O bandwidth by 10%, balanced resource allocation can be achieved. In addition, when the CPU utilization rate of the high-priority task group exceeds 80%, its CPU time is further reduced by 10%, and the reduced CPU time is allocated to the low-priority task group. This dynamic adjustment mechanism can effectively alleviate resource bottlenecks and ensure stable operation of the system under high load conditions. These measures work together to improve the efficiency and reliability of USB data transmission, while optimizing the use of system resources, making data transmission of multiple USB devices more efficient and stable.
[0057] This specification also provides a USB data transmission system based on a BMC chip, which is used to execute the above-mentioned USB data transmission method based on a BMC chip. The USB data transmission system based on a BMC chip includes:
[0058] The USB signal transmission monitoring module is used to monitor the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detect the signal transmission duration of the signal transmission path information, and determine that the signal transmission risk state is reached when the signal transmission duration exceeds a preset transmission duration threshold;
[0059] The transmission scheduling strategy module is used to detect the number of simultaneous USB device requests through the BMC chip when signal transmission risks are present. When multiple USB devices are detected initiating data transmission requests simultaneously, the module activates the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip. The module also schedules the data transmission tasks of different devices in a time-sharing manner and stores the data as a USB multi-device transmission scheduling strategy.
[0060] The transmission risk control processing module is used to generate a transmission risk control instruction if the BMC chip continuously detects a signal transmission risk state within a preset time; perform transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction; and restore the BMC chip to the initial standby state when it detects that the USB device is disconnected and continues to be idle for a preset time;
[0061] The signal transmission optimization module is used to monitor the USB device connection status in real time. When the USB device is reconnected and the signal transmission duration is detected to match the signal transmission risk status, the BMC chip performs USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0062] The present invention monitors the signal transmission path in real time through the USB signal transmission monitoring module, and can promptly determine the signal transmission risk status when the signal transmission duration exceeds a preset threshold, thereby discovering potential transmission problems in advance. The transmission scheduling strategy module dynamically allocates resources and performs time-sharing scheduling for data transmission requests of multiple USB devices under risk conditions, optimizes resource utilization efficiency, and ensures the high efficiency of concurrent transmission of multiple devices. The transmission risk control processing module can generate control instructions and perform transmission balancing processing when the risk state is continuously detected, and restore the standby state in time after the device is disconnected, thereby improving the stability and adaptability of the system. The signal transmission optimization module dynamically adjusts the transmission strategy according to the real-time monitoring results to further optimize the signal transmission efficiency. Overall, the system effectively improves the reliability, efficiency and stability of USB data transmission through the synergistic effect of each module, and is suitable for complex and changeable USB device connection and data transmission scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The following is a flowchart of a USB data transmission method based on a BMC chip;
[0064] Figure 2 for Figure 1 A flowchart showing the detailed implementation steps for monitoring the USB signal transmission path on the motherboard where the BMC chip is located in step S1;
[0065] Figure 3 for Figure 1 Detailed implementation steps of the concurrent processing mechanism of step S2;
[0066] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0067] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.
[0068] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.
[0069] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.
[0070] To achieve this, please refer to Figures 1 to 3 , a USB data transmission method based on a BMC chip, the method comprising the following steps:
[0071] Step S1: monitoring the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detecting the signal transmission duration of the signal transmission path information, and determining that a signal transmission risk state exists when the signal transmission duration exceeds a preset transmission duration threshold;
[0072] Step S2: In the signal transmission risk state, the BMC chip detects the number of simultaneous USB device requests; when it is detected that multiple USB devices initiate data transmission requests simultaneously, the concurrent processing mechanism is activated to dynamically allocate the hardware resources of the BMC chip; and the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling policy;
[0073] Step S3: If the BMC chip continuously detects a signal transmission risk state within a preset time, a transmission risk control instruction is generated; transmission balancing is performed on the USB signal transmission path according to the transmission risk control instruction; when the USB device is detected to be disconnected and continues to be idle for a preset time, the BMC chip returns to the initial standby state;
[0074] Step S4: monitor the USB device connection status in real time. When the USB device is reconnected and it is detected that the signal transmission duration matches the signal transmission risk status, the BMC chip executes USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0075] By monitoring the signal transmission duration of a USB signal transmission path, the present invention can promptly determine the signal transmission risk state when the signal transmission duration exceeds a preset threshold, identifying potential transmission issues and avoiding data loss or errors caused by signal transmission delays. In the signal transmission risk state, the present invention dynamically allocates the hardware resources of the BMC chip by detecting the number of simultaneous USB device requests and initiating a concurrent processing mechanism, effectively addressing situations where multiple devices simultaneously initiate data transmission requests. This method optimizes resource allocation and improves data transmission efficiency by scheduling data transmission tasks for different devices in a time-sharing manner. When the BMC chip continuously detects the signal transmission risk state for a preset period of time, it generates a transmission risk control instruction and performs transmission balancing on the USB signal transmission path, effectively adjusting the parameters of the signal transmission path, optimizing signal integrity, and reducing interference and noise during signal transmission. Furthermore, when a USB device is detected to be disconnected for a preset idle time, the BMC chip returns to its initial standby state, effectively conserving system resources and improving system stability and reliability. The present invention monitors the USB device connection status in real time and, when a USB device is reconnected and the signal transmission duration matches the signal transmission risk state, executes USB signal transmission optimization measures based on the USB multi-device transmission scheduling strategy. This method dynamically adjusts transmission strategies based on real-time monitoring data, ensuring efficient data transmission regardless of device connection and transmission status. Therefore, by monitoring signal transmission paths in real time, dynamically allocating resources, balancing transmissions, and optimizing scheduling strategies, the present invention addresses transmission stability issues under concurrent and risky conditions for multiple devices, significantly improving USB data transmission efficiency.
[0076] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a flow chart of a USB data transmission method based on a BMC chip according to the present invention. In this example, the USB data transmission method based on a BMC chip includes the following steps:
[0077] Step S1: monitoring the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detecting the signal transmission duration of the signal transmission path information, and determining that a signal transmission risk state exists when the signal transmission duration exceeds a preset transmission duration threshold;
[0078] In an embodiment of the present invention, the USB signal monitoring module of the BMC chip monitors the USB signal transmission path on the motherboard via the USB PHY interface within the USB bus architecture. As a key component for signal conversion, the USB PHY interface is responsible for converting digital and analog signals. The monitoring module samples USB signals in real time at a sampling frequency of 100 MHz, recording the signal transmission duration from the transmitter to the receiver. The monitoring module connects to the cache module via the UTMI interface of the USB hub. The buffer within the cache module caches USB data packets and converts the signal format. The cache module adds an identification header to each USB data packet. For example, the first USB data packet from device 1 adds identification header A1, the second USB data packet from device 1 adds identification header A2, and so on. After signal transmission is complete, the monitoring module removes the header and, based on the corresponding identification, transfers the data to the corresponding UTMI data path. The preset signal transmission duration threshold is 500 nanoseconds, calculated based on the standard transmission rate of the USB 2.0 protocol and the physical length of the signal transmission path on the motherboard. When the monitoring module is recording the signal transmission duration, if it detects that the signal transmission duration exceeds 500 nanoseconds, it marks the state as a signal transmission risk state and stores the relevant information in the non-volatile memory of the BMC chip.
[0079] Step S2: In the signal transmission risk state, the BMC chip detects the number of simultaneous USB device requests; when it is detected that multiple USB devices initiate data transmission requests simultaneously, the concurrent processing mechanism is activated to dynamically allocate the hardware resources of the BMC chip; and the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling policy;
[0080] In an embodiment of the present invention, when signal transmission risk is present, the USB controller of the BMC chip monitors the request status of USB devices through its built-in request detection module. The USB controller communicates with USB devices via a USB bus, which includes multiple USB interfaces and supports both USB 2.0 and USB 3.0 devices. When multiple USB devices are detected initiating data transfer requests simultaneously, the BMC chip's resource management module initiates a concurrent processing mechanism. This concurrent processing mechanism is implemented by dynamically allocating the BMC chip's hardware resources. The resource management module allocates DMA (Direct Memory Access) channels and FIFO (First-In-First-Out) buffer resources based on the USB device's request priority and data transfer volume. High-priority USB devices are allocated more DMA channels and larger FIFO buffers. Simultaneously, the resource management module uses its internal scheduling unit to time-share data transfer tasks for different devices. Time-share scheduling specifically allocates data transfer tasks for each USB device to different time slices, each lasting 1 millisecond. The number of time slices allocated to each device is dynamically adjusted based on the device's request type and data volume. For example, storage devices with large data volumes are allocated more time slices, while control instruction devices are allocated fewer time slices. After completing the time-sharing scheduling, the BMC chip stores the scheduling policy as a USB multi-device transmission scheduling policy, which is stored in the non-volatile memory of the BMC chip.
[0081] Step S3: If the BMC chip continuously detects a signal transmission risk state within a preset time, a transmission risk control instruction is generated; transmission balancing is performed on the USB signal transmission path according to the transmission risk control instruction; when the USB device is detected to be disconnected and continues to be idle for a preset time, the BMC chip returns to the initial standby state;
[0082] In an embodiment of the present invention, in step S3, the BMC chip continuously monitors the status of the USB signal transmission path through its built-in signal monitoring module. When the BMC chip continuously detects a signal transmission risk state within a preset time threshold (e.g., 10 seconds), the signal monitoring module triggers the generation of a transmission risk control instruction. The transmission risk control instruction is received by the BMC chip's signal processing module and passed to the balancing processing unit of the USB signal transmission path. This unit performs transmission balancing on the USB signal transmission path based on the control instruction. Specific operations include adjusting USB PHY (physical layer) parameters, such as by changing the drive strength and receiving sensitivity of the differential signal, to optimize signal integrity. Simultaneously, data packets on the USB bus are rescheduled and adjusted to ensure the stability and reliability of data transmission. During the balancing process, the BMC chip continuously monitors the connection status of the USB device through the USB controller. When the USB device is detected to be disconnected and the disconnection state persists for a preset idle time (e.g., 30 seconds), the USB controller triggers the BMC chip to enter a recovery process. Upon receiving the recovery instruction, the BMC chip's system management module restores the BMC chip's hardware resources and status parameters to the initial standby state. This includes closing the DMA channels and FIFO buffers associated with the USB device, releasing the hardware resources allocated to USB transfer tasks, and putting the BMC chip's USB controller into low-power mode.
[0083] Step S4: monitor the USB device connection status in real time. When the USB device is reconnected and it is detected that the signal transmission duration matches the signal transmission risk status, the BMC chip executes USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0084] In an embodiment of the present invention, the USB controller of the BMC chip communicates with a USB device via a USB bus. The USB bus includes multiple USB interfaces and supports USB 2.0 and USB 3.0 devices. The USB controller uses a control endpoint (endpoint 0) to receive control requests from the host, such as obtaining device descriptors and configuring the hub's port status. Simultaneously, the USB controller receives port status changes reported by the hub, such as device insertion or removal, via an interrupt endpoint. When a USB device is detected to be reconnected, the USB controller initializes the connected device via the control endpoint and obtains device descriptor information to identify the device type (USB 2.0 or USB 3.0). After the USB device is reconnected, the signal monitoring module of the BMC chip detects the signal transmission duration. The signal monitoring module obtains signal transmission duration data through the USB controller's PHY layer and compares it with a preset signal transmission risk threshold (e.g., 500 nanoseconds). If the signal transmission duration is detected to exceed the threshold, it indicates that the signal transmission risk status matches the current transmission situation. After confirming that the signal transmission risk status matches, the BMC chip implements optimization measures based on a pre-stored USB multi-device transmission scheduling policy. The specific operation is as follows: For USB3.0 devices, the USB controller parses the USB data and restores it to byte data, and sends multiple bytes of data to the PCIE module. The PCIE module is connected to the USB controller via the AXI or AHB bus, converts the byte data into PCIE data, and sends it to the south bridge chip via the PCIE PHY. For USB2.0 devices, the USB controller directly forwards the USB data to the south bridge chip via the USB PHY. At the same time, the resource management module of the BMC chip dynamically allocates DMA channel and FIFO buffer resources according to the USB multi-device transmission scheduling strategy, and performs time-sharing scheduling for data transmission tasks of different devices. The number of time slices allocated to each device is dynamically adjusted according to the device's request type and data volume to ensure efficient and real-time data transmission.
[0085] As an example of the present invention, refer to Figure 2 As shown, in this example, step S1 of monitoring the USB signal transmission path of the motherboard where the BMC chip is located includes:
[0086] S11: Identify the USB interface type identifier on the motherboard through the built-in I / O controller of the BMC chip;
[0087] S12: Determine a USB signal transmission path according to the USB interface type identifier;
[0088] S13: Real-time monitoring of the USB signal transmission path. During the monitoring process, the signal transmission path is segmented and detected through the D+ and D- signal lines of the USB interface, and the level parameters of each transmission path are monitored respectively.
[0089] S14: If the level parameter of any one of the D+ or D- signal lines is non-zero, the USB interface is determined to be in the interface connected state, and the level parameter change time of the USB interface is recorded to obtain signal transmission path information.
[0090] In an embodiment of the present invention, the I / O controller of the BMC chip is connected to the USB interface on the motherboard via the USB bus. When a USB device is connected, the I / O controller receives the device's connection request via the USB bus's control endpoint (endpoint 0). The I / O controller initiates the enumeration process, sending a standard USB request (such as GET_DESCRIPTOR) to obtain the device descriptor. The device descriptor contains information such as the vendor ID (VID), product ID (PID), device class code (Class Code), subclass code (Subclass Code), and protocol code (Protocol Code). The I / O controller parses this information to identify the USB device type and interface standard. Based on the identified USB interface type identifier, the BMC chip's signal processing module determines the USB signal transmission path. For USB 2.0 devices, the signal transmission path primarily transmits data via the two differential signal lines D+ and D-. For USB 3.0 devices, in addition to the D+ and D- signal lines, additional high-speed data channels (such as TX1 and RX1) are also included. The signal processing module configures the corresponding PHY layer parameters, including signal drive strength and receive sensitivity, based on the device type and interface standard to accommodate different USB device versions. The signal monitoring module of the BMC chip monitors the USB signal transmission path in real time. The monitoring module detects the signal transmission path in segments through the D+ and D- signal lines of the USB interface. The specific operation is to monitor the level parameters of each transmission path separately by sampling the level status of the D+ and D- signal lines. The monitoring module samples the signal lines at a sampling frequency of 100MHz and records the level changes of each path. The monitoring module stores the level status of the D+ and D- signal lines as two independent sampling data streams. During the monitoring process, the signal monitoring module analyzes the level status of the D+ and D- signal lines in real time. If the level parameter of either the D+ or D- signal line is non-zero, the monitoring module determines that the USB interface is connected. The monitoring module records the time when the level parameters of the USB interface change and marks the changes in the signal transmission path with a timestamp. Specifically, the monitoring module records the start time, duration, and range of change of the level value.
[0091] Preferably, in step S1, detecting the signal transmission duration of the signal transmission path information, and determining that the signal transmission risk state is in a condition where the signal transmission duration exceeds a preset transmission duration threshold, includes:
[0092] The timing component of the BMC chip is used to time the level change of the signal. When the level on the D+ or D- signal line is detected to change from a non-zero state, the timing unit is started;
[0093] Identify the level waveform on the D+ or D- signal line. When the level waveform does not show overshoot jitter and the level on the D+ or D- signal line maintains constant parameters, stop the timing component and record the signal transmission duration.
[0094] When the signal transmission duration exceeds a preset transmission duration threshold, it is determined to be a signal transmission risk state.
[0095] In an embodiment of the present invention, the signal monitoring module of the BMC chip monitors the level status of the D+ and D- signal lines of the USB interface in real time. The monitoring module samples the D+ and D- signal lines at a sampling frequency of 100MHz using a high-precision sampling circuit. When the signal monitoring module detects that the level on the D+ or D- signal line begins to change from a non-zero state, the signal monitoring module triggers the timing component of the BMC chip to start. The timing component uses a high-precision clock (e.g., 100MHz) as a reference and begins to time the duration of the signal level change. During the timing process, the signal monitoring module performs real-time analysis of the level waveform on the D+ or D- signal line. The monitoring module processes the sampled data using digital filtering technology to identify whether the level waveform has overshoot or jitter. The specific operation includes analog filtering of the signal (e.g., low-pass filtering below 30ns) to remove high-frequency noise. Subsequently, the filtered signal is subjected to DC offset removal to eliminate the DC offset. After that, the signal undergoes a first-level digital filtering to filter out glitches in the range of 100ns to 1000ns. The signal monitoring module further analyzes the signal after the first stage of digital filtering to determine whether the level remains constant. By setting a preset middle position (for example, the middle position of the bit calculated based on the maximum baud rate of 330Kbps), the monitoring module detects whether the level is stable at this position. If the level remains constant at the preset middle position and no overshoot or jitter occurs, the monitoring module stops the timing operation of the timing component. The timing result recorded by the timing component is the signal transmission duration. The signal monitoring module compares the recorded signal transmission duration with the preset transmission duration threshold (for example, 500 nanoseconds). If the signal transmission duration exceeds the preset threshold, the signal monitoring module determines that the current signal transmission is in a risky state. The determination result is stored in the non-volatile memory of the BMC chip.
[0096] Of particular importance is that identifying the level waveform on the D+ or D- signal line, stopping the timing component when the level waveform does not exhibit overshoot jitter and the level on the D+ or D- signal line maintains constant parameters, and recording the signal transmission duration includes:
[0097] When it is detected that the level on the D+ or D- signal line starts to change from a non-zero state, the initial level value is recorded and the timing unit is started to start timing;
[0098] During the timing process, the level value is analyzed point by point and the level change rate is calculated;
[0099] When the level change rate exceeds 0.2V per microsecond, it is a level waveform overshoot;
[0100] When the level change rate exceeds 0.05V within 10 microseconds, it is level waveform jitter;
[0101] Take 10 consecutive samples with an interval of 1 microsecond each. If there is no overshoot or jitter at any level value in the 10 samples and the level difference does not exceed 0.05V, it is judged as a stable level waveform.
[0102] When the level waveform stabilizes, stop the timing component and record the signal transmission time.
[0103] In an embodiment of the present invention, the signal monitoring module of the BMC chip monitors the level status of the D+ and D- signal lines of the USB interface in real time at a sampling frequency of 100MHz. When the level on the D+ or D- signal line is detected to change from a non-zero state, the signal monitoring module records the initial level value and triggers the timing component to start timing. At this time, the timing component uses a high-precision clock (e.g., 100MHz) as a reference to time the duration of the signal level change. During the timing process, the signal monitoring module analyzes the level value of the D+ or D- signal line point by point. Each sampling interval is 1 microsecond, and 10 samples are taken continuously. For each sampling, the monitoring module calculates the level change rate, that is, the level difference between two adjacent sampling points divided by the sampling interval (1 microsecond). If the level change rate exceeds 0.2V per microsecond, it is determined to be a level waveform overshoot. At the same time, the monitoring module analyzes the level values of the 10 samples to determine whether there is jitter. If the level change exceeds 0.05V within 10 microseconds (10 samples), it is determined to be a level waveform jitter. Specifically, the monitoring module will check the level values of the 10 samples to ensure that the level difference between any two samples does not exceed 0.05V. If there is no overshoot or jitter in any of the 10 level values, and the level difference does not exceed 0.05V, the monitoring module will judge it as a stable level waveform. At this time, the monitoring module stops the timing operation of the timing component and records the signal transmission duration. The timing result recorded by the timing component is the signal transmission duration. The signal monitoring module compares the recorded signal transmission duration with the preset transmission duration threshold (for example, 500 nanoseconds). If the signal transmission duration exceeds the preset threshold, it is determined to be a signal transmission risk state.
[0104] Preferably, in step S2, in the signal transmission risk state, detecting the simultaneous request quantity of the USB device through the BMC chip includes:
[0105] Start the I / O controller of the BMC chip;
[0106] Initialize the counter to 0 and record the number of USB devices requesting data transfer at the same time;
[0107] In the signal transmission risk state, the BMC chip monitors the D+ and D- signal lines in real time;
[0108] Each time a request signal is detected on the D+ or D- signal line, the counter is incremented by 1;
[0109] If no new request signal is detected within 100 milliseconds, the counter remains unchanged;
[0110] When the counter value reaches or exceeds 3, it is determined to be in the multiple USB device request quantity state.
[0111] In this embodiment of the present invention, the I / O controller of the BMC chip is activated to manage the input and output operations of the USB interface. The I / O controller is connected to the USB interface on the motherboard via the USB bus and is responsible for monitoring and processing USB device signals. In the signal monitoring module, a counter is initialized to 0. This counter is used to record the number of USB devices simultaneously requesting data transfer. In a signal transmission risk state, the BMC chip's signal monitoring module monitors the D+ and D- signal lines of the USB interface in real time at a sampling frequency of 100 MHz. The monitoring module uses a high-precision sampling circuit to perform point-by-point detection of level changes on the signal lines. Each time a request signal is detected on the D+ or D- signal line, the signal monitoring module identifies the signal transition (from low to high or vice versa) and determines it as a data transfer request initiated by a USB device. At this point, the counter is incremented by 1. If no new request signal is detected within a 100-millisecond time window, the counter value remains unchanged. The signal monitoring module uses an internal timer to count the 100-millisecond time window to ensure continuous signal monitoring within that time period. When the counter value reaches or exceeds 3, the signal monitoring module determines that the current state is a multiple USB device request state. This status indicates that during the monitoring period, three or more USB devices initiated data transfer requests simultaneously.
[0112] As an example of the present invention, refer to Figure 3 As shown, the concurrent processing mechanism in step S2 in this example is specifically as follows:
[0113] S21: The I / O controller of the BMC chip monitors the D+ and D- signal lines of the USB interface in real time, identifies the data transmission request initiated by each USB device, and adds a receiving timestamp;
[0114] S22: Divide the data transmission request into a data read request type and a data write request type, and determine a high priority and a low priority to obtain a data transmission request mode;
[0115] S23: Group the data transmission request patterns according to the reception timestamps, and assign a fixed time slice of 10 milliseconds to each request group to obtain a data transmission request group;
[0116] S24: In each time slice, the BMC chip processes the request tasks in the data transmission request group in sequence, records the processing results and processing time, and transmits the processing results and processing time to the USB device;
[0117] S25: If the request task is not processed within the allocated time slice, the BMC chip records the timeout status of the request task and reschedules the request task in the next time slice.
[0118] In this embodiment of the present invention, the I / O controller of the BMC chip activates and monitors the D+ and D- signal lines of the USB interface in real time. The I / O controller communicates with the USB device via the USB bus. The monitoring module performs point-by-point monitoring of the D+ and D- signal lines at a sampling frequency of 100 MHz. Each time a signal transition is detected, it identifies it as a data transfer request initiated by a USB device and records the receipt timestamp of the request. For each detected data transfer request, the I / O controller classifies it into either a data read request or a data write request based on its characteristics. Furthermore, a high or low priority level is determined based on the request type and the device's transmission requirements. For example, control instructions requiring a fast response are assigned a high priority level, while storage device write operations with large data volumes are assigned a low priority level. In this way, a data transfer request pattern is determined for each request. The BMC chip's signal monitoring module groups the data transfer request patterns according to the receipt timestamps. Each request group contains requests received within the same time window. Each request group is assigned a fixed time slice, set to 10 milliseconds. Within each time slice, the BMC chip sequentially processes the requests in that request group. Within each time slice, the BMC chip's processing module sequentially processes the request tasks in the data transfer request group. For each request task, the processing module records the processing result and processing time and transmits the processing result and processing time to the corresponding USB device via the USB bus. If the request task is not completed within the allocated time slice, the processing module records the timeout status of the request task. For any timed-out request tasks, the BMC chip's scheduling module marks them as incomplete and reschedules them for processing in the next time slice. The scheduling module rearranges the processing order of incomplete tasks based on the request priority and timestamp, ensuring that high-priority tasks are processed first.
[0119] Preferably, in step S2, when it is detected that multiple USB devices initiate data transmission requests simultaneously, starting the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip includes:
[0120] When multiple USB devices are detected to initiate data transmission requests at the same time, the concurrent processing mechanism is started;
[0121] The requests are grouped into high and low priority groups according to the data transmission request mode, and BMC chip CPU resource allocation is performed. The high-priority request group is allocated 70% of the BMC chip CPU time, and the low-priority request group is allocated 30% of the BMC chip CPU time.
[0122] The requests are grouped according to the data read request type and the data write request type of the data transmission request mode to allocate BMC chip memory space; among them, the data write request group is allocated 2-5MB of memory space, and the data read request group is allocated 1-2MB of memory space;
[0123] The requests are grouped according to the data read request type and data write request type of the data transmission request mode for BMC chip I / O bandwidth allocation; among them, the data write request group is allocated 10-20MB / s of I / O bandwidth, and the data read request group is allocated 5-10MB / s of I / O bandwidth.
[0124] In an embodiment of the present invention, when the I / O controller of the BMC chip detects that multiple USB devices are simultaneously initiating data transfer requests, the I / O controller notifies the resource management module via an interrupt signal. Upon receiving the interrupt signal, the resource management module initiates a concurrent processing mechanism. At this point, the resource management module enters a resource allocation state, preparing to allocate CPU, memory, and I / O bandwidth. The resource management module allocates CPU resources via its internal CPU time allocation unit. Specifically, the resource management module reads the priority identifier of each request, which is determined by the control signal carried by the USB device when initiating the request. For requests marked as high priority, the CPU time allocation unit adds them to the high-priority request queue and allocates 70% of the CPU time slice to them. Specifically, this is done by setting the CPU time slice allocation register to allocate 70% of the time slice to the high-priority queue. For requests marked as low priority, the CPU time allocation unit adds them to the low-priority request queue and allocates 30% of the CPU time slice to them. This allocation is also accomplished by setting registers. The resource management module allocates memory space via its internal memory allocation unit. Specifically, for data write requests, the memory allocation unit estimates the required memory space based on the requested data volume. The memory allocation unit allocates 2-5MB of memory from the system memory pool through the memory management unit (MMU). This allocation is accomplished through the MMU's memory allocation registers, ensuring that the allocated memory space is contiguous and sufficient to store write data. For data read requests, the memory allocation unit also allocates 1-2MB of memory from the system memory pool through the MMU. After allocation, the memory allocation unit records the allocated memory address range in the request queue. The resource management module allocates I / O bandwidth through its internal I / O bandwidth allocation unit. Specifically, for data write requests, the I / O bandwidth allocation unit allocates 10-20MB / s of I / O bandwidth through the USB controller's bandwidth management unit. This allocation is accomplished by setting the USB controller's transfer rate parameters to ensure that data write requests can transmit data at a high rate. For data read requests, the I / O bandwidth allocation unit allocates 5-10MB / s of I / O bandwidth through the USB controller's bandwidth management unit. After allocation, the I / O bandwidth allocation unit records the allocated bandwidth parameters in the request queue.
[0125] Preferably, in step S2, the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling strategy, including:
[0126] Perform USB device identifier detection on the data transfer request mode and determine the data transfer tasks of different devices based on the USB device identifier;
[0127] Predict the time required for data transmission tasks of different devices to obtain the predicted time required for the tasks;
[0128] The data transmission tasks of different devices are scheduled in time-sharing mode according to the predicted time required for the task, and the execution status of the data transmission tasks of different devices is monitored in real time. If the data transmission task is not completed within the time-sharing scheduling time, the device task timeout status is recorded;
[0129] The data transmission tasks of different devices are scheduled based on the device task timeout status, increasing the CPU time to 1.5 times the original allocation and the I / O bandwidth to 1.5 times the original allocation, which is finally stored as the USB multi-device transmission scheduling strategy.
[0130] In an embodiment of the present invention, upon detecting a data transfer request initiated by a USB device, the I / O controller of the BMC chip obtains the device's identifier information via the USB bus. USB device identifiers include information such as the vendor ID (VID), product ID (PID), device class code (Class Code), subclass code (Subclass Code), and protocol code (Protocol Code). These identifiers are obtained through device descriptors, which are basic information returned by USB devices to the host during enumeration. The BMC chip's I / O controller obtains the device descriptors by sending standard USB requests (such as GET_DESCRIPTOR) and parses the identifier information therein. Based on the parsed USB device identifiers, the BMC chip's resource management module determines the data transfer task type for each device. For example, a device class code of 0x08 indicates a storage device, whose data transfer tasks involve large amounts of data read and write operations. For each device, the resource management module records the transfer task type (e.g., data read or data write) and priority. Based on the device's data transfer task type and historical data transfer rate, the resource management module predicts the completion time required for each task. For data writing tasks, the required time is calculated based on the amount of data to be written and the estimated write rate (e.g., 10 MB / s). For data reading tasks, the required time is calculated based on the amount of data to be read and the estimated read rate (e.g., 5 MB / s). The estimated time required for each task is stored in the task queue. The scheduling module schedules data transmission tasks for different devices based on the estimated time required. The scheduling module assigns tasks to different time slices, each of which is 10 milliseconds long. Within each time slice, the scheduling module processes tasks in the task queue in sequence and monitors their execution in real time. If a task does not complete within the allocated time slice, the scheduling module records the task as having timed out. For tasks recorded as having timed out, the scheduling module adjusts their resource allocation. Specifically, the CPU time allocated is increased to 1.5 times the original allocation. For example, if the CPU time originally allocated to a high-priority task is 70%, it is adjusted to 105%. The I / O bandwidth allocation is also increased to 1.5 times the original allocation. For example, if the I / O bandwidth originally allocated for a data write task is 20MB / s, it is adjusted to 30MB / s. The adjusted task is re-added to the task queue and rescheduled for processing in the next time slice. The scheduling module stores the adjusted task scheduling policy in the non-volatile memory of the BMC chip, forming the USB multi-device transfer scheduling policy. This policy includes information such as each task's priority, allocated CPU time, memory space, and I / O bandwidth.
[0131] Preferably, in step S3, if the BMC chip continuously detects the signal transmission risk state within a preset time, the process includes:
[0132] The BMC chip continuously monitors the duration of the signal transmission risk state. If the duration exceeds 500 milliseconds, the risk handling mechanism is triggered;
[0133] When the risk handling mechanism is triggered, the BMC chip monitors CPU usage, memory usage, and I / O bandwidth usage in real time to identify abnormal resource usage.
[0134] The abnormal resource usage is evaluated for abnormality, and control instructions are matched according to the abnormality to obtain transmission risk control instructions.
[0135] In an embodiment of the present invention, the monitoring module of the BMC chip continuously monitors the duration of the signal transmission risk state using a built-in timer. Upon detecting a signal transmission risk state, the monitoring module starts the timer and records the duration of the risk state in milliseconds. When the duration exceeds a preset threshold (e.g., 500 milliseconds), the monitoring module triggers the risk handling mechanism. After the risk handling mechanism is triggered, the resource management module of the BMC chip monitors the CPU usage, memory utilization, and I / O bandwidth usage in real time. CPU usage monitoring: The resource management module obtains the current CPU usage in a 10-millisecond cycle by reading the usage information in the CPU status register. Memory utilization monitoring: The resource management module obtains the current memory utilization by accessing the status register of the memory management unit (MMU). I / O bandwidth utilization monitoring: The resource management module obtains the current I / O bandwidth utilization by reading the status registers of the USB controller and PCIE controller. Based on the monitored resource usage, the resource management module evaluates abnormal resource usage. The specific evaluation criteria are as follows: If the CPU utilization exceeds 80%, the memory utilization exceeds 90%, or the I / O bandwidth utilization exceeds 90%, the abnormality level is determined to be high. If the CPU usage is between 60% and 80%, the memory usage is between 70% and 90%, or the I / O bandwidth usage is between 70% and 90%, it is determined to be a medium abnormality level. If the CPU usage is less than 60%, the memory usage is less than 70%, or the I / O bandwidth usage is less than 70%, it is determined to be a low abnormality level. Based on the abnormality level assessment results, the resource management module generates corresponding control instructions: For a high abnormality level, the control instructions include increasing the CPU time allocation to 1.5 times the original allocation and the I / O bandwidth to 1.5 times the original allocation. For a medium abnormality level, the control instructions include increasing the CPU time allocation to 1.2 times the original allocation and the I / O bandwidth to 1.2 times the original allocation. For a low abnormality level, the control instructions include maintaining the current resource allocation unchanged.
[0136] Preferably, performing transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction in step S3 includes:
[0137] Redistribute the resources required for transmission tasks on the USB signal transmission path according to the transmission risk control instructions. The balanced allocation of required resources includes reducing the CPU time of the high-priority task group by 10% and reducing the I / O bandwidth by 10%; and increasing the CPU time of the low-priority task group by 10% and increasing the I / O bandwidth by 10%.
[0138] According to the transmission risk control instructions, the resources required for transmission tasks on the USB signal transmission path are balanced. If the CPU usage of the high-priority task group exceeds 80%, its CPU time is reduced by 10% and the reduced CPU time is allocated to the low-priority task group.
[0139] In an embodiment of the present invention, after receiving the transmission risk control instruction, the resource management module of the BMC chip initiates the resource reallocation process. Specifically, for the high-priority task group, the resource management module reduces its allocated CPU time by 10% through the CPU time allocation unit. For example, if the high-priority task group's original allocated CPU time was 70%, it is allocated 63% after adjustment. Simultaneously, the resource management module reduces the high-priority task group's I / O bandwidth by 10% through the I / O bandwidth allocation unit. For example, if the original allocated I / O bandwidth was 20 MB / s, it is adjusted to 18 MB / s. For the low-priority task group, the resource management module increases its allocated CPU time by 10% through the CPU time allocation unit. For example, if the low-priority task group's original allocated CPU time was 30%, it is adjusted to 33%. Simultaneously, the resource management module increases the low-priority task group's I / O bandwidth by 10% through the I / O bandwidth allocation unit. For example, if the original allocated I / O bandwidth was 10 MB / s, it is adjusted to 11 MB / s. The resource management module monitors the CPU usage of the high-priority task group in real time. The specific operation is as follows: If the CPU utilization of the high-priority task group exceeds 80%, the resource management module further reduces its CPU time by 10% through the CPU time allocation unit. For example, if the current CPU utilization is 85% and the original allocated CPU time is 63%, it is reduced again to 56.7%. The reduced CPU time is then reallocated to the low-priority task group. For example, if the low-priority task group's original allocated CPU time is 33%, it is increased to 40%.
[0140] It is particularly important that step S4 includes the following steps:
[0141] Step S41: The BMC chip samples the voltage and current of the USB interface. If the voltage fluctuation is less than 0.1V and the current fluctuation is less than 0.05A for three consecutive sampling results, it is determined that the USB device is stably connected.
[0142] Step S42: When the USB device is detected to be reconnected and signal transmission begins, the BMC chip records the start time of the signal transmission and the initial signal strength. During the signal transmission process, the signal strength is sampled every 10 milliseconds and the difference between the two adjacent sampled signal strengths is calculated.
[0143] Step S43: If the difference in signal strength is greater than 10% of the initial signal strength in three consecutive samplings, and the detected signal transmission duration matches the signal transmission risk state, it is determined that the signal transmission is in an unstable state;
[0144] Step S44: the BMC chip executes USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0145] In this embodiment of the present invention, the BMC chip uses its monitoring module to sample the voltage and current of the USB interface. The monitoring module uses built-in voltage and current sensors to monitor the voltage and current of the USB interface in real time with a sampling period of 10 milliseconds. If three consecutive sampling results show a voltage fluctuation of less than 0.1V and a current fluctuation of less than 0.05A, the monitoring module determines that the USB device is stably connected. When the USB device is detected to be reconnected and signal transmission begins, the BMC chip's monitoring module records the start time of the signal transmission. Simultaneously, the monitoring module samples the signal strength via the D+ and D- signal lines of the USB interface and records the initial signal strength. During signal transmission, the monitoring module samples the signal strength every 10 milliseconds and calculates the difference between the signal strengths of two consecutive samplings. The monitoring module analyzes this signal strength difference. If the signal strength difference is greater than 10% of the initial signal strength in three consecutive samplings, and the signal transmission duration matches the signal transmission risk status, the monitoring module determines that the signal transmission is unstable. When the monitoring module determines that signal transmission is unstable, the BMC chip's resource management module implements USB signal transmission optimization measures based on the pre-stored USB multi-device transmission scheduling policy. These optimizations include adjusting the CPU time and I / O bandwidth allocation for high- and low-priority task groups. For the high-priority task group, the CPU time allocated to it is reduced by 10% and allocated to the low-priority task group. Furthermore, the I / O bandwidth of the high-priority task group is reduced by 10% and increased by 10% for the low-priority task group.
[0146] This specification also provides a USB data transmission system based on a BMC chip, which is used to execute the above-mentioned USB data transmission method based on a BMC chip. The USB data transmission system based on a BMC chip includes:
[0147] The USB signal transmission monitoring module is used to monitor the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detect the signal transmission duration of the signal transmission path information, and determine that the signal transmission risk state is reached when the signal transmission duration exceeds a preset transmission duration threshold;
[0148] The transmission scheduling strategy module is used to detect the number of simultaneous USB device requests through the BMC chip when signal transmission risks are present. When multiple USB devices are detected initiating data transmission requests simultaneously, the module activates the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip. The module also schedules the data transmission tasks of different devices in a time-sharing manner and stores the data as a USB multi-device transmission scheduling strategy.
[0149] The transmission risk control processing module is used to generate a transmission risk control instruction if the BMC chip continuously detects a signal transmission risk state within a preset time; perform transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction; and restore the BMC chip to the initial standby state when it detects that the USB device is disconnected and continues to be idle for a preset time;
[0150] The signal transmission optimization module is used to monitor the USB device connection status in real time. When the USB device is reconnected and the signal transmission duration is detected to match the signal transmission risk status, the BMC chip performs USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
[0151] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0152] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.
Claims
1. A USB data transmission method based on BMC chip, characterized in that: The following steps are involved: Step S1: monitoring the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; Detecting the signal transmission duration of the signal transmission path information, and determining that the signal transmission risk state is reached when the signal transmission duration exceeds a preset transmission duration threshold; Step S2: In the signal transmission risk state, the BMC chip detects the number of simultaneous USB device requests; when it is detected that multiple USB devices initiate data transmission requests simultaneously, the concurrent processing mechanism is activated to dynamically allocate the hardware resources of the BMC chip; and the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling policy; Step S3: If the BMC chip continuously detects the signal transmission risk state within a preset time, a transmission risk control instruction is generated; Perform transmission balancing on the USB signal transmission path according to the transmission risk control instruction; When the USB device is detected to be disconnected and remains idle for a preset time, the BMC chip returns to the initial standby state. Step S4: monitor the USB device connection status in real time. When the USB device is reconnected and it is detected that the signal transmission duration matches the signal transmission risk status, the BMC chip executes USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
2. The USB data transmission method based on the BMC chip according to claim 1, characterized in that: Monitoring the USB signal transmission path of the motherboard where the BMC chip is located in step S1 includes: Identify the USB interface type identifier on the motherboard through the built-in I / O controller of the BMC chip; Determine a USB signal transmission path according to a USB interface type identifier; Real-time monitoring of the USB signal transmission path. During the monitoring process, the signal transmission path is segmented through the D+ and D- signal lines of the USB interface, and the level parameters of each transmission path are monitored separately; If the level parameter of either the D+ or D- signal line is non-zero, the USB interface is determined to be in the connected state, and the time when the level parameter of the USB interface changes is recorded to obtain signal transmission path information.
3. The USB data transmission method based on the BMC chip according to claim 1, characterized in that: In step S1, the signal transmission duration of the signal transmission path information is detected. When the signal transmission duration exceeds a preset transmission duration threshold, determining that the signal transmission risk state is in the following manner: The timing component of the BMC chip is used to time the level change of the signal. When the level on the D+ or D- signal line is detected to change from a non-zero state, the timing unit is started; Identify the level waveform on the D+ or D- signal line. When the level waveform does not show overshoot jitter and the level on the D+ or D- signal line maintains constant parameters, stop the timing component and record the signal transmission duration. When the signal transmission duration exceeds a preset transmission duration threshold, it is determined to be a signal transmission risk state.
4. The USB data transmission method based on the BMC chip according to claim 1, characterized in that: In step S2, in the signal transmission risk state, detecting the USB device simultaneous request quantity through the BMC chip includes: Start the I / O controller of the BMC chip; Initialize the counter to 0 and record the number of USB devices requesting data transfer at the same time; In the signal transmission risk state, the BMC chip monitors the D+ and D- signal lines in real time; Each time a request signal is detected on the D+ or D- signal line, the counter is incremented by 1; If no new request signal is detected within 100 milliseconds, the counter remains unchanged; When the counter value reaches or exceeds 3, it is determined to be in the multiple USB device request quantity state.
5. The USB data transmission method based on BMC chip according to claim 1, characterized in that: The concurrent processing mechanism in step S2 is specifically as follows: The BMC chip's I / O controller monitors the USB interface's D+ and D- signal lines in real time, identifies each USB device's data transfer request, and adds a reception timestamp. Divide the data transmission request into a data read request type and a data write request type, and determine a high priority and a low priority to obtain a data transmission request mode; The data transmission request pattern is grouped according to the receiving timestamp, and a fixed time slice is allocated to each request group, with a time slice length of 10 milliseconds, to obtain a data transmission request group; In each time slice, the BMC chip processes the request tasks in the data transmission request group in turn, records the processing results and processing time, and transmits the processing results and processing time to the USB device; If the requested task is not processed within the allocated time slice, the BMC chip records the timeout status of the requested task; And reschedule the request task in the next time slice.
6. The USB data transmission method based on the BMC chip according to claim 5, characterized in that: In step S2, when it is detected that multiple USB devices initiate data transmission requests at the same time, starting the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip includes: When multiple USB devices are detected to initiate data transmission requests at the same time, the concurrent processing mechanism is started; The requests are grouped into high and low priority groups according to the data transmission request mode, and BMC chip CPU resource allocation is performed. The high-priority request group is allocated 70% of the BMC chip CPU time, and the low-priority request group is allocated 30% of the BMC chip CPU time. The requests are grouped according to the data read request type and the data write request type of the data transmission request mode to allocate BMC chip memory space; among them, the data write request group is allocated 2-5MB of memory space, and the data read request group is allocated 1-2MB of memory space; The requests are grouped according to the data read request type and data write request type of the data transmission request mode for BMC chip I / O bandwidth allocation; among them, the data write request group is allocated 10-20MB / s of I / O bandwidth, and the data read request group is allocated 5-10MB / s of I / O bandwidth.
7. The USB data transmission method based on BMC chip according to claim 1, characterized in that: In step S2, the data transmission tasks of different devices are time-sharing scheduled to be stored as a USB multi-device transmission scheduling strategy, including: Perform USB device identifier detection on the data transfer request mode and determine the data transfer tasks of different devices based on the USB device identifier; Predict the time required for data transmission tasks of different devices to obtain the predicted time required for the tasks; The data transmission tasks of different devices are scheduled in time-sharing mode according to the predicted time required for the task, and the execution status of the data transmission tasks of different devices is monitored in real time. If the data transmission task is not completed within the time-sharing scheduling time, the device task timeout status is recorded; The data transmission tasks of different devices are scheduled based on the device task timeout status, increasing the CPU time to 1.5 times the original allocation and the I / O bandwidth to 1.5 times the original allocation, which is finally stored as the USB multi-device transmission scheduling strategy.
8. The USB data transmission method based on BMC chip according to claim 1, characterized in that: In step S3, if the BMC chip continuously detects the signal transmission risk state within a preset time, the following steps may occur: The BMC chip continuously monitors the duration of the signal transmission risk state. If the duration exceeds 500 milliseconds, the risk handling mechanism is triggered; When the risk handling mechanism is triggered, the BMC chip monitors CPU usage, memory usage, and I / O bandwidth usage in real time to identify abnormal resource usage. The abnormal resource usage is evaluated for abnormality, and control instructions are matched according to the abnormality to obtain transmission risk control instructions.
9. The USB data transmission method based on BMC chip according to claim 1, characterized in that: In step S3, performing transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction includes: Redistribute the resources required for transmission tasks on the USB signal transmission path according to the transmission risk control instructions. The balanced allocation of required resources includes reducing the CPU time of the high-priority task group by 10% and reducing the I / O bandwidth by 10%; and increasing the CPU time of the low-priority task group by 10% and increasing the I / O bandwidth by 10%. According to the transmission risk control instructions, the resources required for transmission tasks on the USB signal transmission path are balanced. If the CPU usage of the high-priority task group exceeds 80%, its CPU time is reduced by 10% and the reduced CPU time is allocated to the low-priority task group.
10. A USB data transmission system based on a BMC chip, characterized in that: For executing the USB data transmission method based on the BMC chip according to claim 1, the USB data transmission system based on the BMC chip comprises: The USB signal transmission monitoring module is used to monitor the USB signal transmission path of the motherboard where the BMC chip is located to obtain signal transmission path information; detect the signal transmission duration of the signal transmission path information, and determine that the signal transmission risk state is reached when the signal transmission duration exceeds a preset transmission duration threshold; The transmission scheduling strategy module is used to detect the number of simultaneous USB device requests through the BMC chip when signal transmission risks are present. When multiple USB devices are detected initiating data transmission requests simultaneously, the module activates the concurrent processing mechanism to dynamically allocate the hardware resources of the BMC chip. The module also schedules the data transmission tasks of different devices in a time-sharing manner and stores the data as a USB multi-device transmission scheduling strategy. The transmission risk control processing module is used to generate a transmission risk control instruction if the BMC chip continuously detects a signal transmission risk state within a preset time; perform transmission balancing processing on the USB signal transmission path according to the transmission risk control instruction; and restore the BMC chip to the initial standby state when it detects that the USB device is disconnected and continues to be idle for a preset time; The signal transmission optimization module is used to monitor the USB device connection status in real time. When the USB device is reconnected and the signal transmission duration is detected to match the signal transmission risk status, the BMC chip performs USB signal transmission optimization measures according to the USB multi-device transmission scheduling strategy.
Citation Information
Cited By
Resource processing method and electronic equipment
CN120892096A