JP6108478B2 - Computer device, address translation device, and program - Google Patents
Computer device, address translation device, and program Download PDFInfo
- Publication number
- JP6108478B2 JP6108478B2 JP2014151752A JP2014151752A JP6108478B2 JP 6108478 B2 JP6108478 B2 JP 6108478B2 JP 2014151752 A JP2014151752 A JP 2014151752A JP 2014151752 A JP2014151752 A JP 2014151752A JP 6108478 B2 JP6108478 B2 JP 6108478B2
- Authority
- JP
- Japan
- Prior art keywords
- boot
- address
- boot program
- program
- memory
- 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.)
- Active
Links
Images
Description
本発明はコンピュータ装置、アドレス変換装置及びプログラムに関し、例えばメモリからプログラムを読み出すコンピュータ装置、アドレス変換装置及びプログラムに関する。 The present invention relates to a computer device, an address conversion device, and a program.
書き換え可能な不揮発性メモリは、データの書換えが可能であり、さらに無給電状態によらず長期間のデータ保存が可能である。そのため、書き換え可能な不揮発性メモリは、アプリケーションデータの保存用として、あるいは組み込み製品におけるプログラムの保存用として、今日では各分野において広く使われている。特にフラッシュメモリは、大容量品が製品化されている。 A rewritable nonvolatile memory can rewrite data and can store data for a long period of time regardless of the non-powered state. Therefore, rewritable nonvolatile memories are widely used in various fields today for storing application data or for storing programs in embedded products. In particular, flash memory has been commercialized in a large capacity.
フラッシュメモリのうちNAND型フラッシュメモリ(以下NANDフラッシュと称す)は、デバイス内部の構造上、大容量化に向いている。しかし、NANDフラッシュは、データをリード時にリードディスターブと呼ばれる現象によって内部素子が劣化することが知られている。NANDフラッシュ内部は、ブロックという単位の集合として構成されており、正常な値が読み出せなくなったビットを含むブロックをバッドブロックとしてマーキングする。NANDフラッシュ内部において、マーキングされたブロックを以降の処理で使用しないようにする、といった劣化に対する対応が一般的に行われている。 Among flash memories, a NAND flash memory (hereinafter referred to as a NAND flash) is suitable for increasing the capacity because of the internal structure of the device. However, in NAND flash, it is known that internal elements deteriorate due to a phenomenon called read disturb when data is read. The inside of the NAND flash is configured as a set of units called blocks, and a block including a bit from which a normal value cannot be read is marked as a bad block. In the NAND flash, a countermeasure is generally taken against deterioration such that the marked block is not used in the subsequent processing.
一方、NOR型フラッシュ(以下NORフラッシュと称す)は、構造上前述のリードディスターブ現象による劣化がない。そのため、NORフラッシュは、高信頼性が要求されるデータ保持用、例えばプログラム格納用として使われることが多い。この高信頼性に基づきNORフラッシュはNANDフラッシュのようなバッドブロックというような考え方が存在しない。 On the other hand, NOR flash (hereinafter referred to as NOR flash) is structurally free from deterioration due to the above-described read disturb phenomenon. For this reason, the NOR flash is often used for data retention that requires high reliability, for example, for program storage. Based on this high reliability, the NOR flash does not have the concept of a bad block like the NAND flash.
NORフラッシュの信頼度は高いものの、データ書き換え中に電源断が発生すると正しいデータが書き込まれていない状態となる。プログラムの書き換え中にこの事象が発生すると装置が正常動作しなくなってしまう。正常動作しなくなってしまうことを回避するために、NORフラッシュは、フラッシュ内の別領域にプログラムの複製を格納することがある。これによって、NORフラッシュは、チェックサム等による検証でオリジナルのプログラム及び複製プログラムの正常性を確認する。NORフラッシュは、オリジナルのプログラムに異常があれば複製のプログラムによって装置が動くよう制御する。このようにして、NORフラッシュにおいては、データ書き換え中の電源断による書き込み不良に対する対処をおこなっている。 Although the reliability of NOR flash is high, correct data is not written if power is cut off during data rewriting. If this event occurs during rewriting of the program, the device will not operate normally. In order to avoid the malfunction of the NOR flash, the NOR flash may store a copy of the program in another area in the flash. As a result, the NOR flash confirms the normality of the original program and the duplicate program by verification using a checksum or the like. The NOR flash is controlled so that the apparatus is operated by a duplicate program if there is an abnormality in the original program. In this manner, in the NOR flash, a countermeasure against a write failure due to a power interruption during data rewriting is taken.
一般的にプログラムは、ブートプログラムとシステムプログラムとに分けられる。また、システムプログラムは、ブートプログラム起動後に起動する。CPUは、起動するとブートプログラムを読み出す。さらに、CPUは、ブートプログラムの処理によって上述のようなチェックサム等によるシステムプログラムの正当性を確認し、正常なプログラムが動作するように制御している。すなわち前述の複製プログラムを持つことによるデータ書き換え中の電源断による書き込み不良対策は、システムプログラムに対して有効である。 Generally, a program is divided into a boot program and a system program. Further, the system program is activated after the boot program is activated. When the CPU starts up, it reads the boot program. Further, the CPU confirms the validity of the system program using the checksum as described above by processing of the boot program, and controls the normal program to operate. In other words, the countermeasure against writing failure due to power interruption during data rewriting by having the above-described replication program is effective for the system program.
ここで、ブートプログラムの複製プログラムを別のアドレスに格納することも考えられる。しかし、CPUが起動時にアクセスするアドレス(以降ブートアドレスと称す)は、決まっており、必ずそのアドレスからブートプログラムのリードをおこなう。ここでブートプログラムに異常があると、それ以降の処理ができず装置が起動しない状態に陥る。 Here, it is also conceivable to store a duplicate program of the boot program at another address. However, an address (hereinafter referred to as a boot address) that the CPU accesses at startup is determined, and the boot program is always read from that address. If there is an abnormality in the boot program, the subsequent processing cannot be performed and the apparatus does not start.
一般的にブートプログラムは、ハードウェアの基本設定などをおこなう。そのため、ブートプログラムは、機能改善のための更新を必要としない。さらに、ブートプログラムは、データ書き換え中の電源断による書き込み不良という問題を誘発させないために、更新をせずに運用することが一般的である。ただし不揮発性メモリのデータ保持時間は、有限である。そのため、不揮発性メモリは、経年劣化によってデータ異常を発生する可能性がある。データ保持時間を延ばすためには一定時間ごとに不揮発性メモリ上のデータの書換えをおこなうことが半導体技術の標準化機関であるJEDEC Solid State Technology Associationでも推奨されている。しかし、書き換え中の電源断によるデータ異常の危険性があるため、不揮発性メモリ上のデータの書き換えを容易に実現することができなかった。 In general, a boot program performs basic hardware settings. Therefore, the boot program does not need to be updated for improving the function. Furthermore, the boot program is generally operated without updating in order not to induce a problem of writing failure due to power interruption during data rewriting. However, the data retention time of the nonvolatile memory is finite. For this reason, the nonvolatile memory may cause data abnormality due to aging. In order to extend the data retention time, it is recommended by the JEDEC Solid State Technology Association, which is a semiconductor technology standardization organization, to rewrite data in a nonvolatile memory at regular intervals. However, since there is a risk of data abnormality due to power interruption during rewriting, rewriting of data on the nonvolatile memory could not be easily realized.
特許文献1には、不揮発性メモリ上にブートプログラムの複製を格納することが開示されている。具体的には、ブートプログラムが格納されているブート領域に異常が発生した場合、スイッチを手動で切り替えることによって、リカバリー領域に格納されている複製ブートプログラムを、ブート領域にコピーする。複製ブートプログラムをコピーすることによって、ブート領域を修復する。また、CPUから監視回路に対して一定期間内に正常に起動したことを通知するアクセス信号が通知されなかった場合に、監視回路は、CPUが正常に起動していないと判断する。この場合、監視回路は、自動的にリカバリー領域の複製ブートプログラムを、ブート領域にコピーするように制御する。 Patent Document 1 discloses storing a copy of a boot program on a nonvolatile memory. Specifically, when an abnormality occurs in the boot area where the boot program is stored, the duplicate boot program stored in the recovery area is copied to the boot area by manually switching the switch. Repair the boot area by copying the duplicate boot program. When the CPU does not notify the monitoring circuit of the normal activation within a certain period, the monitoring circuit determines that the CPU is not normally activated. In this case, the monitoring circuit controls to automatically copy the duplicate boot program in the recovery area to the boot area.
上述したように、特許文献1においては、ブート領域において異常が発生した場合、リカバリー領域に格納している複製ブートプログラムをブート領域にコピーする処理を行う。しかし、ブート領域における異常は、主にブート領域のデータ書き換え中の電源断等によって発生する。そのため、ブート領域に複製ブートプログラムをコピーする処理を行っている最中に電源断等の要因が発生した場合、ブート領域の異常は修復されない。そのため、ブート領域への複製ブートプログラムのコピー処理後であっても、ブート領域の正常性が保証されないという問題が発生する。 As described above, in Patent Document 1, when an abnormality occurs in the boot area, a process of copying the duplicate boot program stored in the recovery area to the boot area is performed. However, an abnormality in the boot area is mainly caused by a power interruption or the like during data rewriting in the boot area. For this reason, if a factor such as a power failure occurs during the process of copying the duplicate boot program to the boot area, the boot area abnormality is not repaired. Therefore, there is a problem that the normality of the boot area cannot be guaranteed even after the copy process of the duplicate boot program to the boot area.
本発明の目的は、一部のブートプログラムに異常が発生した場合においても、異常が発生していないブートプログラムを用いて確実に起動処理を実行することができるコンピュータ装置、アドレス変換装置及びプログラムを提供することにある。 An object of the present invention is to provide a computer device, an address conversion device, and a program capable of reliably executing a startup process using a boot program in which no abnormality has occurred even when an abnormality has occurred in some boot programs. It is to provide.
本発明の第1の態様にかかるコンピュータ装置は、第1のブートプログラム用アドレス信号を出力する制御部と、複数のアドレスにブートプログラムを格納するメモリと、前記第1のブートプログラム用アドレス信号を前記ブートプログラムが格納されているメモリのアドレスである第2のブートプログラム用アドレス信号に変換し、前記第2のブートプログラム用アドレス信号を前記メモリへ出力するアドレス変換部と、前記メモリから読み出された、複数の前記ブートプログラムの誤りを検出し、誤りを修正した前記ブートプログラムを前記制御部へ出力するプログラム読出し部と、を備えるものである。 A computer apparatus according to a first aspect of the present invention includes a control unit that outputs a first boot program address signal, a memory that stores a boot program at a plurality of addresses, and the first boot program address signal. An address conversion unit that converts the second boot program address signal, which is an address of a memory in which the boot program is stored, and outputs the second boot program address signal to the memory, and reads from the memory And a program reading unit that detects an error in the plurality of boot programs and outputs the boot program in which the error is corrected to the control unit.
本発明の第2の態様にかかるアドレス変換装置は、制御部から出力された第1のブートプログラム用アドレス信号を、複数のブートプログラムを格納するメモリにおけるアドレスであって、前記ブートプログラムを格納する場所を示す第2のブートプログラム用アドレス信号に変換し、前記第2のブートプログラム用アドレス信号を前記メモリへ出力するアドレス変換部と、前記メモリから読み出された、複数の前記ブートプログラムの誤りを検出し、誤りを修正した前記ブートプログラムを前記制御部へ出力するプログラム読出し部と、を備えるものである。 In the address conversion device according to the second aspect of the present invention, the first boot program address signal output from the control unit is an address in a memory storing a plurality of boot programs, and stores the boot program. An address conversion unit that converts the address signal to a second boot program address signal indicating the location and outputs the second boot program address signal to the memory, and a plurality of boot program errors read from the memory And a program reading unit that outputs the boot program in which the error is corrected to the control unit.
本発明の第3の態様にかかるプログラムは、制御部から出力された第1のブートプログラム用アドレス信号を、複数のブートプログラムを格納するメモリにおけるアドレスであって、前記ブートプログラムを格納する場所を示す第2のブートプログラム用アドレス信号に変換し、前記第2のブートプログラム用アドレス信号を前記メモリへ出力し、前記メモリから読み出された、複数の前記ブートプログラムの誤りを検出し、誤りを修正した前記ブートプログラムを前記制御部へ出力するものである。 The program according to the third aspect of the present invention provides a first boot program address signal output from the control unit as an address in a memory that stores a plurality of boot programs, and a location for storing the boot program. The second boot program address signal is output, the second boot program address signal is output to the memory, the errors of the boot programs read from the memory are detected, and the errors are detected. The modified boot program is output to the control unit.
本発明により、一部のブートプログラムに異常が発生した場合においても、異常が発生していないブートプログラムを用いて確実に起動処理を実行することができるコンピュータ装置、アドレス変換装置及びプログラムを提供することができる。 According to the present invention, there are provided a computer device, an address translation device, and a program capable of reliably executing a boot process using a boot program in which no abnormality has occurred even when an abnormality has occurred in some boot programs. be able to.
(実施の形態1)
以下、図面を参照して本発明の実施の形態について説明する。図1を用いて本発明の実施の形態1にかかるコンピュータ装置10の構成例について説明する。コンピュータ装置10は、制御部11、アドレス変換部12、メモリ13及びプログラム読出部14を有している。コンピュータ装置10は、例えば、携帯電話端末もしくはスマートフォン端末等の移動通信装置であってもよく、パーソナルコンピュータ装置もしくはサーバ装置等であってもよい。
(Embodiment 1)
Embodiments of the present invention will be described below with reference to the drawings. A configuration example of the
制御部11は、例えば、CPU等であってもよい。制御部11は、メモリ13に格納されているプログラムを実行することによって、様々な機能を動作させる。制御部11は、ブートプログラム用アドレス信号をアドレス変換部12へ出力する。一般的に、制御部11は、ブートプログラムを読み出すために、1つのブートプログラム用アドレスを用いる。
The
メモリ13は、複数のアドレスにブートプログラムを格納する。つまり、メモリ13は、複数のブートプログラムを有している。それぞれのブートプログラムは、同一の内容である。メモリ13は、例えば、ROM(Read Only Memory)もしくはフラッシュメモリ等である。例えば、メモリ13は、制御部11が出力するブートプログラム用アドレス信号に設定されているブートプログラム用アドレスに、ブートプログラムを格納し、他のアドレスに、ブートプログラムの複製を格納してもよい。
The
アドレス変換部12は、制御部11から出力されたブートプログラム用アドレス信号を受け取る。アドレス変換部12は、ブートプログラム用アドレス信号を、メモリ13において、ブートプログラムが格納されているアドレスを設定したブートプログラム用アドレス信号に書き換える。ここで、制御部11が出力するブートプログラム用アドレス信号をオリジナルブートアドレスとし、アドレス変換部12によって変換された後の信号を、変換後ブートアドレスと称する。アドレス変換部12は、変換後ブートアドレス信号をメモリ13へ出力する。
The
メモリ13は、変換後ブートアドレス信号に設定されているアドレスに格納されているブートプログラムをプログラム読出部14へ出力する。プログラム読出部14は、メモリ13から出力された複数のブートプログラムの誤りを検出し、誤りを修正したブートプログラムを制御部11へ出力する。
The
以上説明したように、本発明の実施の形態1にかかるコンピュータ装置10は、制御部11とメモリ13との間にアドレス変換部12を有している。アドレス変換部12は、制御部11からオリジナルアドレス信号を受け取ると、メモリ13のブートプログラムが格納されている他のアドレス(変換後ブートアドレス)に変換することができる。
As described above, the
そのため、制御部11が、アドレス変換部12へオリジナルブート信号を送信することによって、プログラム読出部14は、メモリ13に格納されている複数のブートプログラムを読み出すことができる。そのため、プログラム読出部14は、例えば、オリジナルブートアドレスに設定されたアドレスに格納されたブートプログラムに異常が発生していたとしても、他のアドレスに格納されたブートプログラムを読み出すことができる。プログラム読出部14は、読み出した複数のブートプログラムのうち正しいブートプログラムを制御部11へ出力する。制御部11は、オリジナルブートアドレスに設定されたアドレスに格納されたブートプログラムに異常が発生していたとしても、異常が発生していない時と同様にブートプログラムを読み出すことができる。
Therefore, when the
(実施の形態2)
続いて、図2を用いて本発明の実施の形態2にかかるコンピュータ装置の構成例について説明する。図2のコンピュータ装置は、CPU20、フラッシュメモリ30及び変換回路40を有している。CPU20は、図1の制御部11に相当する。フラッシュメモリ30は、図1のメモリ13に相当する。変換回路40は、図1のアドレス変換部12及びプログラム読出部14に相当する。
(Embodiment 2)
Next, a configuration example of the computer apparatus according to the second embodiment of the present invention will be described with reference to FIG. The computer apparatus of FIG. 2 includes a
CPU20は、変換回路40を介してフラッシュメモリ30へ、20ビットのADDRESS[19:0]信号、CS(Chip Select)信号、RD(Read)信号及び8ビットのDATA[7:0]信号を出力する。CPU20は、WR(Write)信号を変換回路40を介することなくフラッシュメモリ30へ出力する。
The
ADDRESS[19:0]信号は、フラッシュメモリ30において書き込みもしくは読み出しの対象となるデータが格納されているアドレスを示している。RD信号は、CPU20がフラッシュメモリ30に格納されているデータを読み出す際に用いられる信号である。WR信号は、CPU20がフラッシュメモリ30に格納されているデータを更新する場合、もしくは新たなデータを書き込む際に用いられる信号である。
The ADDRESS [19: 0] signal indicates an address where data to be written or read in the
CS信号は、CPU20が、アクセスするフラッシュメモリ等のデバイスを指定する際に用いられる信号である。CPU20は、フラッシュメモリ30に対してデータの読み出しもしくは書き込みを行う場合、CS信号をフラッシュメモリ30へ出力する。Data[7:0]は、CPU20が、フラッシュメモリ30から読み出す8ビットのデータである。ここでは、ADDRESS信号を20ビット、DATA信号を8ビットとしているが、使用するビット数については、デバイスの仕様に基づいて変更されてもよい。
The CS signal is a signal used when the
続いて、図3を用いて本発明の実施の形態2にかかる変換回路40の構成例について説明する。変換回路40は、アドレス生成部41、CS生成部42、RD生成部43、クロック生成部44、セレクタ45、セレクタ46、インバーター47、XOR回路48、シフトレジスタ49、インバーター50、XOR回路51、シフトレジスタ52を有している。アドレス生成部41は、図1のアドレス変換部12に相当する。インバーター47、XOR回路48、シフトレジスタ49、インバーター50、XOR回路51、シフトレジスタ52は、図1のプログラム読出部14に相当する。
Next, a configuration example of the
アドレス生成部41は、CPU20から出力されたADDRESS信号と、変換回路40の外部から供給されたCLK(クロック)信号とを受け取る。ADDRESS信号は、オリジナルのブートプログラムが格納されているフラッシュメモリ30のアドレスを示す信号である。アドレス生成部41は、ADDRESS信号を、複製ブートプログラムを格納しているアドレスを示す信号へ変換する。アドレス生成部41は、オリジナルのブートプログラムを格納しているアドレスを出力する場合、ADDRESS信号をそのまま出力してもよい。アドレス生成部41は、CLK信号を用いて、予め定められたタイミングに、変換後のアドレスを示す信号を出力する。
The
CS生成部42は、CPU20から出力されたCS信号と、CLK信号とを受け取る。CS信号は、例えば、フラッシュメモリ30からデータを読み出すもしくはフラッシュメモリ30へデータを書き込む際に用いられる信号である。CS生成部42は、CLK信号を用いて、予め定められたタイミングに、変換後のCS信号を出力する。
The
RD生成部43は、CPU20から出力されたRD信号と、CLK信号とを受け取る。RD信号は、フラッシュメモリ30もしくは他のメモリからデータを読み出す際に用いられる信号である。例えば、RD信号は、フラッシュメモリ30に格納されているブートプログラムを読み出すために用いられる。RD生成部43は、CLK信号を用いて、予め定められたタイミングに、変換後のRD信号を出力する。
The
クロック生成部44は、CLK信号と、RD信号とを受け取る。さらに、クロック生成部44は、予め定められたタイミングに、シフトレジスタ49及びインバーター50を動作させる際に用いるSFT_CLK(シフトクロック)信号を出力する。
The
セレクタ45は、CPU20から出力されたADDRESS信号と、アドレス生成部41から出力された信号とのいずれかを選択し、選択した信号をF_ADDRESS信号としてフラッシュメモリ30へ出力する。さらに、セレクタ45は、CPU20から出力されたCS信号と、CS生成部42から出力された変換後のCS信号とのいずれかを選択し、選択した信号をF_CS信号としてフラッシュメモリ30へ出力する。さらに、セレクタ45は、CPU20から出力されたRD信号と、RD生成部43から出力された変換後の信号とのいずれかを選択し、選択した信号をF_RD信号としてフラッシュメモリ30へ出力する。例えば、セレクタ45は、SEL端子にLowレベルのRD信号が入力された場合に、アドレス生成部41、CS生成部42及びRD生成部43から出力されたそれぞれの信号を選択する。
The
シフトレジスタ49は、フラッシュメモリ30から出力されたF_DATA信号をDIN端子にて受け取る。F_DATA信号は、例えば、フラッシュメモリ30から出力されたブートプログラムを含む信号である。さらに、シフトレジスタ49は、CLKIN端子に入力されたSFT_CLK信号に従って、DIN端子において受け取ったF_DATAをDATA_a端子、DATA_b端子、DATA_c端子の順にシフトさせる。
The
シフトレジスタ49におけるDATA_a端子、DATA_b端子及びDATA_c端子は、それぞれシフトされたF_DATAをXOR回路48へ出力する。XOR回路48は、DATA_a端子、DATA_b端子及びDATA_c端子から出力されたデータを用いて排他的論理和の演算を実行する。XOR回路48は、演算の実行結果をインバーター47へ出力する。インバーター47は、XOR回路48から出力された排他的論理和演算の実行結果に関するデータを反転してセレクタ46へ出力する。インバーター50、XOR回路51及びシフトレジスタ52も、インバーター47、XOR回路48及びシフトレジスタ49と同様の動作を実行する。また、変換回路40は、任意の数のインバーター47、XOR回路48及びシフトレジスタ49を有してもよい。
The DATA_a terminal, DATA_b terminal, and DATA_c terminal in the
セレクタ46は、インバーター47から出力されたデータもしくはフラッシュメモリ30から出力されたF_DATAのいずれかを選択する。セレクタ46は、選択したデータをCPU20へ出力する。さらに、セレクタ46は、インバーター50から出力されたデータもしくはフラッシュメモリ30から出力されたF_DATAのいずれかを選択する。セレクタ46は、選択したデータをCPU20へ出力する。例えば、セレクタ46は、SEL端子にLowレベルのRD信号が入力された場合に、インバーター47及びインバーター50から出力されたそれぞれの信号を選択する。
The
続いて、図4を用いてフラッシュメモリ30におけるプログラムの配置について説明する。ここでは、フラッシュメモリ30におけるアドレスを20ビットとしているため、フラッシュメモリ30のアドレスは、0x00000〜0xFFFFFとなる。ここで、CPU20が起動直後にアクセスするアドレスは、0x00000番地とする。また、0x01000番地あるいは0x02000に配置されたブートプログラムは、0x00000番地に配置されたブートプログラムの複製である。複製のブートプログラムは、CPU20によってアクセスされる前に事前に書き込まれているとする。
Next, the arrangement of programs in the
続いて、図5を用いて各信号のタイミングチャートについて説明する。CPU20は、起動直後に、フラッシュメモリ30に格納されているブートプログラムを読み出すために、ブートアドレス0x00000へのリードアクセスを行う。具体的には、CPU20は、ADDRESS=0x00000、CS=Low、RD=Lowとする信号を出力する。
Next, a timing chart of each signal will be described with reference to FIG. The
本図においては、変換回路40は、RD=Lowを受け取る前に、ADDRESS=0x00000、及び、CS=Lowとする信号を受け取る。CK0の前においては、変換回路40は、Low信号に設定されたRD信号を受け取っていない。そのため、セレクタ45は、入力されたADRESS信号及びCS信号をそのまま出力する。そのため、F_ADDRESS信号は、ADRESS信号と同じ値であり、F_CS信号は、CS信号と同じ値である。
In this figure, the
次に、CK0の立ち上がりエッジにおいて、RD生成部43は、RD=Lowを検出する。さらに、RD生成部43は、CK1の立ち上がりエッジにおいて、CK0において検出したLowレベルの信号を出力する。また、セレクタ45は、RD=Lowを受け取ると、アドレス生成部41、CS生成部42及びRD生成部43から出力された信号をフラッシュメモリ30へ出力する。アドレス生成部41は、ADDRESS信号をそのままセレクタ45へ出力する。さらに、CS生成部42も、CS信号をそのままセレクタ45へ出力する。そのため、F_ADDRESS信号及びF_CS信号は、RD=Lowが入力される前と同様の値の信号である。RD生成部43は、CK1の立ち上がりエッジにおいて、CK0において検出したRD=Lowを出力する。そのため、CK1の立ち上がりエッジにおいて、F_RD信号として、Lowレベルの信号を出力する。
Next, at the rising edge of CK0, the
フラッシュメモリ30は、Lowレベルに設定されたF_RD信号を受け取ることによって、F_ADDRESS信号において設定されたアドレスに格納しているブートプログラムをF_DATAとして変換回路40へ出力する。そのため、シフトレジスタ49は、CK2の立ち上がりエッジに、F_DATA=<X>を受け取る。<X>は、0x00000に格納されているブートプログラムを示している。
The
次に、シフトレジスタ49は、CK3においてSFT_CLKがHighレベルに変化すると、CK3の立ち上がりエッジにおいて、DATA_a端子から、<X>を出力する。
Next, when SFT_CLK changes to High level at CK3, the
次に、アドレス生成部41は、CK4において、0x00000を0x01000に変換して出力する。アドレス生成部41が、出力するアドレスを変換するタイミングは、予め定められていてもよい。例えば、予め定められたタイミングは、0x00000を所定の期間出力したら、次に0x01000を出力する等としてもよい。アドレス生成部41は、予め定められたタイミングに、出力するアドレスを変換する。
Next, the
さらに、RD生成部43は、CK4において、Highレベルに設定した信号を出力する。RD生成部43が、出力信号をLowレベルからHighレベルに変換するタイミングは、例えば、アドレス生成部41において、出力するアドレスを変換するタイミングと同じタイミングになるように予め定められていてもよい。RD生成部43が、出力信号をLowレベルからHighレベルに変換することによって、フラッシュメモリ30は、F_RD信号としてHighレベルの信号を受け取る。そのため、フラッシュメモリ30は、0x00000に格納しているブートプログラムであるF_DATA=<X>の出力を停止する。
Further, the
次に、CK5において、RD生成部43は、Lowレベルに設定した信号を出力する。例えば、RD生成部43は、出力信号をHighレベルに変換した次のクロックサイクルに再び出力信号をLowレベルに変換するとしてもよく、変換するタイミングとしてその他のタイミングを定めてもよい。これによって、フラッシュメモリ30は、Lowレベルに設定されたF_RD信号を受け取る。さらに、フラッシュメモリ30は、F_ADDRESS信号において設定された0x01000に格納しているブートプログラムをF_DATAとして変換回路40へ出力する。そのため、シフトレジスタ49は、CK6のタイミングに、F_DATA=<Y>を受け取る。<Y>は、0x01000に格納されているブートプログラムを示している。
Next, at CK5, the
次に、シフトレジスタ49は、CK7においてSFT_CLKがHighレベルに変化すると、CK7の立ち上がりエッジにおいて、DATA_a端子から<Y>を出力し、DATA_b端子から<X>を出力する。
Next, when SFT_CLK changes to High level at CK7, the
次に、アドレス生成部41は、CK8において、0x01000を0x02000に変換して出力する。アドレス生成部41が、出力するアドレスを変換するタイミングは、予め定められていてもよい。
Next, the
さらに、RD生成部43は、CK8において、Highレベルに設定した信号を出力する。RD生成部43が、出力信号をLowレベルからHighレベルに変換することによって、フラッシュメモリ30は、F_RD信号としてHighレベルの信号を受け取る。そのため、フラッシュメモリ30は、0x01000に格納しているブートプログラムであるF_DATA=<Y>の出力を停止する。
Further, the
次に、CK9において、RD生成部43は、Lowレベルに設定した信号を出力する。これによって、フラッシュメモリ30は、Lowレベルに設定されたF_RD信号を受け取る。さらに、フラッシュメモリ30は、F_ADDRESS信号において設定された0x02000に格納しているブートプログラムをF_DATAとして変換回路40へ出力する。そのため、シフトレジスタ49は、CK10のタイミングに、F_DATA=<Z>を受け取る。<Z>は、0x02000に格納されているブートプログラムを示している。
Next, at CK9, the
次に、シフトレジスタ49は、CK11においてSFT_CLKがHighレベルに変化すると、CK11の立ち上がりエッジにおいて、DATA_a端子から<Z>を出力し、DATA_b端子から<Y>を出力し、DATA_c端子から<X>を出力する。クロック生成部44は、SFT_CLKを変化させるタイミングを、予め定めておいてもよい。例えば、クロック生成部44は、F_RDがLowレベルに設定され、F_DATAにブートプログラムが設定された後に、SFT_CLKをHighレベルに設定するように定める。
Next, when SFT_CLK changes to high level at CK11, the
XOR回路48は、CK11においてシフトレジスタ49から出力された3つの信号を受け取ると、XOR演算を行う。また、CPU20は、インバーター47から出力された信号をDATAとして受け取る。
When the
ここで、CPU20が受け取るDATAについて詳細に説明する。フラッシュメモリ30が出力するブートプログラム<X>、ブートプログラム<Y>及びブートプログラム<Z>は、同一のプログラムである。しかし、ブートプログラムの書き換え中の電源断によるデータ異常を想定した場合、電源断時にアクセスしていたプログラムのみが異常となる。つまり、アドレス0x00000、0x01000及び0x02000のうち1箇所のみ誤った値の可能性がある。言い換えると、DATA_a端子、DATA_b端子及びDATA_c端子が出力する3ビットのデータのうち、1ビットのみが誤った値の可能性がある。
Here, the DATA received by the
XOR回路48は、誤ったビットを無視して、正常に読み出すことができた値をDATAとして出力するために用いられる。
The
例えば本来1のビットが誤って0に変換されてしまったとすると、XOR回路48における入力3ビットは(1,1,0)であり、XOR回路48における演算の結果は0となる。また本来0のビットが誤って0に変換されてしまったとすると、XOR回路48における入力3ビットは(0,0,1)であり、XOR回路48における演算の結果は1となる。インバーター47によって上記それぞれの反転値がDATAとして、CPU20に出力される。そのため、結果として(1,1,0)の結果は1となり、(0,0,1)の結果は0となる。これによって、CPU20へ、正しい値が出力される。
For example, if 1 bit is originally converted to 0 by mistake, the input 3 bits in the
以降CPU20は順次アドレスを出力してフラッシュメモリ30のデータを読むが、上記説明と同様に1回のCPU20からのリードを3回のリードに変換してプログラムのリードを続ける。
Thereafter, the
以上説明したように、本発明の実施の形態2にかかるコンピュータ装置を用いることによって、次の効果を得ることができる。 As described above, the following effects can be obtained by using the computer apparatus according to the second embodiment of the present invention.
一般的な回路構成においてブートプログラムの書き換えをおこなった場合、万一の電源断などによってブートプログラムが正常に起動しなくなるリスクがあった。そのため、ブートプログラムの更新を行うことができなかった。これに対して、本発明を利用することによって、CPU20は、フラッシュメモリ30に格納された複数のブートプログラムを読み出すことができる。そのため、一部のブートプログラムに誤りが発生した場合においても、他のブートプログラムを用いることによって、正常にブートプログラムを読み出すことができる。そのため、ブートプログラムのアップグレードを行うことができるようになる。
When the boot program is rewritten in a general circuit configuration, there is a risk that the boot program may not start normally due to a power failure. Therefore, the boot program could not be updated. On the other hand, by utilizing the present invention, the
さらに、一般的に、不揮発メモリのデータ保持時間はデータ書き込みからの時間で規定される。本発明でブートプログラムを消去して書き直すことが可能になるため、不揮発メモリのデータ保持時間を延ばすことができる。 Furthermore, generally, the data retention time of the nonvolatile memory is defined by the time from data writing. Since the boot program can be erased and rewritten in the present invention, the data retention time of the nonvolatile memory can be extended.
上述の実施の形態では、本発明をハードウェアの構成として説明したが、本発明は、これに限定されるものではない。本発明は、変換回路において実行される処理を、CPU(Central Processing Unit)にコンピュータプログラムを実行させることにより実現することも可能である。 In the above-described embodiments, the present invention has been described as a hardware configuration, but the present invention is not limited to this. The present invention can also realize processing executed in the conversion circuit by causing a CPU (Central Processing Unit) to execute a computer program.
上述の例において、プログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。 In the above example, the program can be stored and supplied to a computer using various types of non-transitory computer readable media. Non-transitory computer readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)) are included. The program may also be supplied to the computer by various types of transitory computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.
なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、SoC(System ON Chip)内のメモリコントローラ内に、予め、変換回路40を内蔵しておいてもよい。
Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. For example, the
10 コンピュータ装置
11 制御部
12 アドレス変換部
13 メモリ
14 プログラム読出部
20 CPU
30 フラッシュメモリ
40 変換回路
41 アドレス生成部
42 CS生成部
43 RD生成部
44 クロック生成部
45 セレクタ
46 セレクタ
47 インバーター
48 XOR回路
49 シフトレジスタ
50 インバーター
51 XOR回路
52 シフトレジスタ
DESCRIPTION OF
30
Claims (8)
複数のアドレスにブートプログラムを格納するメモリと、
前記第1のブートプログラム用アドレス信号を前記ブートプログラムが格納されているメモリのアドレスである第2のブートプログラム用アドレス信号に変換し、前記第2のブートプログラム用アドレス信号を前記メモリへ出力するアドレス変換部と、
前記メモリから読み出された、複数の前記ブートプログラムの誤りを検出し、誤りを修正した前記ブートプログラムを前記制御部へ出力するプログラム読出し部と、を備え、
前記プログラム読出し部は、
前記メモリから異なるタイミングに読み出された複数の前記ブートプログラムのそれぞれを出力端子に設定し、出力端子に設定したそれぞれの前記ブートプログラムを同一のタイミングにXOR回路へ出力する、シフトレジスタを有する、コンピュータ装置。 A control unit for outputting a first boot program address signal;
Memory for storing boot programs at multiple addresses;
The first boot program address signal is converted into a second boot program address signal that is an address of a memory in which the boot program is stored, and the second boot program address signal is output to the memory. An address translation unit;
A program reading unit that detects an error in the plurality of boot programs read from the memory and outputs the boot program in which the error is corrected to the control unit, and
The program reading unit
Each of the boot programs read out from the memory at different timings is set as an output terminal, and each of the boot programs set as output terminals is output to the XOR circuit at the same timing, and has a shift register. Computer device.
前記第2のブートプログラム用アドレス信号を、予め定められたタイミングに、前記ブートプログラムを格納しているアドレスに順次変換する、請求項1に記載のコンピュータ装置。 The address conversion unit
The computer apparatus according to claim 1, wherein the second boot program address signal is sequentially converted to an address storing the boot program at a predetermined timing.
XOR回路を用いて、複数の前記ブートプログラムの誤りを修正する、請求項1又は2に記載のコンピュータ装置。 The program reading unit
The computer apparatus according to claim 1, wherein an error of a plurality of the boot programs is corrected using an XOR circuit.
前記メモリから読み出された、複数の前記ブートプログラムの誤りを検出し、誤りを修正した前記ブートプログラムを前記制御部へ出力するプログラム読出し部と、を備え、
前記プログラム読出し部は、
前記メモリから異なるタイミングに読み出された複数の前記ブートプログラムのそれぞれを出力端子に設定し、出力端子に設定したそれぞれの前記ブートプログラムを同一のタイミングにXOR回路へ出力する、シフトレジスタを有する、アドレス変換装置。 The first boot program address signal output from the control unit is converted into a second boot program address signal indicating an address in a memory storing a plurality of boot programs and indicating a location where the boot program is stored. An address conversion unit for outputting the second boot program address signal to the memory;
A program reading unit that detects an error in the plurality of boot programs read from the memory and outputs the boot program in which the error is corrected to the control unit, and
The program reading unit
Each of the boot programs read out from the memory at different timings is set as an output terminal, and each of the boot programs set as output terminals is output to the XOR circuit at the same timing, and has a shift register. Address translation device.
前記第2のブートプログラム用アドレス信号を、予め定められたタイミングに、前記ブートプログラムを格納しているアドレスに順次変換する、請求項5に記載のアドレス変換装置。 The address conversion unit
6. The address conversion device according to claim 5 , wherein the second boot program address signal is sequentially converted into an address storing the boot program at a predetermined timing.
XOR回路を用いて、複数の前記ブートプログラムの誤りを修正する、請求項5又は6に記載のアドレス変換装置。 The program reading unit
The address translation device according to claim 5 or 6 , wherein an error of a plurality of the boot programs is corrected using an XOR circuit.
前記第2のブートプログラム用アドレス信号を前記メモリへ出力し、
前記メモリから異なるタイミングに読み出された複数の前記ブートプログラムのそれぞれをシフトレジスタの出力端子に設定し、
前記出力端子に設定したそれぞれの前記ブートプログラムを同一のタイミングにXOR回路へ出力し、
前記XOR回路を用いて複数の前記ブートプログラムの誤りを検出し、
誤りを修正した前記ブートプログラムを前記制御部へ出力することをコンピュータに実行させるプログラム。
The first boot program address signal output from the control unit is converted into a second boot program address signal indicating an address in a memory storing a plurality of boot programs and indicating a location where the boot program is stored. ,
Outputting the second boot program address signal to the memory;
Each of the boot programs read from the memory at different timings is set to the output terminal of the shift register ,
Output each boot program set to the output terminal to the XOR circuit at the same timing,
Detecting a plurality of boot program errors using the XOR circuit;
A program that causes a computer to output the boot program in which an error is corrected to the control unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014151752A JP6108478B2 (en) | 2014-07-25 | 2014-07-25 | Computer device, address translation device, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014151752A JP6108478B2 (en) | 2014-07-25 | 2014-07-25 | Computer device, address translation device, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016029537A JP2016029537A (en) | 2016-03-03 |
JP6108478B2 true JP6108478B2 (en) | 2017-04-05 |
Family
ID=55435395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014151752A Active JP6108478B2 (en) | 2014-07-25 | 2014-07-25 | Computer device, address translation device, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6108478B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6161299A (en) * | 1984-08-31 | 1986-03-29 | Fujitsu Ltd | Memory |
JP3297738B2 (en) * | 2000-02-16 | 2002-07-02 | 東北大学長 | CMOS majority circuit |
JP2012059034A (en) * | 2010-09-09 | 2012-03-22 | Mitsubishi Electric Corp | Boot processor |
-
2014
- 2014-07-25 JP JP2014151752A patent/JP6108478B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016029537A (en) | 2016-03-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9223648B2 (en) | Memory storage device, memory controller thereof, and method for processing data thereof | |
JP2005242797A (en) | Error correction circuit | |
US9396079B2 (en) | Semiconductor memory device and semiconductor system including the same | |
KR20120132765A (en) | Nonvolatile memory device, operation method thereof, and memory system having the same | |
JP2009042911A (en) | Memory access system | |
US9917601B2 (en) | Adaptive error correction in a memory system | |
US8332727B2 (en) | Error correction circuit, flash memory system including the error correction circuit, and operating method of the error correction circuit | |
KR20100031402A (en) | Method and apparatus for detecting free page and error correction code decoding method and apparatus using the same | |
JP2007265056A (en) | Configuration apparatus for programmable logistic device | |
TWI517163B (en) | Nonvolatile memory apparatus and method for processing configuration information thereof | |
JP6108478B2 (en) | Computer device, address translation device, and program | |
US9064605B2 (en) | Semiconductor system and method for reparing the same | |
US10180888B2 (en) | Memory sparing on memory modules | |
JP2008310896A (en) | Nonvolatile memory device, nonvolatile memory system, and method for controlling nonvolatile memory device | |
US20150293840A1 (en) | Memory controller and associated method | |
JP2014016925A (en) | Information processing system, data switching method and program | |
TWI485707B (en) | Nonvolatile memory apparatus and method for processing configuration information thereof | |
TWI808098B (en) | Device for supporting error correction code and test method thereof | |
JP2012008620A (en) | Error correction test method | |
JP2020150515A (en) | Error correction circuit and memory system | |
JP5652720B2 (en) | FPGA system and electronic device | |
CN112540866B (en) | Memory device and data access method thereof | |
US10014073B2 (en) | Semiconductor devices | |
US20140136910A1 (en) | Data communication apparatus and control method | |
JP6184121B2 (en) | Storage device inspection system, storage device inspection method, and nonvolatile semiconductor storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160822 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160906 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161031 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161122 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170123 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170207 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170302 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6108478 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |