Debugging device, method and electronic equipment

By designing a debugging device that utilizes the display interface, the data leakage risk, complex debugging environment and poor effect of debugging devices in the prior art are solved, and a safer, simpler and more efficient debugging effect is achieved.

CN119357035BActive Publication Date: 2025-03-18MOORE THREADS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411896620.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-18
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The method of debugging data processing devices in the prior art has problems such as risk of data leakage, complex construction of debugging environment, and poor debugging effect, and cannot meet the needs of users.

Method used

A debugging device is designed to connect the display interface of the data processing device through the first interface, and communicate with the data processing device using a hot-swap detection channel and an auxiliary channel. The debugging device outputs a specific signal when connected, enters debug mode after authentication, and outputs debug-related information through the auxiliary channel. At the same time, the debugging device receives the debugging command from the upper computer, and then caches it and outputs the signal through the hot-swap detection channel to complete the execution of the debugging command and the output of the result.

Benefits of technology

It reduces the risk of data leakage, simplifies the construction of the debugging environment, improves the debugging effect and accuracy, and ensures the security and compatibility of the data processing device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357035B_ABST
    Figure CN119357035B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of chip technology, and proposes a debugging device, method and electronic device. The debugging device includes a first interface and a second interface, the first interface is used to connect to the display interface of a data processing device, the display interface includes a hot plug detection channel and an auxiliary channel, the second interface is used to connect to a host computer, the debugging device is used to output a first signal to the hot plug detection channel when the first interface is connected to the display interface, the first signal is used to enable the data processing device to authenticate the debugging device when the first signal is detected at the hot plug detection channel, enter the debugging mode after the authentication is passed, and output the debugging-related information to the debugging device through the auxiliary channel; the debugging device is also used to output the received information to the host computer. Using the debugging device of the embodiment of the present disclosure to debug the data processing device can reduce the risk of data leakage, simplify the debugging environment construction, and improve the debugging effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of chip technology, and in particular to a debugging device, method and electronic equipment. Background Art

[0002] Electronic devices usually include multiple data processing devices, such as graphics cards, etc., which are used to provide computing power. Therefore, the status of the data processing device has a great impact on the overall performance of the electronic device. In order to improve the performance and operational stability of the electronic device, the data processing device can be debugged. For example, the status of the data processing device can be obtained through debugging, and combined with the obtained status, it can also be checked whether the data processing device has a fault. If a fault occurs, the fault can be repaired through debugging. If no fault occurs, the operating parameters of the data processing device can be modified through debugging to achieve performance tuning of the data processing device.

[0003] The debugging methods proposed in the prior art have the disadvantages of easily leaking data information of the data processing device, being complex to build a debugging environment, and having poor debugging effects, and thus cannot meet the needs of users at this stage. Summary of the invention

[0004] In view of this, the present disclosure proposes a debugging device, method and electronic device. Using the debugging device of the embodiment of the present disclosure to debug a data processing device can reduce the risk of data leakage, simplify the setting up of the debugging environment and improve the debugging effect.

[0005] According to one aspect of the present disclosure, a debugging device is provided, the debugging device comprising a first interface and a second interface, the first interface being used to connect to a display interface of a data processing device, the display interface comprising a hot plug detection channel and an auxiliary channel, the second interface being used to connect to a host computer, the debugging device being used to output a first signal to the hot plug detection channel when the first interface is connected to the display interface, the first signal being a high-level signal whose duration is greater than a first threshold, the first signal being used to authenticate the debugging device when the data processing device detects the first signal at the hot plug detection channel, enter a debugging mode after the authentication is passed, and output debugging-related information stored and / or generated by the debugging device to the debugging device through the auxiliary channel; the debugging device is also used to output the received debugging-related information sent by the data processing device to the host computer when the debugging device receives the debugging-related information.

[0006] In a possible implementation, the debugging device is also used to, when receiving a debugging command issued by the host computer, cache the debugging command and output a second signal to the hot plug detection channel, wherein the second signal is a low-level signal whose duration is less than a second threshold, and the second signal is used to enable the data processing device to obtain and execute the debugging command from the debugging device through the auxiliary channel when detecting the second signal at the hot plug detection channel, and output the execution result of the debugging command to the debugging device through the auxiliary channel; the debugging device is also used to output the execution result to the host computer.

[0007] In a possible implementation, the debugging device is further configured to, upon receiving a configuration command issued by the host computer, execute the configuration command and output an execution result of the configuration command to the host computer.

[0008] In one possible implementation, the display interface generates a third signal when no other interface is connected, and the third signal is a low-level signal that lasts for a duration greater than a third threshold. The third signal is used to enable the data processing device to exit the debugging mode when the third signal is detected at the hot plug detection channel.

[0009] In a possible implementation, the first interface includes a hot plug detection channel and an auxiliary channel, the hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

[0010] In a possible implementation, the debugging device also includes a register group, which is used to store the purpose, identification and key of the debugging device. The first signal is specifically used to enable the data processing device to obtain the purpose from the register group when the first signal is detected at the hot plug detection channel, and when the purpose is debugging, obtain the identification and the key from the register group, and use the identification to authenticate the key.

[0011] In one possible implementation, the debugging device also includes a first cache and a controller, wherein the controller is used to control the first interface to output the first signal to the hot plug detection channel when the first interface is connected to the display interface; the first interface is used to output the received information to the first cache when receiving debugging-related information; the first cache outputs a first interrupt to the controller, and the first interrupt indicates that there is data to be output in the first cache; the controller is also used to control the first cache to output the stored information to the second interface when receiving the first interrupt; the second interface is used to output the information from the first cache to the host computer.

[0012] In a possible implementation, the debugging device also includes a second cache, and the second interface is also used to output the received debugging command to the second cache when receiving the debugging command issued by the host computer; the second cache outputs a second interrupt to the controller, and the second interrupt indicates that there is a debugging command to be output in the second cache; the controller is also used to enable the first interface to output a second signal to the hot plug detection channel when receiving the second interrupt; the second signal is specifically used to enable the data processing device to obtain the debugging command from the second cache through the auxiliary channel when detecting the second signal at the hot plug detection channel.

[0013] According to another aspect of the present disclosure, an electronic device is provided, comprising the above-mentioned debugging device.

[0014] According to another aspect of the present disclosure, a debugging system is provided, comprising the above-mentioned debugging device, a data processing device and a host computer.

[0015] According to another aspect of the present disclosure, a debugging method is provided, the method being applied to a debugging system, the debugging system comprising a debugging device, a data processing device and a host computer, the debugging device comprising a first interface and a second interface, the first interface being used to connect to a display interface of the data processing device, the display interface comprising a hot plug detection channel and an auxiliary channel, the second interface being used to connect to the host computer, the method comprising: the debugging device outputting a first signal to the hot plug detection channel when the first interface is connected to the display interface, the first signal being a high-level signal whose duration is greater than a first threshold; the data processing device authenticating the debugging device when detecting the first signal at the hot plug detection channel, entering a debugging mode after the authentication is passed, and outputting debugging-related information stored and / or generated by itself to the debugging device through the auxiliary channel; the debugging device outputting the received information to the host computer when receiving debugging-related information sent by the data processing device.

[0016] In a possible implementation, the method further includes: when the debugging device receives the debugging command issued by the host computer, the debugging device caches the debugging command and outputs a second signal to the hot plug detection channel, wherein the second signal is a low-level signal whose duration is less than a second threshold; when the data processing device detects the second signal at the hot plug detection channel, the debugging device obtains the debugging command from the debugging device through the auxiliary channel and executes it, and outputs the execution result of the debugging command to the debugging device through the auxiliary channel; the debugging device outputs the execution result to the host computer.

[0017] In a possible implementation, the method further includes: when the debugging device receives a configuration command issued by the host computer, executing the configuration command, and outputting an execution result of the configuration command to the host computer.

[0018] In one possible implementation, the display interface generates a third signal when no other interface is connected, and the third signal is a low-level signal that lasts for a duration greater than a third threshold. The method further includes: when the data processing device detects the third signal at the hot plug detection channel, exiting the debugging mode.

[0019] In a possible implementation, the first interface includes a hot plug detection channel and an auxiliary channel, the hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

[0020] In a possible implementation, the debugging device also includes a register group, and the register group is used to store the purpose, identification and key of the debugging device. When the data processing device detects the first signal at the hot plug detection channel, the debugging device is authenticated, including: when the data processing device detects the first signal at the hot plug detection channel, the data processing device obtains the purpose from the register group; when the purpose is debugging, the data processing device obtains the identification and the key from the register group, and uses the identification to authenticate the key.

[0021] In a possible implementation, the debugging device also includes a first cache and a controller. When the first interface is connected to the display interface, the debugging device outputs a first signal to the hot plug detection channel, including: when the first interface is connected to the display interface, the controller controls the first interface to output the first signal to the hot plug detection channel; when the debugging device receives debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer, including: when the first interface receives debugging-related information, the first interface outputs the received information to the first cache; the first cache outputs a first interrupt to the controller, and the first interrupt indicates that there is data to be output in the first cache; when the controller receives the first interrupt, the controller controls the first cache to output the stored information to the second interface; the second interface outputs the information from the first cache to the host computer.

[0022] In a possible implementation, the debugging device also includes a second cache. When receiving the debugging command issued by the host computer, the debugging device caches the debugging command and outputs a second signal to the hot plug detection channel, including: when the second interface receives the debugging command issued by the host computer, the received debugging command is output to the second cache; the second cache outputs a second interrupt to the controller, and the second interrupt indicates that there is a debugging command to be output in the second cache; when the controller receives the second interrupt, the first interface outputs a second signal to the hot plug detection channel; when the data processing device detects the second signal at the hot plug detection channel, the debugging device obtains the debugging command from the debugging device through the auxiliary channel, including: when the data processing device detects the second signal at the hot plug detection channel, the debugging command is obtained from the second cache through the auxiliary channel.

[0023] According to the debugging device of the embodiment of the present disclosure, the display interface of the data processing device is connected through the first interface, the display interface includes a hot plug detection channel and an auxiliary channel, and the host computer is connected through the second interface. When the first interface is connected to the display interface, a first signal is output to the hot plug detection channel, and the first signal is a high-level signal with a duration greater than a first threshold, which can notify the data processing device that a device is connected; the first signal can be used to enable the data processing device to authenticate the debugging device when the first signal is detected at the hot plug detection channel, and after the authentication is passed, the debugging mode is entered, and the debugging-related information stored and / or generated by itself is output to the debugging device through the auxiliary channel; when the debugging device receives the debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer. Since communication is achieved through the display interface of the data processing device, and the debugging mode is entered only after authentication to officially transmit data, the risk of data leakage is smaller and security is higher; the display interface is less complex and more compatible, which can simplify the construction of the debugging environment, improve the accuracy of detected problems, and improve the debugging effect; and the display interface is an interface possessed by the data processing device itself, and it is still open to the outside world after productization. Therefore, even if the data processing device is plugged into an electronic device for use, there is no need to unplug the data processing device when you want to debug the data processing device, which can further improve the accuracy of detected problems and improve the debugging effect.

