JTAG (Joint Test Action Group) signal processing method, system and equipment and computer medium

By obtaining the JTAG link structure of the target chip and establishing detection and compensation rules, detecting and compensating the JTAG signal, the problem of JTAG link signal instability is solved, and the accuracy and stability of chip debugging is improved.

CN119064759APending Publication Date: 2024-12-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Under strong electromagnetic interference, the JTAG link signal unstable and incorrect sampling leads to poor chip debugging accuracy, which is difficult to effectively solve in the existing technology.

Method used

通过获取目标芯片的JTAG链路结构,建立检测规则和补偿规则,检测JTAG信号是否异常,并对异常信号进行补偿,传输补偿后的信号至目标芯片的JTAG状态机进行跳转。

Benefits of technology

It improves the accuracy of chip debugging, avoids abnormal signals transmission to the target chip, and enhances the stability and accuracy of debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119064759A_ABST
    Figure CN119064759A_ABST
Patent Text Reader

Abstract

The invention discloses a JTAG (Joint Test Action Group) signal processing method, system and device and a computer medium, relates to the technical field of semiconductors, and is applied to a JTAG engine to obtain a JTAG link structure of a target chip, and the JTAG engine is arranged on the target chip. Establishing a detection rule and a compensation rule according to the JTAG link structure; obtaining a first JTAG signal, wherein the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool; detecting whether the first JTAG signal is abnormal based on a detection rule; in response to the abnormality of the first JTAG signal, compensating the first JTAG signal based on a compensation rule to obtain a normal second JTAG signal; and transmitting the second JTAG signal to a JTAG state machine of the target chip for skipping. According to the method and the device, the detection rule and the compensation rule can be established according to the JTAG link structure of the target chip to compensate the abnormal first JTAG signal, so that the chip debugging accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of semiconductor technology, and more specifically, to a JTAG signal processing method, system, device and computer medium. Background Art

[0002] With the development of semiconductor technology, more and more electronic devices use IC (Integrated Circuit Chip) chips. In this process, chip debugging becomes particularly important. Whether before or after tape-out, chip debugging is a key part of chip design. By accessing the CPU (Central Processing Unit) or bus address inside the chip through the JTAG (Joint Test Action Group) link, chip problems can be quickly located and performance can be tuned. Therefore, the stability of the JTAG link will affect the debugging process.

[0003] However, due to the uncertainty of the chip's operating conditions, strong electromagnetic interference will affect JTAG transmission. In addition, there are instability and erroneous sampling of JTAG link signals, which makes chip debugging accuracy poor.

[0004] In summary, how to improve the accuracy of chip debugging is a problem that currently needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The purpose of this application is to provide a JTAG signal processing method, which can solve the technical problem of how to improve the accuracy of chip debugging to a certain extent. This application also provides a JTAG signal processing system, an electronic device and a computer-readable storage medium.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] A JTAG signal processing method, applied to a JTAG engine, comprising:

[0008] Acquire a JTAG link structure of a target chip, wherein the JTAG engine is arranged on the target chip;

[0009] Establishing detection rules and compensation rules according to the JTAG link structure;

[0010] Acquire a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool;

[0011] Detecting whether the first JTAG signal is abnormal based on the detection rule;

[0012] In response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal;

[0013] The second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

[0014] In an exemplary embodiment, the acquiring the JTAG link structure of the target chip includes:

[0015] Determine each target module on the JTAG link of the target chip;

[0016] Determining module information of each of the target modules, wherein the module information includes a link length of the target module;

[0017] Determining the module order of the target module;

[0018] Determine the target module, the module information and the module order as a JTAG link structure of the target chip;

[0019] The establishing of detection rules and compensation rules according to the JTAG link structure includes:

[0020] Obtain the set reading process and writing process of the JTAG link;

[0021] Establishing a standard state machine according to the reading process and the writing process;

[0022] Using the standard state machine as the detection rule;

[0023] Establishing the corresponding compensation rules according to the data compensation method;

