JP2008251013A - Semiconductor integrated circuit and control method - Google Patents

Semiconductor integrated circuit and control method Download PDF

Info

Publication number
JP2008251013A
JP2008251013A JP2008095998A JP2008095998A JP2008251013A JP 2008251013 A JP2008251013 A JP 2008251013A JP 2008095998 A JP2008095998 A JP 2008095998A JP 2008095998 A JP2008095998 A JP 2008095998A JP 2008251013 A JP2008251013 A JP 2008251013A
Authority
JP
Japan
Prior art keywords
scan chain
scan
sub
flip
data
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.)
Granted
Application number
JP2008095998A
Other languages
Japanese (ja)
Other versions
JP4711353B2 (en
Inventor
Masaaki Shimooka
正明 下岡
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.)
NEC Electronics Corp
Original Assignee
NEC Electronics Corp
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 NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2008095998A priority Critical patent/JP4711353B2/en
Publication of JP2008251013A publication Critical patent/JP2008251013A/en
Application granted granted Critical
Publication of JP4711353B2 publication Critical patent/JP4711353B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

<P>PROBLEM TO BE SOLVED: To provide a semiconductor integrated circuit, capable of reducing the power consumption of a circuit laid in a standby state by shortening saving-restoration time of internal state. <P>SOLUTION: The semiconductor integrated circuit comprises an object circuit and a backup control circuit. The object circuit includes at least one scan chain which forms a shift register in a scan path test and serially inputting and outputting test data. The backup control circuit stores internal state data showing the internal state of the object circuit in a memory, and reads the internal state data from the memory. The scan chain is divided to a plurality of sub-scan chains. The plurality of sub-scan chains operate in parallel. The internal state data is output from the plurality of sub-scan chains and stored in the memory. The internal state data stored in the memory is reset to the plurality of sub-scan chains, and the object circuit returns to the original internal state and restarts operation. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、半導体集積回路及びその制御方法に関し、特に、内部状態を退避回復する回路を備える半導体集積回路およびその制御方法に関する。   The present invention relates to a semiconductor integrated circuit and a control method thereof, and more particularly to a semiconductor integrated circuit including a circuit that saves and recovers an internal state and a control method thereof.

近年、スタンバイやレジューム機能等の低消費電力モードを備えた半導体集積回路が注目されている。通常、半導体集積回路は、電源供給が停止されると不揮発性メモリを除いてその内部状態は消去されるため、電源供給を再開した時、回路の電源供給を停止する直前の状態から回路の動作を再開させるためには、内部状態を保持しなくてはならない。   In recent years, a semiconductor integrated circuit having a low power consumption mode such as a standby function or a resume function has attracted attention. Normally, when the power supply is stopped, the internal state of the semiconductor integrated circuit is erased except for the nonvolatile memory. Therefore, when the power supply is resumed, the circuit operation starts from the state immediately before the circuit power supply is stopped. In order to resume, the internal state must be maintained.

例えば、特開平6−52070号公報によれば、レジスタに保持された内部状態データを電源供給停止時に外部メモリに退避させ、保持する集積回路が開示されている。この集積回路は、複数のレジスタとデータ退避部とデータ復帰部とを具備し、複数のレジスタは、スキャンチェーンを形成するように接続され、データ退避部は、外部信号に応答し、データ退避モード時に、複数のレジスタにスキャンチェーンを形成させ、形成されたスキャンチェーンを介して各レジスタの保持データを外部に読み出す。このとき、データ退避部は、内部状態データを所定のビット幅のデータに直列/並列変換し、データ入出力部を通じてデータ保護用メモリに格納する。データ復帰部は、外部信号に応答し、データ復帰モード時に、複数のレジスタにスキャンチェーンを形成させ、形成されたスキャンチェーンを介して退避していたデータをもとのレジスタに復帰させる。このとき、データ復帰部は、データ保護用メモリから内部状態データを読出してデータ入出力手段から入力し、所定のビット幅のデータを直列の内部状態データに変換してスキャンチェーンを通じて復帰する。   For example, Japanese Patent Laid-Open No. 6-52070 discloses an integrated circuit that saves and holds internal state data held in a register in an external memory when power supply is stopped. The integrated circuit includes a plurality of registers, a data saving unit, and a data restoring unit, and the plurality of registers are connected to form a scan chain, and the data saving unit responds to an external signal, and a data saving mode Sometimes, a scan chain is formed in a plurality of registers, and the data held in each register is read to the outside through the formed scan chain. At this time, the data saving unit serial / parallel converts the internal state data into data having a predetermined bit width, and stores the data in the data protection memory through the data input / output unit. In response to the external signal, the data restoration unit causes a plurality of registers to form a scan chain in the data restoration mode, and restores the data saved through the formed scan chain to the original register. At this time, the data restoration unit reads the internal state data from the data protection memory, inputs it from the data input / output means, converts the data of a predetermined bit width into serial internal state data, and restores it through the scan chain.

また、特開2004−164647号公報によれば、1つまたは複数のノードを有する回路と、メモリと、システム・バスと、状態保存コントローラとを備えるデータ処理装置に関する技術が開示されている。1つまたは複数のノードを有する回路は、データの処理に用いられる回路であり、全体で回路の状態を定義する1つまたは複数のデータ値を記憶する。メモリは、データを記憶する。システム・バスは、回路とメモリとに結合するシステム・バスであり、回路とメモリの通常の処理動作中にシステム・バスに与えられたメモリ転送要求に応答して回路とメモリとの間で多ビット・データ語を転送する。状態保存コントローラは、回路とシステム・バスに結合し、保存トリガに応答して、回路の状態を定義するデータ値を1つまたは複数のノードから読み取ってメモリ書込み要求のシーケンスをシステム・バス上に生成し、データ値を表す1つまたは複数の状態保存多ビット・データ語をメモリに書き込んで、1つまたは複数の状態保存多ビット・データ語を用いて回路の状態を回復できるようにする。また、関連する技術として、米国公開公報2005/0149799に記載されたものもある。   Japanese Patent Application Laid-Open No. 2004-164647 discloses a technique related to a data processing apparatus including a circuit having one or a plurality of nodes, a memory, a system bus, and a state storage controller. A circuit having one or more nodes is a circuit used for processing data and stores one or more data values that collectively define the state of the circuit. The memory stores data. The system bus is a system bus that couples between the circuit and memory, and is often connected between the circuit and memory in response to a memory transfer request given to the system bus during normal processing operations of the circuit and memory. Transfer bit data words. A state save controller couples to the circuit and system bus and, in response to a save trigger, reads a data value defining the circuit state from one or more nodes and places a sequence of memory write requests on the system bus. One or more state-saving multi-bit data words that are generated and representing the data values are written to the memory so that the state of the circuit can be recovered using the one or more state-saving multi-bit data words. Further, as a related technique, there is a technique described in US Publication No. 2005/0149799.

特開平6−52070号公報JP-A-6-52070 特開2004−164647号公報JP 2004-164647 A 米国公開公報2005/0149799US Publication No. 2005/0149799

上述のように、スキャンチェーンを用いて内部状態を退避・復帰する場合には、スキャンチェーンが直列接続された多数のレジスタによって構成されているために、レジスタに保持された全てのデータをシリアルに退避・復帰するために時間がかかる。また、システムバスを介して内部ノードデータをメモリに書き込み、メモリから読み出すために、システムバスの使用権確保を含むメモリ書き込みシーケンス、メモリ読み出しシーケンスを起動する必要性があるため、やはり内部状態の退避・回復時間が長くなる。   As described above, when the internal state is saved and restored using the scan chain, since the scan chain is composed of a large number of registers connected in series, all the data held in the register is serially stored. It takes time to evacuate / restore. In addition, in order to write internal node data to the memory via the system bus and read from the memory, it is necessary to start a memory write sequence and memory read sequence including securing the right to use the system bus.・ Recovery time becomes longer.

本発明は、半導体集積回路を待機状態にしつつ、内部状態の退避・回復時間を短縮することができる半導体集積回路及びその制御方法を提供することを目的とする。   An object of the present invention is to provide a semiconductor integrated circuit and a control method therefor that can shorten the save / recovery time of the internal state while putting the semiconductor integrated circuit in a standby state.

以下に、[発明を実施するための最良の形態]で使用される番号・符号を用いて、課題を解決するための手段を説明する。これらの番号・符号は、[特許請求の範囲]の記載と[発明を実施するための最良の形態]との対応関係を明らかにするために付加されたものである。ただし、それらの番号・符号を、[特許請求の範囲]に記載されている発明の技術的範囲の解釈に用いてはならない。   Hereinafter, means for solving the problem will be described using the numbers and symbols used in [Best Mode for Carrying Out the Invention]. These numbers and symbols are added to clarify the correspondence between the description of [Claims] and [Best Mode for Carrying Out the Invention]. However, these numbers and symbols should not be used for the interpretation of the technical scope of the invention described in [Claims].

本発明の観点では、半導体集積回路は、対象回路(11)と、バックアップ制御回路(12)とを具備する。対象回路(11)は、スキャンパステスト時にシフトレジスタを形成してテストデータをシリアルに入出力する少なくとも1つのスキャンチェーン(15)を備える。バックアップ制御回路(12)は、対象回路(11)の内部状態を示す内部状態データをメモリ(13)に格納し、メモリ(13)から内部状態データを読み出す。このスキャンチェーン(15)は、複数のサブスキャンチェーン(21〜24、31〜34)に分割されている。複数のサブスキャンチェーン(21〜24、31〜34)は並列に動作する。内部状態データは、複数のサブスキャンチェーン(21〜24、31〜34)から出力されてメモリ(13)に格納される。メモリ(13)に格納されている内部状態データは、複数のサブスキャンチェーン(21〜24、31〜34)に再び設定され、対象回路(11)は、元の内部状態に戻って動作を再開する。   In an aspect of the present invention, the semiconductor integrated circuit includes a target circuit (11) and a backup control circuit (12). The target circuit (11) includes at least one scan chain (15) that forms a shift register and inputs / outputs test data serially during a scan path test. The backup control circuit (12) stores internal state data indicating the internal state of the target circuit (11) in the memory (13), and reads the internal state data from the memory (13). The scan chain (15) is divided into a plurality of sub scan chains (21 to 24, 31 to 34). The plurality of sub-scan chains (21-24, 31-34) operate in parallel. The internal state data is output from the plurality of sub scan chains (21 to 24, 31 to 34) and stored in the memory (13). The internal state data stored in the memory (13) is set again in the plurality of sub scan chains (21 to 24, 31 to 34), and the target circuit (11) returns to the original internal state and resumes operation. To do.