[0024] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0026] Figure 1 An exemplary application scenario of the debugging device according to an embodiment of the present disclosure is shown.

[0027] Figure 2a A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0028] Figure 2b A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0029] Figure 2c A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0030] Figure 2d A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0031] Figure 3A schematic diagram showing the structure of a debugging device according to an embodiment of the present disclosure.

[0032] Figure 4 A schematic diagram showing the structure of a debugging system according to an embodiment of the present disclosure.

[0033] Figure 5 A schematic diagram showing the process of the debugging method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0035] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0036] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0037] The following takes a data processing device as a graphics card as an example to introduce several debugging methods in the prior art.

[0038] Most modules inside the graphics card communicate with each other using the high-speed serial computer expansion bus standard Peripheral Component Interconnect Express (PCIE). Based on this, the prior art proposes to provide a debugging interface through PCIE, expose the debugging interface to a host computer, and control the debugging process by running debugging software on the host computer.

[0039] The disadvantages of this method are that, first, the debugging interface provided by PCIE can easily leak the information of the graphics card to other devices that can support PCIE except the host computer, which has poor security. Second, it requires the support of complex host computer software, which is more expensive. Third, since PCIE itself has a certain complexity, there are compatibility issues when debugging the graphics card through the debugging interface provided by PCIE, which may affect the accuracy of problem troubleshooting and reduce the debugging effect. Fourth, in some scenarios, the purpose of debugging is to locate the complexity and compatibility problems of PCIE. At this time, it is impossible to use the debugging interface provided by PCIE to debug PCIE itself.

[0040] The second prior art proposes to use the JTAG interface of the graphics card to debug the graphics card. However, the JTAG interface is usually no longer open to the public after the test is completed, so this solution can only be applied to the debugging scenario of the graphics card before productization. For the graphics card that has been productized, this solution cannot be used for debugging.

[0041] The third prior art proposes to selectively solder specific pins of the graphics card and bring out the serial port function to complete debugging. However, some graphics cards need to be plugged into the server for use. For such graphics cards, the graphics card must be unplugged before debugging, which damages the on-site environment where the problem occurs, affects the accuracy of problem troubleshooting, and reduces the debugging effect.

[0042] In summary, the debugging method proposed in the prior art has the disadvantages of easily leaking data information of the data processing device, complex debugging environment construction, and poor debugging effect, and cannot meet the current needs of users.

[0043] In view of this, the present disclosure proposes a debugging device, method and electronic device. Using the debugging device of the embodiment of the present disclosure to debug a data processing device can reduce the risk of data leakage, simplify the setting up of the debugging environment and improve the debugging effect.

[0044] Figure 1 An exemplary application scenario of the debugging device according to an embodiment of the present disclosure is shown.

[0045] like Figure 1 As shown, the debugging device is connected to the host computer and the data processing device to be debugged respectively. The host computer can be operated by the user.

[0046] After the data processing device determines to establish a connection with the debugging device, if there is any debugging-related information that has not been sent, or debugging-related information is generated, it can be actively sent to the debugging device, which will be forwarded to the host computer by the debugging device.

[0047] The user can operate the host computer to send a debugging instruction to the debugging device, and the data processing device can obtain the debugging instruction from the debugging device and execute it. The execution result of the debugging instruction can be transmitted to the host computer through the debugging device.

[0048] The host computer can display the received debugging-related information and the execution results of the debugging instructions, and perform analysis to determine the status of the data processing device, determine the problem causing the abnormality, etc.

[0049] The debugging device and the data processing device can be respectively arranged in two electronic devices, or can be arranged on the same electronic device. The data processing device can be plugged into an electronic device (such as a server) for use, or can be used alone. The embodiments of the present disclosure do not limit the specific arrangement of the debugging device and the data processing device.

[0050] Figure 2a A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0051] like Figure 2a As shown, in a possible implementation, the debugging device includes a first interface and a second interface, the first interface is used to connect to the display interface of the data processing device, the display interface includes a hot plug detection channel and an auxiliary channel, and the second interface is used to connect to the host computer.

[0052] The debugging device is used to output a first signal to the hot-plug detection channel when the first interface is connected to the display interface, the first signal being a high-level signal with a duration greater than a first threshold, and the first signal is used to enable the data processing device to authenticate the debugging device when the data processing device detects the first signal at the hot-plug detection channel, enter the debugging mode after the authentication is passed, and output the debugging-related information stored and / or generated by the debugging device to the debugging device through the auxiliary channel;

[0053] The debugging device is also used to output the received information related to debugging sent by the data processing device to the host computer.

[0054] For example, the data processing device may be any type of data processing device including a hardware display interface (DisplayPort, DP), such as a graphics card, etc. The embodiments of the present disclosure do not limit the specific type of the data processing device. The display interface may be an interface used in the prior art to connect a display device. When it is desired to debug the data processing device, the display interface of the data processing device may be connected to the debugging device of the embodiments of the present disclosure.

[0055] The debugging device may include a first interface and a second interface of the hardware, and the first interface may be used to connect to the display interface of the data processing device, and the second interface may be used to connect to the host computer. The display interface adopts the DP protocol, so the first interface may be an interface that supports the DP protocol. As long as the second interface can communicate with the host computer, for example, it may be an interface that supports protocols such as uart, usb, eth, etc. The embodiments of the present disclosure do not limit the specific types of protocols supported by the first interface and the second interface.

[0056] Among them, when the second interface supports the USB protocol, after the second interface is connected to the host computer, the host computer can power the debugging device through the second interface. Those skilled in the art should understand that other power supplies can also be used to power the debugging device, and the embodiments of the present disclosure do not limit the specific power supply method of the debugging device.

[0057] The display interface may include multiple channels. When the debugging device of the embodiment of the present disclosure is used to debug the data processing device, the hot plug detection (HPD) channel and the auxiliary channel (AUX) may be used. The hot plug detection channel may be used to transmit the hot plug detection signal (including the first signal, the second signal, the third signal, etc. mentioned in this article). The auxiliary channel may be used to transmit data, and the data processing device may communicate with the outside at a rate of 1Mbps without additional configuration.

[0058] First, the user can manually connect the first interface and the display interface, and connect the second interface and the host computer. When the first interface is connected to the display interface, the debugging device can output a first signal to the hot plug detection channel to notify the data processing device that a device is connected. The first signal can be a high-level signal with a duration greater than the first threshold, such as a Plug signal. The value of the first threshold can be set according to the provisions of the DP protocol, and the embodiment of the present disclosure does not limit the specific value of the first threshold.

[0059] If the data processing device detects the first signal at the hot plug detection channel, it can be determined that a device has been connected to the display interface. The data processing device can authenticate the device (the debugging device in this case) connected to the display interface. After the authentication is passed, the data processing device can enter the debugging mode. If the authentication fails, the data processing device can output the authentication failure information to the debugging device. The authentication failure information can be transmitted through the auxiliary channel.

[0060] The data processing device may generate some debugging-related information during operation, such as the heat dissipation rate and power consumption of the data processing device. The data processing device can cache such information. When the data processing device enters the debugging mode, the stored debugging-related information can be output to the debugging device. If the data processing device generates new debugging-related information after entering the debugging mode, the newly generated information can be directly output to the debugging device. The debugging-related information can be transmitted through the auxiliary channel.

[0061] When receiving debugging-related information from the data processing device, the debugging device may output the received information to the host computer. The host computer may store the received information and analyze the information to determine the status of the data processing device and check whether there is a problem with the data processing device. The information analysis of the host computer can be implemented based on existing technologies and will not be described in detail here.

[0062] According to the debugging device of the embodiment of the present disclosure, the display interface of the data processing device is connected through the first interface, the display interface includes a hot plug detection channel and an auxiliary channel, and the host computer is connected through the second interface. When the first interface is connected to the display interface, a first signal is output to the hot plug detection channel, and the first signal is a high-level signal with a duration greater than a first threshold, which can notify the data processing device that a device is connected; the first signal can be used to enable the data processing device to authenticate the debugging device when the first signal is detected at the hot plug detection channel, and after the authentication is passed, the debugging mode is entered, and the debugging-related information stored and / or generated by itself is output to the debugging device through the auxiliary channel; when the debugging device receives the debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer. Since communication is achieved through the display interface of the data processing device, and the debugging mode is entered only after authentication to officially transmit data, the risk of data leakage is smaller and security is higher; the display interface is less complex and more compatible, which can simplify the construction of the debugging environment, improve the accuracy of detected problems, and improve the debugging effect; and the display interface is an interface possessed by the data processing device itself, and it is still open to the outside world after productization. Therefore, even if the data processing device is plugged into an electronic device for use, there is no need to unplug the data processing device when you want to debug the data processing device, which can further improve the accuracy of detected problems and improve the debugging effect.

[0063] In a possible implementation, the first interface includes a hot plug detection channel and an auxiliary channel, the hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

[0064] For example, in order to enable the first interface to support the display protocol and communicate with the display interface, the first interface and the display interface can adopt the same structure and communication method, that is, the first interface also includes a hot plug detection channel and an auxiliary channel, so that the hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

[0065] In this way, the communication between the first interface and the display interface is made simpler.

[0066] Furthermore, when the user wants to debug the data processing device, the user can operate the host computer to output a debugging command to the debugging device. Figure 2b A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0067] like Figure 2b As shown, in a possible implementation, the debugging device is further used for:

[0068] When receiving a debugging command sent by a host computer, the debugging command is cached, and a second signal is output to a hot-plug detection channel, where the second signal is a low-level signal whose duration is less than a second threshold value; the second signal is used to enable the data processing device to obtain and execute the debugging command from the debugging device through the auxiliary channel when the data processing device detects the second signal at the hot-plug detection channel, and output the execution result of the debugging command to the debugging device through the auxiliary channel;

[0069] The debugging device is also used to output the execution result to the host computer.

[0070] For example, to ensure the security of the data processing device, the debugging device may not directly forward the debugging command received from the host computer to the data processing device, but cache the debugging command first and output a second signal to the hot plug detection channel.

[0071] The second signal may indicate a debugging command to be acquired, and may be a low-level signal whose duration is less than a second threshold. The second threshold may be set according to the provisions of the DP protocol, for example, to 1ms. The embodiment of the present disclosure does not limit the specific value of the second threshold.

[0072] When the data processing device detects the second signal at the hot plug detection channel, it can determine the debugging command to be obtained, and can actively access the debugging device to obtain the debugging command. The debugging command can be transmitted through the auxiliary channel. The data processing device can execute the debugging command and output the execution result of the debugging command to the debugging device through the auxiliary channel.

