JPH02310642A - Data write system - Google Patents

Data write system

Info

Publication number
JPH02310642A
JPH02310642A JP1131854A JP13185489A JPH02310642A JP H02310642 A JPH02310642 A JP H02310642A JP 1131854 A JP1131854 A JP 1131854A JP 13185489 A JP13185489 A JP 13185489A JP H02310642 A JPH02310642 A JP H02310642A
Authority
JP
Japan
Prior art keywords
write
data
writing
result
bytes
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
JP1131854A
Other languages
Japanese (ja)
Inventor
Yasuo Iijima
康雄 飯島
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1131854A priority Critical patent/JPH02310642A/en
Priority to FR9006531A priority patent/FR2647582A1/en
Publication of JPH02310642A publication Critical patent/JPH02310642A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • G11C16/105Circuits or methods for updating contents of nonvolatile memory, especially with 'security' features to ensure reliable replacement, i.e. preventing that old data is lost before new data is reliably written
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

PURPOSE:To terminate writing even at the time of abnormality in a memory so as to completely prevent the hang-up of a system by supervising the termination of writing with a state signal outputted from the memory and supervising data write time. CONSTITUTION:The head address in an area where there is a write request is subtracted and it is held as a result 1. Then, the result 1 is subtracted from the byte of a data string which is to be written, and it is set to be a result 2. When the result 2 is '0' or negative at that time, the previous number of bytes is used as the number of collective bytes. If not, the result 2 is used. Then, the previous number of bytes is subtracted from the number of write bytes and it is held as the new number of write bytes. Then, a write timer is preset. Data for the number of the collective write bytes are sequentially written into EEPROM 2 from the write head address.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえばICカードのデータメモリなどとし
て用いられる半導体メモリのデータ書込み方式に係り、
特に例えばレディ(Ready) /ビジー(Ilus
y)信号などを備えたメモリへのデータ書込み方式に関
する。
[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention relates to a data writing method of a semiconductor memory used as a data memory of an IC card, etc.
Especially, for example, Ready/Busy (Ilus)
y) relates to a method for writing data into a memory with signals and the like.

(従来の技術) 最近、半導体メモリとして、EPROMに代わり電気的
にデータを消去および書換えが可能であるEEPROM
が注目されている。しかるに、EEPROMは、そのデ
ータ書込み時間がEPROMのそれよりも長いため、各
種の改良がなされている。
(Prior Art) Recently, as a semiconductor memory, EEPROM, which can electrically erase and rewrite data, has replaced EPROM.
is attracting attention. However, since the data writing time of EEPROM is longer than that of EPROM, various improvements have been made.

それらの中の1つとして、内部書込み終了を外部に知ら
せるステータス信号を出力し、外部としての書込み処理
の負荷を軽減させるように設計されたEEFROMが開
発されている。すなわち、外部からEEPROMに対し
て書込みデータを送った後、EEFROMから出力され
る書込み終了ステータス信号をモニタするだけで書込み
終了か否かに容易に判断できる。
As one of these, an EEFROM has been developed which is designed to output a status signal to notify the outside of the completion of internal writing, thereby reducing the external writing processing load. That is, after sending write data to the EEPROM from the outside, it can be easily determined whether or not writing has been completed by simply monitoring the write completion status signal output from the EEFROM.

(発明が解決しようとする課題) しかし、このような方式であると、たとえばEEPRO
Mの異常で、外部から書込みデータを送り、内部書込み
を行ない、終了した際に書込み終了ステータス信号が終
了を意味するレベルにならなかった場合、外部としては
書込ろ終了がわからないだけでなく、その処理にとどま
ってしまうことになるという問題があった。
(Problem to be solved by the invention) However, with such a system, for example, EEPRO
If there is an error in M, write data is sent from the outside, internal writing is performed, and when the write end status signal does not reach the level indicating completion, the external side not only does not know that the write has ended. There is a problem in that the process ends up being stopped.

そこで、本発明は、メモリに異常があった場合において
も、書込み処理を終結させることができ、これを使用す
るシステムのハングアップが完全に防止できるデータ書
込み方式を提供することを目的とする。
SUMMARY OF THE INVENTION Therefore, it is an object of the present invention to provide a data writing method that can terminate the writing process even if there is an abnormality in the memory, and can completely prevent a system using the system from hanging up.

[発明の構成] (課題を解決するための手段) 本発明のデータ書込み方式は、書込みデータを受付ける
手段と、この手段で受付けたデータをメモリに書込む書
込み手段と、前記メモリから出力されるその状態信号に
基づきデータ書込み終了か否かを判断する判断手段と、
前記書込み手段によるデータ書込み時間を監視する時間
監視手段とを具備し、前記判断手段の判断結果および前
記時間監視手段の監視結果により、前記メモリに対する
データ書込み処理を終了することを特徴する。
[Structure of the Invention] (Means for Solving the Problems) The data writing method of the present invention includes a means for accepting write data, a writing means for writing the data accepted by the means into a memory, and a method for writing data output from the memory. a determining means for determining whether data writing is completed based on the status signal;
and time monitoring means for monitoring data writing time by the writing means, and the data writing process to the memory is terminated based on the judgment result of the judgment means and the monitoring result of the time monitoring means.

(作用) メモリから出力されるその状態信号(たとえば書込み終
了ステータス信号)により書込み終了を監視するととも
に、データ書込み時間をも監視することにより、メモリ
に何らかしらの異常があり、たとえば書込み終了ステー
タス信号が終了を意味するレベルにならなかった場合に
おいても、書込み処理を終結させることができ、これを
使用するシステムのハングアップが完全に防止できる。
(Function) By monitoring the completion of writing based on the status signal (for example, write end status signal) output from the memory, and also monitoring the data write time, it is possible to detect if there is some abnormality in the memory, for example, by the write end status signal. Even if the write process does not reach a level that indicates termination, the write process can be terminated, and hang-up of the system using this can be completely prevented.

(実施例) 以下、本発明の一実施例について図面を参照して説明す
る。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.

第2図は、本発明に係るデータ書込み方式が適用される
、たとえばCPUとしてザイログ社製の280タイプを
使用したICカードなどのマイクロコンピュータシステ
ムの構成例を示すものである。すなわち、1はCPU、
2は各種データを記憶するEEPROM、3はCPUI
が動作を行なうだめのプログラムデータなどが記憶され
ているROM (たとえばマスクROM) 、4は動作
の際のワーク用メモリとしてのRAMであり、これらは
アドレスバス5およびデータバス6によって接続されて
いる。
FIG. 2 shows an example of the configuration of a microcomputer system, such as an IC card, to which the data writing method according to the present invention is applied, for example, using a 280 type manufactured by Zilog as a CPU. That is, 1 is the CPU,
2 is EEPROM that stores various data, 3 is CPU
A ROM (for example, a mask ROM) in which program data for performing operations is stored, and a RAM 4 serving as a work memory during operations are connected by an address bus 5 and a data bus 6. .

上記3種のメモリ2,3.4は、CPUIのメモリマツ
プ上に配置されるものであり、CPUIからアドレスバ
ス5に供給されるアドレスデータ、およびCPUIから
のMREQ (メモリリクエスト)信号によりデコーダ
7を介することにより、それぞれのCE(チップイネー
ブル)信号を生成している。
The above three types of memories 2, 3.4 are arranged on the memory map of the CPUI, and the decoder 7 is activated by address data supplied from the CPUI to the address bus 5 and an MREQ (memory request) signal from the CPUI. Each CE (chip enable) signal is generated by

EEPROM2は、その状態信号として内部書込み動作
信号、すなわちR(Ready) / B (Busy
)信号をR/B端子から出力する。このR/B信号は、
トライステートゲート8の入力端に供給されている。ト
ライステートゲート8は、CPUIからのl0RQ (
入出力リクエスト)信号およびRD(リードパルス)信
号を入力とするオア回路9の出力によって制御される。
The EEPROM2 uses an internal write operation signal, namely R (Ready) / B (Busy) as its status signal.
) signal is output from the R/B terminal. This R/B signal is
It is supplied to the input terminal of the tristate gate 8. The tri-state gate 8 receives l0RQ (
It is controlled by the output of an OR circuit 9 which receives input/output request) signals and RD (read pulse) signals.

これにより、トライステートゲート8は、CPUIから
のI ORQ信号およびRD倍信号呼応して、この2つ
の信号が共に“L“となった時間だけゲートが非導通か
ら導通状態になり、その人力に供給されているR/B信
号がデータバス6の第Oビットに供給されるように構成
している。
As a result, the tri-state gate 8 responds to the I ORQ signal and the RD double signal from the CPUI, and the gate changes from non-conductive to conductive for the time period when both these two signals become "L", and the gate changes from non-conductive to conductive. It is configured such that the supplied R/B signal is supplied to the Oth bit of the data bus 6.

次に、このような構成において、CPU1がEEPRO
M2に対してRAMJ上のデータ列を書込む手順を第1
図のフローチャートを参照して説明する。まず、書込み
要求のある領域の先頭アドレス(書込み先頭アドレス)
を、そのアドレスが属しているページの次のページの先
頭アドレスから引き、その結果を結果1として保持して
おく(31)、本実施例で使用すルE E P ROM
 2 i;L、たとえば32バイト/ページのものとし
て説明すると、たとえば$AOOOが書込み先頭アドレ
スであると、次ページの先頭アドレスは$AO20で、
結果1は32バイト、また$AO82が書込み先頭アド
レスであると、次のページの先頭アドレスは$AOAO
で、結果1は30バイトであるといったように計算する
Next, in such a configuration, CPU1
The first step is to write the data string on RAMJ to M2.
This will be explained with reference to the flowchart shown in the figure. First, the start address of the area where the write request is made (write start address)
is subtracted from the first address of the page next to the page to which that address belongs, and the result is held as result 1 (31).
2 i; L, for example, assuming that it is 32 bytes/page. For example, if $AOOO is the write start address, the start address of the next page is $AO20,
Result 1 is 32 bytes, and if $AO82 is the write start address, the start address of the next page is $AOAO.
, result 1 is 30 bytes, and so on.

次に、書込もうとしているデータ列のバイト数から結果
1を引き、その結果を結果2とする(S2)。このとき
、結果2が「0」もしくは負であれば(S3)、一括書
込みバイト数として先の書込みバイト数を用い(S4)
、そうでなければ結果2を用いる(S5)。
Next, the result 1 is subtracted from the number of bytes of the data string to be written, and the result is set as the result 2 (S2). At this time, if result 2 is "0" or negative (S3), the previous write byte count is used as the batch write byte count (S4)
, otherwise use result 2 (S5).

さて、ステップS6においては、書込みバイト数から先
のステップS4またはS5で用いることとした一括書込
みバイト数を引き、新たな書込みバイト数として保持し
ておく。次に、ステップS7において書込み用タイマを
プリセットする。
Now, in step S6, the number of batch write bytes to be used in the previous step S4 or S5 is subtracted from the number of write bytes and held as a new number of write bytes. Next, in step S7, a write timer is preset.

次に、ステップS8において、書込み先頭アドレスから
一括書込みバイト数分のデータを順に、ページ書込み手
順でEEFROM2に書込んでゆく。
Next, in step S8, data corresponding to the number of batch write bytes is sequentially written from the write start address to the EEFROM 2 using a page write procedure.

次に、ステップS9において、I10重量式力命令によ
り得たデータのLSBを見て、“1゜(レディ状態)で
あれば、書込み終了を意味しているのでステップS12
に移り、もし“0° (ビジー状態)となっていれば、
前記書込み用タイマをディクリメントしく510)、タ
イマが「0」となったかを確認する(S 11)。この
確認の結果、もし「0」となっていなければ、再びステ
ップS9に戻り、もし「0」となっていれば、規定時間
内にビジー状態からレディ状態にならなかったとしてエ
ラー処理に移る。
Next, in step S9, the LSB of the data obtained by the I10 gravimetric force command is checked, and if it is "1° (ready state)", it means that the writing is completed, so step S12
If it is “0° (busy)”,
The write timer is decremented (510), and it is checked whether the timer has reached "0" (S11). As a result of this confirmation, if it is not "0", the process returns to step S9, and if it is "0", it is assumed that the state has not changed from the busy state to the ready state within the specified time, and the process moves to error processing.

さて、ステップS12では、先のステップS8で対象と
した書込み先頭アドレス、一括書込みバイト数、および
書込みデータ列を用いてベリファイチェックを行ない、
そのチェック結果がもし否定的であれば(S13)、エ
ラー処理に移る。上記チェック結果がもし肯定的であれ
ば(S 13)、先にステップS6で更新した書込みバ
イト数が「0」か否かを判断しく514)、もし「0」
であれば動作を終了する。もし「0」以外であれば、今
回一括書込み領域の次のアドレスを書込み先頭アドレス
としくS 15) 、ステップS1に戻る。
Now, in step S12, a verify check is performed using the write start address, the number of batch write bytes, and the write data string targeted in step S8,
If the check result is negative (S13), the process moves to error processing. If the above check result is positive (S13), it is determined whether the number of written bytes updated in step S6 is "0" (514), and if it is "0".
If so, the operation ends. If it is other than "0", the next address of the current batch write area is set as the write start address (S15), and the process returns to step S1.

このように、EEFROMから出力されるR/B信号(
書込み終了ステータス信号)により書込み終了を監視す
るとともに、書込み用タイマによりデータ書込み時間を
も監視することにより、EEPROMに何らかしらの異
常があり、R/B信号がビジー状態となった場合におい
ても、書込み処理を終結させることができ、これを使用
するシステムのハングアップが完全に防止できる。
In this way, the R/B signal (
By monitoring the completion of writing using the write completion status signal (write completion status signal) and also monitoring the data write time using the write timer, even if there is some kind of abnormality in the EEPROM and the R/B signal becomes busy, The write process can be terminated, and system hang-ups using this can be completely prevented.

なお、前記実施例におけるEEFROMの仕様として、
R/B端子からのR/B信号による例を示したが、たと
えば、いわゆるデータポーリング(Data Poll
ing)方式のものでもよい。
Note that the specifications of the EEFROM in the above embodiment are as follows:
Although an example using the R/B signal from the R/B terminal has been shown, for example, so-called data polling (Data Polling)
ing) method may also be used.

また、前記実施例中のフローチャートにおいて、ステッ
プS10によってソフトタイマを実現した例を示したが
、たとえばハードタイマにより同様な機能を実現しても
よい。
Further, in the flowchart of the embodiment, an example is shown in which a soft timer is realized in step S10, but a similar function may be realized by, for example, a hard timer.

また、ステップSllにおいて、タイマが「0」となっ
た後のエラー処理については、EEPROMの仕様によ
って何らかしらの方法によりビジー状態をレディ状態に
するなどが望ましい。
Further, in step Sll, regarding error processing after the timer reaches "0", it is desirable to change the busy state to the ready state by some method depending on the specifications of the EEPROM.

[発明の効果] 以上詳述したように本発明によれば、メモリに異常があ
った場合においても、書込み処理を終結させることがで
き、これを使用するシステムのハングアップが完全に防
止できるデータ書込み方式を提供できる。
[Effects of the Invention] As detailed above, according to the present invention, even if there is an abnormality in the memory, the write process can be completed, and the system using the data can be completely prevented from hanging up. Write method can be provided.

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

図は本発明の一実施例を説明するためのもので、第1図
はデータ書込み処理を説明するフローチャート、第2図
はハードウェアの構成例を示すブロック図である。 1−CPU、2・ EEPROM <1−E−U)、3
・・・ROM (メモリ)、4・・・RAM (メモリ
)、5・・・アドレスバス、6・・・データバス、7・
・・デコーダ。 出願人代理人 弁理士 鈴江武彦 11tl!1(a) II 1 am(b)
The drawings are for explaining one embodiment of the present invention; FIG. 1 is a flowchart explaining data writing processing, and FIG. 2 is a block diagram showing an example of a hardware configuration. 1-CPU, 2-EEPROM <1-E-U), 3
...ROM (memory), 4...RAM (memory), 5...address bus, 6...data bus, 7.
··decoder. Applicant's representative Patent attorney Takehiko Suzue 11tl! 1(a) II 1 am(b)

Claims (1)

【特許請求の範囲】 書込みデータを受付ける手段と、 この手段で受付けたデータをメモリに書込む書込み手段
と、 前記メモリから出力されるその状態信号に基づきデータ
書込み終了か否かを判断する判断手段と、前記書込み手
段によるデータ書込み時間を監視する時間監視手段とを
具備し、 前記判断手段の判断結果および前記時間監視手段の監視
結果により、前記メモリに対するデータ書込み処理を終
了することを特徴するデータ書込み方式。
[Scope of Claims] Means for accepting write data; writing means for writing the data accepted by the means into a memory; and determining means for determining whether data writing is completed based on a status signal output from the memory. and time monitoring means for monitoring data writing time by the writing means, and the data writing process to the memory is terminated according to the judgment result of the judgment means and the monitoring result of the time monitoring means. Writing method.
JP1131854A 1989-05-25 1989-05-25 Data write system Pending JPH02310642A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP1131854A JPH02310642A (en) 1989-05-25 1989-05-25 Data write system
FR9006531A FR2647582A1 (en) 1989-05-25 1990-05-25 Process for writing data into a semiconductor memory, and device enabling this process to be implemented

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1131854A JPH02310642A (en) 1989-05-25 1989-05-25 Data write system

Publications (1)

Publication Number Publication Date
JPH02310642A true JPH02310642A (en) 1990-12-26

Family

ID=15067676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1131854A Pending JPH02310642A (en) 1989-05-25 1989-05-25 Data write system

Country Status (2)

Country Link
JP (1) JPH02310642A (en)
FR (1) FR2647582A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122574A (en) * 1997-05-20 2000-09-19 Unisia Jecs Corporation Method for detecting abnormality of control unit and control unit employing same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52119037A (en) * 1976-03-31 1977-10-06 Hitachi Ltd Memory device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63106996A (en) * 1986-10-24 1988-05-12 Hitachi Ltd Semiconductor integrated circuit device
US5053990A (en) * 1988-02-17 1991-10-01 Intel Corporation Program/erase selection for flash memory

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52119037A (en) * 1976-03-31 1977-10-06 Hitachi Ltd Memory device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122574A (en) * 1997-05-20 2000-09-19 Unisia Jecs Corporation Method for detecting abnormality of control unit and control unit employing same

Also Published As

Publication number Publication date
FR2647582B1 (en) 1997-02-07
FR2647582A1 (en) 1990-11-30

Similar Documents

Publication Publication Date Title
US5263168A (en) Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal
JPH02235156A (en) Information processor
JPS63827B2 (en)
US5710734A (en) Semiconductor memory device and data writing method thereof
JPH02310642A (en) Data write system
JPH06274462A (en) Asynchronous writing system for shared memory
JP2858816B2 (en) Initial setting method of EEPROM
JPH03225546A (en) Method for confirming whether option board is mounted or not
JPH11184833A (en) Discrimination method for write termination of microcomputer
JPH0628533A (en) Ic card and data storage method for ic card
JPH0395652A (en) Storage device for duplex system
JPH08305659A (en) Apparatus and method for interfacing with element of specialaccess time
JPS6238743B2 (en)
JPS617954A (en) Reading-out system of main memory
JP2002304329A (en) Semiconductor device
JPH08138016A (en) Ic card
JPH03269753A (en) System address imparting system for terminal machine
JPH07200763A (en) Ic card
JPS61213958A (en) Data transmission system between cpus
KR19990058631A (en) DM Controller
JPS61113193A (en) Write device
JPH09160871A (en) Data transfer controller
JPH04362752A (en) Memory write protection circuit
JPH01316856A (en) Multi-cpu system
JPH07225720A (en) Storage device and data writing method