JP2017059009A - Control device - Google Patents

Control device Download PDF

Info

Publication number
JP2017059009A
JP2017059009A JP2015183826A JP2015183826A JP2017059009A JP 2017059009 A JP2017059009 A JP 2017059009A JP 2015183826 A JP2015183826 A JP 2015183826A JP 2015183826 A JP2015183826 A JP 2015183826A JP 2017059009 A JP2017059009 A JP 2017059009A
Authority
JP
Japan
Prior art keywords
volatile memory
control means
stored
cycle
operation control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015183826A
Other languages
Japanese (ja)
Inventor
伊藤 和幸
Kazuyuki Ito
和幸 伊藤
井口 浩和
Hirokazu Iguchi
浩和 井口
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2015183826A priority Critical patent/JP2017059009A/en
Publication of JP2017059009A publication Critical patent/JP2017059009A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a control device capable of obtaining expected performance in a fixed cycle application which operates in a predetermined cycle without deteriorating reading performance even when there is no read data on a cache.SOLUTION: A control device comprises: a volatile memory 60 which stores a holding variable; a nonvolatile memory 20 which copies and stores the holding variable stored in the volatile memory; volatile memory data update control means 50 for performing control to initialize the holding variable stored in the volatile memory when a power supply is turned on; fixed cycle operation control means 10 for controlling the operation of the whole device in a predetermined cycle and reading the holding variable from the volatile memory or writing it into the volatile memory in the predetermined cycle; and nonvolatile memory data update control means l70 for performing control to copy and store the holding variable lastly updated and stored in the volatile memory by the fixed cycle operation control means, in the nonvolatile memory.SELECTED DRAWING: Figure 1

Description

本発明は、制御装置に関し、詳しくは、保持データに対するアクセスの高速化に関するものである。   The present invention relates to a control device, and more particularly to speeding up access to retained data.

一般に、制御システムで用いられる制御装置では、所定の周期で動作する定周期アプリケーションを動作させることが多い。   In general, a control device used in a control system often operates a fixed-cycle application that operates at a predetermined cycle.

図6は、従来から制御システムで用いられている制御装置の一例を示す構成ブロック図である。図6において、定周期動作制御部10は所定の駆動周期(たとえば100ms)で装置全体の動作を制御する。不揮発性メモリ20は保持変数格納部として機能するもので、定周期動作制御部10の所定の駆動周期に基づき、保持変数の書き込み/読み出しが行われる。   FIG. 6 is a configuration block diagram showing an example of a control device conventionally used in a control system. In FIG. 6, a fixed cycle operation control unit 10 controls the operation of the entire apparatus at a predetermined drive cycle (for example, 100 ms). The nonvolatile memory 20 functions as a holding variable storage unit, and writing / reading of holding variables is performed based on a predetermined driving cycle of the fixed cycle operation control unit 10.

ここで、不揮発性メモリ20のアクセス速度に注目すると、揮発性メモリよりも低速である。この揮発性メモリよりも低速な不揮発性メモリ20のアクセス速度は、定周期動作制御部10の駆動周期を決定する際のボトルネックとなる。   Here, paying attention to the access speed of the nonvolatile memory 20, it is slower than the volatile memory. The access speed of the non-volatile memory 20 slower than the volatile memory becomes a bottleneck when determining the drive period of the fixed-cycle operation control unit 10.

このようなボトルネックを解消するために、図7に示すように、定周期動作制御部10と不揮発性メモリ20との間に不揮発性のキャッシュメモリ30を設けることも行われている。   In order to eliminate such a bottleneck, a non-volatile cache memory 30 is also provided between the fixed-cycle operation control unit 10 and the non-volatile memory 20 as shown in FIG.

定周期動作制御部10と不揮発性メモリ20との間に不揮発性のキャッシュメモリ30を設けることにより、不揮発性メモリ20のアクセス速度の高速化が実現できる。   By providing the non-volatile cache memory 30 between the fixed cycle operation control unit 10 and the non-volatile memory 20, the access speed of the non-volatile memory 20 can be increased.

ところが、不揮発性のキャッシュメモリ30を用いると、時折、キャッシュミスヒットが発生することがあり、キャッシュミスヒットが発生するとデータ処理機能が低下することになる。   However, when the non-volatile cache memory 30 is used, a cache miss hit may occasionally occur. When a cache miss hit occurs, the data processing function deteriorates.

また、定周期動作制御部10としては確実な所定の駆動周期に基づく動作が求められることから、キャッシュミスヒットの発生に伴うデータ処理機能の低下を前提として、定周期動作制御部10の所定の駆動周期を設定しなければならない。   In addition, since the fixed cycle operation control unit 10 is required to operate based on a certain predetermined drive cycle, the fixed cycle operation control unit 10 has a predetermined operation on the premise that the data processing function is reduced due to the occurrence of a cache miss. The driving cycle must be set.

この結果、不揮発性メモリ20のアクセス速度を高速化するためにキャッシュメモリ30を用いているのにも拘わらず、キャッシュメモリ30を用いることにより本来なら得られるはずの不揮発性メモリ20のアクセス速度の高速化の効果が十分には得られないという課題もある。   As a result, although the cache memory 30 is used to increase the access speed of the nonvolatile memory 20, the access speed of the nonvolatile memory 20 that should be originally obtained by using the cache memory 30 is reduced. There is also a problem that the speed-up effect cannot be obtained sufficiently.

特許文献1には、使用率や出現頻度には関係なく制御プログラムの特定処理を優先して高速に動かせるようにする技術が記載されている。   Japanese Patent Application Laid-Open No. 2004-151561 describes a technique that allows a specific process of a control program to be moved at high speed regardless of the usage rate and appearance frequency.

特許文献2には、キャッシュメモリにユーザーアプリケーションをロードしてロックすることにより、安定した制御周期の制御を実現する技術が記載されている。   Patent Document 2 describes a technique for realizing stable control cycle control by loading and locking a user application in a cache memory.

非特許文献1には、キャッシュメモリへのデータの書き込みに関連する問題点と解決策について記載されている。   Non-Patent Document 1 describes problems and solutions related to writing data to the cache memory.

特開2013−73344号公報JP 2013-73344 A 特開2011−253267号公報JP 2011-253267 A

マイナビニュース[コラム]「コンピュータアーキテクチャの話 142 ライトスルーとライトバック」Hisa Ando [2008/12/15][平成27年8月21日検索]インターネット<URL:http://news.mynavi.jp/column/architecture/142/>Mynavi News [Column] “Computer Architecture Story 142 Write-Through and Write-Back” Hisa Ando [December 15, 2008] [Search August 21, 2015] Internet <URL: http://news.mynavi.jp / column / architecture / 142 / >

非特許文献1にも記載されているように、キャッシュにデータを書き込むのにあたり、書き込んだアドレスでは、キャッシュライン上のデータとメインメモリ上にあるデータが異なることになり、この状態を放置しておくと、どちらのデータが正しいのか分からなくなってしまう。   As described in Non-Patent Document 1, when data is written to the cache, the data on the cache line is different from the data on the main memory at the written address. Otherwise, you will not know which data is correct.

この問題の解決法として、キャッシュへの書き込みと同時にメインメモリへも同じデータを書き込むライトスルー方式がある。   As a solution to this problem, there is a write-through method in which the same data is written to the main memory simultaneously with writing to the cache.

ライトスルー方式は、キャッシュへの書き込みにあたり、メインメモリにも同時に書き込み要求を出すように制御すればよく、制御は比較的簡単に行える。   In the write-through method, when writing to the cache, it is only necessary to control so that a write request is simultaneously issued to the main memory, and the control can be performed relatively easily.

また、ライトスルー方式では、ストア命令が実行されるたびにメインメモリへの書き込みが発生するので、性能はメインメモリへの書き込み時間で制約されることになる。   In the write-through method, since writing to the main memory occurs every time a store instruction is executed, the performance is limited by the writing time to the main memory.

この制御が簡単という利点を活かして1次データキャッシュにはライトスルー方式を用い、2次キャッシュには以下に説明するライトバック方式を用いるプロセサも多い。   Taking advantage of this simple control, many processors use the write-through method for the primary data cache and the write-back method described below for the secondary cache.

ライトバック方式は、メインメモリや2次キャッシュなどの下位のキャッシュへの書き込み頻度を減らす方法の一つであり、書き込みはキャッシュラインだけに対して行い、追い出しが必要になった時点で、キャッシュラインの内容をメインメモリに対して書き戻す。ライトバック方式の場合、書き込み時点ではその内容はメインメモリには反映されない。   The write-back method is one of the methods for reducing the frequency of writing to the lower level cache such as the main memory and the secondary cache. The writing is performed only on the cache line, and when the eviction becomes necessary, the cache line Is written back to the main memory. In the case of the write back method, the contents are not reflected in the main memory at the time of writing.

ライトバック方式において追い出しが発生するまでのキャッシュラインへの書き込みに着目すると、まとめて1回の書き込みでメインメモリに反映される。ライトスルー方式と比較すると、メインメモリへの書き込み回数が減少することからメインメモリの書き込み性能が制約にはならず、性能を向上させやすい。   Focusing on the writing to the cache line until the eviction occurs in the write-back method, it is reflected in the main memory in a single write. Compared with the write-through method, the number of times of writing to the main memory is reduced, so that the writing performance of the main memory is not limited and the performance is easily improved.

しかし、これらライトスルー方式やライトバック方式では、読み出しデータが必ずしもキャッシュ上にあるとは限らない。読み出しデータがキャッシュにないと読み出し性能が低下してしまい、所定の周期で動作する定周期アプリケーションにおける一定の性能を保証することは困難になる。   However, in these write-through method and write-back method, read data is not always on the cache. If the read data is not in the cache, the read performance deteriorates, and it is difficult to guarantee a constant performance in a fixed cycle application that operates at a predetermined cycle.

本発明は、このような課題を解決するものであり、その目的は、キャッシュ上に読み出しデータがなくても読み出し性能が低下することはなく、所定の周期で動作する定周期アプリケーションにおいて所期の性能が得られる制御装置を実現することにある。   The present invention solves such a problem, and its purpose is not to deteriorate the read performance even if there is no read data on the cache, and is intended for a fixed-cycle application that operates at a predetermined cycle. The purpose is to realize a control device capable of obtaining performance.

このような課題を達成するために、本発明のうち請求項1記載の発明は、
保持変数を格納する揮発性メモリと、
前記揮発性メモリに格納された保持変数をコピーして格納する不揮発性メモリと、
電源投入時に前記揮発性メモリに格納されている保持変数を初期化するように制御する揮発性メモリデータ更新制御手段と、
所定の周期で装置全体が動作するように制御するとともに、所定の周期で前記揮発性メモリに前記保持変数の読み出し/書き込みを行う定周期動作制御手段と、
前記定周期動作制御手段により前記揮発性メモリに最後に更新格納された保持変数を前記不揮発性メモリにコピーして格納するように制御する不揮発性メモリデータ更新制御手段、
とで構成されていることを特徴とする制御装置である。
In order to achieve such a problem, the invention according to claim 1 of the present invention is:
Volatile memory for storing retention variables;
A non-volatile memory for copying and storing a holding variable stored in the volatile memory;
Volatile memory data update control means for controlling to initialize a holding variable stored in the volatile memory when the power is turned on;
A periodic operation control means for controlling the entire apparatus to operate at a predetermined cycle, and reading / writing the retained variable to / from the volatile memory at a predetermined cycle;
Non-volatile memory data update control means for controlling to copy and store the storage variable last updated and stored in the volatile memory by the fixed cycle operation control means;
It is comprised by these.

請求項2記載の発明は、請求項1に記載の制御装置において、
前記定周期動作制御手段は、前記不揮発性メモリデータ更新制御手段の機能を含むことを特徴とする。
The invention according to claim 2 is the control apparatus according to claim 1,
The fixed cycle operation control means includes a function of the nonvolatile memory data update control means.

請求項3記載の発明は、
保持変数を格納する揮発性メモリと、
前記揮発性メモリに格納された保持変数をコピーして格納する不揮発性メモリと、
電源投入時に前記揮発性メモリに格納されている保持変数を初期化するように制御する揮発性メモリデータ更新制御手段と、
所定の周期で装置全体が動作するように制御するとともに、所定の周期で前記揮発性メモリに前記保持変数の読み出し/書き込みを行う定周期動作制御手段と、
前記定周期動作制御手段により前記揮発性メモリに最後に更新格納された保持変数を前記不揮発性メモリにコピーして格納するように制御する不揮発性メモリデータ更新制御手段と、
前記定周期動作制御手段により前記揮発性メモリに逐次書き込み記憶される保持変数を監視し、定周期処理の最後に更新された保持変数を前記不揮発性メモリに出力する揮発性メモリデータ監視手段、
とで構成されていることを特徴とする制御装置である。
The invention described in claim 3
Volatile memory for storing retention variables;
A non-volatile memory for copying and storing a holding variable stored in the volatile memory;
Volatile memory data update control means for controlling to initialize a holding variable stored in the volatile memory when the power is turned on;
A periodic operation control means for controlling the entire apparatus to operate at a predetermined cycle, and reading / writing the retained variable to / from the volatile memory at a predetermined cycle;
Non-volatile memory data update control means for controlling to store the storage variable last updated and stored in the volatile memory by the fixed cycle operation control means, and to store it in the non-volatile memory;
Volatile memory data monitoring means for monitoring a holding variable that is sequentially written and stored in the volatile memory by the fixed cycle operation control means, and outputting a holding variable updated at the end of the fixed cycle processing to the nonvolatile memory,
It is comprised by these.

請求項4記載の発明は、請求項3に記載の制御装置において、
前記定周期動作制御手段は、前記不揮発性メモリデータ更新制御手段の機能を含むことを特徴とする。
According to a fourth aspect of the present invention, in the control device according to the third aspect,
The fixed cycle operation control means includes a function of the nonvolatile memory data update control means.

請求項5記載の発明は、請求項1から請求項4のいずれかに記載の制御装置において、
前記定周期動作制御手段は、所定の周期で動作する定周期アプリケーションを動作させることを特徴とする。
A fifth aspect of the present invention provides the control device according to any one of the first to fourth aspects,
The fixed period operation control means operates a fixed period application that operates at a predetermined period.

このような構成によれば、キャッシュ上に読み出しデータがなくても一定の読み出し性能を得ることができ、書き込み動作は所定の周期でのみ実行するので書き込みの負荷を軽減できる。   According to such a configuration, a constant read performance can be obtained even when there is no read data on the cache, and the write operation is executed only at a predetermined cycle, so that the write load can be reduced.

そして、読み出し性能に対して書き込み性能が劣る装置であっても、高速な読み出し処理と必要最低限の書き込み処理を可能にすることにより、所定の周期で動作する定周期アプリケーションにおいて所期の性能が得られる制御装置を実現できる。   And even if the device is inferior to the read performance, the expected performance can be achieved in a fixed-cycle application that operates at a predetermined cycle by enabling high-speed read processing and the minimum necessary write processing. The resulting control device can be realized.

本発明に基づく制御装置の具体例を示す構成ブロック図である。It is a block diagram showing a specific example of a control device based on the present invention. 図1の動作の流れを説明するフローチャートである。It is a flowchart explaining the flow of operation | movement of FIG. 図2のフローチャートにおけるデータ更新チェックの動作説明図である。FIG. 3 is an operation explanatory diagram of a data update check in the flowchart of FIG. 2. 本発明の他の実施例を示す構成ブロック図である。It is a block diagram which shows the other Example of this invention. 図4の動作の流れを説明するフローチャートである。5 is a flowchart for explaining the flow of operations in FIG. 4. 従来から制御システムで用いられている制御装置の一例を示す構成ブロック図である。It is a block diagram which shows an example of the control apparatus conventionally used with the control system. 従来から制御システムで用いられている制御装置の他の例を示す構成ブロック図である。It is a block diagram which shows the other example of the control apparatus conventionally used with the control system.

以下、本発明の実施の形態について、図面を用いて詳細に説明する。図1は本発明に基づく制御装置の具体例を示す構成ブロック図であり、図6および図7と共通する部分には同一の符号を付けている。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a specific example of a control device according to the present invention. Components common to those in FIGS. 6 and 7 are given the same reference numerals.

図1において、電源部40は、制御装置の各部に所定の駆動電源を供給する。   In FIG. 1, a power supply unit 40 supplies predetermined drive power to each unit of the control device.

データ初期部50は、電源部40に電源が投入されたことを検出すると、揮発性メモリ60に記憶されているデータを初期化する。   When the data initial unit 50 detects that the power unit 40 is turned on, the data initial unit 50 initializes the data stored in the volatile memory 60.

揮発性メモリ60は、たとえばDRAMで構成されたものであり、データ初期部50によりデータが初期化された後は定周期動作制御部10に基づいて制御され、所定の駆動周期(たとえば100ms)で不揮発性メモリ20に対して読み出し/書き込みされる保持変数を一時的に保持する。   The volatile memory 60 is constituted by, for example, a DRAM, and is controlled based on the fixed-cycle operation control unit 10 after the data is initialized by the data initial unit 50, and in a predetermined drive cycle (for example, 100 ms). A holding variable to be read / written from / to the nonvolatile memory 20 is temporarily held.

不揮発性メモリデータ更新制御部70は、定周期動作制御部10により逐次更新されて揮発性メモリ60に格納される保持変数の変化/差分を監視し、最後に更新されて揮発性メモリ60に記憶された保持変数を確認すると、その保持変数を不揮発性メモリ20に書き込み更新する。   The non-volatile memory data update control unit 70 monitors changes / differences of holding variables that are sequentially updated by the periodic operation control unit 10 and stored in the volatile memory 60, and is updated and stored in the volatile memory 60 at the end. When the stored variable is confirmed, the stored variable is written and updated in the nonvolatile memory 20.

図2は、図1のように構成される制御装置の動作の流れを説明するフローチャートである。図2において、電源部40に電源が投入されと(ステップS1)、データ初期部50により、揮発性メモリ60に記憶されているデータは初期化される(ステップS2)。   FIG. 2 is a flowchart for explaining the flow of operation of the control device configured as shown in FIG. In FIG. 2, when the power source 40 is turned on (step S1), the data stored in the volatile memory 60 is initialized by the data initial unit 50 (step S2).

電源投入後は、前述のように定周期動作制御部10に基づき所定の周期で動作するように制御され(ステップS3)、揮発性メモリ60には定周期動作制御部10の所定周期の動作に基づくデータが逐次更新格納される(ステップS4)。   After the power is turned on, it is controlled to operate at a predetermined cycle based on the fixed cycle operation control unit 10 as described above (step S3), and the volatile memory 60 is operated in a predetermined cycle by the fixed cycle operation control unit 10. The base data is sequentially updated and stored (step S4).

不揮発性メモリデータ更新制御部70は、定周期動作制御部10から揮発性メモリ60を介して不揮発性メモリ20に転送される保持変数を監視する。定周期動作制御部10から出力されるデータが前の周期から更新された保持変数であることを確認すると、その更新された保持変数を不揮発性メモリ20に出力して(ステップS5)、不揮発性メモリ20のデータを更新し(ステップS6)、不揮発性メモリ20のデータを更新した後はステップS3以降の監視動作を繰り返して実行する。ステップS5で前の周期から更新されたデータが存在しないことを確認すると、ステップS3以降の監視動作を繰り返して実行する。   The nonvolatile memory data update control unit 70 monitors a holding variable transferred from the fixed cycle operation control unit 10 to the nonvolatile memory 20 via the volatile memory 60. When it is confirmed that the data output from the fixed cycle operation control unit 10 is a holding variable updated from the previous cycle, the updated holding variable is output to the nonvolatile memory 20 (step S5). After the data in the memory 20 is updated (step S6) and the data in the nonvolatile memory 20 is updated, the monitoring operation after step S3 is repeatedly executed. When it is confirmed in step S5 that there is no data updated from the previous cycle, the monitoring operation after step S3 is repeatedly executed.

図3は、図2のステップS5における「前の周期から更新されたデータは存在するか?」のデータ更新チェックの動作説明図である。(a)は前の周期で所定の処理を実行した後にテーブル1に格納される保持変数V1〜V9を示し、(b)は今回の周期で所定の処理を実行した後にテーブル2に格納される保持変数V1〜V9を示している。   FIG. 3 is an operation explanatory diagram of the data update check of “Is there data updated from the previous cycle?” In step S5 of FIG. (A) shows the holding variables V1 to V9 stored in the table 1 after executing the predetermined process in the previous cycle, and (b) is stored in the table 2 after executing the predetermined process in the current cycle. The holding variables V1 to V9 are shown.

不揮発性メモリデータ更新制御部70は、定周期動作制御部10により今回の周期で所定の処理が実行された後にテーブル1とテーブル2を比較して、更新された保持変数を抽出する。図3の例では、V1とV6とV9を更新された保持変数として抽出する。   The nonvolatile memory data update control unit 70 compares the table 1 and the table 2 after the predetermined processing is executed by the fixed cycle operation control unit 10 in the current cycle, and extracts the updated holding variable. In the example of FIG. 3, V1, V6, and V9 are extracted as updated holding variables.

そして、不揮発性メモリデータ更新制御部70は、これらの抽出結果に基づいて、不揮発性メモリ20に格納されている保持変数V1とV6とV9の値を、それぞれV1’とV6’とV9’に更新する。   Based on these extraction results, the nonvolatile memory data update control unit 70 sets the values of the holding variables V1, V6, and V9 stored in the nonvolatile memory 20 to V1 ′, V6 ′, and V9 ′, respectively. Update.

図1および図2の説明から明らかなように、図1の構成によれば、保持変数へのアクセスは揮発性メモリ60に対して実行されるので、読み出し性能を一定にでき、不揮発データの保存におけるアクセス処理の高速化が実現できる。   As is apparent from the description of FIG. 1 and FIG. 2, according to the configuration of FIG. 1, the access to the holding variable is executed with respect to the volatile memory 60, so that the read performance can be made constant and nonvolatile data can be stored. Speeding up of access processing can be realized.

そして、全ての保持変数が揮発性メモリ60上に格納保持されるため、従来のようなキャッシュミスヒットが発生してデータ処理機能が低下することはなく、所定の周期で動作する定周期アプリケーションを実行処理するのにあたり、安定した状態で所期の性能を得ることができる。   And since all the holding variables are stored and held in the volatile memory 60, there is no occurrence of a cache miss hit as in the prior art, and the data processing function does not deteriorate. In executing the processing, the desired performance can be obtained in a stable state.

また、書き込み動作は所定の駆動周期でしか行われないため、書き込みの負荷を軽減できる。   Further, since the write operation is performed only in a predetermined drive cycle, the write load can be reduced.

また、読み出し性能に比べて書き込み性能が極端に劣るデバイスの場合には、高速な読み出し処理と必要最低限の書き込み処理を行うことにより、読み出し動作と書き込み動作を組み合わせた全体の性能の最大化を図ることができる。   For devices with extremely poor write performance compared to read performance, high-speed read processing and minimum write processing are performed to maximize overall performance by combining read and write operations. Can be planned.

なお、本発明で対象とする保持変数は制御装置で制御対象とする制御データに限るものではなく、たとえば制御装置の動作状態を記録するログ情報などであってもよい。   Note that the holding variable targeted in the present invention is not limited to the control data targeted for control by the control device, and may be, for example, log information for recording the operating state of the control device.

図4は本発明の他の実施例を示す構成ブロック図であり、図1と共通する部分には同一の符号を付けている。図1と図4の相違点は、図4には揮発性メモリ60と不揮発性メモリ20の間に揮発性メモリデータ監視部80が設けられていることと、不揮発性メモリデータ更新制御部70に代えて不揮発性メモリ制御部90が設けられていることである。   FIG. 4 is a block diagram showing the configuration of another embodiment of the present invention. Components common to those in FIG. 4 differs from FIG. 4 in that a volatile memory data monitoring unit 80 is provided between the volatile memory 60 and the nonvolatile memory 20 in FIG. Instead, a nonvolatile memory control unit 90 is provided.

揮発性メモリデータ監視部80には、定周期動作制御部10から揮発性メモリ60に逐次書き込み記憶される保持変数が入力されるとともに、揮発性メモリ60から不揮発性メモリ20に転送される保持変数も入力されている。   The volatile memory data monitoring unit 80 receives a holding variable that is sequentially written and stored in the volatile memory 60 from the fixed cycle operation control unit 10 and is also transferred from the volatile memory 60 to the nonvolatile memory 20. Is also entered.

揮発性メモリデータ監視部80は、図1の不揮発性メモリデータ更新制御部70が有する機能のうち、揮発性メモリ60に格納される保持変数の変化を監視する機能を分離して機能ブロックとして独立させたものである。   The volatile memory data monitoring unit 80 separates the function of monitoring the change of the holding variable stored in the volatile memory 60 from the functions of the nonvolatile memory data update control unit 70 of FIG. It has been made.

揮発性メモリデータ監視部80は、定周期動作制御部10から最後に更新されて揮発性メモリ60に記憶された保持変数であることを確認すると、その確認結果を定周期動作制御部10に通知するとともに、揮発性メモリ60に記憶された保持変数を不揮発性メモリ20に出力する。   When the volatile memory data monitoring unit 80 confirms that the holding variable has been last updated from the fixed cycle operation control unit 10 and stored in the volatile memory 60, the check result is notified to the fixed cycle operation control unit 10. At the same time, the holding variable stored in the volatile memory 60 is output to the nonvolatile memory 20.

不揮発性メモリ制御部90は、図1の不揮発性メモリデータ更新制御部70から揮発性メモリ60に格納される保持変数の変化を監視する機能が分離除去されたものであり、揮発性メモリデータ監視部80を介して揮発性メモリ60から不揮発性メモリ20に出力された保持変数を、定周期動作制御部10の制御に基づいて不揮発性メモリ20に書き込み更新する。   The non-volatile memory control unit 90 is obtained by separating and removing the function of monitoring changes in the holding variables stored in the volatile memory 60 from the non-volatile memory data update control unit 70 of FIG. The holding variable output from the volatile memory 60 to the nonvolatile memory 20 via the unit 80 is written and updated in the nonvolatile memory 20 based on the control of the fixed cycle operation control unit 10.

図5は、図4のように構成される制御装置の動作の流れを説明するフローチャートである。図4において、電源部40に電源が投入されと(ステップS1)、データ初期部50により、揮発性メモリ60に記憶されているデータは初期化される(ステップS2)。   FIG. 5 is a flowchart for explaining the flow of operation of the control device configured as shown in FIG. In FIG. 4, when the power supply unit 40 is turned on (step S1), the data stored in the volatile memory 60 is initialized by the data initial unit 50 (step S2).

電源投入後は、定周期動作制御部10に基づいて動作するように制御され(ステップS3)、揮発性メモリ60には定周期動作制御部10の動作に基づくデータが逐次更新格納される(ステップS4)。   After the power is turned on, the operation is controlled based on the fixed cycle operation control unit 10 (step S3), and data based on the operation of the fixed cycle operation control unit 10 is sequentially updated and stored in the volatile memory 60 (step S3). S4).

揮発性メモリデータ監視部80は、定周期動作制御部10により逐次更新されて揮発性メモリ60に格納される保持変数の変化/差分を監視する。   The volatile memory data monitoring unit 80 monitors a change / difference of a holding variable that is sequentially updated by the fixed cycle operation control unit 10 and stored in the volatile memory 60.

そして、定周期動作制御部10から出力されるデータが前の周期から更新されて揮発性メモリ60に記憶された保持変数であることを確認すると(ステップS5)、その差分データを抽出して(ステップS6)、不揮発性メモリ制御部90に出力する(ステップS7)。   When it is confirmed that the data output from the fixed cycle operation control unit 10 is a holding variable updated from the previous cycle and stored in the volatile memory 60 (step S5), the difference data is extracted ( Step S6) and output to the non-volatile memory controller 90 (Step S7).

不揮発性メモリ制御部90は、揮発性メモリデータ監視部80を介して揮発性メモリ60から不揮発性メモリ20に出力された保持変数を不揮発性メモリ20に書き込み更新する(ステップS8)。不揮発性メモリ20の書き込み更新後は、ステップS3以降の監視動作を繰り返して実行する。   The nonvolatile memory control unit 90 writes and updates the holding variable output from the volatile memory 60 to the nonvolatile memory 20 via the volatile memory data monitoring unit 80 (step S8). After the writing update of the nonvolatile memory 20, the monitoring operation after step S3 is repeatedly executed.

図4の構成によれば、図1を構成する不揮発性メモリデータ更新制御部70が有する機能を、揮発性メモリ60に格納される保持変数の変化を監視する揮発性メモリデータ監視部80と不揮発性メモリ20を制御する不揮発性メモリ制御部90とに分割して設けているので、これら揮発性メモリデータ監視部80と不揮発性メモリ制御部90の点検や調整などを個別に効率よく行うことができる。   According to the configuration of FIG. 4, the function of the nonvolatile memory data update control unit 70 configuring FIG. 1 includes the volatile memory data monitoring unit 80 that monitors changes in the holding variables stored in the volatile memory 60 and the nonvolatile memory data. Since the nonvolatile memory control unit 90 that controls the volatile memory 20 is provided separately, the inspection and adjustment of the volatile memory data monitoring unit 80 and the nonvolatile memory control unit 90 can be performed individually and efficiently. it can.

以上説明したように、本発明によれば、キャッシュ上に読み出しデータがなくても読み出し性能が低下することはなく、所定の周期で動作する定周期アプリケーションにおいて所期の性能が得られる制御装置を実現することができ、各種の制御システムで用いられる制御装置として好適である。   As described above, according to the present invention, there is provided a control device capable of obtaining desired performance in a fixed-cycle application that operates at a predetermined cycle without causing a decrease in read performance even if there is no read data on the cache. It can be realized and is suitable as a control device used in various control systems.

10 定周期動作制御部
20 不揮発性メモリ
40 電源部
50 データ初期部
60 揮発性メモリ
70 不揮発性メモリデータ更新制御部
80 揮発性メモリデータ監視部
90 不揮発性メモリ制御部
DESCRIPTION OF SYMBOLS 10 Fixed-cycle operation control part 20 Non-volatile memory 40 Power supply part 50 Data initial part 60 Volatile memory 70 Non-volatile memory data update control part 80 Volatile memory data monitoring part 90 Non-volatile memory control part

Claims (5)

保持変数を格納する揮発性メモリと、
前記揮発性メモリに格納された保持変数をコピーして格納する不揮発性メモリと、
電源投入時に前記揮発性メモリに格納されている保持変数を初期化するように制御する揮発性メモリデータ更新制御手段と、
所定の周期で装置全体が動作するように制御するとともに、所定の周期で前記揮発性メモリに前記保持変数の読み出し/書き込みを行う定周期動作制御手段と、
前記定周期動作制御手段により前記揮発性メモリに最後に更新格納された保持変数を前記不揮発性メモリにコピーして格納するように制御する不揮発性メモリデータ更新制御手段、
とで構成されていることを特徴とする制御装置。
Volatile memory for storing retention variables;
A non-volatile memory for copying and storing a holding variable stored in the volatile memory;
Volatile memory data update control means for controlling to initialize a holding variable stored in the volatile memory when the power is turned on;
A periodic operation control means for controlling the entire apparatus to operate at a predetermined cycle, and reading / writing the retained variable to / from the volatile memory at a predetermined cycle;
Non-volatile memory data update control means for controlling to copy and store the storage variable last updated and stored in the volatile memory by the fixed cycle operation control means;
And a control device characterized by comprising:
前記定周期動作制御手段は、前記不揮発性メモリデータ更新制御手段の機能を含むことを特徴とする請求項1に記載の制御装置。   2. The control apparatus according to claim 1, wherein the fixed cycle operation control means includes a function of the nonvolatile memory data update control means. 保持変数を格納する揮発性メモリと、
前記揮発性メモリに格納された保持変数をコピーして格納する不揮発性メモリと、
電源投入時に前記揮発性メモリに格納されている保持変数を初期化するように制御する揮発性メモリデータ更新制御手段と、
所定の周期で装置全体が動作するように制御するとともに、所定の周期で前記揮発性メモリに前記保持変数の読み出し/書き込みを行う定周期動作制御手段と、
前記定周期動作制御手段により前記揮発性メモリに最後に更新格納された保持変数を前記不揮発性メモリにコピーして格納するように制御する不揮発性メモリデータ更新制御手段と、
前記定周期動作制御手段により前記揮発性メモリに逐次書き込み記憶される保持変数を監視し、定周期処理の最後に更新された保持変数を前記不揮発性メモリに出力する揮発性メモリデータ監視手段、
とで構成されていることを特徴とする制御装置。
Volatile memory for storing retention variables;
A non-volatile memory for copying and storing a holding variable stored in the volatile memory;
Volatile memory data update control means for controlling to initialize a holding variable stored in the volatile memory when the power is turned on;
A periodic operation control means for controlling the entire apparatus to operate at a predetermined cycle, and reading / writing the retained variable to / from the volatile memory at a predetermined cycle;
Non-volatile memory data update control means for controlling to store the storage variable last updated and stored in the volatile memory by the fixed cycle operation control means, and to store it in the non-volatile memory;
Volatile memory data monitoring means for monitoring a holding variable that is sequentially written and stored in the volatile memory by the fixed cycle operation control means, and outputting a holding variable updated at the end of the fixed cycle processing to the nonvolatile memory,
And a control device characterized by comprising:
前記定周期動作制御手段は、前記不揮発性メモリデータ更新制御手段の機能を含むことを特徴とする請求項3に記載の制御装置。   4. The control apparatus according to claim 3, wherein the fixed cycle operation control means includes a function of the nonvolatile memory data update control means. 前記定周期動作制御手段は、所定の周期で動作する定周期アプリケーションを動作させることを特徴とする請求項1から請求項4のいずれかに記載の制御装置。   The control apparatus according to claim 1, wherein the fixed-cycle operation control unit operates a fixed-cycle application that operates at a predetermined cycle.
JP2015183826A 2015-09-17 2015-09-17 Control device Pending JP2017059009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015183826A JP2017059009A (en) 2015-09-17 2015-09-17 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015183826A JP2017059009A (en) 2015-09-17 2015-09-17 Control device

Publications (1)

Publication Number Publication Date
JP2017059009A true JP2017059009A (en) 2017-03-23

Family

ID=58390518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015183826A Pending JP2017059009A (en) 2015-09-17 2015-09-17 Control device

Country Status (1)

Country Link
JP (1) JP2017059009A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902001A (en) * 2019-02-12 2019-06-18 科华恒盛股份有限公司 To the detection method and terminal device of uninitialized variable

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000035922A (en) * 1998-05-14 2000-02-02 Seiko Epson Corp Printer provided with nonvolatile memory and method for controlling write to nonvolatile memory in the printer
JP2004139521A (en) * 2002-10-21 2004-05-13 Denso Corp Electronic control device
JP2010211534A (en) * 2009-03-10 2010-09-24 Toshiba Corp Information processing device
JP2011081641A (en) * 2009-10-08 2011-04-21 Nec Corp Memory controller
JP2013152636A (en) * 2012-01-25 2013-08-08 Toyota Motor Corp Information processing device and task scheduling method
JP2015141575A (en) * 2014-01-29 2015-08-03 京セラドキュメントソリューションズ株式会社 Image formation device and control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000035922A (en) * 1998-05-14 2000-02-02 Seiko Epson Corp Printer provided with nonvolatile memory and method for controlling write to nonvolatile memory in the printer
JP2004139521A (en) * 2002-10-21 2004-05-13 Denso Corp Electronic control device
JP2010211534A (en) * 2009-03-10 2010-09-24 Toshiba Corp Information processing device
JP2011081641A (en) * 2009-10-08 2011-04-21 Nec Corp Memory controller
JP2013152636A (en) * 2012-01-25 2013-08-08 Toyota Motor Corp Information processing device and task scheduling method
JP2015141575A (en) * 2014-01-29 2015-08-03 京セラドキュメントソリューションズ株式会社 Image formation device and control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902001A (en) * 2019-02-12 2019-06-18 科华恒盛股份有限公司 To the detection method and terminal device of uninitialized variable
CN109902001B (en) * 2019-02-12 2022-06-07 科华恒盛股份有限公司 Method for detecting uninitialized variable and terminal equipment

Similar Documents

Publication Publication Date Title
US20170364304A1 (en) Tracking hot areas of disk drive
CN105431862B (en) For the key rotation of Memory Controller
EP3279788A1 (en) Access method, device and system for expanding memory
US10073649B2 (en) Storing metadata
US20140082296A1 (en) Deferred re-mru operations to reduce lock contention
JPWO2010035315A1 (en) Power consumption control method, power consumption control program and information processing system in multi-core CPU
US20130031397A1 (en) Information processing apparatus
US10795606B2 (en) Buffer-based update of state data
JP2021527248A (en) Storage of accidental branch predictions to reduce the waiting time for misprediction recovery
CN109284066A (en) A kind of data processing method, device, equipment and system
US10423548B2 (en) Memory controller, control method for the memory controller, and control method for memory
JP2017059009A (en) Control device
JP2009282920A (en) Cache memory device
US9501414B2 (en) Storage control device and storage control method for cache processing according to time zones
US20160019152A1 (en) Prefetch list management in a computer system
JP6407919B2 (en) Numerical control device and variable determination method
WO2023060833A1 (en) Data exchange method, electronic device and storage medium
US20160062902A1 (en) Memory access processing method and information processing device
US8832379B2 (en) Efficient cache volume SIT scans
JP2017138785A5 (en) Information processing apparatus and control method thereof
JP2006202233A (en) Controller and program for same
JP3846543B2 (en) Memory access system
US9857864B1 (en) Systems and methods for reducing power consumption in a memory architecture
US9542331B2 (en) Concurrent update of data in cache with destage to disk
JP2017219931A (en) Information processing apparatus, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180820

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190415

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20191009