JP3060376U - Memory device - Google Patents

Memory device

Info

Publication number
JP3060376U
JP3060376U JP1998009552U JP955298U JP3060376U JP 3060376 U JP3060376 U JP 3060376U JP 1998009552 U JP1998009552 U JP 1998009552U JP 955298 U JP955298 U JP 955298U JP 3060376 U JP3060376 U JP 3060376U
Authority
JP
Japan
Prior art keywords
program
memory
value
writing
written
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
JP1998009552U
Other languages
Japanese (ja)
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.)
Funai Electric Co Ltd
Original Assignee
Funai Electric 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 Funai Electric Co Ltd filed Critical Funai Electric Co Ltd
Priority to JP1998009552U priority Critical patent/JP3060376U/en
Application granted granted Critical
Publication of JP3060376U publication Critical patent/JP3060376U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

(57)【要約】 【課題】 メモリの動作不良に起因するプログラムの暴
走を防止する。 【解決手段】 CPU1は、操作部7から電源オンの操
作に応じて生成されたパワーオンリセット信号を与えら
れたとき、RAM3aの全域にわたってバイト毎に55
(16)を書き込み、これを完了すると、RAM3aに書き込
まれている値をバイト毎に読み出し、読み出した値と書
き込んだ55(16)とを比較して、書き込みが正常に行わ
れたか否かを判別する。書き込みが正常に行われたと判
別したとき、RAM3aの全域にわたってバイト毎にAA
(16)を書き込み、これを完了すると、RAM3aに書き込
まれている値をバイト毎に読み出し、読み出した値と書
き込んだAA(16)とを比較して、書き込みが正常に行わ
れたか否かを判別する。書き込みが正常に行われたと判
別したとき、プログラム8を起動する。
(57) [Summary] [PROBLEMS] To prevent runaway of a program due to a malfunction of a memory. When a power-on reset signal generated in response to a power-on operation is supplied from an operation unit, a CPU (55) for every byte over the entire area of a RAM (3a).
(16) is written, and when this is completed, the value written in the RAM 3a is read byte by byte, and the read value is compared with the written value of 55 (16) to determine whether or not the writing has been performed normally. Determine. When it is determined that writing has been performed normally, AA
(16) is written, and when this is completed, the value written in the RAM 3a is read byte by byte, and the read value is compared with the written AA (16) to determine whether the writing was performed normally. Determine. When it is determined that the writing has been performed normally, the program 8 is started.

Description

【考案の詳細な説明】[Detailed description of the invention]

【0001】[0001]

【考案の属する技術分野】[Technical field to which the invention belongs]

本考案は、プログラムの実行制御を行うメモリ装置、特にシステムプログラム の起動に先立ってメモリの自己診断を行い、その結果に基づきシステムプログラ ムの実行制御を行うことに特徴を有するメモリ装置に関する。 The present invention relates to a memory device that controls the execution of a program, and more particularly to a memory device that performs self-diagnosis of a memory prior to the activation of a system program and controls the execution of the system program based on the result of the self-diagnosis.

【0002】[0002]

【従来の技術】[Prior art]

コンピュータ又はその他の各種の制御機器などプログラムにより制御される機 器は、電源投入直後に実行される初期設定処理において、プログラムが破損して いないことの自己診断などを行うように構成してある。 Devices controlled by a program such as a computer or various other control devices are configured to perform a self-diagnosis or the like that the program is not damaged in an initialization process executed immediately after the power is turned on.

【0003】 特開平4−318628号公報において提案されている中央演算処理装置は、前述の 如き機器の一例であって、外部メモリからマイクロプログラムを読み出したとき 、所定の規則に則って生成したチェックサムデータを前記マイクロプログラムに 付加してCPU内部に格納しておき、またプログラム実行中には実行されないチ ェックモードにおいて、CPU内部に格納してあるマイクロプログラムを読み出 し、前記チェックサムデータを利用して前記マイクロプログラムの破損を自己診 断すべくなすことにより、マイクロプログラムを格納するためのメモリ容量の削 減及び実行速度の高速化を図ることを目的とする。A central processing unit proposed in Japanese Patent Application Laid-Open No. 4-318628 is an example of the above-described device. When a microprogram is read from an external memory, a check generated according to a predetermined rule is performed. Sum data is added to the microprogram and stored in the CPU. In a check mode that is not executed during execution of the program, the microprogram stored in the CPU is read and the checksum data is stored in the CPU. It is an object of the present invention to reduce the memory capacity for storing a microprogram and to increase the execution speed by performing self-diagnosis of the damage of the microprogram by utilizing.

【0004】 また、プログラムにより制御される装置は、そのプログラムの実行に使用する ためのメモリを備えている。 一般に、電源投入直後はメモリセルの値が不定、即ち0又は1のいずれである かが保証されておらず、このような状態においてプログラムを実行すると動作障 害を生じる虞れがある。従って、前述の如き装置においてはプログラムの実行に 先立ち、具体的には電源投入直後に実行される初期設定処理によって、全てのメ モリセルの値を0(零)に設定する(クリアする)構成にしてある。[0004] An apparatus controlled by a program includes a memory used for executing the program. Generally, immediately after the power is turned on, the value of the memory cell is undefined, that is, whether the value is 0 or 1 is not guaranteed. If a program is executed in such a state, an operation failure may occur. Therefore, in the above-described apparatus, prior to the execution of the program, specifically, the configuration is such that the values of all the memory cells are set to 0 (zero) by an initial setting process executed immediately after the power is turned on. It is.

【0005】 特公平8−27730 号公報において提案されているシングルチップマイクロコン ピュータ及びそのテスト方法は、メモリセルの値をクリアする条件に特徴を有す る発明であって、秘密情報を格納するシングルチップコンピュータについて、そ の動作テストを行う動作モードとして設けられたテストモードを設定する信号に 応答して、既に格納してある情報を初期化、即ちクリアする初期化ルーチンを実 行すべくなすことにより、出荷後の再テストに必要なテストモードの存続と、読 み出されてはならない秘密情報の機密保護とを両立させることを目的とする。A single-chip microcomputer and a test method thereof proposed in Japanese Patent Publication No. Hei 8-27730 are inventions characterized by a condition for clearing the value of a memory cell, and store secret information. For a single-chip computer, in response to a signal for setting a test mode provided as an operation mode for performing an operation test, an initialization routine for initializing, ie, clearing, information already stored is executed. The purpose of this is to achieve both the persistence of the test mode required for retesting after shipment and the security of confidential information that must not be read.

【0006】[0006]

【考案が解決しようとする課題】[Problems to be solved by the invention]

ところで、動作テストに合格して出荷された製品が、出荷後の不適切な取扱い 又は動作環境の不適合などが原因となって動作不良を生じることがある。例えば 、メモリにおいては隣接するメモリセルのショート(短絡)が挙げられる。また 、メモリセルの値が0又は1のいずれかに固定されて記憶動作が不可能な場合も ある。 このように動作不良を生じたメモリは、その不良発生箇所において正常な値を 記憶することができないため、これをプログラムの実行に使用するとプログラム が暴走する、即ち異常動作を引き起こす虞れがある。また、プログラムが暴走す ることによって、被害が装置の他の部分に及ぶ可能性もある。 By the way, products that pass the operation test and are shipped may cause malfunctions due to improper handling after shipment or incompatibility of the operating environment. For example, in a memory, a short circuit (short circuit) between adjacent memory cells can be given. In some cases, the value of the memory cell is fixed to either 0 or 1 and the storage operation is impossible. Since a memory in which an operation failure has occurred cannot store a normal value at the location where the failure has occurred, using the memory for executing the program may cause the program to run away, that is, cause an abnormal operation. A runaway program could also cause damage to other parts of the equipment.

【0007】 しかし、従来の装置において、メモリの動作不良に起因するプログラムの暴走 についての対策は何ら施されてはいなかった。[0007] However, in the conventional device, no measure has been taken against a program runaway caused by a malfunction of the memory.

【0008】 本考案は斯かる事情に鑑みてなされたものであって、プログラムの実行に先立 ちメモリの自己診断を行って、その動作不良を関知したとき、プログラムの実行 を拒否すべくなすことで、プログラムの暴走を予防することが可能なメモリ装置 の提供を目的とする。The present invention has been made in view of such circumstances, and performs a self-diagnosis of a memory prior to execution of a program, and rejects the execution of the program when the memory detects a malfunction. Accordingly, it is an object of the present invention to provide a memory device capable of preventing program runaway.

【0009】[0009]

【課題を解決するための手段】[Means for Solving the Problems]

第1考案に係るメモリ装置は、メモリの状態に応じてプログラムの実行制御を 行うメモリ装置であって、メモリと、プログラムを格納してあるプログラムメモ リと、予め設定してある複数の所定値を一つずつ選択し、その都度、選択した所 定値を前記メモリに書き込む書込手段と、メモリへの所定値の書き込みが完了す る都度、前記メモリに書き込まれている値を読み出す手段と、読み出した値が書 き込んだ所定値と一致するか否かを判別する手段と、読み出した値について、書 き込んだ所定値と一致すると判別したとき、プログラムメモリに格納してあるプ ログラムを実行し、また、読み出した値が書き込んだ所定値と一致しないと判別 したとき、前記プログラムを実行しない実行制御手段とを備えることを特徴とす る。 The memory device according to the first invention is a memory device that controls the execution of a program in accordance with the state of the memory, and includes a memory, a program memory storing the program, and a plurality of predetermined predetermined values. Writing means for selecting one by one and writing the selected value to the memory each time, and reading the value written to the memory each time writing of the predetermined value to the memory is completed. Means for determining whether or not the read value matches the written predetermined value; and, when determining that the read value matches the written predetermined value, the program stored in the program memory is read. An execution control unit for executing the program when it is determined that the read value does not match the written predetermined value.

【0010】 第2考案に係るメモリ装置は、前記書込手段には、所定値として55(16)及び AA(16)の2値を設定してあることを特徴とする。[0010] The memory device according to the second invention is characterized in that two values of 55 (16) and AA (16) are set in the writing means as predetermined values.

【0011】 第1,第2考案において、隣接するメモリセルのショートについては、隣接す る2つのメモリセルにおいて異なる値を夫々書き込み、その後、各メモリセルに 書き込まれている値を夫々読み出して、読み出した各値が書き込んだ値と一致す るか否かに基づいて検出する。 メモリアクセスをバイト (Byte) 単位で行う状況においては、検出のために書 き込む値として隣接するビット値が異なる値、具体的には55(16)又はAA(16) などを選択することが望ましい。例えば、55(16)はビット列に変換すると01 010101(2) となり、またAA(16)は10101010(2) となる。In the first and second inventions, regarding short-circuiting of adjacent memory cells, different values are written in two adjacent memory cells, respectively, and then the values written in each memory cell are read out. Detection is performed based on whether each read value matches the written value. In a situation where memory access is performed in byte units, it is possible to select a value with a different adjacent bit value, specifically 55 (16) or AA (16), as the value to be written for detection. desirable. For example, 55 (16) becomes 01010101 (2) when converted to a bit string, and AA (16) becomes 10101010 (2) .

