JP4135413B2 - MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM - Google Patents

MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM Download PDF

Info

Publication number
JP4135413B2
JP4135413B2 JP2002194452A JP2002194452A JP4135413B2 JP 4135413 B2 JP4135413 B2 JP 4135413B2 JP 2002194452 A JP2002194452 A JP 2002194452A JP 2002194452 A JP2002194452 A JP 2002194452A JP 4135413 B2 JP4135413 B2 JP 4135413B2
Authority
JP
Japan
Prior art keywords
parity
program
memory
check
signal processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002194452A
Other languages
Japanese (ja)
Other versions
JP2004038541A (en
Inventor
功 宮井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2002194452A priority Critical patent/JP4135413B2/en
Publication of JP2004038541A publication Critical patent/JP2004038541A/en
Application granted granted Critical
Publication of JP4135413B2 publication Critical patent/JP4135413B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、メモリに記憶されたデータやプログラムのチェックを行うメモリチェックシステム、メモリチェック装置および方法、ならびに、メモリチェックプログラムに関する。
【0002】
【従来の技術】
従来から、例えばディジタルフィルタを用いた信号処理を行うために、DSP(Digital Signal Processor)が多く用いられている。DSPは、ROM(Read Only Memory)やRAM(Random Access Memory)に記憶されたプログラム(インストラクション)や係数データに基づき、加減乗除を行う演算器を構成し、入力されたディジタル信号に対して信号処理を行うようにされている。特に、RAMにプログラムや係数データを記憶するタイプのDSPは、RAMの記憶内容を書き換えることでDSPの機能をフレキシブルに変更することができるので、近年では需要が非常に多い。このようなDSPでは、例えば、DSPを制御するマイクロコンピュータなどから、インストラクションのデータや係数データをダウンロードし、RAMに記憶させるのが一般的である。
【0003】
DSPは、プログラムコードが記憶されるインストラクションRAMと、係数データが記憶される係数RAMとを有し、これらがバスにより接続される。また、RAMは、インストラクションRAMと係数RAM、さらに、係数RAMは、例えばX係数データを格納するRAMおよびY係数データを格納するRAMがそれぞれ物理的に独立され、各RAMに接続されるバスも、それぞれ物理的に独立した構成とされる。
【0004】
これにより、DSPでは、各RAMのデータの読み出しや書き込みを並列的に行うことができ、例えばX係数およびY係数をRAMから読み込んで演算処理し、演算結果をRAMに一旦記憶させる、といったような一連の処理を、一つのコマンドで実行することができる。一方、CPU(Central Processing Unit)を用いた構成では、CPUとRAMとが1本のバスで接続されるのが一般的とされ、上述の処理を行うために、各係数データ読み出し、演算処理、演算処理結果のRAMへの格納などのそれぞれの処理に応じた複数のコマンドが必要とされる。したがって、DSPは、CPUに比べ、積和演算を中心とした処理に対して高速に動作することができる。
【0005】
RAMに格納されたデータは、静電気やノイズなどの影響で部分的に破壊される可能性がある。また、RAMにデータを書き込む際にタイミングが合わないなど、書き込み途中にエラーが発生した場合、誤ったデータが格納されてしまうことになる。また、プログラム自体にバグがあり、プログラム実行中にRAMの領域を壊してしまうことも起こり得る。DSPのプログラムや係数データをRAMに格納してDSPを用いる場合、RAMに格納された内容にエラーがあると、DSPが期待される動作をしないばかりか、DSPが暴走してしまうおそれがある。
【0006】
【発明が解決しようとする課題】
そこで、従来から、DSPの暴走を検出したり、RAMに格納された内容をチェックする方法が幾つか考えられてきた。一例として、ある一定周期毎にプログラムカウンタをリセットすることにより、プログラムの異常ループや暴走を検出するウォッチドッグタイマが知られている。これによれば、例えばプログラムの実行箇所を示すプログラムカウンタが異常を来しているようなときに、これを検出することができる。
【0007】
また、他の例として、特開平5−313908号公報には、外部メモリに予め実行用プログラムの異常を検出するためのプログラム異常検出用プログラムを格納しておき、このプログラム異常検出用プログラムを用いてRAM上の誤りを検出する方法が開示されている。プログラム異常検出用プログラムを実行用プログラムと共に外部メモリからRAMにダウンロードする。このプログラム異常検出用プログラムにより、RAM上の実行用プログラムおよびプログラム異常検出用プログラムの異常の有無を調べ、異常が検出された実行用プログラムやプログラム異常検出用プログラムを修正する。
【0008】
プログラム異常検出用プログラムは、例えばRAMに格納されたプログラムデータや係数データに対してチェックサムやXORなどを求め、求められた値と予め用意された正しいチェックサム値やXOR結果といったチェックコードとを比較することにより、プログラムやデータの検査を行う。
【0009】
しかしながら、この方法では、RAMのアドレス単位でアクセスを行い、RAMに記憶されたデータを読み出した後、読み出されたデータを誤り検出のプログラムや誤り検出手段に転送して誤りを検出しているため、CPUやDSPの処理能力の向上に伴い大量のデータやプログラムコードを容易に処理可能となった場合、チェックしなければならないRAMの容量が増大し、チェック時間に非常に多くの時間を費やさねばならないという問題点があった。
【0010】
また、この方法では、プログラムの異常を検出するためのプログラム異常検出用プログラムおよびチェックコードと、検出の対象となる実行用プログラムおよび係数データとが同一のRAM上に存在する。そのため、静電気などの影響で、RAMに記憶されたプログラム異常検出用プログラムおよびチェックコードそのものや、これらと共に実行用プログラムおよび係数データが破壊されてしまう可能性があるという問題点があった。
【0011】
さらに他の例として、特開2000−339230号公報には、DMA(Direct Memory Access)を用いてRAM上の記憶情報を誤り検出手段に直接的に転送して、RAMに記憶された内容に誤りが含まれるか否かを判定する方法が開示されている。この方法によれば、RAMに格納されたプログラムデータのみならず、RAMに格納された係数データなどの誤り検出も可能とされる。そのため、RAMに格納されたデータに基づき動作するDSPやCPUが暴走に至らないようなデータ誤りも検出することができる。
【0012】
また、この特開2000−339230号公報の方法によれば、RAMに格納されたプログラムデータや係数データなどの誤りを検出する際に、検出のためのプログラムをCPU上で実行させる必要が無いため、データ誤り検出を考慮してCPUの処理能力を多めに見積もる必要が無いという利点がある。また、誤り検出手段をRAMとは別に有するため、RAM内容が破壊されても、誤り検出自体は問題なく行われる。
【0013】
しかしながら、この方法でも、上述したような、RAM容量の増大に伴いチェック時間が増加してしまうという問題点があった。
【0014】
したがって、この発明の目的は、RAMに格納されたプログラムデータや係数データのチェックおよび修正を、高速且つ正確に行うことができるメモリチェックシステム、メモリチェック装置および方法、ならびに、メモリチェックプログラムを提供することにある。
【0015】
【課題を解決するための手段】
この発明は、上述した課題を解決するために、書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置の書き換え可能なメモリの内容をチェックするメモリチェックシステムにおいて、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置と、ホスト装置と接続され、ホスト装置から供給された実行用プログラム、パリティチェックプログラムおよびパリティコードを格納する書き換え可能なメモリを有し、書き換え可能なメモリに格納された実行用プログラムに基づき信号処理を行う信号処理装置とを備え、信号処理装置では、書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、パリティ演算の結果に基づいた検出コードを出力するようにしたことを特徴とするメモリチェックシステムである。
【0016】
また、この発明は、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置と接続され、ホスト装置から供給された実行用プログラム、パリティチェックプログラムおよびパリティコードを格納する書き換え可能なメモリを有し、書き換え可能なメモリに格納された実行用プログラムに基づき信号処理を行う信号処理装置の書き換え可能なメモリの内容をチェックするメモリチェック方法において、信号処理装置が、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置から供給された実行用プログラム、パリティチェックプログラムおよびパリティコードを格納する書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、信号処理装置が、パリティ演算のステップによるパリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップとを有することを特徴とするメモリチェック方法である。
【0017】
また、この発明は、書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置において、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが格納される書き換え可能なメモリと、書き換え可能なメモリに格納された実行用プログラムに基づき信号処理を行う信号処理手段とを備え、信号処理装置が、書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、パリティ演算の結果に基づいた検出コードを出力するようにしたことを特徴とする信号処理装置である。
【0018】
また、この発明は、書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置のメモリチェック方法において、信号処理装置が、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが格納される書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、信号処理装置が、パリティ演算のステップによるパリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップとを有することを特徴とする信号処理装置のメモリチェック方法である。
【0019】
また、この発明は、書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置の書き換え可能なメモリに対するメモリチェックを実行させるメモリチェックプログラムにおいて、信号処理装置が、実行用プログラムと、パリティ演算によりメモリをチェックするメモリチェックプログラムと、実行用プログラムおよびメモリチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが書き換え可能なメモリに格納され、書き換え可能なメモリ上の実行用プログラムおよびメモリチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、信号処理装置が、パリティ演算のステップによるパリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップとを有することを特徴とするメモリチェックプログラムである。
【0020】
上述したように、請求項1および7に記載の発明は、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置と、ホスト装置と接続され、ホスト装置から供給された実行用プログラム、パリティチェックプログラムおよびパリティコードを格納する書き換え可能なメモリを有し、書き換え可能なメモリに格納された実行用プログラムに基づき信号処理を行う信号処理装置とを備え、信号処理装置では、書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、パリティ演算の結果に基づいた検出コードを出力するようにしているため、メモリチェックに要する時間が短縮されると共に、実行用プログラムのチェックとパリティチェックプログラム自身のチェックとを交互に行うことができる。
【0021】
また、請求項8および13に記載の発明は、実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが格納される書き換え可能なメモリと、書き換え可能なメモリに格納された実行用プログラムに基づき信号処理を行う信号処理手段とを備え、書き換え可能なメモリに格納されたパリティチェックプログラムにより、書き換え可能なメモリに格納された実行用プログラムおよびパリティチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、パリティ演算の結果に基づいた検出コードを出力するようにしているため、メモリチェックに要する時間が短縮されると共に、実行用プログラムのチェックとパリティチェックプログラム自身のチェックとを交互に行うことができる。
【0022】
また、請求項14に記載の発明によるメモリチェックプログラムは、実行用プログラムと、パリティ演算によりメモリをチェックするメモリチェックプログラムと、実行用プログラムおよびメモリチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが書き換え可能なメモリに格納され、書き換え可能なメモリ上の実行用プログラムおよびメモリチェックプログラムに対して、書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、パリティ演算のステップによるパリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップとを有するため、メモリチェックに要する時間が短縮されると共に、実行用プログラムのチェックと自分自身のチェックとを交互に行うことができる。
【0023】
【発明の実施の形態】
以下、この発明の実施の一形態について説明する。この発明では、DSP(Digital Signal Processor)で用いられる実行用プログラムや係数データを、ホストとなるマイクロコンピュータ(以下、ホストマイコンと称する)が有するメモリからDSPのRAM(Random Access Memory)にダウンロードし、DSPが有するRAMに格納するようにした構成において、ダウンロードされDSPのRAMに格納された実行用プログラムおよびデータをパリティ演算によりチェックするパリティチェックプログラムを、DSP実行用プログラムおよびデータと共にDSPのRAMにダウンロードおよび格納し、DSP側で、ダウンロードされたパリティチェックプログラムを用いてRAMに格納された実行用プログラムおよび係数データ、ならびに、パリティチェックプログラム自身のチェックを行う。
【0024】
このとき、この発明によれば、RAMに格納された実行用プログラムおよびパリティチェックプログラムに対するパリティチェックプログラムによるチェックは、RAMの単位アドレスの複数のサイズからなるブロック毎に行われる。
【0025】
実行用プログラムおよび係数データ、ならびに、パリティチェックプログラムのチェックが所定サイズのブロック単位で行われるため、チェックに要する時間を短縮できる。また、パリティチェックプログラム自身のチェックもブロック単位で行うため、RAMに格納された実行用プログラムおよび係数データとパリティチェックプログラムとを、ブロック毎に交互にチェックすることができる。これにより、パリティチェックプログラム自身が正常か否かを常にチェックすることができる。
【0026】
さらに、この発明では、ホストマイコン側のメモリに格納されているチェックプログラムを用いて、DSP側にダウンロードされRAMに格納された実行用プログラムおよび係数データ、ならびに、チェックプログラムのチェックを所定サイズのブロック単位で行うようにしている。チェックをDSP側およびホストマイコン側の双方で行うため、チェックに用いるチェックコードと、チェックプログラムとの何方が正常でないかを判断することができる。
【0027】
図1は、この発明の実施の一形態に適用可能なDSPシステムの一例の構成を概略的に示す。ホストマイコン1は、例えば、CPU10およびRAMおよび/またはROM(Read Only Memory)によるメモリ11を有する、マイクロコンピュータである。DSP2は、RAM20を有し、RAM20に格納された実行用プログラムや係数データに基づき動作する。DSP2の実行用プログラムは、DSP2が解読可能なインストラクションコードによって記述される。
【0028】
ホストマイコン1とDSP2とがアドレスバス3およびデータバス4で接続される。例えばホストマイコン1からDSP2に対して、DSP2の動作を指示するコマンドなどがバス3、4を介して送信され、ホストマイコン1によりDSP2が制御される。
【0029】
ホストマイコン1のメモリ11には、DSP2の実行用プログラムであるDSPプログラム12や係数データ(図示しない)などが予め格納される。このホストマイコン1のメモリ11に格納されるDSPプログラムも、上述したインストラクションコードを用いて記述される。以下では、DSPプログラムおよび当該DSPプログラムで用いられる係数データを、まとめてDSPプログラムと称する。
【0030】
ホストマイコン1からDSP2に対してDSPプログラムがアップロードされ、DSP2のRAM20に格納される。例えば、ホストマイコン1からDSP2に対して、アドレスバス3を介してRAM20のアドレスが指定される。ホストマイコン1からDSP2に対して、データバス4を介してDSPプログラムがアップロードされる。アップロードされたDSPプログラムは、アドレスバス3を用いて指定されたアドレスに基づきRAM20に書き込まれる。
【0031】
DSP2は、ホストマイコン1からダウンロードされたDSPプログラムに従った動作を行う。ホストマイコン1からDSP2にアップロードされるDSPプログラムの内容を変更することで、DSP2に異なる処理を行わせることができる。
【0032】
さらに、ホストマイコン1のメモリ11には、DSP2にアップロードされRAM20に格納されたDSPプログラム12のパリティチェックを行うためのパリティチェックプログラム13と、メモリ11に格納されたDSPプログラム12およびパリティチェックプログラム13に対してパリティチェックプログラム13を用いて予めパリティ演算を行った結果であるパリティコード14とが格納される。パリティチェックプログラム13は、DSP2において実行可能なように、上述したインストラクションコードで記述される。これらパリティチェックプログラム13およびパリティコード14は、上述のDSPプログラム12と共に、ホストマイコン1からDSP2にアップロードされ、RAM20に格納される。
【0033】
図2は、RAM20における一例のデータ配置を示す。図2の例では、RAM20が64kB(キロバイト)の容量を有しており、アドレスが「0x0000」乃至「0x10000」で指定される。なお、アドレスの記述において、「0x」は、記述が16進表記であることを示す。アドレス「0x0400」乃至「0xAFFF」は、DSPプログラム23が格納される。アドレス「0xB000」乃至「0xFFFF」は、バッファ領域24である。バッファ領域24は、DSP2においてDSPプログラム23が動作する際に用いられる領域であって、DSPプログラムの実行に伴い内容が変化される。
【0034】
アドレス「0x0000」乃至「0x02FF」は、パリティコード21が格納される。アドレス「0x0300」乃至「0x03FF」は、パリティチェックプログラム22が格納される。パリティコード21は、RAM20における、バッファ領域24を除く全ての領域のデータに対するパリティコードとなる。すなわち、パリティコード21は、RAM20のバッファ領域24を除く全ての領域のデータに対して、パリティチェックプログラム22を用いて予めパリティ演算を行った結果に対応する。バッファ領域24は、上述したようにDSPプログラムの実行に伴い内容が変化されるため、パリティが確定しない。
【0035】
なお、RAM20の容量は、64kBに限定されるものではなく、この図2に示されるアドレス配置も、一例であって、この例に限定されるものではない。
【0036】
この発明では、パリティチェックプログラム22によるパリティチェック演算を、所定サイズのブロックを単位として、1ブロック毎に行う。例えば、RAM20における単位アドレスが複数集合したサイズで1ブロックが構成される。一例として、パリティチェックプログラム22が格納される領域に対応するサイズのブロックを1単位ブロックとする。RAM20の容量が64kBであって、パリティチェックプログラム22がアドレス幅「0x0100」を有するこの例では、アドレス幅「0x0100」に対応する、サイズが256バイトのブロックが1単位ブロックとされる。したがって、図2の例では、パリティコード21が3ブロック、DSPプログラム23が172ブロックでそれぞれ構成されることになる。
【0037】
パリティチェックプログラム22によるパリティチェック演算は、このサイズが256バイトの1ブロックを単位として、1ブロック毎に行われる。予め計算されRAM20に格納されるパリティコード21も、DSPプログラム23およびパリティチェックプログラム22がこの1ブロックを単位としてパリティ演算されたものである。RAM20に対して所定にアドレスを指定することで、パリティコード21から、ブロック単位のパリティ演算に対応するパリティコードを取り出すことができるようにされている。
【0038】
なお、上述では、ブロックのサイズがパリティチェックプログラム22のサイズと同一であるように説明したが、これはこの例に限定されない。ブロックのサイズは、RAM20のアドレス指定の単位で任意に設定することができる。例えば、パリティチェックプログラム22が複数のブロックに格納されるようなブロックサイズとしてもよい。これに限らず、例えば、アドレス指定の最小単位、例えば図2における1行をブロックとすることも可能である。
【0039】
次に、この発明の実施の一形態によるパリティチェックの動作について、図3を用いて説明する。パリティチェックに先立って、ホストマイコン1からDSP2に対して、プログラムチェック開始コマンドが発行される。そして、ホストマイコン1からDSP2に対して、チェックを行いたいブロックが指示される。例えば、チェックを行いたいブロックのRAM20における先頭アドレスがホストマイコン1により指示される。DSP2では、この指示に基づきチェックを行うブロックが確認される。ブロックが確認されたら、RAM20に格納されるパリティチェックプログラム22が実行され、指定されたブロックに対するパリティチェックが実行される。
【0040】
なお、パリティチェックは、様々な方法により行うことが可能である。例えば、偶数パリティや奇数パリティといった単純パリティを用いてパリティチェックを行うことが考えられる。パリティチェックプログラム22により単純パリティ演算を行い、演算結果をブロック毎に積算した値を出力する。これに限らず、パリティチェックをXOR(Exclusive OR)を用いて行うこともできる。ブロックのデータに対して、予め用意された所定のビット列を用いてXORを求める。XORによるチェックは、より高速に処理を行うことができる利点がある。また、パリティチェック方法としてCRC(cyclic redundancy check)を用いることもできる。
【0041】
一例として、パリティチェックプログラム22によりDSPプログラム23の4ブロック目のパリティチェックを行うものとする。先ず、パリティチェックプログラム22により、DSPプログラム23の4ブロック目のパリティ演算が行われ、パリティ演算結果41が得られる。続いてRAM20から、パリティコード21のうち、パリティチェック対象である、DSPプログラム23の4ブロック目のパリティ演算結果に対応するパリティコード40が取り出される。この取り出されたパリティコード40とパリティ演算結果41とが比較処理42により比較される。
【0042】
若し、比較処理42によるパリティコード40およびパリティ演算結果41の比較の結果、両者が同一の値を示しているとされた場合には、判断処理43により、RAM20上のDSPプログラム23の4ブロック目には誤りが無かったと判断され、その旨を示す正解固定値44がレジスタ46にセットされる。例えばRAM20のバッファ領域24内の所定領域をレジスタ46として用いることができる。
【0043】
一方、比較処理42によるパリティコード40およびパリティ演算結果41の比較の結果、両者が異なる値であるとされた場合には、判断処理43により、パリティコード40および/またはパリティ演算結果41に誤りが存在すると判断され、パリティチェックプログラム22によるパリティ演算結果41がレジスタ46にセットされる。
【0044】
すなわち、レジスタ46には、パリティチェックプログラム22のパリティ演算結果41に基づき、パリティチェックの対象となるブロック(この例では、DSPプログラム23の4ブロック目)に誤りが無いと判断されれば正解固定値44がセットされ、誤りがあると判断されれば、誤りがあると判断された当該パリティ演算の演算結果41そのものがレジスタ46にセットされる。
【0045】
DSPプログラム23の1ブロック分のパリティチェックが終了すると、次に、RAM20に格納されたパリティチェックプログラム22に対するパリティチェックが行われる。パリティチェックプログラム22により、パリティチェックプログラム22が格納されているブロック(この例ではアドレス「0x0300」乃至「0x03FF」のブロック)を対象に、パリティ演算を行なわれ、パリティ演算結果31が得られる。続いてRAM20から、パリティコード21のうち、パリティチェックプログラム22のパリティ演算結果に対応するパリティコード30が取り出される。この取り出されたパリティコード30とパリティ演算結果31とが比較処理32により比較される。
【0046】
若し、比較処理32によるパリティコード30およびパリティ演算結果31の比較の結果、両者が同一の値を示ている場合には、判断処理33によりRAM20上のパリティチェックプログラム22には誤りが無かったと判断され、その旨を示す正解固定値34がレジスタ36にセットされる。例えばRAM20のバッファ領域24の、上述したレジスタ46として用いられた領域とは異なる領域がレジスタ36として用いられる。
【0047】
一方、比較処理32によるパリティコード30およびパリティ演算結果31の比較の結果、両者が異なる値であるとされた場合には、判断処理43により、パリティコード30および/またはパリティ演算結果31に誤りが存在すると判断され、パリティチェックプログラム22によるパリティ演算結果31がレジスタ36にセットされる。
【0048】
すなわち、レジスタ36には、上述のレジスタ46と同様に、パリティチェックプログラム22のパリティ演算結果31に基づき、パリティチェックの対象となるRAM20上のパリティチェックプログラム22に誤りが無いと判断されれば正解固定値34がセットされ、誤りがあると判断されれば、誤りがあると判断された当該パリティ演算のパリティ演算結果31そのものがセットされる。
【0049】
こうして、DSPプログラム23の4ブロック目およびパリティチェックプログラム22そのものの、それぞれ1ブロック分のパリティチェック処理が終了すると、DSP2からホストマイコン1に対して、パリティチェックが行われたブロックのRAM20におけるアドレスが通知される。
【0050】
ホストマイコン1により、DSP2から通知された、パリティチェックが行われたブロックのアドレスが受け取られると、DSP2のRAM20におけるレジスタ36および46にセットされたデータがホストマイコン1により取り込まれる。そして、取り込まれたレジスタ36および46のデータに基づき、RAM20にアップロードしたデータの修正が必要か否かの判断処理が行われる。データ修正が必要であると判断されれば、RAM20に対するデータの再アップロードが行われ、RAM20に格納されたデータが修正される。
【0051】
なお、正解固定値34および44は、パリティチェックプログラム22によるパリティ演算の演算結果と重複しない所定の値が用いられる。
【0052】
図4は、ホストマイコン1による、パリティチェック結果に基づく一例のデータ修正処理を示すフローチャートである。最初のステップS10で、DSP2から送信された、パリティチェックを行ったブロックのアドレスがホストマイコン1に受信される。次のステップS11で、ホストマイコン1により、レジスタ36にセットされた、パリティチェックプログラム22に対するパリティチェック結果が取り込まれる。
【0053】
ステップS12で、ステップS11でレジスタ36から取り込まれたパリティチェック結果が正解固定値34であるか否かが判断される。若し、レジスタ36から取り込まれた値が正解固定値34であると判断された場合には、RAM20に格納されたパリティチェックプログラム22およびパリティコード21には問題が無かったと判断され、処理はステップS13に移行する。
【0054】
一方、ステップS12でレジスタ36から取り込まれた値が正解固定値34ではないと判断されれば、処理はステップS16に移行される。ステップS16では、ホストマイコン1のメモリ11内のパリティコード14のうち、パリティチェックプログラム22、すなわちメモリ11内のパリティチェックプログラム13に対するパリティチェック結果に対応するパリティコードが取り出される。そして、ステップS17において、取り出されたパリティコードと、上述のステップS11によりレジスタ36から取り込まれた値とが一致しているか否かが判断される。
【0055】
若し、両者が一致していると判断されれば、RAM20内のパリティチェックプログラム22は正しいが、パリティコード21が誤っていると考えられる。すなわち、パリティチェックプログラム22に対するパリティ演算結果31が正しい値となっても、比較処理32で当該パリティ演算結果31と比較されるパリティコード30が誤った値であれば、当該パリティ演算結果31とパリティコード30とが一致せず、レジスタ36に正解固定値34がセットされない。このときには、レジスタ36に対してパリティチェックプログラム22に対する正しいパリティ演算結果がセットされることになる。
【0056】
この場合、処理はステップS18に移行し、ホストマイコン1のメモリ11に格納されるパリティコード14のうちパリティチェックプログラム22(パリティチェックプログラム13)に対するパリティ演算結果に対応するパリティコードが取り出され、DSP2に送信され再アップロードされる。再アップロードされたこのパリティコードは、上述のパリティコード30としてRAM20の対応する領域に書き込まれる。パリティコードの再アップロードが完了すると、処理はステップS15に移行される。
【0057】
なお、上述では、パリティコードの再アップロードに際して、メモリ11に格納されるパリティコード14のうち対応するデータだけを取り出し、DSP2に送信しているが、これはこの例に限定されない。メモリ11に格納されるパリティコード14のうち対応するデータを含むブロックを、ホストマイコン1からDSP2に送信してもよい。また、メモリ11に格納されるパリティコード14を全てDSP2に送信することもできる。
【0058】
ステップS15では、次のブロックに対するチェック処理が準備される。すなわち、ホストマイコン1からDSP2に対して、次にチェックを行うブロックのアドレスが通知される。例えば、この例では、RAM20におけるDSPプログラム23の5ブロック目のアドレスと、パリティチェックプログラム22のアドレスとがDSP2に対して通知される。
【0059】
アドレスが通知されると、DSP2において上述したようにして、RAM20における通知されたアドレスのブロックに対してパリティ演算が行われ、パリティ演算結果に基づきレジスタ36および46に正解固定値34、44やパリティ演算結果がセットされる。そして、ホストマイコン1では、処理はステップS10に移行され、レジスタ36および46にセットされた値に基づくチェック処理が行われる。
【0060】
この発明の実施の一形態では、このように、RAMに格納されたDSPプログラム23およびパリティチェックプログラム22に対するチェックを、ブロック単位で交互に行うようにしている。これにより、パリティチェックプログラム22を常に正常な状態に保ちながらDSPプログラム23に対するチェックを行うことができ、チェック結果の信頼性が向上される。
【0061】
一方、上述のステップS17で、両者が一致していないと判断された場合、RAM20上のパリティチェックプログラム22が誤っていると判断される。またこの場合、さらに、RAM20上のパリティチェックプログラム22と共にパリティコード30も誤っている可能性がある。そこで、処理はステップS19に移行し、ホストマイコン1のメモリ11内に格納されたパリティチェックプログラム13がDSP2に対して再アップロードされる。再アップロードされたこのパリティチェックプログラム13は、パリティチェックプログラム22としてRAM20に格納される。パリティチェックプログラムの再アップロードが完了されると、処理はステップS15に移行される。
【0062】
このパリティチェックプログラム22に対するパリティチェック処理は、DSPプログラム23に対して行われるパリティチェック処理に対して、ブロック毎に交互に実行される。したがって、上述のステップS19でパリティチェックプログラム22の再アップロードを行った後に、再び同様のチェック処理が再アップロードされたチェックプログラム22に対して実行されることになる。その際に、上述のステップS17の判断においてパリティコード30に誤りがあったか否かを判定することができる。
【0063】
上述したように、ステップS12において、レジスタ36から取り込まれた値が正解固定値34であると判断された場合、RAM20上のパリティチェックプログラム22には誤りが無いとされ、処理はステップS13に移行され、RAM20のDSPプログラム23に対するブロック単位での修正処理が行われる。
【0064】
ステップS13では、ホストマイコン1により、レジスタ46にセットされた、DSPプログラム23のチェック対象とされるブロック(DSPプログラムの4ブロック目とする)に対するパリティチェック結果が取り込まれる。次のステップS14で、ステップS13でレジスタ46から取り込まれたパリティチェック結果が正解固定値44であるか否かが判断される。若し、レジスタ46から取り込まれたチェック結果が正解固定値44であると判断された場合には、RAM20に格納されたDSPプログラム23の4ブロック目には問題が無かったと判断され、処理はステップS15に移行される。
【0065】
一方、ステップS14で、レジスタ46から取り込まれた値が正解固定値44ではないと判断されれば、処理はステップS20に移行される。ステップS20では、ホストマイコン1のメモリ11内のパリティコード14のうち、パリティ演算の対象であるDSPプログラム23の4ブロック目、すなわちメモリ11内のDSPプログラム12における対応ブロックに対するパリティコードが取り出される。そして、ステップS21において、取り出されたパリティコードと、上述のステップS13によりレジスタ46から取り込まれた値とが一致しているか否かが判断される。
【0066】
若し、両者が一致していると判断されれば、上述のパリティチェックプログラム22に対する判断の場合と同様にして、RAM20内のDSPプログラム23の4ブロック目は正しいが、パリティコード21が誤っていると考えられる。この場合、処理はステップS22に移行し、ホストマイコン1のメモリ11に格納されるパリティコードのうちDSPプログラム23の4ブロック目に対するパリティ演算結果に対応するパリティコードが取り出され、DSP2に再アップロードされる。再アップロードされたこのパリティコードは、上述のパリティコード40としてRAM20の対応する領域に書き込まれる。パリティコードの再アップロードが完了すると、処理はステップS15に移行される。
【0067】
一方、ステップS21で、両者が一致していないと判断された場合、パリティチェック対象であるDSPプログラム23の4ブロック目が誤っていると判断される。そこで、処理はステップS23に移行され、ホストマイコン1のメモリ11内に格納されたDSPプログラム12における、DSPプログラム23の4ブロック目に対応するブロックがDSP2に対して再アップロードされる。再アップロードされたこのブロックは、RAM20の対応する位置に書き込まれる。この際アップロード処理が完了されると、処理はステップS15に移行される。
【0068】
なお、図3および図4を用いて説明した、この発明の実施の一形態によるメモリチェックは、DSP2の起動時に行うことができる。例えば、ホストマイコン1からDSP2に対して処理開始が指示されてから、実際にDSP2における処理が開始されるまでの間に、一連のメモリチェック処理が行われる。これに限らず、DSP2の稼働中においてDSP2本来の処理が行われていないときに、メモリチェック処理を実行することもできる。また、メモリチェック処理は、DSP2の稼働中において実行可能なタイミングで随時行ってもよいし、DSP2の起動時などに1度だけ行ってもよい。さらに、DSP2の処理能力に余裕があれば、DSP2の動作中に本来の処理に対するバックグラウンドとして、常時、メモリチェック処理を行うようにしてもよい。
【0069】
さらにまた、一連のメモリチェック動作において、RAM20の全てのブロックに対してチェックを行う必要は無い。例えば、RAM20途中のブロックまでチェックを行った時点で一時的に処理を中断し、再びチェック可能となったときに、処理が中断されたブロックから再びチェック処理を再開するようにできる。
【0070】
上述では、この発明の実施の一形態によるメモリチェックがホストマイコン1およびDSP2で行われるように説明したが、これはこの例に限定されず、この発明に本質的な部分はDSP2側だけでも実現可能である。例えば、上述の図4において、データの再アップロード処理、すなわち、ステップS18、S19、S22およびS23の処理を除いた処理は、DSP2のみで実行可能である。パリティコードやパリティチェックプログラム、DSPプログラムの再アップロードは、DSPからホストマイコンに対して再アップロード要求を出すことで可能である。また、DSPのRAMに、同一のパリティコードを複数、格納することで、図4におけるステップS16およびS17、ならびに、ステップS20およびS21の、パリティチェックプログラムによるパリティ演算結果と、正しいパリティコードとを比較する処理を代用することが可能である。
【0071】
【発明の効果】
以上説明したように、この発明は、DSPのRAMに対するパリティチェックを、所定サイズのブロック毎に行うようにしているため、DSPとホストマイコンとの通信回数などが減少するため、チェック時間を短縮できる効果がある。
【0072】
また、DSPのRAMにアップロードしたDSPプログラムおよびパリティチェックプログラムについて、アップロードされたパリティチェックプログラムにより、RAMに格納されたパリティチェックプログラムに対するパリティチェックが行われる。このときには、パリティチェックプログラム自身に誤りが無いことが前提となる。したがって、DSPプログラムのパリティチェックを行う前に、パリティチェックプログラム自身のチェックを行う必要がある。
【0073】
この発明の実施の一形態では、パリティチェックをブロック単位で行うと共に、パリティチェックプログラムを1ブロックに収めるようにしているため、1回のパリティチェック処理でパリティチェックプログラム自身のチェックを終了できる。したがって、DSPプログラムのパリティチェックとパリティチェックプログラム自身のパリティチェックとを、ブロック単位で交互に行うことで、パリティチェックプログラム自身が正常か否かを常に確認できるという効果がある。
【0074】
またこれにより、DSPプログラムに対するパリティチェック結果と、パリティチェックプログラム自身に対するパリティチェック結果の2つのパリティチェック結果が確認できるので、DSPプログラムに誤りがあるのか、パリティチェックプログラム自身に誤りがあるのかが瞬時に判断できるという効果がある。
【0075】
さらに、この発明の実施の一形態では、パリティチェックの結果、パリティチェックプログラム自身に誤りがあるとされた場合に、当該パリティチェックによるパリティコードがそのまま出力されるため、ホストマイコン側で、アップロード元としてメモリに格納してあるデータを用いて再度チェックを行うことができる。このため、チェック対象のプログラムに誤りがあるのか、チェックにおいてパリティ演算結果との比較を行うパリティコードに誤りがあるのかを判断することができる効果がある。
【図面の簡単な説明】
【図1】この発明の実施の一形態に適用可能なDSPシステムの一例の構成を概略的に示す略線図である。
【図2】DSP内のRAMにおける一例のデータ配置を示す略線図である。
【図3】この発明の実施の一形態によるパリティチェックの動作について説明するための図である。
【図4】ホストマイコンによる、パリティチェック結果に基づく一例のデータ修正処理を示すフローチャートである。
【符号の説明】
1・・・ホストマイコン、2・・・DSP、11・・・メモリ、12・・・DSPプログラム、13・・・パリティチェックプログラム、14・・・パリティコード、20・・・RAM、21・・・パリティコード、22・・・パリティチェックプログラム、23・・・DSPプログラム、24・・・バッファ領域、30,40・・・パリティコード、31,41・・・パリティ演算結果、34,44・・・正解固定値、36,46・・・レジスタ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a memory check system, a memory check apparatus and method for checking data and programs stored in a memory, and a memory check program.
[0002]
[Prior art]
Conventionally, a DSP (Digital Signal Processor) is often used to perform signal processing using, for example, a digital filter. The DSP configures an arithmetic unit that performs addition / subtraction / division based on a program (instruction) or coefficient data stored in a ROM (Read Only Memory) or RAM (Random Access Memory), and performs signal processing on the input digital signal. Have been to do. In particular, DSPs of the type that store programs and coefficient data in the RAM are in great demand in recent years because the functions of the DSP can be flexibly changed by rewriting the stored contents of the RAM. In such a DSP, for example, instruction data and coefficient data are generally downloaded from a microcomputer controlling the DSP and stored in the RAM.
[0003]
The DSP has an instruction RAM in which program code is stored and a coefficient RAM in which coefficient data is stored, and these are connected by a bus. In addition, the RAM is an instruction RAM and a coefficient RAM, and further, for example, a RAM for storing X coefficient data and a RAM for storing Y coefficient data are physically independent of each other, and a bus connected to each RAM is also provided. Each is physically independent.
[0004]
As a result, the DSP can read and write data in each RAM in parallel. For example, the X coefficient and the Y coefficient are read from the RAM and processed, and the calculation result is temporarily stored in the RAM. A series of processing can be executed with one command. On the other hand, in a configuration using a CPU (Central Processing Unit), the CPU and the RAM are generally connected by a single bus, and in order to perform the above-described processing, each coefficient data is read, arithmetic processing, A plurality of commands corresponding to the respective processes such as storage of arithmetic processing results in the RAM are required. Therefore, the DSP can operate at a higher speed than the CPU with respect to processing centering on the product-sum operation.
[0005]
Data stored in the RAM may be partially destroyed by the influence of static electricity or noise. Also, if an error occurs during writing, such as when the timing does not match when writing data to the RAM, incorrect data will be stored. In addition, there is a bug in the program itself, and the RAM area may be destroyed during the execution of the program. When a DSP program or coefficient data is stored in the RAM and the DSP is used, if there is an error in the contents stored in the RAM, the DSP may not perform an expected operation, and the DSP may run away.
[0006]
[Problems to be solved by the invention]
Therefore, conventionally, several methods have been considered for detecting a DSP runaway or checking the contents stored in the RAM. As an example, there is known a watchdog timer that detects an abnormal loop or runaway of a program by resetting a program counter every certain period. According to this, it is possible to detect, for example, when the program counter indicating the execution location of the program is abnormal.
[0007]
As another example, in Japanese Patent Laid-Open No. 5-313908, a program abnormality detection program for detecting an abnormality in an execution program is stored in an external memory in advance, and this program abnormality detection program is used. A method for detecting errors on the RAM is disclosed. The program abnormality detection program is downloaded from the external memory to the RAM together with the execution program. With this program abnormality detection program, the execution program on the RAM and the program abnormality detection program are checked for abnormality, and the execution program and the program abnormality detection program in which the abnormality is detected are corrected.
[0008]
For example, the program abnormality detection program obtains a checksum or XOR for program data or coefficient data stored in the RAM, and obtains the obtained value and a check code such as a correct checksum value or XOR result prepared in advance. By comparing, program and data are inspected.
[0009]
However, in this method, access is performed in units of RAM addresses, and after reading the data stored in the RAM, the read data is transferred to an error detection program or error detection means to detect errors. For this reason, when a large amount of data and program code can be easily processed as the processing capacity of the CPU and DSP is improved, the capacity of the RAM that must be checked increases, and a great deal of time is spent on the check time. There was a problem that it had to be.
[0010]
In this method, the program abnormality detection program and check code for detecting a program abnormality, and the execution program and coefficient data to be detected exist on the same RAM. For this reason, there is a problem that the program abnormality detection program and the check code stored in the RAM or the execution program and the coefficient data may be destroyed due to the influence of static electricity or the like.
[0011]
As another example, Japanese Patent Laid-Open No. 2000-339230 discloses that information stored in a RAM is transferred to an error detection unit directly using DMA (Direct Memory Access), and the contents stored in the RAM are erroneous. A method for determining whether or not is included is disclosed. According to this method, it is possible to detect not only program data stored in the RAM but also error such as coefficient data stored in the RAM. Therefore, it is possible to detect a data error that does not cause the DSP or CPU that operates based on the data stored in the RAM to run away.
[0012]
Further, according to the method disclosed in Japanese Patent Laid-Open No. 2000-339230, it is not necessary to execute a detection program on the CPU when detecting an error such as program data or coefficient data stored in the RAM. There is an advantage that it is not necessary to estimate the CPU processing capacity excessively in consideration of data error detection. Further, since the error detection means is provided separately from the RAM, even if the RAM contents are destroyed, the error detection itself is performed without any problem.
[0013]
However, this method also has the problem that the check time increases as the RAM capacity increases as described above.
[0014]
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a memory check system, a memory check device and method, and a memory check program capable of checking and correcting program data and coefficient data stored in a RAM at high speed and accurately. There is.
[0015]
[Means for Solving the Problems]
In order to solve the above-described problem, the present invention provides a rewritable memory of a signal processing apparatus having a rewritable memory and performing signal processing according to the contents written in the rewritable memory. A memory check system for checking contents includes a memory for storing an execution program, a parity check program, and a parity code obtained as a result of performing a parity operation on the execution program and the parity check program using the parity check program Based on the execution program stored in the rewritable memory, which has a rewritable memory connected to the host device and connected to the host device for storing the execution program, parity check program and parity code supplied from the host device Signal for signal processing And a signal processing device that uses a parity check program stored in a rewritable memory to rewrite the unit address of the rewritable memory for the execution program and parity check program stored in the rewritable memory. The memory check system is characterized in that a parity calculation is performed for each block having a plurality of sizes and a detection code based on the result of the parity calculation is output.
[0016]
The present invention also provides a host device having a memory for storing an execution program, a parity check program, and a parity code resulting from performing a parity operation on the execution program and the parity check program by the parity check program A signal processing device that has a rewritable memory for storing an execution program, a parity check program, and a parity code supplied from a host device, and performs signal processing based on the execution program stored in the rewritable memory In the memory check method for checking the contents of rewritable memory, The signal processor An execution program supplied from a host device having a memory for storing an execution program, a parity check program, and an execution program and a parity code obtained by performing a parity operation on the parity check program in the parity check program The parity check program and the parity check program stored in the rewritable memory for storing the parity code are used to change the unit address of the rewritable memory to the execution program and parity check program stored in the rewritable memory. A parity operation step for performing a parity operation for each block of a plurality of sizes; The signal processor And a detection code output step for outputting a detection code based on the result of the parity operation in the parity operation step.
[0017]
The present invention also provides an execution program, a parity check program, and a parity in a signal processing apparatus having a rewritable memory and performing signal processing according to the contents written in the rewritable memory. A rewritable memory that stores the parity code that is the result of performing parity operation on the execution program and the parity check program in advance by the check program, and signal processing based on the execution program stored in the rewritable memory Signal processing means for performing, The signal processor Parity calculation for each block of multiple rewritable memory unit addresses for the execution program and parity check program stored in the rewritable memory using the parity check program stored in the rewritable memory And a detection code based on the result of the parity operation is output.
[0018]
Further, the present invention relates to a memory check method for a signal processing apparatus having a rewritable memory and configured to perform signal processing according to the contents written in the rewritable memory. The signal processor Parity check program stored in a rewritable memory that stores an execution program, a parity check program, and a parity code resulting from performing a parity operation on the execution program and the parity check program in advance by the parity check program A parity calculation step for performing a parity calculation for each block of a plurality of sizes of unit addresses of the rewritable memory for the execution program and parity check program stored in the rewritable memory; The signal processor And a detection code output step for outputting a detection code based on the result of the parity calculation in the parity calculation step.
[0019]
The present invention also provides a memory check that has a rewritable memory, and that performs a memory check on the rewritable memory of a signal processing device configured to perform signal processing according to the contents written in the rewritable memory. In the program The signal processor The execution program, the memory check program for checking the memory by parity operation, and the parity code resulting from performing the parity operation on the execution program and the memory check program in advance are stored in a rewritable memory and can be rewritten. Parity calculation step for performing parity calculation for each block having a plurality of rewritable memory unit addresses for the execution program and the memory check program on the memory; The signal processor And a detection code output step for outputting a detection code based on the result of the parity calculation in the parity calculation step.
[0020]
As described above, the invention described in claims 1 and 7 includes an execution program, a parity check program, and a parity code as a result of performing a parity operation on the execution program and the parity check program using the parity check program. A host device having a memory for storing data, and a rewritable memory connected to the host device for storing an execution program, a parity check program and a parity code supplied from the host device, and stored in the rewritable memory A signal processing device that performs signal processing based on the executed execution program, and the signal processing device uses the parity check program stored in the rewritable memory to execute the execution program and parity check stored in the rewritable memory. Program On the other hand, the parity calculation is performed for each block of a plurality of sizes of unit addresses of the rewritable memory, and the detection code based on the result of the parity calculation is output, so the time required for the memory check is reduced. In addition, the execution program check and the parity check program itself can be alternately checked.
[0021]
The inventions according to claims 8 and 13 store an execution program, a parity check program, and a parity code obtained as a result of performing a parity operation on the execution program and the parity check program in advance by the parity check program. A rewritable memory and signal processing means for performing signal processing based on an execution program stored in the rewritable memory, and the parity check program stored in the rewritable memory makes the rewritable memory For the stored execution program and parity check program, a parity operation is performed for each block having a plurality of rewritable memory unit addresses, and a detection code based on the result of the parity operation is output. Because the memory With the time required for Ekku is shortened, it is possible to perform the checking check and parity check program itself of the execution program alternately.
[0022]
A memory check program according to a fourteenth aspect of the present invention includes an execution program, a memory check program for checking a memory by a parity operation, a result of performing a parity operation on the execution program and the memory check program in advance. Parity code is stored in a rewritable memory, and parity is performed on each rewritable memory unit address block for the execution program and memory check program on the rewritable memory. Since it has an operation step and a detection code output step for outputting a detection code based on the result of the parity operation in the parity operation step, the time required for the memory check is reduced and the execution program check and Own and check can be performed alternately.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described. In the present invention, an execution program and coefficient data used in a DSP (Digital Signal Processor) are downloaded from a memory of a host microcomputer (hereinafter referred to as a host microcomputer) to a DSP RAM (Random Access Memory), In a configuration in which data is stored in the DSP's RAM, a parity check program that checks the execution program and data downloaded and stored in the DSP's RAM by parity calculation is downloaded to the DSP's RAM together with the DSP execution program and data. On the DSP side, the execution program and coefficient data stored in the RAM and the parity check program itself are checked using the downloaded parity check program.
[0024]
At this time, according to the present invention, the execution program and the parity check program stored in the RAM are checked by the parity check program for each block having a plurality of RAM unit addresses.
[0025]
Since the execution program, the coefficient data, and the parity check program are checked in units of a predetermined size block, the time required for the check can be shortened. Further, since the parity check program itself is also checked in units of blocks, the execution program, coefficient data, and parity check program stored in the RAM can be checked alternately for each block. Thereby, it is possible to always check whether the parity check program itself is normal or not.
[0026]
Further, according to the present invention, the check program stored in the memory on the host microcomputer side is used to check the execution program and coefficient data downloaded to the DSP side and stored in the RAM, and the check program is checked to a predetermined size block. It is done in units. Since the check is performed on both the DSP side and the host microcomputer side, it is possible to determine which of the check code used for the check and the check program is not normal.
[0027]
FIG. 1 schematically shows a configuration of an example of a DSP system applicable to an embodiment of the present invention. The host microcomputer 1 is a microcomputer having, for example, a CPU 10 and a memory 11 including a RAM and / or a ROM (Read Only Memory). The DSP 2 has a RAM 20 and operates based on an execution program and coefficient data stored in the RAM 20. The DSP2 execution program is described by instruction codes that can be decoded by the DSP2.
[0028]
The host microcomputer 1 and the DSP 2 are connected by an address bus 3 and a data bus 4. For example, a command for instructing the operation of the DSP 2 is transmitted from the host microcomputer 1 to the DSP 2 via the buses 3 and 4, and the DSP 2 is controlled by the host microcomputer 1.
[0029]
The memory 11 of the host microcomputer 1 stores in advance a DSP program 12, which is an execution program for the DSP 2, coefficient data (not shown), and the like. The DSP program stored in the memory 11 of the host microcomputer 1 is also described using the instruction code described above. Hereinafter, the DSP program and coefficient data used in the DSP program are collectively referred to as a DSP program.
[0030]
A DSP program is uploaded from the host microcomputer 1 to the DSP 2 and stored in the RAM 20 of the DSP 2. For example, the address of the RAM 20 is designated from the host microcomputer 1 to the DSP 2 via the address bus 3. A DSP program is uploaded from the host microcomputer 1 to the DSP 2 via the data bus 4. The uploaded DSP program is written into the RAM 20 based on the address designated using the address bus 3.
[0031]
The DSP 2 performs an operation according to the DSP program downloaded from the host microcomputer 1. By changing the contents of the DSP program uploaded from the host microcomputer 1 to the DSP 2, it is possible to cause the DSP 2 to perform different processes.
[0032]
Further, in the memory 11 of the host microcomputer 1, a parity check program 13 for performing a parity check of the DSP program 12 uploaded to the DSP 2 and stored in the RAM 20, and the DSP program 12 and the parity check program 13 stored in the memory 11. The parity code 14 which is the result of performing the parity operation in advance using the parity check program 13 is stored. The parity check program 13 is described by the above instruction code so that it can be executed in the DSP 2. The parity check program 13 and the parity code 14 are uploaded from the host microcomputer 1 to the DSP 2 together with the above-described DSP program 12 and stored in the RAM 20.
[0033]
FIG. 2 shows an example data arrangement in the RAM 20. In the example of FIG. 2, the RAM 20 has a capacity of 64 kB (kilobytes), and addresses are designated by “0x0000” to “0x10000”. In the address description, “0x” indicates that the description is in hexadecimal notation. Addresses “0x0400” to “0xAFFF” store the DSP program 23. Addresses “0xB000” to “0xFFFF” are the buffer area 24. The buffer area 24 is an area used when the DSP program 23 operates in the DSP 2, and its contents are changed as the DSP program is executed.
[0034]
Addresses “0x0000” to “0x02FF” store the parity code 21. Addresses “0x0300” to “0x03FF” store the parity check program 22. The parity code 21 is a parity code for data in all areas except for the buffer area 24 in the RAM 20. That is, the parity code 21 corresponds to the result of performing a parity operation in advance using the parity check program 22 on the data in all areas except the buffer area 24 of the RAM 20. Since the contents of the buffer area 24 change as the DSP program is executed as described above, the parity is not fixed.
[0035]
Note that the capacity of the RAM 20 is not limited to 64 kB, and the address arrangement shown in FIG. 2 is merely an example, and is not limited to this example.
[0036]
In the present invention, the parity check calculation by the parity check program 22 is performed for each block in units of blocks of a predetermined size. For example, one block is configured with a size in which a plurality of unit addresses in the RAM 20 are collected. As an example, a block having a size corresponding to an area in which the parity check program 22 is stored is defined as one unit block. In this example in which the capacity of the RAM 20 is 64 kB and the parity check program 22 has an address width “0x0100”, a block having a size of 256 bytes corresponding to the address width “0x0100” is defined as one unit block. Therefore, in the example of FIG. 2, the parity code 21 is composed of 3 blocks and the DSP program 23 is composed of 172 blocks.
[0037]
The parity check calculation by the parity check program 22 is performed for each block with one block having a size of 256 bytes as a unit. The parity code 21 that is calculated in advance and stored in the RAM 20 is also one in which the DSP program 23 and the parity check program 22 are subjected to a parity operation in units of the one block. By designating an address to the RAM 20 in a predetermined manner, a parity code corresponding to a block-unit parity operation can be extracted from the parity code 21.
[0038]
In the above description, the block size is the same as the size of the parity check program 22, but this is not limited to this example. The block size can be arbitrarily set in the addressing unit of the RAM 20. For example, the block size may be such that the parity check program 22 is stored in a plurality of blocks. However, the present invention is not limited to this. For example, a minimum unit of address designation, for example, one row in FIG.
[0039]
Next, the parity check operation according to the embodiment of the present invention will be described with reference to FIG. Prior to the parity check, a program check start command is issued from the host microcomputer 1 to the DSP 2. Then, the block to be checked is instructed from the host microcomputer 1 to the DSP 2. For example, the host microcomputer 1 instructs the head address in the RAM 20 of the block to be checked. In the DSP 2, a block to be checked is confirmed based on this instruction. When the block is confirmed, the parity check program 22 stored in the RAM 20 is executed, and the parity check for the designated block is executed.
[0040]
The parity check can be performed by various methods. For example, it is conceivable to perform a parity check using simple parity such as even parity or odd parity. A simple parity calculation is performed by the parity check program 22, and a value obtained by integrating the calculation results for each block is output. However, the present invention is not limited to this, and the parity check can be performed using XOR (Exclusive OR). XOR is obtained for the block data using a predetermined bit string prepared in advance. The check by XOR has an advantage that processing can be performed at higher speed. Also, CRC (cyclic redundancy check) can be used as a parity check method.
[0041]
As an example, the parity check of the fourth block of the DSP program 23 is performed by the parity check program 22. First, the parity calculation of the fourth block of the DSP program 23 is performed by the parity check program 22, and a parity calculation result 41 is obtained. Subsequently, the parity code 40 corresponding to the parity calculation result of the fourth block of the DSP program 23, which is a parity check target, is extracted from the RAM 20. The extracted parity code 40 and the parity calculation result 41 are compared by the comparison process 42.
[0042]
If, as a result of the comparison of the parity code 40 and the parity calculation result 41 by the comparison process 42, it is determined that both indicate the same value, the decision process 43 determines that the four blocks of the DSP program 23 on the RAM 20 It is determined that there is no error in the eyes, and a correct fixed value 44 indicating that fact is set in the register 46. For example, a predetermined area in the buffer area 24 of the RAM 20 can be used as the register 46.
[0043]
On the other hand, if it is determined that the parity code 40 and the parity calculation result 41 are different from each other as a result of the comparison process 42, an error is detected in the parity code 40 and / or the parity calculation result 41 by the determination process 43. The parity calculation result 41 by the parity check program 22 is set in the register 46.
[0044]
In other words, the correct answer is fixed in the register 46 if it is determined that there is no error in the block to be subjected to parity check (in this example, the fourth block of the DSP program 23) based on the parity calculation result 41 of the parity check program 22. If the value 44 is set and it is determined that there is an error, the operation result 41 itself of the parity operation determined to have an error is set in the register 46.
[0045]
When the parity check for one block of the DSP program 23 is completed, the parity check for the parity check program 22 stored in the RAM 20 is performed next. Parity calculation is performed by the parity check program 22 on the block in which the parity check program 22 is stored (in this example, blocks having addresses “0x0300” to “0x03FF”), and a parity calculation result 31 is obtained. Subsequently, the parity code 30 corresponding to the parity operation result of the parity check program 22 is extracted from the parity code 21 from the RAM 20. The extracted parity code 30 and the parity calculation result 31 are compared by a comparison process 32.
[0046]
If, as a result of the comparison between the parity code 30 and the parity calculation result 31 by the comparison process 32, they indicate the same value, it is determined by the determination process 33 that the parity check program 22 on the RAM 20 has no error. The correct fixed value 34 indicating that is determined and set in the register 36. For example, an area different from the area used as the register 46 in the buffer area 24 of the RAM 20 is used as the register 36.
[0047]
On the other hand, as a result of the comparison of the parity code 30 and the parity calculation result 31 by the comparison process 32, if both values are different from each other, an error is detected in the parity code 30 and / or the parity calculation result 31 by the determination process 43. The parity calculation result 31 by the parity check program 22 is set in the register 36.
[0048]
That is, in the same way as in the register 46 described above, the register 36 corrects if it is determined that there is no error in the parity check program 22 on the RAM 20 to be subjected to the parity check based on the parity calculation result 31 of the parity check program 22. If the fixed value 34 is set and it is determined that there is an error, the parity operation result 31 itself of the parity operation that is determined to have an error is set.
[0049]
Thus, when the parity check processing for one block of the fourth block of the DSP program 23 and the parity check program 22 itself is completed, the address in the RAM 20 of the block on which the parity check has been performed is sent from the DSP 2 to the host microcomputer 1. Be notified.
[0050]
When the host microcomputer 1 receives the address of the block subjected to the parity check notified from the DSP 2, the data set in the registers 36 and 46 in the RAM 20 of the DSP 2 is taken in by the host microcomputer 1. Then, based on the fetched data in the registers 36 and 46, a determination process is performed as to whether or not the data uploaded to the RAM 20 needs to be corrected. If it is determined that data correction is necessary, the data is re-uploaded to the RAM 20 and the data stored in the RAM 20 is corrected.
[0051]
As the correct fixed values 34 and 44, predetermined values that do not overlap with the result of the parity calculation by the parity check program 22 are used.
[0052]
FIG. 4 is a flowchart showing an example of data correction processing based on the parity check result by the host microcomputer 1. In the first step S10, the address of the block subjected to the parity check transmitted from the DSP 2 is received by the host microcomputer 1. In the next step S11, the host microcomputer 1 takes in the parity check result for the parity check program 22 set in the register 36.
[0053]
In step S12, it is determined whether or not the parity check result fetched from the register 36 in step S11 is the correct fixed value 34. If it is determined that the value fetched from the register 36 is the correct fixed value 34, it is determined that there is no problem in the parity check program 22 and the parity code 21 stored in the RAM 20, and the processing is stepped. The process proceeds to S13.
[0054]
On the other hand, if it is determined in step S12 that the value fetched from the register 36 is not the correct fixed value 34, the process proceeds to step S16. In step S <b> 16, a parity code corresponding to the parity check result for the parity check program 22, that is, the parity check program 13 in the memory 11 is extracted from the parity code 14 in the memory 11 of the host microcomputer 1. In step S17, it is determined whether or not the retrieved parity code matches the value fetched from the register 36 in step S11.
[0055]
If it is determined that the two match, the parity check program 22 in the RAM 20 is correct, but the parity code 21 is considered incorrect. That is, even if the parity calculation result 31 for the parity check program 22 has a correct value, if the parity code 30 compared with the parity calculation result 31 in the comparison process 32 is an incorrect value, the parity calculation result 31 and the parity check result The code 30 does not match, and the correct fixed value 34 is not set in the register 36. At this time, the correct parity calculation result for the parity check program 22 is set in the register 36.
[0056]
In this case, the process proceeds to step S18, and the parity code corresponding to the parity operation result for the parity check program 22 (parity check program 13) is extracted from the parity code 14 stored in the memory 11 of the host microcomputer 1, and the DSP2 Sent to and re-uploaded. The re-uploaded parity code is written in the corresponding area of the RAM 20 as the parity code 30 described above. When the re-upload of the parity code is completed, the process proceeds to step S15.
[0057]
In the above description, when re-uploading the parity code, only the corresponding data is extracted from the parity code 14 stored in the memory 11 and transmitted to the DSP 2. However, this is not limited to this example. A block including the corresponding data among the parity codes 14 stored in the memory 11 may be transmitted from the host microcomputer 1 to the DSP 2. Further, all the parity codes 14 stored in the memory 11 can be transmitted to the DSP 2.
[0058]
In step S15, a check process for the next block is prepared. That is, the host microcomputer 1 notifies the DSP 2 of the address of the block to be checked next. For example, in this example, the address of the fifth block of the DSP program 23 in the RAM 20 and the address of the parity check program 22 are notified to the DSP 2.
[0059]
When the address is notified, the parity calculation is performed on the block of the notified address in the RAM 20 in the DSP 2 as described above, and the correct fixed values 34 and 44 and the parity are stored in the registers 36 and 46 based on the parity calculation result. The calculation result is set. In the host microcomputer 1, the process proceeds to step S10, and a check process based on the values set in the registers 36 and 46 is performed.
[0060]
In the embodiment of the present invention, as described above, the DSP program 23 and the parity check program 22 stored in the RAM are alternately checked in units of blocks. Thus, the DSP program 23 can be checked while the parity check program 22 is always kept in a normal state, and the reliability of the check result is improved.
[0061]
On the other hand, if it is determined in step S17 described above that the two do not match, it is determined that the parity check program 22 on the RAM 20 is incorrect. In this case, the parity code 30 may be erroneous together with the parity check program 22 on the RAM 20. Therefore, the process proceeds to step S19, and the parity check program 13 stored in the memory 11 of the host microcomputer 1 is re-uploaded to the DSP 2. The re-uploaded parity check program 13 is stored in the RAM 20 as a parity check program 22. When the re-upload of the parity check program is completed, the process proceeds to step S15.
[0062]
The parity check process for the parity check program 22 is alternately executed for each block with respect to the parity check process performed for the DSP program 23. Therefore, after re-uploading the parity check program 22 in the above-described step S19, the same check process is performed again on the re-uploaded check program 22. At that time, it can be determined whether or not there is an error in the parity code 30 in the determination in step S17.
[0063]
As described above, if it is determined in step S12 that the value fetched from the register 36 is the correct fixed value 34, the parity check program 22 on the RAM 20 is assumed to have no error, and the process proceeds to step S13. Then, correction processing in block units is performed on the DSP program 23 in the RAM 20.
[0064]
In step S13, the host microcomputer 1 takes in the parity check result for the block (referred to as the fourth block of the DSP program) that is set in the register 46 and is to be checked by the DSP program 23. In the next step S14, it is determined whether or not the parity check result fetched from the register 46 in step S13 is the correct answer fixed value 44. If it is determined that the check result fetched from the register 46 is the correct fixed value 44, it is determined that there is no problem in the fourth block of the DSP program 23 stored in the RAM 20, and the process The process proceeds to S15.
[0065]
On the other hand, if it is determined in step S14 that the value fetched from the register 46 is not the correct fixed value 44, the process proceeds to step S20. In step S20, the parity code for the corresponding block in the DSP program 23 in the memory 11 is extracted from the parity code 14 in the memory 11 of the host microcomputer 1, that is, the fourth block of the DSP program 23 that is the target of the parity operation. In step S21, it is determined whether or not the extracted parity code matches the value fetched from the register 46 in step S13.
[0066]
If it is determined that they match, the fourth block of the DSP program 23 in the RAM 20 is correct, but the parity code 21 is incorrect, as in the case of the determination for the parity check program 22 described above. It is thought that there is. In this case, the process proceeds to step S22, and the parity code corresponding to the parity calculation result for the fourth block of the DSP program 23 is extracted from the parity codes stored in the memory 11 of the host microcomputer 1, and re-uploaded to the DSP 2. The The re-uploaded parity code is written in the corresponding area of the RAM 20 as the parity code 40 described above. When the re-upload of the parity code is completed, the process proceeds to step S15.
[0067]
On the other hand, if it is determined in step S21 that the two do not match, it is determined that the fourth block of the DSP program 23 that is the parity check target is incorrect. Therefore, the process proceeds to step S23, and the block corresponding to the fourth block of the DSP program 23 in the DSP program 12 stored in the memory 11 of the host microcomputer 1 is re-uploaded to the DSP 2. This re-uploaded block is written to the corresponding location in RAM 20. At this time, when the upload process is completed, the process proceeds to step S15.
[0068]
The memory check according to the embodiment of the present invention described with reference to FIGS. 3 and 4 can be performed when the DSP 2 is activated. For example, a series of memory check processing is performed after the host microcomputer 1 instructs the DSP 2 to start processing until the processing in the DSP 2 is actually started. The present invention is not limited to this, and the memory check process can also be executed when the DSP2 original process is not performed while the DSP2 is in operation. Further, the memory check process may be performed at any time when it can be executed while the DSP 2 is operating, or may be performed only once when the DSP 2 is activated. Further, if there is a margin in the processing capacity of the DSP 2, the memory check process may always be performed as a background to the original process during the operation of the DSP 2.
[0069]
Furthermore, it is not necessary to check all blocks of the RAM 20 in a series of memory check operations. For example, the processing can be temporarily interrupted when a check is performed up to a block in the middle of the RAM 20, and the check processing can be resumed from the block where the processing is interrupted when the check can be performed again.
[0070]
In the above description, it has been described that the memory check according to the embodiment of the present invention is performed by the host microcomputer 1 and the DSP 2. However, this is not limited to this example, and the essential part of the present invention is realized only on the DSP 2 side. Is possible. For example, in FIG. 4 described above, the data re-upload process, that is, the process excluding the processes of steps S18, S19, S22, and S23, can be executed only by the DSP2. Re-uploading of the parity code, parity check program, and DSP program can be performed by issuing a re-upload request from the DSP to the host microcomputer. In addition, by storing a plurality of the same parity codes in the DSP RAM, the parity operation result by the parity check program in steps S16 and S17 and steps S20 and S21 in FIG. 4 is compared with the correct parity code. It is possible to substitute the processing to do.
[0071]
【The invention's effect】
As described above, according to the present invention, since the parity check for the DSP RAM is performed for each block of a predetermined size, the number of times of communication between the DSP and the host microcomputer is reduced, so that the check time can be shortened. effective.
[0072]
Further, for the DSP program and the parity check program uploaded to the DSP RAM, the parity check for the parity check program stored in the RAM is performed by the uploaded parity check program. At this time, it is assumed that there is no error in the parity check program itself. Therefore, it is necessary to check the parity check program itself before performing the parity check of the DSP program.
[0073]
In the embodiment of the present invention, the parity check is performed in units of blocks and the parity check program is stored in one block, so that the check of the parity check program itself can be completed by one parity check process. Accordingly, the parity check of the DSP program and the parity check of the parity check program itself are alternately performed in units of blocks, so that it is possible to always confirm whether or not the parity check program itself is normal.
[0074]
In addition, since two parity check results, that is, a parity check result for the DSP program and a parity check result for the parity check program itself can be confirmed, it is instantaneous whether the DSP program has an error or the parity check program itself has an error. There is an effect that can be judged.
[0075]
Furthermore, in the embodiment of the present invention, when the parity check program itself is erroneous as a result of the parity check, the parity code by the parity check is output as it is. The data can be checked again using data stored in the memory. For this reason, it is possible to determine whether there is an error in the program to be checked or whether there is an error in the parity code that is compared with the parity operation result in the check.
[Brief description of the drawings]
FIG. 1 is a schematic diagram schematically showing a configuration of an example of a DSP system applicable to an embodiment of the present invention.
FIG. 2 is a schematic diagram showing an example data arrangement in a RAM in a DSP.
FIG. 3 is a diagram for explaining an operation of parity check according to an embodiment of the present invention.
FIG. 4 is a flowchart illustrating an example of data correction processing based on a parity check result by a host microcomputer.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Host microcomputer, 2 ... DSP, 11 ... Memory, 12 ... DSP program, 13 ... Parity check program, 14 ... Parity code, 20 ... RAM, 21 ... Parity code, 22 ... Parity check program, 23 ... DSP program, 24 ... Buffer area, 30, 40 ... Parity code, 31, 41 ... Parity calculation result, 34, 44 ...・ Fixed correct value, 36, 46 ... Register

Claims (18)

書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置の書き換え可能なメモリの内容をチェックするメモリチェックシステムにおいて、
実行用プログラムと、パリティチェックプログラムと、該パリティチェックプログラムで上記実行用プログラムおよび該パリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置と、
上記ホスト装置と接続され、該ホスト装置から供給された上記実行用プログラム、上記パリティチェックプログラムおよび上記パリティコードを格納する書き換え可能なメモリを有し、該書き換え可能なメモリに格納された上記実行用プログラムに基づき信号処理を行う信号処理装置と
を備え、
上記信号処理装置では、上記書き換え可能なメモリに格納された上記パリティチェックプログラムにより、上記書き換え可能なメモリに格納された上記実行用プログラムおよび上記パリティチェックプログラムに対して、上記書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、該パリティ演算の結果に基づいた検出コードを出力するようにしたことを特徴とするメモリチェックシステム。
In a memory check system that has a rewritable memory and checks the contents of a rewritable memory of a signal processing device configured to perform signal processing according to the contents written in the rewritable memory,
An execution program; a parity check program; and a host device having a memory in which the execution program and the parity code resulting from performing a parity operation on the parity check program are stored.
The execution device stored in the rewritable memory, connected to the host device and having a rewritable memory for storing the execution program, the parity check program and the parity code supplied from the host device A signal processing device for performing signal processing based on a program,
In the signal processing device, a unit of the rewritable memory with respect to the execution program and the parity check program stored in the rewritable memory by the parity check program stored in the rewritable memory. A memory check system, wherein a parity operation is performed for each block having a plurality of addresses and a detection code is output based on the result of the parity operation.
請求項1に記載のメモリチェックシステムにおいて、
上記パリティチェックプログラムは、上記書き換え可能なメモリ内で1または複数の上記ブロックに格納されることを特徴とするメモリチェックシステム。
The memory check system according to claim 1,
The memory check system, wherein the parity check program is stored in one or a plurality of the blocks in the rewritable memory.
請求項1に記載のメモリチェックシステムにおいて、
上記パリティチェックプログラムは、上記パリティ演算の結果が正常を示していれば上記検出コードとして所定の固定値を出力し、上記パリティ演算の結果が異常を示していれば上記検出コードとして該パリティ演算の結果を出力するようにしたことを特徴とするメモリチェックシステム。
The memory check system according to claim 1,
The parity check program outputs a predetermined fixed value as the detection code if the result of the parity calculation indicates normal, and outputs the parity calculation as the detection code if the result of the parity calculation indicates abnormality. A memory check system characterized by outputting a result.
請求項1に記載のメモリチェックシステムにおいて、
上記パリティチェックプログラムは、上記実行用プログラムに対する上記パリティ演算と、上記パリティチェックプログラムに対する上記パリティ演算とを上記ブロック単位で交互に行うようにしたことを特徴とするメモリチェックシステム。
The memory check system according to claim 1,
The memory check system, wherein the parity check program alternately performs the parity operation for the execution program and the parity operation for the parity check program in units of blocks.
請求項4に記載のメモリチェックシステムにおいて、
上記パリティチェックプログラムによる、上記実行用プログラムに対する上記パリティ演算の結果に基づく上記検出コードと、上記パリティチェックプログラムに対する上記パリティ演算の結果に基づく上記検出コードとを上記ホスト装置に対して出力するようにしたことを特徴とするメモリチェックシステム。
The memory check system according to claim 4,
The detection code based on the result of the parity operation for the execution program by the parity check program and the detection code based on the result of the parity operation for the parity check program are output to the host device. A memory check system characterized by that.
請求項1に記載のメモリチェックシステムにおいて、
さらに、上記ホスト装置により、上記書き換え可能なメモリに格納される上記実行用プログラム、上記パリティチェックプログラムおよび上記パリティコードに対するチェックを、上記検出コードに基づき行うようにしたことを特徴とするメモリチェックシステム。
The memory check system according to claim 1,
The memory check system further comprising the host device for checking the execution program, the parity check program and the parity code stored in the rewritable memory based on the detection code. .
実行用プログラムと、パリティチェックプログラムと、パリティチェックプログラムで実行用プログラムおよびパリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置と接続され、ホスト装置から供給された実行用プログラム、パリティチェックプログラムおよびパリティコードを格納する書き換え可能なメモリを有し、書き換え可能なメモリに格納された上記実行用プログラムに基づき信号処理を行う信号処理装置の書き換え可能なメモリの内容をチェックするメモリチェック方法において、
信号処理装置が、実行用プログラムと、パリティチェックプログラムと、該パリティチェックプログラムで実行用プログラムおよび該パリティチェックプログラムに対してパリティ演算を行った結果のパリティコードとが格納されるメモリを有するホスト装置から供給された上記実行用プログラム、上記パリティチェックプログラムおよび上記パリティコードを格納する書き換え可能なメモリに格納された上記パリティチェックプログラムにより、上記書き換え可能なメモリに格納された上記実行用プログラムおよび上記パリティチェックプログラムに対して、上記書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、
信号処理装置が、上記パリティ演算のステップによる上記パリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップと
を有することを特徴とするメモリチェック方法。
An execution program, a parity check program, and a host device having a memory for storing a parity code as a result of performing a parity operation on the execution program and the parity check program by the parity check program are connected to the host device. A rewritable memory of a signal processing apparatus having a rewritable memory for storing a supplied execution program, a parity check program, and a parity code, and performing signal processing based on the execution program stored in the rewritable memory In the memory check method for checking the contents of
A host device having a memory in which a signal processing device stores an execution program, a parity check program, an execution program by the parity check program, and a parity code obtained by performing a parity operation on the parity check program The execution program and the parity stored in the rewritable memory by the execution program, the parity check program, and the parity check program stored in the rewritable memory for storing the parity code. For the check program, a parity calculation step for performing a parity calculation for each block of a plurality of sizes of unit addresses of the rewritable memory,
Memory check how the signal processing unit, characterized in that a step of detecting code output for outputting a detection code based on the parity calculation result of the above steps parity operation.
書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置において、
実行用プログラムと、パリティチェックプログラムと、該パリティチェックプログラムで上記実行用プログラムおよび該パリティチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが格納される書き換え可能なメモリと、
上記書き換え可能なメモリに格納された上記実行用プログラムに基づき信号処理を行う信号処理手段と
を備え、
信号処理装置が、上記書き換え可能なメモリに格納された上記パリティチェックプログラムにより、上記書き換え可能なメモリに格納された上記実行用プログラムおよび上記パリティチェックプログラムに対して、上記書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行い、該パリティ演算の結果に基づいた検出コードを出力するようにしたことを特徴とする信号処理装置。
In a signal processing apparatus having a rewritable memory and configured to perform signal processing according to the contents written in the rewritable memory,
A rewritable memory for storing an execution program, a parity check program, and the execution program and a parity code obtained by performing a parity operation in advance on the parity check program in the parity check program;
Signal processing means for performing signal processing based on the execution program stored in the rewritable memory,
When the signal processing device uses the parity check program stored in the rewritable memory, the execution program stored in the rewritable memory and the unit address of the rewritable memory for the parity check program A signal processing apparatus, wherein a parity calculation is performed for each block having a plurality of sizes and a detection code based on the result of the parity calculation is output.
請求項8に記載の信号処理装置において、
上記パリティチェックプログラムは、上記書き換え可能なメモリ内で1または複数の上記ブロックに格納されることを特徴とする信号処理装置。
The signal processing device according to claim 8,
The signal processing apparatus, wherein the parity check program is stored in one or a plurality of the blocks in the rewritable memory.
請求項8に記載の信号処理装置において、
上記パリティチェックプログラムは、上記パリティ演算の結果が正常を示していれば上記検出コードとして所定の固定値を出力し、上記パリティ演算の結果が異常を示していれば上記検出コードとして該パリティ演算の結果を出力するようにしたことを特徴とする信号処理装置。
The signal processing device according to claim 8,
The parity check program outputs a predetermined fixed value as the detection code if the result of the parity calculation indicates normal, and outputs the parity calculation as the detection code if the result of the parity calculation indicates abnormality. A signal processing apparatus characterized by outputting a result.
請求項8に記載の信号処理装置において、
上記パリティチェックプログラムは、上記実行用プログラムに対する上記パリティ演算と、上記パリティチェックプログラムに対する上記パリティ演算とを上記ブロック単位で交互に行うようにしたことを特徴とする信号処理装置。
The signal processing device according to claim 8,
The signal processing apparatus, wherein the parity check program alternately performs the parity operation for the execution program and the parity operation for the parity check program in units of blocks.
請求項11に記載の信号処理装置において、
上記パリティチェックプログラムによる、上記実行用プログラムに対する上記パリティ演算の結果に基づく上記検出コードと、上記パリティチェックプログラムに対する上記パリティ演算の結果に基づく上記検出コードとを、上記書き換え可能なメモリに対して上記実行用プログラム、上記パリティチェックプログラムおよび上記パリティコードを供給するホスト装置に対して出力するようにしたことを特徴とする信号処理装置。
The signal processing apparatus according to claim 11,
The detection code based on the result of the parity operation for the execution program by the parity check program and the detection code based on the result of the parity operation for the parity check program are transmitted to the rewritable memory. A signal processing apparatus, characterized in that the signal is output to an execution program, the parity check program, and a host device that supplies the parity code.
書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置のメモリチェック方法において、
信号処理装置が、実行用プログラムと、パリティチェックプログラムと、該パリティチェックプログラムで実行用プログラムおよび該パリティチェックプログラムに対して予めパリティ演算を行った結果のパリティコードとが格納される書き換え可能なメモリに格納された上記パリティチェックプログラムにより、上記書き換え可能なメモリに格納された上記実行用プログラムおよび上記パリティチェックプログラムに対して、上記書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、
信号処理装置が、上記パリティ演算のステップによる上記パリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップと
を有することを特徴とする信号処理装置のメモリチェック方法。
In a memory check method of a signal processing apparatus having a rewritable memory and configured to perform signal processing according to the contents written in the rewritable memory,
A rewritable memory in which a signal processor stores an execution program, a parity check program, an execution program by the parity check program, and a parity code resulting from performing a parity operation on the parity check program in advance The parity check program stored in the rewritable memory is compared with the execution program stored in the rewritable memory and the parity check program for each block having a size of a plurality of unit addresses of the rewritable memory. A parity operation step to perform the operation;
A signal processing apparatus comprising: a detection code output step for outputting a detection code based on a result of the parity calculation in the parity calculation step.
書き換え可能なメモリを有し、書き換え可能なメモリに書き込まれた内容に応じた信号処理を行うようにされた信号処理装置の書き換え可能なメモリに対するメモリチェックを実行させるメモリチェックプログラムにおいて、
信号処理装置が、実行用プログラムと、パリティ演算によりメモリをチェックするメモリチェックプログラムと、上記実行用プログラムおよび上記メモリチェックプログラムに対して予め上記パリティ演算を行った結果のパリティコードとが書き換え可能なメモリに格納され、該書き換え可能なメモリ上の上記実行用プログラムおよび上記メモリチェックプログラムに対して、上記書き換え可能なメモリの単位アドレスの複数からなるサイズのブロック毎にパリティ演算を行うパリティ演算のステップと、
信号処理装置が、上記パリティ演算のステップによる上記パリティ演算の結果に基づいた検出コードを出力する検出コード出力のステップと
を有することを特徴とするメモリチェックプログラム。
In a memory check program that has a rewritable memory and performs a memory check on a rewritable memory of a signal processing device configured to perform signal processing according to the contents written in the rewritable memory,
The signal processing device can rewrite the execution program, the memory check program for checking the memory by parity calculation, and the parity code resulting from performing the parity calculation on the execution program and the memory check program in advance. Parity calculation step of performing parity calculation for each block of a plurality of sizes of unit addresses of the rewritable memory for the execution program and the memory check program stored in the rewritable memory When,
Signal processing device, a memory check program, characterized in that it comprises the steps of detecting code output for outputting a detection code based on the result of the parity calculation by step of the parity calculation.
請求項14に記載のメモリチェックプログラムにおいて、
上記書き換え可能なメモリ内で1または複数の上記ブロックに格納されることを特徴とするメモリチェックプログラム。
The memory check program according to claim 14,
A memory check program stored in one or more of the blocks in the rewritable memory.
請求項14に記載のメモリチェックプログラムにおいて、
上記パリティ演算の結果が正常を示していれば上記検出コードとして所定の固定値を出力し、上記パリティ演算の結果が異常を示していれば上記検出コードとして該パリティ演算の結果を出力するようにしたことを特徴とするメモリチェックプログラム。
The memory check program according to claim 14,
If the result of the parity operation indicates normal, a predetermined fixed value is output as the detection code. If the result of the parity operation indicates abnormality, the result of the parity operation is output as the detection code. A memory check program characterized by that.
請求項14に記載のメモリチェックプログラムにおいて、
上記書き換え可能なメモリ上の上記実行用プログラムに対する上記パリティ演算と、上記書き換え可能なメモリ上の上記メモリチェックプログラムに対する上記パリティ演算とを上記ブロック単位で交互に行うようにしたことを特徴とするメモリチェックプログラム。
The memory check program according to claim 14,
A memory in which the parity operation for the execution program on the rewritable memory and the parity operation for the memory check program on the rewritable memory are alternately performed in units of blocks. Check program.
請求項17に記載のメモリチェックプログラムにおいて、
上記書き換え可能なメモリ上の上記実行用プログラムに対する上記パリティ演算の結果に基づく上記検出コードと、上記書き換え可能なメモリ上の上記メモリチェックプログラムに対する上記パリティ演算の結果に基づく上記検出コードとを、上記書き換え可能なメモリに対して上記実行用プログラム、上記パリティチェックプログラムおよび上記パリティコードを供給するホスト装置に対して出力するようにしたことを特徴とするメモリチェックプログラム。
The memory check program according to claim 17,
The detection code based on the result of the parity operation for the execution program on the rewritable memory, and the detection code based on the result of the parity operation for the memory check program on the rewritable memory, A memory check program, wherein the execution program, the parity check program, and the host device that supplies the parity code are output to a rewritable memory.
JP2002194452A 2002-07-03 2002-07-03 MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM Expired - Fee Related JP4135413B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002194452A JP4135413B2 (en) 2002-07-03 2002-07-03 MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002194452A JP4135413B2 (en) 2002-07-03 2002-07-03 MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM

Publications (2)

Publication Number Publication Date
JP2004038541A JP2004038541A (en) 2004-02-05
JP4135413B2 true JP4135413B2 (en) 2008-08-20

Family

ID=31703140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002194452A Expired - Fee Related JP4135413B2 (en) 2002-07-03 2002-07-03 MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM

Country Status (1)

Country Link
JP (1) JP4135413B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0620216U (en) * 1992-05-08 1994-03-15 松下電器産業株式会社 Packaging box with handle
JPH0620217U (en) * 1992-05-20 1994-03-15 八木アンテナ株式会社 Packing box

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4982883B2 (en) * 2006-09-14 2012-07-25 株式会社メガチップス Storage device and data output circuit
JP2010282296A (en) 2009-06-02 2010-12-16 Sanyo Electric Co Ltd Data check circuit
JP5903945B2 (en) * 2012-03-13 2016-04-13 大日本印刷株式会社 IC card and computer program
JP2013222348A (en) * 2012-04-17 2013-10-28 Dainippon Printing Co Ltd Ic card and computer program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0620216U (en) * 1992-05-08 1994-03-15 松下電器産業株式会社 Packaging box with handle
JPH0620217U (en) * 1992-05-20 1994-03-15 八木アンテナ株式会社 Packing box

Also Published As

Publication number Publication date
JP2004038541A (en) 2004-02-05

Similar Documents

Publication Publication Date Title
JP5780174B2 (en) System and method for handling bad bit errors
EP2159709B1 (en) Error correcting method and computing element
JP5010271B2 (en) Error correction code generation method and memory control device
WO2005111812A1 (en) Memory control circuit, nonvolatile storage apparatus, and memory control method
JP4135413B2 (en) MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM
KR20080037060A (en) Memory arrangement and method for the operation thereof
US7240272B2 (en) Method and system for correcting errors in a memory device
JP5815212B2 (en) Data writing method and system
US8190971B2 (en) Data processing system and method for operating a data processing system
US20070297237A1 (en) Memory control circuit, microcomputer, and data rewriting method
JP6332134B2 (en) Memory diagnostic circuit
WO2021038923A1 (en) Control device, execution control method for user program, and system program
JPH10302485A (en) Information processor having flash memory
JP4131928B2 (en) Data storage control method and apparatus
KR100216045B1 (en) Bit arithmetic processing method and apparatus of programmable controller
JP2907114B2 (en) Method and apparatus for correcting 1-bit error in EEPROM
EP0655686A1 (en) Retry control method and device for control processor
JP3358701B2 (en) Verify method and verify device
JPS63278162A (en) Error correction device in information processor
JPH0229839A (en) Microprogram control device
JP2023104466A (en) In-vehicle electronic control device and memory control method
JPS6142304B2 (en)
JPH04255032A (en) Error correcting system for control storage
JPS6261974B2 (en)
JPH06309242A (en) Error detecting method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050502

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080418

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: 20080513

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080526

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees