CN106991022B - Chip analysis method based on scan chain - Google Patents

Chip analysis method based on scan chain Download PDF

Info

Publication number
CN106991022B
CN106991022B CN201710132264.6A CN201710132264A CN106991022B CN 106991022 B CN106991022 B CN 106991022B CN 201710132264 A CN201710132264 A CN 201710132264A CN 106991022 B CN106991022 B CN 106991022B
Authority
CN
China
Prior art keywords
cpu
state
scanning
data
scan
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710132264.6A
Other languages
Chinese (zh)
Other versions
CN106991022A (en
Inventor
赵胜平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ramaxel Technology Shenzhen Co Ltd
Original Assignee
Ramaxel Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ramaxel Technology Shenzhen Co Ltd filed Critical Ramaxel Technology Shenzhen Co Ltd
Priority to CN201710132264.6A priority Critical patent/CN106991022B/en
Publication of CN106991022A publication Critical patent/CN106991022A/en
Application granted granted Critical
Publication of CN106991022B publication Critical patent/CN106991022B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • G06F11/2635Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers using a storage for the test inputs, e.g. test ROM, script files

Abstract

The invention discloses a chip analysis method based on a scan chain, which is characterized in that a common register needing to be stored in a CPU is replaced by a register with scan input, when the CPU is abnormal, a serial scan trigger instruction is output through a JTAG (joint test action group) to start the data storage operation of the scan chain, the data series with the scan input register is output to a debugging host through a JTAG port, a debugger analyzes the data received by each register with scan input by the debugging host, and after the analysis is finished, the reset operation is carried out on the CPU by controlling a JTAG output control reset signal to control the CPU to recover the normal work. The method of the scan chain mechanism can realize that the state of the main register of the chip can be read out quickly and conveniently when the CPU is abnormal, and the abnormal CPU can be analyzed quickly and positioned by matching with a JTAG tool, so that the development efficiency can be greatly improved.

Description

Chip analysis method based on scan chain
Technical Field
The invention relates to the field of information electronic chip design, in particular to a chip analysis method based on a scan chain.
Background
In the development process of embedded products, software design and debugging are an important link in the development. Any software needs to be debugged for many times before being fixed, and in order to improve the design efficiency, many chip design companies synchronously design debugging tools of the software. Basically, all kinds of debugging tools are similar to those of debugging tools which directly communicate with a CPU and control the execution of programs through a JTAG (an international standard test protocol which is mainly used for chip internal test) port. For example, single step debugging, one premise of such debugging is that the CPU itself is working normally, and if the CPU itself has a problem or an abnormality, the state of various types of software or the CPU is lost, and the problem cannot be located. When the condition occurs, the current state of the CPU needs to be accurately acquired, and the reason of the abnormality or the error of the software or the CPU can be further analyzed. Existing JTAG tools do not fulfill this need well for existing chip designs.
Disclosure of Invention
Aiming at the defects, the invention aims to quickly locate the internal problems of the chip when the CPU is abnormal, save debugging time and eliminate the problems of manufacturing and time sequence.
In order to achieve the above purpose, the invention provides a chip analysis method based on scan chain, which is characterized in that a common register needing to be stored in a CPU is replaced by a scan input register, when the CPU is abnormal, a serial scan trigger instruction is output through JTAG, the data storage operation of the scan chain is started, the data serial with the scan input register is output to a debugging host through a JTAG port, a debugger analyzes the data received by the debugging host and provided with the scan input register, and after the analysis is finished, the reset operation is carried out on the CPU by controlling JTAG output control reset signal, and the CPU is controlled to recover the normal work.
The chip analysis method based on the scan chain is characterized in that a data selector is additionally arranged in front of a data input port of a common register of the scan input register, and the data selector comprises a data input port, a scan input port and a scan enable control port; the band scan input register further includes a clock input port and a scan output port.
The chip analysis method based on the scan chain is characterized in that the scan input registers are connected in series, the scan output port of the previous scan input register is connected with the scan input port of the next scan input register, and the clock input ports of all the scan input registers are connected together; all scan enable control ports with scan input registers are connected together.
The invention can realize the quick and convenient reading of the state of the main register of the chip when the CPU is abnormal by a method of a scan chain mechanism, and can realize the quick analysis and problem positioning of the abnormal CPU by matching with a JTAG tool, thereby greatly improving the development efficiency.
Drawings
FIG. 1 is a schematic diagram of a tape scan input register;
FIG. 2 is a schematic diagram of scan chain connections in a CPU;
FIG. 3 is a scan chain based chip analysis state transition diagram.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a schematic diagram of a tape scan input register; the Data selector MUX is additionally arranged In front of a Data input port of the common register FF and comprises a Data input port Data, a Scan input port Scan In and a Scan Enable control port Scan Enable; the band Scan input register further includes a clock input port Clk, a data output port Q, and a Scan output port Scan Out.
FIG. 2 is a schematic diagram of scan chain connections in a CPU; the CPU state-saving method comprises 7 registers 1, 2, 3, 4, 5, 6 and 7 with scanning input, wherein a common register needing to save state in the CPU is replaced by the register with scanning input, the registers with scanning input are connected in series, a scanning output port of the previous register with scanning input is connected with a scanning input port of the next register with scanning input, and clock input ports of all registers with scanning input are connected together; all scan enable control ports with scan input registers are connected together.
Fig. 3 is a scan chain based chip analysis state transition diagram, comprising 8 states: an IDLE state IDLE, a CPU direct trigger waiting state WAIT _ SIGNAL, a clock cycle trigger waiting state WAIT _ CNT, a SERIAL data scanning state SCAN _ SAVE, a SERIAL data output state SERIAL _ OUT, a data analysis state COMPARE, a chip RESET state ASSERT _ SESET and a RELEASE control SIGNAL state RELEASE _ RESET; the specific state is switched according to the following steps:
the IDLE state IDLE is a state that a background CPU waits for a serial port to input an instruction, and the CPU simultaneously sets two trigger modes, namely a chip signal trigger mode and a fixed clock period trigger mode;
when the CPU receives the serial port command, the CPU starts a chip signal triggering mode according to a fixed clock cycle triggering command, enters a clock cycle triggering waiting state WAIT _ CNT and enters a serial data scanning state after waiting for a fixed clock cycle;
when the serial port instruction received by the CPU is a CPU direct trigger instruction, starting a fixed clock period trigger mode, entering a CPU direct trigger waiting state WAIT _ SIGNAL, and automatically triggering by the CPU according to a preset condition to enter a serial data scanning state;
the serial data scanning state SCAN _ SAVE realizes the acquisition of the clock control right of the CPU, realizes the control of the lengths of a clock and a scanning chain after the clock control right of the CPU is acquired, and controls the serial scanning of data with a scanning input register;
the SERIAL data output state SERIAL _ OUT serially outputs the data with the scanning input register to the debugging host;
the data analysis state COMPARE is used for displaying the data difference of each scanning input register to a debugger in a bit map mode;
after the analysis of the ASSERT _ RESET data in the chip RESET state is finished, the RESET signal is controlled to be output by controlling JTAG to carry out RESET operation on the CPU;
the RELEASE control signal state RELEASE _ RESET RELEASEs the clock control right of the CPU, and the CPU re-enters the idle state after normal operation.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (1)

1. A chip analysis method based on scan chain is characterized in that a common register needing to be stored in a CPU is replaced by a register with scan input, when the CPU is abnormal, a serial scan trigger instruction is output through JTAG to start the data storage operation of the scan chain, the data with the scan input register is output to a debugging host through a JTAG port, a debugger analyzes the data with the scan input register received by the debugging host, and after the analysis is finished, the reset operation is carried out on the CPU by controlling a JTAG output control reset signal to control the CPU to restore the normal work; the data selector is additionally arranged in front of a data input port of the common register and comprises a data input port, a scanning input port and a scanning enabling control port; the input register with scanning also comprises a clock input port and a scanning output port; the input registers with scanning are connected in series, the scanning output port of the previous input register with scanning is connected with the scanning input port of the next input register with scanning, and the clock input ports of all the input registers with scanning are connected together; all the scan enable control ports with scan input registers are connected together; comprising 8 states: the method comprises the following steps that (1) an idle state, a CPU direct trigger waiting state, a clock cycle trigger waiting state, a serial data scanning state, a serial data output state, a data analysis state, a chip reset state and a control signal release state are adopted; the specific state is switched according to the following steps:
the method comprises the following steps that an idle state background CPU waits for a serial port input instruction state, and the CPU simultaneously sets two trigger modes, namely a chip signal trigger mode and a fixed clock period trigger mode;
when the CPU receives the serial port command, the CPU starts a chip signal triggering mode according to the fixed clock cycle triggering command, enters a clock cycle triggering waiting state, and enters a serial data scanning state after waiting for the fixed clock cycle;
when the serial port instruction received by the CPU is a CPU direct trigger instruction, starting a fixed clock period trigger mode, entering a CPU direct trigger waiting state, and automatically triggering by the CPU according to a preset condition to enter a serial data scanning state;
the serial data scanning state realizes the acquisition of the clock control right of the CPU, realizes the control of the lengths of the clock and the scan chain after the clock control right of the CPU is acquired, and controls the serial scanning of the data with the scan input register; the serial data output state serially outputs the data with the scanning input register to the debugging host;
the data analysis state shows the data difference of each scanning input register to a debugger in a mode of a bit map;
after the chip reset state data is analyzed, the reset signal is controlled to carry out reset operation on the CPU by controlling JTAG output;
the control signal is released to release the clock control right of the CPU, and the CPU enters an idle state again after working normally.
CN201710132264.6A 2017-03-07 2017-03-07 Chip analysis method based on scan chain Expired - Fee Related CN106991022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710132264.6A CN106991022B (en) 2017-03-07 2017-03-07 Chip analysis method based on scan chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710132264.6A CN106991022B (en) 2017-03-07 2017-03-07 Chip analysis method based on scan chain

Publications (2)

Publication Number Publication Date
CN106991022A CN106991022A (en) 2017-07-28
CN106991022B true CN106991022B (en) 2020-12-18

Family

ID=59411540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710132264.6A Expired - Fee Related CN106991022B (en) 2017-03-07 2017-03-07 Chip analysis method based on scan chain

Country Status (1)

Country Link
CN (1) CN106991022B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984494A (en) * 2020-08-28 2020-11-24 思尔芯(上海)信息科技有限公司 Multi-chip parallel deep debugging system, debugging method and application
CN113990382B (en) * 2021-09-06 2022-11-22 南京大鱼半导体有限公司 System-on-chip, test method and test system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263642B1 (en) * 2005-09-15 2007-08-28 Azul Systems, Inc Testing replicated sub-systems in a yield-enhancing chip-test environment using on-chip compare to expected results for parallel scan chains testing critical and repairable sections of each sub-system
CN103839590A (en) * 2014-03-18 2014-06-04 龙芯中科技术有限公司 Device and method for measuring timing sequence parameter of storage and storage chip
CN103956185A (en) * 2012-09-10 2014-07-30 德克萨斯仪器股份有限公司 Processing device with nonvolatile logic array backup
CN104040499A (en) * 2011-12-20 2014-09-10 国际商业机器公司 Multi-core processor with internal voting-based built in self test (BIST)
CN106226678A (en) * 2016-07-15 2016-12-14 中国人民解放军国防科学技术大学 A kind of based on the parallel low-power consumption sweep test method applying test and excitation and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008282061A (en) * 2007-05-08 2008-11-20 Hitachi Ltd Board diagnostic method
CN101719088B (en) * 2009-11-23 2012-09-26 龙芯中科技术有限公司 Device and method for detecting processor chip on line
US8850278B2 (en) * 2010-12-22 2014-09-30 Advanced Micro Devices, Inc. Fault tolerant scannable glitch latch
US8788896B2 (en) * 2012-01-11 2014-07-22 Lsi Corporation Scan chain lockup latch with data input control responsive to scan enable signal
CN102970013B (en) * 2012-11-28 2015-03-25 中国人民解放军国防科学技术大学 Resetting method and resetting control device of register inside chip based on scanning chain
JP6496562B2 (en) * 2014-04-11 2019-04-03 ルネサスエレクトロニクス株式会社 Semiconductor device, diagnostic test method and diagnostic test circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263642B1 (en) * 2005-09-15 2007-08-28 Azul Systems, Inc Testing replicated sub-systems in a yield-enhancing chip-test environment using on-chip compare to expected results for parallel scan chains testing critical and repairable sections of each sub-system
CN104040499A (en) * 2011-12-20 2014-09-10 国际商业机器公司 Multi-core processor with internal voting-based built in self test (BIST)
CN103956185A (en) * 2012-09-10 2014-07-30 德克萨斯仪器股份有限公司 Processing device with nonvolatile logic array backup
CN103839590A (en) * 2014-03-18 2014-06-04 龙芯中科技术有限公司 Device and method for measuring timing sequence parameter of storage and storage chip
CN106226678A (en) * 2016-07-15 2016-12-14 中国人民解放军国防科学技术大学 A kind of based on the parallel low-power consumption sweep test method applying test and excitation and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于扫描链的可编程片上调试系统;陈华军 等;《高技术通讯》;20150630;第25卷(第6期);584-592页 *

Also Published As

Publication number Publication date
CN106991022A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
US9336122B2 (en) Device having configurable breakpoint based on interrupt status
US20220252665A1 (en) On-chip Debugging Device and Method
CN101154183B (en) Microcontroller built-in type on-line simulation debugging system
US8892973B2 (en) Debugging control system using inside core event as trigger condition and method of the same
CN102360329B (en) Bus monitoring and debugging control device and methods for monitoring and debugging bus
KR20110124617A (en) System-on-chip and debugging method thereof
CN105095040B (en) A kind of chip adjustment method and device
CN103675641B (en) Failure of chip localization method, Apparatus and system
CN101102566B (en) A design method and debugging method for mobile phone JTAG debugging interface signals
CN101458652A (en) Embedded on-line emulation debugging system for microcontroller
WO2019134113A1 (en) Automated test method and system
CN106991022B (en) Chip analysis method based on scan chain
WO2013169773A1 (en) Processor device with instruction trace capabilities
US20190271740A1 (en) Non-intrusive on-chip debugger with remote protocol support
CN101178685A (en) Enhancement type microprocessor piece on-chip dynamic state tracking method with special function register breakpoints
CN112596743B (en) Military FPGA general reconstruction circuit based on JTAG interface
US6757846B1 (en) Method and apparatus for multi-bus breakpoint stepping
US10088523B2 (en) Debug adapter
CN101782626B (en) JTAG port controller
CN113990382B (en) System-on-chip, test method and test system
CN108710554B (en) Processor debugging system and method
CN111459785B (en) Clock processing circuit in chip debugging mode and clock processing method thereof
US8429615B2 (en) Semiconductor integrated circuit
US20210173989A1 (en) Simulation signal viewing method and system for digital product
US20210173994A1 (en) Method and system for viewing simulation signals of a digital product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201218