JP3745031B2 - CPU accelerator - Google Patents

CPU accelerator Download PDF

Info

Publication number
JP3745031B2
JP3745031B2 JP16218196A JP16218196A JP3745031B2 JP 3745031 B2 JP3745031 B2 JP 3745031B2 JP 16218196 A JP16218196 A JP 16218196A JP 16218196 A JP16218196 A JP 16218196A JP 3745031 B2 JP3745031 B2 JP 3745031B2
Authority
JP
Japan
Prior art keywords
write
cpu
mode
signal
accelerator
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
JP16218196A
Other languages
Japanese (ja)
Other versions
JPH1011359A (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.)
Buffalo Inc
Original Assignee
Buffalo Inc
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 Buffalo Inc filed Critical Buffalo Inc
Priority to JP16218196A priority Critical patent/JP3745031B2/en
Publication of JPH1011359A publication Critical patent/JPH1011359A/en
Application granted granted Critical
Publication of JP3745031B2 publication Critical patent/JP3745031B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、CPUアクセラレータに関し、特に、ライトバックキャッシュ機能を持つCPUを備えたCPUアクセラレータに関する。
【0002】
【従来の技術】
CPUアクセラレータは、旧型のCPUを備えるコンピュータ(以下、PCと呼ぶ。)に装着され、より新型のCPUにて処理を補って高速化を図る。CPUの近代化は各種の新機能を追加するが、例えば、ある世代には無かったライトバックキャッシュ機能を次の世代以降のCPUが備える場合がある。
【0003】
このライトバックキャッシュの機能は、CPU内のキャッシュメモリの内容と本来の外部メモリとの間に不整合が生じないようにする必要がある。このため、外部機器による外部メモリへのアクセスをハードウェア的に監視し、外部メモリへ外部機器がアクセスしようとするときにはCPUにフラッシュさせる信号を形成するハードウェア回路が必要になる。
しかし、旧型のPCではCPUがかかるライトバックキャッシュ機能を備えていることを前提としていない。従って、かかるハードウェア回路を備えているわけがなく、従来のCPUアクセラレータでは、ライトバックキャッシュ機能を持つCPUを備えていても、同ライトバックキャッシュ機能を司るライトバック端子をプルダウンさせてライトスルーモードでのみ稼働できるようになっている。
【0004】
なお、ライトバックキャッシュ機能を利用するための上述したハードウェア回路がないとしても、ソフトウェアで外部メモリへのアクセスを監視し、アクセスの要求が起きたときに内部キャッシュメモリの内容をフラッシュさせることが可能である。ここにおいて、CPUをライトスルーモードで立ち上げたときにはライトスルーモードからライトバックモードへは移行できず、ライトバックモードで立ち上げたときには二つのモード間を相互に移行できるというハードウェア的な仕様制限がある。従って、CPUをライトバックモードで立ち上げておき、同ソフトウェアをロードするという手順を踏まなければならない。しかしながら、このような手順ではCPUをライトバックモードで立ち上げてから同ソフトウェアがロードされて起動するまでにキャッシュ不整合が生じてしまう。
【0005】
結局のところ、必要なハードウェア回路を備えておらず、また、ソフトウェアをロードすることもできないので、ライトバックキャッシュ機能は利用されていない。
【0006】
【発明が解決しようとする課題】
上述した従来のCPUアクセラレータにおいては、ライトバックキャッシュ機能を備えているCPUを使用しながら、同ライトバックキャッシュ機能を利用できないという課題があった。
本発明は、上記課題にかんがみてなされたもので、PC本体がライトバックキャッシュ機能のための必要なハードウェア回路を備えていない場合でも、ライトバックキャッシュ機能を実現することが可能なCPUアクセラレータの提供を目的とする。
【0007】
【課題を解決するための手段】
上記目的を達成するため、請求項1にかかる発明は、ライトスルーモードで立ち上げられたときには立ち上げ後ライトスルーモードからライトバックモードへは移行できず、ライトバックモードで立ち上げられたときには立ち上げ後ライトバックモードとライトスルーモードの2つのモード間を相互に移行でき、リセット時にライトバック信号を与えるとライトバックモードで立ち上がるライトバックキャッシュ機能の付いたCPUを有するCPUアクセラレータであって、ライトバックモードで上記CPUを立ち上げ、立ち上げ直後にライトスルーモードに移行させるライトバック立ち上げ制御手段を有する構成としてある。
【0008】
かかる構成からなる本発明によれば、ライトバック立ち上げ制御手段が、CPUの立ち上げ時にライトバックモードで立ち上げさせ、立ち上げ直後にライトスルーモードに移行させる。従って、実質的にはライトスルーモードで立ち上がっているので各種の初期設定処理を実行してもメモリ不整合を生じることはないし、一方、本来はライトバックモードで立ち上がっているのでライトスルーモードからライトバックモードへ移行することが可能であり、ソフトウェア的に必要な環境が整った後はライトバックモードへ移行すればよい。
【0009】
CPUの立ち上げ時にライトバックモードで立ち上げたり、その直後にライトスルーモードへ移行する方法は、CPUの仕様に応じて適宜変更可能であり、実質的に上述した立ち上げ処理を実行できればよい。
例えば、ライトバックモードというのは、ライトバック端子が有効となるか否かに対応するものであり、リセット時にライトバック信号を与えておくことにより、以後、このライトバック端子が有効となるようにできるという仕様であっても、実質的にはライトバックモードで立ち上がるものといえる。また、他の一例として、請求項2にかかる発明は、請求項1に記載のCPUアクセラレータにおいて、上記ライトバック立ち上げ制御手段は、上記CPUに対するリセット信号がオンとなるときにライトバック信号をオンとし、リセット信号がオフとなるとライトバック信号をオフとするライトバック信号制御回路を有する構成としてある。
【0010】
CPUの仕様としてリセット時にライトバック信号を与えるとライトバックモードで立ち上がるようになっていることがある。この場合、CPUに対するリセット信号がオンとなるときにライトバック信号制御回路がライトバック信号をオンとし、同リセット信号がオフとなるとライトバック信号をオフとすることにより、同CPUはライトバックモードで立ち上がるとともに、リセット信号がオフとなって立ち上がりが完了した直後にライトバック信号がオフとなってライトスルーモードへ移行する。
【0011】
従って、実質的には請求項1と同等の処理を実行できる。むろん、リセット信号とライトバック信号におけるオンオフの極性などの信号特性やタイミングなどはCPUの仕様に応じて適宜変更可能であり、このライトバック信号制御回路の詳細な構成は特に限定されるものではない。
この一例として、請求項3にかかる発明は、請求項2に記載のCPUアクセラレータにおいて、上記ライトバック信号制御回路は、所定の制御信号を入力するとライトバックモードのためのポート信号を出力可能なライトバック用ポートと、リセット信号とポート信号とで論理和をとって論理和信号を上記CPUにおけるライトバック端子に出力する論理和回路とを有する構成としてある。
【0012】
かかる構成からなる本発明によれば、ライトバック用ポートが備えられており、通常はCPUから所定の制御信号を入力すればライトバックモードのためのポート信号を出力可能であるし、それ以外の時に同ポート信号を出力しないようにできる。このポート信号は論理和回路に入力され、その論理和信号がCPUのライトバック端子に入力されているので、同ポートに対する制御信号の送出をCPUで制御することにより、ライトバックモードとライトスルーモードとの間での移行が可能となる。一方、上記論理和回路にはリセット信号も入力されているので、CPUをリセットさせるためにリセット信号をオンとすれば同時に論理和回路を経てライトバック端子にもオン信号が入力され、ライトバックモードで立ち上がることになる。
【0013】
さらに、請求項4にかかる発明は、請求項1〜請求項3のいずれかに記載のCPUアクセラレータにおいて、外部メモリへのアクセスを監視し、上記CPUの内部キャッシュメモリと同外部メモリとの不整合が生じないように書き戻しを行わせるキャッシュ管理ソフトを実行させるとともに、同キャッシュ管理ソフトにてライトスルーモードからライトバックモードへ移行させる構成としてある。
上述したように、ライトスルーモードからライトバックモードへ移行することが可能であり、メモリの不整合が生じないようにするキャッシュ管理ソフトがロードされたら、当該ソフトウェアにてライトバックモードへ移行させるとともに、外部機器などによる外部メモリへのアクセスを監視し、内部キャッシュメモリと外部メモリとの不整合が生じないように適宜、書き戻しを行わせる。むろん、CPUから外部メモリをアクセスする場合は不整合が生じることがないので、必ずしも書き戻しを行わせる必要はない。書き戻しの具体的な方法としては、直接的に書き戻しのコマンドがない場合に内部キャッシュメモリの内容をフラッシュさせるようなものであってもよい。
【0014】
なお、書き戻しは外部機器などによる外部メモリへのアクセスを監視して行われるが、監視方法はさまざまな方法が考えられる。例えば、メモリアクセスを管理するDMAコントローラを直に監視していても良いし、実質的にメモリアクセスを起因させるBIOSコールを監視していても良い。また、程度によっては不整合を容認し、処理速度などのパフォーマンスを優先させるようにしても良い。さらに、ライトスルーモードからライトバックモードへ移行させた後、必要に応じてライトスルーモードとライトバックモードとの間で適宜移行し合うようにしても構わない。
【0015】
【発明の効果】
以上説明したように本発明は、ライトバックキャッシュに対するハードウェア回路を備えないPCにおいてもCPUの持つライトバックキャッシュ機能を実行させることが可能なCPUアクセラレータを提供することができる。
また、請求項2にかかる発明によれば、リセット信号と同期してライトバック信号を制御することにより簡易な回路で実現できる。
さらに、請求項3にかかる発明によれば、PCで利用されるポートを利用しているので、例えば、ポートに余裕がある回路であれば論理和回路を付加するだけの極めて容易な構成で実現できる。
【0016】
さらに、請求項4にかかる発明によれば、確実にキャッシュ管理ソフトがロードされた後でライトバックモードへ移行することになり、システムの信頼性を向上させることができる。
【0017】
【発明の実施の形態】
以下、図面にもとづいて本発明の実施形態を説明する。
図1は、本発明の一実施形態にかかるCPUアクセラレータが適用されるPCの概略構成をブロック図により示しており、図2は本CPUアクセラレータの要部構成をブロック図により示している。
【0018】
同図において、このコンピュータ(PC)10はデータバス20を備え、当該データバス20にCPUアクセラレータ30、メインメモリ(以下、外部メモリと呼ぶ)40、外部機器インターフェイス50などが接続されている。CPUアクセラレータ30は内部にレベル1キャッシュ(以下、内部キャッシュメモリと呼ぶ)を備えたCPU31を有しており、同CPU31はデータバス20を介して上記外部メモリ40に接続されている。
【0019】
同CPU31はライトバックキャッシュ機能を有しており、モードを切り替えるためのライトバック(W/B)端子32を備えている。ライトバックモードを有効とするためには、立ち上げ時にライトバック端子32にオン信号を与えてライトバックモードで立ち上げる必要があり、これにより、以後、ライトバック端子32が有効となる。従って、立ち上げ後も、ライトバック端子32にオン信号を与えればライトバックモードとなるし、オフ信号を与えればライトスルーモードとなる。しかしながら、ライトスルーモードで立ち上がったときには同ライトバック端子32に対する信号のオン・オフに関わらず、常にライトスルーモードとなる。
【0020】
これはCPUの仕様に関するものであるため、外部でライトバックの許可信号を与える必要がある場合に本発明は適用可能であり、例えば、CPU内部のレジスタにてライトバックを制御するような場合には必要ない。一方、外部でライトバックの許可信号を与えるか否かを決定するようなものであれば、広く適用可能である。
CPUアクセラレータ30には、CPU31とともにデコーダ33が装着され、さらに同デコーダ33の出力をポート34の書き込み端子に接続してある。ここにおいて、同CPU31はライトバックモードとするかライトスルーモードとするかによって上記デコーダ33に対して所定のコード信号を送出可能となっており、ライトバックモードとするコード信号C1を同デコーダ33に出力すると、同デコーダ33はポート34においてライトバックの制御用に割り当てられたアドレスにライトバックモードを表す規定値を書き込む。一方、ライトスルーモードとするコード信号C2を同デコーダ33に出力すれば同じアドレスにライトスルーモードを表す規定値を書き込む。この意味で、当該ポート34における同アドレスの出力がライトバック用ポート34aに該当する。なお、このポート34自身はライトバック専用に設ける必要はなく、他の機能をも合わせ持つ通常のポートで兼用することができる。
【0021】
一方、CPU31とポート34にはそれぞれリセット端子31a,34bを形成してあり、電源スイッチなどに連動してリセット信号が供給されるようになっている。ポート34のリセット端子34bにリセット信号を供給した場合、ポート出力は予め設定された初期値となり、上記ライトバック用ポート34aの場合はライトスルーモードを表すオフ状態となる。
このライトバック用ポート34aの出力は上記リセット信号を入力とする遅延回路35の出力とともに論理和回路36に入力されており、この論理和回路36の出力はCPU31におけるライトバック端子32に接続されている。論理和回路36は論理和を演算するものであり、上述した接続により、遅延回路35の出力とライトバック用ポート34aの出力とのいずれか一方がオン状態であればオン信号を論理和としてCPU31のライトバック端子32に供給することになる。
【0022】
従って、CPU31に対するリセット信号がオンとなると、遅延回路35による遅延時間後に論理和回路36から出力されるライトバック信号もオンとなり、同CPU31に対するリセット信号がオフとなると同じ遅延時間後に論理和回路36から出力されるライトバック信号もオフとなる。本実施形態においては、CPU31の仕様によってリセット信号の立ち下がり時にライトバック信号がオンである必要があるため、論理和回路36の入力に遅延回路35を介在させている。しかしながら、リセット信号の立ち上がりによってリセットが有効となるのであれば、リセット信号をそのままライトバック端子32に供給しておくようにしてもよい。この場合、リセットが有効となって最初にライトバック端子32の信号状況をチェックしたときにはオン信号が供給されている状況とすることができるため、実質的にリセット信号をそのままライトバック信号とすることができる。この意味で、リセット信号の信号線や同遅延回路などがライトバック信号制御回路を構成する。むろん、同ライトバック信号制御回路の構成はこれに限定されるものではなく、適宜変更可能である。
【0023】
同ライトバック信号制御回路はライトバック立ち上げ制御手段を構成するが、ライトバックモードの起動条件が変化すれば、回路構成を変更する必要がある。そして、ライトバックモードでCPUを立ち上げ、立ち上げ直後にライトスルーモードに移行させるような回路全般をライトバック立ち上げ制御手段と呼ぶ。
次に、以上のハードウェア構成からなる本実施形態の動作をソフトウェアの処理と合わせて説明する。
【0024】
図3に示すように、リセット信号をオフからオンとすると、遅延回路35の遅延時間を経て論理和回路36から出力されるライトバック信号もオンとなり、同リセット信号の立ち下がり時にCPU31はリセットして立ち上げられる。一方、この立ち上がり時には遅延回路35による遅延時間分だけライトバック信号がオンとなっているので、CPU31はライトバックモードで立ち上がる。そして、同遅延時間経過後にはリセット信号がオフとなるのに伴ってライトバック信号もオフとなり、CPU31はライトスルーモードへ移行する。
【0025】
このようにしてライトバック信号が形成されれば、上記CPU31はライトバックモードで立ち上がるとともに、リセット信号がオフとなってライトバック信号もオフとなる立ち上げ直後にライトスルーモードに移行する。従って、ライトバックモードへの移行の可能性を備えた状態でライトスルーモードで処理を開始し始める。以上の信号状況及びモード変化の状態を図3に示している。
CPU31が立ち上がると、図4に示すように、まず、メモリチェックなどの初期設定を実行し(ステップS100)、次いで、ハードディスクなどからDOSプログラムをロードし、起動する(ステップS110)。この間、上述したようにライトスルーモードで稼働しているため、キャッシュの不整合などは生じない。DOSプログラムのロードに続き、本実施形態においてはフラッシュ管理ソフトをロードし、起動する(ステップS120)。
【0026】
このフラッシュ管理ソフトは、主に、外部機器などによる外部メモリ40へのアクセスを監視して、CPU31の内部キャッシュメモリと同外部メモリ40との不整合が生じないように同内部キャッシュメモリの内容をフラッシュさせるものであり、より具体的には、図5に示すような処理を実行する。
本実施形態の場合、外部メモリ40へのアクセスを監視するにあたり、BIOSのディスクアクセスのためのコールを利用している。メモリの不整合が生じる原因は外部機器による外部メモリ40のアクセスであることを考慮すると、DMAコントローラの稼働状況を監視するのが妥当とも考えれられるが、DMAコントローラへのアクセスは非常に頻繁に起こっており、このアクセスの度にキャッシュメモリの内容をフラッシュさせていたのでは、実質的に処理速度の向上がはかれない。このため、本実施形態においては、キャッシュ不整合によって処理に異常が生じうるような状況を絞り込み、ディスクアクセスのためのBIOSコールがあったときにフラッシュさせることにしている。
【0027】
なお、サウンド回路がDMA経由で外部メモリ40にアクセスしたときにはキャッシュ不整合が生じる可能性もあるが、処理に対する影響度が非常に小さいことが分かっている。この場合の優先度はシステムによって変更可能であり、本実施形態においては処理速度のパフォーマンスを優先させるようにしているが、音楽システムであれば、サウンド回路からのアクセスであってもフラッシュさせるようにすればよい。一方、CPU内部には所定のI/Oにアクセスしたことを監視する機能があるので、所定のI/Oへのアクセスによってフラッシュさせるようにするなど、適宜システムに応じて変更すればよい。また、本実施形態においては、フラッシュによって不整合を解消しているが、直接的に書き戻しを指示するコマンドがあればそれを実行しても良い。
【0028】
以上のような機能を実現するため本実施形態においては、BIOSコールのベクタテーブルを書き換え、BIOSコールをフックするようにしている。本来、INT1BhのBIOSコールがディスクアクセスであるとすると、図6に示すように、BIOSコールベクタテーブルにおけるINT1Bhに対応するアドレスには、BIOSコールルーチンにおけるディスクアクセスルーチンの開始アドレス(アドレス1)が記録されている。これを同図に示すフラッシュルーチンの開始アドレス(アドレス2)に書き換え、同フラッシュルーチンを起動させてからディスクアクセスルーチンに飛ぶようにする。
【0029】
この流れを図5に示すフローチャートを参照して説明する。まず、フラッシュルーチンをロードし(ステップS200)、次に、BIOSコールベクタテーブルにおけるINT1Bhの開始アドレスをフラッシュルーチンの開始アドレス(アドレス2)に書き換え(ステップS210)、最後に、ライトスルーモードからライトバックモードへ移行するためにポート34におけるライトバック用ポート34aをオン状態とするためのコード信号C1をデコーダ33に出力する(ステップS220)。このポート書き込みにより、ライトバック用ポート34aの出力がオンとなり、同出力を入力とする論理和回路36の出力がオンとなる。この論理和回路36の出力はライトバック信号としてCPU31におけるライトバック端子32に入力されているので、ライトバック信号がオンとなり、CPU31はライトバックモードへと移行する(図3)。このフラッシュ管理ソフトはこのような内容であり、ロードして起動してもすぐに完了する。
【0030】
以上のようにしてフラッシュ管理ソフトをロードして起動させた後でライトバックモードとなり、アプリケーションをロードして起動させればライトバックモードで実行される(ステップS130)。
一方、アプリケーションの実行中の作用をフローチャートで表せば図7に示すようになる。以上のようにして、ライトバックモードへと移行させた後(ステップS300)、アプリケーションからディスクアクセスのための要求があるか否かが監視される(ステップS310)。そして、ディスクアクセスの要求があったときにはキャッシュメモリをフラッシュしてから(ステップS320)、ディスクアクセスルーチンをコールし(ステップS330)、外部機器インターフェイス50を介して外部メモリ40との間でデータの参照などが行われる。すなわち、フラッシュルーチンでまずキャッシュメモリの内容をフラッシュし、外部メモリ40とのキャッシュ不整合が無くなってからディスクアクセスが実行されるので、ライトバックキャッシュ機能を正常に稼働させることができる。
【0031】
なお、フラッシュ管理ソフトについては、実質的に上述した作用を提供することができればよく、必ずしも上述したフローチャートなどに対応するものでなくてもよい。例えば、上述したフラッシュ管理ソフトは、実質的には図7に示すように常駐的な作用をなすものの、実際には起動しても所定のバイオスフック経路を確保して終了しているが、常駐状態で外部メモリへ40のアクセスを監視するようなものであっても構わない。一方、安全のため、本実施形態においては、ディスクアクセスコールの終了後にも再度フラッシュさせているが、必ずしも実行後にフラッシュをさせる必要はない。むろん、かかるキャッシュ不整合のための監視と並行して、別プログラムにて定期的にフラッシュさせるようにしても構わない。
【0032】
このように、本実施形態におけるCPUアクセラレータ30においては、遅延回路35にてリセット信号を遅延させてライトバック端子に出力させているため、リセット信号がオフからオンとなってCPU31がリセットされるときにライトバック信号がオンとなってライトバックモードで立ち上がるとともに、リセット信号がオフとなるリセット直後にはライトスルーモードへ移行されるので、以後、キャッシュ管理ソフトを起動するまではキャッシュ不整合が生じないし、同キャッシュ管理ソフトでライトバックモードへ移行させた後はライトバックキャッシュ機能を利用して処理の高速化を図ることができる。
【図面の簡単な説明】
【図1】本発明の一実施形態にかかるCPUアクセラレータが適用されるコンピュータの概略ブロック図である。
【図2】本CPUアクセラレータの概略ブロック図である。
【図3】リセット信号とライトバック信号とモードの関係を示すタイミングチャートである。
【図4】本CPUアクセラレータの起動処理を示すフローチャートである。
【図5】フラッシュ管理ソフトのロードと起動を示すフローチャートである。
【図6】ディスクアクセスのBIOSコールをフックするための説明図である。
【図7】フラッシュ管理ソフトの作用を表すフローチャートである。
【符号の説明】
30…CPUアクセラレータ
31…CPU
31a…リセット端子
32…ライトバック端子
33…デコーダ
34…ポート
34a…ライトバック用ポート
34b…リセット端子
35…遅延回路
36…論理和回路
40…外部メモリ
50…外部機器インターフェイス
同内部キャッシュメモリの内容をフラッシュさせる
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a CPU accelerator, and more particularly to a CPU accelerator including a CPU having a write-back cache function.
[0002]
[Prior art]
The CPU accelerator is mounted on a computer (hereinafter referred to as a PC) having an old CPU, and the processing is compensated for by a newer CPU to increase the speed. The modernization of the CPU adds various new functions. For example, the CPU of the next generation or later may have a write-back cache function that was not available in a certain generation.
[0003]
The function of the write-back cache needs to prevent inconsistency between the contents of the cache memory in the CPU and the original external memory. For this reason, a hardware circuit that monitors the access to the external memory by the external device in hardware and forms a signal to be flashed by the CPU when the external device tries to access the external memory is required.
However, it is not premised that the old PC has such a write-back cache function. Therefore, there is no reason to have such a hardware circuit. Even if a conventional CPU accelerator has a CPU having a write-back cache function, the write-back mode for pulling down the write-back cache function is pulled down to write-through mode. It can be operated only with.
[0004]
Even if there is no hardware circuit described above for using the write-back cache function, software can monitor access to the external memory and flush the contents of the internal cache memory when an access request occurs. Is possible. Here, when the CPU is started in the write-through mode, it is not possible to shift from the write-through mode to the write-back mode, and when the CPU is started in the write-back mode, it is possible to shift between the two modes. There is. Therefore, the CPU must be started in the write-back mode and the procedure for loading the software must be taken. However, in such a procedure, cache inconsistency occurs after the CPU is started in the write-back mode until the software is loaded and started.
[0005]
In the end, the write-back cache function is not used because it does not have the necessary hardware circuitry and cannot load software.
[0006]
[Problems to be solved by the invention]
The conventional CPU accelerator described above has a problem that the write back cache function cannot be used while using a CPU having the write back cache function.
The present invention has been made in view of the above-described problems. A CPU accelerator capable of realizing a write-back cache function even when the PC main body does not have a necessary hardware circuit for the write-back cache function. For the purpose of provision.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1 is incapable of shifting from the write-through mode to the write-back mode after starting up when started up in the write-through mode, and when started up in write-back mode. A CPU accelerator having a CPU with a write-back cache function that can be switched between the write-back mode and the write-through mode after raising, and that rises in the write-back mode when a write-back signal is given at reset. The CPU is started up in the back mode and has a write back start control means for shifting to the write through mode immediately after the start.
[0008]
According to the present invention having such a configuration, the write back startup control means starts up in the write back mode when the CPU starts up, and shifts to the write through mode immediately after startup. Therefore, since the memory is actually in the write-through mode, there is no memory mismatch even if various initial setting processes are executed. On the other hand, since the memory is originally in the write-back mode, the write-through mode is used for writing. It is possible to shift to the back mode, and it is sufficient to shift to the write back mode after the environment necessary for software is prepared.
[0009]
The method of starting up in the write-back mode when starting up the CPU, or shifting to the write-through mode immediately after that can be appropriately changed according to the specifications of the CPU, as long as the above-described start-up process can be executed substantially.
For example, the write back mode corresponds to whether or not the write back terminal is enabled. By giving a write back signal at the time of reset, the write back terminal is enabled thereafter. Even if it is a specification that can be done, it can be said that it actually stands up in the write-back mode. As another example, in the invention according to claim 2, in the CPU accelerator according to claim 1, the write-back start-up control means turns on the write-back signal when the reset signal to the CPU is turned on. And a write back signal control circuit that turns off the write back signal when the reset signal is turned off.
[0010]
As a specification of the CPU, when a write back signal is given at the time of reset, the CPU may start up in a write back mode. In this case, when the reset signal for the CPU is turned on, the write back signal control circuit turns on the write back signal, and when the reset signal is turned off, the write back signal is turned off. At the same time, immediately after the reset signal is turned off and the rise is completed, the write back signal is turned off and the mode shifts to the write-through mode.
[0011]
Therefore, substantially the same processing as in claim 1 can be executed. Of course, signal characteristics such as on / off polarity and timing in the reset signal and the write-back signal can be appropriately changed according to the specifications of the CPU, and the detailed configuration of the write-back signal control circuit is not particularly limited. .
As an example of this, the invention according to claim 3 is the CPU accelerator according to claim 2, wherein the write-back signal control circuit is capable of outputting a port signal for the write-back mode when a predetermined control signal is inputted. A back port and a logical sum circuit that takes the logical sum of the reset signal and the port signal and outputs the logical sum signal to the write back terminal in the CPU are provided.
[0012]
According to the present invention having such a configuration, a write-back port is provided, and a port signal for the write-back mode can be normally output by inputting a predetermined control signal from the CPU. Sometimes the same port signal is not output. This port signal is input to the logical sum circuit, and the logical sum signal is input to the write back terminal of the CPU. By controlling the sending of the control signal to the port by the CPU, the write back mode and the write through mode are controlled. Can be migrated between. On the other hand, since the reset signal is also input to the above OR circuit, if the reset signal is turned on to reset the CPU, the ON signal is also input to the write back terminal through the OR circuit at the same time. Will stand up at.
[0013]
Further, according to a fourth aspect of the present invention, in the CPU accelerator according to any one of the first to third aspects, the access to the external memory is monitored, and the internal cache memory of the CPU is inconsistent with the external memory. The cache management software for performing write back is executed so as not to occur, and the cache management software is used to shift from the write-through mode to the write-back mode.
As described above, it is possible to shift from the write-through mode to the write-back mode, and when the cache management software is loaded to prevent the inconsistency of the memory, the software shifts to the write-back mode. Then, the access to the external memory by an external device or the like is monitored, and a write-back is performed as appropriate so that the internal cache memory and the external memory do not become inconsistent. Of course, when the external memory is accessed from the CPU, inconsistency does not occur, so it is not always necessary to write back. As a specific method of writing back, the contents of the internal cache memory may be flushed when there is no direct writing back command.
[0014]
Note that the write-back is performed by monitoring access to the external memory by an external device or the like, but there are various monitoring methods. For example, a DMA controller that manages memory access may be directly monitored, or a BIOS call that substantially causes memory access may be monitored. Depending on the degree, inconsistency may be accepted, and performance such as processing speed may be prioritized. Furthermore, after the transition from the write-through mode to the write-back mode, the transition may be made appropriately between the write-through mode and the write-back mode as necessary.
[0015]
【The invention's effect】
As described above, the present invention can provide a CPU accelerator that can execute a write-back cache function of a CPU even in a PC that does not include a hardware circuit for a write-back cache.
According to the invention of claim 2, it can be realized with a simple circuit by controlling the write-back signal in synchronization with the reset signal.
Further, according to the invention of claim 3, since the port used in the PC is used, for example, if the circuit has a margin in the port, it is realized with an extremely easy configuration by adding an OR circuit. it can.
[0016]
Furthermore, according to the fourth aspect of the invention, the cache management software is surely loaded and then the mode shifts to the write-back mode, so that the reliability of the system can be improved.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a schematic configuration of a PC to which a CPU accelerator according to an embodiment of the present invention is applied. FIG. 2 is a block diagram showing a main configuration of the CPU accelerator.
[0018]
In FIG. 1, a computer (PC) 10 includes a data bus 20 to which a CPU accelerator 30, a main memory (hereinafter referred to as an external memory) 40, an external device interface 50, and the like are connected. The CPU accelerator 30 includes a CPU 31 having an internal level 1 cache (hereinafter referred to as an internal cache memory), and the CPU 31 is connected to the external memory 40 via the data bus 20.
[0019]
The CPU 31 has a write-back cache function and has a write-back (W / B) terminal 32 for switching modes. In order to make the write back mode valid, it is necessary to give an ON signal to the write back terminal 32 at the time of start-up and to start up in the write back mode, whereby the write back terminal 32 becomes effective thereafter. Therefore, even after the start-up, if the on signal is given to the write back terminal 32, the write back mode is set, and if the off signal is given, the write through mode is set. However, when starting up in the write-through mode, the write-through mode is always set regardless of whether the signal to the write-back terminal 32 is on or off.
[0020]
Since this relates to the CPU specifications, the present invention can be applied when it is necessary to externally provide a write back permission signal. For example, when the write back is controlled by a register in the CPU. Is not necessary. On the other hand, the present invention can be widely applied as long as it determines whether to give a write back permission signal externally.
The CPU accelerator 30 is equipped with a decoder 33 together with the CPU 31, and the output of the decoder 33 is connected to the write terminal of the port 34. Here, the CPU 31 can send a predetermined code signal to the decoder 33 depending on whether the write back mode or the write through mode is set, and the code signal C1 for the write back mode is sent to the decoder 33. When output, the decoder 33 writes a specified value indicating the write back mode at the address assigned for write back control at the port 34. On the other hand, if the code signal C2 for setting the write-through mode is output to the decoder 33, a specified value indicating the write-through mode is written to the same address. In this sense, the output of the same address in the port 34 corresponds to the write back port 34a. The port 34 itself does not have to be provided exclusively for the write back, and can be used as a normal port having other functions.
[0021]
On the other hand, reset terminals 31a and 34b are formed in the CPU 31 and the port 34, respectively, and a reset signal is supplied in conjunction with a power switch or the like. When a reset signal is supplied to the reset terminal 34b of the port 34, the port output becomes a preset initial value, and in the case of the write back port 34a, it is in an off state indicating the write through mode.
The output of the write-back port 34a is input to the OR circuit 36 together with the output of the delay circuit 35 that receives the reset signal. The output of the OR circuit 36 is connected to the write-back terminal 32 in the CPU 31. Yes. The logical sum circuit 36 calculates a logical sum. If either one of the output of the delay circuit 35 and the output of the write-back port 34a is in the ON state by the connection described above, the CPU 31 converts the ON signal into a logical sum. Is supplied to the write back terminal 32.
[0022]
Therefore, when the reset signal for the CPU 31 is turned on, the write-back signal output from the OR circuit 36 after the delay time by the delay circuit 35 is also turned on. When the reset signal for the CPU 31 is turned off, the OR circuit 36 is output after the same delay time. The write back signal output from is also turned off. In the present embodiment, the write back signal needs to be on at the fall of the reset signal according to the specifications of the CPU 31, so the delay circuit 35 is interposed at the input of the OR circuit 36. However, if the reset is enabled by the rising edge of the reset signal, the reset signal may be supplied to the write-back terminal 32 as it is. In this case, when the signal condition of the write-back terminal 32 is checked for the first time after the reset is enabled, the ON signal can be supplied. Therefore, the reset signal is substantially used as it is as the write-back signal. Can do. In this sense, the signal line of the reset signal, the delay circuit, and the like constitute a write back signal control circuit. Of course, the configuration of the write back signal control circuit is not limited to this, and can be changed as appropriate.
[0023]
The write-back signal control circuit constitutes a write-back start-up control means, but it is necessary to change the circuit configuration if the start condition of the write-back mode changes. An entire circuit that starts the CPU in the write-back mode and shifts to the write-through mode immediately after the start-up is called a write-back start-up control means.
Next, the operation of the present embodiment having the above hardware configuration will be described together with the software processing.
[0024]
As shown in FIG. 3, when the reset signal is turned from OFF to ON, the write-back signal output from the OR circuit 36 is also turned on after the delay time of the delay circuit 35, and the CPU 31 is reset when the reset signal falls. To be launched. On the other hand, since the write back signal is on for the delay time of the delay circuit 35 at the time of this rise, the CPU 31 starts up in the write back mode. Then, after the delay time elapses, the write back signal is also turned off as the reset signal is turned off, and the CPU 31 shifts to the write through mode.
[0025]
If the write back signal is formed in this way, the CPU 31 rises in the write back mode, and shifts to the write through mode immediately after the rise when the reset signal is turned off and the write back signal is also turned off. Therefore, the processing starts in the write-through mode with the possibility of shifting to the write-back mode. The above signal situation and mode change state are shown in FIG.
When the CPU 31 starts up, as shown in FIG. 4, first, initialization such as memory check is executed (step S100), and then a DOS program is loaded from a hard disk or the like and started (step S110). During this time, as described above, since it operates in the write-through mode, cache inconsistency does not occur. Following the loading of the DOS program, the flash management software is loaded and activated in this embodiment (step S120).
[0026]
This flash management software mainly monitors the access to the external memory 40 by an external device or the like, and changes the contents of the internal cache memory so that inconsistency between the internal cache memory of the CPU 31 and the external memory 40 does not occur. More specifically, the process shown in FIG. 5 is executed.
In the case of the present embodiment, in order to monitor access to the external memory 40, a call for BIOS disk access is used. Considering that the cause of memory inconsistency is access to the external memory 40 by an external device, it may be appropriate to monitor the operation status of the DMA controller, but access to the DMA controller occurs very frequently. If the contents of the cache memory are flushed at each access, the processing speed is not substantially improved. For this reason, in the present embodiment, the situation in which processing may be abnormal due to cache inconsistency is narrowed down and flushed when there is a BIOS call for disk access.
[0027]
Note that when the sound circuit accesses the external memory 40 via DMA, there is a possibility that a cache inconsistency may occur, but it is known that the degree of influence on the processing is very small. The priority in this case can be changed depending on the system, and in this embodiment, the processing speed performance is prioritized. However, in the case of a music system, even if it is accessed from the sound circuit, it is flushed. do it. On the other hand, the CPU has a function of monitoring the access to a predetermined I / O. Therefore, the CPU may be appropriately changed according to the system, such as flushing by accessing the predetermined I / O. Further, in this embodiment, the inconsistency is eliminated by the flash, but if there is a command for direct write back, it may be executed.
[0028]
In order to realize the functions as described above, in this embodiment, the BIOS call vector table is rewritten to hook the BIOS call. Originally, if the BIOS call of INT1Bh is a disk access, as shown in FIG. 6, the start address (address 1) of the disk access routine in the BIOS call routine is recorded at the address corresponding to INT1Bh in the BIOS call vector table. Has been. This is rewritten to the start address (address 2) of the flash routine shown in the figure, and the flash routine is started before jumping to the disk access routine.
[0029]
This flow will be described with reference to the flowchart shown in FIG. First, the flash routine is loaded (step S200), and then the INT1Bh start address in the BIOS call vector table is rewritten to the flash routine start address (address 2) (step S210). In order to shift to the mode, the code signal C1 for turning on the write-back port 34a in the port 34 is output to the decoder 33 (step S220). By this port writing, the output of the write-back port 34a is turned on, and the output of the OR circuit 36 that receives the output is turned on. Since the output of the OR circuit 36 is input as a write back signal to the write back terminal 32 in the CPU 31, the write back signal is turned on, and the CPU 31 shifts to the write back mode (FIG. 3). This flash management software has this kind of content, and completes immediately after loading and starting up.
[0030]
After the flash management software is loaded and activated as described above, the write-back mode is entered. When the application is loaded and activated, it is executed in the write-back mode (step S130).
On the other hand, if the operation during the execution of the application is represented by a flowchart, it is as shown in FIG. After shifting to the write back mode as described above (step S300), it is monitored whether there is a request for disk access from the application (step S310). When a disk access request is made, the cache memory is flushed (step S320), a disk access routine is called (step S330), and data is referred to the external memory 40 via the external device interface 50. Etc. are performed. That is, the contents of the cache memory are first flushed by the flush routine, and the disk access is executed after the cache inconsistency with the external memory 40 is eliminated. Therefore, the write-back cache function can be operated normally.
[0031]
Note that the flash management software only needs to be able to substantially provide the above-described operation, and does not necessarily correspond to the above-described flowcharts. For example, the flash management software described above has a resident function as shown in FIG. 7, but in fact, it is terminated after securing a predetermined bioshook path even if it is activated. It is also possible to monitor access to the external memory in the state. On the other hand, for the sake of safety, in this embodiment, flushing is performed again after the end of the disk access call, but it is not always necessary to flush after execution. Of course, in parallel with monitoring for such a cache inconsistency, it may be periodically flushed by another program.
[0032]
As described above, in the CPU accelerator 30 according to the present embodiment, the reset signal is delayed by the delay circuit 35 and output to the write-back terminal. Therefore, when the CPU 31 is reset when the reset signal is turned on from off. When the write back signal is turned on and the system starts up in the write back mode, the reset signal is turned off, and immediately after the reset, the mode shifts to the write-through mode. In addition, after the cache management software shifts to the write-back mode, the processing speed can be increased by using the write-back cache function.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram of a computer to which a CPU accelerator according to an embodiment of the present invention is applied.
FIG. 2 is a schematic block diagram of the CPU accelerator.
FIG. 3 is a timing chart showing a relationship between a reset signal, a write back signal, and a mode.
FIG. 4 is a flowchart showing activation processing of the CPU accelerator.
FIG. 5 is a flowchart showing loading and activation of flash management software.
FIG. 6 is an explanatory diagram for hooking a BIOS call for disk access;
FIG. 7 is a flowchart showing the operation of the flash management software.
[Explanation of symbols]
30 ... CPU accelerator 31 ... CPU
31a ... Reset terminal 32 ... Write-back terminal 33 ... Decoder 34 ... Port 34a ... Write-back port 34b ... Reset terminal 35 ... Delay circuit 36 ... OR circuit 40 ... External memory 50 ... Contents of internal device internal cache memory Flush

