Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0797330B2 - Diagnostic circuit - Google Patents
[go: Go Back, main page]

JPH0797330B2 - Diagnostic circuit - Google Patents

Diagnostic circuit

Info

Publication number
JPH0797330B2
JPH0797330B2 JP60145200A JP14520085A JPH0797330B2 JP H0797330 B2 JPH0797330 B2 JP H0797330B2 JP 60145200 A JP60145200 A JP 60145200A JP 14520085 A JP14520085 A JP 14520085A JP H0797330 B2 JPH0797330 B2 JP H0797330B2
Authority
JP
Japan
Prior art keywords
flip
flop
cpu
output
terminal
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 - Lifetime
Application number
JP60145200A
Other languages
Japanese (ja)
Other versions
JPS626337A (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.)
Nippon Signal Co Ltd
Original Assignee
Nippon Signal Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Signal Co Ltd filed Critical Nippon Signal Co Ltd
Priority to JP60145200A priority Critical patent/JPH0797330B2/en
Publication of JPS626337A publication Critical patent/JPS626337A/en
Publication of JPH0797330B2 publication Critical patent/JPH0797330B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、CPU(中央処理装置)の制御で動作するシス
テムにおいて、プログラムやハード ウェアの正常・異
常を診断する診断回路に関し、詳しくは、所定の動作を
行っている限りにおいては交番出力を得、異常な場合は
交番出力が断となることでフエイルセーフに構成された
診断回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a diagnostic circuit for diagnosing normality / abnormality of a program or hardware in a system operating under the control of a CPU (central processing unit), and more specifically, to a predetermined circuit. The present invention relates to a fail-safe diagnostic circuit in which an alternating output is obtained as long as an operation is performed, and the alternating output is cut off when an abnormality occurs.

従来の技術 従来におけるCPU制御のシステムにおいて、各部の動作
が正常か否かを診断監視する場合、CPUの扱うデータが
正常であるか異常であるかを診断するためには、(デー
タ)診断回路が用いられている。ちなみに、このデータ
診断回路は、中央処理装置がメモリ等からデータを読み
取り、書き込みの動作をするたびに該データを1キャラ
クタ比較するもので、該比較は順次に各ビット毎に行わ
れる。このような回路としては、例えば双方向シフトレ
ジスタを用いた振子回路を利用して高速にデータの照査
を行う回路が提案されている。
2. Description of the Related Art In a conventional CPU control system, when diagnosing and monitoring whether or not the operation of each part is normal, in order to diagnose whether the data handled by the CPU is normal or abnormal, a (data) diagnostic circuit is used. Is used. By the way, this data diagnostic circuit compares the data by one character each time the central processing unit reads the data from the memory or the like and writes the data, and the comparison is sequentially performed for each bit. As such a circuit, for example, a circuit has been proposed in which a pendulum circuit using a bidirectional shift register is used to check data at high speed.

発明が解決しようとする問題点 上述の様なデータ自体の診断に加え、システム全体の制
御を監視することは、システムの更なる信頼性の向上に
寄与する。本願発明はこのような観点に立ちシステムの
制御を診断可能な(システム)診断回路を提供すること
を目的とする。
Problems to be Solved by the Invention In addition to the diagnosis of the data itself as described above, monitoring the control of the entire system contributes to further improvement of the reliability of the system. An object of the present invention is to provide a (system) diagnostic circuit capable of diagnosing the control of the system from such a viewpoint.

問題点を解決するための手段 上記目的を達成するために本願発明では診断回路を、 入力端子(D)と出力端子(Q)及びクロック端子(C
K)を具備した所定数のフリツプフロツプ(FF1,FF2,FF
3,FF4)と、初期値設定手段(INI)を有し、初期値設定
手段(INI)が、システム始動時に少なくとも1つのフ
リツプフロツプが他のフリツプフロツプと異なっている
所定の論理値群を各フリツプフロツプ(FF1,FF2,FF3,FF
4)に記憶させるものであり、各フリツプフロツプ(FF
1,FF2,FF3,FF4)夫々が、出力端子(Q)を次段のフリ
ツプフロツプの入力端子(D)に順次入力して一巡しル
ープを形成しており、各フリツプフロツプ(FF1,FF2,FF
3,FF4)のクロック端子(CK)には、CPUの並列データ出
力端子群の異なる出力端子が個々に接続された構成と
し、プログラムの進行に沿って各部の診断その他の制御
過程の間に複数箇所設定され設置位置毎に応じて固有に
定まりCPUでのシステム各部の診断結果が正常であるこ
とに基づきCPUより出力されて各フリツプフロツプ(FF
1,FF2,FF3,FF4)の中で設定位置に対応するフリツプフ
ロツプのみを移送動作させるための制御データが前記各
クロック端子(CK)に順に入力され、正常動作時にのみ
順次繰り返して入力される一連一組の前記制御データ群
に基づき、初期値設定手段(INI)が設定した各フリツ
プフロツプ(FF1,FF2,FF3,FF4)の記憶する論理値の配
置が正常動作時にのみ順序を保って順次移送されて一定
周期で循環し、任意のフリツプフロツプ(FF1,FF2,FF3,
FF4)で正常動作時にみ得られる交番出力をシステム正
常時に対応付けた診断出力として用いる。
Means for Solving the Problems In order to achieve the above object, in the present invention, a diagnostic circuit includes an input terminal (D), an output terminal (Q), and a clock terminal (C
K) equipped with a certain number of flip flops (FF1, FF2, FF
3, FF4) and an initial value setting means (INI), and the initial value setting means (INI) provides a predetermined logical value group in which at least one flipflop is different from other flipflops at the time of system startup. FF1, FF2, FF3, FF
4) is stored in each flip-flop (FF
1, FF2, FF3, FF4) each sequentially input the output terminal (Q) to the input terminal (D) of the flip-flop of the next stage to form a loop, and each flip-flop (FF1, FF2, FF4)
3, FF4) clock terminals (CK) are configured so that different output terminals of the CPU parallel data output terminal group are individually connected. The location is set and determined uniquely for each installation position, and is output from the CPU based on the fact that the diagnostic results of each part of the system in the CPU are normal.
1, FF2, FF3, FF4) control data for moving only the flip flops corresponding to the set position are sequentially input to each clock terminal (CK), and are sequentially input only during normal operation. Based on one set of the control data group, the arrangement of the logical values stored by each flip-flop (FF1, FF2, FF3, FF4) set by the initial value setting means (INI) is sequentially transferred only in normal operation. Cycle at a fixed cycle, and any flip-flop (FF1, FF2, FF3,
In FF4), the alternating output obtained during normal operation is used as the diagnostic output associated with normal system operation.

作 用 初期値設定手段(INI)が、所定フリツプフロツプに他
のフリツプフロツプと異なる論理値群を記憶させ、ルー
プ状に接続された各フリツプフロツプ(FF1,FF2,FF3,FF
4)に2種の論理値が隣接する。
The operation initial value setting means (INI) stores a logical value group different from other flip flops in a predetermined flip flop, and each flip flop (FF1, FF2, FF3, FF) connected in a loop.
Two kinds of logical values are adjacent to 4).

続く制御プログラム中で、CPUの並列データ出力端子に
所定の出力を送出することにより、上記隣接した異なる
論理値の配置を各フリツプフロツプ(FF1,FF2,FF3,FF
4)を順次移送し循環するように制御すれば、任意のフ
リツプフロツプの出力には交番出力が得られるから、こ
の交番出力が消滅することに依り制御プログラムの不具
合を検出することができる。制御プログラムとは独立し
て本願発明装置を構成する各部の故障に対しても前記交
番出力が消滅するので、フエイルセーフな特性を持つ。
In the subsequent control program, by sending a predetermined output to the parallel data output terminal of the CPU, the arrangement of the different logic values adjacent to each other can be set to each flip-flop (FF1, FF2, FF3, FF).
By controlling 4) to be sequentially transferred and circulated, an alternating output can be obtained as an output of an arbitrary flip-flop, so that a defect in the control program can be detected by the disappearance of the alternating output. Independent of the control program, the alternating output disappears even in the case of a failure of each part constituting the device of the present invention, so that it has a fail-safe characteristic.

実施例 以下、本願発明を実施例に基づき図面に沿って説明す
る。
Examples Hereinafter, the present invention will be described based on examples with reference to the drawings.

第1図は、本願発明の、適宜のCPU制御システムを診断
するための診断回路の一実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing an embodiment of a diagnostic circuit for diagnosing an appropriate CPU control system according to the present invention.

実施例の診断回路は、1つのラッチ回路(L)と、4つ
のフリツプフロツプ(FF1,FF2,FF3,FF4)と、分周回路
(FD)とから構成されている。各フリツプフロツプ(FF
1,FF2,FF3,FF4)は、入力端子(D)と出力端子(Q)
とクロック端子(CK)及びセット端子(S)とリセット
端子(R)を具備している。
The diagnostic circuit of the embodiment is composed of one latch circuit (L), four flip-flops (FF1, FF2, FF3, FF4) and a frequency dividing circuit (FD). Each flip (FF
1, FF2, FF3, FF4) are input terminal (D) and output terminal (Q)
And a clock terminal (CK), a set terminal (S) and a reset terminal (R).

各フリツプフロツプの入出力は直列に多段式に接続され
ている。即ち、例えばフリツプフロツプ(FF1)の出力
端子(Q)は次段のフリツプフロツプ(FF2)の入力端
子(D)に接続されており、以下同様に各フリツプフロ
ツプの出力端子(Q)を次段のフリツプフロツプの入力
端子(D)に順次入力して最終段のフリツプフロツプ
(FF4)の出力端子(Q)は診断出力として分周回路(F
D)に入力されるとともに1段目のフリツプフロツプ(F
F1)の入力端子(D)に帰還するように入力され一巡し
てループを形成している。
The input and output of each flip-flop are connected in series in a multistage manner. That is, for example, the output terminal (Q) of the flip-flop (FF1) is connected to the input terminal (D) of the flip-flop (FF2) of the next stage. The output terminal (Q) of the flip-flop (FF4) at the final stage is sequentially input to the input terminal (D) and the frequency divider (F
D) and the first stage flip-flop (F
It is input so as to be fed back to the input terminal (D) of F1) and makes a loop to form a loop.

各フリツプフロツプ(FF1,FF2,FF3,FF4)は、クロック
端子(CK)にクロック信号が入力された場合に入力端子
(D)に入力されている内容を記憶するとともに出力端
子(Q)より入力する、いわゆるクロック動作をするも
ので、各フリツプフロツプ(FF1,FF2,FF3,FF4)の各ク
ロック端子(CK)には、ラッチ回路(L)を介してCPU
の並列データ出力端子群の異なる出力端子が個々に接続
されており独立して駆動することが可能である。従っ
て、CPUのデータ出力に応じて各フリツプフロツプ(FF
1,FF2,FF3,FF4)が任意の組合せで動作可能となってい
る。
Each flip-flop (FF1, FF2, FF3, FF4) stores the content input to the input terminal (D) when the clock signal is input to the clock terminal (CK) and inputs it from the output terminal (Q). , So-called clock operation, each clock terminal (CK) of each flip-flop (FF1, FF2, FF3, FF4) is connected to the CPU via a latch circuit (L).
Different output terminals of the parallel data output terminal group are connected to each other and can be driven independently. Therefore, each flip-flop (FF
1, FF2, FF3, FF4) can operate in any combination.

各フリツプフロツプ(FF1,FF2,FF3,FF4)は、セット端
子(S)及びリセット端子(R)も有しており、これら
の端子(S,R)に入力があった場合には強制的に対応し
た出力となる。実施例回路では、両端子に初期値設定手
段(INI)が接続されている。
Each flip-flop (FF1, FF2, FF3, FF4) also has a set terminal (S) and a reset terminal (R), and if there is an input to these terminals (S, R), it is forcibly supported. Output. In the embodiment circuit, initial value setting means (INI) is connected to both terminals.

