JP5107080B2 - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
JP5107080B2
JP5107080B2 JP2008025436A JP2008025436A JP5107080B2 JP 5107080 B2 JP5107080 B2 JP 5107080B2 JP 2008025436 A JP2008025436 A JP 2008025436A JP 2008025436 A JP2008025436 A JP 2008025436A JP 5107080 B2 JP5107080 B2 JP 5107080B2
Authority
JP
Japan
Prior art keywords
register
circuit
signal
clock signal
output
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
JP2008025436A
Other languages
Japanese (ja)
Other versions
JP2009044709A (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.)
Renesas Electronics Corp
Original Assignee
Renesas 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2008025436A priority Critical patent/JP5107080B2/en
Priority to US12/171,606 priority patent/US7827454B2/en
Publication of JP2009044709A publication Critical patent/JP2009044709A/en
Priority to US12/899,978 priority patent/US7913139B2/en
Priority to US13/026,660 priority patent/US8028210B2/en
Priority to US13/206,272 priority patent/US20110296260A1/en
Application granted granted Critical
Publication of JP5107080B2 publication Critical patent/JP5107080B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Design And Manufacture Of Integrated Circuits (AREA)
  • Logic Circuits (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Semiconductor Integrated Circuits (AREA)

Description

本発明は、半導体装置に係る発明であって、特に、誤動作が検知可能な半導体装置に関するものである。   The present invention relates to a semiconductor device, and more particularly to a semiconductor device capable of detecting a malfunction.

半導体装置において、種々のバラつき等の理由により、ある記憶素子を終端とするパス遅延にもバラつきが生じる。当該パス遅延についてシミュレーションでは問題なく動作するが、実機ではパス遅延におけるバラつきによりタイミング制約(セットアップ違反)を満足できず動作しない場合があった。   In a semiconductor device, due to various variations and the like, variations also occur in path delays that terminate at a certain storage element. Although the path delay operates without any problem in the simulation, the actual machine may not operate because the timing constraint (setup violation) cannot be satisfied due to variations in the path delay.

そのため、半導体装置においては、タイミング制約を動的に検知する機構を設ける場合があった。当該機構について、例えば、非特許文献1に示すRazorという回路(以下、Razor回路という)が知られている。非特許文献1に示すRazor回路は、クロック信号clkの立ち上がりエッジに同期してデータを取り込むフリップ−フロップ回路と、クロック信号clkのHigh期間にデータを取り込むラッチ回路とを組み合わせた回路である。そして、Razor回路は、フリップ−フロップ回路の出力とラッチ回路の出力とを比較器で比較し、当該比較結果に基づいて通常論理であるフリップ−フロップ回路の出力かラッチ回路の出力かをセレクタ回路で切り替えていた。   For this reason, in a semiconductor device, there is a case where a mechanism for dynamically detecting timing constraints is provided. Regarding this mechanism, for example, a circuit called Razor (hereinafter referred to as Razor circuit) shown in Non-Patent Document 1 is known. The Razor circuit shown in Non-Patent Document 1 is a circuit that combines a flip-flop circuit that captures data in synchronization with the rising edge of the clock signal clk and a latch circuit that captures data during the High period of the clock signal clk. The Razor circuit compares the output of the flip-flop circuit and the output of the latch circuit with a comparator, and selects the output of the flip-flop circuit or the output of the latch circuit, which is a normal logic, based on the comparison result. It was switched with.

非特許文献1に示すRazor回路は、フリップ−フロップ回路がデータを取り込むタイミングに同期してラッチ回路が開き、クロック信号clkがHigh期間のデータをラッチ回路が取り込む。つまり、非特許文献1に示すRazor回路は、フリップ−フロップ回路とラッチ回路との時間差を利用して、クロック信号clkの立ち上がりからクロック信号clkのHigh期間までに到達するデータを誤動作(セットアップ違反)として検知している。   In the Razor circuit shown in Non-Patent Document 1, the latch circuit opens in synchronization with the timing at which the flip-flop circuit captures data, and the latch circuit captures data when the clock signal clk is High. That is, the Razor circuit shown in Non-Patent Document 1 malfunctions data that arrives from the rising edge of the clock signal clk to the High period of the clock signal clk using the time difference between the flip-flop circuit and the latch circuit (setup violation). It is detected as.

次に、特許文献1では、主同期回路と同じ構成の副同期回路を2つ設け、当該副同期回路が主同期回路の倍周期で動作する回路構成を有している。そのため、特許文献1に示す回路では、主同期回路で生じたセットアップ違反の誤動作を、副同期回路により回復させることができる。   Next, Patent Document 1 has a circuit configuration in which two sub-synchronization circuits having the same configuration as the main synchronization circuit are provided, and the sub-synchronization circuit operates at a double cycle of the main synchronization circuit. For this reason, in the circuit disclosed in Patent Document 1, a malfunction caused by a setup violation occurring in the main synchronization circuit can be recovered by the sub-synchronization circuit.

次に、特許文献2では、同一クロック信号clkにより動作している送り側フリップ−フロップ回路と受け側フリップ−フロップ回路との間に、組み合わせ論理回路をクリティカルパスとして介在させている。そして、特許文献2では、当該クリティカルパスでの遅延状態を計測して半導体装置の外部に表示させている。   Next, in Patent Document 2, a combinational logic circuit is interposed as a critical path between a sending-side flip-flop circuit and a receiving-side flip-flop circuit operating with the same clock signal clk. And in patent document 2, the delay state in the said critical path is measured and displayed on the exterior of a semiconductor device.

Dan Ernest他,「Razor: Low-Power Pipeline Based on Circuit-Level Timing Speculation」,IEEE MICRO,2004,P.10-20Dan Ernest et al., `` Razor: Low-Power Pipeline Based on Circuit-Level Timing Speculation '', IEEE MICRO, 2004, P.10-20 米国特許第6985547号明細書US Pat. No. 6,985,547 特開2005−214732号公報JP 2005-214732 A

非特許文献1に示す回路を半導体装置に複数設けて、どの箇所でセットアップ違反が生じているのかを特定するためには、それぞれの回路から出力されるエラー信号を取り出す必要があった。しかし、エラー信号を取り出すには複数のピンが必要となるが、半導体装置のピン数には制限があるため、従来の半導体装置では、非特許文献1に示す回路から出力されたエラー信号をORツリーで束ねることが一般的であった。そのため、従来の半導体装置では、どの箇所でセットアップ違反が生じているのかを特定することができない問題があった。   In order to provide a plurality of circuits shown in Non-Patent Document 1 in a semiconductor device and identify where a setup violation has occurred, it is necessary to extract error signals output from the respective circuits. However, a plurality of pins are required to extract the error signal. However, since the number of pins of the semiconductor device is limited, the conventional semiconductor device ORs the error signal output from the circuit shown in Non-Patent Document 1. It was common to bundle with a tree. For this reason, the conventional semiconductor device has a problem that it cannot be specified where the setup violation occurs.

また、非特許文献1、特許文献1や特許文献2に示す回路では、セットアップ違反を検出し、当該セットアップ違反の状態を回復したとしても、次段の回路において誤動作を誘因する場合があった。   Further, in the circuits shown in Non-Patent Document 1, Patent Document 1 and Patent Document 2, even if a setup violation is detected and the state of the setup violation is recovered, a malfunction may be caused in the next-stage circuit.

さらに、半導体装置内においてセットアップ違反を検出するための条件は一定ではなく、バラつきを有している。そのため、ある1つの条件に固定するとセットアップ違反を検出できない回路が存在してしまう問題があった。   Furthermore, the conditions for detecting a setup violation in the semiconductor device are not constant and vary. Therefore, there is a problem that there is a circuit that cannot detect a setup violation when fixed to one condition.

そこで、本発明は、実動作中の回路誤動作(セットアップ違反)を認識することができ、また回路誤動作の箇所を特定できる半導体装置を提供することを目的とする。また、本発明は、誤動作を修復する際に次段の回路において誤動作を誘因させることのない半導体装置を提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to provide a semiconductor device that can recognize a circuit malfunction (setup violation) during actual operation and that can identify the location of the circuit malfunction. It is another object of the present invention to provide a semiconductor device that does not cause malfunction in a circuit at the next stage when malfunction is repaired.

本発明の1実施形態は、複数の論理回路と、論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置である。そして、判定回路は、第1レジスタと、遅延手段と、第2レジスタと、比較器と、スキャン化手段とを備えている。第1レジスタは、論理回路からのデータをクロック信号の所定のタイミングで取り込む。遅延手段は、クロック信号を遅延させる。第2レジスタは、第1レジスタと論理等価であり、遅延手段を経たクロック信号の所定のタイミングで論理回路からのデータを取り込む。比較器は、第1レジスタの出力と第2レジスタの出力との比較を行い、エラー信号を出力する。スキャン化手段は、比較器の比較結果を保持させつつ、第2レジスタをシフトレジスタ化して第2レジスタで保持したエラー信号を次段へ伝搬させる。   One embodiment of the present invention is a semiconductor device including a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits. The determination circuit includes a first register, a delay unit, a second register, a comparator, and a scan unit. The first register takes in data from the logic circuit at a predetermined timing of the clock signal. The delay means delays the clock signal. The second register is logically equivalent to the first register, and takes in data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means. The comparator compares the output of the first register with the output of the second register and outputs an error signal. The scanning means holds the comparison result of the comparator, shifts the second register to a shift register, and propagates the error signal held in the second register to the next stage.

本発明の半導体装置によれば、比較器の比較結果を保持させつつ、第2レジスタをシフトレジスタ化して第2レジスタで保持したエラー信号を次段へ伝搬させるスキャン化手段を備えるので、回路誤動作が生じている1つ以上の箇所を特定することができる。   According to the semiconductor device of the present invention, since the comparison result of the comparator is retained, the second register is provided with a shift register and the error signal retained in the second register is propagated to the next stage. It is possible to identify one or more locations where the occurrence of.

(実施の形態1)
まず、本発明の半導体装置を説明する前に、非特許文献1に開示されているRazor回路の構成と駆動について説明する。図1に、Razor回路の回路図を示し、図2に、Razor回路のタイミングチャートを示す。
(Embodiment 1)
First, before describing the semiconductor device of the present invention, the configuration and driving of a Razor circuit disclosed in Non-Patent Document 1 will be described. FIG. 1 shows a circuit diagram of the Razor circuit, and FIG. 2 shows a timing chart of the Razor circuit.

図1に示すRazor回路は、クロック信号clkの立ち上がりエッジに同期してデータ信号を取り込むフリップ−フロップ回路101と、クロック信号clkのHigh期間にデータ信号を取り込むラッチ回路102とを備えている。さらに、図1に示すRazor回路は、フリップ−フロップ回路101の出力Q1とラッチ回路102の出力Q2とを比較する比較器103と、比較器103の結果によって論理回路であるロジックステージL1が出力するデータ信号D1とラッチ回路102が出力するデータ信号Q2とを切り替えるセレクタ回路104とを備えている。そして、図1に示すラッチ回路102は、クロック信号clkのHigh期間にセレクタ回路104が出力したデータ信号S1を取り込む。そして、図1に示すRazor回路は、フリップ−フロップ回路101とラッチ回路102との時間差を利用して、クロック信号clkの立ち上がりからクロック信号clkのHigh期間までに到達するデータ信号のイベントを誤動作(セットアップ違反)として検知する。   The Razor circuit shown in FIG. 1 includes a flip-flop circuit 101 that captures a data signal in synchronization with the rising edge of the clock signal clk, and a latch circuit 102 that captures a data signal during the High period of the clock signal clk. Further, in the Razor circuit shown in FIG. 1, the comparator 103 that compares the output Q1 of the flip-flop circuit 101 and the output Q2 of the latch circuit 102, and the logic stage L1 that is a logic circuit according to the result of the comparator 103 output. A selector circuit 104 that switches between the data signal D1 and the data signal Q2 output from the latch circuit 102 is provided. The latch circuit 102 shown in FIG. 1 takes in the data signal S1 output from the selector circuit 104 during the High period of the clock signal clk. 1 uses the time difference between the flip-flop circuit 101 and the latch circuit 102 to malfunction the event of the data signal that reaches from the rising edge of the clock signal clk to the High period of the clock signal clk ( Detected as setup violation).

但し、Razor回路で行う誤動作検知には、以下のような問題があった。まず、図2に示す3周期分のタイミングチャートでは、2周期目のみタイミングが間に合わずセットアップ違反が発生し、他の周期(1及び3周期目)は正常にデータが到達している。この場合の2周期目では、フリップ−フロップ回路101が、クロック信号clkの立ち上がりタイミング時に、”1”から”0”に変化するデータ信号のイベント到着が間に合わず、”1”を捕獲してしまう。一方、ラッチ回路102は、クロック信号clkがHigh期間のデータ信号である”0”を捕獲することになる。そのため、Razor回路は、意図通りエラー信号をアサートすることになる。   However, the malfunction detection performed by the Razor circuit has the following problems. First, in the timing chart for three cycles shown in FIG. 2, the timing is not in time only in the second cycle, a setup violation occurs, and the data arrives normally in the other cycles (first and third cycles). In the second cycle in this case, the flip-flop circuit 101 captures “1” because the event arrival of the data signal that changes from “1” to “0” is not in time at the rising timing of the clock signal clk. . On the other hand, the latch circuit 102 captures “0”, which is a data signal in which the clock signal clk is High. For this reason, the Razor circuit asserts an error signal as intended.

次に、図2に示す3周期目では、クロック信号clkの立ち上がりタイミング時に、”0”から”1”に変化するデータ信号のイベントが到着しているので、本来セットアップ違反は発生しない。しかし、2周期目でアサートされたエラー信号は、3周期目においてもネゲートされない。これは3周期目のクロック信号clkの立ち上がりタイミング時に、ロジックステージL1が出力するデータ信号D1を取り込む必要があるにもかかわらず、2周期目のエラー信号がネゲートされていないために、ラッチ回路102が出力するデータ信号Q2を取り込んでいるためである。   Next, in the third period shown in FIG. 2, since a data signal event that changes from “0” to “1” arrives at the rising timing of the clock signal clk, a setup violation does not occur. However, the error signal asserted in the second period is not negated even in the third period. This is because the data signal D1 output from the logic stage L1 needs to be taken in at the rising timing of the clock signal clk in the third period, but the error signal in the second period is not negated. This is because the data signal Q <b> 2 output by is taken in.

その結果、エラー信号がネゲートされてロジックステージL1からのパスがアクティブになる時(図2の上向き矢印)、フリップ−フロップ回路101はラッチ回路102にラッチされている”0”を取り込んでしまっており、ラッチ回路102のみが”0”から”1”へ変化するデータ信号のイベントを取り込むことになる(図2の下向き矢印)。従って、比較器103では、フリップ−フロップ回路101が出力するデータ信号Q1とラッチ回路102が出力するデータ信号Q2とが一致せず、セットアップ違反が発生していないにもかかわらずエラー信号がアサートされてしまう。   As a result, when the error signal is negated and the path from the logic stage L1 becomes active (upward arrow in FIG. 2), the flip-flop circuit 101 fetches “0” latched in the latch circuit 102. Therefore, only the latch circuit 102 captures the event of the data signal that changes from “0” to “1” (downward arrow in FIG. 2). Therefore, in the comparator 103, the data signal Q1 output from the flip-flop circuit 101 and the data signal Q2 output from the latch circuit 102 do not match, and an error signal is asserted even though no setup violation has occurred. End up.

そこで、図3に、上述の問題点を解決する誤動作判定回路(エラー検出フリップ−フロップ回路(FF))の回路図を示す。図3に示す回路では、ターゲットレジスタ(TargetRegister)であるレジスタR1に対し、クロック信号(Clk)のラインにバッファ1を挿入して、タイミング的に余裕(Positive Slack)を持たせた期待値レジスタ(ExpectRegister)のレジスタR2を備えている。そして、レジスタR1には、前段のロジックステージL1から出力されるデータ信号D1が入力される。一方、レジスタR1から出力するデータ信号Q1は、選択回路2を介して次段のロジックステージL2に出力(Output信号)されると共に、比較器3にも入力される。   FIG. 3 shows a circuit diagram of a malfunction determination circuit (error detection flip-flop circuit (FF)) that solves the above-described problems. In the circuit shown in FIG. 3, an expected value register (Positive Slack) is provided by inserting a buffer 1 into the clock signal (Clk) line with respect to the register R1 which is a target register (TargetRegister). ExpectRegister) register R2. The register R1 receives the data signal D1 output from the preceding logic stage L1. On the other hand, the data signal Q1 output from the register R1 is output to the next logic stage L2 via the selection circuit 2 (Output signal) and also input to the comparator 3.

この比較器3は、レジスタR1が出力するデータ信号Q1とレジスタR2が出力するデータ信号Q2とを比較し、両者が不一致の場合にエラー信号(Error)を出力する。つまり、図3に示す回路では、クロックラインにバッファ1を挿入することにより、セットアップ違反条件を緩和させたレジスタR2を設け、レジスタR1とレジスタR2との出力を比較器3で比較することで誤動作を検出している。このため、図3に示す回路では、バッファ1を設けることにより、Razor回路のようにセットアップ違反が発生していないにもかかわらずエラー信号がアサートされてしまう問題を回避することができる。   The comparator 3 compares the data signal Q1 output from the register R1 with the data signal Q2 output from the register R2, and outputs an error signal (Error) if they do not match. That is, in the circuit shown in FIG. 3, the register R2 in which the setup violation condition is relaxed by inserting the buffer 1 in the clock line is provided, and the comparator 3 compares the outputs of the register R1 and the register R2, thereby causing a malfunction. Is detected. For this reason, in the circuit shown in FIG. 3, by providing the buffer 1, it is possible to avoid the problem that the error signal is asserted even though the setup violation does not occur unlike the Razor circuit.

また、図3に示す回路は、上述したように、セットアップ違反の有無をエラー信号として出力する誤動作判定回路である。そのため、図3に示す回路を備える半導体装置(LSI等)では、通常論理に使用されているフリップ−フロップ回路のうちタイミング的に厳しいものに対し、図3に示す回路と置換することになる。そして、半導体装置に図3に示す回路を複数組み込んだ場合、どの回路からエラー信号が出力されているのか特定する必要がある。   The circuit shown in FIG. 3 is a malfunction determination circuit that outputs the presence or absence of setup violation as an error signal, as described above. For this reason, in a semiconductor device (LSI or the like) including the circuit shown in FIG. 3, the circuit shown in FIG. 3 is replaced for a flip-flop circuit normally used for logic that is severe in timing. When a plurality of circuits shown in FIG. 3 are incorporated in the semiconductor device, it is necessary to specify from which circuit the error signal is output.

しかし、半導体装置のピン数には制限があるので、各回路からのエラー信号に対してそれぞれピンを割り当てることができず、ORツリーで束ねてエラー信号を半導体装置の外部に出力させる(図示せず)。そのため、図3に示す回路では、半導体装置でセットアップ違反が生じていることは判定できるが、どの回路でセットアップ違反が生じているのかを特定することができない。   However, since the number of pins of the semiconductor device is limited, it is not possible to assign pins to each error signal from each circuit, and the error signals are output outside the semiconductor device by bundling them with an OR tree (not shown). ) Therefore, in the circuit shown in FIG. 3, it can be determined that a setup violation has occurred in the semiconductor device, but it is impossible to identify which circuit has caused the setup violation.

そこで、本実施の形態に係る半導体装置では、図3に示す期待値レジスタのレジスタR2をシフトレジスタ化してスキャンする手段(以下、スキャン化手段ともいう)をさらに備え、当該手段を用いてエラー信号を伝播させて外部へ押し出し、違反した回路を特定する。なお、当該回路構成は、電圧制御だけでなく、実動作(性能)パターンを用いたフェール箇所解析にも有効となる技術である。   Therefore, the semiconductor device according to the present embodiment further includes means for scanning the register R2 of the expected value register shown in FIG. 3 as a shift register (hereinafter also referred to as scanning means), and using this means, an error signal is provided. Is propagated and pushed out to identify the offending circuit. The circuit configuration is effective not only for voltage control but also for failure location analysis using an actual operation (performance) pattern.

次に、スキャン化手段を備えた回路構成を図4に具体的に示す。但し、図4に示すスキャン化手段は一例であり、本発明はこれに限定されず、同様の機能を有するスキャン化手段であれば他の回路構成でもよい。   Next, FIG. 4 specifically shows a circuit configuration provided with scanning means. However, the scanning unit shown in FIG. 4 is an example, and the present invention is not limited to this, and other circuit configurations may be used as long as the scanning unit has a similar function.

図4に示す回路では、レジスタR1のクロック信号ClkのラインにAND回路4が設けられている。AND回路4は、スキャンモード信号(SM)の反転信号とスキャンリセット信号(Srst)とが入力されるAND回路4aと、クロック信号ClkとAND回路4aの出力とが入力されるAND回路4bとを備えている。また、図4に示す回路では、レジスタR2の前段にマルチプレクサ(MUX)5が設けられ、当該MUX5には前段の比較器3からの出力であるエラー信号(Error)と、MUX6の出力と、Srst信号とが入力される。MUX6は、通常のスキャンセルにおけるスキャンイン信号(SI)と等価なエラーイン信号(ErrIn)と、Srst信号と、前段の論理回路からのデータ信号(DATA)とが入力される。   In the circuit shown in FIG. 4, an AND circuit 4 is provided on the line of the clock signal Clk of the register R1. The AND circuit 4 includes an AND circuit 4a to which an inverted signal of a scan mode signal (SM) and a scan reset signal (Srst) are input, and an AND circuit 4b to which a clock signal Clk and an output of the AND circuit 4a are input. I have. In the circuit shown in FIG. 4, a multiplexer (MUX) 5 is provided in the previous stage of the register R2, and the MUX 5 has an error signal (Error) output from the comparator 3 in the previous stage, the output of the MUX 6, and Srst. Signal. The MUX 6 receives an error-in signal (ErrIn) equivalent to a scan-in signal (SI) in a normal scan cell, an Srst signal, and a data signal (DATA) from the preceding logic circuit.

図4に示す回路では、図3に示す回路の選択回路2に代えて、MUX7を用いているが、機能については等価である。また、図4に示すその他の回路は、図3に示す回路と同じであるため、詳細な説明は省略する。   In the circuit shown in FIG. 4, the MUX 7 is used in place of the selection circuit 2 of the circuit shown in FIG. 3, but the functions are equivalent. The other circuits shown in FIG. 4 are the same as those shown in FIG. 3, and thus detailed description thereof is omitted.

図4に示す回路では、レジスタR2の出力であるエラーアウト信号(ErrOut)が通常のスキャンセルにおけるスキャンアウト信号(SO)と等価であり、あるエラー検出FFのErrOut信号が他のエラー検出FFのErrIn信号に接続することでスキャンパスを形成している。   In the circuit shown in FIG. 4, the error out signal (ErrOut) that is the output of the register R2 is equivalent to the scan out signal (SO) in the normal scan cell, and the ErrOut signal of one error detection FF is the other error detection FF. A scan path is formed by connecting to the ErrIn signal.

SM信号は、スキャンのモードを制御する信号であり、”0”のとき通常動作モードとなり、レジスタR2がクロック信号の立ち上がり時にデータ信号を取り込めるようにMUX6を制御する。また、SM信号が”1”のときスキャンモードになり、レジスタR2がクロック信号の立ち上がり時にErrIn信号の値を取り込めるようにMUX6を制御する。   The SM signal is a signal for controlling the scan mode. When the signal is “0”, the normal operation mode is set, and the register R2 controls the MUX 6 so that the data signal can be taken in at the rising edge of the clock signal. Further, when the SM signal is “1”, the scan mode is set, and the register R2 controls the MUX 6 so that the value of the ErrIn signal can be taken in at the rising edge of the clock signal.