本発明の他の観点では、内部状態退避回復方法は、動作切替ステップと、退避ステップと、回復ステップと、再開ステップとを具備する。対象回路(11)は、スキャンパステストに使用される少なくとも1つのスキャンチェーン(15)を備える。動作切替ステップは、そのスキャンチェーン(15)を分割して、並列に動作する複数のサブスキャンチェーン(21〜24、31〜34)に構成し直す。退避ステップは、複数のサブスキャンチェーン(21〜24、31〜34)の各々から出力される対象回路(11)の内部状態を示す内部状態データをメモリ(13)に格納する。回復ステップは、メモリ(13)から出力される内部状態データを複数のサブスキャンチェーン(21〜24、31〜34)に再び設定する。再開ステップは、複数のサブスキャンチェーン(21〜24、31〜34)を解放して対象回路(11)の動作を元の状態から再開する。   In another aspect of the present invention, the internal state save / recovery method includes an operation switching step, a save step, a recovery step, and a restart step. The target circuit (11) includes at least one scan chain (15) used for a scan path test. In the operation switching step, the scan chain (15) is divided into a plurality of sub scan chains (21 to 24, 31 to 34) that operate in parallel. In the saving step, internal state data indicating the internal state of the target circuit (11) output from each of the plurality of sub scan chains (21 to 24, 31 to 34) is stored in the memory (13). In the recovery step, the internal state data output from the memory (13) is set again in the plurality of sub scan chains (21 to 24, 31 to 34). In the restarting step, the plurality of sub-scan chains (21 to 24, 31 to 34) are released, and the operation of the target circuit (11) is restarted from the original state.

本発明によれば、スキャンチェーンを複数のサブスキャンチェーンに分割し、サブスキャンチェーンの出力を並列にメモリに格納することによって、内部状態の退避・回復時間が短縮された半導体集積回路及びその制御方法を提供することが可能になる。   According to the present invention, the scan chain is divided into a plurality of sub-scan chains, and the outputs of the sub-scan chains are stored in the memory in parallel, so that the internal state save / recovery time is shortened and the control thereof It becomes possible to provide a method.

図を参照して本発明の第1の実施の形態を説明する。図1は、第1の実施の形態に係る半導体集積回路の構成を示すブロック図である。半導体集積回路は、内部状態が外部に退避される対象回路11と、対象回路11の内部状態を記憶するバックアップメモリ13と、対象回路11の内部状態の退避・回復を制御するバックアップ制御回路12と、対象回路11の電源を制御するスイッチ14とを具備する。対象回路11の内部状態は、対象回路11に内在するフリップフロップに保持される内部ノードデータにより具現化される。   A first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the semiconductor integrated circuit according to the first embodiment. The semiconductor integrated circuit includes a target circuit 11 whose internal state is saved to the outside, a backup memory 13 that stores the internal state of the target circuit 11, and a backup control circuit 12 that controls saving and recovery of the internal state of the target circuit 11. And a switch 14 for controlling the power supply of the target circuit 11. The internal state of the target circuit 11 is embodied by internal node data held in a flip-flop inherent in the target circuit 11.

バックアップ制御回路12は、対象回路11から指示(WFI)を受けて、対象回路11の動作モード(MD)を切り替え、対象回路11の内部状態を示すデータ即ち内部ノードデータをバックアップメモリ13に退避する。また、バックアップ制御回路12は、外部からの割り込み信号(INT)により起動され、バックアップメモリ13に格納されている内部ノードデータを対象回路11の各ノードに設定し、対象回路11の内部状態を回復する。この内部状態の退避・回復動作に際し、バックアップ制御回路12は、バックアップメモリ13の格納アドレス(ADDR)、書き込み・読み出しタイミング(CTR)を制御する。   The backup control circuit 12 receives an instruction (WFI) from the target circuit 11, switches the operation mode (MD) of the target circuit 11, and saves data indicating the internal state of the target circuit 11, that is, internal node data, to the backup memory 13. . The backup control circuit 12 is activated by an external interrupt signal (INT), sets internal node data stored in the backup memory 13 to each node of the target circuit 11, and recovers the internal state of the target circuit 11. To do. In the internal state saving / restoring operation, the backup control circuit 12 controls the storage address (ADDR) and the write / read timing (CTR) of the backup memory 13.

対象回路11の電源系は、他の回路と分離されている。従って、対象回路11だけの電源を切断することが可能となる。スイッチ14は、この電源の投入切断をバックアップ制御回路12の制御(PWC)に基づいて行う。   The power supply system of the target circuit 11 is separated from other circuits. Therefore, it is possible to cut off the power supply of only the target circuit 11. The switch 14 turns on and off the power based on the control (PWC) of the backup control circuit 12.

バックアップメモリ13は、対象回路11の内部状態を示す内部ノードデータを保持する。バックアップメモリ13は、対象回路11の内部ノードデータを格納するだけの容量があればよい。内部ノードデータTOを効率よく取り込むためにデータ幅(ワード長)は広くなっている。例えば、スキャンチェーンが32個、それぞれのスキャンチェーンから4ヵ所の内部ノードデータTOを取り出すとすると、1スキャンクロック毎に128ビットのデータが並列に出力される。そのため、バックアップメモリ13は、128ビット以上のワード長が必要になる。バックアップメモリ13の書き込み/読み出しの動作タイミングCTR、アドレスADDRは、バックアップ制御回路12から与えられる。このバックアップメモリ13は、閾値電圧が高く設定され、低リーク電流のメモリである。従って、バックアップメモリ13の速度はそれほど速くないが、消費電力は少ない。また、バックアップメモリ13として、フラッシュメモリ等の不揮発性メモリを用いると、待機時にバックアップメモリ13の電源も切断することが可能となり、さらに消費電力を削減することができる。   The backup memory 13 holds internal node data indicating the internal state of the target circuit 11. The backup memory 13 only needs to have a capacity for storing the internal node data of the target circuit 11. The data width (word length) is widened in order to capture the internal node data TO efficiently. For example, if there are 32 scan chains and four internal node data TO are extracted from each scan chain, 128-bit data is output in parallel for each scan clock. Therefore, the backup memory 13 needs a word length of 128 bits or more. The write / read operation timing CTR and address ADDR of the backup memory 13 are given from the backup control circuit 12. This backup memory 13 is a memory having a low threshold voltage and a low leakage current. Therefore, the speed of the backup memory 13 is not so high, but the power consumption is small. Further, when a non-volatile memory such as a flash memory is used as the backup memory 13, the backup memory 13 can be powered off during standby, and power consumption can be further reduced.

この対象回路11の内部状態を示す内部ノードデータは、スキャンチェーン15を介して入出力される。スキャンチェーン15は、半導体集積回路の正常性を試験するスキャンパステストに使用される。スキャンチェーン15は、スキャンパステスト時、テストデータをスキャン入力SIからシリアル入力し、テスト結果をスキャン出力SOから出力する。ここでは説明しないが、バックアップ制御回路12、バックアップメモリ13は、スキャンパステストの対象であってもよい。   The internal node data indicating the internal state of the target circuit 11 is input / output via the scan chain 15. The scan chain 15 is used for a scan path test for testing the normality of the semiconductor integrated circuit. In the scan path test, the scan chain 15 serially inputs test data from the scan input SI and outputs a test result from the scan output SO. Although not described here, the backup control circuit 12 and the backup memory 13 may be scan path test targets.

対象回路11は、待機中に保持すべき内部状態を有する回路部分である。対象回路11は、対象回路11の製造不良等を検出するために実施されるスキャンパステスト用の回路を内蔵している。このスキャンパステスト用回路は、テスト時に対象回路11に内在するフリップフロップが鎖状に接続され、シフトレジスタとしてデータの入出力を行う。このシフトレジスタが、所謂スキャンチェーンと呼ばれる。対象回路11内には、このスキャンチェーン15が少なくとも1つ設定されている。最近の半導体集積回路では、スキャンチェーン15は、32個程度設定されていることが多いが、より多くのスキャンチェーンが設定されていてもよいし、1個だけであってもよい。各スキャンチェーン15は、外部に接続されるスキャン入力SI(SI1〜SIn〜SIN)からスキャンパステスト用のシリアルデータが入力され、外部に接続されるスキャン出力SO(SO1〜SOn〜SON)からスキャンパステスト結果データがシリアルに出力される。それぞれのシリアルデータの入出力は、同期している必要はなく、スキャンチェーン毎に独立して動作していてもよい。以下、スキャンチェーン15は、スキャン入力SIn、スキャン出力SOn(n=1、2、…、N)の回路を例として説明される。   The target circuit 11 is a circuit portion having an internal state to be held during standby. The target circuit 11 incorporates a circuit for a scan path test that is performed in order to detect a manufacturing defect or the like of the target circuit 11. In this scan path test circuit, flip-flops inherent in the target circuit 11 are connected in a chain at the time of testing, and data is input / output as a shift register. This shift register is called a so-called scan chain. At least one scan chain 15 is set in the target circuit 11. In recent semiconductor integrated circuits, about 32 scan chains 15 are often set, but more scan chains may be set or only one. Each scan chain 15 receives scan path test serial data from an externally connected scan input SI (SI1 to SIn to SIN) and an externally connected scan output SO (SO1 to SOn to SON). Campus test result data is output serially. The input / output of each serial data need not be synchronized, and may operate independently for each scan chain. Hereinafter, the scan chain 15 will be described by taking a circuit of the scan input SIn and the scan output SOn (n = 1, 2,..., N) as an example.

対象回路11は、内部の論理回路が動作すると、論理回路に含まれる順序回路(フリップフロップ)にその動作状態が保持される。即ち、フリップフロップは、対象回路11の内部状態を保持している。このフリップフロップに保持された内部ノードデータを退避することにより対象回路11の内部状態が外部に出力でき、データを各フリップフロップに設定することにより対象回路11の内部状態を設定することができる。一方、フリップフロップは、スキャンパステスト時、スキャンチェーン15を形成し、その保持しているデータをシリアル出力することができる。また、スキャンチェーン15は、データをシリアル入力して、スキャンパステストするためのデータを各フリップフロップに設定することができる。従って、このスキャンチェーン15を使うことにより、フリップフロップの状態を読み出し、書き込むことが可能である。   When the internal logic circuit operates, the target circuit 11 holds its operation state in a sequential circuit (flip-flop) included in the logic circuit. That is, the flip-flop holds the internal state of the target circuit 11. By saving the internal node data held in the flip-flop, the internal state of the target circuit 11 can be output to the outside, and by setting the data in each flip-flop, the internal state of the target circuit 11 can be set. On the other hand, the flip-flop can form the scan chain 15 and serially output the stored data during the scan path test. Further, the scan chain 15 can serially input data and set data for a scan path test in each flip-flop. Therefore, by using this scan chain 15, the state of the flip-flop can be read and written.

対象回路11は、バックアップ制御回路12の制御に基づいて、スキャンチェーン15の出力、即ち、スキャン出力SOとスキャンチェーン15の途中の複数の位置から取り出したデータTOとをバックアップメモリ13に出力する。対象回路11の全てのフリップフロップに保持されるデータが出力されると、対象回路11の内部状態がバックアップメモリ13に退避されたことになる。また、対象回路11は、バックアップ制御回路12の制御に基づいて、バックアップメモリ13から出力されるデータTIを取り込みスキャンチェーン15に設定する。スキャンチェーン15にデータが設定されると、対象回路11の内部状態が回復されたことになる。対象回路11を回復状態から通常動作状態に切り替えると、対象回路11は、通常動作に復帰する。   Based on the control of the backup control circuit 12, the target circuit 11 outputs the output of the scan chain 15, that is, the scan output SO and the data TO extracted from a plurality of positions in the scan chain 15 to the backup memory 13. When data held in all flip-flops of the target circuit 11 is output, the internal state of the target circuit 11 is saved in the backup memory 13. The target circuit 11 takes in the data TI output from the backup memory 13 and sets it in the scan chain 15 based on the control of the backup control circuit 12. When data is set in the scan chain 15, the internal state of the target circuit 11 is recovered. When the target circuit 11 is switched from the recovery state to the normal operation state, the target circuit 11 returns to the normal operation.

図2にスキャンチェーンが有効になっている時のスキャンチェーン15の構成が示される。スキャンチェーン15は、スキャンテスト時に複数のレジスタを連結して構成される1本のチェーンであり、この1本のチェーンを複数に分割したものがサブスキャンチェーンである。スキャンチェーン15は、複数のサブスキャンチェーンを備える。ここでは、スキャンチェーン15は、4つのサブスキャンチェーン21、22、23、24を備える。サブスキャンチェーン21、22、23、24は、それぞれ同数のフリップフロップを含む。サブスキャンチェーン21、22、23、24は縦続接続され、スキャンパステストの際、1つのスキャンチェーン15として動作する。内部ノードデータの入出力時、サブスキャンチェーン21、22、23、24は並列に動作し、同時にデータを入出力する。サブスキャンチェーン21は、選択回路210と、スキャンチェーンの実体であるフリップフロップ211〜214を備える。同じように、サブスキャンチェーン22は選択回路220とフリップフロップ221〜224を備え、サブスキャンチェーン23は選択回路230とフリップフロップ231〜234を備え、サブスキャンチェーン24は選択回路240とフリップフロップ241〜244を備える。選択回路210、220、230、240は、選択信号TBに基づいて、入力される2つの信号のどちらかを選択して出力する。   FIG. 2 shows the configuration of the scan chain 15 when the scan chain is enabled. The scan chain 15 is a single chain formed by connecting a plurality of registers during a scan test, and a sub-scan chain is obtained by dividing the single chain into a plurality of chains. The scan chain 15 includes a plurality of sub scan chains. Here, the scan chain 15 includes four sub scan chains 21, 22, 23, and 24. Each of the sub scan chains 21, 22, 23, and 24 includes the same number of flip-flops. The sub scan chains 21, 22, 23, and 24 are connected in cascade, and operate as one scan chain 15 during a scan path test. When inputting / outputting internal node data, the sub-scan chains 21, 22, 23, 24 operate in parallel, and input / output data simultaneously. The sub-scan chain 21 includes a selection circuit 210 and flip-flops 211 to 214 that are actual scan chains. Similarly, the sub-scan chain 22 includes a selection circuit 220 and flip-flops 221 to 224, the sub-scan chain 23 includes a selection circuit 230 and flip-flops 231 to 234, and the sub-scan chain 24 includes a selection circuit 240 and flip-flop 241. ˜244. The selection circuits 210, 220, 230, and 240 select and output one of the two input signals based on the selection signal TB.

サブスキャンチェーン21では、選択回路210は、スキャン入力SInと、バックアップメモリ13に格納されていた内部ノードデータTI1とを入力する。選択回路210は、選択信号TBに基づいて、スキャンパステスト時はスキャン入力SInから入力されるデータを選択して出力し、内部状態退避・回復時はメモリ13に記憶されている内部ノードデータTI1を選択して出力する。フリップフロップ211〜214は鎖状に接続されてシフトレジスタを形成し、選択回路210の出力信号が入力される。フリップフロップ214の出力は、内部ノードデータTO1として出力されるとともに、次段のサブスキャンチェーン22に送られる。   In the sub scan chain 21, the selection circuit 210 receives the scan input SIn and the internal node data TI1 stored in the backup memory 13. The selection circuit 210 selects and outputs data input from the scan input SIn during the scan path test based on the selection signal TB, and the internal node data TI1 stored in the memory 13 during the internal state saving / recovery. Select to output. The flip-flops 211 to 214 are connected in a chain to form a shift register, and an output signal of the selection circuit 210 is input thereto. The output of the flip-flop 214 is output as internal node data TO1, and is sent to the sub-scan chain 22 at the next stage.

サブスキャンチェーン22では、選択回路220は、前段のサブスキャンチェーン21の出力データTO1と、バックアップメモリ13に格納されていた内部ノードデータTI2とを入力する。選択回路220は、選択信号TBに基づいて、スキャンパステスト時は前段出力データTO1を選択して出力し、内部状態退避・回復時はメモリ13に記憶されている内部ノードデータTI2を選択して出力する。フリップフロップ221〜224は、鎖状に接続されてシフトレジスタを形成し、選択回路220の出力信号が入力される。フリップフロップ224の出力は、内部ノードデータTO2として出力されるとともに、次段のサブスキャンチェーン23に送られる。   In the sub scan chain 22, the selection circuit 220 inputs the output data TO 1 of the previous sub scan chain 21 and the internal node data TI 2 stored in the backup memory 13. Based on the selection signal TB, the selection circuit 220 selects and outputs the previous stage output data TO1 during the scan path test, and selects the internal node data TI2 stored in the memory 13 during the internal state saving / recovery. Output. The flip-flops 221 to 224 are connected in a chain to form a shift register, and an output signal of the selection circuit 220 is input thereto. The output of the flip-flop 224 is output as internal node data TO2, and is sent to the sub-scan chain 23 at the next stage.

同じように、サブスキャンチェーン23では、選択回路230は、前段のサブスキャンチェーン22の出力データTO2と、バックアップメモリ13に格納されていた内部ノードデータTI3とを入力する。選択回路230は、選択信号TBに基づいて、スキャンパステスト時は前段出力データTO2を選択して出力し、内部状態退避・回復時はメモリ13に記憶されている内部ノードデータTI3を選択して出力する。フリップフロップ231〜234は、鎖状に接続されてシフトレジスタを形成し、選択回路230の出力信号が入力される。フリップフロップ234の出力は、内部ノードデータTO3として出力されるとともに、次段のサブスキャンチェーン24に送られる。   Similarly, in the sub scan chain 23, the selection circuit 230 inputs the output data TO2 of the previous sub scan chain 22 and the internal node data TI3 stored in the backup memory 13. Based on the selection signal TB, the selection circuit 230 selects and outputs the previous-stage output data TO2 during the scan path test, and selects the internal node data TI3 stored in the memory 13 during the internal state saving / restoring. Output. The flip-flops 231 to 234 are connected in a chain to form a shift register, and an output signal of the selection circuit 230 is input thereto. The output of the flip-flop 234 is output as internal node data TO3 and sent to the sub-scan chain 24 at the next stage.

同じように、サブスキャンチェーン24では、選択回路240は、前段のサブスキャンチェーン23の出力データTO3と、バックアップメモリ13に格納されていた内部ノードデータTI4とを入力する。選択信号TBに基づいて、選択回路240は、スキャンパステスト時は前段出力データTO3を選択して出力し、内部状態退避・回復時はメモリ13に記憶されている内部ノードデータTI4を選択して出力する。フリップフロップ241〜244は、鎖状に接続されてシフトレジスタを形成し、選択回路240の出力信号が入力される。フリップフロップ244の出力は、内部ノードデータTO4として出力されるとともに、スキャンチェーン15の出力SOnとして外部に出力される。   Similarly, in the sub scan chain 24, the selection circuit 240 inputs the output data TO3 of the sub scan chain 23 in the previous stage and the internal node data TI4 stored in the backup memory 13. Based on the selection signal TB, the selection circuit 240 selects and outputs the previous stage output data TO3 during the scan path test, and selects the internal node data TI4 stored in the memory 13 during the internal state saving / restoring. Output. The flip-flops 241 to 244 are connected in a chain to form a shift register, and an output signal of the selection circuit 240 is input thereto. The output of the flip-flop 244 is output as internal node data TO4 and also output to the outside as the output SOn of the scan chain 15.

次にスキャンチェーン15の動作が説明される。対象回路11の本来の機能動作時、フリップフロップ211〜214、フリップフロップ221〜224、フリップフロップ231〜234、フリップフロップ241〜244は、内部論理回路のレジスタとして、対象回路11の内部状態(内部ノードデータ)を保持している。   Next, the operation of the scan chain 15 will be described. During the original functional operation of the target circuit 11, the flip-flops 211 to 214, the flip-flops 221 to 224, the flip-flops 231 to 234, and the flip-flops 241 to 244 serve as internal logic circuit registers. Node data).

スキャンパステストの場合、対象回路11に内在するフリップフロップは、図2に示されるように、スキャンチェーン15を構成するように接続される。スキャンチェーンに関してはよく知られているため、詳細な説明は省略される。実際には、接続配線されていて、図示されていないフリップフロップに内蔵された選択回路が、スキャンチェーンを形成する時にスキャンチェーンの信号を選択するように設定される。選択回路210、220、230、240は、選択信号TBによりスキャンデータ側のデータを選択して出力するように設定される。従って、サブスキャンチェーン21〜24に含まれるフリップフロップは、連結された1つのシフトレジスタを形成する。スキャンクロックに同期してスキャンデータは、スキャン入力SInから入力され、スキャン出力SOnに向かって順次フリップフロップを移動していく。全てのフリップフロップにスキャンデータが設定されると、各フリップフロップは、一旦スキャンチェーン15の構成から解放され、本来の内部論理回路である対象回路11のデータを取り込む。このとき、各フリップフロップはスキャンデータを出力しているため、各フリップフロップはスキャンパステストの結果を保持することになる。その後、フリップフロップはスキャンチェーン15の構成に戻る。スキャンパステストの結果を保持するシフトレジスタは、スキャンクロックに基づいて、スキャンパステストの結果データをスキャン出力SOnから出力する。   In the case of the scan path test, the flip-flops inherent in the target circuit 11 are connected so as to form the scan chain 15 as shown in FIG. Since the scan chain is well known, a detailed description is omitted. In practice, a selection circuit that is connected and wired and built in a flip-flop (not shown) is set to select a signal of the scan chain when forming the scan chain. The selection circuits 210, 220, 230, and 240 are set so as to select and output data on the scan data side according to the selection signal TB. Accordingly, the flip-flops included in the sub-scan chains 21 to 24 form one connected shift register. In synchronization with the scan clock, scan data is input from the scan input SIn, and sequentially moves through the flip-flops toward the scan output SOn. When the scan data is set in all the flip-flops, each flip-flop is once released from the configuration of the scan chain 15 and takes in the data of the target circuit 11 which is the original internal logic circuit. At this time, since each flip-flop outputs scan data, each flip-flop holds the result of the scan path test. Thereafter, the flip-flop returns to the configuration of the scan chain 15. The shift register that holds the scan path test result outputs the scan path test result data from the scan output SOn based on the scan clock.

内部ノードデータ退避の場合、スキャンチェーン15は、サブスキャンチェーン21〜24が並列に機能するように設定される。選択信号TBは、どちらに設定されていてもよいが、ここではバックアップメモリ13の出力(TI)を選択するように設定される。スキャンパステスト時と同じように、フリップフロップに保持されている内部ノードデータは、クロックに同期して並列にサブスキャンチェーンの出力データTO1〜TO4として順次バックアップメモリ13に出力される。バックアップメモリ13のアドレスADDRは、バックアップ制御回路12によりクロックに同期して更新され、サブスキャンチェーンの出力データTO1〜TO4は、バックアップメモリ13に順に記憶される。サブスキャンチェーンに含まれるフリップフロップの数だけデータを出力すると、このスキャンチェーン15に含まれる全ての内部ノードデータは、バックアップメモリ13に出力されたことになる。従って、スキャンチェーン15の出力SOnをメモリに接続して内部ノードデータを記憶させるより、出力時間は短縮できる。図2に示されるように、スキャンチェーン15をサブスキャンチェーン21〜24のように4分割すると、出力時間は1/4になる。   In the case of saving internal node data, the scan chain 15 is set so that the sub scan chains 21 to 24 function in parallel. The selection signal TB may be set to either one, but here is set to select the output (TI) of the backup memory 13. As in the scan path test, the internal node data held in the flip-flop is sequentially output to the backup memory 13 in parallel as sub-scan chain output data TO1 to TO4 in synchronization with the clock. The address ADDR of the backup memory 13 is updated in synchronization with the clock by the backup control circuit 12, and the output data TO <b> 1 to TO <b> 4 of the sub scan chain are sequentially stored in the backup memory 13. When data is output by the number of flip-flops included in the sub scan chain, all internal node data included in the scan chain 15 is output to the backup memory 13. Therefore, the output time can be shortened by connecting the output SOn of the scan chain 15 to the memory and storing the internal node data. As shown in FIG. 2, when the scan chain 15 is divided into four like the sub scan chains 21 to 24, the output time becomes 1/4.

内部ノードデータ回復の場合、即ち、バックアップメモリ13に保持されている内部ノードデータを元のフリップフロップに設定する場合、スキャンチェーン15は、サブスキャンチェーン21〜24が並列に機能するように設定される。選択信号TBは、バックアップメモリ13の出力(TI)を選択するように設定される。バックアップメモリ13から内部ノードデータTI1〜4がサブスキャンチェーン21〜24に入力される。バックアップ制御回路12は、バックアップメモリ13のアドレスADDRを初期設定値からクロック毎に更新して、内部ノードデータTI1〜4が退避された順にサブスキャンチェーン21〜24に供給されるように制御する。サブスキャンチェーン21〜24に供給される内部ノードデータTI1〜4は、選択回路210、220、230、240を介してサブスキャンチェーン内に形成されるシフトレジスタを出力TO1〜4に向けて移動していく。サブスキャンチェーンに含まれるフリップフロップの数だけシフトすると、各フリップフロップには元の内部ノードデータが設定されている。これで対象回路11の内部状態は回復したことになる。その後、バックアップ回復モードを解除すると、対象回路11は通常の動作に復帰する。   In the case of internal node data recovery, that is, when internal node data held in the backup memory 13 is set in the original flip-flop, the scan chain 15 is set so that the sub scan chains 21 to 24 function in parallel. The The selection signal TB is set so as to select the output (TI) of the backup memory 13. Internal node data TI1 to TI4 from the backup memory 13 are input to the sub scan chains 21 to 24. The backup control circuit 12 updates the address ADDR of the backup memory 13 for each clock from the initial setting value, and controls the internal node data TI1 to TI4 to be supplied to the sub scan chains 21 to 24 in the order in which they are saved. The internal node data TI1 to TI4 supplied to the sub scan chains 21 to 24 move the shift registers formed in the sub scan chain through the selection circuits 210, 220, 230, and 240 toward the outputs TO1 to 4. To go. When shifting by the number of flip-flops included in the sub-scan chain, the original internal node data is set in each flip-flop. Thus, the internal state of the target circuit 11 has been recovered. Thereafter, when the backup recovery mode is canceled, the target circuit 11 returns to a normal operation.

このように、スキャンチェーン(サブスキャンチェーン)を用いて、内部ノードデータをバックアップメモリ13に退避し、バックアップメモリ13から内部ノードデータを対象回路11に回復する回路を内蔵する半導体集積回路の動作状態が図3を参照して説明される。ここでは、対象回路11は、半導体集積回路に内蔵されるCPU(中央演算処理部)であるとし、CPUが実行しているソフトウェアの処理状態が対象回路11の状態として説明される。図3の左側に半導体集積回路を外部(ソフトウェア)の観点で見たときの動作状態が示される。図3の右側に内部(ハードウェア)の観点で見たときの対象回路11、バックアップ制御回路12、バックアップメモリ13の動作状態が示される。   As described above, the operation state of the semiconductor integrated circuit including the circuit that saves the internal node data to the backup memory 13 and recovers the internal node data from the backup memory 13 to the target circuit 11 using the scan chain (sub-scan chain). Will be described with reference to FIG. Here, it is assumed that the target circuit 11 is a CPU (central processing unit) built in the semiconductor integrated circuit, and the processing state of the software executed by the CPU is described as the state of the target circuit 11. The operation state when the semiconductor integrated circuit is viewed from the outside (software) is shown on the left side of FIG. The operation state of the target circuit 11, the backup control circuit 12, and the backup memory 13 when viewed from the inside (hardware) is shown on the right side of FIG.

半導体集積回路は、通常の動作において、例えば、周期処理やマンマシンインタフェース処理等により待機状態になることがある。そのとき、CPU11は、WFI(Wait for Interrupt)命令を実行し、待機状態になる。通常、待機状態では、ソフトウェアの実行は停止される。その場合、処理再開を指示する割り込み信号INTが入力されると即時実行再開ができるように、ハードウェアは必要最小限の待機電圧まで電源電圧を引き下げ、消費電力を削減する。さらに消費電力を削減するために、本発明では、図3に破線により囲まれて示されるように、CPU11の電源供給が停止され、待機状態におけるリーク電流が削減される。CPU11の電源がオフされると、CPU11の内部状態がクリアされるため、電源がオフされる前に、CPU11の内部状態がバックアップメモリ13に退避される。   In a normal operation, the semiconductor integrated circuit may enter a standby state due to, for example, periodic processing or man-machine interface processing. At that time, the CPU 11 executes a WFI (Wait for Interrupt) instruction and enters a standby state. Usually, in the standby state, the execution of software is stopped. In this case, the hardware lowers the power supply voltage to the minimum standby voltage to reduce power consumption so that immediate execution can be resumed when an interrupt signal INT for instructing process resumption is input. In order to further reduce power consumption, in the present invention, as indicated by a broken line in FIG. 3, the power supply to the CPU 11 is stopped, and the leakage current in the standby state is reduced. Since the internal state of the CPU 11 is cleared when the power of the CPU 11 is turned off, the internal state of the CPU 11 is saved in the backup memory 13 before the power is turned off.

CPU11の動作を再開するトリガとなる割り込み信号INTがバックアップ制御回路12に入力されると、CPU11の電源がオンされる。CPU11の内部状態がバックアップメモリ13から回復され、ソフトウェアの実行が再開される。割り込み信号INTが入力されるため、ソフトウェアは割り込み処理をまず実行し、その後通常の処理に戻ることになる。従って、ソフトウェアとしては、電源のオン・オフに影響されずに、待機状態が維持されていたように動作することになる。   When an interrupt signal INT serving as a trigger for restarting the operation of the CPU 11 is input to the backup control circuit 12, the power of the CPU 11 is turned on. The internal state of the CPU 11 is recovered from the backup memory 13, and execution of the software is resumed. Since the interrupt signal INT is input, the software first executes the interrupt process and then returns to the normal process. Therefore, the software operates as if the standby state is maintained without being affected by the power ON / OFF.

即ち、対象回路(CPU)11は、WFI命令が発行されるまで通常の作動状態であり、WFI命令によりソフトウェアは停止するため、内部状態は凍結される。WFI命令が発行されると、バックアップ制御回路12とバックアップメモリ13は、待機状態から起動される。バックアップ制御回路12は、対象回路(CPU)11をスキャンチェーンが設定される退避状態にする。バックアップ制御回路12は、対象回路(CPU)11の凍結された内部ノードデータをバックアップメモリ13に退避する。対象回路(CPU)11の全ての内部ノードデータが退避されると、バックアップ制御回路12は、スイッチ14を制御して対象回路(CPU)11の電源供給を停止する。バックアップ制御回路12は、割り込み信号INTが入力されるまで、待機状態になる。バックアップ制御回路12とバックアップメモリ13は、対象回路(CPU)11に比較して回路規模も小さく、また、低消費電力になるように構成されるため、リーク電流は削減される。   That is, the target circuit (CPU) 11 is in a normal operation state until the WFI command is issued, and the software is stopped by the WFI command, so that the internal state is frozen. When the WFI instruction is issued, the backup control circuit 12 and the backup memory 13 are activated from the standby state. The backup control circuit 12 puts the target circuit (CPU) 11 into a retreat state where a scan chain is set. The backup control circuit 12 saves the frozen internal node data of the target circuit (CPU) 11 in the backup memory 13. When all the internal node data of the target circuit (CPU) 11 is saved, the backup control circuit 12 controls the switch 14 to stop the power supply to the target circuit (CPU) 11. The backup control circuit 12 is in a standby state until the interrupt signal INT is input. Since the backup control circuit 12 and the backup memory 13 are configured to have a smaller circuit scale and lower power consumption than the target circuit (CPU) 11, leakage current is reduced.

割り込み信号INTがバックアップ制御回路12に入力されると、バックアップ制御回路12は、待機状態から作動状態に復帰する。まず、バックアップ制御回路12は、スイッチ14を制御して対象回路(CPU)11の電源供給を再開する。次に、バックアップ制御回路12は、対象回路(CPU)11をスキャンチェーンが設定される回復状態にする。バックアップ制御回路12は、バックアップメモリ13に記憶されている内部ノードデータTIをサブスキャンチェーンに供給し、内部状態をリストアする。対象回路(CPU)11の内部状態が元の状態に回復すると、バックアップ制御回路12は、対象回路(CPU)11の回復状態を解除して対象回路(CPU)11を起動する。対象回路(CPU)11は、動作を再開する。バックアップ制御回路12とバックアップメモリ13は、次のWFI命令発行まで待機状態になる。ここでは、対象回路11はCPUであるとして説明されたが、対象回路11はCPUに限らずランダムロジック回路でも同様に実施することが可能である。   When the interrupt signal INT is input to the backup control circuit 12, the backup control circuit 12 returns from the standby state to the operating state. First, the backup control circuit 12 controls the switch 14 to resume power supply to the target circuit (CPU) 11. Next, the backup control circuit 12 puts the target circuit (CPU) 11 in a recovery state in which the scan chain is set. The backup control circuit 12 supplies the internal node data TI stored in the backup memory 13 to the sub scan chain and restores the internal state. When the internal state of the target circuit (CPU) 11 is restored to the original state, the backup control circuit 12 cancels the recovery state of the target circuit (CPU) 11 and activates the target circuit (CPU) 11. The target circuit (CPU) 11 resumes operation. The backup control circuit 12 and the backup memory 13 are in a standby state until the next WFI instruction is issued. Here, the target circuit 11 has been described as being a CPU. However, the target circuit 11 is not limited to the CPU, and can be similarly implemented by a random logic circuit.

このように、スキャンチェーン15よりも短いサブスキャンチェーン21〜24にシリアルデータを送り込んで内部状態を再設定することになり、復帰時間は短縮される。上述のように、本発明によれば、より短い時間で内部状態を退避・回復することが可能になり、かつ、待機期間のリーク電流を削減することができる。   In this way, serial data is sent to the sub-scan chains 21 to 24 shorter than the scan chain 15 to reset the internal state, and the recovery time is shortened. As described above, according to the present invention, the internal state can be saved and restored in a shorter time, and the leakage current during the standby period can be reduced.

図4は、さらに最小回復時間を短縮するための経路を設けたスキャンチェーンの構成を示すブロック図である。最小回復時間は、内部状態データの退避が開始された直後に退避の中止、即ち、内部状態データの回復が指示されたときに要する時間である。図4に示されるスキャンチェーン15は、図2に示されるサブスキャンチェーン21〜24の各々の先頭にさらに選択回路が設けられている。   FIG. 4 is a block diagram showing the configuration of a scan chain provided with a path for further shortening the minimum recovery time. The minimum recovery time is the time required when saving is instructed immediately after the saving of internal state data is started, that is, when recovery of internal state data is instructed. The scan chain 15 shown in FIG. 4 is further provided with a selection circuit at the head of each of the sub scan chains 21 to 24 shown in FIG.

このスキャンチェーン15は、サブスキャンチェーン31、32、33、34を備える。サブスキャンチェーン31は、選択回路319、310とフリップフロップ311〜314を備える。同じように、サブスキャンチェーン32は、選択回路329、320とフリップフロップ321〜324を備え、サブスキャンチェーン33は、選択回路339、330とフリップフロップ331〜334を備え、サブスキャンチェーン34は、選択回路349、340とフリップフロップ341〜344を備える。選択回路319、329、339、349を除く部分は、図2に示されるスキャンチェーンと同じである。   The scan chain 15 includes sub-scan chains 31, 32, 33, and 34. The sub scan chain 31 includes selection circuits 319 and 310 and flip-flops 311 to 314. Similarly, the sub scan chain 32 includes selection circuits 329 and 320 and flip-flops 321 to 324, the sub scan chain 33 includes selection circuits 339 and 330 and flip flops 331 to 334, and the sub scan chain 34 includes Selection circuits 349 and 340 and flip-flops 341 to 344 are provided. The parts other than the selection circuits 319, 329, 339, and 349 are the same as the scan chain shown in FIG.

選択回路319、329、339、349は、選択信号BRに基づいて、バックアップメモリ13が出力する退避された内部ノードデータTIと、サブスキャンチェーンが出力する内部ノードデータTOのいずれかを選択して選択回路310、320、330、340に出力する。   Based on the selection signal BR, the selection circuits 319, 329, 339, and 349 select either the saved internal node data TI output from the backup memory 13 or the internal node data TO output from the sub scan chain. The data is output to the selection circuits 310, 320, 330, and 340.

サブスキャンチェーン31では、選択回路319は、バックアップメモリ13から入力される内部ノードデータTI1と、サブスキャンチェーン31が出力する内部ノードデータTO1とを入力する。選択回路319は、選択信号BRに基づいて、内部状態退避時はフィードバックされるように内部ノードデータTO1を選択して出力し、内部状態回復時は退避されていた内部ノードデータTI1を選択して出力する。選択回路310は、スキャン入力SInと、選択回路319の出力信号とを入力する。選択回路310は、選択信号TBに基づいて、スキャンパステスト時はスキャン入力信号SInを選択して出力し、内部状態退避・回復時は選択回路319の出力信号を選択して出力する。フリップフロップ311〜314は、鎖状に接続されてシフトレジスタを形成し、選択回路310の出力信号が入力される。フリップフロップ314の出力信号は、内部ノードデータTO1として出力されるとともに、次段のサブスキャンチェーン32に送られる。   In the sub scan chain 31, the selection circuit 319 inputs the internal node data TI1 input from the backup memory 13 and the internal node data TO1 output from the sub scan chain 31. Based on the selection signal BR, the selection circuit 319 selects and outputs the internal node data TO1 to be fed back when the internal state is saved, and selects the saved internal node data TI1 when the internal state is restored. Output. The selection circuit 310 receives the scan input SIn and the output signal of the selection circuit 319. Based on the selection signal TB, the selection circuit 310 selects and outputs the scan input signal SIn during the scan path test, and selects and outputs the output signal of the selection circuit 319 during the internal state saving / recovery. The flip-flops 311 to 314 are connected in a chain to form a shift register, and an output signal of the selection circuit 310 is input thereto. The output signal of the flip-flop 314 is output as internal node data TO1, and is sent to the sub scan chain 32 in the next stage.

サブスキャンチェーン32では、選択回路329は、バックアップメモリ13から入力される内部ノードデータTI2と、サブスキャンチェーン32が出力する内部ノードデータTO2とを入力する。選択回路329は、選択信号BRに基づいて、内部状態退避時はフィードバックされるように内部ノードデータTO2を選択して出力し、内部状態回復時は退避されていた内部状態TI2を選択して出力する。選択回路320は、前段のサブスキャンチェーン31の出力データTO1と、選択回路329の出力信号とを入力する。選択回路320は、選択信号TBに基づいて、スキャンパステスト時は前段出力データTO1を選択して出力し、内部状態退避・回復時は選択回路329の出力信号を選択して出力する。フリップフロップ321〜324は、鎖状に接続されてシフトレジスタを形成し、選択回路320の出力信号が入力される。フリップフロップ324の出力信号は、内部ノードデータTO2として出力されるとともに、次段のサブスキャンチェーン33に送られる。   In the sub scan chain 32, the selection circuit 329 inputs the internal node data TI2 input from the backup memory 13 and the internal node data TO2 output from the sub scan chain 32. Based on the selection signal BR, the selection circuit 329 selects and outputs the internal node data TO2 so as to be fed back when the internal state is saved, and selects and outputs the saved internal state TI2 when the internal state is recovered. To do. The selection circuit 320 inputs the output data TO1 of the sub-scan chain 31 in the previous stage and the output signal of the selection circuit 329. Based on the selection signal TB, the selection circuit 320 selects and outputs the pre-stage output data TO1 during the scan path test, and selects and outputs the output signal of the selection circuit 329 during the internal state saving / recovery. The flip-flops 321 to 324 are connected in a chain to form a shift register, and the output signal of the selection circuit 320 is input thereto. The output signal of the flip-flop 324 is output as internal node data TO2, and is sent to the sub-scan chain 33 at the next stage.

同じように、サブスキャンチェーン33では、選択回路339は、バックアップメモリ13から入力される内部ノードデータTI3と、サブスキャンチェーン33が出力する内部ノードデータTO3とを入力する。選択回路339は、選択信号BRに基づいて、内部状態退避時はフィードバックされるように内部ノードデータTO3を選択して出力し、内部状態回復時は退避されていた内部状態TI3を選択して出力する。選択回路330は、前段のサブスキャンチェーン32の出力データTO2と、選択回路339の出力データとを入力する。選択回路330は、選択信号TBに基づいて、スキャンパステスト時は前段出力データTO2を選択して出力し、内部状態退避・回復時は選択回路339の出力信号を選択して出力する。フリップフロップ331〜334は、鎖状に接続されてシフトレジスタを形成し、選択回路330の出力信号が入力される。フリップフロップ334の出力は、内部ノードデータTO3として出力されるとともに、次段のサブスキャンチェーン34に送られる。   Similarly, in the sub scan chain 33, the selection circuit 339 inputs the internal node data TI3 input from the backup memory 13 and the internal node data TO3 output from the sub scan chain 33. Based on the selection signal BR, the selection circuit 339 selects and outputs the internal node data TO3 so as to be fed back when the internal state is saved, and selects and outputs the saved internal state TI3 when the internal state is restored. To do. The selection circuit 330 inputs the output data TO2 of the sub-scan chain 32 in the previous stage and the output data of the selection circuit 339. Based on the selection signal TB, the selection circuit 330 selects and outputs the pre-stage output data TO2 during the scan path test, and selects and outputs the output signal of the selection circuit 339 during the internal state saving / recovery. The flip-flops 331 to 334 are connected in a chain to form a shift register, and an output signal of the selection circuit 330 is input thereto. The output of the flip-flop 334 is output as internal node data TO3 and sent to the sub-scan chain 34 at the next stage.

同じように、サブスキャンチェーン34では、選択回路349は、バックアップメモリ13から入力される内部ノードデータTI4と、サブスキャンチェーン34が出力する内部ノードデータTO4とを入力する。選択回路349は、選択信号BRに基づいて、内部状態退避時はフィードバックされるように内部ノードデータTO4を選択して出力し、内部状態回復時は退避されていた内部状態TI4を選択して出力する。選択回路340は、前段のサブスキャンチェーン33の出力データTO3と、選択回路349の出力データとを入力する。選択回路340は、選択信号TBに基づいて、スキャンパステスト時は前段出力データTO3を選択して出力し、内部状態退避・回復時は選択回路349の出力信号を選択して出力する。フリップフロップ341〜344は、鎖状に接続されてシフトレジスタを形成し、選択回路340の出力信号が入力される。フリップフロップ344の出力は、内部ノードデータTO4として出力されるとともに、スキャンチェーン15の出力SOnとして外部に出力される。   Similarly, in the sub scan chain 34, the selection circuit 349 inputs the internal node data TI4 input from the backup memory 13 and the internal node data TO4 output from the sub scan chain 34. Based on the selection signal BR, the selection circuit 349 selects and outputs the internal node data TO4 so as to be fed back when the internal state is saved, and selects and outputs the saved internal state TI4 when the internal state is recovered. To do. The selection circuit 340 receives the output data TO3 of the sub-scan chain 33 in the previous stage and the output data of the selection circuit 349. Based on the selection signal TB, the selection circuit 340 selects and outputs the previous-stage output data TO3 during the scan path test, and selects and outputs the output signal of the selection circuit 349 during the internal state saving / restoring. The flip-flops 341 to 344 are connected in a chain to form a shift register, and the output signal of the selection circuit 340 is input thereto. The output of the flip-flop 344 is output as the internal node data TO4 and also output to the outside as the output SOn of the scan chain 15.

図5A、B、Cを参照してスキャンチェーン15の動作が説明される。スキャンチェーンが形成されていない時、フリップフロップ311〜314、フリップフロップ321〜324、フリップフロップ331〜334、フリップフロップ341〜344は、対象回路11の内部状態を保持している。   The operation of the scan chain 15 will be described with reference to FIGS. 5A, 5B, and 5C. When the scan chain is not formed, the flip-flops 311 to 314, the flip-flops 321 to 324, the flip-flops 331 to 334, and the flip-flops 341 to 344 hold the internal state of the target circuit 11.

スキャンパステストの場合、図5Aに示されるように、対象回路11に内在するフリップフロップはスキャンチェーンを形成する。このとき、選択信号TBは、スキャンパステスト用のデータを選択するように設定される。選択信号BRの設定は、信号の経路に影響しないのでどちらでもよい。従って、フリップフロップ311〜314、フリップフロップ321〜324、フリップフロップ331〜334、フリップフロップ341〜344は、連続する1つのシフトレジスタを形成する。図5Aに太線で示されるように、スキャンパステスト用データは、スキャン入力SInから入力され、順次フリップフロップを移動して各フリップフロップに設定される。   In the case of the scan path test, as shown in FIG. 5A, the flip-flops inherent in the target circuit 11 form a scan chain. At this time, the selection signal TB is set so as to select scan path test data. The selection signal BR may be set either because it does not affect the signal path. Accordingly, the flip-flops 311 to 314, the flip-flops 321 to 324, the flip-flops 331 to 334, and the flip-flops 341 to 344 form one continuous shift register. As indicated by a thick line in FIG. 5A, scan path test data is input from the scan input SIn, and is sequentially set in each flip-flop by moving through the flip-flops.

各フリップフロップにスキャンパステスト用データが設定されると、一旦スキャンチェーンは解除され、内部論理の動作チェックが行われる。その結果は、各フリップフロップに取り込まれ、再度スキャンチェーンが形成される。各フリップフロップに設定されたチェック結果は、シフトレジスタを形成しているフリップフロップを移動してスキャン出力SOnから順次出力される。このように、スキャンパステストにおけるデータの入出力が行われる。   Once the scan path test data is set in each flip-flop, the scan chain is once released and the internal logic operation is checked. The result is taken into each flip-flop, and a scan chain is formed again. The check result set in each flip-flop is sequentially output from the scan output SOn by moving the flip-flop forming the shift register. In this way, data is input / output in the scan path test.

次に、図5Bを参照して対象回路11の内部ノードデータをバックアップメモリ13に退避する退避動作が説明される。内部ノードデータの退避動作の場合、選択回路310、320、330、340は、それぞれ、選択信号TBに基づいて、選択回路319、329、339、349から入力されるデータを選択して出力するように設定される。選択信号BRは、サブスキャンチェーン31〜34の出力TO1〜TO4をそれぞれ自身の入力TI1〜TI4に戻すように設定される。即ち、図5Bに太線で示されるように、内部ノードデータは、各サブスキャンチェーン内で循環するようにシフトされる。従って、サブスキャンチェーン31に保持されていた内部ノードデータが全て出力データTO1として出力されると、フリップフロップ311〜314には元の内部ノードデータが設定されていることになる。サブスキャンチェーン32、33、34においても同じように、内部ノードデータを全て出力し終わると、フリップフロップ321〜324、フリップフロップ331〜334、フリップフロップ341〜344は、元の内部ノードデータを保持する。   Next, a save operation for saving the internal node data of the target circuit 11 to the backup memory 13 will be described with reference to FIG. 5B. In the internal node data saving operation, the selection circuits 310, 320, 330, and 340 select and output data input from the selection circuits 319, 329, 339, and 349 based on the selection signal TB, respectively. Set to The selection signal BR is set so that the outputs TO1 to TO4 of the sub-scan chains 31 to 34 are returned to their own inputs TI1 to TI4, respectively. That is, as indicated by the bold line in FIG. 5B, the internal node data is shifted so as to circulate within each sub-scan chain. Therefore, when all the internal node data held in the sub scan chain 31 is output as the output data TO1, the original internal node data is set in the flip-flops 311 to 314. Similarly, in the sub-scan chains 32, 33, and 34, when all the internal node data has been output, the flip-flops 321 to 324, the flip-flops 331 to 334, and the flip-flops 341 to 344 retain the original internal node data. To do.

これは、内部ノードデータの退避と回復とを同時に行っていることに他ならない。例えば、対象回路11の内部ノードデータをバックアップメモリ13に退避している最中に割り込み信号INTが入力され、復帰動作を開始しなければならない場合、退避動作が完了した時点で対象回路の動作を再開することが可能となる。図2に示されるスキャンチェーン15の構成では、一旦退避動作が開始されると、内部ノードデータを全てバックアップメモリ13に退避し、その後バックアップメモリ13から内部ノードデータをスキャンチェーン15に回復させる必要がある。それに対して、このように、サブスキャンチェーン31〜34の内部ノードデータTO1〜TO4を自身に循環させることにより、退避動作直後に対象回路11の通常動作を再開することが可能となる。従って、退避動作が開始されてから動作回復までの時間を短縮することができる。   This is nothing but saving and restoring internal node data at the same time. For example, when the interrupt signal INT is input while the internal node data of the target circuit 11 is being saved to the backup memory 13 and the return operation must be started, the operation of the target circuit is performed when the save operation is completed. It is possible to resume. In the configuration of the scan chain 15 shown in FIG. 2, once the save operation is started, it is necessary to save all internal node data to the backup memory 13 and then restore the internal node data from the backup memory 13 to the scan chain 15. is there. On the other hand, the normal operation of the target circuit 11 can be resumed immediately after the save operation by circulating the internal node data TO1 to TO4 of the sub scan chains 31 to 34 to itself. Therefore, it is possible to shorten the time from the start of the evacuation operation to the recovery of the operation.

図5Cを参照してバックアップメモリ13に格納されている内部ノードデータから対象回路11の内部状態を回復する回復動作が説明される。バックアップメモリ13には、図5Bを参照して説明されたように、対象回路11の内部ノードデータが順に格納されている。このデータを対象回路11に回復する場合、選択回路310、320、330、340は、選択信号TBに基づいて、それぞれ選択回路319、329、339、349から入力されるデータを選択して出力するように設定される。選択信号BRは、選択回路319、329、339、349がバックアップメモリ13から出力される内部ノードデータTIを選択して出力するように設定される。   A recovery operation for recovering the internal state of the target circuit 11 from the internal node data stored in the backup memory 13 will be described with reference to FIG. 5C. As described with reference to FIG. 5B, the internal memory data of the target circuit 11 is stored in the backup memory 13 in order. When recovering this data to the target circuit 11, the selection circuits 310, 320, 330, and 340 select and output data input from the selection circuits 319, 329, 339, and 349, respectively, based on the selection signal TB. Is set as follows. The selection signal BR is set so that the selection circuits 319, 329, 339, and 349 select and output the internal node data TI output from the backup memory 13.

即ち、図5Cに太線で示されるように、バックアップメモリ13から入力される内部ノードデータTI1は、サブスキャンチェーン31内をシフトされてフリップフロップ311〜314に設定される。同じように、内部ノードデータTI2は、サブスキャンチェーン32内をシフトされてフリップフロップ321〜324に設定される。内部ノードデータTI3は、サブスキャンチェーン33内をシフトされてフリップフロップ331〜334に設定される。内部ノードデータTI4は、サブスキャンチェーン34内をシフトされてフリップフロップ341〜344に設定される。   That is, as indicated by a thick line in FIG. 5C, the internal node data TI1 input from the backup memory 13 is shifted in the sub scan chain 31 and set in the flip-flops 311 to 314. Similarly, the internal node data TI2 is shifted in the sub scan chain 32 and set in the flip-flops 321 to 324. Internal node data TI3 is shifted in sub-scan chain 33 and set in flip-flops 331-334. Internal node data TI4 is shifted in sub scan chain 34 and set in flip-flops 341-344.

このように、バックアップメモリ13に保持されている内部ノードデータは、フリップフロップ311〜314、フリップフロップ321〜324、フリップフロップ331〜334、フリップフロップ341〜344に格納され、元の内部状態に戻る。その後、スキャンチェーンが解除されて対象回路11は通常の動作に復帰する。   As described above, the internal node data held in the backup memory 13 is stored in the flip-flops 311 to 314, the flip-flops 321 to 324, the flip-flops 331 to 334, and the flip-flops 341 to 344, and returns to the original internal state. . Thereafter, the scan chain is released and the target circuit 11 returns to normal operation.

上述において、サブスキャンチェーンは、それぞれ同数のフリップフロップを含むものとして説明したが、スキャンチェーン15に含まれるフリップフロップの総数は、サブスキャンチェーン数の倍数であるとは限らない。従って、各サブスキャンチェーンに含まれるフリップフロップの数が異なる場合、仮の内部ノードデータを保持するダミーのフリップフロップを挿入して数を揃えることが好ましい。また、含まれるフリップフロップの数が等しいサブスキャンチェーン毎に同時にバックアップメモリに出力するように構成することも可能である。その場合、挿入されるダミーフリップフロップの数を少なく、あるいは不用とすることができる。また、サブスキャンチェーン毎に与えるシフトクロックを変えることにより、内蔵するフリップフロップの数が異なるサブスキャンチェーンの内部ノードデータを退避・回復することも可能である。   In the above description, each sub-scan chain is described as including the same number of flip-flops. However, the total number of flip-flops included in the scan chain 15 is not necessarily a multiple of the number of sub-scan chains. Therefore, when the number of flip-flops included in each sub-scan chain is different, it is preferable to insert dummy flip-flops that hold temporary internal node data to make the numbers uniform. It is also possible to configure so that sub-scan chains having the same number of included flip-flops are simultaneously output to the backup memory. In that case, the number of dummy flip-flops to be inserted can be reduced or unnecessary. It is also possible to save and restore internal node data of sub-scan chains having different numbers of built-in flip-flops by changing the shift clock provided for each sub-scan chain.

