JP2000231483A - Computer with semiconductor recording medium - Google Patents

Computer with semiconductor recording medium

Info

Publication number
JP2000231483A
JP2000231483A JP3061399A JP3061399A JP2000231483A JP 2000231483 A JP2000231483 A JP 2000231483A JP 3061399 A JP3061399 A JP 3061399A JP 3061399 A JP3061399 A JP 3061399A JP 2000231483 A JP2000231483 A JP 2000231483A
Authority
JP
Japan
Prior art keywords
sector
flash memory
type flash
stored
program
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
JP3061399A
Other languages
Japanese (ja)
Inventor
Ryuichi Ono
隆一 尾野
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.)
Schneider Electric Japan Holdings Ltd
Original Assignee
Digital Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Digital Electronics Corp filed Critical Digital Electronics Corp
Priority to JP3061399A priority Critical patent/JP2000231483A/en
Publication of JP2000231483A publication Critical patent/JP2000231483A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize a computer with a large-capacity semiconductor recording medium to easily change a program. SOLUTION: A mask ROM 4 is provided with areas 41 to 44 in which a first operating system to make access to an AND type flash memory 5 and a first driver, etc., are stored and the AND type flash memory 5 is provided with areas 51 to 53 in which a second operating system used when a graphic operation panel is normally operated and other systems are stored. A CPU 1 executes the first operating system from the mask ROM 4 when it is started, the first operating system reads the second operating system from the AND type flash memory 5 and executes it in place of itself. Thus, the second operating system is stored in the AND type flash memory 5 which is programmable but not randomly accessible and becomes easily changeable.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、例えば、FA( F
actory Automation )用途のように劣悪な周囲環境下で
好適に使用されるコンピュータなど、高い信頼性が要求
される半導体記録媒体を有するコンピュータに関するも
のである。
The present invention relates to, for example, FA (F
The present invention relates to a computer having a semiconductor recording medium that requires high reliability, such as a computer that is preferably used in a poor environment such as an application.

【0002】[0002]

【従来の技術】FA用途のコンピュータのように劣悪な
周囲環境下で好適に使用されるコンピュータでは、信頼
性を向上するために、可動部分を持たない半導体記録媒
体が広く使用されている。半導体記録媒体のうち、演算
処理時の作業用には、RAMなど、揮発性の半導体記録
媒体を使用することができるが、例えば、電源投入時に
動作するプログラム(ブートローダ)は、電力が供給さ
れていない状態でもプログラムを保持する必要があるた
め、不揮発性の半導体記録媒体を使用する必要がある。
2. Description of the Related Art In a computer which is suitably used in a bad environment such as a computer for FA use, a semiconductor recording medium having no movable portion is widely used in order to improve reliability. Among the semiconductor recording media, a volatile semiconductor recording medium such as a RAM can be used for work during arithmetic processing. For example, a program (boot loader) that operates when the power is turned on is supplied with power. Since it is necessary to hold the program even when the program is not present, it is necessary to use a nonvolatile semiconductor recording medium.

【0003】ここで、不揮発性の半導体記録媒体とし
て、マスクROMを使用した場合、1メモリセルを1ト
ランジスタ素子で構成できるため、比較的安価に、大容
量でランダムアクセス可能な媒体を実現できるが、不純
物の注入量やパターン自体などでデータを記憶している
ので書き換えができないという問題がある。この場合、
マスクROM内に記録されたプログラムに不具合が発生
したり、プログラムに必要な機能が変化したりして、プ
ログラムの変更が必要になると、マスクROM自体を交
換する必要がある。この結果、機能の変化や不具合への
迅速な対処が困難になり、半導体記録媒体を有するコン
ピュータの信頼性が低下する虞れがある。
Here, when a mask ROM is used as a non-volatile semiconductor recording medium, one memory cell can be composed of one transistor element, so that a relatively inexpensive, large-capacity, random-access medium can be realized. However, since data is stored based on the amount of implanted impurities or the pattern itself, there is a problem that rewriting cannot be performed. in this case,
When a problem occurs in a program recorded in the mask ROM or a function required for the program changes, and the program needs to be changed, the mask ROM itself needs to be replaced. As a result, it becomes difficult to quickly respond to a change or a malfunction in the function, and there is a possibility that the reliability of the computer having the semiconductor recording medium is reduced.

【0004】これに対して、2素子で1メモリセルを構
成したEEPROMでは、ランダムアクセスおよび書き
換えが可能であるが大容量化が難しい。この結果、半導
体記録媒体を有するコンピュータの機能を向上すること
が困難になる虞れがある。
On the other hand, in an EEPROM in which one memory cell is constituted by two elements, random access and rewriting are possible, but it is difficult to increase the capacity. As a result, it may be difficult to improve the functions of the computer having the semiconductor recording medium.

【0005】近年では、FA用途のコンピュータであっ
ても、例えば、高精度な液晶表示装置とタッチパネルと
によるGUI( Graphical User Interface )などが使
用されることが多く、安価かつ大容量で書き換え可能な
不揮発性の半導体記録媒体が求められている。
In recent years, even for a computer for FA, for example, a GUI (Graphical User Interface) using a high-precision liquid crystal display device and a touch panel is often used, and is inexpensive, large-capacity and rewritable. There is a need for a nonvolatile semiconductor recording medium.

【0006】この要求に応える半導体記録媒体の1つと
して、1メモリセルを1素子で実現したAND型フラッ
シュメモリが挙げられる。上記AND型フラッシュメモ
リでは、消去や書き込みの際に、基板と浮遊ゲートとの
間で電荷が受け渡され、トンネル酸化膜中を電荷が移動
する。一方、電圧が印加されていない状態や読み出しの
際には、上記トンネル酸化膜により基板と浮遊ゲートと
の間が絶縁され、電荷を保持している。
As one of the semiconductor recording media meeting this demand, there is an AND type flash memory in which one memory cell is realized by one element. In the above-mentioned AND type flash memory, at the time of erasing or writing, electric charges are transferred between the substrate and the floating gate, and the electric charges move in the tunnel oxide film. On the other hand, in the state where no voltage is applied or during reading, the tunnel oxide film insulates the substrate from the floating gate and retains electric charge.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記A
ND型フラッシュメモリでは、ランダムアクセス速度が
遅いため、ブロックアクセスするように製造されてお
り、CPUの起動時には、アクセスできないという問題
を生じる。
However, the above A
Since the ND type flash memory has a low random access speed, the ND type flash memory is manufactured so as to perform block access, and there is a problem that the ND type flash memory cannot be accessed when the CPU is started.

【0008】具体的には、上記AND型フラッシュメモ
リでは、メモリセルの構成上、ランダムアクセス速度が
遅いので、AND型フラッシュメモリでは、所定長のセ
クタを単位とするブロックアクセス用の命令が設けられ
ており、当該命令を実行するために、指示されたスター
トアドレスに続くアドレスを順次発生するアドレスカウ
ンタと、順次入力される書き込みデータを蓄積する入力
バッファと、順次読み出されるデータを蓄積する出力バ
ッファとを備えている。これにより、アドレスの指定回
数が削減され、かつ、各メモリセルへのアクセスと外部
の入出力とが並列して実施されるので、フラッシュメモ
リのブロックアクセス時の見かけ上のアクセス速度を向
上できる。
More specifically, in the above-mentioned AND type flash memory, since the random access speed is slow due to the configuration of the memory cell, the AND type flash memory is provided with a block access instruction in units of a predetermined length of sector. In order to execute the instruction, an address counter for sequentially generating an address following the designated start address, an input buffer for storing sequentially input write data, and an output buffer for storing sequentially read data are provided. It has. As a result, the number of address designations is reduced, and access to each memory cell and external input / output are performed in parallel, so that the apparent access speed at the time of block access of the flash memory can be improved.

【0009】ところが、CPUは、従来のRAMやRO
Mなどからもアクセスするように、ランダムアクセスし
ながらプログラムを読み込み、実行するように設定され
ており、起動直後のCPUは、上記AND型フラッシュ
メモリにアクセスできない。
However, the CPU is a conventional RAM or RO.
The program is set so as to read and execute the program while performing random access so that the program can be accessed from the M or the like. The CPU immediately after startup cannot access the AND flash memory.

【0010】この結果、従来のグラフィック操作パネル
では、PLCの制御プログラムがマスクROMに格納可
能であれば、マスクROMに格納し、格納できない場合
は、磁気記録媒体など、可動部を有する記録装置に格納
したりしている。
As a result, in the conventional graphic operation panel, if the PLC control program can be stored in the mask ROM, the control program can be stored in the mask ROM. Or storing it.

【0011】ところが、グラフィック操作パネルをFA
用途で使用する場合、制御対象の近傍など、劣悪な環境
下で使用されることが多く、可動部を有する記録装置を
使用すると、グラフィック操作パネルの信頼性が低下す
る虞れがある。
However, the graphic operation panel is
When used in an application, it is often used in a poor environment such as near a control target, and if a recording device having a movable portion is used, the reliability of the graphic operation panel may be reduced.

【0012】一方、FA用途では、制御対象の規模や数
が大きいため、制御用のプログラムに不具合があった場
合の影響が大きく、不具合は早急に修正する必要がある
が、マスクROMに格納した場合には、プログラムの変
更時にマスクROM自体を交換する必要があり、プログ
ラムの変更が困難である。この結果、グラフィック操作
パネルの信頼性が低下する虞れがある。
On the other hand, in FA applications, since the scale and number of control objects are large, the effect of a defect in the control program is large, and the defect needs to be corrected immediately. In such a case, it is necessary to replace the mask ROM itself when changing the program, and it is difficult to change the program. As a result, the reliability of the graphic operation panel may be reduced.

【0013】また、不具合の発生を防止するために、十
分に検証する必要があり、検証に要する時間や費用も莫
大になると共に、新たなデバイスへの対応や機能の追加
が遅くなる虞れもある。
Further, in order to prevent the occurrence of a defect, it is necessary to perform sufficient verification, so that the time and cost required for the verification become enormous, and there is a possibility that the response to a new device and the addition of a function may be delayed. is there.

【0014】本発明は、上記の問題点に鑑みてなされた
ものであり、その目的は、プログラムの変更が容易で大
容量な、半導体記録媒体を有するコンピュータを実現す
ることにある。
The present invention has been made in view of the above problems, and an object of the present invention is to realize a computer having a large-capacity semiconductor recording medium in which a program can be easily changed.

【0015】[0015]

【課題を解決するための手段】請求項1の発明に係るコ
ンピュータは、起動後の通常処理に実行される主プログ
ラムが格納された半導体記録媒体を有するコンピュータ
であって、上記課題を解決するために、上記主プログラ
ムよりもプログラムサイズが小さく、起動時に演算処理
部によって実行されるブートローダを格納しているマス
クROMを備え、上記半導体記録媒体は、所定長のセク
タを単位としてアクセスされるAND型フラッシュメモ
リであると共に、上記ブートローダは、起動時には、当
該AND型フラッシュメモリへアクセスして、上記演算
処理部へ自らの代わりに上記主プログラムを実行させる
と共に、主プログラムの置き換えが指示された場合、上
記AND型フラッシュメモリに格納された主プログラム
を書き換えることを特徴としている。
According to a first aspect of the present invention, there is provided a computer having a semiconductor recording medium storing a main program to be executed in normal processing after startup. A mask ROM storing a boot loader that is smaller in program size than the main program and executed by an arithmetic processing unit at the time of startup; and wherein the semiconductor recording medium is accessed in units of sectors of a predetermined length. When the boot loader is a flash memory, the boot loader accesses the AND-type flash memory at the time of startup, causes the arithmetic processing unit to execute the main program instead of itself, and when the replacement of the main program is instructed, Rewriting the main program stored in the AND flash memory It is characterized.

【0016】上記構成において、演算処理部は、起動時
にマスクROMからブートローダを読み出して実行する
ことによって、AND型フラッシュメモリがセクタ単位
でアクセスされ、起動直後からアクセス可能なマスクR
OMと同じ方法のランダムアクセスではアクセスできな
いにも拘わらず、主プログラムを読み込むことができ、
当該主プログラムを実行できる。また、AND型フラッ
シュメモリは、比較的容易に大容量化できるので、通常
処理時に必要な機能の増大に伴って、主プログラムのメ
モリ容量が増大したとしても、当該主プログラムを格納
できる。この結果、例えば、劣悪な環境下で使用される
FA用途のコンピュータなど、高い信頼性が要求される
場合に好適に使用される半導体記録媒体を有するコンピ
ュータにおいて、演算処理部の起動直後の動作を変更す
ることなく、マスクROMおよびAND型フラッシュメ
モリを含む半導体記録媒体全体の記録容量を増大でき
る。
In the above configuration, the arithmetic processing unit reads and executes the boot loader from the mask ROM at the time of startup, so that the AND type flash memory is accessed in sector units, and the mask R which can be accessed immediately after startup is provided.
Despite not being able to access by random access in the same way as OM, the main program can be read,
The main program can be executed. Further, since the capacity of the AND flash memory can be relatively easily increased, the main program can be stored even if the memory capacity of the main program increases with the increase in functions required during normal processing. As a result, for example, in a computer having a semiconductor recording medium that is preferably used when high reliability is required, such as a computer for FA used in a poor environment, the operation immediately after the startup of the arithmetic processing unit is performed. Without changing, the recording capacity of the entire semiconductor recording medium including the mask ROM and the AND flash memory can be increased.

【0017】また、ブートローダは、主プログラムに比
べてプログラムサイズが小さく、通常使用時に使用され
る主プログラムの種類に拘わらず、同一のプログラムを
使用できる。この結果、十分に検証されたプログラムを
ブートローダとして使用でき、コンピュータの信頼性を
向上できる。
The boot loader has a smaller program size than the main program, and can use the same program irrespective of the type of the main program normally used. As a result, a sufficiently verified program can be used as a boot loader, and the reliability of the computer can be improved.

【0018】加えて、上記ブートローダは、例えば、主
プログラムに不具合が発生した場合や主プログラムに必
要な機能が変化した場合など、主プログラムの書き換え
が必要になった場合、例えば、キー入力や通信などによ
る使用者の指示を受け取ると、AND型フラッシュメモ
リにアクセスして、主プログラムを書き換える。したが
って、主プログラム全体をマスクROMに格納する場合
よりも容易に、主プログラムを変更できる。この結果、
主プログラムの不具合や必要な機能の変化に速やかに対
処でき、コンピュータの信頼性をさらに向上できる。
In addition, the boot loader is used when the main program needs to be rewritten, for example, when a problem occurs in the main program or when a function necessary for the main program changes, for example, by key input or communication. When a user's instruction is received, for example, the AND flash memory is accessed to rewrite the main program. Therefore, the main program can be changed more easily than when the entire main program is stored in the mask ROM. As a result,
The failure of the main program and the change of the required function can be promptly dealt with, and the reliability of the computer can be further improved.

【0019】なお、ブートローダがAND型フラッシュ
メモリ内のプログラムを書き換えることができるので、
例えば、新たに追加されたデバイスのドライバなど、十
分に検証されておらず、不具合が発見されやすいプログ
ラムをAND型フラッシュメモリ内に格納すれば、書き
換えにチップの交換を必要とするマスクROMから当該
プログラムを除去でき、コンピュータの信頼性を低下さ
せることなく、新たなデバイスを追加できる。
Since the boot loader can rewrite the program in the AND type flash memory,
For example, if a program, such as a driver for a newly added device, which has not been sufficiently verified and a defect is easily detected is stored in an AND flash memory, the mask ROM that requires replacement of a chip for rewriting will be used. Programs can be removed and new devices can be added without compromising computer reliability.

【0020】[0020]

【発明の実施の形態】本発明の一実施形態について図1
ないし図6に基づいて説明すると以下の通りである。す
なわち、本実施形態に係るグラフィック操作パネルは、
例えば、液晶表示装置と表示画面上に形成されたタッチ
パネルとなど、可動部を持たない入出力装置を備え、例
えば、FA用途において、プログラマブル・ロジック・
コントローラ(PLC)から受け取った制御対象機器の
情報を表示すると共に、オペレータの指示をPLCへ伝
える場合など、劣悪な周囲環境での安定動作が要求され
る場合に好適に使用されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows an embodiment of the present invention.
The following is a description based on FIG. That is, the graphic operation panel according to the present embodiment includes:
For example, an input / output device having no moving parts, such as a liquid crystal display device and a touch panel formed on a display screen, is provided.
It is suitably used when stable operation in a poor surrounding environment is required, such as when displaying information on a control target device received from a controller (PLC) and transmitting an operator's instruction to the PLC.

【0021】上記グラフィック操作パネルは、例えば、
図1に示すように、演算処理部となるCPU1と、CP
U1が動作する際の作業領域などとして使用されるRA
M2と、例えば、SIO( Serial Input / Output)ポ
ート、IrDA( Infrared Data Association )ポー
ト、あるいはイーサネット(商標:ゼロックス社)ポー
トなど、外部と通信するための外部インタフェース部3
と、起動時にCPU1が参照するマスクROM4とを備
えている。さらに、本実施形態に係るグラフィック操作
パネルには、書き換え可能な不揮発性の記録媒体とし
て、AND型フラッシュメモリ5が設けられている。当
該AND型フラッシュメモリ5は、OR型など、他の型
のフラッシュメモリに比べて、低コストでメモリ容量を
増大させやすく、さらに、フロッピーディスクドライブ
などとは異なり、可動部を持たないので、劣悪な周囲環
境でも安定動作できる。
The graphic operation panel includes, for example,
As shown in FIG. 1, a CPU 1 serving as an arithmetic processing unit and a CP 1
RA used as a work area when U1 operates
M2 and an external interface unit 3 for communicating with the outside, such as an SIO (Serial Input / Output) port, an IrDA (Infrared Data Association) port, or an Ethernet (trademark: Xerox Corporation) port
And a mask ROM 4 referred to by the CPU 1 at startup. Further, the graphic operation panel according to the present embodiment is provided with an AND flash memory 5 as a rewritable nonvolatile recording medium. The AND type flash memory 5 has a low cost and is easy to increase the memory capacity as compared with other types of flash memories such as an OR type. Further, unlike a floppy disk drive or the like, the AND type flash memory 5 does not have a movable part, and therefore is inferior. It can operate stably even in a surrounding environment.

【0022】より詳細に説明すると、上記AND型フラ
ッシュメモリでは、消去や書き込みの際に、基板と浮遊
ゲートとの間で電荷が受け渡され、トンネル酸化膜中を
電荷が移動する。一方、電圧が印加されていない状態や
読み出しの際には、上記トンネル酸化膜により基板と浮
遊ゲートとの間が絶縁され、電荷を保持している。
More specifically, in the above-mentioned AND type flash memory, at the time of erasing or writing, electric charges are transferred between the substrate and the floating gate, and the electric charges move through the tunnel oxide film. On the other hand, in the state where no voltage is applied or during reading, the tunnel oxide film insulates the substrate from the floating gate and retains electric charge.

【0023】上記AND型フラッシュメモリの記録容量
を増加させるためには、集積度を向上させる必要があ
り、トンネル酸化膜の膜厚を薄くすることが求められる
が、トンネル酸化膜の膜厚を薄くすれば、長期間電荷を
保持することが難しくなる。特に、上記AND型フラッ
シュメモリでは、消去や書き込みの際にトンネル酸化膜
中を電荷が移動して、トンネル酸化膜が劣化する虞れが
ある。したがって、上記トンネル酸化膜の膜厚は、劣化
を見込んで設定する必要がある。さらに、トンネル酸化
膜の膜厚は、製造時のプロセスバラツキによって変動す
るため、マージンを低く設定すると、歩留りが低下して
しまう。これらの結果、情報記録の信頼性を向上させる
ためには、余りトンネル酸化膜の膜厚を薄く設定できな
い。
In order to increase the recording capacity of the above-mentioned AND type flash memory, it is necessary to increase the degree of integration, and it is required to reduce the thickness of the tunnel oxide film. Then, it becomes difficult to hold the charge for a long time. In particular, in the above-mentioned AND type flash memory, when erasing or writing, electric charges move in the tunnel oxide film, and there is a possibility that the tunnel oxide film is deteriorated. Therefore, the thickness of the tunnel oxide film needs to be set in consideration of deterioration. Furthermore, since the thickness of the tunnel oxide film varies due to process variations at the time of manufacturing, setting a low margin lowers the yield. As a result, the thickness of the tunnel oxide film cannot be set too small in order to improve the reliability of information recording.

【0024】ここで、本実施形態に係るAND型フラッ
シュメモリ5は、大容量化を達成するために、トンネル
酸化膜の膜圧が比較的薄く設定されており、上記EEP
ROMに比べて、初期不良や経時劣化、あるいは、アク
セスの繰り返しに起因する不良などが発生する確率が高
くなっている。したがって、図2に示すように、AND
型フラッシュメモリ5は、冗長な構成となっており、各
セクタSは、データを格納するデータエリアDAに加え
て、例えば、データエリアDAの誤り訂正符号(EC
C)など、当該セクタSの制御情報が格納される制御エ
リアCAを備えている。
Here, in the AND type flash memory 5 according to the present embodiment, the film thickness of the tunnel oxide film is set to be relatively thin in order to achieve a large capacity.
Compared with the ROM, the probability of occurrence of initial failure, deterioration with time, or failure due to repeated access is higher. Therefore, as shown in FIG.
The flash memory 5 has a redundant configuration, and each sector S has, for example, an error correction code (EC) in the data area DA in addition to the data area DA for storing data.
C), for example, a control area CA in which control information of the sector S is stored.

【0025】また、上記AND型フラッシュメモリ5
は、例えば、64Mビットや256Mビット以上と、大
きな記録容量を持っている一方で、ランダムアクセス速
度が遅い。したがって、上記AND型フラッシュメモリ
5では、所定長のセクタSを単位とするブロックアクセ
ス用の命令が設けられており、当該命令を実行するため
に、指示されたスタートアドレスに続くアドレスを順次
発生するアドレスカウンタと、順次入力される書き込み
データを蓄積する入力バッファと、順次読み出されるデ
ータを蓄積する出力バッファとを備えている。これによ
り、アドレスの指定回数が削減され、かつ、各メモリセ
ルへのアクセスと外部の入出力とが並列して実施される
ので、AND型フラッシュメモリ5のブロックアクセス
時の見かけ上のアクセス速度を向上できる。
The AND flash memory 5
Has a large recording capacity of, for example, 64 Mbits or 256 Mbits or more, but has a low random access speed. Therefore, in the AND type flash memory 5, an instruction for block access is provided in units of a predetermined length of sector S, and in order to execute the instruction, an address subsequent to the designated start address is sequentially generated. An address counter, an input buffer for storing sequentially input write data, and an output buffer for storing sequentially read data are provided. As a result, the number of address designations is reduced, and access to each memory cell and external input / output are performed in parallel, so that the apparent access speed at the time of block access of the AND-type flash memory 5 is reduced. Can be improved.

【0026】図2に例示するAND型フラッシュメモリ
5では、メモリ容量(全データエリアDAの容量)が6
4Mビットであり、セクタ長(データエリアDAの長
さ)が512バイト、制御エリアCAの長さが16バイ
トに設定されている。この場合、全セクタ数は、163
84セクタであり、各セクタSを特定するセクタアドレ
スは、0000H〜3FFFH(数字の末尾のHあるい
は先頭の0xはその数字が16進数であることを示す)
の範囲となる。また、出荷時には、16384セクタの
うち、16057セクタを使用できることが保証されて
いる。
In the AND type flash memory 5 illustrated in FIG. 2, the memory capacity (the capacity of the entire data area DA) is 6
4 Mbits, the sector length (the length of the data area DA) is set to 512 bytes, and the length of the control area CA is set to 16 bytes. In this case, the total number of sectors is 163
The sector address for specifying each sector S is 0000H to 3FFFFH (H at the end of the number or 0x at the beginning indicates that the number is a hexadecimal number).
Range. At the time of shipment, it is guaranteed that 16057 sectors out of 16384 sectors can be used.

【0027】当該AND型フラッシュメモリ5では、上
記RAM2やマスクROM4などランダムアクセス可能
な半導体記録媒体とは異なり、上述したように、読み込
みあるいは書き込みなどのアクセスは、セクタSを単位
として行われ、当該セクタS全体を読み書きするシリア
ルリード命令r1およびプログラム命令p1が設けられ
ている。さらに、上記制御エリアCAへアクセスするた
めに、シリアルリード命令r2、プログラム命令p3も
設けられている。当該命令r2・p3では、制御エリア
CAのみが読み出されるため、データエリアDAとは用
途が異なり、単独でアクセスする可能性がある制御エリ
アCAへのアクセス速度を、セクタS全体を読み書きす
る場合よりも向上できる。なお、上記各プログラム命令
p1・p3では、書き込む前に、消去が行われるが、消
去のみを行う消去命令e1や、予め消去されている場合
に使用され、消去せずに書き込むプログラム命令p2な
ども規定されている。
In the AND type flash memory 5, unlike a random access semiconductor recording medium such as the RAM 2 or the mask ROM 4, access such as reading or writing is performed in units of the sector S as described above. A serial read instruction r1 for reading and writing the entire sector S and a program instruction p1 are provided. Further, a serial read instruction r2 and a program instruction p3 are provided for accessing the control area CA. In the instruction r2 · p3, since only the control area CA is read, the application speed is different from that of the data area DA, and the access speed to the control area CA, which may be accessed independently, is set higher than when reading / writing the entire sector S. Can also be improved. In each of the program instructions p1 and p3, erasing is performed before writing. However, an erasing instruction e1 for performing erasing only, and a program instruction p2 used when erasing has been performed in advance and writing without erasing are also included. Stipulated.

【0028】ここで、本実施形態に係るCPU1は、従
来のランダムアクセス可能な半導体記録媒体でも使用で
きるように、電源投入時などの起動時に、所定のアドレ
スへアクセスした後、当該アドレスに格納されたデータ
(例えば、命令や割り込みベクトルなど)に従って、当
該記録媒体をランダムアクセスしながら、記録媒体に格
納されたプログラムを実行するように設計されている。
したがって、本実施形態に係るグラフィック操作パネル
では、電源投入時に、CPU1が起動時にアクセスする
メモリ空間にマスクROM4が配されており、電源投入
時に従来と同様の方法でメモリへアクセスするCPU1
であっても、何ら支障なく、マスクROM4内のプログ
ラムを実行できる。
Here, the CPU 1 according to the present embodiment accesses a predetermined address at the time of start-up such as when power is turned on so that it can be used even with a conventional random-accessible semiconductor recording medium, and then stores it at the address. It is designed to execute a program stored in a recording medium while randomly accessing the recording medium in accordance with the data (for example, an instruction or an interrupt vector).
Therefore, in the graphic operation panel according to the present embodiment, when the power is turned on, the mask ROM 4 is arranged in the memory space accessed by the CPU 1 at the time of startup, and when the power is turned on, the CPU 1 accesses the memory in the same manner as the conventional method.
However, the program in the mask ROM 4 can be executed without any problem.

【0029】上記マスクROM4は、図1に示すよう
に、起動時に動作する第1オペレーティングシステム
(OS)が格納された第1OS格納領域41と、上記A
ND型フラッシュメモリ5へアクセスするためドライバ
やAND型フラッシュメモリ5へ正常にアクセスできな
い場合、その代わりに使用される外部インタフェース部
3へアクセスするためのドライバなど、必須の第1ドラ
イバが格納された第1ドライバ格納領域42と、AND
型フラッシュメモリ5内のデータをファイルとして操作
するためのプログラムが格納されたファイルシステム処
理プログラム格納領域43と、AND型フラッシュメモ
リ5に格納される第2OSを書き換える書き換えプログ
ラムが格納された第2OS書き換えプログラム格納領域
44とを備えている。なお、上記第1OSが特許請求の
範囲に記載のブートローダに対応し、上記第2OSが主
プログラムに対応する。
As shown in FIG. 1, the mask ROM 4 includes a first OS storage area 41 in which a first operating system (OS) operating at the time of startup is stored, and
When a driver for accessing the ND type flash memory 5 or a normal access to the AND type flash memory 5 cannot be normally performed, an essential first driver such as a driver for accessing the external interface unit 3 used instead is stored. A first driver storage area 42, AND
System processing program storage area 43 in which a program for operating data in the flash memory 5 as a file is stored, and a second OS rewrite in which a rewrite program for rewriting a second OS stored in the AND flash memory 5 is stored. And a program storage area 44. Note that the first OS corresponds to a boot loader described in the claims, and the second OS corresponds to a main program.

【0030】上記各領域41〜44には、起動時に必須
のプログラムが十分に検証された上で格納されており、
検証が不十分なプログラムは、例えば、IrDAポート
用のドライバなど、外部インタフェース部3のドライバ
であってもAND型フラッシュメモリ5に格納される。
なお、マスクROM4には、起動時、すなわち、電源を
投入してから後述する第2OSをAND型フラッシュメ
モリ5から読み出して実行するまでに必須のプログラム
のみを格納できればよいので、グラフィック操作パネル
の通常動作時に動作する第2OSに比べてプログラムの
規模を縮小でき、十分に検証することができる。また、
マスクROM4には、例えば、フォントなど、変更しな
いデータを格納してもよい。
In each of the areas 41 to 44, essential programs at the time of startup are stored after being sufficiently verified.
The insufficiently verified program is stored in the AND-type flash memory 5 even if it is a driver of the external interface unit 3 such as a driver for an IrDA port.
Note that the mask ROM 4 only needs to be able to store only essential programs at the time of startup, that is, from when the power is turned on to when a second OS described later is read from the AND-type flash memory 5 and executed. The size of the program can be reduced as compared with the second OS operating at the time of operation, and sufficient verification can be performed. Also,
The mask ROM 4 may store data that does not change, such as fonts.

【0031】一方、上記AND型フラッシュメモリ5に
は、外部インタフェース部3のドライバのうち、必須で
はないドライバや検証が不十分なドライバなど、変更す
る可能性がある第2ドライバを格納する第2ドライバ格
納領域51と、グラフィック操作パネルの通常動作時に
おいて、上記第1OSに代えて実行される第2OSが格
納される第2OS格納領域52と、第2OS上で実行さ
れる種々のプログラムが格納されるアプリケーション格
納領域53とが設けられている。
On the other hand, the AND flash memory 5 stores a second driver that may be changed, such as an indispensable driver or a driver whose verification is insufficient among the drivers of the external interface unit 3. A driver storage area 51, a second OS storage area 52 for storing a second OS executed in place of the first OS during normal operation of the graphic operation panel, and various programs executed on the second OS are stored. Application storage area 53 is provided.

【0032】これらの各領域51〜53内のプログラム
は、グラフィック操作パネルに要求される様々な機能を
実現するために、マスクROM4内のプログラムに比べ
て、プログラムの規模が大きいことが多く、新しい外部
インタフェース部3などに対応するため、検証期間が短
いこともある。ところが、後述するように、AND型フ
ラッシュメモリ5内の各プログラムは、マスクROM4
内のプログラムとは異なり、AND型フラッシュメモリ
5をグラフィック操作パネルに装着したままで第1OS
を用いて変更できる。したがって、プログラムに不具合
が見つかった場合や要求される機能が変更された場合で
も迅速に対応できる。この結果、グラフィック操作パネ
ルの信頼性を低下させることなく、新たな機能を追加し
たり、機能を変更したりできる。
The programs in these areas 51 to 53 are often larger in size than the programs in the mask ROM 4 in order to realize various functions required for the graphic operation panel. The verification period may be short to accommodate the external interface unit 3 or the like. However, as described later, each program in the AND-type flash memory 5 is stored in the mask ROM 4.
Is different from the program in the first OS, while the AND flash memory 5 is mounted on the graphic operation panel, the first OS
Can be changed using. Therefore, even if a defect is found in the program or a required function is changed, it is possible to quickly respond. As a result, new functions can be added or functions can be changed without lowering the reliability of the graphic operation panel.

【0033】ここで、上述したように、AND型フラッ
シュメモリ5は、アクセスの繰り返しによってトンネル
酸化膜が劣化するので、ビット誤りが蓄積される。した
がって、誤り訂正符号を用いたとしても、同じ位置に格
納したデータの信頼性を長期間、高いレベルに維持する
ことが難しい。したがって、本実施形態に係る第1ドラ
イバ格納領域42内のドライバは、AND型フラッシュ
メモリ5内のセクタSへアクセスする際に誤りを検出す
ると、誤り訂正符号で訂正可能な範囲に誤り量が納まっ
ている間に、当該セクタSを不良セクタとして登録し、
訂正後の正しい情報をスペアセクタSSへ格納するよう
に構成されている。また、当該ドライバは、アクセスす
べきセクタSが不良セクタであった場合、当該セクタS
を代替するスペアセクタSSへアクセスする。これによ
り、AND型フラッシュメモリ5の信頼性を長期間高い
レベルで維持できる。
As described above, in the AND flash memory 5, bit errors are accumulated because the tunnel oxide film is deteriorated by repeated access. Therefore, even if an error correction code is used, it is difficult to maintain the reliability of data stored in the same position at a high level for a long time. Therefore, when the driver in the first driver storage area 42 according to the present embodiment detects an error when accessing the sector S in the AND-type flash memory 5, the error amount falls within a range that can be corrected by the error correction code. While registering the sector S as a bad sector,
The corrected correct information is stored in the spare sector SS. If the sector S to be accessed is a bad sector, the driver
To the spare sector SS that substitutes Thereby, the reliability of the AND flash memory 5 can be maintained at a high level for a long time.

【0034】具体的には、図3に示すように、上記AN
D型フラッシュメモリ5は、不良が発生していない場合
にアクセスされるデータセクタDSを格納するデータセ
クタ領域61と、不良セクタを代替するスペアセクタS
Sが格納されるスペアセクタ領域62と、データセクタ
DSとスペアセクタSSとの対応を示すテーブルセクタ
TSが記録されるバッドセクタテーブル領域63とに分
割されている。
Specifically, as shown in FIG.
The D-type flash memory 5 includes a data sector area 61 for storing a data sector DS to be accessed when no defect occurs, and a spare sector S for replacing the defective sector.
It is divided into a spare sector area 62 where S is stored, and a bad sector table area 63 where a table sector TS indicating the correspondence between the data sector DS and the spare sector SS is recorded.

【0035】なお、以下では、各データセクタDSを特
定する場合、データセクタ領域61の始め(セクタアド
レスの小さい方)から順番に付したデータセクタ番号d
nで区別し、各スペアセクタSSを特定する場合、スペ
アセクタ領域62の始めから順番に付したスペアセクタ
番号snで区別する。一方、バッドセクタテーブル領域
63では、各テーブルセクタTSを特定するテーブルセ
クタ番号tnが、バッドセクタテーブル領域63の末尾
から順番に付されている。また、各セクタSを区別する
場合は、例えば、データセクタ番号dnが1のデータセ
クタDSは、データセクタDS1 などように、各セクタ
番号dn・sn・tnを添字で付して表現する。
In the following, when each data sector DS is specified, the data sector number d is assigned in order from the beginning of the data sector area 61 (smallest sector address).
In the case where each spare sector SS is identified by n, the spare sector is identified by a spare sector number sn which is sequentially assigned from the beginning of the spare sector area 62. On the other hand, in the bad sector table area 63, a table sector number tn for specifying each table sector TS is assigned in order from the end of the bad sector table area 63. Further, for distinguishing each sector S, for example, data sectors DS data sector number dn is 1, such as data sectors DS 1, representing assigned the respective sector numbers dn · sn · tn subscripts.