Claims (4)

ライトスルーモードで立ち上げられたときには立ち上げ後ライトスルーモードからライトバックモードへは移行できず、ライトバックモードで立ち上げられたときには立ち上げ後ライトバックモードとライトスルーモードの2つのモード間を相互に移行でき、リセット時にライトバック信号を与えるとライトバックモードで立ち上がるライトバックキャッシュ機能の付いたCPUを有するCPUアクセラレータであって、
ライトバックモードで上記CPUを立ち上げ、立ち上げ直後にライトスルーモードに移行させるライトバック立ち上げ制御手段を有することを特徴とするCPUアクセラレータ。
When starting up in write-through mode, it is not possible to switch from write-through mode to write-back mode after startup. When starting up in write-back mode, after startup, between the two modes of write-back mode and write-through mode. A CPU accelerator having a CPU with a write-back cache function that can be transferred to each other and that starts in write-back mode when a write-back signal is given at reset,
A CPU accelerator comprising a write back start control means for starting up the CPU in a write back mode and shifting to the write through mode immediately after the start.
上記請求項1に記載のCPUアクセラレータにおいて、上記ライトバック立ち上げ制御手段は、上記CPUに対するリセット信号がオンとなるときにライトバック信号をオンとし、リセット信号がオフとなるとライトバック信号をオフとするライトバック信号制御回路を有することを特徴とするCPUアクセラレータ。  2. The CPU accelerator according to claim 1, wherein the write-back start-up control means turns on the write-back signal when a reset signal for the CPU is turned on and turns the write-back signal off when the reset signal is turned off. A CPU accelerator having a write-back signal control circuit for performing the operation. 上記請求項2に記載のCPUアクセラレータにおいて、
上記ライトバック信号制御回路は、上記CPUからの所定の制御信号を入力するとライトバックモードのためのポート信号を出力可能なライトバック用ポートと、リセット信号とポート信号とで論理和をとって論理和信号を上記CPUにおけるライトバック端子に出力する論理和回路とを有することを特徴とするCPUアクセラレータ。
In the CPU accelerator according to claim 2,
The write back signal control circuit takes a logical sum of a write back port capable of outputting a port signal for the write back mode when a predetermined control signal from the CPU is input, and a reset signal and the port signal. A CPU accelerator comprising: a logical sum circuit that outputs a sum signal to a write-back terminal of the CPU.
上記請求項1〜請求項3のいずれかに記載のCPUアクセラレータにおいて、
外部メモリへのアクセスを監視し、上記CPUの内部キャッシュメモリと同外部メモリとの不整合が生じないように書き戻しを行わせるキャッシュ管理ソフトを実行させるとともに、同キャッシュ管理ソフトにてライトスルーモードからライトバックモードへ移行させることを特徴とするCPUアクセラレータ。
In the CPU accelerator according to any one of claims 1 to 3,
Monitors access to external memory and executes cache management software to write back so that inconsistency between the internal cache memory of the CPU and the external memory does not occur. A CPU accelerator that is shifted from a write back mode to a write back mode.
JP16218196A 1996-06-21 1996-06-21 CPU accelerator Expired - Fee Related JP3745031B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16218196A JP3745031B2 (en) 1996-06-21 1996-06-21 CPU accelerator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16218196A JP3745031B2 (en) 1996-06-21 1996-06-21 CPU accelerator

Publications (2)

Publication Number Publication Date
JPH1011359A JPH1011359A (en) 1998-01-16
JP3745031B2 true JP3745031B2 (en) 2006-02-15

Family

ID=15749560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16218196A Expired - Fee Related JP3745031B2 (en) 1996-06-21 1996-06-21 CPU accelerator

Country Status (1)

Country Link
JP (1) JP3745031B2 (en)

Also Published As

Publication number Publication date
JPH1011359A (en) 1998-01-16

Similar Documents

Publication Publication Date Title
KR101343704B1 (en) Shared Nonvolatile Memory Architecture
US8245055B2 (en) Method for firmware control invocation from power management
JP4136359B2 (en) Microcomputer
US20050055598A1 (en) Booting method capable of executing a warm boot or a cold boot when a CPU crash occurs and computer system therefor
US6049871A (en) Method and apparatus for display control bootup
JPH0528039A (en) Storage device
US8069309B1 (en) Servicing memory in response to system failure
US7558990B2 (en) Semiconductor circuit device and method of detecting runaway
KR100451777B1 (en) Operating vehicular processor-based systems
US5574943A (en) Gate-A20 and CPU reset circuit for mircroprocessor-based computer system
JP3745031B2 (en) CPU accelerator
CN112463226A (en) Starting control method, system, equipment and storage medium of server
CN113961261B (en) Dormancy management method and device, electronic equipment and storage medium
JPH11149376A (en) Boot loader circuit
JP2556268B2 (en) Program download method
EP0784819A1 (en) A cache flush mechanism for a secondary cache memory
JP3579129B2 (en) Portable computer
JP3097602B2 (en) Data processing device
JP2001290551A (en) Controller
JPS63298654A (en) Microcomputer
JP2001306171A (en) Control apparatus
JPH11338690A (en) Flash memory, firmware use system device and firmware rewriting method
JP2003141815A (en) Saved data omission preventing method
JP2000227856A (en) Memory control system
JPH11212945A (en) Microcomputer and it memory

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050624

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051019

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051116

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20081202

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111202

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20141202

Year of fee payment: 9

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees