CHT Technology Processor Online Debugging System
By moving the debugging function to the software online debugging thread, the problem of large resources occupancy of hardware debugging circuits is solved, and high-performance debugging of small and low-cost processors is realized, suitable for multi-core systems.
Patent Information
- Application Number
- CN202211288168.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-10-20
AI Technical Summary
The existing processor debugging methods use hardware debugging circuits, which leads to large size and high cost, and are not suitable for small and low-cost processors.
The online debugging system is adopted, and the debugging function is mainly placed in the online debugging thread of the software part to reduce hardware resource usage and is suitable for CHT technology processors.
Save system hardware resources, reduce processor scale, reduce costs, and is suitable for small and low-cost processors, while improving performance. It is suitable for single-core multi-threaded, isomorphic multi-core and heterogeneous multi-core systems.
Smart Images

Figure CN115629973B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuits, in particular to an online debugging design system for a CHT technology (single-issue multi-thread dynamic loop parallel technology) processor. Background Art
[0002] The integrated circuit industry is receiving key support. Processor architecture is the foundation of processor construction. Common architectures are mostly foreign, such as the x86 and ARM architectures. These architectures face significant limitations, necessitating the need for new architectures. New architecture technologies are the core of independent, controllable, secure, and reliable domestic processors, but they also represent a significant challenge. Currently, innovations in architecture technology are limited, and the need is urgent. Architecture technology holds significant strategic importance and a broad market potential. The accompanying SoC technology system is equally crucial.
[0003] Existing processor debugging uses hardware debugging circuits, which occupy the hardware circuits of the processor core, making the circuit larger and increasing the cost. Summary of the Invention
[0004] The present invention aims to provide an online debugging method for CHT technology processors. This method implements a large number of debugging functions in the software component (072 - Online Debugging Thread (program)). This method conserves system hardware resources and reduces the size of the 072 - CHT core. The method is particularly suitable for small, low-cost processors and is more conducive to achieving high-performance 072 - CHT cores. The method is compatible with single-core multithreaded systems, homogeneous multicore systems, and heterogeneous multicore systems, providing important guidance for the design of CHT technology processors.
[0005] The technical solution of the present invention includes: a CHT technology processor online debugging system, the online debugging system includes:
[0006] JTAG interface module, test access port module, online debugging module, trigger module, debug mode module, debug registers and CHT core;
[0007] The JTAG interface module is connected to the test access port module, the test access port module is connected to the online debugging module, the online debugging module is connected to the trigger module and the debug register, the debug register is connected to the CHT core, and the CHT core is connected to the trigger module and the debug mode module;
[0008] The online debugging module includes an online debugging module interface, an abstract command access register, a fast access register, a reset control unit, and a Hart field recovery execution unit;
[0009] The online debugging module interface is connected to the test access port module, the abstract command access register is connected to the debug register, and the fast access register and Hart field recovery execution unit are connected to the trigger module;
[0010] The CHT core includes an online debugging thread, which is connected to the debugging register via core connection access.
[0011] Furthermore, the interface information between modules is as follows:
[0012] The test access port module is connected to the online debugging module via signal lines addr, di, opi, do, and opo;
[0013] The online debugging module is connected to the debugging register through signal lines hart_number, debug_handler_en, addr, di, do, op_type, dm_valid, and core_valid;
[0014] The debug register is connected to the CHT core via a signal line Core link access;
[0015] The online debugging module is connected to the trigger module and the debugging mode module through the signal lines quickaccess, hart_number, multiple_haltreq, debug_mode, single_haltreq, and nonexistent;
[0016] The CHT core is connected to the trigger module and the debug mode module through signal lines icode, ipc, ihn, ipm, and Register & Memory access.
[0017] Furthermore, the CHT core supports the special debugging breakpoints, CHT technology's differential pipeline normalization arbitration rotation blocking stack transfer mechanism, and the stack transfer information includes the special debugging breakpoints.
[0018] Furthermore, the CHT core supports the online debugging thread; the online debugging thread is a software thread, and its main function is to perform data interaction between debug registers and debug target resources.
[0019] Furthermore, it also includes an interrupt control unit, which is connected to the debugging mode module. The online debugging thread cooperates with the interrupt control unit, the execution process follows the interrupt process, and a fixed entry of the CHT online debugging process is preset.
[0020] Furthermore, the debug register includes access address, data, operation type, and debug breakpoint; the debug register is independent of the CHT core or included in the CHT core; the operation type includes abstract command access register operation, fast access register operation, and breakpoint operation.
[0021] Furthermore, the online debugging module supports two access modes: abstract command access register and fast access register.
[0022] Furthermore, the number of triggers in the trigger module is the same as the number of trigger points in each CHT core.
[0023] Furthermore, the JTAG interface module is used to receive an external trigger to generate a debugging protocol and pass it to the test access port module;
[0024] The test access port module is used to parse the received protocol, identify the CHT online debugging process information, and pass it to the online debugging module;
[0025] The online debugging module is used to package information, send operation data and addresses to the debugging register, send trigger parameters to the trigger module and debugging mode module, and control the reset control unit to initialize and start;
[0026] The online debugging thread inside the CHT core is used to wait for startup according to the debug register and finally complete the data exchange. The operation target inside the CHT core completes the data exchange through the system bus.
[0027] The trigger module and the debug mode module are used to obtain trigger parameters and complete the settings;
[0028] The interrupt control unit connected to the debug mode module is used to notify the online debugging thread inside the CHT core and the special debugging breakpoint inside the CHT core to cooperate to achieve online debugging after receiving the trigger module or the trigger hit message sent by the debug mode module;
[0029] The timer connected to the debugging mode module determines whether to continue counting during the online debugging process according to the setting;
[0030] The CHT core is used to obtain breakpoint instructions and implement debugging breakpoint actions within the CHT core.
[0031] Furthermore, the trigger module and the debug mode module are used to generate an online debug request signal;
[0032] The online debugging thread and special debugging breakpoints in the CHT core complete the coordinated operation and indicate that the core_valid signal of the CHT core is valid, notifying the CHT core that it is ready and in debugging state.
[0033] The online debugging module dm_valid is effective, indicating that an external online debugging target signal is received;
[0034] The online debugging thread and special debugging breakpoint inside the CHT core complete the coordinated operation and indicate that the core_valid signal of the CHT core is valid, informing the CHT core that the target operation is completed and the debugging state is available for data interaction.
[0035] The CHT core completes data interaction with the outside world;
[0036] The dm_valid of the online debugging module is the access validity, indicating the end signal of the external online debugging;
[0037] The online debugging thread and special debugging breakpoint inside the CHT core complete the coordinated operation, indicating that the core_valid signal of the CHT core is a valid feedback, informing the CHT core that the debugging has ended and the exit operation has been executed.
[0038] In summary, the beneficial effects of the present invention are:
[0039] 1. Created an online debugging system for CHT technology processors;
[0040] 2. Invented a new online debugging technology based on the characteristics of CHT technology, which complements each other;
[0041] 3. The present invention implements a large number of debugging functions in the software part (072-Online debugging Thread (online debugging thread) (program)), thereby saving system hardware resources, reducing the scale of 07-CHT core (CHT core), and thus reducing implementation costs;
[0042] 4. Particularly suitable for small and low-cost processors, and more conducive to achieving high-performance 07-CHTcore (CHT core).
[0043] 5. Compatible with single-core multi-threaded systems, homogeneous multi-core systems and heterogeneous multi-core systems;
[0044] It has important guiding significance for the design of CHT technology processors. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The figure shows the block diagram of the CHT technology processor online debugging technology system.
[0046] Figure 2 The figure shows a flow chart of the online debugging method of the CHT technology processor.
[0047] Figure 3 The figure shows the timing details of the online debugging method for the CHT technology processor. DETAILED DESCRIPTION
[0048] The present invention will be further described in detail below with reference to the accompanying drawings.
[0049] The present invention creates an online debugging method for CHT technology processors, inventing a completely new online debugging technology. The present invention implements a large number of debugging functions in the software component (072-Online Debugging Thread (online debugging thread) program), thereby conserving system hardware resources and reducing the size of the 07-CHT core (CHT core). It can also be applied to traditional cores, making it particularly suitable for small, low-cost processors and more conducive to achieving high-performance 07-CHT cores. It is compatible with single-core multi-threaded systems, homogeneous multi-core systems, and heterogeneous multi-core systems, and has important guiding significance for the design of CHT technology processors.
[0050] like Figure 1 Shown: CHT technology processor online debugging method - CHT Online Debugging
[0051] The entire FLOW (CHT online debugging process) technical system includes:
[0052]
[0053]
[0054] The internal interface information is as follows:
[0055]
[0056]
[0057]
[0058] like Figure 2 As shown in the flowchart, the specific process analysis is as follows:
[0059] S01: External 01-JTAG (JTAG interface module) protocol trigger generation;
[0060] S02: The Debug Transport Module within the 02-Test Access Port Module parses the protocol and identifies the CHT Online Debugging Flow information.
[0061] S03: Packed by 03-Debug Module (online debugging module) and sent to S04, S07, and S11 at the same time;
[0062] S04: Send the operation data and address to 06-Register for debug (debug register);
[0063] S05: The internal 072-Online debugging Thread (program) waits to start and eventually completes data exchange;
[0064] S06: The operation target completes data exchange through the system bus;
[0065] S07: 04-Trigger Module (trigger module) / 05-Debug Mode (debug mode module) obtains the trigger setting parameters and completes the setting;
[0066] S08: 052-Interrupt control (interrupt control unit) receives the trigger hit message sent by 04-Trigger Module (trigger module) / 05-Debug Mode (debug mode module); notifies: 072-Online debugging Thread (online debugging thread) (program) and 071-Special function_Debug break (special debugging breakpoint) to cooperate to achieve online debugging;
[0067] S09: 051-Timer (timer) determines whether to continue counting during online debugging according to the settings;
[0068] S10: 07-CHT core (CHT core) obtains the breakpoint instruction and implements the 071-Special function_Debug break (special debug breakpoint) action;
[0069] S11: 034-Reset control (reset control unit) initializes and starts according to the instructions of the upper level (03-Debug Module (online debugging module)).
[0070] like Figure 3 Shown: CHT technology processor online debugging method timing details analysis. Specific analysis is as follows:
[0071] S01: Online debug request signal (debug_handler_req) takes effect. The external online debug request signal comes from 04-Trigger Module (trigger module) / 05-Debug Mode (debug mode module);
[0072] S02: Internal 072-Online debugging Thread (program) and 071-Special function_Debug break (special debugging breakpoint) complete the coordinated operation and indicate 07-CHT core (CHT core) feedback valid (core_valid), informing 07-CHT core (CHT core) that it is ready and in debugging state;
[0073] S03: 03-Debug Module (online debugging module) access valid (dm_valid) takes effect, and the target signal is debugged externally online;
[0074] S04: Internal 072-Online debugging Thread (program) and 071-Special function_Debug break (special debugging breakpoint) complete the coordinated operation and indicate 07-CHT core (CHT core) feedback valid (core_valid), informing 07-CHT core (CHT core) that the target operation is complete and in debugging state, and data exchange can be carried out;
[0075] S05: Complete data interaction with the outside world;
[0076] S06: 03-Debug Module (online debugging module) access valid (dm_valid) takes effect, and the external online debugging end signal comes;
[0077] S07: Internally, 072-Online debugging Thread (program) and 071-Special function_Debug break (special debugging breakpoint) complete the coordinated operation and indicate 07-CHT core (CHT core) feedback valid (feedback valid) (core_valid), informing that debugging has ended and executing the break operation (continue with the resume operation).
[0078] It should be noted that although the above embodiments have been described herein, this does not limit the scope of patent protection of the present invention. Therefore, based on the innovative concept of the present invention, changes and modifications to the embodiments described herein, or equivalent structural or equivalent process transformations made using the contents of the present invention's description and drawings, and direct or indirect application of the above technical solutions to other related technical fields, are all included in the scope of protection of the present invention's patent.
Claims
1. CHT technology processor online debugging system, characterized by: The online debugging system includes: JTAG interface module, test access port module, online debugging module, trigger module, debug mode module, debug registers and CHT core; The JTAG interface module is connected to the test access port module, the test access port module is connected to the online debugging module, the online debugging module is connected to the trigger module and the debug register, the debug register is connected to the CHT core, and the CHT core is connected to the trigger module and the debug mode module; The online debugging module includes an online debugging module interface, an abstract command access register, a fast access register, a reset control unit, and a Hart field recovery execution unit; The online debugging module interface is connected to the test access port module, the abstract command access register is connected to the debug register, and the fast access register and Hart field recovery execution unit are connected to the trigger module; The CHT core includes an online debugging thread, which is connected to the debug register via core connection access; The trigger module and the debug mode module are used to generate an online debug request signal; The online debugging thread and special debugging breakpoints in the CHT core complete the coordinated operation and indicate that the core_valid signal of the CHT core is valid, notifying the CHT core that it is ready and in debugging state. The online debugging module dm_valid is effective, indicating that an external online debugging target signal is received; The online debugging thread and special debugging breakpoint inside the CHT core complete the coordinated operation and indicate that the core_valid signal of the CHT core is valid, informing the CHT core that the target operation is completed and the debugging state is available for data interaction. The CHT core completes data interaction with the outside world; The dm_valid of the online debugging module is the access validity, indicating the end signal of the external online debugging; The online debugging thread and special debugging breakpoint inside the CHT core complete the coordinated operation, indicating that the core_valid signal of the CHT core is a valid feedback, informing the CHT core that the debugging has ended and the exit operation has been executed.
2. The CHT technology processor online debugging system according to claim 1, characterized in that: The interface information between modules is as follows: The test access port module is connected to the online debugging module via signal lines addr, di, opi, do, and opo; The online debugging module is connected to the debugging register through signal lines hart_number, debug_handler_en, addr, di, do, op_type, dm_valid, and core_valid; The debug register is connected to the CHT core via a signal line Core link access; The online debugging module is connected to the trigger module and the debugging mode module through the signal lines quickaccess, hart_number, multiple_haltreq, debug_mode, single_haltreq, and nonexistent; The CHT core is connected to the trigger module and the debug mode module through signal lines icode, ipc, ihn, ipm, and Register & Memory access.
3. The CHT technology processor online debugging system according to claim 1 or 2, characterized in that: The CHT core supports the special debugging breakpoints. The CHT technology has a differential pipeline normalization arbitration rotation blocking stack transmission mechanism, and the stack transmission information includes the special debugging breakpoints.
4. The CHT technology processor online debugging system according to claim 1 or 2, characterized in that: The CHT core supports the online debugging thread; the online debugging thread is a software thread, and its main function is to perform data interaction between debug registers and debug target resources.
5. The CHT technology processor online debugging system according to claim 1 or 2, characterized in that: It also includes an interrupt control unit, which is connected to the debugging mode module. The online debugging thread cooperates with the interrupt control unit, and the execution process follows the interrupt process, and a fixed entry of the CHT online debugging process is preset.
6. The CHT technology processor online debugging system according to claim 1, characterized in that: The debug register includes access address, data, operation type, and debug breakpoint; the debug register is independent of the CHT core or included in the CHT core; the operation type includes abstract command access register operation, fast access register operation, and breakpoint operation.
7. The CHT technology processor online debugging system according to claim 1, characterized in that: The online debugging module supports two access modes: abstract command access register and fast access register.
8. The CHT technology processor online debugging system according to claim 1, characterized in that: The number of triggers in the trigger module is the same as the number of trigger points in each CHT core.
9. The CHT technology processor online debugging system according to claim 1, characterized in that: The JTAG interface module is used to receive external triggers to generate a debugging protocol and pass it to the test access port module; The test access port module is used to parse the received protocol, identify the CHT online debugging process information, and pass it to the online debugging module; The online debugging module is used to package information, send operation data and addresses to the debugging register, send trigger parameters to the trigger module and debugging mode module, and control the reset control unit to initialize and start; The online debugging thread inside the CHT core is used to wait for startup according to the debug register and finally complete the data exchange. The operation target inside the CHT core completes the data exchange through the system bus. The trigger module and the debug mode module are used to obtain trigger parameters and complete the settings; The interrupt control unit connected to the debugging mode module is used to obtain the trigger module or the trigger hit message sent by the debugging mode module; The online debugging thread inside the CHT core and the special debugging breakpoint inside the CHT core will be notified to operate in coordination to achieve online debugging; The timer connected to the debugging mode module determines whether to continue counting during the online debugging process according to the setting; The CHT core is used to obtain breakpoint instructions and implement debugging breakpoint actions within the CHT core.
Citation Information
Patent Citations
SOC architecture for CHT technology processor
CN115587069A