初期値設定手段(INI)は、システム始動時にのみ各フ
リツプフロツプに所定の論理値(後述する)を記憶させ
るものであり、図示の例ではフリツプフロツプ(FF1)
のリセット端子(R)と残るフリツプフロツプ(FF2,FF
3,FF4)のセット端子(S)は常時電源に接続(プルア
ップ)して論理値“1"(“H")が入力されており、フリ
ツプフロツプ(FF1)のセット端子(S)と残るフリツ
プフロツプ(FF2,FF3,FF4)のリセット端子(R)には
同一の負論理信号(RST)がシステム起動時に入力し、
各フリツプフロツプ(FF1,FF2,FF3,FF4)の保持論理値
を順に、“1",“0",“0",“0"へと強制的にセットす
る。なお、初期値設定手段が入力するこの初期値は本願
発明の主旨に合わせるため少なくとも1つのフリツプフ
ロツプが他のフリツプフロツプと異なっている、換言す
ると全て同一の論理値ではないことが必要である。
The initial value setting means (INI) stores a predetermined logical value (described later) in each flip-flop only when the system is started. In the illustrated example, the flip-flop (FF1) is stored.
Reset terminal (R) and the remaining flip-flop (FF2, FF
The set terminal (S) of (3, FF4) is always connected (pulled up) to the power supply and the logical value "1"("H") is input, and the set terminal (S) of the flip-flop (FF1) and the remaining flip-flop. The same negative logic signal (RST) is input to the reset terminal (R) of (FF2, FF3, FF4) at system startup,
The held logical values of each flip-flop (FF1, FF2, FF3, FF4) are forcibly set to "1", "0", "0", "0" in order. The initial value input by the initial value setting means must be different from at least one flipflop in order to conform to the gist of the present invention. In other words, it is necessary that they are not all the same logical value.

(CPU)はマイクロプロセッサ等の中央処理装置であっ
て、4ビットのデータ信号(D1,D2,D3,D4)を前記ラッ
チ回路(L)に入力することができ、従って4ビットの
内容に応じて4つのクロック信号(CK)を個別に制御し
前記各フリツプフロツプ(FF1,FF2,FF3,FF4)を独立し
て駆動することが可能である。この様に、本願発明の診
断回路は、CPUからの出力に応じてループ状に直列接続
されたフリツプフロツプ回路を個別にクロック動作させ
ることが可能に構成されている。この様な構成により、
後述するように、CPUからの所定データ信号出力とあい
まって意図通りのシステム診断の目的を達成することが
できる。
(CPU) is a central processing unit such as a microprocessor, which can input 4-bit data signals (D1, D2, D3, D4) to the latch circuit (L), and accordingly, depending on the contents of 4 bits. 4 flip-flops (FF1, FF2, FF3, FF4) can be independently driven by individually controlling four clock signals (CK). As described above, the diagnostic circuit of the present invention is configured so that the flip-flop circuits connected in series in a loop form can be individually clocked according to the output from the CPU. With such a configuration,
As will be described later, the intended purpose of system diagnosis can be achieved together with the output of a predetermined data signal from the CPU.

以下、本願発明の診断回路を適切に利用するためのCPU
側の制御と合わせて実施例回路の作用を詳述する。
Hereinafter, a CPU for appropriately using the diagnostic circuit of the present invention
The operation of the embodiment circuit will be described in detail together with the control on the side.

本願発明の診断回路を運用するには、ループ状に接続さ
れた各フリツプフロツプに保持された全て同一ではな
い、換言すると接続順に対して不連続な論理値を、その
順序を保ったままループ内で順に巡回させるようにCPU
側からのデータ出力をビット毎に各フリツプフロツプの
クロック信号に対応させて出力する過程を一定周期で繰
返し含むようにCPUのシステム制御を行い、各フリツプ
フロツプのうち任意のフリツプフロツプの出力を診断出
力として、この診断出力が交番出力である場合に制御が
正常に行われているものとし一定出力(交番出力無し)
となった異常時を検出することでシステムの診断を行
う。
In order to operate the diagnostic circuit of the present invention, all the flip-flops connected in a loop are not all the same, in other words, the logical values discontinuous with respect to the connection order are kept in the loop while maintaining the order. CPU to cycle in order
The system control of the CPU is performed so that the process of outputting the data output from the side for each bit corresponding to the clock signal of each flip-flop is repeatedly included at a fixed cycle, and the output of any flip-flop among each flip-flop is used as the diagnostic output. If this diagnostic output is an alternating output, it is assumed that the control is operating normally and a constant output (no alternating output)
The system is diagnosed by detecting the occurrence of abnormalities.

即ち、前述実施例の診断回路を例にシステム制御の一例
について説明すると、CPU側では、システム各部の制御
や構成する各部の診断等の制御過程の間に上述した診断
回路を一定周期で所定順序で駆動する過程を含ませる。
以下の例では例えば前記各部の診断結果に対応して各部
の診断結果が正常な場合にのみ一定周期で駆動するよう
に制御することで上述した診断回路により、システムの
診断のみならず併せて各部の個別診断結果が異常な場合
にも交番出力が断となり異常出力が得られる例を説明す
る。
That is, an example of system control will be described by taking the diagnostic circuit of the above-described embodiment as an example.On the CPU side, the diagnostic circuit described above is controlled in a predetermined order during a control process such as control of each part of the system and diagnosis of each part constituting the system. The process of driving with is included.
In the following example, for example, the above-mentioned diagnostic circuit controls not only the system diagnosis but also each part by controlling the driving so as to be driven in a constant cycle only when the diagnosis result of each part is normal, corresponding to the diagnosis result of each part. An example will be described in which the alternating output is cut off and an abnormal output is obtained even when the individual diagnosis result of is abnormal.

このような診断のために、実施例回路では、例えば前記
中央処理回路(CPU)からのデータ信号(D1〜D4)に対
応するクロック信号がラッチ回路(L)より前記各フリ
ツプフロツプ(FF1〜FF4)のクロック信号端子(CK)に
入力される。該ラッチ回路(L)より出力されるクロッ
ク信号は、前述したようなメモリやタイマ等のテストの
順序により、またテストの結果(部分診断結果)に対応
して、定められたフリツプフロツプにのみクロックパル
スが出力するようにプログラムでセットされており、テ
ストの結果が正常でありかつプログラムの動作が正常で
あれば、例えばフリツプフロツプ(FF1)にセットされ
た真理値“1"が次の段のフリツプフロツプ(FF2)に移
動し、次のテストの後にそのテスト順序及びテスト結果
に対応するCPUからのデータ信号(所定フリツプフロツ
プに対するクロック信号)に基づきフリツプフロツプ
(FF2)にセットされた真理値“1"が次の段のフリツプ
フロツプ(FF3)に移動していくようになっている。す
なわち、各種のテスト結果を反映した信号であるラッチ
回路(L)を介したCUPから出力される所定のクロック
信号に基づいてフリツプフロツプは次の段のフリツプフ
ロツプに“1"を順次シフトするよう予めプログラム化さ
れている。このように、本発明では、フリツプフロツプ
のクロック端子に、プログラムに進行に沿って各部の診
断その他の制御過程の間に複数箇所設定され設定位置毎
に応じて固有に定まりCPUでのシステム各部の診断結果
が正常であることに基づきCPUより出力されて各フリツ
プフロツプ(FF1,FF2,FF3,FF4)の中で設定位置に対応
するフリツプフロツプのみを移送動作させるための制御
データが前記各クロック端子(CK)に順に入力され、正
常動作時にのみ順次繰り返して入力される一連一組の前
記制御データ群に基づき、初期値設定手段(INI)が設
定した各フリツプフロツプ(FF1,FF2,FF3,FF4)の記憶
する論理値の配置が正常動作時にのみ順序を保って順次
移送されて一定周期で循環するようになっている。従っ
て部分診断に異常があった場合やプログラムの動作に異
常があった場合は、所定フリツプフロツプに“1"が移送
(セット)されなかったり、またはフリツプフロツプ全
体に“1"がセットされたりして交番出力が断たれること
になる。
For such a diagnosis, in the embodiment circuit, for example, a clock signal corresponding to the data signal (D1 to D4) from the central processing circuit (CPU) is supplied from the latch circuit (L) to each of the flip-flops (FF1 to FF4). It is input to the clock signal terminal (CK) of. The clock signal output from the latch circuit (L) is a clock pulse only for a predetermined flip-flop in accordance with the test order of the memory and the timer as described above and corresponding to the test result (partial diagnosis result). If the test result is normal and the program operates normally, for example, the truth value “1” set in the flip-flop (FF1) is set to the flip-flop ( FF2), and after the next test, the truth value "1" set in the flip-flop (FF2) based on the data signal (clock signal for a predetermined flip-flop) from the CPU corresponding to the test order and the test result is It is designed to move to the flip-flop (FF3) of the stage. That is, the flip-flop is programmed in advance so as to sequentially shift "1" to the flip-flop of the next stage based on a predetermined clock signal output from the CUP via the latch circuit (L) which is a signal reflecting various test results. Has been converted. As described above, according to the present invention, the clock terminal of the flip-flop is set at a plurality of points during the diagnosis and other control processes of each part along with the progress of the program, and is uniquely determined according to each set position. Based on the result being normal, the CPU outputs the control data for the transfer operation of only the flip-flop corresponding to the set position among the flip-flops (FF1, FF2, FF3, FF4) at each clock terminal (CK). The flip-flops (FF1, FF2, FF3, FF4) set by the initial value setting means (INI) are stored on the basis of a series of a set of the control data that are sequentially input only during normal operation and are repeatedly input only during normal operation. Only when the logical values are arranged normally, the logical values are sequentially transferred in order and are circulated in a constant cycle. Therefore, if there is an abnormality in the partial diagnosis or if there is an abnormality in the operation of the program, "1" is not transferred (set) to the specified flip-flop, or "1" is set to the entire flip-flop and the alternation is performed. The output will be cut off.

次にこの診断回路の動作の一例を第2図及び第3図に基
づいて説明する。
Next, an example of the operation of this diagnostic circuit will be described with reference to FIGS. 2 and 3.

第2図はフリツプフロツプ(FF1)に真理値“1"がある
場合について示している。ステップ1においては(FF
4)の不要な“1"をいわば消去するためラッチ回路
(L)に真理値“0,0,0,1"をセットし、続いてラッチ回
路(L)に真理値“0,0,0,0"をセットする操作をCPUが
データ出力を行うことにより行う。
FIG. 2 shows the case where the flip-flop (FF1) has the truth value "1". In step 1, (FF
To erase the unnecessary "1" in 4), so to speak, set the truth value "0,0,0,1" in the latch circuit (L), and then set the truth value "0,0,0" in the latch circuit (L). The CPU outputs the data to set "0".

この一連の操作により、本来なら(FF1)にあるべき
“1"が、万一(FF4)に残ってしまった場合消去され、
結局、全フリツプフロツプ内の“1"がなくなり、交番出
力は停止することになる。
By this series of operations, if "1" that should originally be in (FF1) should be left in (FF4), it will be erased,
Eventually, the "1" in all flip flops disappears, and the alternating output stops.

次に、ステップ2でフリツプフロツプ(FF1)の正しい
“1"を次段のフリツプフロツプ(FF2)に移動させる。
すなわち、例えばメモリのテストにおいてそのテスト結
果が正常との結果であれば、(FF1)から真理値“1"が
(FF2)にシフトされる。このための操作はCPUがデータ
出力を行うことによりラッチ回路(L)に真理値“1,1,
0,0"をセットし、クロックパルスとして所定フリツプフ
ロツプ即ち(FF1)と(FF2)に与えた後、続いてラッチ
回路(L)に真理値“0,0,0,0"をセットすることにより
行われ、(FF2)に真理値“1"がセットされ、一方(FF
1)は“0"となる。即ち、(FF1)の“1"が(FF2)にシ
フトされたこととなる。
Next, in step 2, the correct "1" of the flip-flop (FF1) is moved to the next flip-flop (FF2).
That is, for example, when the test result of the memory test is normal, the truth value "1" is shifted from (FF1) to (FF2). For this operation, the CPU outputs the truth value “1,1,” to the latch circuit (L) by outputting the data.
By setting 0,0 "and applying it to the predetermined flip-flops (FF1) and (FF2) as a clock pulse, subsequently setting the truth value" 0,0,0,0 "in the latch circuit (L). Is performed and the truth value “1” is set in (FF2), while (FF2)
1) is “0”. That is, "1" of (FF1) is shifted to (FF2).

以上のステップ1と2とで1回の処理、即ち1つの診断
結果に対応するフリツプフロツプ1段分の処理が完了す
る。
By the above steps 1 and 2, one-time processing, that is, one flip-flop processing corresponding to one diagnostic result is completed.

このような操作を各フリツプフロツプに順序だてて行
う。すなわち、(FF2)の操作では、(FF2)にあるべき
“1"がその前段(FF1)にあった場合これを消去するた
め、第3図に示すようにラッチ回路(L)に真理値“1,
0,0,0"をセットした後、真理値“0,0,0,0"をセットし
(FF1)の不当な“1"を消去する(ステップ1)。そし
てステップ2ではラッチ回路(L)に真理値“0,1,1,0"
をセットした後、真理値“0,0,0,0"をセットし(FF2)
の“1"を(FF3)にシフトする。
Such an operation is performed in order for each flip-flop. That is, in the operation of (FF2), since "1" which should be in (FF2) is erased when it is in the previous stage (FF1), the truth value "1" is set in the latch circuit (L) as shown in FIG. 1,
After setting 0,0,0 ", the truth value" 0,0,0,0 "is set (FF1) and the invalid" 1 "is erased (step 1). ) To the truth value “0,1,1,0”
After setting, set the truth value “0,0,0,0” (FF2)
Shift "1" to (FF3).