図6は、ダミーフリップフロップを備えたスキャンチェーン15の一例を示すブロック図である。このダミーフリップフロップは、他のスキャンチェーンに属し、スキャンパステストの時、他のスキャンチェーンの一部として動作する。図6に示されるスキャンチェーン15は、図2に示されるスキャンチェーンのフリップフロップ224、241がない状態である。即ち、図6に示されるスキャンチェーン15は、サブスキャンチェーン22、24に含まれるフリップフロップの数が、サブスキャンチェーン21、23より少ない。サブスキャンチェーン22は、スキャンチェーン15に含まれていないフリップフロップ(以降ダミーフリップフロップと称する)224’をフリップフロップ223の後段に接続される。従って、フリップフロップ223は、ダミーフリップフロップ224’と次段のサブスキャンチェーン23の選択回路230とに接続される。ダミーフリップフロップ224’は、フリップフロップ223の出力をバックアップメモリ13に出力する。また、サブスキャンチェーン24は、ダミーフリップフロップ241’を選択回路240の前段に接続される。バックアップメモリ13から出力された内部ノードデータTI4は、ダミーフリップフロップ241’に入力される。ダミーフリップフロプ241’の出力は、選択回路240を介してシフトレジスタを構成するフリップフロップ242〜244に入力される。このように、ダミーフリップフロップ224’、241’をサブスキャンチェーン22、24に接続することにより、サブスキャンチェーン21、23に含まれるフリップフロップと同数のフリップフロップを含むサブスキャンチェーン22’、24’が形成される。従って、サブスキャンチェーン21、22’、23、24’は、同じデータ数の内部状態データをバックアップメモリ13に出力することが可能となる。また、サブスキャンチェーン21、22’、23、24’は、同じデータ数の内部状態データをバックアップメモリ13から取り込んで各フリップフロップに設定することが可能となる。ここでは、過不足のフリップフロップ数はサブスキャンチェーン当たり1回路で説明したが、複数であっても各サブスキャンチェーンのフリップフロップ数を揃えることはできる。また、ダミーフリップフロップは、元のサブスキャンチェーンの前後のどちらに接続されても、さらに前後両側に接続されても同じように動作する。また、このダミーフリップフロップが接続されたサブスキャンチェーンの先頭に第2の選択回路を配置し、図4に示されるように、各サブスキャンチェーンの出力を先頭にフィードバックする構成にすることも可能である。   FIG. 6 is a block diagram showing an example of the scan chain 15 provided with dummy flip-flops. This dummy flip-flop belongs to another scan chain, and operates as a part of the other scan chain during the scan path test. The scan chain 15 shown in FIG. 6 is in a state where the flip-flops 224 and 241 of the scan chain shown in FIG. 2 are not present. That is, the scan chain 15 shown in FIG. 6 has fewer flip-flops included in the sub scan chains 22 and 24 than the sub scan chains 21 and 23. In the sub-scan chain 22, a flip-flop (hereinafter referred to as a dummy flip-flop) 224 ′ that is not included in the scan chain 15 is connected to the subsequent stage of the flip-flop 223. Accordingly, the flip-flop 223 is connected to the dummy flip-flop 224 ′ and the selection circuit 230 of the next-stage sub-scan chain 23. The dummy flip-flop 224 ′ outputs the output of the flip-flop 223 to the backup memory 13. In the sub-scan chain 24, the dummy flip-flop 241 ′ is connected to the preceding stage of the selection circuit 240. The internal node data TI4 output from the backup memory 13 is input to the dummy flip-flop 241 '. The output of the dummy flip-flop 241 ′ is input to the flip-flops 242 to 244 constituting the shift register via the selection circuit 240. In this way, by connecting the dummy flip-flops 224 ′ and 241 ′ to the sub-scan chains 22 and 24, the sub-scan chains 22 ′ and 24 including the same number of flip-flops as the flip-flops included in the sub-scan chains 21 and 23. 'Is formed. Therefore, the sub scan chains 21, 22 ', 23, 24' can output the same number of internal state data to the backup memory 13. Also, the sub scan chains 21, 22 ', 23, 24' can take the same number of internal state data from the backup memory 13 and set it in each flip-flop. Here, the number of over / under flip-flops has been described as one circuit per sub-scan chain. However, even if there are a plurality of flip-flops, the number of flip-flops in each sub-scan chain can be made uniform. Further, the dummy flip-flop operates in the same way regardless of whether it is connected to either the front or back of the original sub-scan chain, or further connected to both the front and back sides. It is also possible to arrange a second selection circuit at the head of the sub-scan chain to which this dummy flip-flop is connected, and feed back the output of each sub-scan chain to the head as shown in FIG. It is.

このように、ダミーフリップフロップを接続することにより、スキャンパステスト時のスキャンチェーンにダミーフリップフロップを含むことなく、サブスキャンチェーンに含まれるフリップフロップの数をそろえることができる。このダミーフリップフロップは、バックアップ制御回路と一緒にスキャンチェーンに含めることができ、対象回路のスキャンパステストに影響を与えることを防ぐことができる。   In this way, by connecting the dummy flip-flops, the number of flip-flops included in the sub-scan chain can be made uniform without including the dummy flip-flops in the scan chain during the scan path test. This dummy flip-flop can be included in the scan chain together with the backup control circuit, and can be prevented from affecting the scan path test of the target circuit.

次に、図7を参照して第2の実施の形態が説明される。第2の実施の形態では、スキャンチェーンとバックアップメモリとのインタフェースが第1の実施の形態と異なる例が説明される。図7に、半導体集積回路の構成ブロック図が示される。半導体集積回路は、対象回路11とバックアップメモリ13とバックアップ制御回路12とスイッチ14とバスインタフェース部16とを具備する。対象回路11は、内部状態が外部に退避される回路であり、その電源はスイッチ14により制御される。スイッチ14は、バックアップ制御回路12により制御される。対象回路11の内部状態は、バスインタフェース部16によりシステムバス18に乗せられ、バックアップメモリ13に退避される。また、バックアップメモリ13に記憶されている内部状態は、システムバス18に乗せられ、バスインタフェース部16を介して対象回路11に回復される。対象回路11の内部状態の退避・回復は、バックアップ制御回路12により制御される。   Next, a second embodiment will be described with reference to FIG. In the second embodiment, an example in which the interface between the scan chain and the backup memory is different from that of the first embodiment will be described. FIG. 7 shows a block diagram of the semiconductor integrated circuit. The semiconductor integrated circuit includes a target circuit 11, a backup memory 13, a backup control circuit 12, a switch 14, and a bus interface unit 16. The target circuit 11 is a circuit whose internal state is saved to the outside, and its power supply is controlled by the switch 14. The switch 14 is controlled by the backup control circuit 12. The internal state of the target circuit 11 is placed on the system bus 18 by the bus interface unit 16 and saved in the backup memory 13. The internal state stored in the backup memory 13 is put on the system bus 18 and is restored to the target circuit 11 via the bus interface unit 16. The backup control circuit 12 controls the saving / recovering of the internal state of the target circuit 11.

対象回路11の構成、動作は、図1に示される回路と同じである。従って、スキャンチェーン15に保持される内部状態は、スキャンパステストのときスキャン出力SOとして外部に出力される。対象回路11の内部状態退避のとき、スキャンチェーン15に保持される内部ノードデータは、サブスキャンチェーンに分割されたパスを介してバスインタフェース部16に送られる。このとき、内部ノードデータは、バスインタフェース部16において、バス幅に等しいデータ幅でバスインタフェース部16に送られることが好ましい。バスインタフェース部16は、内部ノードデータの信号レベルやタイミングを調整してシステムバス18に出力する。これに同期して、バックアップメモリ13は、システムバス18から内部ノードデータを取り込み、記憶する。バックアップメモリ13のアドレスADDRは、バックアップ制御回路12から供給される。   The configuration and operation of the target circuit 11 are the same as those of the circuit shown in FIG. Accordingly, the internal state held in the scan chain 15 is output to the outside as the scan output SO during the scan path test. When the internal state of the target circuit 11 is saved, the internal node data held in the scan chain 15 is sent to the bus interface unit 16 through a path divided into sub scan chains. At this time, the internal node data is preferably sent to the bus interface unit 16 in the bus interface unit 16 with a data width equal to the bus width. The bus interface unit 16 adjusts the signal level and timing of the internal node data and outputs the adjusted data to the system bus 18. In synchronization with this, the backup memory 13 takes in the internal node data from the system bus 18 and stores it. The address ADDR of the backup memory 13 is supplied from the backup control circuit 12.

対象回路11の内部状態回復のとき、バックアップメモリ13に格納されている内部ノードデータは、バックアップ制御回路12から出力されるアドレスADDRに基づいて読み出され、システムバス18に送られる。これに同期して、バスインタフェース部16は、システムバス18からデータを取り込み、対象回路11のサブスキャンチェーンに内部ノードデータTIとして供給する。システムバス18からデータを取り込むタイミング、信号レベルの変換などは、バスインタフェース部16が調整する。サブスキャンチェーンは、第1の実施の形態において説明された動作を行う。   When the internal state of the target circuit 11 is recovered, the internal node data stored in the backup memory 13 is read based on the address ADDR output from the backup control circuit 12 and sent to the system bus 18. In synchronization with this, the bus interface unit 16 takes in data from the system bus 18 and supplies it as internal node data TI to the sub-scan chain of the target circuit 11. The bus interface unit 16 adjusts the timing for fetching data from the system bus 18 and the conversion of the signal level. The sub scan chain performs the operation described in the first embodiment.

このように、内部ノードデータTOは、システムバス18を介してバックアップメモリ13に格納され、バックアップメモリ13に格納される内部ノードデータは、システムバス18を介して対象回路11に内部ノードデータTIとして供給され、対象回路11は、元の内部状態に戻る。   As described above, the internal node data TO is stored in the backup memory 13 via the system bus 18, and the internal node data stored in the backup memory 13 is stored as internal node data TI in the target circuit 11 via the system bus 18. The target circuit 11 is returned to the original internal state.

システムバス18を介して対象回路11の内部ノードデータをバックアップメモリ13に退避し、バックアップメモリ13から回復することにより、半導体集積回路は、システムバス18に接続されているシステムメモリの一部をバックアップメモリ13として使用することも可能となる。その場合、バックアップ制御回路12は、システムバス18のインタフェース仕様に基づいてメモリをアクセスすることになる。   The semiconductor integrated circuit backs up part of the system memory connected to the system bus 18 by saving the internal node data of the target circuit 11 to the backup memory 13 via the system bus 18 and recovering from the backup memory 13. It can also be used as the memory 13. In that case, the backup control circuit 12 accesses the memory based on the interface specification of the system bus 18.

また、システムバス18を介してシステムメモリにアクセス可能となれば、バックアップメモリ13は、対象回路11を内蔵する半導体集積回路の外部にあってもよいことになる。即ち、汎用のインタフェースがサポートされることにより、バックアップメモリとして使用されるメモリの選択の自由度が向上する。   If the system memory can be accessed via the system bus 18, the backup memory 13 may be outside the semiconductor integrated circuit in which the target circuit 11 is built. That is, by supporting a general-purpose interface, the degree of freedom in selecting a memory used as a backup memory is improved.

上述のように、スキャンチェーンをサブスキャンチェーンに分割することにより、対象回路11の内部ノードデータは、短時間に退避され、回復されるようになる。さらに、対象回路11の内部状態が外部で保持されるため、対象回路11の電源供給を停止することができ、消費電力の低減が可能となる。また、サブスキャンチェーンの各々の先頭に選択回路を挿入し、サブスキャンチェーンの出力を戻すことにより、内部状態の退避動作の中止に応じる回復動作の時間をさらに短縮することが可能となる。   As described above, by dividing the scan chain into sub-scan chains, the internal node data of the target circuit 11 is saved and recovered in a short time. Furthermore, since the internal state of the target circuit 11 is held externally, power supply to the target circuit 11 can be stopped, and power consumption can be reduced. Further, by inserting a selection circuit at the head of each sub-scan chain and returning the output of the sub-scan chain, it is possible to further shorten the recovery operation time according to the cancellation of the internal state saving operation.

本発明の実施の形態に係る半導体集積回路の構成を示すブロック図である。1 is a block diagram showing a configuration of a semiconductor integrated circuit according to an embodiment of the present invention. 同スキャンチェーンの構成を示すブロック図である。It is a block diagram which shows the structure of the same scan chain. 同半導体集積回路の動作状態を示す図である。It is a figure which shows the operation state of the semiconductor integrated circuit. 同スキャンチェーンの他の構成を示すブロック図である。It is a block diagram which shows the other structure of the same scan chain. 同他の構成のスキャンチェーンのテスト時の動作を示す図である。It is a figure which shows the operation | movement at the time of the test of the scan chain of another structure. 同他の構成のスキャンチェーンの退避時の動作を示す図である。It is a figure which shows the operation | movement at the time of the retraction | saving of the scan chain of the other structure. 同他の構成のスキャンチェーンの回復時の動作を示す図である。It is a figure which shows the operation | movement at the time of the recovery of the scan chain of another structure. 同ダミーフリップフロップを備えるスキャンチェーンの構成を示すブロック図である。It is a block diagram which shows the structure of the scan chain provided with the same dummy flip-flop. 同半導体集積回路の他の構成を示すブロック図である。FIG. 10 is a block diagram showing another configuration of the semiconductor integrated circuit.

符号の説明Explanation of symbols

11 対象回路
12 バックアップ制御回路
13 バックアップメモリ
14 スイッチ
15 スキャンチェーン
16 バスインタフェース部
18 システムバス
21、22、23、24 サブスキャンチェーン
210、220、230、240 選択回路
211〜214、221〜224、231〜234、241〜244 フリップフロップ
31、32、33、34 サブスキャンチェーン
310、320、330、340 選択回路
311〜314、321〜324、331〜334、341〜344 フリップフロップ
319、329、339、349 選択回路
11 target circuit 12 backup control circuit 13 backup memory 14 switch 15 scan chain 16 bus interface unit 18 system bus 21, 22, 23, 24 sub scan chain 210, 220, 230, 240 selection circuit 211-214, 221-224, 231 234, 241 to 244 Flip-flops 31, 32, 33, 34 Sub-scan chains 310, 320, 330, 340 Select circuits 311 to 314, 321-324, 331-334, 341-344 Flip-flops 319, 329, 339, 349 selection circuit

Claims (10)

フリップフロップを含み、
所定の機能を実行する通常動作モードと、
前記フリップフロップを含むスキャンチェーンを構成し該スキャンチェーンを用いて前記機能の検証を実行するスキャンパステストモードと、
前記通常動作モード時に前記フリップフロップが保持したデータを、前記スキャンチェーンを介して記憶装置に書き込む退避モードと
を有する対象回路を備え、
前記スキャンチェーンは前記退避モードにおいて、前記データを前記スキャンチェーンの出力端から前記記憶装置に出力するとともに前記スキャンチェーンの入力端から受信することを特徴とする半導体集積回路。
Including flip-flops,
A normal operation mode for executing a predetermined function;
A scan path test mode that configures a scan chain including the flip-flop and performs verification of the function using the scan chain;
A target circuit having a save mode for writing data held by the flip-flop in the normal operation mode to a storage device via the scan chain,
In the save mode, the scan chain outputs the data from the output end of the scan chain to the storage device and receives it from the input end of the scan chain.
前記スキャンチェーンは複数のサブスキャンチェーンを備え、
前記複数のサブスキャンチェーンは前記退避モードにおいて、前記データの内で前記サブスキャンチェーンが含む前記フリップフロップが保持したデータを、前記サブスキャンチェーンの出力端から前記記憶装置に出力するとともに前記サブスキャンチェーンの入力端から受信する退避動作を行うことを特徴とする請求項1に記載の半導体集積回路。
The scan chain includes a plurality of sub-scan chains,
In the save mode, the plurality of sub scan chains output the data held by the flip-flop included in the sub scan chain in the data from the output end of the sub scan chain to the storage device and the sub scan The semiconductor integrated circuit according to claim 1, wherein a retraction operation received from an input end of the chain is performed.
前記スキャンチェーンに含まれる前記サブスキャンチェーンの各々が前記退避動作を行うことを特徴とする請求項2に記載の半導体集積回路。   The semiconductor integrated circuit according to claim 2, wherein each of the sub-scan chains included in the scan chain performs the evacuation operation. 前記対象回路は、前記退避モードの際に前記記憶装置に書き込んだ前記データを、前記スキャンチェーンを介して取得する回復モードをさらに有し、
前記対象回路は、前記スキャンチェーンが前記記憶装置への前記データの出力を完了する前に前記退避モードから前記回復モードへ遷移した場合、前記スキャンチェーンが前記遷移前に前記記憶装置へ書き込んだデータを取得した時点で前記回復モードを終了することを特徴とする請求項1に記載の半導体集積回路。
The target circuit further has a recovery mode for acquiring the data written in the storage device during the save mode via the scan chain;
When the target circuit makes a transition from the save mode to the recovery mode before the scan chain completes outputting the data to the storage device, the target circuit writes the data written to the storage device before the transition The semiconductor integrated circuit according to claim 1, wherein the recovery mode is terminated at the time when the signal is acquired.
前記スキャンチェーンは、前記通常動作モード時に前記フリップフロップが保持したデータと、前記記憶装置に記憶されたデータとの内の一を選択的に出力する第1セレクタをさらに含むことを特徴とする請求項1に記載の半導体集積回路。   The scan chain further includes a first selector that selectively outputs one of data held by the flip-flop and data stored in the storage device in the normal operation mode. Item 14. The semiconductor integrated circuit according to Item 1. 前記スキャンチェーンは、前記第1セレクタが出力したデータと、前記機能の検証を実行するためのテストデータとの内の一を選択的に出力する第2セレクタをさらに含むことを特徴とする請求項5に記載の半導体集積回路。   The scan chain further includes a second selector that selectively outputs one of data output from the first selector and test data for executing the function verification. 5. The semiconductor integrated circuit according to 5. 前記スキャンチェーンは、直列に接続された複数のフリップフロップを含むことを特徴とする請求項1に記載の半導体集積回路。   The semiconductor integrated circuit according to claim 1, wherein the scan chain includes a plurality of flip-flops connected in series. 前記サブスキャンチェーンの各々の一部に供給されるクロックが他の前記サブスキャンチェーンに供給されるクロックと異なることを特徴とする請求項3に記載の半導体集積回路。   4. The semiconductor integrated circuit according to claim 3, wherein a clock supplied to a part of each of the sub scan chains is different from a clock supplied to the other sub scan chains. 前記サブスキャンチェーンの各々に含まれる前記フリップフロップの数が同一であることを特徴とする請求項3に記載の半導体集積回路。   4. The semiconductor integrated circuit according to claim 3, wherein the number of the flip-flops included in each of the sub scan chains is the same. 前記サブスキャンチェーンは、前記フリップフロップに加えてダミーのフリップフロップをさらに含むことを特徴とする請求項2に記載の半導体集積回路。   The semiconductor integrated circuit according to claim 2, wherein the sub-scan chain further includes a dummy flip-flop in addition to the flip-flop.
JP2008095998A 2008-04-02 2008-04-02 Semiconductor integrated circuit and control method thereof Expired - Fee Related JP4711353B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008095998A JP4711353B2 (en) 2008-04-02 2008-04-02 Semiconductor integrated circuit and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008095998A JP4711353B2 (en) 2008-04-02 2008-04-02 Semiconductor integrated circuit and control method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005354492A Division JP4303719B2 (en) 2005-12-08 2005-12-08 Semiconductor integrated circuit and control method thereof

Publications (2)

Publication Number Publication Date
JP2008251013A true JP2008251013A (en) 2008-10-16
JP4711353B2 JP4711353B2 (en) 2011-06-29

Family

ID=39975807

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008095998A Expired - Fee Related JP4711353B2 (en) 2008-04-02 2008-04-02 Semiconductor integrated circuit and control method thereof

Country Status (1)

Country Link
JP (1) JP4711353B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2199813A1 (en) * 2008-12-16 2010-06-23 NEC Electronics Corporation Semiconductor integrated circuit and method of saving and restoring internal state of the same
JP2020064382A (en) * 2018-10-16 2020-04-23 Necプラットフォームズ株式会社 Storage device and storage method
JP2021025974A (en) * 2019-08-08 2021-02-22 株式会社デンソー Semiconductor circuit device
JP2021143838A (en) * 2020-03-10 2021-09-24 株式会社東芝 Semiconductor integrated circuit, and circuit design device, circuit design method, and circuit design program therefor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1078836A (en) * 1996-09-05 1998-03-24 Hitachi Ltd Data processor
JP2002196846A (en) * 2000-12-26 2002-07-12 Mitsubishi Electric Corp Method for reducing leak current of lsi

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1078836A (en) * 1996-09-05 1998-03-24 Hitachi Ltd Data processor
JP2002196846A (en) * 2000-12-26 2002-07-12 Mitsubishi Electric Corp Method for reducing leak current of lsi

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2199813A1 (en) * 2008-12-16 2010-06-23 NEC Electronics Corporation Semiconductor integrated circuit and method of saving and restoring internal state of the same
KR101127786B1 (en) 2008-12-16 2012-03-27 르네사스 일렉트로닉스 가부시키가이샤 Semiconductor integrated circuit and method of saving and restoring internal state of the same
US8286041B2 (en) 2008-12-16 2012-10-09 Renesas Electronics Corporation Semiconductor integrated circuit and method of saving and restoring internal state of the same
JP2020064382A (en) * 2018-10-16 2020-04-23 Necプラットフォームズ株式会社 Storage device and storage method
JP2021025974A (en) * 2019-08-08 2021-02-22 株式会社デンソー Semiconductor circuit device
JP7334531B2 (en) 2019-08-08 2023-08-29 株式会社デンソー semiconductor circuit device
JP2021143838A (en) * 2020-03-10 2021-09-24 株式会社東芝 Semiconductor integrated circuit, and circuit design device, circuit design method, and circuit design program therefor
JP7204697B2 (en) 2020-03-10 2023-01-16 株式会社東芝 semiconductor integrated circuit

Also Published As

Publication number Publication date
JP4711353B2 (en) 2011-06-29

Similar Documents

Publication Publication Date Title
JP4303719B2 (en) Semiconductor integrated circuit and control method thereof
US7788558B2 (en) Semiconductor integrated circuit and control method thereof
KR101127786B1 (en) Semiconductor integrated circuit and method of saving and restoring internal state of the same
JP4455547B2 (en) Semiconductor integrated circuit
JPH1078836A (en) Data processor
JP5035239B2 (en) Reconfigurable device test system and method, and reconfigurable device used therefor
JP5347951B2 (en) Integrated circuit and fault diagnosis circuit
JPWO2016166780A1 (en) Semiconductor device and scan test method
JP4711353B2 (en) Semiconductor integrated circuit and control method thereof
JP2007240414A (en) Semiconductor integrated circuit, and design system therefor
JP6178022B2 (en) Reset scheme for scan chains with asynchronous reset signals
US7640473B2 (en) Semiconductor integrated circuit apparatus and control method thereof
US20150303926A1 (en) Robust Flexible Logic Unit
JP2005158061A (en) Memory recovery method and memory device with recovery capability
US20050172102A1 (en) Array-type computer processor
JP2009265880A (en) Microcomputer, and external register data processing method therefor
US20090168550A1 (en) Output port, microcomputer and data output method
JP2011145972A (en) Semiconductor integrated circuit and method for controlling power supply
US20050289421A1 (en) Semiconductor chip
US11201622B2 (en) Information processing apparatus, control method thereof, and non-transitory computer-readable storage medium
JP2003317490A (en) Data transfer control circuit for nonvolatile memory, rewriting circuit for nonvolatile memory, and communication control apparatus
JP2006011844A (en) Boot system, boot method, and data processor using this boot method
JP2004061114A (en) Self-diagnosis test circuit and method
JP2012103967A (en) Information processor and method for saving data thereof
JP2006139485A (en) Computer control device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110317

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110317

LAPS Cancellation because of no payment of annual fees