さらに、Srst信号は、モード切替時のリセット信号であり、各モード(通常又はスキャン)時の初期状態を決定する。つまり、Srst信号が”0”のとき、レジスタR2がMUX5を介してエラー信号の値を取り込み、Srst信号が”1”のとき、レジスタR2がMUX5を介して、SM信号により選択された信号(DATA or ErrIn)の値を取り込む。上述のまとめとして、レジスタR2をスキャン化した場合の真理値表を表1に示す。なお、表1に示す”*”は任意の値を示す。また、表1に示す”(R2&!R1)|(!R2&R1)”は、レジスタR2が期待値の比較結果を保持しており、当該比較結果が”0”(エラーでない)の場合はレジスタR1をそのまま出力し、当該比較結果が”1”(エラー)の場合はレジスタR1の反転を出力することを表している。   Further, the Srst signal is a reset signal at the time of mode switching, and determines an initial state in each mode (normal or scan). That is, when the Srst signal is “0”, the register R2 takes in the value of the error signal via the MUX5, and when the Srst signal is “1”, the register R2 is the signal selected by the SM signal via the MUX5 ( (DATA or ErrIn) value. As a summary of the above, Table 1 shows a truth table when the register R2 is scanned. Note that “*” shown in Table 1 represents an arbitrary value. In addition, “(R2 &! R1) | (! R2 & R1)” shown in Table 1 holds the comparison result of the expected value in the register R2, and if the comparison result is “0” (no error), the register R1 Is output as it is, and when the comparison result is “1” (error), the inversion of the register R1 is output.

Figure 0005107080
Figure 0005107080

従って、レジスタR2をスキャン化し、表1に示すようにSM信号とSrst信号とを制御することで、セットアップ違反時のエラー信号を伝播させ、セットアップ違反の箇所を特定することが可能となる。なお、当該回路構成は、セットアップ違反の箇所を特定するだけでなく、通常のスキャン回路のように、スキャンパスを介してレジスタR2への初期値設定も可能である。   Therefore, by scanning the register R2 and controlling the SM signal and the Srst signal as shown in Table 1, it is possible to propagate the error signal at the time of the setup violation and to specify the location of the setup violation. The circuit configuration not only identifies the location where the setup is violated, but also allows the initial value to be set in the register R2 via the scan path, as in a normal scan circuit.

さらに、図4に示す回路では、SM信号が”1”のスキャンモードの場合、レジスタR1に入力されるクロック信号ClkをAND回路4でディスイネーブルにして、レジスタR1の回路動作を停めてしまう。そのため、SM信号が”1”のスキャンモード時に、クロック信号がディスイネーブルになる前の状態でレジスタR1の内容が保持され、再びSM信号が”0”の通常動作モードになった場合に、レジスタR1の動作再開が可能になる。また、スキャンモード時に、レジスタR1の回路動作を停めてしまうので、当該期間の消費電力を削減することもできる。   Further, in the circuit shown in FIG. 4, in the scan mode in which the SM signal is “1”, the clock signal Clk input to the register R1 is disabled by the AND circuit 4, and the circuit operation of the register R1 is stopped. Therefore, when the SM signal is “1” in the scan mode, the contents of the register R1 are held in the state before the clock signal is disabled, and the SM signal is “0” again in the normal operation mode. The operation of R1 can be resumed. In addition, since the circuit operation of the register R1 is stopped in the scan mode, power consumption during the period can be reduced.

図5に、図4で示した回路を4段並べて各回路(S1〜S4)のErrOut信号からErrIn信号へのスキャンパスを形成した回路図を示す。図5では、回路S1の前段にロジックステージL1、回路S2の前段にロジックステージL2、回路S3の前段にロジックステージL3、回路S4の前段にロジックステージL4のそれぞれが接続している。さらに、図5では、回路S1のErrIn信号としてに回路S4が出力したErrOut信号を直結することでシフトが一巡して初期状態へ戻る構成である。しかし、本発明はこれに限られず、回路S1のErrIn信号に外部端子からの任意の値にセットすることも可能である。   FIG. 5 is a circuit diagram in which four stages of the circuit shown in FIG. 4 are arranged to form a scan path from the ErrOut signal to the ErrIn signal of each circuit (S1 to S4). In FIG. 5, the logic stage L1 is connected to the preceding stage of the circuit S1, the logic stage L2 is connected to the preceding stage of the circuit S2, the logic stage L3 is connected to the preceding stage of the circuit S3, and the logic stage L4 is connected to the preceding stage of the circuit S4. Further, in FIG. 5, the ErrOut signal output from the circuit S4 is directly connected to the ErrIn signal of the circuit S1, so that the shift is completed and the initial state is restored. However, the present invention is not limited to this, and the ErrIn signal of the circuit S1 can be set to an arbitrary value from the external terminal.

次に、図5に示す回路の動作を図6に示すタイミングチャートに基づいて説明する。まず、図6に示すタイミングチャートの1周期目では、回路S2がセットアップ違反の誤動作を検知したと仮定する。そして、ErrOut信号の値は、通常動作モードであるため、各回路S1〜S4のエラー信号ではなくレジスタR2の値となり、当該周期での期待値は4ビットとも”1”であると仮定する。なお、回路S2のレジスタR1の値は、セットアップ違反と仮定しているので、期待値と不一致であり”0”である。   Next, the operation of the circuit shown in FIG. 5 will be described based on the timing chart shown in FIG. First, in the first cycle of the timing chart shown in FIG. 6, it is assumed that the circuit S2 has detected a setup violation malfunction. Since the value of the ErrOut signal is the normal operation mode, it is assumed that the value of the register R2 is not the error signal of each circuit S1 to S4, and the expected value in the period is “1” for all 4 bits. Note that the value of the register R1 of the circuit S2 is assumed to be a setup violation, and therefore does not match the expected value and is “0”.

次に、2周期目では、SM信号が”1”となりスキャンモードに切り替わる。同時にSrst信号も”0”にアサートされるため、各回路のエラー信号の値がレジスタR2に取り込まれることになる。1周期目で誤動作を発生しているのは回路S2のみと仮定したので、2周期目では回路S2のErrOut信号の値のみが”1”となり、他の回路S1,S3,S4のErrOut信号の値は全て”0”となる。なお、SM信号が”1”となったため、回路S1〜S4内の各レジスタR1に供給されるクロック信号が全てディスイネーブルになる。   Next, in the second cycle, the SM signal becomes “1” and the mode is switched to the scan mode. At the same time, since the Srst signal is also asserted to “0”, the value of the error signal of each circuit is taken into the register R2. Since it is assumed that only the circuit S2 has malfunctioned in the first cycle, only the value of the ErrOut signal of the circuit S2 becomes “1” in the second cycle, and the ErrOut signal of the other circuits S1, S3, S4 The values are all “0”. Since the SM signal becomes “1”, all the clock signals supplied to the registers R1 in the circuits S1 to S4 are disabled.

次に、3周期目では、Srst信号が”1”となるため、各回路S1〜S4のErrOut信号は前段のErrOut信号を取り込むことになる。従って、回路S3のErrOut信号は、2周期目の回路S2でのErrOut信号の値を取り込み、”1”となり、他の回路S1,S2,S4のErrOut信号は全て”0”となる。ここで、回路S1のErrOut信号には、回路S4のErrOut信号の値が供給される。   Next, since the Srst signal becomes “1” in the third period, the ErrOut signal of each circuit S1 to S4 captures the previous stage ErrOut signal. Therefore, the ErrOut signal of the circuit S3 takes in the value of the ErrOut signal in the circuit S2 in the second period and becomes “1”, and the ErrOut signals of the other circuits S1, S2, and S4 all become “0”. Here, the value of the ErrOut signal of the circuit S4 is supplied to the ErrOut signal of the circuit S1.

次に、4周期目では、3周期目と同様の処理が行われ、回路S4のErrOut信号が、3周期目の回路S3でのErrOut信号の値を取り込み、”1”となり、他の回路S1,S2,S3のErrOut信号は全て”0”となる。さらに、5周期目でも、4周期目と同様の処理が行われ、回路S1のErrOut信号が、4周期目の回路S4でのErrOut信号の値を取り込み、”1”となり、他の回路S2,S3,S4のErrOut信号は全て”0”となる。6周期目でも、4周期目と同様の処理が行われ、回路S2のErrOut信号が、5周期目の回路S1でのErrOut信号の値を取り込み、”1”となり、他の回路S1,S3,S4のErrOut信号は全て”0”となる。   Next, in the fourth period, the same process as in the third period is performed, and the ErrOut signal of the circuit S4 takes in the value of the ErrOut signal in the circuit S3 of the third period and becomes “1”, and the other circuit S1. , S2 and S3 are all “0”. Further, in the fifth cycle, the same processing as in the fourth cycle is performed, and the ErrOut signal of the circuit S1 takes in the value of the ErrOut signal in the circuit S4 of the fourth cycle and becomes “1”, and the other circuits S2, The ErrOut signals in S3 and S4 are all “0”. In the sixth cycle, the same process as in the fourth cycle is performed, and the ErrOut signal of the circuit S2 takes in the value of the ErrOut signal in the circuit S1 of the fifth cycle and becomes “1”, and the other circuits S1, S3, All the ErrOut signals in S4 are “0”.

上記の処理を繰り返すことにより、図5に示す回路は、ErrOut信号の値を順次シフトし、Srst信号が”1”になってからErrOut信号の値が”1”が検出されるまでのサイクル数を計上することにより、誤動作が発生した回路を特定することができる。本実施の形態では、4周期目でErrOut信号が”1”となるため、回路S2にセットアップ違反が発生していることが分かる。なお、仮に複数箇所フェールしていたとしても同様の方法で検出可能である。   By repeating the above processing, the circuit shown in FIG. 5 sequentially shifts the value of the ErrOut signal, and the number of cycles from when the Srst signal becomes “1” until the value of the ErrOut signal is detected as “1”. By accounting for, it is possible to identify the circuit in which the malfunction occurred. In the present embodiment, since the ErrOut signal becomes “1” in the fourth period, it can be seen that a setup violation has occurred in the circuit S2. Even if a plurality of points have failed, they can be detected by the same method.

次に、7周期目では、SM信号を通常モード”1”に切り替え、同時にSrst信号を”1”にアサートすることで、特定回路S1〜S4のレジスタR2にスキャンモード動作開始前の値(図4に示す回路構成から自動的に判断)に復元させる。ただし、回路S1から回路S4の各レジスタR1の値は、SM信号=”1”あるいはSrst信号”0”の間はクロック信号Clkがネゲートされているため、回路S2のレジスタR1は誤動作のままの値であるため、必要であれば以下の実施の形態で述べるリカバリー方法を行い動作を再開する。   Next, in the seventh cycle, the SM signal is switched to the normal mode “1” and the Srst signal is asserted to “1” at the same time, thereby causing the register R2 of the specific circuits S1 to S4 to have a value before starting the scan mode operation (see FIG. Automatically restored from the circuit configuration shown in FIG. However, since the clock signal Clk is negated during the SM signal = “1” or the Srst signal “0”, the value of each register R1 in the circuits S1 to S4 remains malfunctioning. Therefore, if necessary, the recovery method described in the following embodiment is performed and the operation is resumed.

以上のように、本実施の形態に係る半導体回路では、レジスタR2をスキャン化する手段を備えることにより、セットアップ違反の誤動作が発生した回路を特定することができる。   As described above, in the semiconductor circuit according to the present embodiment, by providing a means for scanning the register R2, it is possible to identify a circuit in which a malfunction due to a setup violation has occurred.

なお、図4に示す回路は、同期設計部におけるタイミングクリティカルなレジスタ(クリティカルパスのエンドポイント)を対象としているため、SOC(System On a Chip)やマイコン等の全てのデジタル設計分野で適用が可能である。また、以下に説明する実施の形態に係る回路についても同様である。   Note that the circuit shown in FIG. 4 is intended for timing-critical registers (critical path endpoints) in the synchronous design section, so it can be applied to all digital design fields such as SOC (System On a Chip) and microcomputers. It is. The same applies to the circuits according to the embodiments described below.

具体的に、本実施の形態に係る半導体装置の適用事例のブロック図を図7に示す。図7に示す半導体装置では、図4に示す誤動作判定回路及び論理回路(ロジックステージ)が適用されたデジタル回路10と、デジタル回路10にクロック信号Clkを供給するクロック発生装置11と、デジタル回路10に電圧を供給するレギュレータ12とを備えている。さらに、図7に示す半導体装置では、デジタル回路10からのエラー信号に基づき、クロック発生装置11とレギュレータ12とを制御する制御回路13と、デジタル回路10が適宜参照するメモリ14とを備えている。なお、制御回路13は、エラーレート計算の処理も含んでいる。   Specifically, FIG. 7 shows a block diagram of an application example of the semiconductor device according to this embodiment. In the semiconductor device illustrated in FIG. 7, the digital circuit 10 to which the malfunction determination circuit and the logic circuit (logic stage) illustrated in FIG. 4 are applied, the clock generator 11 that supplies the digital circuit 10 with the clock signal Clk, and the digital circuit 10. And a regulator 12 for supplying a voltage to the. Further, the semiconductor device shown in FIG. 7 includes a control circuit 13 that controls the clock generator 11 and the regulator 12 based on an error signal from the digital circuit 10, and a memory 14 that the digital circuit 10 appropriately refers to. . Note that the control circuit 13 also includes error rate calculation processing.

さらに、図7に示す半導体装置では、制御回路13へのエラー信号がアサートすることで、制御回路13がクロック発生装置11やレギュレータ12を制御し、低消費電力化を実現できる。また、図7に示す半導体装置では、セットアップ違反等の誤動作発生時、スキャンモードを切り替えてエラー信号を伝搬して外部に出力することで誤動作箇所(回路)を特定することができる。また、図4に示す回路を採用した半導体装置では、誤動作箇所(回路)をリカバリーした後に、スキャンモードで停止した状態から再開することも可能である。   Further, in the semiconductor device shown in FIG. 7, the error signal to the control circuit 13 is asserted, so that the control circuit 13 controls the clock generator 11 and the regulator 12 to realize low power consumption. In the semiconductor device shown in FIG. 7, when a malfunction such as a setup violation occurs, the malfunction location (circuit) can be specified by switching the scan mode and propagating the error signal to the outside. Further, in the semiconductor device employing the circuit shown in FIG. 4, it is possible to resume from the state stopped in the scan mode after recovering the malfunctioning portion (circuit).

(実施の形態2)
図8に示す回路は、レジスタR0からロジックステージL1を経由してレジスタR1へ至るパスをクリティカルパスとし、レジスタR1が出力するデータ信号Q1を次段論理(ロジックステージL2)へ伝播する。ここで、図8に示す回路では、レジスタR1に供給されるクロック信号C1を、外部から直接供給されるクロック信号Clkとするのではなく、クロック制御手段として機能するAND回路20においてEnable信号(イネーブル信号)と論理和を取ったゲーティッドクロック信号としている。なお、クロック制御手段は、AND回路に限られず、同等の機能を備える回路であればよい。
(Embodiment 2)
In the circuit shown in FIG. 8, a path from the register R0 to the register R1 via the logic stage L1 is a critical path, and the data signal Q1 output from the register R1 is propagated to the next stage logic (logic stage L2). Here, in the circuit shown in FIG. 8, the clock signal C1 supplied to the register R1 is not the clock signal Clk supplied directly from the outside, but the enable signal (enable) in the AND circuit 20 functioning as clock control means. Signal) and a logical sum. The clock control means is not limited to an AND circuit, and may be any circuit having an equivalent function.

また、図8に示す回路では、クロックラインにバッファB2を挿入することによりセットアップ違反条件を緩和させたレジスタR2を設け、レジスタR1との出力結果比較を比較器3で行う。さらに、図8に示す回路では、Enable信号が”0”の場合、レジスタR0からのデータを取り込まないように選択回路21を使ってレジスタR2から出力されたデータ信号Q2をフィードバックさせ、Enable信号が”1”の場合、データ信号D1を取り込む。   In the circuit shown in FIG. 8, a register R2 in which the setup violation condition is relaxed by inserting the buffer B2 in the clock line is provided, and the output result comparison with the register R1 is performed by the comparator 3. Further, in the circuit shown in FIG. 8, when the Enable signal is “0”, the data signal Q2 output from the register R2 is fed back using the selection circuit 21 so that the data from the register R0 is not captured, and the Enable signal is In the case of “1”, the data signal D1 is fetched.

しかし、図8に示す回路では、期待値側のレジスタR2に入力されたクロック信号C2がゲーティッドクロック信号ではなくフリーランになっている。そのため、レジスタR2では、常時クロックイベントが発生し、レジスタR1をゲーティッドクロック信号により駆動することによる消費電力削減効果を低減している。   However, in the circuit shown in FIG. 8, the clock signal C2 input to the register R2 on the expected value side is not a gated clock signal but a free run. Therefore, a clock event always occurs in the register R2, and the effect of reducing power consumption by driving the register R1 with a gated clock signal is reduced.

また、通常の回路動作において、クロック信号の波形がクリップされないように、優位期間(ポジティブエッジであれば”H”期間)にEnable信号を変化させない。しかし、電源電圧の低下や周囲温度の変化により、Enable信号の到達に遅れ(いわゆるEnable信号のセットアップ違反)が生じるとクロック信号がクリップされ、次段への信号伝播に影響を与え誤動作誘発の原因となる。図9に、クロック信号がクリップされる様子を模式的に示す。   Also, in normal circuit operation, the Enable signal is not changed during the dominant period ("H" period if positive edge) so that the waveform of the clock signal is not clipped. However, if there is a delay in the arrival of the Enable signal due to a drop in power supply voltage or a change in ambient temperature (so-called “Enable signal setup violation”), the clock signal will be clipped, affecting the signal propagation to the next stage and causing malfunctions. It becomes. FIG. 9 schematically shows how the clock signal is clipped.

そこで、本実施の形態に係る半導体装置では、図10に示す回路を用いることで消費電力削減効果を改善し、Enable信号のセットアップ違反を検出可能としている。図10に示す回路では、レジスタR2に入力されるクロック信号がゲーティッドクロック信号とするために、クロック制御手段としてAND回路22が設けられている。なお、クロック制御手段は、AND回路に限られず、同等の機能を備える回路であればよい。   Therefore, in the semiconductor device according to the present embodiment, the power consumption reduction effect is improved by using the circuit shown in FIG. 10, and a setup violation of the Enable signal can be detected. In the circuit shown in FIG. 10, an AND circuit 22 is provided as clock control means so that the clock signal input to the register R2 is a gated clock signal. The clock control means is not limited to an AND circuit, and may be any circuit having an equivalent function.

このAND回路22には、ロックアップラッチとして機能するレジスタR3の出力、レジスタR4の出力及びバッファB3により遅延させたクロック信号とが入力される。また、レジスタR3には、Enable信号とバッファB3により遅延させたクロック信号とが入力される。レジスタR4には、Enable信号とクロック信号とが入力される。図10に示す回路の他の構成については、図8に示す回路構成と同じであるため、同一要素に同一符号を付して詳細な説明を省略する。   The AND circuit 22 receives the output of the register R3 functioning as a lock-up latch, the output of the register R4, and the clock signal delayed by the buffer B3. The register R3 receives the Enable signal and the clock signal delayed by the buffer B3. An Enable signal and a clock signal are input to the register R4. Since the other configuration of the circuit shown in FIG. 10 is the same as the circuit configuration shown in FIG. 8, the same components are denoted by the same reference numerals and detailed description thereof is omitted.

ここで、図9に示すクリップAのようなEnable信号のriseイベントの遅延に関しては、オリジナルのクロック信号の立ち上がり時のEnable信号が”L”であればレジスタR2へのクロック信号をネゲートすることで検出可能となる。つまり、クリップの判定時以降にEnable信号が”H”となりレジスタR1にクリップされたクロック信号が発生した場合、レジスタR1の内容が変化することになりレジスタR2との間で差異が生じてエラー信号が立つことになる。なお、レジスタR1の内容が変化しない場合は、後段へのデータ伝播が発生しないため、エラー信号を立たせる必要はない。   Here, regarding the delay of the rise event of the enable signal as in clip A shown in FIG. 9, if the enable signal at the rise of the original clock signal is “L”, the clock signal to the register R2 is negated. It can be detected. That is, when the enable signal becomes “H” after the determination of clipping and a clock signal clipped to the register R1 is generated, the contents of the register R1 change and a difference occurs between the register R2 and the error signal. Will stand. If the contents of the register R1 do not change, data propagation to the subsequent stage does not occur, so there is no need to raise an error signal.

次に、図9に示すクリップBのようなEnable信号のfallイベントの遅延に関しては、図10に示すように、バッファB3により遅延させたクロック信号(ディレイドクロック信号)のディスイネーブル期間のみイベントを通過させるロックアップラッチのレジスタR3を挿入することで検出可能となる。つまり、クロック信号の立ち上がりとディレイドクロック信号の立ち上がりとの間にEnable信号がネゲートされた場合、レジスタR2に入力されるクロック信号がネゲートされることになる。そのため、レジスタR1の内容が変化したとすると、レジスタR2との間で差異が生じてエラー信号が立つことになる。なお、レジスタR1の内容が変化しない場合は、後段へのデータ伝播が発生しないため、エラー信号を立たせる必要はない。   Next, regarding the delay of the fall event of the Enable signal like the clip B shown in FIG. 9, the event passes only during the disable period of the clock signal (delayed clock signal) delayed by the buffer B3 as shown in FIG. Detection can be performed by inserting the register R3 of the lock-up latch. That is, when the Enable signal is negated between the rising edge of the clock signal and the rising edge of the delayed clock signal, the clock signal input to the register R2 is negated. Therefore, if the contents of the register R1 are changed, a difference occurs between the register R2 and an error signal is raised. If the contents of the register R1 do not change, data propagation to the subsequent stage does not occur, so there is no need to raise an error signal.

図10に示す回路では、実動作のレジスタR1に対してクロックラインにバッファB3を挿入することにより、タイミング的に余裕(Positive Slack)を持たせたレジスタR2を作成する。そして、レジスタR1及びレジスタR2のそれぞれにAND回路20,22を介したゲーティッドクロック信号を入力する。ここで、図10に示す回路では、グリッジ防止のため、ディレイクロック信号の”H”期間のイベントを遮断するためにフェールセーフ回路としてロックアップラッチのレジスタR3をAND回路22の前に挿入する。   In the circuit shown in FIG. 10, the register R2 having a margin (Positive Slack) is created by inserting a buffer B3 in the clock line with respect to the register R1 in actual operation. Then, a gated clock signal via the AND circuits 20 and 22 is input to each of the register R1 and the register R2. Here, in the circuit shown in FIG. 10, in order to prevent glitches, a lock-up latch register R3 is inserted before the AND circuit 22 as a fail-safe circuit in order to cut off an event during the “H” period of the delay clock signal.

さらに、図10に示す回路では、Enable信号のイベント内容がriseイベントなのかfallイベントなのかを判定するために、レジスタR4を挿入し、その出力をAND回路22の入力に接続している。また、図10に示す回路では、データ信号のセットアップ違反を検出(クロック信号C1からクロック信号C2までの間のイベント検出)するとともに、イネーブル信号のセットアップ違反も検出できる。   Further, in the circuit shown in FIG. 10, in order to determine whether the event content of the Enable signal is a rise event or a fall event, a register R4 is inserted and its output is connected to the input of the AND circuit 22. In the circuit shown in FIG. 10, the setup violation of the data signal can be detected (event detection between the clock signal C1 and the clock signal C2), and the setup violation of the enable signal can also be detected.

次に、図10に示す回路の動作を、図11に示すタイミングチャートを用いて説明する。まず、レジスタR1のクロックピンに入力される信号をクロック信号C1、データ入力ピンに入力される信号をデータ信号D1、データ出力ピンから出力される信号をデータ信号Q1とする。また、レジスタR2のクロックピンに入力される信号をクロック信号C2、データ入力ピンに入力される信号をデータ信号D2、データ出力ピンから出力される信号をデータ信号Q2とする。さらに、データ信号Q1とデータ信号Q2とを比較する比較器3からエラー信号が出力される。なお、上述したように、クロック信号C2は、バッファB3によりクロック信号C1に対して挿入したバッファ分だけ遅延してイベントが伝播する。   Next, the operation of the circuit shown in FIG. 10 will be described with reference to the timing chart shown in FIG. First, a signal input to the clock pin of the register R1 is a clock signal C1, a signal input to the data input pin is a data signal D1, and a signal output from the data output pin is a data signal Q1. A signal input to the clock pin of the register R2 is a clock signal C2, a signal input to the data input pin is a data signal D2, and a signal output from the data output pin is a data signal Q2. Further, an error signal is output from the comparator 3 that compares the data signal Q1 and the data signal Q2. As described above, the clock signal C2 is delayed by the amount of buffer inserted by the buffer B3 with respect to the clock signal C1, and the event propagates.

まず、図11に示す1周期目では、Enable信号のriseイベントの到着が遅れたため、クロック信号C1がクリップ(ハッチングされている部分)される。そして、クロック信号C1がriseイベントのとき、Enable信号は”L”なので、図示していないがレジスタR4の出力R4Enblも”L”となる。従って、1周期目では、レジスタR2へのクロック信号C2はネゲートされるため、レジスタR1においてデータの内容に変化があった場合、レジスタR1とレジスタR2との結果が異なるため、エラー信号が”1”となる。つまり、図10に示す回路は、Enable信号のセットアップ違反を検出できる。仮に、レジスタR1においてデータの内容に変化がない場合、エラー信号が”1”とならず、クロック信号C1のクリップを検出できないが、イベントそのものが発生しておらず後段の回路にも影響を与えないので、本現象をアサートする必要はない。   First, in the first period shown in FIG. 11, since the arrival of the rise event of the Enable signal is delayed, the clock signal C1 is clipped (hatched portion). Since the Enable signal is “L” when the clock signal C1 is a rise event, the output R4Enbl of the register R4 is also “L” although not shown. Therefore, in the first cycle, the clock signal C2 to the register R2 is negated. Therefore, when the data content in the register R1 changes, the result of the register R1 and the register R2 is different, so that the error signal is “1”. " That is, the circuit shown in FIG. 10 can detect a setup violation of the Enable signal. If there is no change in the data contents in the register R1, the error signal is not "1" and the clip of the clock signal C1 cannot be detected, but the event itself has not occurred and the subsequent circuit is affected. There is no need to assert this phenomenon.

次に、図11に示す2周期目では、クロック信号C1,C2のriseイベント前にEnable信号が”H”に確定しているが、レジスタR1へのデータイベントの到達(データ信号D1の変化)がクロック信号C1のriseイベントに間に合っていない。そのため、データ信号Q1とデータ信号Q2との結果が異なり、エラー信号が”H”となる。つまり、図10に示す回路は、データ信号のセットアップ違反を検出できる。   Next, in the second period shown in FIG. 11, the Enable signal is fixed to “H” before the rise event of the clock signals C1 and C2, but the arrival of the data event to the register R1 (change of the data signal D1). Is not in time for the rise event of the clock signal C1. Therefore, the results of the data signal Q1 and the data signal Q2 are different, and the error signal becomes “H”. That is, the circuit shown in FIG. 10 can detect a data signal setup violation.

次に、図11に示す3周期目では、Enable信号のfallイベントの到着が遅れたため、クロック信号C1がクリップ(ハッチングされている部分)される。そして、クロック信号C1のriseイベントのとき、Enable信号は”H”なので、図示していないがレジスタR4の出力R4Enblも”H”となる。従って、3周期目では、クロック信号C2のriseイベント前にEnable信号が”L”に落ち、当該イベントがロックアップラッチであるレジスタR3を介してAND回路22に伝達されるので、結果としてレジスタR2へのクロック信号C2はネゲートされる。さらに、レジスタR1においてデータの内容に変化があった場合、レジスタR1とレジスタR2との結果が異なることになり、エラー信号が”1”となる。つまり、図10に示す回路は、Enable信号のセットアップ違反を検出できる。仮に、レジスタR1においてデータの内容に変化がない場合、エラー信号が”1”にならず、クロック信号C1のクリップが検出できないが、イベントそのものが発生しておらず後段の回路にも影響を与えないので、本現象をアサートする必要はない。   Next, in the third period shown in FIG. 11, since the arrival of the fall event of the Enable signal is delayed, the clock signal C1 is clipped (hatched portion). Since the Enable signal is “H” at the rise event of the clock signal C1, the output R4Enbl of the register R4 is also “H” (not shown). Therefore, in the third period, the Enable signal falls to “L” before the rise event of the clock signal C2, and the event is transmitted to the AND circuit 22 via the register R3 which is a lock-up latch. As a result, the register R2 The clock signal C2 to is negated. Further, when there is a change in the data contents in the register R1, the results of the register R1 and the register R2 are different, and the error signal is “1”. That is, the circuit shown in FIG. 10 can detect a setup violation of the Enable signal. If there is no change in the data contents in the register R1, the error signal does not become “1” and the clip of the clock signal C1 cannot be detected, but the event itself has not occurred and the subsequent circuit is affected. There is no need to assert this phenomenon.

次に、図11に示す4周期目では、Enable信号が”L”のため、クロック信号C1及びクロック信号C2が共にネゲートされるため、図10に示す回路の出力結果に影響を与えない。そして、図11に示す5周期目では、2周期目と同じ動作を行うので、詳細な説明は省略する。   Next, in the fourth period shown in FIG. 11, since the Enable signal is “L”, both the clock signal C1 and the clock signal C2 are negated, so that the output result of the circuit shown in FIG. 10 is not affected. And in the 5th period shown in FIG. 11, since the same operation | movement as the 2nd period is performed, detailed description is abbreviate | omitted.

以上のように、本実施の形態に係る半導体装置は、図10に示す回路を用いているので、消費電力削減効果を改善し、Enable信号のセットアップ違反を検出することが可能となる。   As described above, since the semiconductor device according to the present embodiment uses the circuit shown in FIG. 10, the power consumption reduction effect can be improved and the setup violation of the Enable signal can be detected.

(実施の形態3)
実施の形態2では、データ信号のセットアップ違反とEnable信号のセットアップ違反をそれぞれ検出することができるが、データ信号及びEnable信号のセットアップ違反が同周期に生じた場合、セットアップ違反を検出できなかった。そこで、本実施の形態では、図12に示す回路を用いることで同周期に生じるデータ信号及びEnable信号のセットアップ違反を検出可能にしている。
(Embodiment 3)
In the second embodiment, the setup violation of the data signal and the setup violation of the Enable signal can be detected, respectively. However, when the setup violation of the data signal and the Enable signal occurs in the same period, the setup violation cannot be detected. Therefore, in this embodiment, the setup violation of the data signal and the Enable signal that occur in the same cycle can be detected by using the circuit shown in FIG.

通常、Enable信号はバス(複数ビット)制御に使用されることが多いため、図12に示す回路では、Enable信号のセットアップ違反は同一のEnable信号で制御される回路グループに対して、Enable信号のみを検知する回路を新規に追加している。つまり、図12に示す回路では、レジスタR1,R2や比較器3等を備え、データ信号のセットアップ違反を検出する回路A1〜A3と、当該回路A1〜A3に対して共通に供給されるEnable信号のセットアップ違反を検出する回路Bとで構成されている。   Normally, the Enable signal is often used for bus (multi-bit) control. Therefore, in the circuit shown in FIG. 12, the Enable signal setup violation causes only the Enable signal to the circuit group controlled by the same Enable signal. A new circuit to detect this is added. In other words, the circuit shown in FIG. 12 includes registers R1 and R2, a comparator 3, and the like, and detects the data signal setup violations A1 to A3, and the Enable signal supplied in common to the circuits A1 to A3. Circuit B for detecting a setup violation.

図12に示す回路A1〜A3は、図10に示す回路のレジスタR3,R4を取り除いた構成である。一方、図12に示す回路Bは、クロック信号とEnable信号とが入力するレジスタR3と、バッファ30により遅延させたクロック信号とEnable信号とが入力するレジスタR4と、レジスタR3の出力とレジスタR4の出力を比較する比較器31とを備えている。なお、回路Bの構成は、図12に示す回路構成に限定されず、同等の機能を有する回路構成であればよい。   Circuits A1 to A3 shown in FIG. 12 have a configuration in which the registers R3 and R4 of the circuit shown in FIG. 10 are removed. On the other hand, the circuit B shown in FIG. 12 includes a register R3 to which the clock signal and the Enable signal are input, a register R4 to which the clock signal delayed by the buffer 30 and the Enable signal are input, the output of the register R3, and the register R4. And a comparator 31 for comparing outputs. Note that the configuration of the circuit B is not limited to the circuit configuration illustrated in FIG. 12 and may be a circuit configuration having an equivalent function.

ここで、回路A1〜A3のバッファB3及び回路Bのバッファ30の遅延量は、対象レジスタの前段ロジックにおけるスラック量に依存し、それぞれ最適な遅延量が設定される。具体的には、Enable信号からレジスタR1,R2,R3,R4のそれぞれへ至る経路のスラック量が、ロジックステージL1のスラック量に比べて大きい場合、レジスタR2の前段に挿入されたバッファB3の遅延量の方が、レジスタR4の前段に挿入されたバッファ30の遅延量よりも大きくなる。   Here, the delay amounts of the buffer B3 of the circuits A1 to A3 and the buffer 30 of the circuit B depend on the slack amount in the previous stage logic of the target register, and optimum delay amounts are respectively set. Specifically, when the slack amount of the path from the Enable signal to each of the registers R1, R2, R3, and R4 is larger than the slack amount of the logic stage L1, the delay of the buffer B3 inserted in the previous stage of the register R2 The amount is larger than the delay amount of the buffer 30 inserted in the preceding stage of the register R4.

また、図12に示す回路では、同一のEnable信号で制御される回路グループが3ビットであったため、回路A1〜A3の3つに対して回路Bを1つ設ける構成であるが、本発明はこれに限定されない。例えば、同一のEnable信号で制御される回路グループが5ビットであれば、回路A1〜A5の5つに対して回路Bを1つ設ける構成となる。   In the circuit shown in FIG. 12, since the circuit group controlled by the same Enable signal is 3 bits, one circuit B is provided for three circuits A1 to A3. It is not limited to this. For example, if the circuit group controlled by the same Enable signal is 5 bits, one circuit B is provided for five circuits A1 to A5.

次に、図12に示す回路の動作を、図13に示すタイミングチャートを用いて説明する。まず、レジスタR1のクロックピンに入力される信号をクロック信号C1、データ入力ピンに入力される信号をデータ信号D1、データ出力ピンから出力される信号をデータ信号Q1とする。また、レジスタR2のクロックピンに入力される信号をクロック信号C2、データ入力ピンに入力される信号をデータ信号D2、データ出力ピンから出力される信号をデータ信号Q2とする。   Next, the operation of the circuit shown in FIG. 12 will be described with reference to the timing chart shown in FIG. First, a signal input to the clock pin of the register R1 is a clock signal C1, a signal input to the data input pin is a data signal D1, and a signal output from the data output pin is a data signal Q1. A signal input to the clock pin of the register R2 is a clock signal C2, a signal input to the data input pin is a data signal D2, and a signal output from the data output pin is a data signal Q2.

また、レジスタR3のクロックピンに入力される信号をクロック信号C3、データ入力ピンに入力される信号をデータ信号D3、データ出力ピンから出力される信号をデータ信号Q3とする。また、レジスタR4のクロックピンに入力される信号をクロック信号C4、データ入力ピンに入力される信号をデータ信号D4、データ出力ピンから出力される信号をデータ信号Q4とする。さらに、データ信号Q1とデータ信号Q2とを比較する比較器3から出力されるエラー信号をError1とし、データ信号Q3とデータ信号Q4とを比較する比較器31から出力されるエラー信号をError2とする。なお、上述したように、クロック信号C2は、バッファB3によりクロック信号C1に対して挿入したバッファ分だけ遅延してイベントを伝播し、クロック信号C4は、バッファ30によりクロック信号C3に対して挿入したバッファ分だけ遅延してイベントを伝播する。   A signal input to the clock pin of the register R3 is a clock signal C3, a signal input to the data input pin is a data signal D3, and a signal output from the data output pin is a data signal Q3. A signal input to the clock pin of the register R4 is a clock signal C4, a signal input to the data input pin is a data signal D4, and a signal output from the data output pin is a data signal Q4. Further, an error signal output from the comparator 3 that compares the data signal Q1 and the data signal Q2 is Error1, and an error signal output from the comparator 31 that compares the data signal Q3 and the data signal Q4 is Error2. . As described above, the clock signal C2 is delayed by the amount of the buffer inserted by the buffer B3 with respect to the clock signal C1, and the event is propagated. The clock signal C4 is inserted by the buffer 30 with respect to the clock signal C3. Propagate event with buffer delay.

まず、図13に示す1周期目では、Enable信号のriseイベントの到着が遅れたため、クロック信号C1がクリップ(ハッチングされている部分)される。図12に示す回路では、データ信号とEnable信号のセットアップ違反を検出する回路を分離したため、クロック信号C1のクリップを、データ信号のエラー検出信号であるError1信号としては検出することができなくなった。しかし、図13に示す1周期目では、Enable信号のエラー検出信号であるError2信号が”H”となり、クロック信号C1のクリップを検出している。   First, in the first period shown in FIG. 13, since the arrival of the rise event of the Enable signal is delayed, the clock signal C1 is clipped (hatched portion). In the circuit shown in FIG. 12, since the circuit that detects the setup violation of the data signal and the Enable signal is separated, the clip of the clock signal C1 cannot be detected as the Error1 signal that is the error detection signal of the data signal. However, in the first cycle shown in FIG. 13, the Error2 signal, which is the error detection signal of the Enable signal, is “H”, and the clip of the clock signal C1 is detected.

次に、図13に示す2周期目では、データ信号のセットアップ違反が発生しているため、Error1信号として検出している。なお、2周期目では、Enable信号のエラー検出信号であるError2信号は”L”のままでアサートされない。   Next, in the second period shown in FIG. 13, since the setup violation of the data signal has occurred, it is detected as the Error 1 signal. In the second period, the Error 2 signal, which is the error detection signal of the Enable signal, remains “L” and is not asserted.

次に、図13に示す3周期目では、Enable信号のfallイベントの到着が遅れたため、クロック信号C1がクリップ(ハッチングされている部分)される。このクロック信号C1のクリップによるEnable信号のセットアップ違反も、1周期目と同様にError2信号が”H”となることで検出可能である。   Next, in the third period shown in FIG. 13, since the arrival of the fall event of the Enable signal is delayed, the clock signal C1 is clipped (hatched portion). The setup signal violation of the Enable signal due to the clip of the clock signal C1 can also be detected when the Error2 signal becomes “H” as in the first cycle.

次に、図13に示す4周期目では、Enable信号が”L”のため、クロック信号C1及びクロック信号C2ともネゲートされるため、図12に示す回路の出力結果にも影響を与えない。   Next, in the fourth period shown in FIG. 13, since the Enable signal is “L”, both the clock signal C1 and the clock signal C2 are negated, so that the output result of the circuit shown in FIG. 12 is not affected.

次に、図13に示す5周期目では、データ信号とEnable信号どちらもセットアップ違反を起こしている場合である。5周期目の場合、データ信号とEnable信号とは競合関係にある。つまり、クロック信号Clkの立ち上がりに対してデータ信号のイベント到達が遅延しているため、本来セットアップ違反となるべきであるが、クロック信号C1のクリップにより、クロック信号C1が立ち上がる時点ではデータ信号のイベント到達している。従って、データ信号Q1とデータ信号Q2の結果は同一となり、データ信号に対するエラー検出信号のError1信号は”H”とならず、データ信号のセットアップ違反を検出できない。しかし、図13に示す5周期目では、Enable信号に対するエラー検出信号のError2信号は”H”となり、クロック信号C1のクリップは検出できる。なお、クロック信号C1が立ち上がる時点よりもデータ信号のイベント到達が遅延している場合は、データ信号のセットアップ違反も検出できる。   Next, in the fifth period shown in FIG. 13, a setup violation occurs in both the data signal and the Enable signal. In the fifth period, the data signal and the Enable signal are in a competitive relationship. That is, since the arrival of the data signal event is delayed with respect to the rising edge of the clock signal Clk, the setup should be violated originally. However, when the clock signal C1 rises due to the clip of the clock signal C1, the event of the data signal occurs. Has reached. Therefore, the results of the data signal Q1 and the data signal Q2 are the same, the Error1 signal of the error detection signal for the data signal is not “H”, and the setup violation of the data signal cannot be detected. However, in the fifth period shown in FIG. 13, the Error2 signal of the error detection signal with respect to the Enable signal becomes “H”, and the clip of the clock signal C1 can be detected. Note that if the event arrival of the data signal is delayed from the time when the clock signal C1 rises, a setup violation of the data signal can also be detected.

以上のように、本実施の形態に係る半導体装置では、図12に示す回路を用いることで同周期にデータ信号のセットアップ違反とEnable信号のセットアップ違反とが生じても、少なくとも一方を検出することができる。   As described above, the semiconductor device according to the present embodiment can detect at least one of the data signal setup violation and the enable signal setup violation in the same cycle by using the circuit shown in FIG. Can do.

(実施の形態4)
図14に示す回路では、実動作レジスタであるレジスタR1に対し、クロックラインに遅延手段であるバッファB2を挿入した分だけタイミング的に余裕(Positive Slack)を持たせたレジスタR2を備えている。そして、レジスタR1には、ロジックステージL1の出力であるデータ信号D1が入力される。このロジックステージL1の前段には、レジスタR0が接続されている。一方、レジスタR1の出力であるデータ信号Q1は、比較器3に入力される。
(Embodiment 4)
The circuit shown in FIG. 14 is provided with a register R2 that has a margin (Positive Slack) with respect to the register R1 that is an actual operation register as much as the buffer B2 that is a delay means is inserted in the clock line. A data signal D1 that is an output of the logic stage L1 is input to the register R1. A register R0 is connected to the preceding stage of the logic stage L1. On the other hand, the data signal Q 1 that is the output of the register R 1 is input to the comparator 3.

この比較器3は、レジスタR1のデータ信号Q1とレジスタR2の出力であるデータ信号Q2とを比較し、両者が不一致の場合にエラー信号を出力する。そのため、図14に示す回路は、クロックラインに挿入したバッファB2の遅延分だけレジスタR1のセットアップ違反を動的に検出することができる。また、図14に示す回路では、次段のロジックステージL2の前段に、選択回路2が設けられている。この選択回路2は、比較器3の出力であるエラー信号が”0”の時、レジスタR1からのデータ信号Q1をロジックステージL2に出力し、エラー信号が”1”の時、レジスタR2からのデータ信号Q2をロジックステージL2に出力するように切り替え制御する。   The comparator 3 compares the data signal Q1 of the register R1 with the data signal Q2 output from the register R2, and outputs an error signal if they do not match. Therefore, the circuit shown in FIG. 14 can dynamically detect the setup violation of the register R1 by the delay of the buffer B2 inserted in the clock line. In the circuit shown in FIG. 14, the selection circuit 2 is provided before the next logic stage L2. The selection circuit 2 outputs the data signal Q1 from the register R1 to the logic stage L2 when the error signal output from the comparator 3 is “0”, and outputs the data signal from the register R2 when the error signal is “1”. Switching control is performed so that the data signal Q2 is output to the logic stage L2.

そして、図14に示す回路の通常パスは、レジスタR1に到達したデータ信号D1がクロック信号C1の立ち上がりエッジに同期して取り込まれ、選択回路2を経て次段のロジックステージL2へ伝播される。つまり、通常動作時のパス経路は、レジスタR1及び選択回路2を経由する経路である。   In the normal path of the circuit shown in FIG. 14, the data signal D1 reaching the register R1 is taken in synchronization with the rising edge of the clock signal C1, and is propagated to the next logic stage L2 via the selection circuit 2. That is, the path path during normal operation is a path that passes through the register R1 and the selection circuit 2.

しかし、図14に示す回路が誤動作を検知し修復動作を行った場合、データ信号D1と同時にレジスタR2に到達するデータ信号D2は、遅延手段であるバッファB2によりクロック信号C1に対して遅れたクロック信号C2に基づき、レジスタR2により取り込まれる。そして、レジスタR2に取り込まれたデータ信号D2は、データ信号Q2として出力され、比較器3及び選択回路2を経由して次段のロジックステージL2に伝播する。従って、誤動作を検知し修復動作を行った場合、図14に示す破線の経路が修復動作時のパス経路となり、バッファB2の遅延量G1と比較器3での遅延量G2との和が通常動作時のパス経路に対するタイミングオーバーヘッドとなる。そのため、次段がタイミングクリティカルであった場合、修復動作時のパス経路の遅延量G1+G2により、次段パスの誤動作を誘発する可能性があった。   However, when the circuit shown in FIG. 14 detects a malfunction and performs a repair operation, the data signal D2 that reaches the register R2 at the same time as the data signal D1 is delayed from the clock signal C1 by the buffer B2 that is a delay means. Based on the signal C2, it is taken in by the register R2. The data signal D2 taken into the register R2 is output as the data signal Q2, and propagates to the next logic stage L2 via the comparator 3 and the selection circuit 2. Therefore, when a malfunction is detected and a repair operation is performed, the broken line path shown in FIG. 14 becomes a path path during the repair operation, and the sum of the delay amount G1 of the buffer B2 and the delay amount G2 of the comparator 3 is a normal operation. Timing overhead for the path path of the hour. Therefore, if the next stage is timing critical, there is a possibility that a malfunction of the next stage path is induced by the delay amount G1 + G2 of the path route during the repair operation.

そこで、本実施の形態に係る半導体装置では、図15に示す回路を用いることで次段パスの誤動作を誘発させる可能性を低減している。図15に示す回路では、レジスタR0からロジックステージL1を経由してレジスタR1へ至るパスがクリティカルパスを形成しており、レジスタR1の出力ピンからデータ信号Q1が出力され次段論理(ロジックステージL2、レジスタR3)へ伝播する。また、図15に示す回路では、クロックラインにバッファB2を挿入することによりセットアップ違反条件を緩和させたレジスタR2を設け、レジスタR1の出力とレジスタR2の出力とを比較する比較器3を設けている。   Therefore, in the semiconductor device according to the present embodiment, the possibility of inducing a malfunction of the next-stage path is reduced by using the circuit shown in FIG. In the circuit shown in FIG. 15, the path from the register R0 to the register R1 via the logic stage L1 forms a critical path, and the data signal Q1 is output from the output pin of the register R1 and the next stage logic (logic stage L2 , Register R3). Further, in the circuit shown in FIG. 15, a register R2 in which the setup violation condition is relaxed by inserting a buffer B2 in the clock line is provided, and a comparator 3 for comparing the output of the register R1 and the output of the register R2 is provided. Yes.

さらに、図15に示す回路では、レジスタR1,R2の後段に選択回路2を挿入する。そして、選択回路2は、比較器3の出力であるエラー信号が”0”の時、データ信号Q1を出力し、エラー信号が”1”の時、データ信号Q2を出力するように制御し、ロジックステージL2へのイベント伝播を切り替える。   Further, in the circuit shown in FIG. 15, the selection circuit 2 is inserted after the registers R1 and R2. The selection circuit 2 controls to output the data signal Q1 when the error signal output from the comparator 3 is “0”, and to output the data signal Q2 when the error signal is “1”. The event propagation to the logic stage L2 is switched.

また、図15に示す回路では、レジスタR1,R2等を含む回路C1〜C3が複数設けられ(図15では3つの回路)、各回路からのエラー信号がOR回路40で束ねられる。そのため、各回路C1〜C3のいずれか1つでもエラー信号がアサート(”H”)すれば、OR回路40の出力は”H”となる。さらに、図15に示す回路では、OR回路40の立ち上がりイベントを微分回路41でDetect信号(ディテクト信号)として検知し、当該Detect信号に基づいてAND回路42が各回路C1〜C3に供給するクロック信号Clkをネゲートする。なお、クロック信号Clkをネゲートするサイクルは、ダウンカウンタにより任意のサイクルに設定(通常1サイクル)しても、システム側からの制御信号によって設定してもよい。   In the circuit shown in FIG. 15, a plurality of circuits C1 to C3 including registers R1, R2, etc. are provided (three circuits in FIG. 15), and error signals from each circuit are bundled by an OR circuit 40. Therefore, if the error signal is asserted (“H”) in any one of the circuits C1 to C3, the output of the OR circuit 40 becomes “H”. Further, in the circuit shown in FIG. 15, the rising event of the OR circuit 40 is detected by the differentiation circuit 41 as a Detect signal (detect signal), and the clock signal supplied to the circuits C1 to C3 by the AND circuit 42 based on the Detect signal. Negate Clk. The cycle for negating the clock signal Clk may be set to an arbitrary cycle (usually one cycle) by a down counter, or may be set by a control signal from the system side.

ここで、微分回路41は、レジスタR4、レジスタR5及びAND回路43を備えている。レジスタR4は、OR回路40からの出力と、クロック信号Clkと、システムからのPower On Reset信号とが入力される。レジスタR5は、レジスタR4の出力と、クロック信号Clkとが入力される。AND回路43は、レジスタR4の出力と、レジスタR5の反転出力とが入力され、Detect信号を出力する。   Here, the differentiation circuit 41 includes a register R4, a register R5, and an AND circuit 43. The register R4 receives an output from the OR circuit 40, a clock signal Clk, and a Power On Reset signal from the system. The register R5 receives the output of the register R4 and the clock signal Clk. The AND circuit 43 receives the output of the register R4 and the inverted output of the register R5, and outputs a Detect signal.

図15に示す回路は、エラー信号のアサートを検知し、対象となる回路のクロック信号Clkをディスイネーブルにして、当該クロック信号がディスイネーブルされている期間内に誤動作修復処理を行う。さらに、図15に示す回路では、エラー信号の信号レベルを検知すると、ディスイネーブル以降のクロック信号が復帰しなくなるため、信号レベルではなくエッジを検出するために微分回路41を設けている。また、図15に示す回路では、エラー信号のグリッジ(クロック位相差による微小信号)を拾わないように、微分回路41でフィルタリングを行っている。なお、図15に示す回路では図示していないが、誤動作修復サイクルを予め設定されたサイクル数となるようにカウンタで制限するか、システムからの制御信号(Req)をAND回路42供給してクロック信号のディスイネーブル期間を制御する。   The circuit shown in FIG. 15 detects the assertion of the error signal, disables the clock signal Clk of the target circuit, and performs a malfunction correction process within a period in which the clock signal is disabled. Further, in the circuit shown in FIG. 15, when the signal level of the error signal is detected, the clock signal after disabling is not restored, so the differentiation circuit 41 is provided to detect the edge instead of the signal level. In the circuit shown in FIG. 15, filtering is performed by the differentiation circuit 41 so as not to pick up a glitch of the error signal (a minute signal due to the clock phase difference). Although not shown in the circuit shown in FIG. 15, the malfunction correction cycle is limited by a counter so that the number of cycles is set in advance, or a control signal (Req) from the system is supplied to the AND circuit 42 and clocked. Controls the signal disable period.

次に、図15に示す回路の動作を、図16に示すタイミングチャートを用いて説明する。まず、レジスタR1のクロックピンに入力される信号をクロック信号C1、データ入力ピンに入力される信号をデータ信号D1、データ出力ピンから出力される信号をデータ信号Q1とする。また、レジスタR2のクロックピンに入力される信号をクロック信号C2、データ入力ピンに入力される信号をデータ信号D2、データ出力ピンから出力される信号をデータ信号Q2とする。なお、上述したように、クロック信号C2は、バッファB2によりクロック信号C1に対して挿入バッファ分だけ遅延してイベントが伝播する。また、データ信号D1は、SignalIn信号の値をクロック信号C1の立ち上がりエッジで取り込み、ロジックステージL1の遅延を経てイベントが到達するものとする。同様に、データ信号D2は、SignalIn信号の値をクロック信号C2の立ち上がりエッジで取り込み、ロジックステージL1の遅延を経てイベントが到達するものとする。   Next, the operation of the circuit shown in FIG. 15 will be described with reference to the timing chart shown in FIG. First, a signal input to the clock pin of the register R1 is a clock signal C1, a signal input to the data input pin is a data signal D1, and a signal output from the data output pin is a data signal Q1. A signal input to the clock pin of the register R2 is a clock signal C2, a signal input to the data input pin is a data signal D2, and a signal output from the data output pin is a data signal Q2. As described above, the event of the clock signal C2 is delayed by the buffer B2 by an amount corresponding to the insertion buffer with respect to the clock signal C1. Further, the data signal D1 captures the value of the SignalIn signal at the rising edge of the clock signal C1, and the event arrives through the delay of the logic stage L1. Similarly, the data signal D2 captures the value of the SignalIn signal at the rising edge of the clock signal C2, and the event arrives through the delay of the logic stage L1.

まず、図16に示す1周期目では、データ信号D1及びデータ信号D2のriseイベントのそれぞれが、クロック信号C1及びクロック信号C2のriseイベントの前に行われているため、レジスタR1及びレジスタR2は正常に論理”1”を取り込んでいる。但し、クロック信号C1とクロック信号C2との位相差によりエラー信号が”1”となり、それに伴い当該期間のOutput信号もデータ信号Q2の値となる。その後、エラー信号が”0”に戻り、それに伴いOutput信号もデータ信号Q1の値に切り替わり、正常に動作になる。しかし、図15に示す微分回路41は、半周期に満たないグリッジパルスをフィルタリングしてDetect信号をアサートしない。従って、次サイクルである2周期目でのクロック信号C1及びクロック信号C2はディスイネーブルされない。   First, in the first period shown in FIG. 16, since the rise events of the data signal D1 and the data signal D2 are performed before the rise event of the clock signal C1 and the clock signal C2, the registers R1 and R2 are The logic “1” is being taken in normally. However, the error signal becomes “1” due to the phase difference between the clock signal C1 and the clock signal C2, and accordingly, the Output signal in this period also becomes the value of the data signal Q2. Thereafter, the error signal returns to “0”, and accordingly, the Output signal is also switched to the value of the data signal Q1, and the operation is normally performed. However, the differentiating circuit 41 shown in FIG. 15 does not assert the Detect signal by filtering glitch pulses that are less than half a cycle. Therefore, the clock signal C1 and the clock signal C2 in the second period which is the next cycle are not disabled.

次に、図16に示す2周期目では、レジスタR1におけるデータ信号D1のfallイベントの到達がクロック信号C1のriseイベントに間に合わないため、データ信号Q1が”0”を取り込むことができない。しかし、レジスタR2におけるデータ信号D2のfallイベントの到達はクロック信号C2のriseイベントに間に合うため、データ信号Q2は”0”を取り込むことができる。よって、レジスタR1とレジスタR2との結果に相違が生じ、比較器3の結果(エラー信号)が”1”となる(セットアップ違反を検出)。   Next, in the second period shown in FIG. 16, since the arrival of the fall event of the data signal D1 in the register R1 is not in time for the rise event of the clock signal C1, the data signal Q1 cannot capture “0”. However, since the arrival of the fall event of the data signal D2 in the register R2 is in time for the rise event of the clock signal C2, the data signal Q2 can capture “0”. Therefore, a difference occurs between the results of the register R1 and the register R2, and the result (error signal) of the comparator 3 becomes “1” (detects a setup violation).

このとき、エラー信号によって選択回路2の経路がデータ信号Q2をOutput信号とする経路に切り替わり、Output信号は”0”となる。ここで、クロック信号C1からクロック信号C2及びデータ信号Q2からOutput信号への切り替え分のオーバーヘッドが次段のセットアップ違反を誘発することを防ぐ必要がある。そのため、図15に示す微分回路41は、エラー信号の立ち上がりエッジを検出し、且つ半周期以内のグリッジでないことを確認し、Detect信号にカウンタサイクル分だけ正のパルスを発生する。本実施の形態では、予め設定したカウント値が1であるとして、クロック信号C1の立ち下がりエッジから次サイクルである3周期目のクロック信号C1の立ち下がりエッジまでパルスを発生させる。   At this time, the path of the selection circuit 2 is switched to a path using the data signal Q2 as an output signal due to the error signal, and the output signal becomes “0”. Here, it is necessary to prevent the overhead for switching from the clock signal C1 to the clock signal C2 and the data signal Q2 to the Output signal from inducing a setup violation in the next stage. Therefore, the differentiating circuit 41 shown in FIG. 15 detects the rising edge of the error signal, confirms that it is not a glitch within half a cycle, and generates a positive pulse for the counter cycle in the Detect signal. In the present embodiment, assuming that the preset count value is 1, pulses are generated from the falling edge of the clock signal C1 to the falling edge of the clock signal C1 in the third cycle, which is the next cycle.

なお、本実施の形態では、説明を簡略化するため、Detect信号がクロック信号C1の立ち下りエッジに同期しているが、クロック信号C1よりも少し速いクロックに同期させてDetect信号を合成し、誤動作検出期間に余裕を持たせる構成でもよい。具体的に、クロック信号C1よりも少し速いクロックはクロックツリーでクロック合成するため、理論的に任意の遅延差を設けることが可能である。また、図15に示す回路では、クロック信号C1の立ち下りエッジではなく、少し速いクロックを用いた回路構成になっている。   In this embodiment, to simplify the description, the Detect signal is synchronized with the falling edge of the clock signal C1, but the Detect signal is synthesized in synchronization with a clock slightly faster than the clock signal C1, A configuration may be adopted in which a margin is provided for the malfunction detection period. Specifically, since a clock that is slightly faster than the clock signal C1 is clock-synthesized by the clock tree, it is theoretically possible to provide an arbitrary delay difference. Further, the circuit shown in FIG. 15 has a circuit configuration using a slightly faster clock instead of the falling edge of the clock signal C1.

次に、図16に示す3周期目では、前サイクル(2周期目)のSignalIn信号からのイベントをトリガしたレジスタR0のイベントがデータ信号D1及びデータ信号D2に到達する。しかし、クロック信号C1及びクロック信号C2のイベントがディスイネーブルされ、データ信号D1及びデータ信号D2の値をデータ信号Q1及びデータ信号Q2として取り込まない。つまり、Output信号でのイベントは発生しない。よって、次段のレジスタR3は、2周期目及び3周期目の2サイクルかけてOutput信号の値を取り込めばよく、セットアップマージンを十分確保することができる。   Next, in the third period shown in FIG. 16, the event of the register R0 that triggered the event from the SignalIn signal in the previous cycle (second period) reaches the data signal D1 and the data signal D2. However, the events of the clock signal C1 and the clock signal C2 are disabled, and the values of the data signal D1 and the data signal D2 are not captured as the data signal Q1 and the data signal Q2. That is, no event occurs in the Output signal. Therefore, the next-stage register R3 only needs to capture the value of the Output signal over two cycles of the second period and the third period, and a sufficient setup margin can be secured.

なお、当該サイクル中(3周期目)に、SignalIn信号にイベントが発生してしまうと、クロック信号C1,C2がディスイネーブルされているために、当該イベントが後段に伝播されない。しかし、ロジックステージL1等の論理回路へデータの伝搬を要求するシステムからの制御信号(Req信号)とDetect信号とをハンドシェークするフェールセーフ手段を採用することで上記の問題を解決できる。つまり、当該手段により、Detect信号がアサートされている間、SignalIn信号にイベントを発生させないようにし、逆にSignalIn信号へのデータ準備ができていない間、Req信号をネゲートすればよい。   If an event occurs in the SignalIn signal during the cycle (third period), the event is not propagated to the subsequent stage because the clock signals C1 and C2 are disabled. However, the above problem can be solved by adopting fail-safe means for handshaking the control signal (Req signal) and the Detect signal from the system that requests data propagation to the logic circuit such as the logic stage L1. That is, by this means, an event is not generated in the SignalIn signal while the Detect signal is asserted, and conversely, the Req signal may be negated while data preparation for the SignalIn signal is not completed.

次に、図16に示す4周期目では、Detect信号がネゲートされ、クロック信号Clkがディスイネーブルされていた間に保持されていたデータ信号D1及びデータ信号D2のriseイベントがクロック信号C1及びクロック信号C2のriseイベントの前に到達している。そのため、レジスタR1及びレジスタR2は、正常に論理”1”を取り込むことができる。   Next, in the fourth period shown in FIG. 16, the rise event of the data signal D1 and the data signal D2 held while the Detect signal is negated and the clock signal Clk is disabled is the clock signal C1 and the clock signal. Reached before the rise event of C2. Therefore, the register R1 and the register R2 can normally capture the logic “1”.

以上のように、本実施の形態に係る半導体装置は、図15に示す回路を用いることで、修復動作時のパス経路の遅延量による次段パスの誤動作を誘発する可能性を低減している。   As described above, the semiconductor device according to the present embodiment uses the circuit shown in FIG. 15 to reduce the possibility of inducing a malfunction of the next-stage path due to the delay amount of the path path during the repair operation. .

(実施の形態5)
図15に示す回路に対して定格電圧で駆動した場合はセットアップ時間が遵守されるが、駆動電圧の降圧に伴い遅延が増大する場合はセットアップ時間が守られずに出力が不安定な状態となるメタステーブル状態が発生する。具体的に、図17に示すタイミングチャートを用いて説明する。まず、定格電圧で駆動した場合、1周期目のクロック信号C1の立ち上がりにおいて、データ信号D1のイベントをレジスタR1が取り込むことになる。しかし、図17に示すタイミングチャートでは、駆動電圧の降圧に伴いレジスタR1の出力であるデータ信号Q1が”0”から”1”に不安定な状態(メタステーブル)に遷移している。同様に、図17に示す2周期目のクロック信号C1の立ち上がりにおいて、駆動電圧の降圧に伴いレジスタR1の出力であるデータ信号Q1が”1”から”0”に不安定な状態(メタステーブル)に遷移している。
(Embodiment 5)
When the circuit shown in FIG. 15 is driven at the rated voltage, the setup time is observed, but when the delay increases as the drive voltage is lowered, the setup time is not observed and the metas becomes unstable. A table condition occurs. Specifically, this will be described with reference to a timing chart shown in FIG. First, when driven at the rated voltage, the register R1 captures the event of the data signal D1 at the rising edge of the clock signal C1 in the first cycle. However, in the timing chart shown in FIG. 17, the data signal Q1, which is the output of the register R1, changes from “0” to “1” in an unstable state (metastable) as the drive voltage is lowered. Similarly, at the rise of the clock signal C1 in the second cycle shown in FIG. 17, the data signal Q1 that is the output of the register R1 is unstable from “1” to “0” (metastable) as the drive voltage is lowered. It has transitioned to.

そこで、本実施の形態に係る半導体装置では、図18に示すようにレジスタR1の出力に対してメタスタビリティ検出回路50を設ける回路を採用している。図18に示す回路は、メタスタビリティ検出回路50によりメタステーブル発生の有無を検出して、回路の出力が不安定な状態に遷移しないように制御している。つまり、図18に示すメタスタビリティ検出回路50は、出力するMSD信号と比較器3の出力とをOR回路51で処理して、メタステーブルの検出時にレジスタR1の出力にかかわらず、エラー信号を”H”する。そして、メタスタビリティ検出回路50は、レジスタR2の出力が選択回路2で選択されるように制御している。   Therefore, the semiconductor device according to the present embodiment employs a circuit in which a metastability detection circuit 50 is provided for the output of the register R1, as shown in FIG. In the circuit shown in FIG. 18, the metastable detection circuit 50 detects the occurrence of metastable, and controls so that the output of the circuit does not transition to an unstable state. That is, the metastability detection circuit 50 shown in FIG. 18 processes the output MSD signal and the output of the comparator 3 by the OR circuit 51, and outputs an error signal regardless of the output of the register R1 when the metastable is detected. H ”. The metastability detection circuit 50 controls the output of the register R2 to be selected by the selection circuit 2.

また、メタスタビリティ検出回路50の回路図を図19に示す。図19に示すメタスタビリティ検出回路50は、低閾値(Lvt)のPMOS(P-channel Metal-Oxide Semiconductor)52と、高閾値(Hvt)のNMOS(N-channel Metal-Oxide Semiconductor)53とのペアトランジスタを用いたインバータを備えている。さらに、図19に示すメタスタビリティ検出回路50は、高閾値のPMOS54と低閾値のNMOS55とのペアトランジスタを用いたインバータを備え、両インバータのXORを演算するXOR回路56によりメタステーブルを検出している。   A circuit diagram of the metastability detection circuit 50 is shown in FIG. A metastability detection circuit 50 shown in FIG. 19 includes a pair of a low threshold (Lvt) PMOS (P-channel Metal-Oxide Semiconductor) 52 and a high threshold (Hvt) NMOS (N-channel Metal-Oxide Semiconductor) 53. An inverter using a transistor is provided. Further, the metastability detection circuit 50 shown in FIG. 19 includes an inverter using a pair transistor of a high threshold PMOS 54 and a low threshold NMOS 55, and detects a metastable by an XOR circuit 56 that calculates XOR of both inverters. Yes.

次に、図18及び図19に示す回路の動作を、図20に示すタイミングチャートを用いて説明する。ここで、出力I1は、低閾値のPMOS52と高閾値のNMOS53とのインバータ出力、出力I2は、高閾値のPMOS54と低閾値のNMOS55とのインバータ出力、MSDは、出力I1と出力I2とのXOR論理の結果である。また、図18では図示していないが、エラー信号の出力先に図15で示したOR回路40や微分回路41が設けられており、当該微分回路41の出力であるDetect信号に基づきクロック信号C1,C2を制御している。   Next, the operation of the circuit shown in FIGS. 18 and 19 will be described with reference to the timing chart shown in FIG. Here, the output I1 is the inverter output of the low threshold PMOS 52 and the high threshold NMOS 53, the output I2 is the inverter output of the high threshold PMOS 54 and the low threshold NMOS 55, and the MSD is the XOR of the output I1 and the output I2. It is the result of logic. Although not shown in FIG. 18, the OR circuit 40 and the differentiation circuit 41 shown in FIG. 15 are provided at the output destination of the error signal, and the clock signal C1 is based on the Detect signal that is the output of the differentiation circuit 41. , C2 are controlled.

まず、図20に示す1周期目では、クロック信号C1の立ち上がりと同時にデータ信号D1,D2が”0”から”1”へと遷移しているが、駆動電圧の降圧のためデータ信号Q1がメタステーブル状態となっている。そして、出力I1は、出力I2と比較して、”1”から”0”への遷移出力の感度が悪いため、出力I2が出力I1に比べて速く”0”に遷移し、少し遅れて出力I1が”0”に遷移する。この出力I1と出力I2との遅延差の間におけるMSDは”1”になり、メタステーブルを検出できることになる。このメタステーブルの検出結果(MSD=”1”)を受けてエラー信号が”1”となり、さらにDetect信号が”1”となる。   First, in the first period shown in FIG. 20, the data signals D1 and D2 transition from “0” to “1” simultaneously with the rise of the clock signal C1, but the data signal Q1 is metastable because of the drive voltage step-down. It is in a table state. Since the output I1 is less sensitive to the transition output from “1” to “0” than the output I2, the output I2 changes to “0” faster than the output I1 and is output with a slight delay. I1 transitions to “0”. The MSD between the delay difference between the output I1 and the output I2 becomes “1”, and the metastable can be detected. In response to the metastable detection result (MSD = “1”), the error signal becomes “1”, and the Detect signal becomes “1”.

次に、図20に示す2周期目では、Detect信号が”1”となっていることを受けて、クロック信号C1,C2がネゲートされ、この間に出力Qの結果が修復される。   Next, in the second period shown in FIG. 20, in response to the Detect signal being “1”, the clock signals C1 and C2 are negated, and the result of the output Q is restored during this period.

次に、図20に示す3周期目では、クロック信号C1の立ち上がりと同時にデータ信号D1,D2が”1”から”0”へと遷移しているが、駆動電圧の降圧のためデータ信号Q1がメタステーブル状態となっている。当該周期は1周期目のケースと逆で、出力I2は出力I1と比較して、”0”から”1”への遷移出力の感度が悪いため、出力1が出力I2に比べて速く”1”に遷移し、少し遅れて出力I2が”1”に遷移する。この出力I1と出力I2との遅延差の間におけるMSDは”1”になり、メタステーブルを検出できることになる。このメタステーブルの検出結果(MSD=”1”)を受けてエラー信号が”1”となり、さらにDetect信号が”1”となる。   Next, in the third period shown in FIG. 20, the data signals D1 and D2 transition from “1” to “0” simultaneously with the rise of the clock signal C1, but the data signal Q1 is changed to decrease the drive voltage. Metastable state. The cycle is opposite to the case of the first cycle, and the output I2 is faster than the output I2 because the sensitivity of the transition output from “0” to “1” is poor compared to the output I1. The output I2 changes to “1” with a slight delay. The MSD between the delay difference between the output I1 and the output I2 becomes “1”, and the metastable can be detected. In response to the metastable detection result (MSD = “1”), the error signal becomes “1”, and the Detect signal becomes “1”.

次に、図20に示す4周期目では、Detect信号が”1”となっていることを受けて、クロック信号C1,C2がネゲートされ、この間に出力Qの結果が修復される。   Next, in the fourth period shown in FIG. 20, in response to the Detect signal being “1”, the clock signals C1 and C2 are negated, and the result of the output Q is restored during this period.

次に、図20に示す5周期目では、クロック信号C1の立ち上がりの前にデータ信号D1,D2が”0”から”1”へと遷移しているため、データ信号Q1,Q2共に正常に”1”を取り込むことができる。   Next, in the fifth cycle shown in FIG. 20, since the data signals D1 and D2 transition from “0” to “1” before the rising of the clock signal C1, the data signals Q1 and Q2 are both “normally”. 1 "can be captured.

以上のように、本実施の形態に係る半導体装置では、図18及び図19に示す回路を採用しているので、メタステーブル発生の有無が検出でき、回路の出力Qが不安定な状態に遷移しないように制御できる。なお、本実施の形態に係る誤動作判定回路では、微分回路や選択回路2を備える回路構成について説明したが、本発明はこれに限られず、微分回路や選択回路2を備えない構成や、図12等に示したEnable信号のセットアップ違反を検出する回路をさらに備える構成であってもよい。   As described above, since the circuit shown in FIGS. 18 and 19 is employed in the semiconductor device according to the present embodiment, the presence or absence of metastable occurrence can be detected, and the circuit output Q transitions to an unstable state. Can be controlled to not. In the malfunction determination circuit according to the present embodiment, the circuit configuration including the differentiation circuit and the selection circuit 2 has been described. However, the present invention is not limited to this, and a configuration without the differentiation circuit and the selection circuit 2 is illustrated in FIG. The circuit may further include a circuit that detects a setup violation of the Enable signal shown in FIG.

(実施の形態6)
図21に示す回路では、実動作レジスタであるレジスタR1に対し、クロックラインに遅延手段であるバッファチェーンB2を挿入した分だけタイミング的に余裕(Positive Slack)を持たせたレジスタR2を備えている。そして、レジスタR1には、ロジックステージL1から出力されたデータ信号D1が入力される。このロジックステージL1の前段には、レジスタR0が接続されている。一方、レジスタR1から出力されたデータ信号Q1は、次段のロジックステージL2に入力されると共に、比較器3に入力される。
(Embodiment 6)
The circuit shown in FIG. 21 is provided with a register R2 that has a margin (Positive Slack) with respect to the register R1 that is an actual operation register as much as the buffer chain B2 that is a delay means is inserted into the clock line. . The data signal D1 output from the logic stage L1 is input to the register R1. A register R0 is connected to the preceding stage of the logic stage L1. On the other hand, the data signal Q1 output from the register R1 is input to the next logic stage L2 and also to the comparator 3.

この比較器3は、レジスタR1から出力されたデータ信号Q1とレジスタR2から出力されたデータ信号Q2とを比較し、両者が不一致の場合にエラー信号を出力する。そのため、図21に示す回路は、クロックラインに挿入したバッファチェーンB2の遅延分だけレジスタR1のセットアップ違反を動的に検出することができる。また、図21に示す回路では、バッファチェーンB2の遅延量を調整するために選択回路50が設けられている。この選択回路50は、外部から入力される選択信号Selに基づいて駆動される。そして、同様の回路(エラー検出FF)に含まれるバッファチェーンB2の遅延量(Delay)は、複数の回路全てにおいて最適な値で均一化されている。しかし、実際には挿入される遅延量と速度マージンとの間に密接な関係があり、速度マージンの少ないパスほど挿入する遅延量を増やす必要がある。但し、過多に挿入した遅延量は回路規模や消費電力のオーバーヘッドを引き起こすとともにホールド耐性も弱くなる問題がある。逆に、過少に挿入した遅延量は動作対象レジスタ(R1)と同様に期待値レジスタ(R2)もフェールする領域が大きくなり、誤動作検知スポットが狭くなる問題がある。   The comparator 3 compares the data signal Q1 output from the register R1 with the data signal Q2 output from the register R2, and outputs an error signal if they do not match. Therefore, the circuit shown in FIG. 21 can dynamically detect the setup violation of the register R1 by the delay of the buffer chain B2 inserted in the clock line. In the circuit shown in FIG. 21, a selection circuit 50 is provided to adjust the delay amount of the buffer chain B2. The selection circuit 50 is driven based on a selection signal Sel input from the outside. Then, the delay amount (Delay) of the buffer chain B2 included in the similar circuit (error detection FF) is uniformized with an optimum value in all of the plurality of circuits. However, there is actually a close relationship between the delay amount to be inserted and the speed margin, and it is necessary to increase the delay amount to be inserted in a path with a smaller speed margin. However, the excessively inserted delay amount causes a circuit scale and power consumption overhead and also has a problem that the hold tolerance is weakened. On the contrary, there is a problem that an excessively inserted delay amount increases the area where the expected value register (R2) fails as well as the operation target register (R1), and the malfunction detection spot becomes narrow.

そこで、本実施の形態では、速度マージンによって遅延パスをグルーピングし、各グループに対して最適な遅延量を挿入する。図22に、速度マージンに対応するスラック量とパス数との関係を示したグラフを示す。図22に示すグラフでは、横軸に示した0から1までのスラック量に対して、例えば0.5nsの遅延量を有するバッファを4段挿入し、1から2までのスラック量に対して、当該バッファを3段挿入し、2から3までのスラック量に対して、当該バッファを2段挿入し、3から4までのスラック量に対して、当該バッファを4段挿入する。これにより、本実施の形態では、動作マージンを保ちつつ面積や消費電力のオーバーヘッドを抑えることができる。   Therefore, in this embodiment, delay paths are grouped according to a speed margin, and an optimum delay amount is inserted into each group. FIG. 22 is a graph showing the relationship between the slack amount corresponding to the speed margin and the number of passes. In the graph shown in FIG. 22, with respect to the slack amount from 0 to 1 shown on the horizontal axis, for example, four stages of buffers having a delay amount of 0.5 ns are inserted, and for the slack amount from 1 to 2, Three stages of the buffers are inserted, two stages of the buffers are inserted for the slack amounts from 2 to 3, and four stages of the buffers are inserted for the slack amounts from 3 to 4. Thereby, in this Embodiment, the overhead of an area or power consumption can be suppressed, maintaining an operation margin.

具体的に説明する前に、図23(a)に示す回路(エラー検出FF)を、図23(b)に示すようにシンボル化する。図23(b)の中央にあるBの数字は、図23(a)に示すレジスタR2のクロックラインに挿入されたバッファB2の段数を示している。例えば、図23(b)に示すB−1は、バッファが1段挿入されていることを表している。なお、図23(a)に示す回路では、バッファ量が多ければ多いほど、レジスタR1とレジスタR2との間の遅延差が大きくなり、誤動作を検知するマージン(検知マージン)が大きくなるが、回路規模の増大、消費電力の増加及びホールドマージン現象が生じる問題がある。また、図23(a)に示した回路は、図3に示した回路構成とほぼ同じであるため、詳細な説明は省略する。   Before concrete description, the circuit (error detection FF) shown in FIG. 23A is symbolized as shown in FIG. The number B at the center of FIG. 23B shows the number of stages of the buffer B2 inserted in the clock line of the register R2 shown in FIG. For example, B-1 shown in FIG. 23B indicates that one stage of buffer is inserted. In the circuit shown in FIG. 23A, the larger the buffer amount, the larger the delay difference between the register R1 and the register R2, and the greater the margin for detecting malfunction (detection margin). There is a problem that an increase in scale, an increase in power consumption, and a hold margin phenomenon occur. Further, the circuit shown in FIG. 23A is almost the same as the circuit configuration shown in FIG.

次に、図23(a)に示した回路を4つ(U1,U2,U3,U4)使用した場合の回路構成を図24に示す。なお、図24では、図23(a)の回路をシンボル化した図23(b)を用いて表している。そして、図24に示す回路構成では、各回路(U1,U2,U3,U4)のそれぞれに、ロジック量の異なる前段(ロジックステージ)が挿入されている。そのため、各回路(U1,U2,U3,U4)の周波数に対する速度マージン(スラック)は、それぞれ0ns,0.5ns,1.0ns,1.5nsとする。また、挿入するバッファ1段あたりの遅延量は、0.5nsとする。なお、図24に示す回路構成では、各回路(U1,U2,U3,U4)に挿入されるバッファを1段としている。   Next, FIG. 24 shows a circuit configuration when four circuits (U1, U2, U3, U4) shown in FIG. In FIG. 24, the circuit in FIG. 23A is represented by using FIG. 23B symbolized. In the circuit configuration shown in FIG. 24, a preceding stage (logic stage) having a different logic amount is inserted in each circuit (U1, U2, U3, U4). Therefore, the speed margin (slack) with respect to the frequency of each circuit (U1, U2, U3, U4) is set to 0 ns, 0.5 ns, 1.0 ns, and 1.5 ns, respectively. Further, the delay amount per stage of the buffer to be inserted is 0.5 ns. In the circuit configuration shown in FIG. 24, the buffer inserted in each circuit (U1, U2, U3, U4) has one stage.

次に、図24に示す回路構成の動作を、図25に示すタイミングチャートを用いて説明する。図25に示すタイミングチャートでは、周期が進むごとに電源電圧を低下させて、各回路(U1,U2,U3,U4)のデータ端子Dに0.5nsの遅延オーバーヘッドが生じるように仮定している。従って、4周期目では、1周期目に対して1.5nsのスラックが減じられる(1.5nsの遅延増加)ことになる。   Next, the operation of the circuit configuration shown in FIG. 24 will be described with reference to the timing chart shown in FIG. In the timing chart shown in FIG. 25, it is assumed that the power supply voltage is lowered every time the cycle progresses so that a delay overhead of 0.5 ns is generated at the data terminal D of each circuit (U1, U2, U3, U4). . Therefore, in the fourth period, the slack of 1.5 ns is reduced compared to the first period (delay increase of 1.5 ns).

図25に示す1周期目では、回路U1のセットアップ違反を検知できている(その他の回路U2,U3,U4ではセットアップ違反していない)。しかし、2周期目以降では、回路U1がセットアップ違反を起こしているにもかかわらず、クロック信号Clkに対するクロック信号C2の位相差であるレジスタR2のマージンが不足しているのでセットアップ違反が検知できていない。   In the first cycle shown in FIG. 25, the setup violation of the circuit U1 can be detected (the other circuits U2, U3, U4 have no setup violation). However, after the second period, the setup violation can be detected because the margin of the register R2, which is the phase difference of the clock signal C2 with respect to the clock signal Clk, is insufficient even though the circuit U1 has caused the setup violation. Absent.

次に、図24に示す回路構成において、バッファ量を4段に増やした場合のタイミングチャートを図26に示す。図26も前述と同様に、周期が進むごとに電源電圧を低下させて、各回路(U1,U2,U3,U4)のデータ端子Dに0.5nsの遅延オーバーヘッドが生じるように仮定している。従って、4周期目では、1周期目に対して1.5nsのスラックが減じられることになる。   Next, FIG. 26 shows a timing chart when the buffer amount is increased to four stages in the circuit configuration shown in FIG. Similarly to the above, FIG. 26 also assumes that the power supply voltage is lowered each time the cycle progresses so that a delay overhead of 0.5 ns occurs at the data terminal D of each circuit (U1, U2, U3, U4). . Accordingly, in the fourth period, the slack of 1.5 ns is reduced with respect to the first period.

図26に示す1周期目では、回路U1のセットアップ違反を検知できている(その他の回路U2,U3,U4ではセットアップ違反していない)。しかし、2周期目以降では、回路U1がセットアップ違反を起こしている4周期目までセットアップ違反を検知し続けられる。   In the first cycle shown in FIG. 26, the setup violation of the circuit U1 can be detected (the other circuits U2, U3, U4 have no setup violation). However, after the second period, the setup violation can be detected until the fourth period in which the circuit U1 causes the setup violation.

一方、回路U2に関しては、2周期目で初めてセットアップ違反が検知され、その後4周期目までセットアップ違反を検知できている。回路U3に関しては、3周期目で初めてセットアップ違反が検知され、その後、4周期目までセットアップ違反を検知できている。回路U4に関しては、4周期目で初めてセットアップ違反が検知されている。   On the other hand, with respect to the circuit U2, the setup violation is detected for the first time in the second period, and then the setup violation can be detected until the fourth period. Regarding the circuit U3, the setup violation is detected for the first time in the third period, and thereafter, the setup violation can be detected until the fourth period. Regarding the circuit U4, the setup violation is detected for the first time in the fourth period.

従って、回路U2に関しては2周期目以降、回路U3に関しては3周期目以降、回路U4に関しては4周期目以降で、それぞれセットアップ違反を検知できればよいということである。通常の回路設計において電圧動作の下限は決まっており、それを超えるマージン量を確保する必要はない。よって、スラック量の大きいパスほど回路(U1,U2,U3,U4)に挿入する遅延量を小さくすることで、誤動作を検知するマージンを落とすことなく、面積や消費電力のオーバーヘッドを極力抑えることができる。   Therefore, it is only necessary to detect setup violations in the second cycle and thereafter for the circuit U2, in the third and subsequent cycles for the circuit U3, and in the fourth and subsequent cycles for the circuit U4. In the normal circuit design, the lower limit of the voltage operation is determined, and it is not necessary to secure a margin amount exceeding it. Therefore, by reducing the delay amount inserted into the circuit (U1, U2, U3, U4) as the slack amount increases, the overhead of area and power consumption can be suppressed as much as possible without reducing the margin for detecting malfunction. it can.

次に、図25や図26に示したタイミングチャートに基づき、挿入する遅延量を最適にした回路構成を図27に示す。図27に示す回路構成では、スラック量が少ない回路ほど遅延量が多くなるようにバッファの段数を調整している。具体的には、図27に示す回路構成では、回路U1のスラック量が0nsと小さいので4段のバッファ(B4)を設け、スラック量が0.5nsの回路U2には3段のバッファ(B3)、スラック量が1.0nsの回路U3には2段のバッファ(B2)、スラック量が1.5nsの回路U4には1段のバッファ(B1)をそれぞれ設けている。   Next, FIG. 27 shows a circuit configuration in which the delay amount to be inserted is optimized based on the timing charts shown in FIG. 25 and FIG. In the circuit configuration shown in FIG. 27, the number of buffer stages is adjusted so that the delay amount increases as the slack amount decreases. Specifically, in the circuit configuration shown in FIG. 27, since the slack amount of the circuit U1 is as small as 0 ns, a four-stage buffer (B4) is provided, and the circuit U2 having a slack amount of 0.5 ns has a three-stage buffer (B3). ), A circuit U3 having a slack amount of 1.0 ns is provided with a two-stage buffer (B2), and a circuit U4 having a slack amount of 1.5 ns is provided with a one-stage buffer (B1).

つまり、本実施の形態に係る半導体装置の回路構成では、回路のレイアウト後に各遅延パスのスラック量を分析し、バッファ1段分の遅延量に収まるスラック量を持つ回路(エラー検出FF)をグルーピングして束ねる。そして、本実施の形態に係る半導体装置の回路構成では、グルーピングした回路(エラー検出FF)に対して最適なバッファを挿入する。   That is, in the circuit configuration of the semiconductor device according to the present embodiment, after the circuit layout, the slack amount of each delay path is analyzed, and a circuit (error detection FF) having a slack amount that falls within the delay amount of one buffer stage is grouped. And bundle them. In the circuit configuration of the semiconductor device according to the present embodiment, an optimum buffer is inserted into the grouped circuit (error detection FF).

図28に示すタイミングチャートは、図27に示す回路構成の動作を説明している。そして、図27に示す回路構成では、セットアップ違反のチェックが必要な箇所(破線で囲まれた箇所でデータ信号Dが変化しているポイント)において正しく検知されている。つまり、図28に示すタイミングチャートは、回路U1に関しては1周期目以降、回路U2に関しては2周期目以降、回路U3に関しては3周期目以降、回路U4に関しては4周期目以降で、それぞれセットアップ違反を検知できている。   The timing chart shown in FIG. 28 explains the operation of the circuit configuration shown in FIG. In the circuit configuration shown in FIG. 27, detection is correctly performed at a location where a setup violation check is necessary (a point where the data signal D changes at a location surrounded by a broken line). That is, in the timing chart shown in FIG. 28, the setup violation occurs after the first cycle for the circuit U1, after the second cycle for the circuit U2, after the third cycle for the circuit U3, and after the fourth cycle for the circuit U4. Can be detected.

(実施の形態7)
実施の形態5では、スラック量により半導体装置に含まれる誤動作判定回路(エラー検出FF)をグルーピングして、各グループの誤動作判定回路に最適な量のバッファを挿入していた。しかし、半導体装置において極端にスラック量が小さい回路は、多数のバッファを挿入する必要があり、面積や消費電力のオーバーヘッドが大きくなる点で問題があった。
(Embodiment 7)
In the fifth embodiment, the malfunction determination circuit (error detection FF) included in the semiconductor device is grouped according to the slack amount, and an optimum amount of buffer is inserted into the malfunction determination circuit of each group. However, a circuit with an extremely small amount of slack in a semiconductor device has a problem in that a large number of buffers need to be inserted, resulting in an increase in area and power consumption overhead.

以下に、具体的な例を用いて説明する。図29に示す回路では、レジスタR3を終点とするパスとして、レジスタR1からレジスタR3へ至るタイミングクリティカルなパスを有すると伴に、レジスタR2からレジスタR3へ至る等の他のパスも有している。そして、図29に示すレジスタR3を図3で説明した誤動作判定回路(エラー検出FF)に置き換えた場合の回路構成を、図30に示す。図30に示す回路構成では、レジスタR1からレジスタR3−1へ至るパスがタイミングクリティカルなパスであるが、このパス以外にレジスタR2からレジスタR3−2へ至るパスも有している。   Below, it demonstrates using a specific example. In the circuit shown in FIG. 29, the path having the register R3 as an end point has a timing critical path from the register R1 to the register R3, and also has other paths such as from the register R2 to the register R3. . FIG. 30 shows a circuit configuration when the register R3 shown in FIG. 29 is replaced with the malfunction determination circuit (error detection FF) described in FIG. In the circuit configuration shown in FIG. 30, the path from the register R1 to the register R3-1 is a timing critical path, but there is also a path from the register R2 to the register R3-2 in addition to this path.

しかし、レジスタR2からレジスタR3−2へ至るパスがホールド違反を引き起こすと仮定すると、このホールド違反の対策のためにレジスタR2からレジスタR3−2へ至るパスにバッファやディレイセルを挿入する必要がある。つまり、レジスタR3−2のクロックラインに挿入しているバッファ1の遅延量が大きい場合、図31に示す回路構成のようにレジスタR2からレジスタR3−2へ至るパスに、バッファ1の遅延量と等価なバッファやディレイセル等の遅延手段60を挿入する必要がある。そのため、図31に示す回路構成では、面積的にも消費電力的にもオーバヘッドが大きくなる問題があった。   However, if it is assumed that the path from the register R2 to the register R3-2 causes a hold violation, it is necessary to insert a buffer or a delay cell in the path from the register R2 to the register R3-2 as a countermeasure against the hold violation. . That is, when the delay amount of the buffer 1 inserted into the clock line of the register R3-2 is large, the delay amount of the buffer 1 is set in the path from the register R2 to the register R3-2 as in the circuit configuration shown in FIG. It is necessary to insert a delay means 60 such as an equivalent buffer or delay cell. For this reason, the circuit configuration shown in FIG. 31 has a problem that the overhead increases in terms of area and power consumption.

そこで、本実施の形態に係る半導体装置では、ホールド違反を引き起こすパスを有する回路構成において、ホールド違反の対策として挿入するバッファやディレイセルの代わりに、ロックアップラッチや反転FFを挿入する。つまり、本実施の形態では、図32に示すように、レジスタR2からレジスタR3−2へ至るパスにロックアップラッチとして機能するレジスタR4を挿入する。又は、図33に示すように、レジスタR2からレジスタR3−2へ至るパスに反転FFとして機能するレジスタR4を挿入する。   Therefore, in the semiconductor device according to the present embodiment, in a circuit configuration having a path that causes a hold violation, a lockup latch and an inversion FF are inserted instead of a buffer and a delay cell to be inserted as a countermeasure against the hold violation. That is, in the present embodiment, as shown in FIG. 32, a register R4 that functions as a lock-up latch is inserted in a path from the register R2 to the register R3-2. Alternatively, as shown in FIG. 33, a register R4 functioning as an inversion FF is inserted in a path from the register R2 to the register R3-2.

図32に示す回路構成や図33に示す回路構成では、多数のバッファセルやディレイセルを挿入する代わりに、ロックアップラッチや反転FFとして機能するレジスタR4を挿入することで、クロック信号の半周期分の遅延を稼ぐことができ、且つホールド違反を解消することができる。さらに、図32に示す回路構成や図33に示す回路構成は、図31に示す回路構成のように多数のバッファセルやディレイセルを挿入する必要がないので、面積的にも消費電力的にもオーバヘッドを低減できる。   In the circuit configuration shown in FIG. 32 or the circuit configuration shown in FIG. 33, a half cycle of the clock signal is obtained by inserting a register R4 functioning as a lock-up latch or an inverting FF instead of inserting many buffer cells and delay cells. A minute delay can be earned, and a hold violation can be resolved. Further, the circuit configuration shown in FIG. 32 and the circuit configuration shown in FIG. 33 do not require insertion of a large number of buffer cells and delay cells unlike the circuit configuration shown in FIG. Overhead can be reduced.

次に、ホールド違反を引き起こしている図30に示す回路構成の動作を、図34に示すタイミングチャートを用いて説明する。なお、図30に示す回路構成において、レジスタR1からレジスタR3−1に至るパスはセットアップ違反を引き起こし、レジスタR1からレジスタR3−2に至るパスから期待値を得る。また、図30に示す回路構成において、レジスタR2からレジスタR3−2に至るパスはホールド違反を引き起こすパスである。また、以下の動作説明では、当該動作を簡略化するために各タイミングパスの論理はいかなる状態でも正論理であると仮定する。   Next, the operation of the circuit configuration shown in FIG. 30 causing the hold violation will be described with reference to the timing chart shown in FIG. In the circuit configuration shown in FIG. 30, the path from the register R1 to the register R3-1 causes a setup violation, and the expected value is obtained from the path from the register R1 to the register R3-2. In the circuit configuration shown in FIG. 30, the path from the register R2 to the register R3-2 is a path that causes a hold violation. In the following description of the operation, it is assumed that the logic of each timing path is positive in any state in order to simplify the operation.

まず、図34に示す1周期目では、クロック信号C1の立ち上がりで、レジスタR1の内容が”0”から”1”に遷移している。   First, in the first period shown in FIG. 34, the content of the register R1 changes from “0” to “1” at the rising edge of the clock signal C1.

次に、図34に示す2周期目では、1周期目におけるレジスタR1のriseイベントに従ってって値が確定されることになるが、レジスタR3−1はセットアップ違反を引き起こしているので”1”を取り込むことができず”0”のままとなる。一方、レジスタR3−2は、遅延したクロック信号C2により正常に”1”を取り込むことができる。さらに、レジスタR1には、次の”1”から”0”へのfallイベントが発生している。   Next, in the second period shown in FIG. 34, the value is determined according to the rise event of the register R1 in the first period. However, since the register R3-1 causes a setup violation, “1” is set. It cannot be imported and remains “0”. On the other hand, the register R3-2 can normally capture “1” by the delayed clock signal C2. Further, the next fall event from “1” to “0” occurs in the register R1.

次に、図34に示す3周期目では、2周期目と同様、2周期目におけるレジスタR1のfallイベントに従ってって値が確定されることになるが、レジスタR3−1はセットアップ違反を引き起こしているので”0”を取り込むことができず、前周期での確定値”1”を取り込むことになる。一方、レジスタR3−2は、遅延したクロック信号C2により正常に”0”を取り込むことができる。   Next, in the third period shown in FIG. 34, as in the second period, the value is determined according to the fall event of the register R1 in the second period, but the register R3-1 causes a setup violation. Therefore, “0” cannot be captured, and the final value “1” in the previous cycle is captured. On the other hand, the register R3-2 can normally capture “0” by the delayed clock signal C2.

次に、図34に示す4周期目では、クロック信号C1の立ち上がりでレジスタR2の内容が”0”から”1”へと遷移している。そのため、レジスタR2の当該イベントは、本来、次サイクルである5周期目にレジスタR3−1,R3−2の遷移として反映される予定である。しかし、レジスタR3−2は、ホールド違反を引き起こしているため、図中の矢印が示すよう4周期目において”1”を取り込むことになる。つまり、4周期目において期待値レジスタであるレジスタR3−2は、誤った結果を保持することになる。   Next, in the fourth period shown in FIG. 34, the content of the register R2 transitions from “0” to “1” at the rising edge of the clock signal C1. Therefore, the event in the register R2 is originally scheduled to be reflected as a transition of the registers R3-1 and R3-2 in the fifth cycle which is the next cycle. However, since the register R3-2 causes a hold violation, “1” is fetched in the fourth period as indicated by an arrow in the drawing. That is, in the fourth period, the register R3-2 that is an expected value register holds an incorrect result.

次に、図34に示す5周期目では、クロック信号C1の立ち上がりでレジスタR2の内容が”1”から”0”へと遷移している。そのため、レジスタR2の当該イベントは、本来、次サイクルである6周期目にレジスタR3−1,R3−2の遷移として反映される予定である。しかし、レジスタR3−2は、ホールド違反を引き起こしているため、4周期目と同様、図中の矢印が示すよう5周期目において”0”を取り込むことになる。   Next, in the fifth cycle shown in FIG. 34, the content of the register R2 transitions from “1” to “0” at the rising edge of the clock signal C1. Therefore, the event in the register R2 is originally scheduled to be reflected as the transition of the registers R3-1 and R3-2 in the 6th cycle which is the next cycle. However, since the register R3-2 causes a hold violation, “0” is fetched in the fifth period as indicated by the arrow in the figure as in the fourth period.

次に、ホールド違反の対策のために、レジスタR2からレジスタR3−2へ至るパスにロックアップラッチ又は反転FFとして機能するレジスタR4を挿入した図32又は図33に示す回路構成の動作について図35のタイミングチャートを用いて説明する。   Next, as a countermeasure against the hold violation, the operation of the circuit configuration shown in FIG. 32 or FIG. 33 in which a register R4 functioning as a lock-up latch or an inversion FF is inserted in the path from the register R2 to the register R3-2. This will be described using the timing chart.