[0073] The execution result of the debugging command also belongs to the debugging-related information, so the transmission method of the execution result of the debugging command can be the same as the transmission method of the debugging-related information. Its exemplary transmission method is given below.

[0074] Furthermore, when the user wants to configure the debugging device, the user can operate the host computer to output configuration commands to the debugging device. Figure 2c A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0075] like Figure 2c As shown, in a possible implementation, the debugging device is further used to, when receiving a configuration command sent by the host computer, execute the configuration command and output the execution result of the configuration command to the host computer.

[0076] For example, a user may want to configure the debugging device, such as expanding the storage area in the debugging device for storing debugging-related information, and operating the host computer to output configuration commands to the debugging device. When the host computer issues a command, it can add an identifier indicating the command type, such as a debugging command can add a debugging type identifier, and a configuration command can add a configuration type identifier. In this case, the debugging device can determine whether the received command is a debugging command or a configuration command based on the identifier carried by the received command.

[0077] After receiving the configuration command, the debugging device can execute the configuration command and output the execution result of the configuration command to the host computer. In this way, the configuration of the debugging device can be realized.

[0078] When the user no longer needs to debug the data processing device, the user can disconnect the display interface from the first interface, and the data processing device can automatically exit the debugging mode. Figure 2d A schematic diagram showing the working mode of the debugging device according to an embodiment of the present disclosure.

[0079] like Figure 2d As shown, in a possible implementation, the display interface generates a third signal when no other interface is connected, and the third signal is a low-level signal whose duration is greater than a third threshold. The third signal is used to enable the data processing device to exit the debugging mode when the third signal is detected at the hot plug detection channel.

[0080] For example, when the display interface is not connected to other interfaces, it is in a state of continuous low level due to the lack of high level input. In this case, the display interface may generate a third signal, such as an Unplug signal, which may indicate that the display interface is not connected to any interface. The third signal may be a low level signal that lasts longer than a third threshold. The third threshold may be set according to the provisions of the DP protocol, for example, to 2ms. The disclosed embodiment does not limit the specific value of the third threshold.

[0081] After the data processing device enters the debugging mode, when the third signal is detected at the hot plug detection channel, it can be determined that the connection between the debugging device and itself has been disconnected, and the debugging mode can be automatically exited.

[0082] In this way, the data processing device can exit the debugging mode in time and recover to a state where it can be used normally.

[0083] Figure 3 A schematic diagram showing the structure of a debugging device according to an embodiment of the present disclosure.

[0084] like Figure 3 As shown, the debugging device may include a first interface, a second interface, a first cache, a second cache, a controller, and a register set.

[0085] The functions of the first interface and the second interface have been described above and will not be repeated here.

[0086] The first cache can be used to store debugging-related information actively sent by the data processing device. The information stored in the first cache can be sent to the host computer, so the first cache can be connected to the first interface and the second interface respectively. The second cache can be used to store debugging commands actively sent by the host computer. The debugging command can be a command executed by the data processing device that can obtain debugging-related information. The commands stored in the second cache can be sent to the data processing device, so the second cache can be connected to the first interface and the second interface respectively. The first cache and the second cache can be a first-in first-out memory (First In First Out, FIFO) and the like, and the depth of the first cache and the second cache can be pre-set, for example, set to 16 bytes. The embodiments of the present disclosure do not limit the specific implementation of the first cache and the second cache.

[0087] The controller can run the firmware of the debugging device to realize the configuration and data flow control of each component in the entire debugging device, such as the configuration of the first interface and the second interface, the signal output of the first interface and the second interface, the data storage / output of the first cache and the second cache, the access to the register group, etc. Therefore, the controller can be connected to the first interface, the second interface, the first cache, the second cache and the register group. The controller can be a microcontroller unit (MCU), etc., and the embodiments of the present disclosure do not limit the specific implementation of the controller.

[0088] The register group may include a plurality of registers. Table 1 shows an example of a setting method of the register group according to an embodiment of the present disclosure.

[0089] Table 1

[0090] Register Number address Reset value illustrate 0 0x0000 0xFF Purpose of the debugging device 1 0x0001~0x0008 DevID Identification of the debugging device 2 0x0009~0x0010 key Key 3 0x0011 0x0 Access the interface of the first cache. Continuously reading / writing this register can realize the reading / writing of the first cache. 4 0x0012 0x0 The interface for accessing the second cache, continuously reading / writing this register can realize the reading / writing of the second cache 5 0x1000~0x1FFF - Configuration of the first interface 6 0x2000~0x2FFF - Configuration of the second interface

[0091] In the example of Table 1, the register group may include 7 registers.

[0092] The address of register 0 may be 0x0000, which is used to store the purpose of the debugging device. In the embodiment of the present disclosure, the purpose of the debugging device may be debugging, and 0xFF may represent debugging in the example of Table 1. Register 0 may be a read-only register, so the reset value of register 0 (the information stored at reset) may be 0xFF.

[0093] The address of register 1 may be 0x0001 to 0x0008, and is used to store the identifier of the debugging device. In the example of Table 1, DevID may represent the identifier of the debugging device. Register 1 may be a read-only register, so the reset value of register 1 may be DevID.

[0094] The address of register 2 may be 0x0009 to 0x0010, and is used to store the key. In the example of Table 1, key may represent the key. Register 2 may be a read-only register, so the reset value of register 2 may be key.

[0095] The address of register 3 may be 0x0011. As an interface for accessing the first cache, register 3 may be a readable and writable register. Continuously reading / writing the register may implement reading / writing of the first cache. In the example of Table 1, it may be considered that the first cache does not need to be accessed temporarily during reset, and the reset value of register 3 may be 0x0, indicating that the first cache is not accessed.

[0096] The address of register 4 may be 0x0012. As an interface for accessing the second cache, register 4 may be a readable and writable register. Continuously reading / writing the register may implement reading / writing of the second cache. In the example of Table 1, it may be considered that the second cache does not need to be accessed temporarily during reset, so the reset value of register 4 may be 0x0, indicating that the second cache is not accessed.

[0097] The address of register 5 may be 0x1000~0x1FFF, and as a configuration register of the first interface, it is used to store configuration information of the first interface. Register 5 may be a readable and writable register, and when reset, it may be considered that the first interface needs to be reconfigured, so the reset value of register 5 may be a null value.

[0098] The address of register 6 may be 0x2000~0x2FFF, and it is used as the configuration register of the second interface to store the configuration information of the second interface. Register 6 may be a readable and writable register, and when reset, it may be considered that the second interface needs to be reconfigured, so the reset value of register 6 may be a null value.

[0099] Those skilled in the art should understand that, in actual applications, the register group may also include more or less information, as long as the register group can store the purpose, identification and key of the debugging device. The embodiments of the present disclosure do not limit what kind of information is stored in the register group and the specific storage method of the information in the register group.

[0100] Combine the following Figure 3 First, an exemplary authentication process of the debugging device according to the embodiment of the present disclosure is introduced.

[0101] In a possible implementation, the debugging device further includes a register group, and the register group is used to store the purpose, identification and key of the debugging device.

[0102] The first signal is specifically used to enable the data processing device to obtain the purpose of the debugging device from the register group when the data processing device detects the first signal at the hot plug detection channel, and when the purpose of the debugging device is debugging, obtain the identifier and key of the debugging device from the register group, and use the identifier of the debugging device to authenticate the key.

[0103] An example of how to set up the register bank can be found in Figure 3 and Table 1. If the data processing device detects the first signal at the hot plug detection channel, it can be considered that a device is connected to the display interface of the data processing device. The device may be a display device or a debugging device. Therefore, the authentication can be divided into two steps. The first step is to determine whether the purpose of the connected device is debugging. If the purpose of the connected device is debugging (such as a debugging device), then proceed to the second step to obtain the identification and key of the connected device, and determine whether the connected device is safe for the data processing device based on the obtained identification and key. If the purpose of the connected device is not debugging, the corresponding data processing process can be entered according to the purpose of the connected device. For example, when a display device is connected, it can be determined that the purpose of the connected device is display, and the display process can be entered.

[0104] The key may be obtained by counting the values ​​in the identifier in a preset manner. For example, the key may be the number of 0s in the identifier. In one example, when the identifier is 10101010, the key may be 11 (binary representation of 4). The embodiments of the present disclosure do not limit the specific setting method of the key.

[0105] The data processing device can calculate the correct key according to the identifier. If the calculated key is consistent with the obtained key, the debugging device can be considered safe for the data processing device and the authentication is passed. If the calculated key is inconsistent with the obtained key, the debugging device can be considered unsafe for the data processing device and the authentication is failed.

[0106] See also Figure 2a After entering the debugging mode, the data processing device can actively output debugging-related information. The following describes an exemplary transmission method of debugging-related information.

[0107] In a possible implementation, the debugging device further includes a first cache and a controller.

[0108] The controller is used for controlling the first interface to output a first signal to the hot plug detection channel when the first interface is connected to the display interface;

[0109] The first interface is used to, when receiving information related to debugging, output the received information to the first cache;

[0110] The first cache outputs a first interrupt to the controller, the first interrupt indicating that there is data to be output in the first cache;

[0111] The controller is further configured to, upon receiving the first interrupt, control the first cache to output the stored information to the second interface;

[0112] The second interface is used to output the information from the first cache to the host computer.

[0113] For example, see Figure 3 The debugging device may further include a first cache and a controller. When the first interface is connected to the display interface, the controller may control the first interface to output a first signal to the hot plug detection channel, so that the data processing device can start the authentication of the debugging device according to the signal detected in the hot plug detection channel.

[0114] The display interface is connected to the first interface, so the debugging-related information output by the data processing device can be received by the first interface. The first cache is used to store debugging-related information, so when the first interface receives debugging-related information, the received information can be output to the first cache first. At this time, the first cache is not empty, and the first cache can output a first interrupt to the controller, and the first interrupt indicates that there is data to be output in the first cache.

[0115] When the controller receives the first interrupt, it can determine that there is data to be output in the first cache. Since the information stored in the first cache is sent to the host computer, and the host computer is connected to the second interface, the controller can control the first cache to output the stored information to the second interface, and the second interface can package the received information and output it to the host computer. The packaging method can be determined according to the communication protocol between the second interface and the host computer, and the embodiment of the present disclosure does not limit the specific packaging method.

[0116] The execution results of the debugging commands can also be transmitted to the host computer in the same way, which will not be repeated here.

[0117] In this way, the debugging device can transmit debugging-related information and the execution results of the debugging commands between the data processing device and the host computer.

[0118] An exemplary transmission method of the debugging command is described below.

[0119] In a possible implementation, the debugging device further includes a second cache.

[0120] The second interface is also used to output the received debugging command to the second cache when receiving the debugging command sent by the host computer;

[0121] The second cache outputs a second interrupt to the controller, the second interrupt indicating that there is a debugging command to be output in the second cache;

[0122] The controller is further configured to, upon receiving a second interrupt, cause the first interface to output a second signal to the hot plug detection channel;

[0123] The second signal is specifically used to enable the data processing device to obtain the debugging command from the second cache through the auxiliary channel when the data processing device detects the second signal at the hot plug detection channel.

[0124] An example of how the second cache is set up in the debugging device can be found in Figure 3 .

[0125] For example, the host computer is connected to the second interface, so the debugging command can be received by the second interface. Figure 3 , the second cache is used to store the debug command, so the second interface can transmit the debug command to the second cache. At this time, the second cache is not empty, and the second cache can output a second interrupt to the controller, and the second interrupt indicates that there is a debug command to be output in the second cache.

[0126] When the controller receives the second interrupt, it can determine that there is a debug command to be output in the second cache. Since the command stored in the second cache is to be executed by the data processing device, and the data processing device is connected to the first interface, the controller can make the first interface output a second signal to the hot plug detection channel of the data processing device.

[0127] When the data processing device detects the second signal at the hot plug detection channel, it can access the second cache to obtain the debugging command stored therein. The debugging command can be transmitted to the data processing device through the auxiliary channel.

[0128] In this way, the debugging device can transmit debugging commands between the data processing device and the host computer.

[0129] The disclosed embodiment also provides an electronic device, comprising the above-mentioned debugging device.

[0130] The disclosed embodiment further provides a debugging system, comprising the above-mentioned debugging device, data processing device, and host computer. Figure 4 A schematic diagram showing the structure of a debugging system according to an embodiment of the present disclosure.

[0131] like Figure 4 As shown, the debugging device is connected to the data processing device and the host computer respectively. The examples of the communication mode of the debugging device, the data processing device and the host computer have been described above and will not be repeated here.

[0132] The present disclosure also provides a debugging method. Figure 5 A schematic diagram showing the process of the debugging method according to an embodiment of the present disclosure.

[0133] like Figure 5 As shown, in a possible implementation, the method is applied to a debugging system, the debugging system includes a debugging device, a data processing device and a host computer, the debugging device includes a first interface and a second interface, the first interface is used to connect to a display interface of the data processing device, the display interface includes a hot plug detection channel and an auxiliary channel, the second interface is used to connect to the host computer, and the method includes:

[0134] Step S41, when the first interface is connected to the display interface, the debugging device outputs a first signal to the hot plug detection channel, where the first signal is a high level signal with a duration greater than a first threshold;

[0135] Step S42, when the data processing device detects the first signal at the hot plug detection channel, the data processing device authenticates the debugging device, enters the debugging mode after the authentication is passed, and outputs the debugging-related information stored and / or generated by the data processing device to the debugging device through the auxiliary channel;

[0136] Step S43, when the debugging device receives the debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer.

[0137] In a possible implementation, the method further includes: when the debugging device receives the debugging command issued by the host computer, the debugging device caches the debugging command and outputs a second signal to the hot plug detection channel, wherein the second signal is a low-level signal whose duration is less than a second threshold; when the data processing device detects the second signal at the hot plug detection channel, the debugging device obtains the debugging command from the debugging device through the auxiliary channel and executes it, and outputs the execution result of the debugging command to the debugging device through the auxiliary channel; the debugging device outputs the execution result to the host computer.

[0138] In a possible implementation, the method further includes: when the debugging device receives a configuration command issued by the host computer, executing the configuration command, and outputting an execution result of the configuration command to the host computer.

[0139] In one possible implementation, the display interface generates a third signal when no other interface is connected, and the third signal is a low-level signal that lasts for a duration greater than a third threshold. The method further includes: when the data processing device detects the third signal at the hot plug detection channel, exiting the debugging mode.

[0140] In a possible implementation, the first interface includes a hot plug detection channel and an auxiliary channel, the hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

[0141] In a possible implementation, the debugging device also includes a register group, and the register group is used to store the purpose, identification and key of the debugging device. When the data processing device detects the first signal at the hot plug detection channel, the debugging device is authenticated, including: when the data processing device detects the first signal at the hot plug detection channel, the data processing device obtains the purpose from the register group; when the purpose is debugging, the data processing device obtains the identification and the key from the register group, and uses the identification to authenticate the key.

[0142] In a possible implementation, the debugging device also includes a first cache and a controller. When the first interface is connected to the display interface, the debugging device outputs a first signal to the hot plug detection channel, including: when the first interface is connected to the display interface, the controller controls the first interface to output the first signal to the hot plug detection channel; when the debugging device receives debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer, including: when the first interface receives debugging-related information, the first interface outputs the received information to the first cache; the first cache outputs a first interrupt to the controller, and the first interrupt indicates that there is data to be output in the first cache; when the controller receives the first interrupt, the controller controls the first cache to output the stored information to the second interface; the second interface outputs the information from the first cache to the host computer.

[0143] In a possible implementation, the debugging device also includes a second cache. When receiving the debugging command issued by the host computer, the debugging device caches the debugging command and outputs a second signal to the hot plug detection channel, including: when the second interface receives the debugging command issued by the host computer, the received debugging command is output to the second cache; the second cache outputs a second interrupt to the controller, and the second interrupt indicates that there is a debugging command to be output in the second cache; when the controller receives the second interrupt, the first interface outputs a second signal to the hot plug detection channel; when the data processing device detects the second signal at the hot plug detection channel, the debugging device obtains the debugging command from the debugging device through the auxiliary channel, including: when the data processing device detects the second signal at the hot plug detection channel, the debugging command is obtained from the second cache through the auxiliary channel.

[0144] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0145] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A debugging device, characterized in that: The debugging device includes a first interface and a second interface, the first interface is used to connect to the display interface of the data processing device, the display interface includes a hot plug detection channel and an auxiliary channel, and the second interface is used to connect to the host computer. The debugging device is used to output a first signal to the hot plug detection channel when the first interface is connected to the display interface, the first signal being a high-level signal with a duration greater than a first threshold, and the first signal being used to enable the data processing device to authenticate the debugging device when detecting the first signal at the hot plug detection channel, enter the debugging mode after the authentication is passed, and output the debugging-related information stored and / or generated by the debugging device to the debugging device through the auxiliary channel; The debugging device is also used to, when receiving debugging-related information sent by the data processing device, output the received information to the host computer; The debugging device also includes a first cache and a controller. The controller is used for controlling the first interface to output the first signal to the hot plug detection channel when the first interface is connected to the display interface; The first interface is used to, when receiving information related to debugging, output the received information to the first cache; The first cache is used to output a first interrupt to the controller, where the first interrupt indicates that there is data to be output in the first cache; The controller is further configured to, upon receiving the first interrupt, control the first cache to output the stored information to the second interface; The second interface is used to output the information from the first cache to the host computer.

2. The debugging device according to claim 1, characterized in that: The debugging device is also used for, when receiving a debugging command sent by the host computer, caching the debugging command and outputting a second signal to the hot plug detection channel, wherein the second signal is a low-level signal whose duration is less than a second threshold, and the second signal is used for enabling the data processing device to obtain and execute the debugging command from the debugging device through the auxiliary channel when detecting the second signal at the hot plug detection channel, and outputting the execution result of the debugging command to the debugging device through the auxiliary channel; The debugging device is also used to output the execution result to the host computer.

3. The debugging device according to claim 1, characterized in that: The debugging device is also used to, when receiving a configuration command sent by the host computer, execute the configuration command and output the execution result of the configuration command to the host computer.

4. The debugging device according to claim 1, characterized in that: The display interface generates a third signal when no other interface is connected. The third signal is a low-level signal that lasts for a duration greater than a third threshold. The third signal is used to enable the data processing device to exit the debugging mode when the third signal is detected at the hot plug detection channel.

5. The debugging device according to claim 1, characterized in that: The first interface includes a hot plug detection channel and an auxiliary channel. The hot plug detection channel of the first interface is connected to the hot plug detection channel of the display interface, and the auxiliary channel of the first interface is connected to the auxiliary channel of the display interface.

6. The debugging device according to claim 1, characterized in that: The debugging device further comprises a register group, wherein the register group is used to store the purpose, identification and key of the debugging device. The first signal is specifically used to enable the data processing device to obtain the purpose from the register group when the first signal is detected at the hot plug detection channel, and when the purpose is debugging, obtain the identifier and the key from the register group, and use the identifier to authenticate the key.

7. The debugging device according to claim 1, characterized in that: The debugging device also includes a second cache, The second interface is further used to, when receiving a debugging command issued by the host computer, output the received debugging command to the second cache; The second cache outputs a second interrupt to the controller, wherein the second interrupt indicates that there is a debugging command to be output in the second cache; The controller is further configured to, upon receiving the second interrupt, enable the first interface to output a second signal to the hot plug detection channel; The second signal is specifically used to enable the data processing device to obtain the debugging command from the second cache through the auxiliary channel when the data processing device detects the second signal at the hot plug detection channel.

8. An electronic device, characterized in that: The invention comprises the debugging device according to any one of claims 1 to 7.

9. A debugging system, characterized in that: The invention comprises the debugging device as described in any one of claims 1 to 7, as well as a data processing device and a host computer.

10. A debugging method, characterized in that: The method is applied to a debugging system, the debugging system comprising a debugging device, a data processing device and a host computer, the debugging device comprising a first interface and a second interface, the first interface being used to connect to a display interface of the data processing device, the display interface comprising a hot plug detection channel and an auxiliary channel, the second interface being used to connect to the host computer, the method comprising: When the first interface is connected to the display interface, the debugging device outputs a first signal to the hot plug detection channel, where the first signal is a high level signal with a duration greater than a first threshold; When the data processing device detects the first signal at the hot-plug detection channel, the data processing device authenticates the debugging device, enters the debugging mode after the authentication is passed, and outputs the debugging-related information stored and / or generated by the data processing device to the debugging device through the auxiliary channel; When the debugging device receives the debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer; The debugging device also includes a first cache and a controller. The debugging device outputs a first signal to a hot plug detection channel when the first interface is connected to a display interface, comprising: the controller controls the first interface to output the first signal to the hot plug detection channel when the first interface is connected to the display interface; When the debugging device receives debugging-related information sent by the data processing device, the debugging device outputs the received information to the host computer, including: when the first interface receives debugging-related information, the first interface outputs the received information to the first cache; the first cache outputs a first interrupt to the controller, and the first interrupt indicates that there is data to be output in the first cache; when the controller receives the first interrupt, the controller controls the first cache to output the stored information to the second interface; the second interface outputs the information from the first cache to the host computer.

Citation Information

Patent Citations

  • Display data debugging system and display data debugging method

    CN112669738A

  • Equipment debugging method and device, electronic equipment and storage medium

    CN118378227A