[0024] Establishing the corresponding compensation rule according to the control jump mode;

[0025] The corresponding compensation rule is established according to the clock adjustment method.

[0026] In an exemplary embodiment, the detecting whether the first JTAG signal is abnormal based on the detection rule, and in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal includes:

[0027] pre-jump the first JTAG signal according to the standard state machine to obtain a first jump result;

[0028] Detecting whether the first jump result satisfies the JTAG link structure;

[0029] If the first jump result does not satisfy the JTAG link structure, determining that the first JTAG signal is abnormal;

[0030] In the first jump result, determining the jump information that does not satisfy the JTAG link structure;

[0031] The first JTAG signal is compensated based on the compensation rule corresponding to the jump information to obtain a normal second JTAG signal.

[0032] In an exemplary embodiment, the acquiring of a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool, includes:

[0033] Acquire an initial JTAG signal transmitted by the JTAG debugging tool;

[0034] Detecting whether there is a glitch signal less than a single clock cycle in the initial JTAG signal;

[0035] In response to the presence of the glitch signal in the initial JTAG signal, eliminating the glitch signal in the initial JTAG signal to obtain the first JTAG signal;

[0036] In response to the absence of the glitch signal in the initial JTAG signal, the initial JTAG signal is used as the first JTAG signal.

[0037] In an exemplary embodiment, the transmitting the second JTAG signal to the JTAG state machine of the target chip for jumping includes:

[0038] Filtering the second JTAG signal to obtain a third JTAG signal;

[0039] The third JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

[0040] In an exemplary embodiment, the acquiring the JTAG link structure of the target chip includes:

[0041] Determine each target module on the JTAG link of the target chip;

[0042] Determine module information of each target module, wherein the module information includes a link length of the target module and a signal encryption and decryption rule of the target module;

[0043] Determining the module order of the target module;

[0044] Determine the target module, the module information and the module order as a JTAG link structure of the target chip;

[0045] The establishing of detection rules and compensation rules according to the JTAG link structure includes:

[0046] Using the encryption rule in the signal encryption and decryption rule of the target module as the detection rule;

[0047] The decryption rule in the signal encryption and decryption rule of the target module is used as the compensation rule.

[0048] In an exemplary embodiment, the detecting whether the first JTAG signal is abnormal based on the detection rule, and in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal includes:

[0049] Detecting whether the first JTAG signal belongs to the encryption rule;

[0050] In response to the first JTAG signal belonging to the encryption rule, determining that the first JTAG signal is abnormal;

[0051] The first JTAG signal is decrypted based on the decryption rule to obtain a normal second JTAG signal.

[0052] A JTAG signal processing system, applied to a JTAG engine, comprising:

[0053] A first acquisition module, used for acquiring a JTAG link structure of a target chip, wherein the JTAG engine is arranged on the target chip;

[0054] A first establishing module, used to establish a detection rule and a compensation rule according to the JTAG link structure;

[0055] A second acquisition module, configured to acquire a first JTAG signal, wherein the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool;

[0056] a first detection module, configured to detect whether the first JTAG signal is abnormal based on the detection rule; in response to the first JTAG signal being abnormal, compensate the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal;

[0057] The first transmission module is used to transmit the second JTAG signal to the JTAG state machine of the target chip for jumping.

[0058] An electronic device, comprising:

[0059] Memory for storing computer programs;

[0060] A processor is used to implement the steps of any of the above-mentioned JTAG signal processing methods when executing the computer program.

[0061] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned JTAG signal processing methods.