なお、図35に示すタイミングチャートでは、クロック信号C2がクロック信号C1に対して挿入したバッファ分だけ遅延してイベント伝播する。また、図35に示すタイミングチャートでは、レジスタR1,R2,R3−1のそれぞれがクロック信号C1の立ち上がりエッジでデータ信号を取り込み、レジスタR3−2がクロック信号C2の立ち上がりエッジでデータ信号を取り込み、レジスタR4がクロック信号C1の立ち下りエッジでデータを取り込むものとする。   In the timing chart shown in FIG. 35, the event propagation is performed with the clock signal C2 delayed by the amount of the buffer inserted with respect to the clock signal C1. In the timing chart shown in FIG. 35, each of the registers R1, R2, and R3-1 captures a data signal at the rising edge of the clock signal C1, and the register R3-2 captures a data signal at the rising edge of the clock signal C2. Assume that the register R4 captures data at the falling edge of the clock signal C1.

次に、図35に示すタイミングチャートは、1周期目から3周期目までの動作が図34に示したタイミングチャートの動作と等価であるため詳細な説明を割愛する。   Next, in the timing chart shown in FIG. 35, the operation from the first period to the third period is equivalent to the operation of the timing chart shown in FIG.

次に、図35に示す4周期目では、クロック信号C1の立ち上がりでレジスタR2の内容が”0”から”1”へと遷移している。レジスタR3−2はホールド違反を引き起こすパスであったが、図32又は図33に示すようにレジスタR2とレジスタR3−2との間にロックアップラッチ又は反転FFが挿入されている。そのため、図35に示す4周期目では、レジスタR2で生じたイベント”1”がレジスタR3−2に直接取り込まずに、図中の矢印が示すようにクロック信号C1の立ち下りでレジスタR4に一旦取り込まれた後、5周期目でレジスタR3−2に取り込む。   Next, in the fourth period shown in FIG. 35, the content of the register R2 changes from “0” to “1” at the rising edge of the clock signal C1. The register R3-2 is a path that causes a hold violation. However, as shown in FIG. 32 or FIG. 33, a lockup latch or an inversion FF is inserted between the register R2 and the register R3-2. For this reason, in the fourth period shown in FIG. 35, the event “1” generated in the register R2 is not directly taken into the register R3-2, but temporarily appears in the register R4 at the falling edge of the clock signal C1 as indicated by the arrow in the figure. After being fetched, it is fetched into the register R3-2 in the fifth cycle.

次に、図35に示す5周期目では、レジスタR4に取り込んだ”1”をクロック信号C1の立ち上がりでレジスタR3−1が取り込み、クロック信号C2の立ち上がりでレジスタR3−2に取り込む。また、クロック信号C1の立ち上がりでレジスタR2の内容が”1”から”0”に遷移しているが、4周期目と同様にレジスタR2で生じたイベント”0”をレジスタR3−2が直接取り込まずに、図中の矢印が示すようにクロック信号C1の立ち下りでレジスタR4に一旦取り込む。   Next, in the fifth cycle shown in FIG. 35, “1” taken into the register R4 is taken into the register R3-1 at the rising edge of the clock signal C1, and taken into the register R3-2 at the rising edge of the clock signal C2. In addition, the content of the register R2 changes from “1” to “0” at the rising edge of the clock signal C1, but the register R3-2 directly takes in the event “0” generated in the register R2 as in the fourth period. Instead, as indicated by the arrow in the figure, it is once taken into the register R4 at the falling edge of the clock signal C1.

次に、図35に示す6周期目では、レジスタR4に取り込んだ”0”をクロック信号C1の立ち上がりでレジスタR3−1が取り込み、クロック信号C2の立ち上がりでレジスタR3−2に取り込む。   Next, in the sixth cycle shown in FIG. 35, “0” taken into the register R4 is taken into the register R3-1 at the rising edge of the clock signal C1, and taken into the register R3-2 at the rising edge of the clock signal C2.

以上のように、本実施の形態に係る半導体装置では、図32又は図33に示す回路構成を採用することで、面積的にも消費電力的にもオーバヘッドを低減し、ホールド違反による誤動作を回避してデータを正しく転送可能にしている。   As described above, in the semiconductor device according to the present embodiment, the circuit configuration shown in FIG. 32 or FIG. 33 is employed to reduce overhead in terms of area and power consumption and to avoid malfunction due to hold violation. The data can be transferred correctly.

(実施の形態8)
実施の形態6では、速度マージンによって遅延パスをグルーピングし、各グループに対して最適な遅延量を挿入している。具体的に、図23の回路(エラー検出FF)に対して、個別にバッファB2を挿入し最適な挿入バッファ量を設定することで、回路規模や消費電力増大を抑える効果について説明した。しかし、挿入バッファ量を個々に変えるということは、エラー検出FFごとに1つのクロックドメインをアサインすると言うことになり、実際に配置配線する際には、クロックスキューやレイテンシの制御がうまく働かず、所望の回路規模や消費電力が得られない場合も考えられる。
(Embodiment 8)
In the sixth embodiment, delay paths are grouped according to a speed margin, and an optimum delay amount is inserted for each group. Specifically, the effect of suppressing an increase in circuit scale and power consumption by individually inserting the buffer B2 and setting the optimum insertion buffer amount in the circuit (error detection FF) of FIG. 23 has been described. However, changing the amount of insertion buffer individually means assigning one clock domain for each error detection FF, and when actually placing and routing, clock skew and latency control do not work well, There may be a case where a desired circuit scale and power consumption cannot be obtained.

そこで、本実施の形態では、上記のリスクも考慮した最適なグルーピング方法について説明する。まず、図36に、本実施の形態で行うグルーピングのアルゴリズムのフローチャートを示す。例えば、遅延パスが21パスあるとした場合について、図36に示すフローチャートを説明する。この21パスのネガティブスラック量(Negative-Slack)は、それぞれ0.048,0.048,0.045,0.045,0.036,0.035,0.033,0.027,0.024,0.022,0.021,0.019,0.017,0.015,0.015,0.008,0.007,0.006,0.005,0.001,0.001であると仮定する。なお、通常のネガティブスラック量(Negative-Slack)は負値となるが、説明を簡単にするために、全て正値として表す。   Therefore, in the present embodiment, an optimal grouping method that takes the above risks into account will be described. First, FIG. 36 shows a flowchart of a grouping algorithm performed in the present embodiment. For example, the case where there are 21 delay paths will be described with reference to the flowchart shown in FIG. The negative slack amount (Negative-Slack) of 21 passes is 0.048, 0.048, 0.045, 0.045, 0.036, 0.035, 0.033, 0.027, 0.024, 0.022, 0.021, 0.019, 0.017, 0.015, 0.015, 0.008, 0.007, 0.006, respectively. , 0.005, 0.001, and 0.001. Note that the normal negative slack amount (Negative-Slack) is a negative value, but in order to simplify the explanation, all are expressed as positive values.

図36に示すフローチャートのステップS1では、最大及び最小のネガティブスラック量(Maximum-Negative-Slack(MaxNS),Minimum-Negative-Slack(MinNS:初期値は0))、トータルネガティブスラック量(Total-Negative-Slack(TNS))を算出する。さらに、ステップS1で算出したTNSを初期クライテリアとする。具体的には、MaxNS=0.048,MinNS=0.0,TNS=0.478となる。   In step S1 of the flowchart shown in FIG. 36, the maximum and minimum negative slack amounts (Maximum-Negative-Slack (MaxNS), Minimum-Negative-Slack (MinNS: initial value is 0)), total negative slack amount (Total-Negative -Slack (TNS)) is calculated. Further, the TNS calculated in step S1 is set as the initial criterion. Specifically, MaxNS = 0.048, MinNS = 0.0, TNS = 0.478.

次に、ステップS2では、MaxNSからMinNSまでの任意のネガティブスラック量をDivNS(選択値)として選択し、MaxNSからDivNSまでに属する全ての遅延パスをグループA、DivNSからMinNSまでに属する全ての遅延パスをグループBに分ける。0.7Vでのスラックタイミングを示す図37のように、MaxNSからMinNSまで遅延パスをDivNSを境にグループAとグループBとに分ける。さらに、ステップS2では、グループAに属する個々の遅延パスからDivNSまでの差分の合計、及びグループBに属する個々の遅延パスからMinNSまでの差分の合計をそれぞれ算出し、両差分の和を評価関数としてトータルネガティブスラック量(TNS)とする。   Next, in step S2, an arbitrary negative slack amount from MaxNS to MinNS is selected as DivNS (selected value), and all delay paths belonging to MaxNS to DivNS are selected as group A and all delays belonging to DivNS to MinNS. Divide the path into group B. As shown in FIG. 37 showing slack timing at 0.7 V, the delay path from MaxNS to MinNS is divided into group A and group B with DivNS as a boundary. Further, in step S2, the sum of the differences from the individual delay paths belonging to group A to DivNS and the sum of the differences from the individual delay paths belonging to group B to MinNS are calculated, and the sum of both differences is calculated as an evaluation function. As the total negative slack amount (TNS).

次に、ステップS3では、DivNSをMaxNSからMinNSまでの間で順次スイープさせて、評価関数であるトータルネガティブスラック量(TNS)が最小となるDivNSを求める。具体的に、上記の例では、DivNSをMaxNS(0.048)からMinNS(0.0)までスイープさせてTNSが最小となるDivNSを決定する。なお、本例では、DivNSのスイープ精度を0.01とするので、DivNSの取りうる値は0.00,0.01,0.02,0.03,0.04の5通りとなる。取りうる各DivNS時のTNSは、DivNS=0.00のときTNS=0.478,DivNS=0.01のときTNS=0.328,DivNS=0.02のときTNS=0.258,DivNS=0.03のときTNS=0.268,DivNS=0.04のときTNS=0.318である。   Next, in step S3, DivNS is swept sequentially from MaxNS to MinNS, and DivNS that minimizes the total negative slack amount (TNS) that is an evaluation function is obtained. Specifically, in the above example, DivNS is swept from MaxNS (0.048) to MinNS (0.0) to determine the DivNS that minimizes TNS. In this example, since the DivNS sweep accuracy is 0.01, there are five possible values for DivNS: 0.00, 0.01, 0.02, 0.03, and 0.04. The possible TNS for each DivNS is TNS = 0.478 when DivNS = 0.00, TNS = 0.328 when DivNS = 0.01, TNS = 0.258 when DivNS = 0.02, TNS = 0.268 when DivNS = 0.03, and DivNS = 0.04 TNS = 0.318.

次に、ステップS4では、ステップS3で求めた最小となるDivNSに所定の重み付けを行った値と、今回の分割前のクライテリアとを比較し、大きければ処理を終了し、小さければ今回の分割処理をアクセプトして、得られた値を新たなクライテリアとして更新する。上記の例では、TNSの最小値はDivNS=0.02のときの0.258なので、この値と初期クライテリア(0.478)を比較する。この時の重み付け関数を1.5*TNS+0.05とすると、重み付けを行った値は0.437となり、クライテリアを下回るため、本分割はアクセプトされ、以下のように分割される。グループAは、0.048,0.048,0.045,0.045,0.036,0.035,0.033,0.027,0.024,0.022,0.021、グループBは0.019,0.017,0.015,0.015,0.008,0.007,0.006,0.005,0.001,0.001となる。このとき、クライテリアは0.478から0.258に更新される。   Next, in step S4, a value obtained by performing predetermined weighting on the minimum DivNS obtained in step S3 is compared with the criteria before the current division. If it is larger, the process ends. Is accepted and the obtained value is updated as a new criterion. In the above example, the minimum value of TNS is 0.258 when DivNS = 0.02, so this value is compared with the initial criteria (0.478). If the weighting function at this time is 1.5 * TNS + 0.05, the weighted value is 0.437, which is below the criteria, so this division is accepted and divided as follows. Group A is 0.048, 0.048, 0.045, 0.045, 0.036, 0.035, 0.033, 0.027, 0.024, 0.022, 0.021, and Group B is 0.019, 0.017, 0.015, 0.015, 0.008, 0.007, 0.006, 0.005, 0.001, 0.001. . At this time, the criteria are updated from 0.478 to 0.258.

次に、ステップS5では、分割後の2グループに関して同様のことが再帰的に行われる。グループAにおけるTNSの最小値はDivNS=0.04の時の0.084で、重み付けを行った値は0.176となり、分割はアクセプトされる。このときのクライテリアは0.084に更新される。また、グループBにおけるTNSの最小値はDivNS=0.01の時の0.054で、重み付けを行った値は0.131となり、分割はアクセプトされる。この時のクライテリアは0.054に更新される。   Next, in step S5, the same is recursively performed for the two groups after the division. The minimum value of TNS in group A is 0.084 when DivNS = 0.04, and the weighted value is 0.176, and the division is accepted. The criteria at this time are updated to 0.084. Further, the minimum value of TNS in group B is 0.054 when DivNS = 0.01, and the weighted value is 0.131, and the division is accepted. The criteria at this time are updated to 0.054.

従って、上記分割のアクセプト後のグループは以下の通りになる。グループA−A(GA−A)は0.048,0.048,0.045,0.045、グループA−B(GA−B)は0.036,0.035,0.033,0.027,0.024,0.022,0.021、グループB−A(GB−A)は0.019,0.017,0.015,0.015、グループB−B(GB−B)は0.008,0.007,0.006,0.005,0.001,0.001となる。このとき、グループA−A,グループB−A,グループB−Bに関しては、DivNSの精度0.01による分割はこれ以上できないため、分割処理をストップし、グループA−Bのみ分割処理を続ける。   Therefore, the groups after acceptance of the above division are as follows. Group A-A (GA-A) is 0.048, 0.048, 0.045, 0.045, Group A-B (GA-B) is 0.036, 0.035, 0.033, 0.027, 0.024, 0.022, 0.021, Group B-A (GB-A ) Is 0.019, 0.017, 0.015, 0.015, and Group BB (GB-B) is 0.008, 0.007, 0.006, 0.005, 0.001, 0.001. At this time, with respect to Group A-A, Group B-A, and Group B-B, the division with DivNS accuracy 0.01 cannot be performed any more, so the division process is stopped and only the group A-B is continued.

グループA−BにおけるTNSの最小値はDivNS=0.03の時の0.028で、重み付けを行った値は0.092となり、クライテリア0.084を上回るため分割がリジェクトされる。したがって、上記の遅延パスである21パスに図36に示すアルゴリズムを適用して分割した場合、上記4通り(グループA−A,グループA−B,グループB−A,グループB−B)にグルーピングされる。   The minimum value of TNS in group A-B is 0.028 when DivNS = 0.03, and the weighted value is 0.092, which exceeds the criterion 0.084, so the division is rejected. Therefore, when the 21 paths that are the delay paths are divided by applying the algorithm shown in FIG. 36, grouping is performed in the above four ways (group A-A, group AB, group BA, group BB). Is done.

次に、図36に示すアルゴリズムを用いて遅延パスをグルーピングした場合の効果について説明する。図38は、上記のグループ分けを行った遅延パスを説明するための模式図である。従来手法では、21パス全てに最大スラック0.048nsのディレイを補うバッファが挿入されていた。ホールドオーバーヘッド関数を遅延量*パス数とすると、オーバヘッド指標は0.048*21=1.008となる。   Next, the effect when grouping delay paths using the algorithm shown in FIG. 36 will be described. FIG. 38 is a schematic diagram for explaining the delay paths subjected to the above grouping. In the conventional method, a buffer that compensates for a delay of a maximum slack of 0.048 ns is inserted in all 21 paths. Assuming that the hold overhead function is the delay amount * the number of paths, the overhead index is 0.048 * 21 = 1.008.

一方、本実施の形態では、挿入遅延量は各グループのクリティカルスラックとなるため、図38に示すようにグループA−Aの挿入遅延量は0.048nsのまま変わらないが、グループA−Bは0.036ns,グループB−Aは0.019ns,グループB−Bは0.008nsに削減される。これによりオーバーヘッド指標は、0.048*4+0.036*7+0.019*4+0.008*6=0.568となる。   On the other hand, in the present embodiment, since the insertion delay amount is critical slack of each group, the insertion delay amount of group A-A remains 0.048 ns as shown in FIG. ns, group B-A is reduced to 0.019 ns, and group BB is reduced to 0.008 ns. As a result, the overhead index becomes 0.048 * 4 + 0.036 * 7 + 0.019 * 4 + 0.008 * 6 = 0.568.

したがって、オーバヘッド指標は0.568/1.008*100=56.3%に削減されることが分かる。また、図38では、各グループに挿入される挿入バッファの数が図示されており、従来手法及びグループA−Aは5、グループA−Bは4、グループB−Aは2、グループB−Bは1である。   Therefore, it can be seen that the overhead index is reduced to 0.568 / 1.008 * 100 = 56.3%. FIG. 38 shows the number of insertion buffers to be inserted in each group. The conventional method and group A-A are 5, group A-B is 4, group B-A is 2, group B-B. Is 1.

さらに、本実施の形態では、図39に示すようにロジックを分割し、一部の処理を先行的に処理することにより、レイテンシも削減することができる。   Furthermore, in this embodiment, the logic can be divided as shown in FIG. 39, and a part of the processes can be processed in advance to reduce the latency.

エラー検知は、適用回路中に分散されているエラー検出FFのいずれか1つでもフェールすれば、その旨のアラート信号を出さねばならないため、各エラー検知信号の論理和を取らねばならない。従来手法では、21パス全てのエラー検知を最大スラック0.048nsのクロック位相差後に行うため、21入力論理和を一気に処理しなければならなかった。この処理には、100ps要していた。   In the error detection, if any one of the error detection FFs distributed in the application circuit fails, an alert signal to that effect must be issued, and thus the logical sum of each error detection signal must be taken. In the conventional method, since error detection for all 21 paths is performed after a clock phase difference of maximum slack of 0.048 ns, 21 input logical sums have to be processed all at once. This process required 100 ps.

一方、本実施の形態では、挿入遅延量が各グループのクリティカルスラックとなるため、図38に示すようにグループA−Aの挿入遅延量は0.048nsのまま変わらないが、グループA−Bは0.036ns,グループB−Aは0.019ns,グループB−Bは0.008nsになり、各タイミングでエラー検知がなされ、グループB−B,グループB−A,グループA−Bの順で各論理和を先行的に処理することができる。仮にグループA−Bまでの論理和の処理がグループA−Aのクロック位相差までに完了しているとすると、本実施の形態では、これらの伝搬信号とグループA−Aに属する4パスの計5入力の論理和を処理するだけでよい。この処理に40ps要するとする。したがって、本実施の形態では、レイテンシも40/100*100=40.0%に削減されることが分かる。   On the other hand, in this embodiment, since the insertion delay amount becomes the critical slack of each group, the insertion delay amount of group A-A remains 0.048 ns as shown in FIG. ns, group B-A is 0.019 ns, group BB is 0.008 ns, error detection is performed at each timing, and each logical sum precedes in the order of group BB, group BA, group AB Can be processed automatically. Assuming that the logical sum processing up to group A-B has been completed up to the clock phase difference of group A-A, in the present embodiment, the total of these propagation signals and four paths belonging to group A-A is calculated. It is only necessary to process a 5-input logical sum. Assume that this process requires 40 ps. Therefore, in this embodiment, it can be seen that the latency is also reduced to 40/100 * 100 = 40.0%.

本発明の前提となる回路の回路図である。It is a circuit diagram of a circuit which is a premise of the present invention. 本発明の前提となる回路のタイミングチャートである。It is a timing chart of the circuit used as the premise of this invention. 本発明の実施の形態1に係る誤動作判定回路の回路図である。FIG. 3 is a circuit diagram of a malfunction determination circuit according to the first embodiment of the present invention. 本発明の実施の形態1に係る誤動作判定回路の回路図である。FIG. 3 is a circuit diagram of a malfunction determination circuit according to the first embodiment of the present invention. 本発明の実施の形態1に係る誤動作判定回路を複数設けた場合の構成を示す回路図である。It is a circuit diagram which shows the structure at the time of providing the several malfunction determination circuit based on Embodiment 1 of this invention. 本発明の実施の形態1に係る誤動作判定回路のタイミングチャートである。3 is a timing chart of the malfunction determination circuit according to the first embodiment of the present invention. 本発明の実施の形態1に係る半導体装置のブロック図である。1 is a block diagram of a semiconductor device according to a first embodiment of the present invention. 本発明の実施の形態2に係る誤動作判定回路の前提となる回路図である。It is a circuit diagram used as the premise of the malfunction determination circuit based on Embodiment 2 of this invention. クロック信号のクリップを説明するための概略図である。It is the schematic for demonstrating the clip of a clock signal. 本発明の実施の形態2に係る誤動作判定回路の回路図である。It is a circuit diagram of a malfunction determination circuit according to the second embodiment of the present invention. 本発明の実施の形態2に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係る誤動作判定回路の回路図である。It is a circuit diagram of a malfunction determination circuit according to Embodiment 3 of the present invention. 本発明の実施の形態3に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit which concerns on Embodiment 3 of this invention. 本発明の実施の形態4に係る誤動作判定回路の前提となる回路図である。It is a circuit diagram used as the premise of the malfunction determination circuit based on Embodiment 4 of this invention. 本発明の実施の形態4に係る誤動作判定回路の回路図である。It is a circuit diagram of the malfunction determination circuit based on Embodiment 4 of this invention. 本発明の実施の形態4に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit which concerns on Embodiment 4 of this invention. メタステーブルを説明するための概略図である。It is the schematic for demonstrating a metastable. 本発明の実施の形態5に係る誤動作判定回路の回路図である。FIG. 10 is a circuit diagram of a malfunction determination circuit according to a fifth embodiment of the present invention. 本発明の実施の形態5に係るメタスタビリティ検出回路の回路図である。FIG. 10 is a circuit diagram of a metastability detection circuit according to a fifth embodiment of the present invention. 本発明の実施の形態5に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit based on Embodiment 5 of this invention. 本発明の実施の形態6に係る誤動作判定回路の前提となる回路図である。It is a circuit diagram used as the premise of the malfunction determination circuit based on Embodiment 6 of this invention. スラック量とパス量との関係を示す図である。It is a figure which shows the relationship between slack amount and pass amount. 本発明の実施の形態6に係る誤動作判定回路の回路図である。It is a circuit diagram of the malfunction determination circuit based on Embodiment 6 of this invention. 本発明の実施の形態6に係る誤動作判定回路を複数設けた場合の構成を示す回路図である。It is a circuit diagram which shows the structure at the time of providing the several malfunction determination circuit based on Embodiment 6 of this invention. 本発明の実施の形態6に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit based on Embodiment 6 of this invention. 本発明の実施の形態6に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit based on Embodiment 6 of this invention. 本発明の実施の形態6に係る誤動作判定回路を複数設けた場合の別の構成を示す回路図である。It is a circuit diagram which shows another structure at the time of providing the several malfunction determination circuit based on Embodiment 6 of this invention. 本発明の実施の形態6に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit based on Embodiment 6 of this invention. ホールド違反を説明するための図である。It is a figure for demonstrating a hold violation. ホールド違反を説明するための図である。It is a figure for demonstrating hold violation. ホールド違反の対策を説明するための図である。It is a figure for demonstrating the countermeasure of a hold violation. 本発明の実施の形態7に係る誤動作判定回路の回路図である。It is a circuit diagram of a malfunction determination circuit according to a seventh embodiment of the present invention. 本発明の実施の形態7に係る誤動作判定回路の回路図である。It is a circuit diagram of a malfunction determination circuit according to a seventh embodiment of the present invention. ホールド違反が生じた誤動作判定回路のタイミングチャートである。6 is a timing chart of a malfunction determination circuit in which a hold violation has occurred. 本発明の実施の形態7に係る誤動作判定回路のタイミングチャートである。It is a timing chart of the malfunction determination circuit based on Embodiment 7 of this invention. 本発明の実施の形態8に係るアルゴリズムを説明するためのフローチャートである。It is a flowchart for demonstrating the algorithm which concerns on Embodiment 8 of this invention. 本発明の実施の形態8に係るアルゴリズムによりグルーピングされた遅延パスを説明するための図である。It is a figure for demonstrating the delay path grouped by the algorithm which concerns on Embodiment 8 of this invention. 本発明の実施の形態8に係るアルゴリズムの効果を説明するための模式図である。It is a schematic diagram for demonstrating the effect of the algorithm which concerns on Embodiment 8 of this invention. 本発明の実施の形態8に係るアルゴリズムの効果を説明するための模式図である。It is a schematic diagram for demonstrating the effect of the algorithm which concerns on Embodiment 8 of this invention.

符号の説明Explanation of symbols

1,30 バッファ、2,21,50 選択回路、3,31,56 比較器、4,20,22,42,43 AND回路、5,6,7 MUX、10 デジタル回路、11 クロック発生装置、12 レギュレータ、13 制御回路、14 メモリ、40,51 OR回路、41 微分回路、60 遅延手段、50 メタスタビリティ検出回路、52,54 PMOS、53,55 NMOS、56 XOR回路。   1,30 buffer, 2,21,50 selection circuit, 3,31,56 comparator, 4,20,22,42,43 AND circuit, 5,6,7 MUX, 10 digital circuit, 11 clock generator, 12 Regulator, 13 Control circuit, 14 Memory, 40, 51 OR circuit, 41 Differentiation circuit, 60 Delay means, 50 Metastability detection circuit, 52, 54 PMOS, 53, 55 NMOS, 56 XOR circuit.

Claims (12)

複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、
前記判定回路は、
前記論理回路からのデータをクロック信号の所定のタイミングで取り込む第1レジスタと、
前記クロック信号を遅延させる遅延手段と、
前記遅延手段を経た前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器と、
前記比較器の比較結果を保持させつつ、前記第2レジスタをシフトレジスタ化して前記第2レジスタで保持した前記エラー信号を次段へ伝搬させるスキャン化手段とを備える半導体装置。
A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
The determination circuit includes:
A first register for fetching data from the logic circuit at a predetermined timing of a clock signal;
Delay means for delaying the clock signal;
A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means;
A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
A semiconductor device comprising: scanning means for holding the comparison result of the comparator while shifting the second register to a shift register and propagating the error signal held in the second register to the next stage.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
イネーブル信号に基づきクロック信号の伝送を制御する第1クロック制御手段と、  First clock control means for controlling transmission of the clock signal based on the enable signal;
前記論理回路からのデータを前記第1クロック制御手段で制御された前記クロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of the clock signal controlled by the first clock control means;
前記クロック信号を遅延させる遅延手段と、  Delay means for delaying the clock signal;
前記イネーブル信号に基づき前記遅延手段を経た前記クロック信号の伝送を制御する第2クロック制御手段と、  Second clock control means for controlling transmission of the clock signal through the delay means based on the enable signal;
前記第2クロック制御手段で制御された前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal controlled by the second clock control means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器と、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
前記第2クロック制御手段に入力する前記イネーブル信号のラインに挿入し、前記遅延手段を経た前記クロック信号にグリッジが乗ることを防ぐフェールセーフ回路と、  A fail-safe circuit that is inserted into the line of the enable signal that is input to the second clock control means and prevents the glitch from riding on the clock signal that has passed through the delay means;
前記第2クロック制御手段の前段に挿入し、前記イネーブル信号のイベント内容を判定する第3レジスタとを備える半導体装置。  A semiconductor device comprising: a third register that is inserted before the second clock control means and determines the event content of the enable signal.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
イネーブル信号に基づきクロック信号の伝送を制御する第1クロック制御手段と、  First clock control means for controlling transmission of the clock signal based on the enable signal;
前記論理回路からのデータを前記第1クロック制御手段で制御された前記クロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of the clock signal controlled by the first clock control means;
前記クロック信号を遅延させる第1遅延手段と、  First delay means for delaying the clock signal;
前記イネーブル信号に基づき前記第1遅延手段を経た前記クロック信号の伝送を制御する第2クロック制御手段と、  Second clock control means for controlling transmission of the clock signal through the first delay means based on the enable signal;
前記第2クロック制御手段で制御された前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal controlled by the second clock control means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器とを備え、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
同一の前記イネーブル信号で前記クロック信号が制御される複数の前記判定回路に対して、前記イネーブル信号のセットアップ違反を検出する検出回路をさらに備えることを特徴とする半導体装置。  A semiconductor device, further comprising: a detection circuit that detects a setup violation of the enable signal for a plurality of the determination circuits whose clock signals are controlled by the same enable signal.
請求項3に記載の半導体装置であって、The semiconductor device according to claim 3,
前記検出回路は、  The detection circuit includes:
前記イネーブル信号を前記クロック信号の所定のタイミングで取り込む第3レジスタと、  A third register for capturing the enable signal at a predetermined timing of the clock signal;
前記クロック信号を遅延させる第2遅延手段と、  Second delay means for delaying the clock signal;
前記第2遅延手段を経た前記クロック信号の所定のタイミングで前記イネーブル信号を取り込む、前記第3レジスタと論理等価な第4レジスタとを備えることを特徴とする半導体装置。  A semiconductor device comprising: a fourth register that is logically equivalent to the third register that takes in the enable signal at a predetermined timing of the clock signal that has passed through the second delay means.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
前記論理回路からのデータをクロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of a clock signal;
前記クロック信号を遅延させる遅延手段と、  Delay means for delaying the clock signal;
前記遅延手段を経た前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器と、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
前記エラー信号に基づき第1レジスタの出力又は第2レジスタの出力のいずれかを選択し、次段の前記論理回路に伝搬する選択回路と、  A selection circuit that selects either the output of the first register or the output of the second register based on the error signal and propagates to the logic circuit in the next stage;
前記エラー信号のグリッジをフィルタリングし、且つ前記エラー信号の立ち上がりエッジを検出して、前記クロック信号を所定の期間停止するように制御する微分回路とを備える半導体装置。  A semiconductor device comprising: a differential circuit that filters a glitch of the error signal, detects a rising edge of the error signal, and controls the clock signal to stop for a predetermined period.
請求項5に記載の半導体装置であって、The semiconductor device according to claim 5,
前記微分回路が前記クロック信号を制御するディテクト信号と、前記論理回路へデータの伝搬を要求する制御信号とをハンドシェイクして、前記クロック信号の停止期間中に前記データ信号のイベントが生じないように制御するフェールセーフ手段をさらに備えることを特徴とする半導体装置。  The differentiating circuit handshakes a detect signal for controlling the clock signal and a control signal for requesting data propagation to the logic circuit so that the event of the data signal does not occur during the stop period of the clock signal. A semiconductor device further comprising fail-safe means for controlling the semiconductor device.
請求項5又は請求項6に記載の半導体装置であって、The semiconductor device according to claim 5 or 6, wherein
前記第1レジスタの後段に、メタステーブルを検出するメタスタビリティ検出回路をさらに備え、  A metastability detection circuit for detecting metastable at a stage subsequent to the first register;
前記メタスタビリティ検出回路の出力に基づき、前記メタステーブルの検出時に前記判定回路が常に誤動作と判定させることを特徴とする半導体装置。  2. A semiconductor device according to claim 1, wherein when the metastable is detected, the determination circuit always determines a malfunction based on an output of the metastability detection circuit.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
前記論理回路からのデータをクロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of a clock signal;
前記クロック信号を遅延させる遅延手段と、  Delay means for delaying the clock signal;
前記遅延手段を経た前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器と、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
前記第1レジスタの後段に、メタステーブルを検出するメタスタビリティ検出回路とを備え、  A metastability detection circuit for detecting metastable at a subsequent stage of the first register;
前記メタスタビリティ検出回路の出力に基づき、前記メタステーブルの検出時に前記判定回路が常に誤動作と判定させることを特徴とする半導体装置。  2. A semiconductor device according to claim 1, wherein when the metastable is detected, the determination circuit always determines a malfunction based on an output of the metastability detection circuit.
請求項7又は請求項8に記載の半導体装置であって、A semiconductor device according to claim 7 or claim 8, wherein
前記メタスタビリティ検出回路は、  The metastability detection circuit includes:
第1PMOSと前記第1PMOSより閾値の高い第2NMOSとで構成された第1インバータと、  A first inverter composed of a first PMOS and a second NMOS having a threshold higher than that of the first PMOS;
第3PMOSと前記第3PMOSより閾値の低い第4NMOSとで構成された第2インバータと、  A second inverter composed of a third PMOS and a fourth NMOS having a lower threshold than the third PMOS;
前記第1インバータの出力と、前記第2インバータの出力とのXORを演算する論理回路とを備えることを特徴とする半導体装置。  A semiconductor device comprising: a logic circuit that performs an XOR operation between the output of the first inverter and the output of the second inverter.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
前記論理回路からのデータをクロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of a clock signal;
前記クロック信号を遅延させる遅延手段と、  Delay means for delaying the clock signal;
前記遅延手段を経た前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器とを備え、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
前記遅延手段の遅延量が制御可能な単位で複数の前記判定回路をグルーピングし、各グループに属する前記判定回路に応じた遅延量の前記遅延手段を設けることを特徴とする半導体装置。  A semiconductor device, wherein a plurality of the determination circuits are grouped in a unit in which a delay amount of the delay means can be controlled, and the delay means having a delay amount corresponding to the determination circuits belonging to each group is provided.
複数の論理回路と、前記論理回路からのデータに基づき誤動作判定を行う複数の判定回路とを備える半導体装置であって、A semiconductor device comprising a plurality of logic circuits and a plurality of determination circuits that perform malfunction determination based on data from the logic circuits,
前記判定回路は、  The determination circuit includes:
前記論理回路からのデータをクロック信号の所定のタイミングで取り込む第1レジスタと、  A first register for fetching data from the logic circuit at a predetermined timing of a clock signal;
前記クロック信号を遅延させる遅延手段と、  Delay means for delaying the clock signal;
前記遅延手段を経た前記クロック信号の所定のタイミングで前記論理回路からのデータを取り込む、前記第1レジスタと論理等価な第2レジスタと、  A second register that is logically equivalent to the first register, fetches data from the logic circuit at a predetermined timing of the clock signal that has passed through the delay means;
前記第1レジスタの出力と前記第2レジスタの出力との比較を行い、エラー信号を出力する比較器とを備え、  A comparator that compares the output of the first register with the output of the second register and outputs an error signal;
前記判定回路の前段において、ホールド違反が生じるパス上にロックアップラッチ又は反転フリップ−フロップ回路を挿入することを特徴とする半導体装置。  A semiconductor device, wherein a lock-up latch or an inversion flip-flop circuit is inserted on a path in which a hold violation occurs before the determination circuit.
請求項10に記載の半導体装置であって、The semiconductor device according to claim 10,
前記グルーピングは、  The grouping is
パス毎のネガティブスラック量から最大値と最小値を算出し、  Calculate the maximum and minimum values from the negative slack amount for each pass,
前記最大値から選択値までのグループと、前記選択値から前記最小値までのグループとに分割して、各グループにおいて前記選択値又は前記最小値までの差分の合計を求め、前記合計の和を評価関数とし、  Dividing into a group from the maximum value to the selected value and a group from the selected value to the minimum value, find the sum of the differences from the selected value or the minimum value in each group, and sum the sum As an evaluation function,
前記評価関数が最小となる前記選択値を求め、  Obtaining the selected value that minimizes the evaluation function;
最小となる前記選択値に所定の重み付けした処理値を分割前の設定値と比較し、大きければ当該分割を止め、小さければ当該分割を承認して前記設定値を前記処理値に更新し、  Compare the processing value weighted with a predetermined weight on the selection value that is the minimum, and stop the division if it is large, if it is small, approve the division and update the setting value to the processing value,
分割した各グループに対して所定の条件まで再帰的に分割を繰り返すことで複数のグループを形成することを特徴とする半導体装置。  A semiconductor device, wherein a plurality of groups are formed by recursively dividing the divided groups up to a predetermined condition.
JP2008025436A 2007-07-17 2008-02-05 Semiconductor device Expired - Fee Related JP5107080B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2008025436A JP5107080B2 (en) 2007-07-17 2008-02-05 Semiconductor device
US12/171,606 US7827454B2 (en) 2007-07-17 2008-07-11 Semiconductor device
US12/899,978 US7913139B2 (en) 2007-07-17 2010-10-07 Semiconductor device
US13/026,660 US8028210B2 (en) 2007-07-17 2011-02-14 Semiconductor device
US13/206,272 US20110296260A1 (en) 2007-07-17 2011-08-09 Semiconductor device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007185270 2007-07-17
JP2007185270 2007-07-17
JP2008025436A JP5107080B2 (en) 2007-07-17 2008-02-05 Semiconductor device

Publications (2)

Publication Number Publication Date
JP2009044709A JP2009044709A (en) 2009-02-26
JP5107080B2 true JP5107080B2 (en) 2012-12-26

Family

ID=40444896

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008025436A Expired - Fee Related JP5107080B2 (en) 2007-07-17 2008-02-05 Semiconductor device

Country Status (1)

Country Link
JP (1) JP5107080B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2944620B1 (en) * 2009-04-20 2015-04-17 Commissariat Energie Atomique DEVICE FOR MONITORING THE OPERATION OF A DIGITAL CIRCUIT
CN102708816B (en) * 2012-03-02 2013-06-12 京东方科技集团股份有限公司 Shift register, grid driving device and display device
JP5881585B2 (en) 2012-11-27 2016-03-09 株式会社東芝 Analog to digital converter
KR102112367B1 (en) * 2013-02-12 2020-05-18 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
CN110350902B (en) * 2019-07-18 2023-01-17 重庆惠科金扬科技有限公司 Anti-misoperation circuit and anti-misoperation device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000331499A (en) * 1999-05-17 2000-11-30 Nec Eng Ltd Memory test circuit and semiconductor integrated circuit
US6985547B2 (en) * 1999-09-27 2006-01-10 The Board Of Governors For Higher Education, State Of Rhode Island And Providence Plantations System and method of digital system performance enhancement
JP2002350509A (en) * 2001-05-30 2002-12-04 Nec Corp Semiconductor device
JP2005214732A (en) * 2004-01-28 2005-08-11 Sony Corp Critical path evaluation method and delay-condition measurement circuit, and lsi manufacturing method
JP4798999B2 (en) * 2005-01-21 2011-10-19 パナソニック株式会社 Semiconductor integrated circuit
JP2008042367A (en) * 2006-08-03 2008-02-21 Renesas Technology Corp Semiconductor device

Also Published As

Publication number Publication date
JP2009044709A (en) 2009-02-26

Similar Documents

Publication Publication Date Title
US8028210B2 (en) Semiconductor device
KR101312978B1 (en) Critical-path circuit for performance monitoring
US8125246B2 (en) Method and apparatus for late timing transition detection
JP5317356B2 (en) Clock control signal generation circuit, clock selector, and information processing apparatus
JP5107080B2 (en) Semiconductor device
CN113835012A (en) Timing error detection and correction circuit
JP2008042367A (en) Semiconductor device
JP2003316736A (en) Usb circuit and data structure
US6698005B2 (en) Min-time / race margins in digital circuits
US20090271747A1 (en) Logic circuit designing device, logic circuit designing method and logic circuit designing program for asynchronous logic circuit
JP3990250B2 (en) Automatic design system and automatic design method
JP4702137B2 (en) Flip-flop for scan test
Verma et al. Understanding clock domain crossing issues
US20100316142A1 (en) Semiconductor integrated circuit and designing method thereof
Sharif et al. Quantitative analysis of state-of-the-art synchronizers: Clock domain crossing perspective
WO2022152032A1 (en) Test circuit, test method, and computing system comprising test circuit
WO2009084396A1 (en) Delay monitor circuit and delay monitor method
WO2003038687A2 (en) Optimization of the design of a synchronous digital circuit
Poornima et al. Functional verification of clock domain crossing in register transfer level
JP2012159371A (en) Scan chain circuit, scan chain construction method, and test device
JP5145167B2 (en) Clock domain check method, clock domain check program, and recording medium
JP2013036960A (en) Delay scan test method, semiconductor device, and semiconductor device design method
JP2004326222A (en) Data processing system
JP6303509B2 (en) Circuit verification method and circuit verification program
JP7354815B2 (en) Verification support device, verification support method, and verification support program

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100524

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101105

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120907

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121002

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121003

R150 Certificate of patent or registration of utility model

Ref document number: 5107080

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151012

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees