JPS63168754A - Memory error check system - Google Patents

Memory error check system

Info

Publication number
JPS63168754A
JPS63168754A JP62000540A JP54087A JPS63168754A JP S63168754 A JPS63168754 A JP S63168754A JP 62000540 A JP62000540 A JP 62000540A JP 54087 A JP54087 A JP 54087A JP S63168754 A JPS63168754 A JP S63168754A
Authority
JP
Japan
Prior art keywords
data
read
bcc
block
error
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.)
Pending
Application number
JP62000540A
Other languages
Japanese (ja)
Inventor
Shigeyuki Kawana
川名 茂之
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP62000540A priority Critical patent/JPS63168754A/en
Publication of JPS63168754A publication Critical patent/JPS63168754A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the efficiency of data processing by checking read error every data read in the unit of blocks to quicken the processing in case of a data error. CONSTITUTION:In case of readout of comparatively long data stored separately in plural blocks, the data is read in the unit of blocks, the read error is checked for each block data and readout error information is generated by the result of check. That is, write data longer than a prescribed length or over among those given given via a serial I/04 is blocked into plural numbers and sent to a BCC (Block check code) arithmetic section 5, which executes arithmetic operation with respect to each block data and a BCC is added. Then the data added with the BCC is written in a data memory 7 via a write/read control section 6.

Description

【発明の詳細な説明】 [発明の技術分野] この発明はICカードシステムなどに採用されるメモリ
エラーチェック方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a memory error checking method employed in an IC card system or the like.

[従来技術とその問題点コ 近年、キャッシュレス時代と呼ばれており、クレジット
カード会社などより発行されるカードを使用することに
より現金の取扱いをせずに商品の購入が可能になってい
る。
[Prior Art and Its Problems] In recent years, it has become known as the cashless era, and by using cards issued by credit card companies, it has become possible to purchase products without having to handle cash.

従来、使用されているカードとしてはプラスチックカー
ド、エンボスカード、磁気ストライブカードなどがある
が、これらのカードは構造上偽造が容易であるため、不
正使用が問題になっている。
Conventionally, cards used include plastic cards, embossed cards, and magnetic striped cards, but these cards are easy to forge due to their structure, so unauthorized use has become a problem.

そこで、このような問題を解決するため、カード内部に
暗証番号などを記憶したIC回路を組込み、暗証番号が
外部から容易に読出せないようにした情報カード、いわ
ゆるICカードが考えられており、このようなICカー
ドとターミナルとを組合わせたICカードシステムが開
発されている。
Therefore, in order to solve this problem, information cards, so-called IC cards, have been developed that incorporate an IC circuit that stores a PIN number inside the card so that the PIN number cannot be read easily from the outside. An IC card system that combines such an IC card and a terminal has been developed.

ところで、このようなICカードシステムでは、ターミ
ナルにICカードを装着した状態で、ICカード内のメ
モリよりトランザクションなどのデータを読出す場合、
このときの読出しデータが一つの纏まりとして長いもの
であると、データを複数のブロックに分けて送るように
している。この場合、データが正しいものであるか否か
のチェックは一連のデータのうちの最後のブロックデー
タにチェックコードを付加して行なうようになっている
By the way, in such an IC card system, when reading data such as transactions from the memory in the IC card with the IC card installed in the terminal,
If the read data at this time is long as a single block, the data is divided into a plurality of blocks and sent. In this case, whether or not the data is correct is checked by adding a check code to the last block of data in a series of data.

ところが、このようにデータの最後部分にチェックコー
ドを付加する方法によると、データの途中でカードメモ
リ内に、いわゆるデータ化けが生じたような場合でも、
総てのデータを送り終わるまでメモリエラーがあること
が分らないことになり、時r1を掛けて読出したデータ
が総て無駄になるだけでなく、ターミナル側では、この
間データ処理が実行することができず、かかるデータ処
理の能率が著しく低下する欠点があった。
However, according to this method of adding a check code to the end of data, even if so-called garbled data occurs in the card memory in the middle of data,
It will not be known that there is a memory error until all the data has been sent, and not only will all the data read out over time r1 be wasted, but the terminal side will not be able to perform any data processing during this time. However, there was a drawback that the efficiency of such data processing was significantly reduced.

[発明の目的] この発明は上記事情に鑑みてなされたもので、ブロック
単位で読出されるデータごとにエラーをチェックするこ
とができ、データ処理の能率向上を図ることができるメ
モリエラーチェック方式を提供することを目的とする。
[Objective of the Invention] The present invention has been made in view of the above circumstances, and provides a memory error checking method that can check errors for each data read in blocks and improve the efficiency of data processing. The purpose is to provide.

[発明の要点] この発明にかかるメモリエラーチェック方式によれば、
複数のブロックに分けて記憶される比較的長いデータを
読出す場合、かかるデータをブロック単位で読出すとと
もに、各ブロックデータごとに読出しエラーをチェック
し、このチェックの結果により読出しエラー情報を発生
するようになっている。
[Summary of the Invention] According to the memory error checking method according to the present invention,
When reading relatively long data that is stored in multiple blocks, such data is read in blocks, and read errors are checked for each block of data, and read error information is generated based on the results of this check. It looks like this.

[発明の実施例] 以下、この発明の一実流例を図面にしたがい説明する。[Embodiments of the invention] Hereinafter, one practical example of this invention will be explained with reference to the drawings.

第1図は同実施例に使用されるICカードの回路構成を
示すものである。図において、1はシステムバスで、こ
のシステムバス1にはシステムプログラム記憶部2、ワ
ーキングRAM3、シリアルl104、BCC演算部5
が接続される。
FIG. 1 shows the circuit configuration of an IC card used in the same embodiment. In the figure, 1 is a system bus, and this system bus 1 includes a system program storage section 2, a working RAM 3, a serial l104, and a BCC calculation section 5.
is connected.

システムプログラム記憶部2は各種のシステムプログラ
ムを記憶している。ワーキングRAM3はカード外部よ
り与えられるデータおよびカード内での各種処理データ
を記憶するようになっている。シリアルl104はI1
0端子を介して図示しないターミナルとのデータ授受を
行なう。
The system program storage unit 2 stores various system programs. The working RAM 3 is designed to store data provided from outside the card and various processing data within the card. Serial l104 is I1
Data is exchanged with a terminal (not shown) via the 0 terminal.

シリアルl104を介して与えられる書込みデータのう
ち、所定以上長いものは複数にブロック化され、BCC
演算部5に送られる。BCC演算部5はブロックデータ
ごとに演算を実行し、BCC(ブロック・チェック・コ
ード)を付加する。そして、このようにBCCが付加さ
れたデータは書込み/続出し制御部6を介してデータメ
モリ7に書込まれる。ここで、データメモリ7にはEE
PROM(Electrical  Erasable
  Programmable  ROM)あるいはE
PROM(Erasable  Pr。
Of the write data given via the serial l104, data that is longer than a predetermined length is divided into multiple blocks and sent to the BCC.
It is sent to the calculation section 5. The BCC calculation unit 5 performs calculations for each block data and adds a BCC (block check code). The data to which the BCC has been added in this way is written to the data memory 7 via the write/success control section 6. Here, data memory 7 contains EE.
PROM (Electrical Erasable
Programmable ROM) or E
PROM (Erasable Pr.

grammable  ROM)が用いられる。grammable ROM) is used.

データメモリ7より読出されるデータは書込み/読出し
制御部6を介して比較器8に与えられるとともに、BC
C演算部5に送られる。BCG演算部5ではBCCを付
加していない状態を仮定したデータについてBCC演算
を実行し、この結果をラッチ51に書込むとともに、比
較器8に与える。そして、この比較器8での比較結果を
制御部9に与える。
The data read from the data memory 7 is given to the comparator 8 via the write/read control unit 6, and
The signal is sent to the C calculation section 5. The BCG calculation unit 5 executes a BCC calculation on data assuming a state in which no BCC is added, and writes this result into the latch 51 and provides it to the comparator 8. The comparison result from the comparator 8 is then provided to the control section 9.

制御部9はシリアルl104を介して与えられるデータ
および動作状態に応じて各回路に動作指令を出力し、ま
た上記比較器8の比較結果に応じて読出しデータの正誤
情報の出力を指示する。
The control section 9 outputs operation commands to each circuit according to the data and operation state given via the serial I104, and also instructs output of correct/incorrect information of the read data according to the comparison result of the comparator 8.

なお、このようにしたICカードは図示しないターミナ
ルに装着した状態で、ターミナルよりリセット信号Re
5et1システムクロツクCLOCKが供給されるとと
もに、■ccN源、vpp電源が供給され、さらにアー
スIGNDが接続される。ここで、Vcci!源はシス
テム駆動用*i、vppはデータメモリ7に対する書込
み用電源である。
Note that when the IC card thus constructed is attached to a terminal (not shown), a reset signal Re is sent from the terminal.
The 5et1 system clock CLOCK is supplied, the ccN source and the vpp power are supplied, and the ground IGND is connected. Here, Vcci! The power source is *i for system driving, and vpp is a power source for writing to the data memory 7.

次に、このように構成した実施例の動作を説明する。Next, the operation of the embodiment configured as described above will be explained.

この場合、ICカードへのデータ書込みは、書込みデー
タのうち、所定以上長いものは複数にブロック化される
とともに、BCC演算部5での演算により、各ブロック
ごとにBCCが付加され、書込み/vt出し制御部6を
介してデータメモリ7に書込まれるようになる。
In this case, when writing data to the IC card, data that is longer than a predetermined length is divided into multiple blocks, and a BCC is added to each block by calculation in the BCC calculation unit 5. The data is written into the data memory 7 via the output control section 6.

この状態で、データ読出しが行なわれるが、この場合、
始めに第2図のフローチャートに示すように、ターミナ
ルより指定データのリードコマンドが送られてくる。こ
のリードコマンドは第3図(a>に示すように7バイト
で構成され、スタートコード「SRA」、伝文の長さを
表わす1’LNGJ 、’)ラスrcLsJ 、:]−
)’ rcODJリファレンノアREF1、REF2J
 、検査コードrCHKJからなっている。ここで、ス
タートコードrsRAJには、例えばr3AJが用いら
れる。また、長さrLNGJはrcLsJからrcHK
Jまでの長さを表わし、検査コードrcHKJは「LN
GJからrcl−IKJの前までの伝送用検査コードを
表わしている。
In this state, data reading is performed, but in this case,
First, as shown in the flowchart of FIG. 2, a command to read specified data is sent from the terminal. This read command consists of 7 bytes as shown in FIG.
)' rcODJ Referenor REF1, REF2J
, inspection code rCHKJ. Here, r3AJ is used as the start code rsRAJ, for example. Also, the length rLNGJ is from rcLsJ to rcHK
The inspection code rcHKJ is “LN
It represents the transmission inspection code from GJ to before rcl-IKJ.

ICカードは、ステップA1において、リードコマンド
の内容に基づいてデータメモリ7より最初のブロックデ
ータを読出す。そして、ステップへ2に進む。
In step A1, the IC card reads the first block data from the data memory 7 based on the contents of the read command. Then proceed to step 2.

このステップA2では、BCCチェックが実行される。In this step A2, a BCC check is performed.

この場合、制御部9の指令によりデータメモリ7より読
出されたデータは書込み/読出し制御部6を介して比較
器8に与えられ、同時にBCC演算部5にも送られる。
In this case, the data read from the data memory 7 according to the command from the control section 9 is given to the comparator 8 via the write/read control section 6, and is also sent to the BCC calculation section 5 at the same time.

BCC演算部5では、BCCを除くデータについてBC
G演算を実行し、この演算結果をラッチ51に書込む。
The BCC calculation unit 5 calculates BC for data excluding BCC.
The G operation is executed and the result of this operation is written into the latch 51.

そして、ラッチ51の内容が比較器8に与えられ、デー
タメモリ7より直接与えられたBCCデータと比較され
る。
The contents of the latch 51 are then applied to the comparator 8 and compared with the BCC data directly applied from the data memory 7.

この比較器8での比較結果は制御部9に与えられる。こ
の場合、データメモリ7での読出しにエラーがなければ
、比較器8での比較は一致し、一方、データメモリ7で
の読出しにエラーがあると、比較器8での比較は不一致
となる。
The comparison result of this comparator 8 is given to the control section 9. In this case, if there is no error in the reading from the data memory 7, the comparison by the comparator 8 will result in a match; on the other hand, if there is an error in the reading from the data memory 7, the comparison by the comparator 8 will result in a mismatch.

ここで、仮に比較器8での比較が一致して、BCCチェ
ックがOKと判断されると、制御部9の指令によりBC
CチェックrOKJの旨の情報が付加されたブロックデ
ータがターミナル側に返送される。この場合の返送デー
タは第3図(b)に示すように、スタートコードrSR
BJ 、伝文の長さを表わすrLNGJ 、データrD
ATAJ、「BCC」、検査コードrCHKJからなっ
ている。ここで、スタートコードrsRBJは、BCG
チェック「OK」情報として、例えばrC5Jが用いら
れる。また、r8ccJはICカードでのBCC演算に
使用したBCCデータである。
Here, if the comparison by the comparator 8 matches and it is determined that the BCC check is OK, the control unit 9 commands the BC
Block data to which information indicating C check rOKJ is added is returned to the terminal side. The return data in this case is the start code rSR, as shown in FIG. 3(b).
BJ, rLNGJ representing the message length, data rD
It consists of ATAJ, "BCC", and inspection code rCHKJ. Here, the start code rsRBJ is BCG
For example, rC5J is used as the check "OK" information. Furthermore, r8ccJ is BCC data used for BCC calculation on the IC card.

このようなブロックデータがターミナルに送られると、
次に、ターミナルより継続コマンドが送られてくる。こ
の継続コマンドは第3図(a>で述べたリードコマンド
とほぼ同じ内容のものである。
When such block data is sent to the terminal,
Next, a continuation command is sent from the terminal. This continuation command has almost the same content as the read command described in FIG. 3 (a>).

すると、ICカードでは、ステップA3において、継続
コマンドの内容に基づいてデータメモリ7よりブロック
データの読出しが行なわれ、ステップA4において、B
CCチェックが実行される。
Then, in the IC card, block data is read out from the data memory 7 based on the contents of the continuation command in step A3, and in step A4, the block data is read out from the data memory 7 based on the contents of the continuation command.
A CC check is performed.

この場合、ここでもBCCチェックrOKJが判断され
れば、上述と同様にしてBCCチェック「OK」の旨の
情報「C5」が付加されたブロックデータがターミナル
に返送される。
In this case, if the BCC check rOKJ is determined here as well, the block data to which the information "C5" indicating that the BCC check is "OK" is added is returned to the terminal in the same manner as described above.

以下、同様にして各ブロックデータの読出しごとにBC
Cチェックが実行され、エラーがなければ「C5」が付
加されたブロックデータがターミナルに返送されるよう
になる。
Thereafter, in the same way, BC is set every time each block data is read.
A C check is executed, and if there is no error, the block data with "C5" added will be sent back to the terminal.

ところが、仮にステップA3の、データメモリ7からの
データ読出しにエラーが生じると、ステップA4でのB
CCチェックにおいて、データメモリ7より続出された
データと8CG演算部5にてBCC演算が実行されたデ
ータとは不一致が判定される。すると、今度は制御部9
の指令によりBCGチェックrNGJの旨の情報が付加
されたブロックデータがターミナル側に返送される。こ
の場合の返送データは上述した第3図(b)のものと同
じであるが、スタートコードrsRBJはBCCチェッ
クrNGJ情報として、例えば「C6」が用いられる。
However, if an error occurs in reading data from the data memory 7 in step A3, B in step A4
In the CC check, it is determined that the data successively output from the data memory 7 and the data on which the BCC calculation was performed in the 8CG calculation unit 5 do not match. Then, this time the control section 9
In response to this command, block data to which information indicating BCG check rNGJ is added is returned to the terminal side. The returned data in this case is the same as that shown in FIG. 3(b) described above, but the start code rsRBJ is BCC check rNGJ information, and for example, "C6" is used.

これを受けてターミナルでは、これ以降の継続コマンド
の出力を取消し、ICカードからのデータ読出しを中止
する。
In response to this, the terminal cancels the output of subsequent continuation commands and stops reading data from the IC card.

したがって、このようにすれば、ブロック単位で読出さ
れるデータごとに読出しエラーをチェックすることによ
り、エラーを生じたブロックのデータを直ちに特定する
ことができる。これにより、例えば正常なブロックデー
タまでは、そのまま使用してエラーを発生したブロック
データについての再読出しを実行するなど、次の手当を
直ぐに施すことができるようになり、データエラーの際
の処置を速やかにでき、一連のデータ処理のための能率
を飛躍的に高めることができる。
Therefore, by doing so, by checking read errors for each data read in blocks, it is possible to immediately identify data in a block in which an error has occurred. This makes it possible to immediately take the next steps, such as using normal block data as is and rereading the block data where an error occurred, and taking action in the event of a data error. It can be done quickly, and the efficiency of a series of data processing can be dramatically increased.

なお、この発明は上記実施例にのみ限定されず、要旨を
変更しない範囲で適宜変形して実施できる。
It should be noted that the present invention is not limited to the above-mentioned embodiments, but can be implemented with appropriate modifications without changing the gist.

例えば、上述の実施例では各ブロックデータごとのBC
CチェックのrNGJ情報として、スタートコードrs
RBJを利用するようにしたが、第4図(a)に示すよ
うにスタートコードrsRBJに続く伝文の長さを表わ
すrLNGJの最上位の1ビツトを利用し、ここに「1
」を立てるようにしてもよい。また、このようなデータ
を返送しない場合は、エラーが生じた時点で処理を中断
し、同図(b)に示すようにエラースティタスをターミ
ナルに返送するようにしてもよい。
For example, in the above embodiment, the BC for each block data
As rNGJ information of C check, start code rs
RBJ was used, but as shown in Figure 4(a), the most significant bit of rLNGJ, which represents the length of the message following the start code rsRBJ, is used, and "1" is used here.
” may be displayed. In addition, if such data is not to be returned, the process may be interrupted when an error occurs, and the error status may be returned to the terminal as shown in FIG. 4(b).

[発明の効果] この発明によればブロック単位で読出されるデータごと
に読出しエラーをチェックできるようにしたので、デー
タエラーの際の処置を速やかにでき、データ処理の能率
向上を図ることができるメモリエラーチェック方式を提
供できる。
[Effects of the Invention] According to the present invention, it is possible to check read errors for each data read in blocks, so that it is possible to promptly take action in the event of a data error, and to improve the efficiency of data processing. A memory error checking method can be provided.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例の回路構成を示すブロック
図、第2図は同実施例の動作を説明するためのフローチ
ャート、第3図は同実施例に用いられるデータのリード
コマンドおよび返送データを説明するための構成図、第
4図はこの発明の他の実施例に用いられる返送データを
説明するための構成図である。 3・・・ワーキングRAM、5・・・BCC演算部、5
1・・・ラッチ、7・・・データメモリ、8・・・比較
器、9・・・制御部。 出願人  カシオ計算機株式会社 (a) (b) 第 3 図 (a) (b) 第4図
Fig. 1 is a block diagram showing the circuit configuration of an embodiment of the present invention, Fig. 2 is a flow chart for explaining the operation of the embodiment, and Fig. 3 is a data read command and return command used in the embodiment. FIG. 4 is a configuration diagram for explaining returned data used in another embodiment of the present invention. 3... Working RAM, 5... BCC calculation section, 5
DESCRIPTION OF SYMBOLS 1... Latch, 7... Data memory, 8... Comparator, 9... Control part. Applicant Casio Computer Co., Ltd. (a) (b) Figure 3 (a) (b) Figure 4

Claims (1)

【特許請求の範囲】[Claims] データを複数のブロックに分けて記憶する記憶手段と、
この記憶手段の記憶データをブロック単位で読出すとと
もにこれらブロックデータごとに読出しエラーをチェッ
クするチェック手段と、このチェック手段のチェック結
果により読出しエラー情報を発生するエラー情報発生手
段とを具備したことを特徴とするメモリエラーチェック
方式。
a storage means for storing data divided into multiple blocks;
The present invention is equipped with a checking means for reading the data stored in the storage means block by block and checking for read errors for each block of data, and an error information generating means for generating read error information based on the check result of the checking means. Features a memory error checking method.
JP62000540A 1987-01-07 1987-01-07 Memory error check system Pending JPS63168754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62000540A JPS63168754A (en) 1987-01-07 1987-01-07 Memory error check system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62000540A JPS63168754A (en) 1987-01-07 1987-01-07 Memory error check system

Publications (1)

Publication Number Publication Date
JPS63168754A true JPS63168754A (en) 1988-07-12

Family

ID=11476575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62000540A Pending JPS63168754A (en) 1987-01-07 1987-01-07 Memory error check system

Country Status (1)

Country Link
JP (1) JPS63168754A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0254387A (en) * 1988-08-19 1990-02-23 Toshiba Corp Transmission system for portable electronic device
JPH02156390A (en) * 1988-12-08 1990-06-15 Toshiba Corp Portable electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0254387A (en) * 1988-08-19 1990-02-23 Toshiba Corp Transmission system for portable electronic device
JPH02156390A (en) * 1988-12-08 1990-06-15 Toshiba Corp Portable electronic device

Similar Documents

Publication Publication Date Title
KR0121800B1 (en) Memory card device
US5481552A (en) Method and structure for providing error correction code for 8-byte data words on SIMM cards
JPH03503220A (en) Method and mobile device for checking message integrity
EP0510899B1 (en) Printer control program transfer method and printer capable of receiving a control program
JPS63168754A (en) Memory error check system
JPS623516B2 (en)
JPH0765139A (en) Ic memopry card
JPS603082A (en) Ic card
EP0070184B1 (en) A method of testing memory
JPH03147086A (en) Ic card
JP3088866B2 (en) IC card
JP2910745B2 (en) Storage device and data processing method
JP3130588B2 (en) Storage media
US4783737A (en) PROM writer adapted to accept new writing algorithm
JPH06180674A (en) Data storage device
JP2818628B2 (en) Data recording method in memory card and memory card system
JP3314719B2 (en) Flash EEPROM and its test method
JP2864288B2 (en) Error checking method for IC card
JP2768371B2 (en) Inspection method of random access memory
JP2537198B2 (en) Portable electronic devices
JP2794043B2 (en) Portable electronic devices
JP3098414B2 (en) Load module storage method
JPH02144644A (en) Portable electronic device and method for checking its memory
JP2538906B2 (en) IC card
JP2984126B2 (en) Memory card contact failure detection device