以下(FF3)、(FF4)についても同様の操作を行う。Do the same for (FF3) and (FF4).

(FF1)から(FF4)までの一連の操作で、1サイクル分
の診断が終了する。即ち、例えばこの一連の周期でメモ
リ、タイマ、入力部及び出力部の計4つのテスト結果の
診断が行われる。従って上述の各テストが正常であれ
ば、(FF4)から交番出力が得られ、異常であった場合
には例えば、フリツプフロツプ(FF1,FF2,FF3,FF4)の
全体に真理値“1"がセットされたり、或いは全てが“0"
となったりして交番出力が断たれることとなり、結局各
種のテストの診断が交番出力が得られているか、停止す
るかによって判断される。
A series of operations from (FF1) to (FF4) completes diagnosis for one cycle. That is, for example, a total of four test results of the memory, the timer, the input unit and the output unit are diagnosed in this series of cycles. Therefore, if each of the above tests is normal, an alternating output is obtained from (FF4), and if it is abnormal, for example, the truth value “1” is set to the entire flip-flop (FF1, FF2, FF3, FF4). Or all are "0"
As a result, the alternating output is cut off, and the diagnosis of various tests is eventually judged by whether the alternating output is obtained or stopped.

尚、以上説明した実施例では、フリツプフロツプが4個
のみ示された例を挙げているが、チェックする項目を増
加する場合には、それに対応した数のフリツプフロツプ
を循環して接続すればよい。すなわち、チェックする項
目がラム(RAM)、ロム(ROM)、タイマ、入力部のデー
タ、出力部のデータといった5個のチェックを行う場合
はチェック項目の数に対応した数のフリツプフロツプ5
個を直列に接続するようにすればよい。
In the embodiment described above, only four flip flops are shown. However, when the number of items to be checked is increased, a corresponding number of flip flops may be circulated and connected. That is, when five items to be checked are RAM (RAM), ROM (ROM), timer, input part data, and output part data, the number of flip-flops corresponding to the number of check items is five.
It suffices to connect them in series.

発明の効果 以上説明したように、本願発明の、CPUを用いた制御シ
ステムの診断回路は、入力端子(D)と出力端子(Q)
及びクロック端子(CK)を具備した所定数のフリツプフ
ロツプ(FF1,FF2,FF3,FF4)夫々が、出力端子(Q)を
次段のフリツプフロツプの入力端子(D)に順次入力し
て一巡しループを形成しており、各フリツプフロツプ
(FF1,FF2,FF3,FF4)のクロック端子(CK)には、既述
の所定信号が入力されるべくCPUの並列データ出力端子
群の異なる出力端子が個々に接続されており、また、初
期値設定手段(INI)が、システム始動時に少なくとも
1つのフリツプフロツプが他のフリツプフロツプと異な
っている所定の論理値群を各フリツプフロツプ(FF1,FF
2,FF3,FF4)に記憶させるように構成されているので、 一例を既述した如き所定の診断プログラムを含む任意プ
ログラムを用いてCPUによるシステム制御を行うことに
より、任意のフリツプフロツプの出力を診断出力として
用いることができ、各種診断結果は勿論のこと加えてシ
ステム制御自体の運行を診断でき、しかもその出力がフ
エイルセーフでありシステムの信頼性を向上させること
ができる。
Effects of the Invention As described above, the diagnostic circuit of the control system using the CPU of the present invention has the input terminal (D) and the output terminal (Q).
And a predetermined number of flip-flops (FF1, FF2, FF3, FF4) equipped with a clock terminal (CK), sequentially input the output terminal (Q) to the input terminal (D) of the next flip-flop to make a loop. The flip-flops (FF1, FF2, FF3, FF4) are connected to different output terminals of the parallel data output terminal group of the CPU so that the above-mentioned predetermined signals are input to the clock terminals (CK) of each flip-flop. Further, the initial value setting means (INI) sets a predetermined logical value group in which at least one flip-flop is different from other flip-flops at the time of system startup, to each flip-flop (FF1, FF).
2, FF3, FF4), so that the output of any flip-flop can be diagnosed by performing system control by the CPU using an arbitrary program including a predetermined diagnostic program as described above. It can be used as an output, and in addition to various diagnostic results, the operation of the system control itself can be diagnosed, and the output is fail-safe, so that the reliability of the system can be improved.

【図面の簡単な説明】[Brief description of drawings]

第1図は、本発明の診断回路の一実施例を示す回路図、 第2図は、1段目のフリツプフロツプに真理値“1"があ
る場合に必要なクロックパルスをラッチ回路に与える真
理値で示した図、 第3図は、各フリツプフロツプ毎に真理値“1"がある場
合に必要となる、ラッチ回路にセットすべきデータ内容
を一覧で示す図である。 (FF1,FF2,FF3,FF4):フリツプフロツプ、 (INI):初期値設定手段、 (CPU):マイクロプロセッサ、 (CK):クロック端子、 (D):入力端子、 (Q):出力端子。
FIG. 1 is a circuit diagram showing an embodiment of a diagnostic circuit of the present invention, and FIG. 2 is a truth value for giving a latch circuit a clock pulse required when the first flip-flop has a truth value "1". 3 and FIG. 3 are views showing a list of data contents to be set in the latch circuit, which is necessary when the truth value is "1" for each flip-flop. (FF1, FF2, FF3, FF4): flip-flop, (INI): initial value setting means, (CPU): microprocessor, (CK): clock terminal, (D): input terminal, (Q): output terminal.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 斉藤 安雄 埼玉県浦和市上木崎1丁目13番8号 日本 信号株式会社与野工場内 (56)参考文献 特開 昭56−17444(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Yasuo Saito 1-13-8 Kamikizaki, Urawa-shi, Saitama Nihon Signal Co., Ltd. Yono factory (56) Reference JP-A-56-17444 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】CPUを用いた制御システムの診断回路であ
って、 入力端子(D)と出力端子(Q)及びクロック端子(C
K)を具備した所定数のフリツプフロツプ(FF1,FF2,FF
3,FF4)と、初期値設定手段(INI)を有し、 初期値設定手段(INI)が、システム始動時に少なくと
も1つのフリツプフロツプが他のフリツプフロツプと異
なっている所定の論理値群を各フリツプフロツプ(FF1,
FF2,FF3,FF4)に記憶させるものであり、 各フリツプフロツプ(FF1,FF2,FF3,FF4)夫々が、出力
端子(Q)を次段のフリツプフロツプの入力端子(D)
に順次入力して一巡しループを形成しており、 各フリツプフロツプ(FF1,FF2,FF3,FF4)のクロック端
子(CK)には、CPUの並列データ出力端子群の異なる出
力端子が個々に接続されており、 プログラムの進行に沿って各部の診断その他の制御過程
の間に複数箇所設定され設定位置毎に応じて固有に定ま
りCPUでのシステム各部の診断結果が正常であることに
基づきCPUより出力されて各フリツプフロツプ(FF1,FF
2,FF3,FF4)の中で設定位置に対応するフリツプフロツ
プのみを移送動作させるための制御データが前記各クロ
ック端子(CK)に順に入力され、正常動作時にのみ順次
繰り返して入力される一連一組の前記制御データ群に基
づき、初期値設定手段(INI)が設定した各フリツプフ
ロツプ(FF1,FF2,FF3,FF4)の記憶する論理値の配置が
正常動作時にのみ順序を保って順次移送されて一定周期
で循環し、 任意のフリツプフロツプ(FF1,FF2,FF3,FF4)で正常動
作時にのみ得られる交番出力をシステム正常時に対応付
けた診断出力として用いるCPU制御システムの診断回
路。
1. A diagnostic circuit for a control system using a CPU, comprising an input terminal (D), an output terminal (Q) and a clock terminal (C).
K) equipped with a certain number of flip flops (FF1, FF2, FF
3, FF4) and an initial value setting means (INI), and the initial value setting means (INI) sets a predetermined logical value group in which at least one flipflop is different from other flipflops at the system startup. FF1,
FF2, FF3, FF4), and each flip-flop (FF1, FF2, FF3, FF4) has its output terminal (Q) as the input terminal (D) of the next flip-flop.
To form a loop, and the clock terminals (CK) of each flip-flop (FF1, FF2, FF3, FF4) are individually connected to different output terminals of the CPU parallel data output terminal group. Outputs from the CPU based on the fact that the diagnosis result of each part of the system in the CPU is normal because it is set at multiple points during the diagnosis of each part and other control processes as the program progresses and is uniquely determined according to each set position. Each flip-flop (FF1, FF
2, FF3, FF4) Control data for moving only the flip flop corresponding to the set position is sequentially input to each of the clock terminals (CK), and is sequentially repeated only during normal operation. Based on the control data group of, the arrangement of the logical values stored by each flip-flop (FF1, FF2, FF3, FF4) set by the initial value setting means (INI) is sequentially transferred in a fixed order only during normal operation and is constant. A diagnostic circuit for the CPU control system that circulates in cycles and uses the alternating output obtained only during normal operation with any flip-flop (FF1, FF2, FF3, FF4) as the diagnostic output associated with the system during normal operation.
JP60145200A 1985-07-02 1985-07-02 Diagnostic circuit Expired - Lifetime JPH0797330B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60145200A JPH0797330B2 (en) 1985-07-02 1985-07-02 Diagnostic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60145200A JPH0797330B2 (en) 1985-07-02 1985-07-02 Diagnostic circuit

Publications (2)

Publication Number Publication Date
JPS626337A JPS626337A (en) 1987-01-13
JPH0797330B2 true JPH0797330B2 (en) 1995-10-18

Family

ID=15379724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60145200A Expired - Lifetime JPH0797330B2 (en) 1985-07-02 1985-07-02 Diagnostic circuit

Country Status (1)

Country Link
JP (1) JPH0797330B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6024975B2 (en) * 1979-07-20 1985-06-15 株式会社京三製作所 high speed signal comparator

Also Published As

Publication number Publication date
JPS626337A (en) 1987-01-13

Similar Documents

Publication Publication Date Title
CA1056458A (en) Common diagnostic bus for computer systems to enable testing concurrently with normal system operation
US4433413A (en) Built-in apparatus and method for testing a microprocessor system
US4488259A (en) On chip monitor
CA1065052A (en) Diagnostic testing apparatus and method
US7409614B2 (en) Method, system and program product for boundary I/O testing employing a logic built-in self-test of an integrated circuit
JPS61163444A (en) Error tester for data processor
US4183461A (en) Fault-diagnosing method for an electronic computer
EP0209982B1 (en) Digital integrated circuits
US5189675A (en) Self-diagnostic circuit for logic circuit block
EP0461041B1 (en) Flip-flop circuit
KR100188170B1 (en) Diagnostic device and method thereof for circuit state, digital processor system
JPH0797330B2 (en) Diagnostic circuit
JPS60239836A (en) Troubleshooting system of logical circuit
JPS62124470A (en) Logic circuit diagnosis method
US7272761B2 (en) Method, system, and program product for controlling test data of a logic built-in self-test of an integrated circuit
EP0347906B1 (en) Self-diagnostic circuit for logic circuit block
JPS62523B2 (en)
JP2636169B2 (en) Information processing device
JPH0694804A (en) Ic testing device
JPS6222085A (en) Test circuit
JPH01223548A (en) Input/output processor
JPH0267973A (en) Operation ensuring circuit of diagnostic circuit
JPH06334668A (en) Multiplexed transmission system
JPS61208140A (en) Diagnostic control system
JPS62119651A (en) Ras circuit diagnosing system