JP2009230425A - Information processor - Google Patents
Information processor Download PDFInfo
- Publication number
- JP2009230425A JP2009230425A JP2008074444A JP2008074444A JP2009230425A JP 2009230425 A JP2009230425 A JP 2009230425A JP 2008074444 A JP2008074444 A JP 2008074444A JP 2008074444 A JP2008074444 A JP 2008074444A JP 2009230425 A JP2009230425 A JP 2009230425A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- cycle
- data writing
- cpu
- timer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、情報処理装置に関し、特に、データ書き込み処理を行うと、CPUのアプリケーション処理が停止してしまう不揮発性メモリを有する情報処理装置に関する。 The present invention relates to an information processing apparatus, and more particularly, to an information processing apparatus having a nonvolatile memory in which application processing of a CPU stops when data writing processing is performed.
従来から、コンピュータプログラムを実行するコンピュータにおいて、コンピュータプログラムの一部を含む命令中の情報を、コンピュータプログラムの実行に割り込むことなく変更する装置であって、情報を自身の内部のアドレスに記憶するメモリ手段と、メモリ手段に連結されており、コンピュータによる使用のために情報に周期的にアクセスする手段と、メモリ手段に連結されており、コンピュータプログラムの実行に割り込まずにメモリ手段内に記憶された情報を変更するように、アクセス手段によるメモリ手段への周期的なアクセスの合間に情報を変更する手段を備えた装置が知られている(例えば、特許文献1参照)。
しかしながら、上述の特許文献1に記載の構成では、コンピュータプログラムの実行が周期処理の大半を占めた場合や、メモリ手段内に記憶された情報の変更量が多い場合には、周期的なアクセスの合間に情報を変更しても、周期内に情報の変更処理が終了せず、次の周期に処理が跨ってしまい、周期が守れなくなってしまうという問題があった。
However, in the configuration described in
そこで、本発明は、アプリケーション処理の空き時間を利用してデータの書き込みを行い、周期処理を守ることができる情報処理装置を提供することを目的とする。 Therefore, an object of the present invention is to provide an information processing apparatus capable of writing data by using the idle time of application processing and protecting the periodic processing.
上記目的を達成するため、第1の発明に係る情報処理装置は、所定周期でアプリケーション処理を実行するCPUと、
データ書き込み処理を行うと、前記CPUのリソースを占有して前記アプリケーション処理を停止させてしまう不揮発性メモリと、
前記アプリケーション処理を実行後に、前記所定周期内の残りの時間で前記データ書き込み処理が可能か否かを判定する書き込み判定手段と、
該書き込み判定手段により、前記データ書き込み処理が可能と判定されたときには、前記データ書き込み処理を実行するデータ書き込み手段と、を有することを特徴とする。
In order to achieve the above object, an information processing apparatus according to a first invention includes a CPU that executes application processing at a predetermined cycle;
When performing the data write process, a nonvolatile memory that occupies the CPU resources and stops the application process;
Write determination means for determining whether or not the data write processing is possible in the remaining time within the predetermined period after executing the application processing;
And a data writing unit that executes the data writing process when the writing determination unit determines that the data writing process is possible.
これにより、データ書き込み処理は、周期の空き時間を利用して行うことができるともに、データ書き込みが間に合わないときはデータ書き込みを行わないので、データ書き込み処理が次の周期に跨ることを防ぐことができ、所定周期を守ってアプリケーション処理を行うことができる。 As a result, the data writing process can be performed using the free time of the cycle, and the data writing process is not performed when the data writing is not in time, thus preventing the data writing process from extending over the next cycle. In addition, application processing can be performed while keeping a predetermined cycle.
第2の発明は、第1の発明に係る情報処理装置において、
前記データ書き込み処理を中断させる割り込み処理を行う周期処理用タイマと、
該周期処理用タイマが前記割り込み処理を行うタイミングが、前記所定周期内となるように前記周期処理用タイマを制御する周期時間制御手段と、を有することを特徴とする。
A second invention is an information processing apparatus according to the first invention, wherein
A periodic processing timer for performing interrupt processing to interrupt the data writing processing;
And periodic time control means for controlling the periodic processing timer so that the timing at which the periodic processing timer performs the interrupt processing is within the predetermined period.
これにより、所定処理周期内でデータ書き込み処理を中断させることができ、次の周期には通常のアプリケーション処理を実行することができる。 Thereby, the data writing process can be interrupted within a predetermined processing cycle, and a normal application process can be executed in the next cycle.
第3の発明は、第1又は第2の発明に係る情報処理装置において、
前記周期時間制御手段は、前記周期処理タイマのカウント値を、前記所定周期の全体のカウント値よりも小さい値のカウント値に設定することにより、前記割り込み処理を行うタイミングを制御することを特徴とする。
A third invention is an information processing apparatus according to the first or second invention,
The cycle time control means controls the timing of performing the interrupt processing by setting the count value of the cycle processing timer to a count value that is smaller than the total count value of the predetermined cycle. To do.
これにより、周期処理タイマのカウント値設定により、データ書き込み処理が周期内の残り時間で完了しない場合でも、データ書き込み処理を所定周期内で確実に中断し、周期を守る制御を行うことができる。 Thereby, even if the data writing process is not completed within the remaining time in the cycle by setting the count value of the cycle processing timer, the data writing process can be surely interrupted within the predetermined cycle, and the cycle can be controlled.
第4の発明は、第1〜3のいずれかの発明に係る情報処理装置において、
前記所定周期を計測するメイン周期用タイマを備えることを特徴とする。
A fourth invention is an information processing apparatus according to any one of the first to third inventions,
A main cycle timer for measuring the predetermined cycle is provided.
これにより、通常の所定周期は、別の専用タイマを設けて時間計測を行うことができ、所定周期の計測は、データ書き込み処理の有無に関わらず、常に一定とすることができる。 As a result, the normal predetermined cycle can be time-measured by providing another dedicated timer, and the measurement of the predetermined cycle can always be constant regardless of the presence or absence of the data writing process.
第5の発明は、第1〜4のいずれかの発明に係る情報処理装置において、
前記CPUは、前記データ書き込み手段を含むことを特徴とする。
A fifth invention is an information processing apparatus according to any one of the first to fourth inventions,
The CPU includes the data writing means.
これにより、CPUにおいて不揮発性メモリの書き込みを行うことができる。 As a result, the nonvolatile memory can be written in the CPU.
本発明によれば、アプリケーション処理の周期処理の空き時間を利用して、周期を確実に守りつつ不揮発性メモリのデータ書き込み処理を行うことができる。 According to the present invention, it is possible to perform data writing processing of the nonvolatile memory while reliably keeping the cycle by using the idle time of the cycle processing of the application processing.
以下、図面を参照して、本発明を実施するための最良の形態の説明を行う。 The best mode for carrying out the present invention will be described below with reference to the drawings.
図1は、本発明を適用した実施例1に係る情報処理装置100の全体構成の一例を示した図である。図1において、実施例1に係る情報処理装置100は、CPU(Central Processing Unit、中央処理装置)10と、不揮発性メモリ20と、書き込み判定手段30と、書き込み手段40と、周期処理用タイマ50と、周期時間制御手段60とを備える。また、本実施例に係る情報処理装置100は、メイン周期用タイマ70と、RAM(Random Access Memory)80と、入出力ポート90とを備えてもよい。更に、図1には示していないが、本実施例に係る情報処理装置100は、必要に応じて不揮発性メモリ20以外のROM(Read Only Memory)を備えてもよい。
FIG. 1 is a diagram illustrating an example of the overall configuration of an
本実施例に係る情報処理装置100は、例えば、マイクロコンピュータ又はマイクロコントローラとして構成されてよく、種々の電子装置に組み込まれて使用されてもよい。例えば、電子計算機の一部として使用されてもよいし、特定の目的を有する組み込み用途に用いられてもよい。特定装置の組み込み用途としては、例えば車両用のECU(Electronic Control Unit、電子制御ユニット)等に用いられてもよい。
The
CPU10は、種々の演算処理、制御処理を行う手段であり、情報処理装置100の頭脳とも呼べる部分である。本実施例に係る情報処理装置100においては、CPU10は、特定の目的のため、所定の機能を果たすためのアプリケーション処理を行う。
The
CPU10は、アプリケーション処理を行うときには、所定周期内でアプリケーション処理を実行する。種々のアプリケーション処理は、所定の周期単位で実行され、CPU10は、所定周期内で区切りよく各アプリケーション処理を実行して動作する。
When performing application processing, the
不揮発性メモリ20は、電気的に書き換え可能で、かつ電源が切れても記憶内容を保持できる記憶手段である。本実施例に係る不揮発性メモリ20は、データ書き込み処理を行うと、CPU10のリソースが占有され、CPU10による通常のアプリケーション処理が停止してしまう性質を有する不揮発性メモリ20を対象としている。不揮発性メモリ20は、例えば、フラッシュメモリや、EEPROM(Electrically Erasable and Programmable Read Only Memory)等の半導体メモリが適用されてよい。本実施例においては、以下、不揮発性メモリ20にフラッシュメモリを適用する例を挙げて説明するが、上述のEEPROM等を含めて、データ書き換えが可能で、かつデータ書き込み処理の際に、CPUリソースが占有されてしまうタイプの不揮発性メモリ20であれば、種々の態様の不揮発性メモリ20が適用され得る。
The
不揮発性メモリ20は、CPU10で実行するアプリケーション処理のプログラムを記憶している。これにより、CPU10は、不揮発性メモリ20に記憶されたプログラムを読み込んで所定のアプリケーション処理を実行することができる。また、上述のように、不揮発性メモリ20に記憶されているアプリケーション処理のプログラムは、必要に応じて書き換え可能である。
The
不揮発性メモリ20は、必要に応じて、OS(Operating System)の基本ソフトウェアも記憶してよい。なお、OSは、書き換えの行わないROMに記憶しておいた方が好ましい場合には、OS用にROMを備えてもよい。
The
書き込み判定手段30は、CPU10が所定周期内でアプリケーション処理を終了したときに、1周期の残り時間で不揮発性メモリ20へのデータ書き込み処理が可能な時間が残っているか否かを判定する手段である。不揮発性メモリ20へのデータ書き込み処理を行う場合には、データ書き込み処理に最低限必要とされる時間があるので、書き込み判定手段30は、アプリケーション処理を終了した段階で、データ書き込み処理に要する最低限の時間が残されているか否かを判定する。
The write determination means 30 is a means for determining whether or not there remains a time during which data can be written to the
具体的には、例えば、書き込み判定手段30は、CPU10から周期内のアプリケーション処理終了の情報を取得するとともに、周期処理用タイマ50を監視して、周期の残り時間を算出し、それがデータ書き込み処理に要する所定時間以上であるか否かを判定し、残り時間が所定時間以上あればデータ書き込み処理可能と判定し、所定時間未満であれば、データ書き込み処理不可能と判定するようにしてもよい。なお、データ書き込み処理に要する最低限の所定時間は、不揮発性メモリ20の態様等に依存するが、例えば、10〔Mバイト/秒〕程度であってもよい。
Specifically, for example, the
書き込み判定手段30は、上述のような判定演算処理を行うので、演算処理機能を有する手段で構成されてよく、例えばASIC(Application Specific Integrated Circuit)で構成されてもよいし、CPU10の一部として組み込まれて構成されてもよい。
Since the
書き込み判定手段30は、書き込み判定の判定結果をCPU10に送り、CPU10に次の動作を適切に実行させるための情報を提供してよい。これにより、CPU10は、周期の残り時間で不揮発性メモリ20へのデータ書き込み処理を実行するか、実行せずに次の周期に入ってアプリケーション処理を実行するかを適切に選択することができる。
The
書き込み手段40は、不揮発性メモリ20にデータの書き込みを行う手段である。書き込み手段40は、例えば、ASIC等によりライタ等の書き込み機能を有する手段として構成されてもよい。また、CPU10内に組み込まれてCPU10の一部として構成されてもよいが、この点については、実施例2において説明する。
The writing means 40 is means for writing data into the
周期処理用タイマ50は、周期処理の時間を計測するとともに、書き込み手段40によるデータ書き込み処理を、割り込みにより中断し、周期内での処理を終了させる手段である。周期処理用タイマ50は、周期の開始からカウントを開始し、不揮発性メモリ20へのデータ書き込み処理を実行することになったときには、データ書き込み処理の中断タイミングを時間計測する。周期処理用タイマ50は、例えば、CPU10の動作周期よりも短い時間間隔で供給されるクロックをカウントして加算し、クロックが所定回数に達したときに、CPU10に割り込み要求を出して処理の終了を通知する機能を備えていてよい。CPU10は、この割り込み要求により、データ書き込み処理を終了させることができる。
The
周期時間制御手段60は、周期処理タイマ50による割り込み処理を実行するタイミングを制御する手段である。周期時間制御手段60は、不揮発性メモリ20へのデータ書き込み処理が行われるときには、周期処理用タイマ50の割り込みタイミングが、所定周期内に収まり、次の周期に跨ることがないように、時間制御を行う。周期時間制御手段60は、具体的には、周期処理用タイマ50のカウント値を設定して、周期処理タイマ50による割り込み処理が行われるタイミングを設定する。周期処理用タイマ50のカウント値の設定は、所定周期の全体のカウント値よりも、小さなカウント値が設定されることになる。
The cycle time control means 60 is means for controlling the timing for executing the interrupt processing by the
メイン周期用タイマ70は、CPU10がアプリケーション処理を行う所定周期の時間計測を行う手段である。メイン周期タイマ70は、例えば一定のインターバルとなるようにクロックのカウント値が設定され、クロック数をカウントして設定されたカウント値に達した段階でCPU10に割り込み要求を行うようにしてよい。このとき、CPU10は、それに応じて周期を終了し、次の周期を開始する動作を行うようにしてよい。これにより、アプリケーション処理等の処理は、CPU10において一定の所定周期で実行される。
The
RAM80は、データの電気的な読み書きが可能で、電源が入っているときにのみデータの記憶が可能な一時記憶手段である。RAM60は、CPU10によるデータ加工等に使用されてよい。
The
入出力ポート90は、情報処理装置100の外部に接続する機器との情報の入出力に使用するインターフェース手段である。例えば、情報処理装置100が、車両用ECUに適用された場合には、他の車両用ECUやセンサ等からの信号の入出力を行う。
The input /
次に、図2を用いて、本実施例に係る情報処理装置100の処理フローについて説明する。図2は、本実施例に係る情報処理装置100の1周期分の処理フローの一例を示した図である。
Next, the processing flow of the
ステップ100では、CPU10の所定周期の開始と同時に、周期処理用タイマ50がカウントをスタートする。このとき、メイン周期用タイマ70も、同時にカウントをスタートするようにしてよい。
In
ステップ110では、CPU10が、不揮発性メモリ20に記憶されているアプリケーションプログラムを読み込んでアプリケーション処理が実行される。
In step 110, the
ステップ120では、書き込み判定手段30により、所定周期内でのアプリケーション処理の実行後に、所定周期内の残り時間で、不揮発性メモリ20へのデータ書き込み処理の実行が可能か否かについての判定処理が実行される。ステップ120で、データ書き込み処理の実施の可否の判定を開始するタイミングは、CPU10でのアプリケーション処理が終了したタイミングでもよいし、どのアプリケーションを実行するかが分かっており、かつ当該アプリケーションに要する時間が定まっている場合には、アプリケーション処理の実行中に、並行してデータ書き込み処理実施の可否判定を行うようにしてもよい。
In step 120, the
ステップ130では、書き込み判定手段30により、所定周期内の残り時間で不揮発性メモリ20へのデータ書き込み処理の実行が可能か否かの判定結果が出される。判定は、周期処理用タイマ50又はメイン周期用タイマ70に示された所定周期内の残り時間と、不揮発性メモリ20へのデータ書き込み処理に要する時間との関係に基づいて判定してよい。
In
例えば、通常のアプリケーション処理(メイン処理)を実行するために設定された所定周期が5〔ms〕であり、データ書き込み処理の実施に最低1〔ms〕の時間を必要とする場合を考える。ここで、周期内でアプリケーション処理を終了するのに2〔ms〕要したとすると、残りは3〔ms〕空き時間があるので、その間にデータ書き込み処理は可能と判定する。一方、アプリケーション処理を終了するのに4.5〔ms〕要するとすると、残りは0.5〔ms〕しかないので、データ書き込み処理は不可能と判定する。 For example, let us consider a case where the predetermined period set for executing normal application processing (main processing) is 5 [ms], and at least 1 [ms] is required to perform data writing processing. Here, if it takes 2 [ms] to finish the application processing within the cycle, the remaining 3 [ms] is free, so it is determined that the data write processing is possible during that time. On the other hand, if 4.5 [ms] is required to complete the application process, the remaining is only 0.5 [ms], so it is determined that the data writing process is impossible.
ステップ130において、データ書き込み処理が不可能であると判定された場合には、その周期の処理を終了する。また、次の周期について、図2で示したのと同様の処理フローが繰り返される。一方、データ書き込み処理が可能と判定された場合には、実行中のメイン周期用タイマ70のカウント値よりも、周期処理用タイマ50のカウント値が小さくなるような制御を、周期時間制御手段60が行い、データ書き込み処理の中断タイミング(所定周期内では、終了タイミング)が、所定周期を越えないように制御され、ステップ140に進む。
If it is determined in
なお、ステップ130の判定結果は、CPU10に出力される。
Note that the determination result of
ステップ140では、CPU10からの指示に従い、データ書き込み手段40により、不揮発性メモリ20へのデータ書き込み処理が実行される。データ書き込み処理中、CPUリソースは占有される。なお、割り込み処理は受け付ける状態となっている。また、データ書き込み処理は、複数バイトのデータ書き込みが可能である。
In
ステップ150では、周期処理用タイマ50により、割り込み要求がCPU10に対してなされ、割り込み処理が実行される。これにより、CPU10は、データ書き込み処理を中断する処理を開始する。
In
ステップ160では、CPU10の指示に従い、データ書き込み手段40がデータ書き込み処理を中断する。所定周期内での処理は、これで終了することになる。そして、次の周期で、図2に示した処理フローが実行され、周期毎に図2の処理フローが繰り返し実行される。
In
次に、図3及び図4を用いて、CPU10における処理の内容を、より詳細に説明する。図3は、本実施例に係る情報処理装置100において実行される時分割書き込み処理のタイミングチャートの一例である。図4は、図3のタイミングチャートに対応させた、本実施例に係る情報処理装置100のより詳細な処理フロー図の一例である。
Next, the contents of processing in the
図3は、メインとなるアプリケーション処理をCPU10が所定周期で実行してゆく場合における、アプリケーション処理とデータ書き込み処理の関係の種々の例を示している。
FIG. 3 shows various examples of the relationship between application processing and data writing processing when the
図3(a)は、メインとなるアプリケーション処理の後に、データ書き込み処理が可能な場合の一例について示した図である。図3(a)において、所定周期の開始と同時に、機能1を有するアプリケーション処理Aが実行され、次いで機能2を有するアプリケーション処理Bが実行されている。それらのアプリケーション処理A、Bを実行した後、メイン周期の所定周期内では、まだ残り時間が十分存在するので、その後にデータ書き込み処理Dが実行されている。そして、データ書き込み処理Dは、メイン周期の最後に到達しないうちに、一旦中断し、図3(a)の所定周期内でその処理を終了している。なお、この場合のデータ書き込み処理の終了は、周期処理用タイマ50による割り込み処理により実行されてよい。この割り込み処理を実行するタイミングは、周期時間制御手段60により、所定周期の時間をカウントするメイン周期用タイマ70の所定周期全体のカウント値よりも、周期処理用タイマ50のカウント値が小さくなるように設定されて制御されてよい。
FIG. 3A is a diagram illustrating an example of a case where data write processing is possible after main application processing. In FIG. 3A, simultaneously with the start of the predetermined cycle, application process
図3(b)は、図3(a)の次の所定周期のタイミングチャートであり、データ書き込み処理の実行が不可能な場合の一例について示した図である。図3(b)において、機能1を有するアプリケーション処理A、機能2を有するアプリケーション処理B及び機能3を有するアプリケーション処理Cが順次実行され、これらのアプリケーション処理A、B、Cが総て終了した段階で、メイン周期の所定周期内では、データ書き込み処理Dを行う十分な時間が残っていない。よって、この場合には、通常の所定周期のアプリケーション処理A、B、Cを実行し、所定周期の処理を終了する。この場合には、周期処理用タイマ50は、メイン周期用タイマ70のカウント値と同じカウント値をカウントし、処理を終了してよい。所定周期を終了させる割り込み処理は、メイン周期用タイマ70が行ってもよいし、周期処理用タイマ50が行ってもよいが、通常の処理であるので、メイン周期用タイマ70が行うことが好ましい。
FIG. 3B is a timing chart of the next predetermined cycle of FIG. 3A, and shows an example in which execution of data writing processing is impossible. In FIG. 3B, an application process
図3(c)は、図3(b)の次の所定周期のタイミングチャートであり、データ書き込み処理の実行が可能な場合の一例について示した図である。図3(c)において、所定周期の開始と同時に機能1を有するアプリケーション処理Aが実行され、これで所定周期内のアプリケーション処理が完了している。そして、アプリケーション処理Aの終了段階で、メイン周期の所定周期内に十分な時間が残されているので、データ書き込み処理Dが実行される。このとき実行されるデータ書き込み処理Dは、図3(a)で中断されたデータ書き込み処理Dの続きであってよい。これにより、データ書き込み処理Dの書き込みデータ量が大きく、複数バイトのデータが連続し、総てのデータの書き込み処理を行うと、所定周期の時間を越えてしまうような場合であっても、複数の周期の空き時間を利用して時分割処理を行うことにより、通常のアプリケーション処理A、B、Cに影響を与えることなく、データ書き込み処理を実行することができる。
FIG. 3C is a timing chart of the next predetermined cycle of FIG. 3B, and is a diagram illustrating an example in which the data writing process can be performed. In FIG. 3C, the application process A having the
なお、図3(c)におけるデータ書き込み処理の終了も、メイン周期の所定周期内に収まるように、処理周期用タイマ50を周期時間制御手段60が設定して制御してよい。これにより、メイン周期の所定周期は一定に保たれ、所定周期を守りつつ、所定周期よりも長い時間のデータ書き込み処理時間を要する複数バイトのデータを書き込むことができる。
Note that the end of the data writing process in FIG. 3C may be controlled by setting the
図4は、図3のタイミングチャートに対応させた、本実施例に係る情報処理装置100のより詳細な1周期分の処理フロー図の一例を示している。なお、図2で示した処理フロー図と同様の処理については、同一のステップ番号を付し、その説明を省略又は簡略化する。
FIG. 4 shows an example of a more detailed processing flow diagram for one cycle of the
ステップ100では、周期処理用タイマ50及びメイン周期用タイマ70の双方が、カウントをスタートさせる。これは、図2と同様のステップである。
In
ステップ111では、機能1を有するアプリケーション処理Aが実行される。
In step 111, application process
ステップ112では、機能2を有するアプリケーション処理Bが実行される。なお、図3(c)の場合には、アプリケーション処理Bは周期内に存在しないので、そのままステップ112を通過する。 In step 112, application process B having function 2 is executed. In the case of FIG. 3C, since the application process B does not exist within the cycle, the process passes through step 112 as it is.
ステップ113では、機能3を有するアプリケーション処理Cが実行される。なお、図3(a)、(c)の場合には、アプリケーション処理Cは周期内に存在しないので、そのままステップ113を通過する。
In
ステップ120では、書き込み判定手段30により、データ書き込み処理Dが可能か否かの判定が開始される。このステップは、図2と同様のステップであるので、その説明を省略する。
In step 120, the
ステップ130では、書き込み判定手段30により、データ書き込み判定処理Dが可能か否かの判定結果がCPU10に出力される。本ステップも、図2と同様のステップであるので、その説明を省略する。図3(b)に示すように、データ書き込み処理Dが不可能と判定された場合には、周期内の処理を終了し、処理フローを終了する。一方、図3(a)、(c)に示すように、データ書き込み処理Dが可能と判定された場合には、ステップ131に進む。
In
ステップ131では、周期時間制御手段60により、周期処理用タイマ50のカウント値が設定される。その際、データ書き込み処理を中断するのに適切であり、かつメイン周期の所定周期内に収まるように周期処理用タイマ50のカウント値を設定する。具体的には、メイン周期用タイマ70の周期全体のカウント値よりは小さく、かつデータ書き込み処理のタイミングのよい切れ目となるように、周期処理用タイマ50のカウント値を設定するようにしてよい。
In
ステップ140では、CPU10の指示に従い、データ書き込み手段40により、不揮発性メモリ20へのデータ書き込み処理が実行される。本ステップは、図2と同様であるので、その説明を省略する。
In
ステップ150では、周期処理用タイマ50により、CPU10にタイマ割り込み処理が実行される。本ステップは、図2と同様であるので、その説明を省略する。
In
ステップ160では、CPU10の指示に従い、データ書き込み手段40がデータ書き込み処理を中断する。これにて、1周期におけるデータ書き込み処理が終了するとともに、当該1周期における処理自体も終了する。
In
次の周期において、図4に示す処理フローを繰り返し実行してゆくが、図4の処理フローにより、図3(a)、(b)、(c)の総ての場合において対応する処理を行うことができ、また図3に示されない他の処理パターンについても、対応する処理を実行することができる。そして、これにより、例えば、所定周期が5〔ms〕である場合に、書き込みに5〔ms〕以上必要とする連続する複数バイトのデータを書き込む必要がある場合でも、書き込み判定手段30によりデータ書き込み処理可否判定を行い、メインのアプリケーション処理実行後の所定周期内での空き時間を確認し、時分割処理を行うことにより、データ書き込み処理を実行することができる。 In the next cycle, the processing flow shown in FIG. 4 is repeatedly executed, but the corresponding processing is performed in all cases of FIGS. 3A, 3B, and 3C according to the processing flow of FIG. Also, corresponding processing can be executed for other processing patterns not shown in FIG. Thus, for example, when the predetermined cycle is 5 [ms], even if it is necessary to write a plurality of continuous bytes of data required for writing at least 5 [ms], the data is written by the write determination means 30. Data write processing can be executed by determining whether processing is possible, checking the free time within a predetermined period after execution of the main application processing, and performing time-sharing processing.
図5は、本発明を適用した実施例2に係る情報処理装置100aの全体構成の一例を示した図である。図5において、実施例2に係る情報処理装置100aは、CPU10aと、不揮発性メモリ20と、書き込み判定手段30と、周期処理用タイマ50と、周期時間制御手段60と、メイン周期用タイマ70と、RAM80と、入出力ポート90とを備える点で、実施例1の図1に係る情報処理装置100と同様である。
FIG. 5 is a diagram illustrating an example of the overall configuration of the
図5において、データ書き込み手段40aが、CPU10aに組み込まれ、CPU10aが不揮発性メモリ20のデータ書き込み処理を直接行うように構成されている点で、実施例1に係る情報処理装置100と異なっている。
In FIG. 5, the data writing means 40a is incorporated in the CPU 10a, and is different from the
このように、不揮発性メモリ20へのデータ書き込み処理は、CPU10aが直接行うようにしてもよい。これにより、必要な部品点数を減少させることができる。また、図5において、書き込み判定手段30、周期処理用タイマ50、周期時間制御手段60及びメイン周期用タイマ70をCPU10aの外付けとして示しているが、用途や必要に応じて、CPU10a内部に組み込んで、処理を行うようにしてもよい。
As described above, the data writing process to the
このように、実施例2に係る情報処理装置100aは、種々の演算処理機能については、同様の機能を有していれば、CPU10a内部に組み込んで構成してもよい。これにより、コンパクトで省スペースの情報処理装置100aとして構成することができる。
As described above, the
なお、他の構成要素については、実施例1と同様の内容であるので、同一の参照符号を付して、その説明を省略する。また、図2乃至図3において説明した処理フロー及びタイミングチャートについても、実施例2にそのまま適用することができる。 Since the other components are the same as those in the first embodiment, the same reference numerals are given and the description thereof is omitted. Also, the processing flow and timing chart described in FIGS. 2 to 3 can be applied to the second embodiment as they are.
以上、本発明の好ましい実施例について詳説したが、本発明は、上述した実施例に制限されることはなく、本発明の範囲を逸脱することなく、上述した実施例に種々の変形及び置換を加えることができる。 The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the present invention. Can be added.
10、10a CPU
20 不揮発性メモリ
30 書き込み判定手段
40、40a データ書き込み手段
50 周期処理用タイマ
60 周期時間制御手段
70 メイン周期用タイマ
80 RAM
90 入出力ポート
100、100a 情報処理装置
10, 10a CPU
20
90 Input /
Claims (5)
データ書き込み処理を行うと、前記CPUのリソースを占有して前記アプリケーション処理を停止させてしまう不揮発性メモリと、
前記アプリケーション処理の実行後に、前記所定周期内の残りの時間で前記データ書き込み処理が可能か否かを判定する書き込み判定手段と、
該書き込み判定手段により、前記データ書き込み処理が可能と判定されたときには、前記データ書き込み処理を実行するデータ書き込み手段と、を有することを特徴とする情報処理装置。 A CPU that executes application processing in a predetermined cycle;
When performing the data write process, a nonvolatile memory that occupies the CPU resources and stops the application process;
Write determination means for determining whether or not the data write processing is possible in the remaining time within the predetermined period after execution of the application processing;
An information processing apparatus comprising: a data writing unit that executes the data writing process when the writing determination unit determines that the data writing process is possible.
該周期処理用タイマが前記割り込み処理を行うタイミングが、前記所定周期内となるように前記周期処理用タイマを制御する周期時間制御手段と、を有することを特徴とする請求項1に記載の情報処理装置。 A periodic processing timer for performing interrupt processing to interrupt the data writing processing;
2. The information according to claim 1, further comprising: a cycle time control unit that controls the cycle processing timer so that a timing at which the cycle processing timer performs the interrupt processing is within the predetermined cycle. Processing equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008074444A JP2009230425A (en) | 2008-03-21 | 2008-03-21 | Information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008074444A JP2009230425A (en) | 2008-03-21 | 2008-03-21 | Information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009230425A true JP2009230425A (en) | 2009-10-08 |
Family
ID=41245736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008074444A Pending JP2009230425A (en) | 2008-03-21 | 2008-03-21 | Information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009230425A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013114627A (en) * | 2011-11-30 | 2013-06-10 | Fujitsu Ltd | Server device, movement control program and movement control method |
JP2014041480A (en) * | 2012-08-22 | 2014-03-06 | Oki Electric Ind Co Ltd | Data processor and program |
JP2022522437A (en) * | 2019-04-30 | 2022-04-19 | 長江存儲科技有限責任公司 | Controllers, equipment and methods |
-
2008
- 2008-03-21 JP JP2008074444A patent/JP2009230425A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013114627A (en) * | 2011-11-30 | 2013-06-10 | Fujitsu Ltd | Server device, movement control program and movement control method |
JP2014041480A (en) * | 2012-08-22 | 2014-03-06 | Oki Electric Ind Co Ltd | Data processor and program |
JP2022522437A (en) * | 2019-04-30 | 2022-04-19 | 長江存儲科技有限責任公司 | Controllers, equipment and methods |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4770602B2 (en) | Electronics | |
JP4770664B2 (en) | Microprocessor and microcomputer using the same | |
JP2006276967A (en) | Semiconductor apparatus | |
US20080016415A1 (en) | Evaluation system and method | |
JP2005071303A (en) | Program starting device | |
JP2009230425A (en) | Information processor | |
US8065449B2 (en) | DMA device having plural buffers storing transfer request information and DMA transfer method | |
US6981109B2 (en) | Digital signal processor system having programmable random access memory that executes processing during downloading of a program | |
JP2001075941A (en) | Microcomputer with built-in flash memory and operating method therefor | |
US6948086B2 (en) | Computer system | |
JP2011150532A (en) | Information processing apparatus | |
CN106980513A (en) | A kind of switching method and device of dual boot file | |
JP4522799B2 (en) | Semiconductor circuit device and runaway detection method | |
JP5982845B2 (en) | Trace control apparatus and trace control method | |
JP2008225922A (en) | Nonvolatile storage device | |
JP6596455B2 (en) | Electronic control unit for automobile | |
KR101779118B1 (en) | Method for managing stack of memory | |
JP2005100017A (en) | Processor simulator, interruption delay count program and simulation method of processor | |
JP6762411B2 (en) | Electronic control unit for automobiles | |
JP2005078489A (en) | Microcontroller and its control method | |
JP5073434B2 (en) | Microcomputer device | |
JP4343244B2 (en) | Microcomputer | |
JP2005242929A (en) | Accessing method for shared memory and data processor | |
JP2009093270A (en) | Computer system and startup method therefor | |
JP2006155303A (en) | Controller |