【0012】 また、メモリセルの記憶動作については、所定のメモリセルにおいて相異なる 値を2度に分けて夫々書き込み、その書き込みの都度、前記メモリセルに書き込 まれている値を読み出して、2度の読み出し処理において夫々読み出した値が書 き込んだ値と一致するか否かに基づいて診断する。 例えば、1度目に55(16)を書き込んだとき、2度目にAA(16)を書き込むこ とで、各ビット位置について2度の書き込み処理により相異なる値を夫々書き込 むことができる。 なお、書き込み処理により書き込む所定値の順序について、前述した順序とは 逆に、1度目にはAA(16)を書き込み、また2度目には55(16)を書き込むよう にしても同様である。In the storage operation of a memory cell, different values in a predetermined memory cell are separately written twice, and each time the writing is performed, the value written in the memory cell is read, and Diagnosis is made based on whether or not each read value matches the written value in each read process. For example, by writing 55 (16) for the first time and writing AA (16) for the second time, different values can be written for each bit position by performing the writing process twice. Note that the order of the predetermined values to be written by the writing process is the same as in the case of writing AA (16) the first time and writing 55 (16) the second time, contrary to the order described above.

【0013】 更にまた、記憶動作の診断のために使用する値は、2つに限定されない。すな わち、所定のメモリセルにおいて3つの値を3度に分けて夫々書き込む構成にし ても良く、この場合には例えば、1度目に24(16)を書き込み、2度目に49(1 6) を書き込み、3度目に92(16)を書き込み、その書き込みの都度、前記メモリ セルに書き込まれている値を読み出して、夫々読み出した値が書き込んだ値と一 致するか否かを判別することにより、同等の効果を得ることが可能である。Further, the values used for diagnosing the storage operation are not limited to two. Ie, divided three values in three degrees may be configured to write each in a given memory cell, in this case, for example, writes the 24 (16) for the first time, the second time 49 (1 6 ) Is written for the third time, and 92 (16) is written for the third time, and each time the value is written, the value written in the memory cell is read, and it is determined whether or not each read value matches the written value. Thereby, an equivalent effect can be obtained.

【0014】 これらの考案においては、メモリについて、その隣接するメモリセルのショー ト及び記憶動作を自己診断し、動作不良を関知したとき、暴走する虞れのあるプ ログラムを実行しないようにすることができる。In these inventions, a self-diagnosis of a short and a storage operation of an adjacent memory cell of a memory is performed, and when a malfunction is detected, a program that may cause a runaway is not executed. Can be.

【0015】[0015]

【考案の実施の形態】[Embodiment of the invention]

図1は本考案に係るメモリ装置の構成を示すブロック図であって、その実施の 形態の一例として印刷装置について表している。 図において、1はプログラム制御を行うためのCPUである。CPU1はバス 2を介して、プログラムの実行に使用されるシステムメモリ3と、フィードモー タなどの図示しない駆動部を制御する印刷制御部4と、印刷すべきデータを格納 するためのバッファメモリ5と、発光ダイオードなどを用いてなり、装置の動作 状態を表示する表示部6と、電源オン及びプリント開始などの操作を受け付けて 所定の信号を生成する操作部7と接続してある。 システムメモリ3はRAM3a及びROM3bで構成してあって、ROM3bには制 御のためのプログラム8を格納してある。CPU1がROM3bからプログラム8 を読み出し、これをRAM3aを使用して実行することにより、印刷装置がプログ ラム制御される。 FIG. 1 is a block diagram showing a configuration of a memory device according to the present invention, and shows a printing apparatus as an example of the embodiment. In the figure, reference numeral 1 denotes a CPU for performing program control. The CPU 1 is connected via a bus 2 to a system memory 3 used for executing a program, a print control unit 4 for controlling a drive unit (not shown) such as a feed motor, and a buffer memory 5 for storing data to be printed. And a display section 6 for displaying the operation state of the apparatus, and an operation section 7 for receiving operations such as power-on and starting printing and generating a predetermined signal. The system memory 3 is composed of a RAM 3a and a ROM 3b, and a program 8 for control is stored in the ROM 3b. The CPU 1 reads out the program 8 from the ROM 3b and executes it using the RAM 3a, whereby the printing apparatus is program-controlled.

【0016】 図2は、前記プログラム8の実行制御に係る処理手順を示すフローチャートで ある。CPU1は、操作部7から電源オンの操作に応じて生成されたパワーオン リセット信号 (Power On Reset:POR) を与えられたとき、RAM3aの全域に わたってバイト毎に55(16)を書き込む(S1)。書き込みを完了すると、RAM3a に書き込まれている値をバイト毎に読み出し、読み出した値と書き込んだ55(16) とを比較して、書き込みが正常に行われたか否かを判別する(S2)。 書き込みが正常に行われたと判別したとき、RAM3aの全域にわたってバイト 毎にAA(16)を書き込む(S3)。書き込みを完了すると、RAM3aに書き込まれて いる値をバイト毎に読み出し、読み出した値と書き込んだAA(16)とを比較して 、書き込みが正常に行われたか否かを判別する(S4)。FIG. 2 is a flowchart showing a processing procedure relating to the execution control of the program 8. When receiving a power-on reset signal (Power On Reset: POR) generated in response to the power-on operation from the operation unit 7, the CPU 1 writes 55 (16) for each byte over the entire area of the RAM 3a ( S1). When the writing is completed, the value written in the RAM 3a is read byte by byte, and the read value is compared with the written value 55 (16) to determine whether or not the writing has been normally performed (S2). When it is determined that the writing has been normally performed, AA (16) is written for each byte over the entire area of the RAM 3a (S3). When the writing is completed, the value written in the RAM 3a is read for each byte, and the read value is compared with the written AA (16) to determine whether or not the writing has been normally performed (S4).

【0017】 書き込みが正常に行われたと判別したとき、表示部6の電源オンを表す電源ラ ンプを点灯し(S5)、プログラム8を起動する。 S2において、55(16)の書き込みが正常に行われなかったと判別したとき、 またはS4において、AA(16)の書き込みが正常に行われなかったと判別したと き、プログラム8を起動しない。When it is determined that the writing has been performed normally, the power lamp indicating that the power of the display unit 6 is turned on is turned on (S5), and the program 8 is started. If it is determined in S2 that the writing of 55 (16) has not been performed normally, or if it is determined in S4 that the writing of AA (16) has not been performed normally, the program 8 is not started.

【0018】 以上の如く、前記印刷装置はメモリの自己診断の結果に応じて、プログラムの 暴走が予測される状況において、前記プログラムを起動させないため、プログラ ムの暴走を予防することができる。 また、前記印刷装置はメモリの自己診断により動作良好であることを関知した ときに電源ランプを点灯させ、また動作不良であるときには電源ランプを点灯さ せないため、その使用者は前記電源ランプの点灯状況に基づき、メモリの動作不 良を関知することができる。As described above, since the printing apparatus does not start the program in a situation where the program is expected to run out according to the result of the self-diagnosis of the memory, it is possible to prevent the program from running away. In addition, since the printing device turns on the power lamp when the self-diagnosis of the memory indicates that the operation is good, and does not turn on the power lamp when the operation is faulty, the user can use the power lamp. The malfunction of the memory can be detected based on the lighting state.

【0019】[0019]

【考案の効果】[Effect of the invention]

以上の如き第1,第2考案のメモリ装置によっては、プログラムの実行に先立 ってメモリを自己診断し、その動作不良を関知したときはプログラムを実行しな いから、メモリの動作不良に起因するプログラムの暴走の予防に優れた効果を奏 する。 In some of the memory devices of the first and second inventions as described above, the memory is self-diagnosed prior to the execution of the program, and the program is not executed when the malfunction is detected. It is very effective in preventing runaway of the resulting program.

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

【図1】本考案に係るメモリ装置の構成を示すブロック
図である。
FIG. 1 is a block diagram showing a configuration of a memory device according to the present invention.

【図2】プログラムの実行制御に係る処理手順を示すフ
ローチャートである。
FIG. 2 is a flowchart illustrating a processing procedure related to execution control of a program.

【符号の説明】[Explanation of symbols]

1 CPU 3 システムメモリ 3a RAM 3b ROM 8 プログラム 1 CPU 3 system memory 3a RAM 3b ROM 8 programs

Claims (2)

【実用新案登録請求の範囲】[Utility model registration claims] 【請求項1】 メモリの状態に応じてプログラムの実行
制御を行うメモリ装置であって、 メモリと、 プログラムを格納してあるプログラムメモリと、 予め設定してある複数の所定値を一つずつ選択し、その
都度、選択した所定値を前記メモリに書き込む書込手段
と、 メモリへの所定値の書き込みが完了する都度、前記メモ
リに書き込まれている値を読み出す手段と、 読み出した値が書き込んだ所定値と一致するか否かを判
別する手段と、 読み出した値について、書き込んだ所定値と一致すると
判別したとき、プログラムメモリに格納してあるプログ
ラムを実行し、また、読み出した値が書き込んだ所定値
と一致しないと判別したとき、前記プログラムを実行し
ない実行制御手段とを備えることを特徴とするメモリ装
置。
1. A memory device for controlling the execution of a program in accordance with the state of a memory, wherein a memory, a program memory storing a program, and a plurality of preset predetermined values are selected one by one. A writing means for writing the selected predetermined value to the memory each time; a means for reading the value written to the memory each time the writing of the predetermined value to the memory is completed; and a reading means for writing the read value. Means for determining whether or not the read value matches the predetermined value; and, when determining that the read value matches the written predetermined value, executing the program stored in the program memory and writing the read value. A memory device comprising: an execution control unit that does not execute the program when it is determined that the program does not match the predetermined value.
【請求項2】 前記書込手段には、所定値として55
(16)及びAA(16)の2値を設定してあることを特徴とす
る請求項1記載のメモリ装置。
2. The writing means has a predetermined value of 55
2. The memory device according to claim 1, wherein two values of (16) and AA (16) are set.
JP1998009552U 1998-12-02 1998-12-02 Memory device Expired - Lifetime JP3060376U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1998009552U JP3060376U (en) 1998-12-02 1998-12-02 Memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1998009552U JP3060376U (en) 1998-12-02 1998-12-02 Memory device

Publications (1)

Publication Number Publication Date
JP3060376U true JP3060376U (en) 1999-08-31

Family

ID=32983416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1998009552U Expired - Lifetime JP3060376U (en) 1998-12-02 1998-12-02 Memory device

Country Status (1)

Country Link
JP (1) JP3060376U (en)

Similar Documents

Publication Publication Date Title
US5768568A (en) System and method for initializing an information processing system
JP2001236483A (en) Portable electronic device
JP3376306B2 (en) Data processing apparatus and data processing method
JPH1091289A (en) Memory initialization device and method
JPH0827730B2 (en) Single-chip microcomputer and test method thereof
JP3060376U (en) Memory device
JP3225938B2 (en) Semiconductor device and fault relief method thereof
JP2000293376A (en) Circuit and method for switching boot program
JP2000035923A (en) Abnormality detecting method and abnormality detecting device
JP3192229B2 (en) Information processing device with diagnostic function for device peripherals
JPH1069399A (en) Microcomputer
JP2003288215A (en) Information processing apparatus
JPH03211619A (en) Data processor
JPH0962534A (en) Self-diagnostic method for electronic computer
JP2000353109A (en) Emulator and emulation system
JP2531112B2 (en) Information processing device
JP2517370B2 (en) Control method of intelligent measurement card
US20060253743A1 (en) Microcomputer and debugging method
JPH1153214A (en) Boot failure detection system of personal computer
JP2000020498A (en) Microcomputer and its restoring method
JPH05297901A (en) Process controller
JPH10333992A (en) Flash memory write data and flash memory loading equipment
JPH103407A (en) Program malfunction detection development support device and program malfunction detection method
JPH0292657A (en) Printer
JPH0341538A (en) Main storage device