Debugging method and system and storage medium

By directly debugging the input and output processor and peripheral controller of the SoC within the debugging device, the problem of high SoC resource occupation is solved, and efficient control and debugging efficiency of external devices is achieved.

CN119065902APending Publication Date: 2024-12-03PHYTIUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411075684.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art is difficult to effectively debug input and output processors and peripheral controllers integrated into the SoC, resulting in high resource utilization and low efficiency when controlling external devices.

Method used

Provide a debugging method and system, through the debugging device, directly debug the input and output processor using a dedicated processor core and debugging interface, and access the peripheral controller through the permissions of the first processor, to realize the input and output processor and peripherals Controller debugging reduces debugging costs and improves efficiency.

Benefits of technology

It ensures that the input and output processors inside the SoC can control external devices normally, reduce resource usage, and improve debugging efficiency and cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065902A_ABST
    Figure CN119065902A_ABST
Patent Text Reader

Abstract

The invention provides a debugging method and system and a storage medium, and is applied to the technical field of computers, the method is applied to a test system comprising debugging equipment and a to-be-tested chip, and the to-be-tested chip comprises a first processor, a second processor, an input and output processor and a peripheral controller; the input / output processor is used as an intermediate medium when the second processor interacts with the peripheral controller, and the first processor has the authority of directly accessing the peripheral controller; the input and output processor comprises a special processor core, the processor core is externally connected with a first debugging interface, the first processor is externally connected with a second debugging interface, and the debugging equipment debugs the processor core through the first debugging interface and / or accesses the first processor through the second debugging interface, so that the first processor debugs the peripheral controller. According to the method, the input and output processor and the peripheral controller in the SoC can be debugged, the peripheral equipment can be controlled through the input and output processor, and the actual application requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a debugging method, system and storage medium. Background Art

[0002] In existing applications, the System on Chip (SoC) communicates with external devices and controls the operation of external devices, where the external devices include serial port devices, audio devices, storage devices, etc. In order to control the external devices, the SoC integrates the corresponding peripheral controllers of each external device, and the peripheral controllers communicate with each other, and the control of the corresponding external devices is achieved by accessing the peripheral controllers.

[0003] The inventors have discovered that the Input / Output Processor (IOP) can be applied to external device management. However, how to debug the Input / Output Processor and peripheral controllers integrated in the SoC to ensure that the SoC can normally control the operation of external devices has become one of the technical problems that technical personnel in this field need to solve first. Summary of the invention

[0004] In view of this, the present application is committed to providing a debugging method, system and storage medium to debug the input and output processor and peripheral controller integrated in the SoC, ensuring that the operation of external devices can be normally controlled by the input and output processor to meet actual application needs.

[0005] In a first aspect, the present application provides a debugging method, which is applied to a debugging system including a debugging device and a chip to be tested, wherein the chip to be tested includes a first processor, a second processor, an input-output processor, and at least one peripheral controller; the input-output processor serves as an intermediate medium when the second processor interacts with the at least one peripheral controller, and the first processor has the authority to directly access the peripheral controller; the input-output processor includes at least one dedicated processor core, and the processor core is externally connected to a first debugging interface; the first processor is externally connected to a second debugging interface, and the method includes the following steps performed by the debugging device:

[0006] In response to the debugging instruction, the processor core is debugged through the first debugging interface, and / or the first processor is accessed through the second debugging interface, so that the first processor debugs the peripheral controller with the permission.

[0007] Based on the above content, the debugging method provided by the present application is applied to a test system including a debugging device and a chip to be tested, wherein the chip to be tested includes a first processor, a second processor, an input-output processor and at least one peripheral controller; the input-output processor serves as an intermediate medium when the second processor interacts with at least one peripheral controller, and the first processor has the right to directly access the peripheral controller; the input-output processor includes at least one dedicated processor core, the processor core is externally connected to a first debugging interface, and the first processor is externally connected to a second debugging interface. Based on this, the debugging device responds to the debugging instruction, debugs the processor core through the first debugging interface, and / or accesses the first processor through the second debugging interface, so that the first processor uses the right to access the peripheral controller to debug the peripheral controller. Therefore, the debugging method provided by the present invention can debug the input-output processor and each peripheral controller integrated in the SoC, ensure that the second processor can normally control the operation of the external device through the input-output processor, and meet the actual application needs.

[0008] In a possible implementation, debugging the processor core through the first debugging interface includes:

[0009] Sending a first debugging instruction to the processor core through the first debugging interface, where the first debugging instruction is used to control the processor core to feedback first debugging information;

[0010] The processor core is debugged according to the first debugging information.

[0011] In the present application, the processor core of the input-output processor is debugged using a first debugging interface directly connected to the processor core, that is, the debugging device controls the feedback of first debugging information through a first debugging instruction and debugs the processor core according to the obtained first debugging information. Since the first debugging interface is directly connected to the processor core of the input-output processor, the debugging device can directly access the processor core and debug it, which can effectively improve the efficiency of information interaction between the debugging device and the processor core, thereby improving the efficiency of debugging the processor core.

[0012] In a possible implementation manner, accessing the first processor through the second debugging interface so that the first processor debugs the peripheral controller using the permission includes:

[0013] Sending a second debugging instruction to the first processor through the second debugging interface, the first processor being configured to use the permission to send the second debugging instruction to the peripheral controller and obtain second debugging information fed back by the peripheral controller in response to the second debugging instruction;

[0014] The second debugging information is acquired through the second debugging interface, and the peripheral controller is debugged according to the second debugging information.

[0015] In the present application, the debugging device sends a second debugging instruction to the first processor through the second debugging interface, and uses the first processor's permission to access the peripheral controller to access the peripheral controller, thereby realizing the debugging information interaction between the debugging device and any peripheral controller, and completing the debugging of any peripheral controller. This method makes full use of the feature that the first processor can access the peripheral controller, and uses the first processor as a medium to debug each peripheral controller, thereby avoiding the need to set up a separate debugging interface for debugging each peripheral controller, which can not only reduce the debugging cost, but also improve the debugging efficiency.

[0016] In a possible implementation manner, the debugging method provided in the first aspect of the present application further includes:

[0017] Obtaining the operation log of the chip to be tested;

[0018] If the operation log shows that the input and output processor operates abnormally, the debugging instruction is generated.

[0019] In the present application, it is determined whether the input-output processor is operating abnormally based on the operation log of the chip under test. When the operation log shows that the input-output processor is operating abnormally, a debugging instruction is generated to debug the input-output processor. The operation log is the information output to the outside during the operation of the chip under test, and can reflect the true operating status of all components including the input-output processor. This method makes full use of the existing information to evaluate whether the input-output processor needs to be debugged, which can save the time required to obtain other information separately to monitor the operating status of the input-output processor, and helps to improve the debugging efficiency of the chip under test.

[0020] In a possible implementation, the debugging device includes a serial port module and the chip to be tested is in a running state;

[0021] Obtaining the operation log of the chip under test includes:

[0022] Obtain the operation log of the chip under test fed back by the serial port module.

[0023] In this application, a serial port module is used to obtain the operation log of the chip under test. Since the chip under test itself usually uses a serial port to output the operation log, the debugging device sets a serial port module to match the chip under test. After the connection relationship is established, the operation log can be directly obtained, which is convenient and fast.

[0024] In a second aspect, the present application provides a debugging system, comprising: a debugging device and a chip to be tested, wherein the chip to be tested comprises a first processor, a second processor, an input-output processor, and at least one peripheral controller; the input-output processor serves as an intermediate medium when the second processor interacts with the at least one peripheral controller, and the first processor has the authority to directly access the peripheral controller; the input-output processor comprises at least one dedicated processor core, and the processor core is externally connected to a first debugging interface; the first processor is externally connected to a second debugging interface, wherein,

[0025] The debugging device is used to debug the processor core through the first debugging interface,

[0026] and / or,

[0027] The debugging device is further used to: access the first processor through the second debugging interface, so that the first processor debugs the peripheral controller using the permission.

[0028] In the present application, the chip to be tested includes a first processor, a second processor, an input-output processor and at least one peripheral controller; the input-output processor serves as an intermediate medium when the second processor interacts with at least one peripheral controller, and the first processor has the right to directly access the peripheral controller; the input-output processor includes at least one dedicated processor core, the processor core is externally connected to a first debugging interface, and the first processor is externally connected to a second debugging interface. Based on this, the debugging device responds to the debugging instruction, debugs the processor core through the first debugging interface, and / or accesses the first processor through the second debugging interface, so that the first processor uses the right to access the peripheral controller to debug the peripheral controller. The debugging system provided by the present invention can debug the input-output processor and each peripheral controller integrated in the SoC, ensuring that the second processor can normally control the operation of the external device through the input-output processor to meet the actual application requirements.

[0029] In a possible implementation, the debugging device includes a host computer, a first simulator and a second simulator, wherein:

[0030] The host computer is connected to the first simulator and the second simulator respectively;

[0031] The first simulator is connected to the first debugging interface, and the first simulator is used to implement debugging information interaction between the host computer and the processor core;

[0032] The second simulator is connected to the second debugging interface, and the second simulator is used to implement debugging information interaction between the host computer and the first processor.

[0033] In the present application, an optional implementation method of a debugging device is provided, in which the host computer can interact with the processor core for debugging information through the first emulator, and can interact with the first processor for debugging information through the second emulator, that is, to realize information interaction with each peripheral controller. It can be seen that in the debugging device provided by the present system, the interaction path of the debugging information is extremely simple and passes through very few nodes, thereby improving the interaction efficiency of the debugging information, and thus improving the efficiency of the entire debugging process.

[0034] In a possible implementation, the debugging device further includes a serial port module, wherein:

[0035] The serial port module is connected to the serial ports of the host computer and the chip to be tested respectively;

[0036] The host computer obtains the operation log of the chip under test through the serial port module.

[0037] In this application, a serial port module is used to obtain the operation log of the chip under test. Since the chip under test itself usually uses a serial port to output the operation log, the debugging device sets a serial port module to match the chip under test. After the connection relationship is established, the operation log can be directly obtained, which is convenient and fast.

[0038] In a possible implementation, the first debugging interface includes a Joint Test Action Group (JTAG) interface, and the second debugging interface includes a JTAG interface.

[0039] In this application, the JTAG interface is used to connect the processor core of the input and output processor and the first processor. Since the JTAG interface is a commonly used interface in the chip debugging process, such a setting can reduce the matching difficulty between the chip to be tested and the debugging equipment, thereby building the debugging system faster and improving debugging efficiency.

[0040] In a third aspect, the present application provides a computer-readable storage medium, comprising: a computer program stored therein, wherein the computer program, when executed, implements the debugging method as described in any one of the first aspects of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 It is a structural block diagram of a debugging system provided by an embodiment of the present invention.

[0043] Figure 2 It is a structural block diagram of another debugging system provided by an embodiment of the present invention.

[0044] Figure 3 It is a flowchart of a debugging method provided by an embodiment of the present invention.

[0045] Figure 4 It is a flowchart of another debugging method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] As mentioned above, in existing applications, SoC communicates with external devices and controls the operation of external devices, where the external devices include serial port devices, audio devices, storage devices, etc. In order to control external devices, the SoC integrates peripheral controllers corresponding to each external device, and sends control instructions to the external device or obtains feedback information from the external device by accessing the peripheral controller, thereby controlling the corresponding external device.

[0048] The inventors have found that SoC controls external devices by accessing peripheral controllers, which will occupy a large amount of resources of the existing processor of SoC. In particular, in scenarios where frequent information interaction with external devices is required, SoC needs to provide a large amount of software and hardware resources to complete this task. The input / output processor (IOP) can be used for external device management. Therefore, the input / output processor can be integrated into the SoC, and the input / output processor can be used to manage external devices. However, how to debug the input / output processor and each peripheral controller integrated in the SoC to ensure that the SoC can control the operation of external devices normally has become one of the technical problems that technical personnel in this field need to solve first.

[0049] To solve the above technical problems, the present application provides a debugging system that can debug the input and output processors and peripheral controllers integrated in the SoC to ensure that the operation of external devices can be normally controlled by the input and output processors to meet actual application needs.

[0050] See also Figure 1As shown, the debugging system provided by the present application includes: a debugging device 10 and a chip under test 20, wherein the chip under test 20 includes a first processor 210, a second processor 220, an input-output processor 230, a first debugging interface 240, a second debugging interface 250, and at least one peripheral controller (in this embodiment, peripheral controllers 1 to 5 are shown), and the input-output processor 230 includes at least one dedicated processor core 2301 ( Figure 1 1 is shown in FIG.

[0051] Specifically, in the present application, the first processor 210 has access rights to any address space other than the processor core 2301, that is, it can access the entire chip address domain of the chip under test 20 except the processor core 2301 of the input and output processor 230, that is, the first processor 210 has the right to directly access each peripheral controller.

[0052] In a possible implementation, the first processor 210 includes a secure processor (Secure Element, SE), which is a high-security module in the chip under test 20, and is usually used to implement secure storage (such as storing encryption keys, certificates, identity information, etc.), secure identity authentication, encryption operations, providing a trusted execution environment, and payment operations in the financial field, etc. Of course, the first processor 210 can also be used to implement other functions, which are not described in detail here. When implementing the debugging system provided by this application, the advantage of SE having the authority to access each peripheral controller is used to implement the debugging of each peripheral controller. The specific debugging process is expanded in the subsequent content and is not described in detail here.

[0053] Furthermore, the first processor 210 is externally connected to the second debugging interface 250. It should be noted that the second debugging interface 250 is an interface specially set in the chip under test 20 for accessing the first processor 210, and is also an existing debugging interface of the chip under test 20, not a debugging interface newly added after the chip under test 20 integrates the input and output processor 230. In an optional implementation, the second debugging interface uses a Joint Test Action Group (JTAG) interface.

[0054] The second processor 220 is usually used to carry an operating system and an application program to implement the preset functions of the chip under test 20 and to perform necessary information interaction with the user. In the prior art, the second processor 220 is also used to control external devices. In a possible implementation, the second processor 220 includes an application processor (AP). Of course, in different chip architectures, the second processor 220 can also be other processors that interact with the peripheral controller to control the external device. They are not listed here one by one. Under the premise of not exceeding the core idea of ​​this application, they also belong to the scope of protection of this application.

[0055] The input / output processor 230 serves as an intermediate medium when the second processor 220 interacts with each peripheral controller, and can realize information interaction between the second processor 220 and any peripheral controller. For the second processor 220, most of the interaction processes with the peripheral controllers in the prior art can be realized by the input / output processor 230, so the occupation of the software and hardware resources of the second processor 220 by the external devices can be greatly reduced, so that the second processor 220 can perform other more important tasks.

[0056] Combination Figure 1 As shown, the input-output processor 230 is provided with a processor core 2301. In a possible implementation, the input-output processor 230 is also provided with at least one inter-core channel, and the inter-core channel corresponds to the peripheral controller one-to-one, and the second processor 220 can access each inter-core channel. Based on this, assuming that the second processor 220 needs to access the peripheral controller 1, the second processor 220 first stores the request data in the inter-core channel corresponding to the peripheral controller 1, and then notifies the processor core 2301 in an interrupt manner. The processor core 2301 extracts the request data in the inter-core channel corresponding to the peripheral controller 1, and accesses the peripheral controller 1 based on the obtained request data. After obtaining the response data of the peripheral controller 1, the processor core 2301 stores the response data in the inter-core channel corresponding to the peripheral controller 1, and also notifies the second processor 210 in an interrupt manner. The second processor 210 accesses the inter-core channel and reads the response data of the peripheral controller 1, thereby realizing the information interaction between the second processor 210 and the peripheral controller 1, that is, realizing the control of the external device connected to the peripheral controller 1.

[0057] Furthermore, the processor core 2301 in the input-output processor 230 is externally connected to the first debugging interface 240. It can be understood that since the input-output processor 230 is a newly added processor in the chip to be tested 20, the first debugging interface 240 is also a newly added debugging interface for the chip to be tested 20. It can be seen that in order to debug the input-output processor 230 and each peripheral controller, the system only needs to add a new debugging interface. In an optional embodiment, the interface type of the first debugging interface 240 is the same as the type of the aforementioned second debugging interface 250, and both use the JTAG interface. Since the JTAG interface is a commonly used interface in the chip debugging process, such a setting can reduce the matching difficulty between the chip to be tested and the debugging device, thereby building a debugging system faster and improving debugging efficiency.

[0058] The debugging device 10 is connected to the first debugging interface 240 and the second debugging interface 250 respectively, and debugs the processor core 2301 through the first debugging interface 240, and / or accesses the first processor 210 through the second debugging interface 250, so that the first processor 210 uses its permission to access each peripheral controller to debug the peripheral controller.

[0059] In actual applications, the input-output processor 230 serves as a processor for managing external devices in the chip under test 20 and has higher permissions. The core cannot be directly accessed by other processors in the chip under test 20, such as the second processor 220. Based on this, a first debugging interface 240 is set in the chip under test 20, so that the debugging device 10 can directly access the processor core 2301 of the input-output processor 230 through the first debugging interface 240 to debug the processor core 2301.

[0060] Furthermore, as mentioned above, the first processor 210 has the authority to directly access each peripheral controller, and the chip under test 20 itself is provided with a second debugging interface 250 for debugging the first processor 210. Based on this, the debugging device 10 accesses the first processor 210 through the second debugging interface 250, and further debugs the peripheral controller through the first processor 210 using its authority to access each peripheral controller. Such a setting solves the problem that the debugging device 10 cannot directly access the peripheral controller, and at the same time, it can also avoid adding a debugging path for debugging the peripheral controller on the chip under test 20, which helps to reduce the debugging cost and improve the debugging efficiency.

[0061] To summarize, in the debugging system provided in the application, the chip to be tested includes a first processor, a second processor, an input-output processor and at least one peripheral controller; the input-output processor serves as an intermediate medium when the second processor interacts with at least one peripheral controller, and the first processor has the right to directly access the peripheral controller; the input-output processor includes at least one dedicated processor core, the processor core is externally connected to a first debugging interface, and the first processor is externally connected to a second debugging interface. Based on this, the debugging device responds to the debugging instruction, debugs the processor core through the first debugging interface, and / or accesses the first processor through the second debugging interface, so that the first processor uses the right to access the peripheral controller to debug the peripheral controller. The debugging system provided by the present invention can debug the input-output processor and each peripheral controller integrated in the SoC, ensure that the second processor can normally control the operation of the external device through the input-output processor, and meet the actual application needs.

[0062] On this basis, for the chip under test, the first debug interface used to debug the input and output processor is a newly added debug interface, and other peripheral controllers are debugged through the debug interface of the first processor and the first processor's access rights to peripheral controls, thereby making full use of the existing debug interface of the chip under test, that is, only one new debug interface needs to be added. Such a setting can avoid increasing the complexity of the internal bus of the on-chip system.

[0063] For further information, see Figure 2 , Figure 2 It is a structural block diagram of another debugging system provided by the present application. On the basis of the aforementioned embodiment, in the debugging system provided by this embodiment, the debugging device 10 includes a host computer 110, a first simulator 120 and a second simulator 130.

[0064] Combination Figure 2 As shown, the host computer 110 is connected to the first emulator 120, and the first emulator 120 is connected to the first debugging interface 240, that is, the host computer 110 is connected to the first debugging interface 240 through the first emulator 120. In actual applications, the host computer 110 records debugging software, and the debugging software can issue debugging instructions to the processor core 2301 through the aforementioned path. Correspondingly, the processor core 2301 feeds back debugging information to the host computer 110 through the same path. It can be understood that the data format between the host computer 110 and the processor core 2301 is not the same, so it is necessary to realize the data format conversion between the host computer 110 and the processor core 2301 through the first emulator 120, so as to realize the interaction of debugging information.

[0065] Correspondingly, the host computer 110 is connected to the second emulator 130, and the second emulator 130 is connected to the second debugging interface 250, that is, the host computer 110 is connected to the first processor 210 through the second emulator 130. Similar to the function of the aforementioned first emulator 120, the second emulator 130 is used to realize the data format conversion between the host computer 110 and the first processor 210, thereby completing the debugging information interaction.

[0066] As for the debugging process of the processor core 2301 and each peripheral controller in the input and output processor 230, it can be implemented by referring to the debugging methods recorded in the aforementioned content and subsequent content, and will not be described in detail here.

[0067] To sum up, compared with the aforementioned embodiments, this embodiment provides an optional implementation method of a debugging device. The host computer can interact with the processor core for debugging information through the first emulator, and can interact with the first processor for debugging information through the second emulator, that is, to realize information interaction with each peripheral controller. It can be seen that in the debugging device provided by this system, the interaction path of the debugging information is extremely simple and passes through very few nodes. Since the interaction efficiency of the debugging information is improved, the efficiency of the entire debugging process is improved.

[0068] It should be noted that, in actual applications, the chip under test is usually provided with a serial port for outputting the operation log to the outside. Based on this, on the basis of the aforementioned embodiment, the debugging device also includes a serial port module, which is respectively connected to the serial ports of the host computer and the chip under test, and the operation log of the chip under test is obtained through the serial port module. It is understandable that, since the chip under test itself usually uses a serial port to output the operation log to the outside, the debugging device is provided with a serial port module to match the chip under test. After the connection relationship is established, the operation log can be directly obtained, which is convenient and fast.

[0069] It should also be noted that in Figure 1 as well as Figure 2In the illustrated embodiment, each peripheral controller is arranged outside the input-output processor 230. The input-output processor 230 is mainly used as an intermediate medium for realizing data interaction between the second processor 220 and each peripheral controller. The specific external device control is still realized by the peripheral controller. The function of the input-output processor 230 is more specific and the overall architecture is simple. In another optional implementation, each peripheral controller can also be integrated into the input-output processor 230, so that the input-output processor 230 integrates the aforementioned intermediate medium and the function of controlling the external device. Further, it is also helpful to realize the unified design and layout of the peripheral controller and the input-output processor 230. The iterative upgrade of the peripheral controller is invisible to the user. The manufacturer does not need to provide any information of the peripheral controller to the user, which is conducive to the complete privatization of the peripheral controller. At the same time, it ensures that the second processor 220 cannot directly access the peripheral controller, thereby improving security.

[0070] The present application also provides a debugging method, which is applied to the debugging system provided in any of the above embodiments, wherein, when the debugging device includes a host computer, the method is specifically applied to the host computer. As for the specific implementation of the debugging system, please refer to the above content, which will not be repeated here. Figure 3 The debugging method provided in this embodiment includes the following steps.

[0071] S100 . In response to a debugging instruction, debug the processor core through the first debugging interface, and / or access the first processor through the second debugging interface, so that the first processor debugs the peripheral controller using the permission to access the peripheral controller.

[0072] First of all, it should be noted that according to the operating conditions or test results of the chip under test, it may be necessary to debug at least one of the processor core and the peripheral controller. Therefore, in actual applications, the processor core and / or the peripheral controller can be debugged according to actual debugging requirements.

[0073] Specifically, in response to a debugging instruction, when debugging a processor core through a first debugging interface, since the first debugging interface is directly connected to the processor core, the debugging device can directly access the processor core through the first debugging interface. Based on this, the debugging device sends a first debugging instruction to the processor core through the first debugging interface. For example, the first debugging instruction can carry a register address and a storage space address, etc. The processor core responds to the first debugging instruction and feeds back first debugging information, for example, the specific content stored in the corresponding address can be fed back. The debugging device further debugs the processor core according to the first debugging information. As for the specific implementation of debugging the processor core according to the first debugging information, reference can be made to the relevant technology and will not be described in detail here.

[0074] In this embodiment, the processor core of the input-output processor is debugged using a first debugging interface directly connected to the processor core, that is, the debugging device controls the feedback of first debugging information through a first debugging instruction and debugs the processor core according to the obtained first debugging information. Since the first debugging interface is directly connected to the processor core of the input-output processor, the debugging device can directly access the processor core and debug it, which can effectively improve the efficiency of information interaction between the debugging device and the processor core, thereby improving the efficiency of debugging the processor core.

[0075] In response to the debugging instruction, in the case of debugging the peripheral controller through the second debugging interface, the debugging device sends the second debugging instruction to the first processor through the second debugging interface. For example, the second debugging instruction can be an instruction to read the preset register data in the peripheral controller. The first processor is used to use the authority to access the peripheral controller to send the second debugging instruction to the peripheral controller, and obtain the second debugging information fed back by the peripheral controller in response to the second debugging instruction. Following the previous example, the peripheral controller feeds back the data in the preset register, and the debugging device further obtains the second debugging information through the second debugging interface, and debugs the peripheral controller according to the obtained second debugging information. As for the specific implementation of debugging the peripheral controller based on the second debugging information, reference can be made to the relevant technology, which will not be described in detail here.

[0076] In this embodiment, the debugging device sends a second debugging instruction to the first processor through the second debugging interface, and uses the first processor's permission to access the peripheral controller to access the peripheral controller, thereby realizing the debugging information interaction between the debugging device and any peripheral controller, and completing the debugging of any peripheral controller. This method makes full use of the feature that the first processor can access the peripheral controller, and uses the first processor as a medium to debug each peripheral controller, thereby avoiding the internal bus of the system on chip from being too complicated, and providing a separate debugging path for each peripheral controller, which can not only reduce the debugging cost, but also improve the debugging efficiency.

[0077] To sum up, through the debugging method provided by the present application, the debugging device can debug the processor core through the first debugging interface, and / or access the first processor through the second debugging interface, so that the first processor can debug the peripheral controller using the permission to access the peripheral controller. Therefore, the input and output processors and each peripheral controller integrated in the SoC can be debugged to ensure that the second processor can normally control the operation of external devices through the input and output processors to meet actual application requirements.

[0078] It should be noted that the debugging method provided in the above embodiment is applicable when the chip under test system is running normally or the system is down. However, considering that in some application scenarios, if the chip under test system is running normally, the chip under test may not be debugged temporarily. Based on this, this application provides another debugging method, see Figure 4 , the debugging method provided in this embodiment includes the following steps.

[0079] S200, obtaining the operation log of the chip to be tested, and generating a debugging instruction when the operation log shows that the input and output processor operates abnormally.

[0080] As mentioned above, the chip under test is usually provided with a serial port for outputting the operation log, and the operation log can reflect the operation status of the input and output processor. Based on this, the debugging device also includes a serial port module, and the host computer in the debugging device is connected to the serial port of the chip under test through the serial port module to obtain the operation log of the chip under test.

[0081] If the input / output processor is determined to be abnormal and needs to be debugged through analysis of the operation log, a debugging instruction is generated and the subsequent S210 is further executed; on the contrary, if the input / output processor is determined to be normal according to the operation log, the debugging process can be suspended.

[0082] S210. In response to a debugging instruction, debug the processor core through the first debugging interface, and / or access the first processor through the second debugging interface, so that the first processor debugs the peripheral controller using the permission to access the peripheral controller.

[0083] In an optional implementation, the specific implementation of S210 can refer to Figure 3 The relevant contents of S100 in the illustrated embodiment will not be repeated here.

[0084] In summary, the debugging method provided in this embodiment, based on the aforementioned embodiment, determines whether the input-output processor is operating abnormally based on the operation log of the chip under test, and generates debugging instructions to debug the input-output processor when the operation log shows that the input-output processor is operating abnormally. The operation log is the information output to the outside during the operation of the chip under test, and can reflect the true operating status of all components including the input-output processor. This method makes full use of the existing information to evaluate whether the input-output processor needs to be debugged, which can save the time required to separately obtain other information to monitor the operating status of the input-output processor, and helps to improve the debugging efficiency of the chip under test.

[0085] In some embodiments, this embodiment further provides a computer-readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc., in which one or more instructions for implementing the above steps are stored, and when the one or more instructions are executed by one or more processors, the processors execute the debugging method described above. For the relevant specific implementation, please refer to the above description, which will not be repeated here.

[0086] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the debugging method according to various embodiments of the present application described in the above content of this specification.

[0087] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0088] Those skilled in the art will appreciate that the contents disclosed in this disclosure may be subject to various modifications and improvements. For example, the various devices or components described above may be implemented by hardware, or by software, firmware, or a combination of some or all of the three.

[0089] In addition, although the present disclosure makes various references to certain units in the system according to embodiments of the present disclosure, any number of different units can be used and run on the client and / or server. The units are only illustrative, and different aspects of the system and method can use different units.

[0090] Flowcharts are used in this disclosure to illustrate the steps of the method according to the embodiments of the present disclosure. It should be understood that the preceding or following steps are not necessarily performed precisely in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes.

[0091] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, etc. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of a software functional module. The present disclosure is not limited to any particular form of combination of hardware and software.

[0092] Unless otherwise defined, all terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an idealized or highly formal sense, unless explicitly defined as such herein.

[0093] The above is an explanation of the present disclosure and should not be considered as a limitation thereof. Although several exemplary embodiments of the present disclosure are described, it will be readily understood by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined in the claims. It should be understood that the above is an explanation of the present disclosure and should not be considered to be limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims

1. A debugging method, characterized in that: The method is applied to a debugging system including a debugging device and a chip under test, wherein the chip under test includes a first processor, a second processor, an input / output processor, and at least one peripheral controller; the input / output processor serves as an intermediary when the second processor interacts with the at least one peripheral controller, and the first processor has permission to directly access the peripheral controller; the input / output processor includes at least one dedicated processor core, which is externally connected to a first debugging interface; the first processor is externally connected to a second debugging interface, and the method includes the following steps performed by the debugging device: In response to a debugging instruction, the processor core is debugged through the first debugging interface, and / or the first processor is accessed through the second debugging interface, so that the first processor debugs the peripheral controller using the permission.

2. The method according to claim 1, characterized in that Debugging the processor core through the first debugging interface includes: sending a first debugging instruction to the processor core through the first debugging interface, where the first debugging instruction is used to control the processor core to feed back first debugging information; Debug the processor core according to the first debugging information.

3. The method according to claim 1, characterized in that Accessing the first processor through the second debugging interface so that the first processor debugs the peripheral controller using the permission includes: sending a second debugging instruction to the first processor through the second debugging interface, wherein the first processor is configured to use the permission to send the second debugging instruction to the peripheral controller and obtain second debugging information fed back by the peripheral controller in response to the second debugging instruction; The second debugging information is obtained through the second debugging interface, and the peripheral controller is debugged according to the second debugging information.

4. The method according to claim 1, wherein Also includes: Obtaining the operation log of the chip under test; If the operation log shows that the input / output processor operates abnormally, the debugging instruction is generated.

5. The method according to claim 4, characterized in that The debugging device includes a serial port module and the chip to be tested is in a running state; Obtaining the operation log of the chip under test, including: Obtain the operation log of the chip under test fed back by the serial port module.

6. A debugging system, characterized in that: include: A debugging device and a chip to be tested, wherein the chip to be tested includes a first processor, a second processor, an input / output processor, and at least one peripheral controller; The input / output processor serves as an intermediate medium when the second processor interacts with the at least one peripheral controller, and the first processor has direct access to the peripheral controller; the input / output processor includes at least one dedicated processor core, and the processor core is externally connected to a first debugging interface; the first processor is externally connected to a second debugging interface, wherein, The debugging device is used to debug the processor core through the first debugging interface, and / or, The debugging device is further configured to access the first processor through the second debugging interface, so that the first processor debugs the peripheral controller using the permission.

7. The system according to claim 6, characterized in that The debugging device includes a host computer, a first simulator and a second simulator, wherein: The host computer is connected to the first simulator and the second simulator respectively; The first emulator is connected to the first debugging interface, and the first emulator is used to implement debugging information interaction between the host computer and the processor core; The second emulator is connected to the second debugging interface, and is used to implement debugging information interaction between the host computer and the first processor.

8. The system according to claim 7, characterized in that The debugging device also includes a serial port module, wherein: The serial port module is connected to the serial ports of the host computer and the chip to be tested respectively; The host computer obtains the operation log of the chip under test through the serial port module.

9. The system according to any one of claims 5 to 8, characterized in that The first debug interface includes a Joint Test Action Group (JTAG) interface, and the second debug interface includes a JTAG interface.

10. A computer-readable storage medium, characterized in that include: A computer program is stored, and when the computer program is executed, the debugging method according to any one of claims 1 to 5 is implemented.