[0062] A JTAG signal processing method provided by the present application is applied to a JTAG engine, and the JTAG link structure of a target chip is obtained. The JTAG engine is set in the target chip; a detection rule and a compensation rule are established according to the JTAG link structure; a first JTAG signal is obtained, and the first JTAG signal is determined according to the signal transmitted by the JTAG debugging tool; based on the detection rule, whether the first JTAG signal is abnormal is detected; in response to the abnormality of the first JTAG signal, the first JTAG signal is compensated based on the compensation rule to obtain a normal second JTAG signal; the second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping. The JTAG engine in the present application can establish corresponding detection rules and compensation rules according to the JTAG link structure of the target chip, and can detect whether the first JTAG signal transmitted by the JTAG debugging tool is abnormal through the detection rules, and can compensate the abnormal first JTAG signal with the help of the compensation rules to obtain a normal second JTAG signal, so that if the second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping, the abnormal first JTAG signal can be avoided from being transmitted to the target chip, and the accuracy of chip debugging can be improved. The JTAG signal processing system, electronic device and computer-readable storage medium provided in this application also solve corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application 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 only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0064] Figure 1 A flowchart of a JTAG signal processing method provided in an embodiment of the present application;

[0065] Figure 2 Experience in using JTAG debugging tools, JTAG engines, and target chip architectures;

[0066] Figure 3 JTAG process flow chart to eliminate glitch signals;

[0067] Figure 4 JTAG signal processing flow chart for decryption compensation;

[0068] Figure 5 A schematic diagram of the structure of a JTAG signal processing system provided in an embodiment of the present application;

[0069] Figure 6 This is the architecture diagram of the JTAG engine;

[0070] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0071] Figure 8 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] 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.

[0073] See also Figure 1 , Figure 1 A flowchart of a JTAG signal processing method provided in an embodiment of the present application.

[0074] A JTAG signal processing method provided in an embodiment of the present application is applied to a JTAG engine and may include the following steps:

[0075] Step S101: Acquire the JTAG link structure of the target chip, and set the JTAG engine on the target chip.

[0076] Step S102: Establishing detection rules and compensation rules according to the JTAG link structure.

[0077] In practical applications, the JTAG engine of the present application is set in the target chip, which is also the chip to be debugged, and its type can be flexibly determined according to the application scenario. And the JTAG engine of the present application needs to obtain the JTAG link structure of the target chip, so as to establish detection rules and compensation rules according to the JTAG link structure to process the JTAG signal, wherein the detection rule is used to detect whether the JTAG signal matches the JTAG link structure of the target chip, and the compensation rule is used to compensate the JTAG signal so that the JTAG signal matches the JTAG link structure of the target chip.

[0078] In a specific application scenario, the JTAG engine can determine each target module on the JTAG link of the target chip in the process of obtaining the JTAG link structure of the target chip; determine the module information of each target module, the module information includes the link length of the target module, etc., the link length includes the instruction length, the data length, etc.; determine the module order of the target module; determine the target module, module information and module order as the JTAG link structure of the target chip; accordingly, in the process of establishing detection rules and compensation rules according to the JTAG link structure, the set JTAG link reading process and writing process can be obtained; a standard state machine is established according to the reading process and the writing process; the standard state machine is used as a detection rule; a corresponding compensation rule is established according to the data compensation (TD) method; a corresponding compensation rule is established according to the control jump (TMS) method; a corresponding compensation rule is established according to the clock adjustment (TCK) method. It should be noted that when compensating the first JTAG signal according to the compensation rule, TD priority, TMS priority or TCK priority can be set, and this application does not make specific limitations here.

[0079] From this implementation process, it can be seen that the present application determines each target module on the JTAG link of the target chip to reflect the object on the JTAG link structure of the target chip through the module type, determines the module information of each target module, the module information includes the link length of the target module, and determines the module order of the target module. Since the module information reflects the link length of the target module, and the module order reflects the jump order of the target module in the JTGA link structure, if the target module, module information and module order are determined as the JTAG link structure of the target chip, it is convenient for the JTAG engine to accurately restore the jump process of the target chip, and lay a good foundation for the subsequent accurate establishment of detection rules and compensation rules. For example, if the JTAG signal does not meet the link length and jumps because it is too long or too short, then the JTAG signal can be considered abnormal. For example, if the JTAG signal is not adjusted before the module is selected, the JTAG signal can be considered abnormal; and in the process of establishing detection rules and compensation rules according to the JTAG link structure, the set reading process and writing process of the JTAG link can be obtained, and a standard state machine can be established according to the reading process and the writing process; the standard state machine is used as a detection rule to greatly reduce the complexity of the system and increase the robustness of the system by specifying the standard state machine; corresponding compensation rules are established according to the data compensation method, corresponding compensation rules are established according to the control jump method, and corresponding compensation rules are established according to the clock adjustment method, so as to facilitate the subsequent compensation of abnormal JTAG signals from the three aspects of data compensation, control jump and clock adjustment, so that the abnormal JTAG signal can be comprehensively and effectively repaired.

[0080] Step S103: Acquire a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool.

[0081] In practical applications, the architecture of JTAG debugging tools, JTAG engines and target chips can be as follows: Figure 2 As shown, the JTAG debugging tool is used to transmit a JTAG signal for debugging a target chip under the operation of a user, etc. Accordingly, the JTAG engine needs to obtain a first JTAG signal determined according to the signal transmitted by the JTAG debugging tool for processing.

[0082] Step S104: Detect whether the first JTAG signal is abnormal based on the detection rule.

[0083] Step S105: In response to the first JTAG signal being abnormal, the first JTAG signal is compensated based on a compensation rule to obtain a normal second JTAG signal.

[0084] Step S106: Transmitting a second JTAG signal to the JTAG state machine of the target chip for jumping.

[0085] In actual applications, considering that the JTAG signal transmitted by the JTAG debugging tool may be abnormal, the JTAG engine needs to detect whether the first JTAG signal is abnormal based on the detection rules after obtaining the first JTAG signal. Since the detection rules are determined according to the JTAG link of the target chip, the detection rules can be used to detect whether the first JTAG signal matches the JTAG link of the target chip to detect whether the first JTAG signal is abnormal. For example, if the first JTAG signal does not meet the detection rules, it can be determined that the first JTAG signal does not match the JTAG link of the target chip. At this time, the first JTAG signal can be determined to be abnormal. Correspondingly, in response to the abnormality of the first JTAG signal, the first JTAG signal can be compensated based on the compensation rules to obtain a normal second JTAG signal, and then the second JTAG signal can be transmitted to the JTAG state machine of the target chip to jump to debug the target chip. It should be noted that after the first JTAG signal is abnormal, the degree of deviation between the first JTAG signal and the detection rule can be screened. When the deviation degree is less than or equal to the set degree, the first JTAG signal may not be compensated. When the deviation degree exceeds the set degree, the first JTAG signal is compensated based on the compensation rule, etc.

[0086] In actual applications, based on the above embodiments, whether the first JTAG signal is abnormal is detected based on the detection rules. In response to the abnormality of the first JTAG signal, the first JTAG signal is compensated based on the compensation rules. In the process of obtaining a normal second JTAG signal, the first JTAG signal can be pre-jumped according to the standard state machine to obtain a first jump result; detect whether the first jump result satisfies the JTAG link structure; if the first jump result does not satisfy the JTAG link structure, determine that the first JTAG signal is abnormal; in the first jump result, determine the jump information that does not satisfy the JTAG link structure; compensate the first JTAG signal based on the compensation rule corresponding to the jump information to obtain a normal second JTAG signal.

[0087] In practical applications, in the process of obtaining the first JTAG signal, which is determined according to the signal transmitted by the JTAG debugging tool, the initial JTAG signal transmitted by the JTAG debugging tool can be obtained; whether there is a glitch signal less than a single clock cycle in the initial JTAG signal; in response to the presence of a glitch signal in the initial JTAG signal, the glitch signal in the initial JTAG signal is eliminated to obtain the first JTAG signal; in response to the absence of a glitch signal in the initial JTAG signal, the initial JTAG signal is used as the first JTAG signal. At this time, the processing process of the JTAG signal is as follows: Figure 3 shown.

[0088] In practical applications, considering that interference may be introduced in the process of compensating the first JTAG signal, in order to avoid this situation and further improve the accuracy of the JTAG signal, in the process of transmitting the second JTAG signal to the JTAG state machine of the target chip for jumping, the second JTAG signal can be filtered to obtain the third JTAG signal; the third JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

[0089] In practical applications, in the process of obtaining the JTAG link structure of the target chip, each target module on the JTAG link of the target chip can be determined; the module information of each target module can be determined, and the module information includes the link length of the target module and the signal encryption and decryption rules of the target module; the module order of the target module can be determined; the target module, the module information and the module order are determined as the JTAG link structure of the target chip; accordingly, in the process of establishing detection rules and compensation rules according to the JTAG link structure, the encryption rules in the signal encryption and decryption rules of the target module can be used as detection rules; and the decryption rules in the signal encryption and decryption rules of the target module can be used as compensation rules.

[0090] In a specific application scenario, in the process of detecting whether the first JTAG signal is abnormal based on the detection rule, and in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal, it is possible to detect whether the first JTAG signal belongs to the encryption rule; in response to the first JTAG signal belonging to the encryption rule, it is determined that the first JTAG signal is abnormal; and the first JTAG signal is decrypted based on the decryption rule to obtain a normal second JTAG signal. At this time, the JTAG signal processing flow is as follows: Figure 4 shown.

[0091] In a specific application scenario, after decrypting the first JTAG signal based on the decryption rules to obtain a normal second JTAG signal, transmitting the second JTAG signal to the JTAG state machine of the target chip for jumping, the jump result of the second JTAG signal by the JTAG state machine of the target chip can also be obtained, and the encryption rules are determined from the encryption and decryption rules. The jump result of the second JTAG signal is encrypted according to the encryption rules to obtain an encrypted jump result, and the encrypted jump result is transmitted to the JTAG debugging tool.

[0092] From this implementation process, it can be seen that the JTAG engine of the present application can also obtain the jump result of the JTAG state machine of the target chip to the second JTAG signal after decrypting the first JTAG signal according to the decryption rule to obtain the first JTAG signal and transmitting the second JTAG signal to the JTAG state machine of the target chip for jumping, so as to characterize the response result of the target chip to the first JTAG signal with the help of the adjustment result of the second JTAG signal, and it is necessary to determine the encryption rule from the encryption and decryption rules, encrypt the jump result of the second JTAG signal according to the encryption rule, obtain the encrypted jump result, and transmit the encrypted jump result to the JTAG debugging tool, so that the JTAG debugging tool obtains the encrypted jump result corresponding to the encrypted first JTAG signal, so as to ensure the consistency of the JTAG debugging tool's processing of the JTAG signal, facilitate to ensure the system stability, and improve the user experience.

[0093] A JTAG signal processing method provided by the present application is applied to a JTAG engine, and the JTAG link structure of a target chip is obtained. The JTAG engine is set in the target chip; a detection rule and a compensation rule are established according to the JTAG link structure; a first JTAG signal is obtained, and the first JTAG signal is determined according to the signal transmitted by the JTAG debugging tool; based on the detection rule, whether the first JTAG signal is abnormal is detected; in response to the abnormality of the first JTAG signal, the first JTAG signal is compensated based on the compensation rule to obtain a normal second JTAG signal; the second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping. The JTAG engine in the present application can establish corresponding detection rules and compensation rules according to the JTAG link structure of the target chip, and can detect whether the first JTAG signal transmitted by the JTAG debugging tool is abnormal through the detection rules, and can compensate the abnormal first JTAG signal with the help of the compensation rules to obtain a normal second JTAG signal, so that if the second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping, the abnormal first JTAG signal can be avoided from being transmitted to the target chip, and the accuracy of chip debugging can be improved.

[0094] See also Figure 5 , Figure 5 A schematic diagram of the structure of a JTAG signal processing system provided in an embodiment of the present application.

[0095] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine and may include:

[0096] A first acquisition module 101 is used to acquire a JTAG link structure of a target chip, where a JTAG engine is disposed on the target chip;

[0097] A first establishing module 102, used to establish a detection rule and a compensation rule according to a JTAG link structure;

[0098] A second acquisition module 103 is used to acquire a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool;

[0099] The first detection module 104 is used to detect whether the first JTAG signal is abnormal based on the detection rule; in response to the first JTAG signal being abnormal, the first JTAG signal is compensated based on the compensation rule to obtain a normal second JTAG signal;

[0100] The first transmission module 105 is used to transmit the second JTAG signal to the JTAG state machine of the target chip for jumping.

[0101] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and a first acquisition module may include:

[0102] A first determining unit, used to determine each target module on the JTAG link of the target chip;

[0103] A second determining unit, used to determine module information of each target module, the module information including a link length of the target module;

[0104] A third determining unit, used to determine the module order of the target module;

[0105] A fourth determining unit, configured to determine the target module, the module information and the module sequence as a JTAG link structure of the target chip;

[0106] The first building module may include:

[0107] A first acquisition unit, used to acquire a set reading process and writing process of a JTAG link;

[0108] A first establishing unit, used for establishing a standard state machine according to a reading process and a writing process;

[0109] A first setting unit, used to use a standard state machine as a detection rule;

[0110] A second establishing unit, used to establish corresponding compensation rules according to the data compensation method;

[0111] A third establishing unit, used to establish a corresponding compensation rule according to the control jump mode;

[0112] The fourth establishing unit is used to establish a corresponding compensation rule according to the clock adjustment method.

[0113] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and a first detection module may include:

[0114] A first jump unit, used for pre-jumping a first JTAG signal according to a standard state machine to obtain a first jump result;

[0115] A first detection unit is used to detect whether the first jump result satisfies the JTAG link structure; if the first jump result does not satisfy the JTAG link structure, it is determined that the first JTAG signal is abnormal;

[0116] A fifth determining unit, configured to determine, in the first jump result, jump information that does not satisfy the JTAG link structure;

[0117] The first compensation unit is used to compensate the first JTAG signal based on a compensation rule corresponding to the jump information to obtain a normal second JTAG signal.

[0118] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and the second acquisition module may include:

[0119] A second acquisition unit, used for acquiring an initial JTAG signal transmitted by a JTAG debugging tool;

[0120] The second detection unit is used to detect whether there is a glitch signal less than a single clock cycle in the initial JTAG signal; in response to the presence of a glitch signal in the initial JTAG signal, the glitch signal in the initial JTAG signal is eliminated to obtain a first JTAG signal; in response to the absence of a glitch signal in the initial JTAG signal, the initial JTAG signal is used as the first JTAG signal.

[0121] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and the first transmission module may include:

[0122] A first filtering unit, configured to filter the second JTAG signal to obtain a third JTAG signal;

[0123] The first transmission unit is used to transmit the third JTAG signal to the JTAG state machine of the target chip for jumping.

[0124] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and a first acquisition module may include:

[0125] The sixth determination unit is used to determine each target module on the JTAG link of the target chip; determine the module information of each target module, the module information includes the link length of the target module and the signal encryption and decryption rule of the target module; determine the module order of the target module;

[0126] A seventh determining unit, configured to determine the target module, the module information and the module sequence as a JTAG link structure of the target chip;

[0127] The first building module may include:

[0128] A fifth establishing unit, configured to use the encryption rule in the signal encryption and decryption rule of the target module as the detection rule;

[0129] The sixth establishing unit is used to use the decryption rule in the signal encryption and decryption rule of the target module as the compensation rule.

[0130] A JTAG signal processing system provided in an embodiment of the present application is applied to a JTAG engine, and a first detection module may include:

[0131] The third detection unit is used to detect whether the first JTAG signal belongs to the encryption rule; in response to the first JTAG signal belonging to the encryption rule, determine that the first JTAG signal is abnormal; decrypt the first JTAG signal based on the decryption rule to obtain a normal second JTAG signal.

[0132] It should be noted that the structure of the JTAG engine provided in the embodiment of the present application can be flexibly determined according to actual needs. For example, the JTAG engine can be Figure 6 As shown, it includes a JTAG signal detection module, which is used to perform abnormality and noise detection on the input JTAG signal and output the result to the JTAG abnormality elimination module; the JTAG abnormality elimination module is used to filter the noise and error input detected by the detection module and send the signal to the JTAG state machine; the JTAG state machine module is used to execute the signal input of the previous step and perform state machine pre-jump.

[0133] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the JTAG signal processing method provided in the embodiment of the present application. Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0134] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the JTAG signal processing method described in any of the above embodiments are implemented.

[0135] See also Figure 8 , another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-DefinitionMultimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0136] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the JTAG signal processing method described in any of the above embodiments are implemented.

[0137] The computer-readable storage medium involved in this application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0138] A computer program product provided in an embodiment of the present application includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented:

[0139] Acquire the JTAG link structure of the target chip, and set the JTAG engine on the target chip;

[0140] Establish detection rules and compensation rules according to the JTAG link structure;

[0141] Acquire a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool;

[0142] Detecting whether the first JTAG signal is abnormal based on the detection rule; in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal;

[0143] The second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

[0144] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: determining each target module on a JTAG link of a target chip; determining module information of each target module, the module information including the link length of the target module; determining the module order of the target modules; determining the target modules, module information and module order as the JTAG link structure of the target chip; obtaining a set read process and write process of the JTAG link; establishing a standard state machine according to the read process and the write process; using the standard state machine as a detection rule; establishing a corresponding compensation rule according to a data compensation method; establishing a corresponding compensation rule according to a control jump method; and establishing a corresponding compensation rule according to a clock adjustment method.

[0145] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: pre-jumping a first JTAG signal according to a standard state machine to obtain a first jump result; detecting whether the first jump result satisfies a JTAG link structure; if the first jump result does not satisfy the JTAG link structure, determining that the first JTAG signal is abnormal; determining in the first jump result that jump information that does not satisfy the JTAG link structure; and compensating the first JTAG signal based on a compensation rule corresponding to the jump information to obtain a normal second JTAG signal.

[0146] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: obtaining an initial JTAG signal transmitted by a JTAG debugging tool; detecting whether there is a glitch signal less than a single clock cycle in the initial JTAG signal; in response to the presence of a glitch signal in the initial JTAG signal, eliminating the glitch signal in the initial JTAG signal to obtain a first JTAG signal; in response to the absence of a glitch signal in the initial JTAG signal, using the initial JTAG signal as the first JTAG signal.

[0147] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: filtering the second JTAG signal to obtain a third JTAG signal; transmitting the third JTAG signal to the JTAG state machine of the target chip for jumping.

[0148] A computer program product provided by an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: determining each target module on a JTAG link of a target chip; determining module information of each target module, the module information including the link length of the target module and the signal encryption and decryption rules of the target module; determining the module order of the target modules; determining the target modules, the module information and the module order as the JTAG link structure of the target chip; using the encryption rules in the signal encryption and decryption rules of the target module as detection rules; and using the decryption rules in the signal encryption and decryption rules of the target module as compensation rules.

[0149] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which implements the following steps when executed by a processor: detecting whether a first JTAG signal belongs to an encryption rule; in response to the first JTAG signal belonging to the encryption rule, determining that the first JTAG signal is abnormal; decrypting the first JTAG signal based on the decryption rule to obtain a normal second JTAG signal.

[0150] For the description of the relevant parts of a JTAG signal processing system, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in a JTAG signal processing method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0151] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A JTAG signal processing method, characterized in that: Applicable to JTAG engines, including: Acquire a JTAG link structure of a target chip, wherein the JTAG engine is arranged on the target chip; Establishing detection rules and compensation rules according to the JTAG link structure; Acquire a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool; Detecting whether the first JTAG signal is abnormal based on the detection rule; In response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal; The second JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

2. The method according to claim 1, characterized in that The step of obtaining the JTAG link structure of the target chip includes: Determine each target module on the JTAG link of the target chip; Determining module information of each of the target modules, wherein the module information includes a link length of the target module; Determining the module order of the target module; Determine the target module, the module information and the module order as a JTAG link structure of the target chip; The establishing of detection rules and compensation rules according to the JTAG link structure includes: Obtain the set reading process and writing process of the JTAG link; Establishing a standard state machine according to the reading process and the writing process; Using the standard state machine as the detection rule; Establishing the corresponding compensation rules according to the data compensation method; Establishing the corresponding compensation rule according to the control jump mode; The corresponding compensation rule is established according to the clock adjustment method.

3. The method according to claim 2, characterized in that The detecting whether the first JTAG signal is abnormal based on the detection rule, and in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal, includes: pre-jump the first JTAG signal according to the standard state machine to obtain a first jump result; Detecting whether the first jump result satisfies the JTAG link structure; If the first jump result does not satisfy the JTAG link structure, determining that the first JTAG signal is abnormal; In the first jump result, determining the jump information that does not satisfy the JTAG link structure; The first JTAG signal is compensated based on the compensation rule corresponding to the jump information to obtain a normal second JTAG signal.

4. The method according to claim 1, characterized in that: The obtaining of a first JTAG signal, where the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool, includes: Acquire an initial JTAG signal transmitted by the JTAG debugging tool; Detecting whether there is a glitch signal less than a single clock cycle in the initial JTAG signal; In response to the presence of the glitch signal in the initial JTAG signal, eliminating the glitch signal in the initial JTAG signal to obtain the first JTAG signal; In response to the absence of the glitch signal in the initial JTAG signal, the initial JTAG signal is used as the first JTAG signal.

5. The method according to claim 1, characterized in that The transmitting the second JTAG signal to the JTAG state machine of the target chip for jumping includes: Filtering the second JTAG signal to obtain a third JTAG signal; The third JTAG signal is transmitted to the JTAG state machine of the target chip for jumping.

6. The method according to claim 1, characterized in that The step of obtaining the JTAG link structure of the target chip includes: Determine each target module on the JTAG link of the target chip; Determine module information of each target module, wherein the module information includes a link length of the target module and a signal encryption and decryption rule of the target module; Determining the module order of the target module; Determine the target module, the module information and the module order as a JTAG link structure of the target chip; The establishing of detection rules and compensation rules according to the JTAG link structure includes: Using the encryption rule in the signal encryption and decryption rule of the target module as the detection rule; The decryption rule in the signal encryption and decryption rule of the target module is used as the compensation rule.

7. The method according to claim 6, characterized in that The detecting whether the first JTAG signal is abnormal based on the detection rule, and in response to the first JTAG signal being abnormal, compensating the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal, includes: Detecting whether the first JTAG signal belongs to the encryption rule; In response to the first JTAG signal belonging to the encryption rule, determining that the first JTAG signal is abnormal; The first JTAG signal is decrypted based on the decryption rule to obtain a normal second JTAG signal.

8. A JTAG signal processing system, characterized in that: Applicable to JTAG engines, including: A first acquisition module, used for acquiring a JTAG link structure of a target chip, wherein the JTAG engine is arranged on the target chip; A first establishing module, used to establish a detection rule and a compensation rule according to the JTAG link structure; A second acquisition module, configured to acquire a first JTAG signal, wherein the first JTAG signal is determined according to a signal transmitted by a JTAG debugging tool; a first detection module, configured to detect whether the first JTAG signal is abnormal based on the detection rule; in response to the first JTAG signal being abnormal, compensate the first JTAG signal based on the compensation rule to obtain a normal second JTAG signal; The first transmission module is used to transmit the second JTAG signal to the JTAG state machine of the target chip for jumping.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the JTAG signal processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the JTAG signal processing method according to any one of claims 1 to 7 are implemented.