【0036】上記バッドセクタテーブル領域63には、
各データセクタDSのデータセクタ番号dnに対応する
位置に、それぞれを代替するスペアセクタSSのスペア
セクタ番号(対応情報)snが格納されている。本実施
形態では、スペアセクタ番号を2バイトで表現できるた
め、各テーブルセクタTSには、256個のスペアセク
タ番号が格納できる。したがって、例えば、データセク
タDS2 に対応するスペアセクタ番号sn(この例で
は、1)は、テーブルセクタTS1 の2番目(第3バイ
トから第4バイトまで)に格納されている。また、この
例では、他のデータセクタDSは、不良セクタではない
ため、テーブルセクタTS1 の残余のバイトは、スペア
セクタSSが対応していないことを示す値(この例で
は、0)が格納されている。
In the bad sector table area 63,
At a position corresponding to the data sector number dn of each data sector DS, a spare sector number (corresponding information) sn of the spare sector SS that substitutes each is stored. In the present embodiment, since the spare sector number can be represented by 2 bytes, each table sector TS can store 256 spare sector numbers. Thus, for example, (in this example, 1) spare sector number sn corresponding to the data sector DS 2 is stored in the second table sector TS 1 (from the third byte to the fourth byte). In this example, the other data sectors DS, not a bad sector, the remaining bytes of the table sector TS 1 (in this example, 0) value indicating that the spare sectors SS does not correspond is stored ing.

【0037】また、各セクタSの制御エリアCAは、そ
れぞれ、図4に示す良否識別領域71、セクタ番号領域
72、消去回数領域73、用途識別領域74、制御エリ
アECC領域75およびデータエリアECC領域76に
分割されている。
The control area CA of each sector S includes a pass / fail identification area 71, a sector number area 72, an erase count area 73, a use identification area 74, a control area ECC area 75, and a data area ECC area shown in FIG. 76.

【0038】上記良否識別領域71は、当該セクタSが
不良セクタであるか否かを示す良否識別コードが格納さ
れている。各良否識別コードは、例えば、各コード間の
ハミング距離を十分に長く設定するなどして、アクセス
時にビットエラーが発生しても、それぞれを区別できる
ように決定されている。例えば、本実施形態では、良否
識別領域71が第1〜第3バイト目までの3バイト幅に
設定されており、各良否識別コードとして、正常を示す
コード、初期不良を示すコード、2ビット誤りを示すコ
ード、1ビット誤りを示すコード、並びに、書き込みや
消去に失敗したことを示すコードが決められている。
The pass / fail identification area 71 stores a pass / fail identification code indicating whether or not the sector S is a bad sector. Each pass / fail identification code is determined, for example, by setting the hamming distance between the codes to be sufficiently long, so that even if a bit error occurs at the time of access, the respective codes can be distinguished. For example, in the present embodiment, the pass / fail identification area 71 is set to have a 3-byte width of the first to third bytes, and each pass / fail identification code is a code indicating normality, a code indicating initial failure, and a 2-bit error. , A code indicating a one-bit error, and a code indicating that writing or erasing has failed.

【0039】また、セクタ番号領域72は、セクタ番号
dnまたはtnを格納するために、第4および第5バイ
ト目の2バイト幅に設定されており、データセクタDS
の場合、データセクタ番号dnが格納され、テーブルセ
クタTSの場合は、テーブルセクタ番号tnが格納され
る。一方、スペアセクタSSで、データセクタDSを代
替している場合は、当該データセクタDSのデータセク
タ番号dn、テーブルセクタTSを代替している場合
は、当該テーブルセクタTSのテーブルセクタ番号(セ
クタ情報)tnが格納される。また、スペアセクタSS
が、いずれのセクタSをも代替していない場合は、代替
していないことを示す値が格納される。
The sector number area 72 is set to have a 2-byte width of the fourth and fifth bytes in order to store the sector number dn or tn.
, The data sector number dn is stored, and in the case of the table sector TS, the table sector number tn is stored. On the other hand, when the spare sector SS replaces the data sector DS, the data sector number dn of the data sector DS, and when the spare sector SS replaces the table sector TS, the table sector number of the table sector TS (sector information). tn is stored. Also, the spare sector SS
However, if none of the sectors S has been replaced, a value indicating that the sector S has not been replaced is stored.

【0040】さらに、上記消去回数領域73には、消去
回数(書き換え回数)が格納されている。AND型フラ
ッシュメモリ5では、正常に書き換えできると保証され
ている回数が例えば、10万回程度であり、この回数を
越えて書き換えた場合、正常な書き換えが保証されな
い。したがって、書き換え毎に消去回数領域73に格納
されているカウント値を増加させ、当該カウント値が所
定の値を越えた場合、スペアセクタSSで代替するなど
すれば、書き換え回数の超過に起因するアクセス不良を
事前に防止できる。また、用途識別領域74には、当該
セクタSが、データセクタDSであるか、スペアセクタ
SSであるか、テーブルセクタTSであるかを示すコー
ドが格納されている。
Further, the erase count area 73 stores the erase count (rewrite count). In the AND-type flash memory 5, the number of times that normal rewriting is guaranteed is, for example, about 100,000 times. If rewriting is performed beyond this number, normal rewriting is not guaranteed. Therefore, the count value stored in the erase count area 73 is increased each time rewriting is performed, and if the count value exceeds a predetermined value, replacement with a spare sector SS is performed. Can be prevented in advance. Further, the application identification area 74 stores a code indicating whether the sector S is a data sector DS, a spare sector SS, or a table sector TS.

【0041】ところで、上述したように、AND型フラ
ッシュメモリ5では、初期不良あるいは経時変化によっ
て、ビット誤りが発生する。したがって、ビット誤りが
発生しても、誤りを訂正できるように、制御エリアCA
およびデータセクタDSが誤り訂正符号(ECC)で符
号化されており、制御エリアCAには、それぞれの誤り
訂正符号を格納するために、制御エリアECC領域75
およびデータエリアECC領域76が設けられている。
上記制御エリアECC領域75は、第9および第10バ
イト目の2バイト幅に設定され、上記各領域71〜74
の誤り訂正符号を格納している。また、データエリアE
CC領域76は、第13〜第16バイト目までの4バイ
トである。
As described above, in the AND flash memory 5, a bit error occurs due to an initial failure or a change with time. Therefore, even if a bit error occurs, the control area CA
And the data sector DS are encoded with an error correction code (ECC). In the control area CA, a control area ECC area 75 is provided to store the respective error correction codes.
And a data area ECC area 76.
The control area ECC area 75 is set to have a two-byte width of the ninth and tenth bytes, and each of the areas 71 to 74 is set.
Is stored. Data area E
The CC area 76 is 4 bytes from the 13th to the 16th bytes.

【0042】本実施形態では、例えば、1ビット誤りを
訂正可能で、2ビット誤りを検出可能な誤り訂正符号が
使用されており、図1に示す第1ドライバ格納領域42
に格納されたドライバは、セクタSへアクセスする際
に、上記各ECC領域75・76を参照して、ビット誤
りを検出し、発生したビット誤りが検出可能なうちに、
当該セクタSの正しい情報を当該セクタSのスペアセク
タSSへ格納すると共に、当該セクタSに関連するテー
ブルセクタTS(または、そのスペアセクタSS)を更
新して、正しいスペアセクタ番号snを格納する。
In this embodiment, for example, an error correction code capable of correcting a one-bit error and detecting a two-bit error is used, and the first driver storage area 42 shown in FIG.
When accessing the sector S, the driver detects a bit error with reference to the ECC areas 75 and 76, and, while the generated bit error can be detected,
The correct information of the sector S is stored in the spare sector SS of the sector S, and the table sector TS related to the sector S (or the spare sector SS) is updated to store the correct spare sector number sn.

【0043】ここで、データセクタDS(または、その
スペアセクタSS)にビット誤りが検出された場合、ス
ペアセクタ領域62の先頭(物理アドレスの小さい方)
から順番に、空いているスペアセクタSSが探索され、
発見されたスペアセクタSSが、データセクタDS(ま
たは、そのスペアセクタSS)を代替する。また、テー
ブルセクタTS(または、そのスペアセクタSS)にビ
ット誤りが検出された場合、スペアセクタ領域62の末
尾から順番に、空いているスペアセクタSSが探索さ
れ、発見されたスペアセクタSSでテーブルセクタTS
(または、そのスペアセクタSS)を代替する。
Here, if a bit error is detected in the data sector DS (or its spare sector SS), the head of the spare sector area 62 (the smaller physical address)
Vacant spare sectors SS are searched in order from
The found spare sector SS replaces the data sector DS (or the spare sector SS). When a bit error is detected in the table sector TS (or its spare sector SS), a vacant spare sector SS is searched in order from the end of the spare sector area 62, and the found spare sector SS is used as the table sector TS.
(Or its spare sector SS).

【0044】本実施形態では、スペアセクタ領域62に
おいて、データセクタDSのスペアセクタSSと、テー
ブルセクタTSのスペアセクタSSとが、互いに異なる
端部から順番に割り当てられるので、空いているスペア
セクタSSは、両者の間に配される。この結果、それぞ
れに専用のスペアセクタ領域を設ける場合とは異なっ
て、不良セクタの発生場所に拘わらず、それぞれの端部
から空いているスペアセクタSSを探索するだけで、ス
ペアセクタ領域62を使い切ることができる。
In the present embodiment, in the spare sector area 62, the spare sector SS of the data sector DS and the spare sector SS of the table sector TS are sequentially assigned from different ends, so that the vacant spare sector SS Arranged in between. As a result, unlike the case where a dedicated spare sector area is provided for each, the spare sector area 62 can be used up only by searching for an empty spare sector SS from each end regardless of the location of the defective sector. .

【0045】このように、第1ドライバ格納領域42に
格納されたドライバは、不良セクタをスペアセクタSS
で代替しているので、いずれの物理アドレスに配された
セクタSに不良が発生するかを予測しにくいAND型フ
ラッシュメモリ5において、いずれのセクタSに不良が
発生しても、各論理セクタへ格納される情報を損なうこ
となく保持できる。
As described above, the driver stored in the first driver storage area 42 replaces the defective sector with the spare sector SS.
In the AND-type flash memory 5 in which it is difficult to predict which sector S allocated to which physical address is defective, even if a defective sector S occurs, the logical sector is The stored information can be retained without loss.

【0046】さらに、データセクタDSが論理セクタに
対応するアドレスに配されているので、論理アドレスか
らデータセクタDSのアドレスへ変換する際、テーブル
などを参照する必要がない。したがって、当該論理アド
レスに対応するデータセクタDSが正常であれば、当該
データセクタDSへアクセスするだけでよく、スペアセ
クタSSで不良セクタを代替しているにも拘わらず、ア
クセス速度を代替しない場合と同等に保つことができ
る。また、アクセスするセクタ数が少ないので、不良セ
クタに遭遇する可能性も低く、テーブルを参照する場合
よりも、アクセス速度を向上できる。
Further, since the data sector DS is arranged at the address corresponding to the logical sector, there is no need to refer to a table or the like when converting the logical address to the address of the data sector DS. Therefore, if the data sector DS corresponding to the logical address is normal, it is only necessary to access the data sector DS, and there is a case where the access speed is not substituted despite the replacement of the defective sector by the spare sector SS. Can be kept equal. Further, since the number of sectors to be accessed is small, the possibility of encountering a bad sector is low, and the access speed can be improved as compared with the case of referring to the table.

【0047】また、データセクタDSが不良セクタの場
合は、当該データセクタDSに対応するアドレスに配さ
れたテーブルセクタTSへアクセスして、スペアセクタ
番号snを取得すれば、データセクタDSのスペアセク
タSSへアクセスできる。この場合は、3つのセクタS
へアクセスするだけでよく、変換テーブルなどを用い
て、テーブルセクタTSのアドレスを取得する場合に比
べて、アクセス速度を向上できる。なお、本実施形態で
は、各セクタSが不良セクタであるか否かや、空いてい
るスペアセクタSSの探索、あるいは、後述するテーブ
ルセクタTSのスペアセクタSSの探索は、AND型フ
ラッシュメモリ5の制御エリアCAのみを読み出して判
断しているので、セクタS全てを読み出す場合に比べて
高速にアクセスできる。
If the data sector DS is a bad sector, the table sector TS allocated to the address corresponding to the data sector DS is accessed, and if the spare sector number sn is obtained, the data is transferred to the spare sector SS of the data sector DS. Can access. In this case, three sectors S
The access speed can be improved as compared with the case where the address of the table sector TS is obtained using a conversion table or the like. In this embodiment, whether each sector S is a defective sector, a search for an empty spare sector SS, or a search for a spare sector SS of a table sector TS described later is performed in the control area of the AND-type flash memory 5. Since the determination is made by reading only the CA, the access can be performed at a higher speed than in the case where the entire sector S is read.

【0048】一方、テーブルセクタTSが不良セクタの
場合は、スペアセクタ領域62から、当該テーブルセク
タTSのスペアセクタSSが探索され、データセクタD
Sに対応するスペアセクタSSを示すスペアセクタ番号
snが取得される。この場合は、データセクタDSが正
常な場合や、データセクタDSが不良であってもテーブ
ルセクタTSが正常な場合に比べてアクセス速度は低下
する。ただし、本実施形態で使用するAND型フラッシ
ュメモリ5の場合でも、不良セクタの割合は、全セクタ
Sの0.2%以下と十分に低いので、データセクタDS
およびテーブルセクタTSの双方が不良セクタである可
能性は極めて低く、ほとんどの場合で、速いアクセス速
度を維持できる。
On the other hand, if the table sector TS is a bad sector, the spare sector SS of the table sector TS is searched from the spare sector area 62, and the data sector D
A spare sector number sn indicating the spare sector SS corresponding to S is obtained. In this case, the access speed is lower than when the data sector DS is normal, or when the data sector DS is defective, compared to when the table sector TS is normal. However, even in the case of the AND type flash memory 5 used in the present embodiment, the ratio of defective sectors is sufficiently low at 0.2% or less of all the sectors S, so that the data sector DS
Both the table sector TS and the table sector TS are extremely unlikely to be bad sectors, and in most cases, a high access speed can be maintained.

【0049】なお、本実施形態では、テーブルセクタT
SのスペアセクタSSがスペアセクタ領域62の一方の
端部から順番に配されており、各スペアセクタSSの制
御エリアCAには、テーブルセクタ番号tnなど、代替
するテーブルセクタTSを示す情報が格納されている。
したがって、当該端部から順番に、各スペアセクタSS
の制御エリアCAを読み出すだけで、テーブルセクタT
SのスペアセクタSSを高速に探索できる。
In this embodiment, the table sector T
The spare sectors SS of S are arranged in order from one end of the spare sector area 62, and information indicating a substitute table sector TS such as a table sector number tn is stored in the control area CA of each spare sector SS. .
Therefore, in order from the end, each spare sector SS
Just read the control area CA of the table sector T
The S spare sector SS can be searched at high speed.

【0050】上記構成において、グラフィック操作パネ
ルへ電源を投入した際の動作について、図5に示すフロ
ーチャートに基づいて説明すると以下の通りである。す
なわち、ステップ1(以下では、S1のように略称す
る)において、グラフィック操作パネルへ電源が投入さ
れると、CPU1は、予め定められた手順に従って、マ
スクROM4へアクセスして、第1OS格納領域41、
第1ドライバ格納領域42およびファイルシステム処理
プログラム格納領域43に格納されたプログラムが実行
される。これにより、第1OSは、AND型フラッシュ
メモリ5内の各論理セクタへ直接アクセスしたり、各論
理セクタへ格納されたデータをファイルシステム中のフ
ァイルとしてアクセス可能になる。また、SIOポート
など、他の起動が可能なデバイスにもアクセス可能にな
る。
The operation when the power is turned on to the graphic operation panel in the above configuration will be described below with reference to the flowchart shown in FIG. That is, in step 1 (hereinafter, abbreviated as S1), when the power is turned on to the graphic operation panel, the CPU 1 accesses the mask ROM 4 according to a predetermined procedure and accesses the first OS storage area 41. ,
The programs stored in the first driver storage area 42 and the file system processing program storage area 43 are executed. As a result, the first OS can directly access each logical sector in the AND-type flash memory 5 or access data stored in each logical sector as a file in the file system. Further, it becomes possible to access other start-up devices such as an SIO port.

【0051】さらに、第1OSは、S2において、予め
定められた優先順位に従って、起動可能なデバイスを探
索し、最優先の起動可能デバイスがAND型フラッシュ
メモリ5以外の場合(S3にて、NOの場合)、S4にお
いて、例えば、外部インタフェース部3のSIOポート
など、発見されたデバイスから第2OSが読み込まれ
る。なお、あるデバイスが優先と設定されていても、例
えば、AND型フラッシュメモリ5が装着されていない
場合や図1に示すデータ構造が格納されていない場合な
ど、当該デバイスに正しくアクセスできない場合は、次
の優先順位のデバイスが探索される。
Further, in S2, the first OS searches for a bootable device in accordance with a predetermined priority, and when the highest priority bootable device is other than the AND-type flash memory 5 (NO in S3). In the case), in S4, the second OS is read from a discovered device such as an SIO port of the external interface unit 3. Even if a certain device is set as a priority, if the device cannot be accessed correctly, for example, when the AND flash memory 5 is not mounted or when the data structure shown in FIG. 1 is not stored, The next priority device is searched.

【0052】上記AND型フラッシュメモリ5が優先さ
れており、正常にアクセス可能であれば(上記S3にて
YES の場合)、S5において、例えば、AND型フラッ
シュメモリ5から所定の設定ファイルを読み出したり、
予め定められた特定のデータ構造を検索するなどして、
AND型フラッシュメモリ5に第2ドライバ格納領域5
1が存在するか否かを確認する。存在している場合(上
記S5において、YESの場合)、S6において、当該領
域51から第2ドライバが読み出され、例えば、外部イ
ンタフェース部3のIrDAポートなど、新たなデバイ
スがアクセス可能になる。この場合、第1OSは、S7
〜S9において、上記S2〜S4と同様に、起動するデ
バイスを選択する。
If the AND type flash memory 5 has priority and can be accessed normally (at S3,
In the case of YES), in S5, for example, a predetermined setting file is read from the AND-type flash memory 5,
By searching for a specific data structure that has been determined in advance,
The second driver storage area 5 is stored in the AND type flash memory 5.
Check whether 1 exists. If it exists (YES in S5), the second driver is read from the area 51 in S6, and a new device such as the IrDA port of the external interface unit 3 becomes accessible. In this case, the first OS is S7
In steps S9 to S9, a device to be started is selected as in steps S2 to S4.

【0053】ここで、例えば、IrDAポート用のドラ
イバなど、訂正が必要になる可能性があると製造時に判
断されたドライバは、AND型フラッシュメモリ5に格
納されているので、例えば、不具合が発見された場合
や、機能を変更する場合など、ドライバを変更する場合
であっても、マスクROM4に格納する場合よりも容易
に変更できる。したがって、グラフィック操作パネルの
信頼性を損なうことなく、最適のドライバを常に使用で
きる。
Here, for example, a driver, such as a driver for an IrDA port, which is determined at the time of manufacture that there is a possibility that correction is necessary is stored in the AND-type flash memory 5, so that, for example, a defect is found. Even when the driver is changed, for example, when the driver is changed or when the function is changed, the driver can be changed more easily than when the driver is stored in the mask ROM 4. Therefore, the optimum driver can always be used without deteriorating the reliability of the graphic operation panel.

【0054】第1ドライバでアクセスされるデバイス、
あるいは、第2ドライバでアクセスされるデバイスを探
索した結果、AND型フラッシュメモリ5から起動する
と判断された場合(上記S8にてYES の場合)、第1O
Sは、S10において、例えば、第2OS格納領域52
から第2OSをRAM2へ読み出し、S11において、
例えば、CPU1へRAM2の内容消去を伴わない再起
動を指示するなどして、第1OSに代えて、第2OSを
起動させる。これにより、グラフィック操作パネルは、
例えば、図示しないPLCの監視制御など、通常の処理
を実行できる。
A device accessed by the first driver;
Alternatively, as a result of searching for a device to be accessed by the second driver, if it is determined that the device is to be started from the AND-type flash memory 5 (in the case of YES in S8), the first O
S determines in S10, for example, the second OS storage area 52
, The second OS is read into the RAM 2, and in S11,
For example, the second OS is started instead of the first OS by instructing the CPU 1 to restart without erasing the contents of the RAM 2. As a result, the graphic operation panel
For example, normal processing such as monitoring and control of a PLC (not shown) can be executed.

【0055】ここで、第2OSは、マスクROM4より
もメモリ容量が大きなAND型フラッシュメモリ5に格
納されているので、例えば、制御処理や表示処理など、
グラフィック操作パネルの通常処理が複雑になり、第2
OSが肥大した場合であっても、何ら支障なく、AND
型フラッシュメモリ5に格納できる。また、AND型フ
ラッシュメモリ5は書き換え可能なので、不具合が発見
された場合や、グラフィック操作パネルに必要な機能が
変化した場合であっても、マスクROM4に格納する場
合よりも容易に変更できる。
Here, since the second OS is stored in the AND flash memory 5 having a larger memory capacity than the mask ROM 4, for example, control processing and display processing are performed.
The normal processing of the graphic operation panel becomes complicated,
Even if the OS is enlarged, there is no problem and AND
Can be stored in the flash memory 5. Further, since the AND flash memory 5 is rewritable, even when a defect is found or a function required for the graphic operation panel is changed, it can be changed more easily than when storing it in the mask ROM 4.

【0056】具体的には、図6に示すように、図5のS
10に示す第2OSの読み込みに先立って、例えば、使
用者の操作や通信などによって、第2OSの書き換えが
指示されると(S21)、第1OS、および、第1OS
上で動作する第2OS書き換えプログラムは、S22に
おいて、外部インタフェース部3のSIOポートなど、
他のデバイスから、新たな第2OSを示すデータを読み
込み、第2OS格納領域52へ格納する。ここで、第1
OSは、第1ドライバのAND型フラッシュメモリ用ド
ライバによって、AND型フラッシュメモリ5へアクセ
ス可能であり、他の第1ドライバや第2ドライバによっ
て、他のデバイスにもアクセス可能である。したがっ
て、第1OSは、何ら支障なく、第2OSを書き換える
ことができる。なお、第2ドライバを書き換える場合
は、図5に示す第2ドライバの読み込みに先立って、上
記S21およびS22と同様の処理が行われ、第1OS
は、新たな第2ドライバを読み込んで、AND型フラッ
シュメモリ5の第2ドライバ格納領域51へ格納する。
Specifically, as shown in FIG. 6, S in FIG.
Prior to reading of the second OS shown in FIG. 10, when a rewrite of the second OS is instructed by, for example, a user operation or communication (S21), the first OS and the first OS are read.
The second OS rewrite program that operates on the above-described program, in S22, includes the SIO port of the external interface unit 3 and the like.
Data indicating a new second OS is read from another device and stored in the second OS storage area 52. Here, the first
The OS can access the AND-type flash memory 5 by the AND-type flash memory driver of the first driver, and can also access other devices by the other first and second drivers. Therefore, the first OS can rewrite the second OS without any trouble. When the second driver is rewritten, the same processing as in S21 and S22 is performed before the reading of the second driver shown in FIG.
Reads a new second driver and stores it in the second driver storage area 51 of the AND flash memory 5.

【0057】これにより、AND型フラッシュメモリ5
内のプログラムに不具合が発見された場合や、グラフィ
ック操作パネルに要求される機能が変化した場合、ある
いは、グラフィック操作パネルに接続される機器が変更
された場合であっても、上記プログラムの書き換えによ
って、容易に対処でき、マスクROM4に全てを格納す
る場合に比べて、より信頼性が高く、高機能なグラフィ
ック操作パネルを実現できる。
Thus, the AND type flash memory 5
Even if a problem is found in the program inside, if the function required for the graphic operation panel changes, or if the device connected to the graphic operation panel is changed, rewriting the above program will It is possible to realize a highly reliable and high-performance graphic operation panel as compared with the case where all are stored in the mask ROM 4.

【0058】なお、本実施形態では、マスクROM4の
第1ドライバ格納領域42へ、AND型フラッシュメモ
リ5へアクセスするためのドライバの他に、例えば、S
IOポート用のドライバなどが格納されている場合につ
いて説明したが、これに限るものではない。例えば、A
ND型フラッシュメモリ5が着脱可能で、他の装置で書
き込める場合には、AND型フラッシュメモリ用のドラ
イバのみが格納されていてもよい。また、第2OSや第
2ドライバの数が限定されており、複数のうちの1つを
選択すればよい場合には、AND型フラッシュメモリ用
のドライバのみをマスクROM4へ格納し、予め、AN
D型フラッシュメモリ5内に全てを格納しておいて、使
用時にいずれか1つを選択すれば、AND型フラッシュ
メモリ用のドライバのみでも、第2OSや第2ドライバ
を変更できる。特に、変更回数が出荷時や設置時などに
限定されている場合には、残余の第2OSや第2ドライ
バを削除すれば、AND型フラッシュメモリ5のメモリ
効率の低下を防止できる。
In this embodiment, in addition to the driver for accessing the AND type flash memory 5 in the first driver storage area 42 of the mask ROM 4, for example,
Although the case where an IO port driver and the like are stored has been described, the present invention is not limited to this. For example, A
If the ND type flash memory 5 is detachable and can be written by another device, only the driver for the AND type flash memory may be stored. Further, the number of the second OSs and the second drivers is limited, and when one of the plurality of OSs should be selected, only the driver for the AND type flash memory is stored in the mask ROM 4 and the AN
If all of them are stored in the D-type flash memory 5 and one of them is selected at the time of use, the second OS and the second driver can be changed only by the driver for the AND-type flash memory. In particular, when the number of changes is limited to the time of shipment or installation, if the remaining second OS and second driver are deleted, a decrease in the memory efficiency of the AND flash memory 5 can be prevented.

【0059】ただし、プログラムの不具合は、予測が困
難で、予め全てを格納しておくことはできない。また、
AND型フラッシュメモリ5に書き込み可能な装置がグ
ラフィック操作パネルの近傍にあるとは限らない。した
がって、上述の場合には、対処可能なプログラム変更が
限定され、変更時の手間が増大する虞れがある。したが
って、本実施形態のように、AND型フラッシュメモリ
用のドライバに加えて、十分に検証されたドライバを少
なくとも1つ格納しておく方がよい。これにより、当該
ドライバでアクセスされる外部の機器からのデータによ
って、AND型フラッシュメモリ5を書き換えたり、外
部の機器から直接起動したりできる。この結果、より容
易かつ確実に不具合を含むプログラム変更に対処でき、
グラフィック操作パネルの信頼性を向上できる。
However, program defects are difficult to predict and cannot be stored in advance. Also,
A device capable of writing to the AND flash memory 5 is not always located near the graphic operation panel. Therefore, in the case described above, the change of the program that can be dealt with is limited, and there is a possibility that the trouble when the change is increased. Therefore, as in the present embodiment, it is better to store at least one fully verified driver in addition to the driver for the AND flash memory. Thus, the AND flash memory 5 can be rewritten by data from an external device accessed by the driver, or can be directly started from the external device. As a result, it is possible to more easily and reliably deal with program changes that include defects,
The reliability of the graphic operation panel can be improved.

【0060】[0060]

【発明の効果】請求項1の発明に係るコンピュータは、
以上のように、上記主プログラムよりもプログラムサイ
ズが小さく、起動時に演算処理部によって実行されるブ
ートローダを格納しているマスクROMと、所定長のセ
クタを単位としてアクセスされ、主プログラムを格納す
るAND型フラッシュメモリとを備え、上記ブートロー
ダは、起動時には、当該AND型フラッシュメモリへア
クセスして、上記演算処理部へ自らの代わりに上記主プ
ログラムを実行させると共に、主プログラムの置き換え
が指示された場合、上記AND型フラッシュメモリに格
納された主プログラムを書き換える構成である。
According to the first aspect of the present invention, a computer comprises:
As described above, the program size is smaller than that of the main program, the mask ROM storing the boot loader executed by the arithmetic processing unit at the time of startup, and the AND which is accessed in units of sectors of a predetermined length and stores the main program. The boot loader accesses the AND-type flash memory at the time of startup, causes the arithmetic processing unit to execute the main program instead of itself, and instructs to replace the main program. In this configuration, the main program stored in the AND flash memory is rewritten.

【0061】それゆえ、演算処理部が起動直後はアクセ
スできないAND型フラッシュメモリへ主プログラムが
格納されているにも拘わらず、当該主プログラムを実行
できるので、演算処理部の起動直後の動作を変更するこ
となく、記録容量を増大でき、例えば、劣悪な環境下で
使用されるFA用途のコンピュータなど、高い信頼性が
要求される場合に好適に使用される半導体記録媒体を有
するコンピュータの機能を向上できるという効果を奏す
る。
Therefore, even though the main program is stored in the AND-type flash memory that cannot be accessed immediately after the operation processing unit is started, the main program can be executed. Recording capacity can be increased without the need to improve the function of a computer having a semiconductor recording medium that is preferably used when high reliability is required, such as a computer for FA used in a poor environment. It has the effect of being able to.

【0062】また、ブートローダは、主プログラムの書
き換えが必要になった場合、AND型フラッシュメモリ
内の主プログラムを訂正できるので、主プログラム全体
をマスクROMに格納する場合よりも主プログラムの変
更が容易になる。さらに、ブートローダは、主プログラ
ムよりも小さく、主プログラムの種別に拘わらず共用で
きるので、十分に検証できる。この結果、主プログラム
の不具合や必要な機能の変化に速やかに対処でき、半導
体記録媒体を有するコンピュータの信頼性を向上できる
という効果を奏する。
The boot loader can correct the main program in the AND-type flash memory when the main program needs to be rewritten, so that the main program can be changed more easily than when the entire main program is stored in the mask ROM. become. Further, since the boot loader is smaller than the main program and can be shared regardless of the type of the main program, the boot loader can be sufficiently verified. As a result, it is possible to quickly cope with a failure of the main program or a change in a necessary function, and to improve the reliability of a computer having a semiconductor recording medium.

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

【図1】本発明の一実施形態を示すものであり、AND
型フラッシュメモリを有するグラフィック操作パネルの
要部構成を示すブロック図である。
FIG. 1 illustrates one embodiment of the present invention, wherein AND
FIG. 2 is a block diagram showing a configuration of a main part of a graphic operation panel having a type flash memory.

【図2】フォーマット前の上記AND型フラッシュメモ
リを示す説明図である。
FIG. 2 is an explanatory diagram showing the AND flash memory before formatting.

【図3】フォーマット後の上記AND型フラッシュメモ
リに格納されているデータ構造を示す説明図である。
FIG. 3 is an explanatory diagram showing a data structure stored in the AND flash memory after formatting.

【図4】フォーマット後の上記AND型フラッシュメモ
リにおいて、セクタ構造を示す説明図である。
FIG. 4 is an explanatory diagram showing a sector structure in the AND flash memory after formatting.

【図5】上記グラフィック操作パネルの起動時の動作を
説明するフローチャートである。
FIG. 5 is a flowchart illustrating an operation at the time of starting the graphic operation panel.

【図6】上記グラフィック操作パネルにおいて、第2オ
ペレーティングシステムを書き換える際の動作を示すフ
ローチャートである。
FIG. 6 is a flowchart showing an operation of rewriting a second operating system in the graphic operation panel.

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

1 CPU(演算処理部) 4 マスクROM 5 AND型フラッシュメモリ Reference Signs List 1 CPU (arithmetic processing unit) 4 Mask ROM 5 AND-type flash memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】起動後の通常処理に実行される主プログラ
ムが格納された半導体記録媒体を有するコンピュータに
おいて、 上記主プログラムよりもプログラムサイズが小さく、起
動時に演算処理部によって実行されるブートローダを格
納しているマスクROMを備え、 上記半導体記録媒体は、所定長のセクタを単位としてア
クセスされるAND型フラッシュメモリであると共に、 上記ブートローダは、起動時には、当該AND型フラッ
シュメモリへアクセスして、上記演算処理部へ自らの代
わりに上記主プログラムを実行させると共に、主プログ
ラムの置き換えが指示された場合、上記AND型フラッ
シュメモリに格納された主プログラムを書き換えること
を特徴とするコンピュータ。
1. A computer having a semiconductor recording medium storing a main program to be executed in normal processing after startup, wherein the computer has a program size smaller than the main program and stores a boot loader executed by an arithmetic processing unit at startup. The semiconductor recording medium is an AND-type flash memory accessed in units of a sector of a predetermined length, and the boot loader accesses the AND-type flash memory at the time of start-up. A computer that causes an arithmetic processing unit to execute the main program instead of itself and, when instructed to replace the main program, rewrites the main program stored in the AND flash memory.
JP3061399A 1999-02-08 1999-02-08 Computer with semiconductor recording medium Pending JP2000231483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3061399A JP2000231483A (en) 1999-02-08 1999-02-08 Computer with semiconductor recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3061399A JP2000231483A (en) 1999-02-08 1999-02-08 Computer with semiconductor recording medium

Publications (1)

Publication Number Publication Date
JP2000231483A true JP2000231483A (en) 2000-08-22

Family

ID=12308735

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3061399A Pending JP2000231483A (en) 1999-02-08 1999-02-08 Computer with semiconductor recording medium

Country Status (1)

Country Link
JP (1) JP2000231483A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1303498C (en) * 2002-02-27 2007-03-07 微软公司 Open type systemic structure flash storage driving program
JP2011210137A (en) * 2010-03-30 2011-10-20 Furuno Electric Co Ltd Electronic device, navigation method, upgrade program and upgrade method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1303498C (en) * 2002-02-27 2007-03-07 微软公司 Open type systemic structure flash storage driving program
JP2011210137A (en) * 2010-03-30 2011-10-20 Furuno Electric Co Ltd Electronic device, navigation method, upgrade program and upgrade method

Similar Documents

Publication Publication Date Title
JP5035636B2 (en) Moving sectors in blocks in flash memory
EP1036364B1 (en) Alignment of cluster address to block addresses within a semiconductor non-volatile mass storage memory
KR100622349B1 (en) Flash Memory for performing Bad Block Management and Method for performing Bad Block Management of Flash Memory
JP4933268B2 (en) Flash memory system startup behavior
JP4524309B2 (en) Memory controller for flash memory
US6865658B2 (en) Nonvolatile data management system using data segments and link information
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
US20080250188A1 (en) Memory Controller, Nonvolatile Storage, Nonvolatile Storage System, and Memory Control Method
WO2007023674A1 (en) Memory controller, nonvolatile storage, nonvolatile memory system, and method for writing data
JP4373943B2 (en) Memory controller, flash memory system, and flash memory control method
JPH11126488A (en) Method and device for storing and controlling data of external memory using plural flash memories
US7315870B2 (en) Memory controller, flash memory system, and method for recording data on flash memory
JP3808842B2 (en) Storage device having rewritable nonvolatile memory and control method of nonvolatile memory for storage device
JP2000231483A (en) Computer with semiconductor recording medium
JP3670151B2 (en) Flash memory access method, system including driver for accessing flash memory, and flash memory
JP3826115B2 (en) Storage device, memory management method, and program
JPH1185629A (en) Managing system for flash memory
JP3769395B2 (en) External storage device using non-volatile memory
US7313648B2 (en) Corruption tolerant method and system for deploying and modifying data in flash memory
JP2005316793A (en) Flash memory system and control method of flash memory
JP4580724B2 (en) Nonvolatile memory control method
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory
JP4245594B2 (en) Memory controller and flash memory system
JP2022040856A (en) Memory control device and memory control method
JP2009026062A (en) Memory controller, memory system, and memory control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040827

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050104

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050426