JP2017130140A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2017130140A
JP2017130140A JP2016010668A JP2016010668A JP2017130140A JP 2017130140 A JP2017130140 A JP 2017130140A JP 2016010668 A JP2016010668 A JP 2016010668A JP 2016010668 A JP2016010668 A JP 2016010668A JP 2017130140 A JP2017130140 A JP 2017130140A
Authority
JP
Japan
Prior art keywords
update
task
memory
copy
data
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
JP2016010668A
Other languages
Japanese (ja)
Inventor
健 谷本
Takeshi Tanimoto
健 谷本
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2016010668A priority Critical patent/JP2017130140A/en
Priority to DE102017200571.8A priority patent/DE102017200571A1/en
Publication of JP2017130140A publication Critical patent/JP2017130140A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

Abstract

PROBLEM TO BE SOLVED: To provide a technology for suppressing data having different update timings by a first processor core from being referenced by a second processor core by reducing processing loads as much as possible.SOLUTION: A data processor 2 comprises one first processor core 10, one or more second processor cores 2, a memory 30 for updating and a memory 42 for reference. An updating task 12 that the first processor core 10 executes is configured to write data in the memory 30 for updating. The memory 42 for reference is provided in each second processor core 20 so as to be referenced by a reference task 24 that the second processor core 20 executes. A copy task 22 that the second processor core 20 executes with higher priority than the reference task 24 is configured to write the data acquired from the memory 30 for updating in the memory 42 for reference.SELECTED DRAWING: Figure 1

Description

本開示は、複数のプロセッサコアにおいて、データの更新と更新されたデータの参照とを異なるプロセッサコアが行う技術に関する。   The present disclosure relates to a technique in which different processor cores perform update of data and reference of updated data in a plurality of processor cores.

複数のプロセッサコアにおいて、データの更新と更新されたデータの参照とを異なるプロセッサコアが行う技術が知られている。
例えば、特許文献1に記載の技術では、複数のプロセッサコアとして2個のCPUコアのうち一方のCPUコアが生成タスクによりデータを生成して更新する処理が終了すると、他方のCPUコアに割り込みを要求するフラグを一方のCPUコアがセットする。
A technique is known in which, in a plurality of processor cores, different processor cores update data and reference updated data.
For example, in the technique described in Patent Document 1, when one CPU core among two CPU cores as a plurality of processor cores generates and updates data by a generation task, the other CPU core is interrupted. One CPU core sets the requested flag.

割り込み要求フラグがセットされると、他方のCPUコアに対する割り込みが起動されることにより、他方のCPUコアの取り込みタスクが起動される。他方のCPUコアが実行する取り込みタスクは、割り込み禁止レジスタに禁止フラグをセットすることにより、一方のCPUコアの生成タスクにより更新されたデータを取得して別のメモリに書き込む処理中、自CPUコアへの他の割り込み処理を禁止する。   When the interrupt request flag is set, an interrupt to the other CPU core is activated, and the fetch task of the other CPU core is activated. The fetching task executed by the other CPU core sets its prohibition flag in the interrupt prohibition register, thereby acquiring the data updated by the generation task of one CPU core and writing it to another memory. Disable other interrupt processing for.

他のCPUコアの取り込みタスクが一方のCPUコアの生成タスクが更新したデータを取得して別のメモリに書き込んでいる間、他のCPUコアへの割り込み処理が禁止されるので、取り込みタスクが書き込み中のデータは他のタスクにより参照されない。   While the capture task of another CPU core acquires the data updated by the generation task of one CPU core and writes it to another memory, interrupt processing to the other CPU core is prohibited, so the capture task writes The data inside is not referenced by other tasks.

取り込みタスクは、書き込みを終了すると割り込み禁止レジスタにセットされている禁止フラグをリセットするので、取り込みタスク以外の他のCPUコアのタスクは、取り込みタスクが書き込みを終了したデータを参照できる。これにより、特許文献1に記載の技術では、取り込みタスクによる書き込みタイミングの異なるデータを、他のCPUコアの他のタスクが参照することを防止しようとしている。   Since the capture task resets the prohibition flag set in the interrupt prohibition register when writing is completed, CPU core tasks other than the capture task can refer to the data for which the capture task has finished writing. As a result, the technique disclosed in Patent Document 1 tries to prevent other tasks of other CPU cores from referring to data having different write timings by the capture task.

特開2009−245009号公報JP 2009-245209 A

他のCPUコアの取り込みタスクは、取り込みタスクの処理中に自CPUコアへの割り込み処理を禁止するために割り込み禁止レジスタの禁止フラグをセットし、取り込みタスクの処理を終了すると禁止フラグをリセットする必要があるので、処理負荷が増加する。   The capture task of another CPU core needs to set the prohibit flag of the interrupt disable register to prohibit interrupt processing to the CPU core during the capture task processing, and reset the prohibit flag when the capture task processing ends. As a result, the processing load increases.

本開示の一側面は、処理負荷を極力低減して、第1プロセッサコアによる更新タイミングの異なるデータを第2プロセッサコアの参照タスクが参照することを抑制する技術を提供することを目的とする。   An object of one aspect of the present disclosure is to provide a technique that reduces processing load as much as possible and suppresses a reference task of a second processor core from referring to data having different update timings by a first processor core.

本開示の一態様は、一つの第1プロセッサコア(10)と、一つ以上の第2プロセッサコア(20、50、70)と、更新用メモリ(30)と、参照用メモリ(42、62、80)と、を備えている。   One aspect of the present disclosure includes one first processor core (10), one or more second processor cores (20, 50, 70), an update memory (30), and a reference memory (42, 62). , 80).

更新用メモリには、第1プロセッサコアが実行する更新タスク(12、S400〜S404)がデータを書き込む。
参照用メモリは第2プロセッサコア毎に設けられている。そして、第2プロセッサコアが実行する参照タスク(24、54、74、76、S430〜S434、S440〜S444)が参照用メモリを参照し、第2プロセッサコアが実行し参照タスクよりも優先度が高いコピータスク(22、52、72、S410〜S420、S450〜S460)が、更新用メモリから取得するデータを参照用メモリに書き込む。
The update task (12, S400 to S404) executed by the first processor core writes data in the update memory.
A reference memory is provided for each second processor core. The reference tasks (24, 54, 74, 76, S430 to S434, S440 to S444) executed by the second processor core refer to the reference memory, and the second processor core executes and has a higher priority than the reference task. The high copy task (22, 52, 72, S410 to S420, S450 to S460) writes the data acquired from the update memory to the reference memory.

この構成によれば、更新用メモリと参照用メモリとを別のメモリにしているので、参照タスクが参照用メモリのデータを参照中に更新タスクが更新用メモリのデータを更新しても、更新タスクは参照用メモリのデータを更新しない。   According to this configuration, since the update memory and the reference memory are separate memories, even if the update task updates the data in the update memory while the reference task is referring to the data in the reference memory, the update memory and the reference memory are updated. The task does not update the reference memory data.

さらに、第2プロセッサコアにおいて、コピータスクの優先度を参照タスクよりも高く設定しているので、参照タスクよりも優先度が高いコピータスクが更新用メモリから取得するデータを参照用メモリに書き込んでいる間、参照タスクは実行されない。   Further, since the priority of the copy task is set higher than that of the reference task in the second processor core, the data acquired from the update memory by the copy task having a higher priority than the reference task is written to the reference memory. The reference task is not executed while

したがって、参照タスクが参照する参照用メモリのデータを、更新タスクが同じタイミングで更新したデータをコピータスクが参照用メモリに書き込んだものにできる。
また、コピータスクと参照タスクとを実行する優先度は予め設定されているので、コピータスクの実行中に参照タスクの実行を禁止し、コピータスクの実行が終了すると参照タスクの実行を許可する処理を行う必要がない。これにより、処理負荷を極力低減して参照タスクの実行タイミングを調整できる。
Therefore, the data in the reference memory referred to by the reference task can be changed to the data updated by the update task at the same timing and written in the reference memory by the copy task.
In addition, since the priority for executing the copy task and the reference task is set in advance, the execution of the reference task is prohibited during the execution of the copy task, and the execution of the reference task is permitted when the execution of the copy task is completed. There is no need to do. Thereby, it is possible to adjust the execution timing of the reference task while reducing the processing load as much as possible.

このように、処理負荷を極力低減して、第1プロセッサコアによる更新タイミングの異なるデータを第2プロセッサコアの参照タスクが参照することを抑制できる。
尚、この欄および特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本発明の技術的範囲を限定するものではない。
In this way, it is possible to reduce the processing load as much as possible, and to prevent the reference task of the second processor core from referring to data having different update timings by the first processor core.
Note that the reference numerals in parentheses described in this column and in the claims indicate the correspondence with the specific means described in the embodiment described later as one aspect, and the technical scope of the present invention. It is not limited.

第1実施形態によるデータ処理装置を示すブロック図。The block diagram which shows the data processor by 1st Embodiment. 更新タスクが実行する更新処理を示すフローチャート。The flowchart which shows the update process which an update task performs. コピータスクが実行するコピー処理を示すフローチャート。10 is a flowchart showing copy processing executed by a copy task. コピータスクが実行するコピー処理を示すタイムチャート。The time chart which shows the copy process which a copy task performs. 参照タスクが実行する参照処理を示すフローチャート。The flowchart which shows the reference process which a reference task performs. 更新処理、コピー処理、参照処理を示すタイムチャート。The time chart which shows an update process, a copy process, and a reference process. 第2実施形態によるデータ処理装置を示すブロック図。The block diagram which shows the data processor by 2nd Embodiment. 第3実施形態によるデータ処理装置を示すブロック図。The block diagram which shows the data processor by 3rd Embodiment. 参照タスクが実行する参照処理を示すフローチャート。The flowchart which shows the reference process which a reference task performs. コピータスクが実行するコピー処理を示すフローチャート。10 is a flowchart showing copy processing executed by a copy task. 第4実施形態によるデータ処理装置を示すブロック図。The block diagram which shows the data processor by 4th Embodiment.

以下、本発明が適用された実施形態を図に基づいて説明する。
[1.第1実施形態]
[1−1.構成]
図1に示す第1実施形態のデータ処理装置2は、2個のプロセッサコア10、20と、更新用RAM30と、更新開始カウンタ32と、更新終了カウンタ34と、一時格納用RAM40と、参照用RAM42と、参照中フラグ44と、図示しないROMおよびフラッシュメモリ等を備えている。データ処理装置2は、2個のコア10、20を備えるマルチコアプロセッサである。以下、プロセッサコアを単に「コア」とも言う。
Embodiments to which the present invention is applied will be described below with reference to the drawings.
[1. First Embodiment]
[1-1. Constitution]
The data processing apparatus 2 of the first embodiment shown in FIG. 1 includes two processor cores 10 and 20, an update RAM 30, an update start counter 32, an update end counter 34, a temporary storage RAM 40, and a reference A RAM 42, a reference flag 44, a ROM and a flash memory (not shown), and the like are provided. The data processing device 2 is a multi-core processor including two cores 10 and 20. Hereinafter, the processor core is also simply referred to as “core”.

データ処理装置2の各機能は、コア10、20がROMまたはフラッシュメモリ等の非遷移的実体的記録媒体に記憶されているプログラムを実行することにより実現される。このプログラムが実行されることにより、プログラムに対応する方法が実行される。データ処理装置2の各機能を実現する手法は、ソフトウェアに限るものではなく、その一部または全部の要素を、論理回路やアナログ回路等を組み合わせたハードウェアを用いてもよい。   Each function of the data processing device 2 is realized by the cores 10 and 20 executing programs stored in a non-transitional physical recording medium such as a ROM or a flash memory. By executing this program, a method corresponding to the program is executed. The method of realizing each function of the data processing device 2 is not limited to software, and hardware in which some or all of the elements are combined with a logic circuit, an analog circuit, or the like may be used.

第1プロセッサコアに対応するコア10は、更新タスク12を実行して更新用RAM30のデータを更新する。更新タスク12は、更新用RAM30のデータに対する更新を開始するときに更新開始カウンタ32の値を1増加し、更新用RAM30のデータに対する更新を終了するときに更新終了カウンタ34の値を1増加する。更新開始カウンタ32と更新終了カウンタ34との初期値は例えば0のように同じ値に設定されている。   The core 10 corresponding to the first processor core executes the update task 12 to update the data in the update RAM 30. The update task 12 increments the value of the update start counter 32 by 1 when the update of the data in the update RAM 30 is started, and increments the value of the update end counter 34 by 1 when the update of the data in the update RAM 30 is finished. . The initial values of the update start counter 32 and the update end counter 34 are set to the same value, for example, 0.

つまり、更新開始カウンタ32と更新終了カウンタ34とは、更新タスク12が更新用RAM30のデータを更新していないときには同じ値であり、更新タスク12が更新用RAM30のデータを更新中には異なる値である。   That is, the update start counter 32 and the update end counter 34 have the same value when the update task 12 is not updating the data in the update RAM 30, and are different values while the update task 12 is updating the data in the update RAM 30. It is.

更新タスク12は、更新開始カウンタ32と更新終了カウンタ34とを1増加する代わりに、1減少してもよい。つまり、更新開始カウンタ32の値と更新終了カウンタ34の値とは、増加または減少の同じ方向に変化する。また、更新開始カウンタ32と更新終了カウンタ34との増減量は、同じであれば1に限るものではない。   Instead of incrementing the update start counter 32 and the update end counter 34 by 1, the update task 12 may decrement by 1. That is, the value of the update start counter 32 and the value of the update end counter 34 change in the same direction of increase or decrease. Further, the increase / decrease amount of the update start counter 32 and the update end counter 34 is not limited to 1 as long as they are the same.

コア10は、コア20が実行するコピータスク22と参照タスク24とが実行中であるか否かに関わらず、更新タスク12を実行する。
第2プロセッサコアに対応するコア20は、コピータスク22と参照タスク24とを実行する。コピータスク22を実行する優先度は参照タスク24を実行する優先度よりも高い。コピータスク22は、コア10が更新タスクを実行していない場合、更新用RAM30のデータを取得して一時格納用RAM40に一時的に格納する。
The core 10 executes the update task 12 regardless of whether the copy task 22 and the reference task 24 executed by the core 20 are being executed.
The core 20 corresponding to the second processor core executes a copy task 22 and a reference task 24. The priority for executing the copy task 22 is higher than the priority for executing the reference task 24. When the core 10 is not executing the update task, the copy task 22 acquires the data in the update RAM 30 and temporarily stores it in the temporary storage RAM 40.

コピータスク22は、更新用RAM30のデータを取得して一時格納用RAM40に格納している間に更新タスク12が更新用RAM30のデータを更新しない場合、一時格納用RAM40に格納した更新用RAM30のデータを参照用RAM42に書き込む。   When the update task 12 does not update the data in the update RAM 30 while acquiring the data in the update RAM 30 and storing it in the temporary storage RAM 40, the copy task 22 stores the update RAM 30 stored in the temporary storage RAM 40. Data is written into the reference RAM 42.

参照タスク24は、参照用RAM42のデータを参照する。参照タスク24は、参照用RAM42のデータを参照中、参照中フラグ44の値を、参照中であるオン状態であることを示す値として例えば1に設定する。参照タスク24は、参照用RAM42のデータの参照を終了すると、参照中フラグ44の値を、参照中ではないオフ状態であることを示す値として例えば0に設定する。   The reference task 24 refers to data in the reference RAM 42. The reference task 24 sets the value of the in-reference flag 44 while referring to the data in the reference RAM 42, for example, to 1 as a value indicating the ON state being referred to. When the reference task 24 finishes referring to the data in the reference RAM 42, the reference task 24 sets the value of the reference flag 44 to, for example, 0 as a value indicating an off state that is not being referred to.

参照タスク24よりも優先度の高いコピータスク22は、参照中フラグ44が1に設定されている場合、更新用RAM30のデータを取得して参照用RAM42に書き込むコピー処理を実行しない。   When the reference flag 44 is set to 1, the copy task 22 having a higher priority than the reference task 24 does not execute the copy process of acquiring the data in the update RAM 30 and writing it in the reference RAM 42.

[1−2.処理]
(1)更新処理
図2に示す更新処理は、更新用RAM30のデータを更新する更新タイミングになると更新タスク12により実行される。図2のS400において更新タスク12は、更新開始カウンタ32を+1する。S402において更新タスク12は、更新用RAM30のデータを更新する。更新用RAM30のデータの更新が終了すると、S404において更新タスク12は、更新終了カウンタ34の値を+1する。
[1-2. processing]
(1) Update Process The update process shown in FIG. 2 is executed by the update task 12 when the update timing for updating the data in the update RAM 30 comes. In S400 of FIG. 2, the update task 12 increments the update start counter 32 by one. In S402, the update task 12 updates the data in the update RAM 30. When the update of the data in the update RAM 30 is completed, the update task 12 increments the value of the update end counter 34 by 1 in S404.

(2)コピー処理
図3に示すコピー処理は、更新用RAM30のデータを取得して参照用RAM42に書き込むタイミングになるとコピータスク22により実行される。図3のS410においてコピータスク22は、参照中フラグ44がオンであるか否かを判定する。
(2) Copy Process The copy process shown in FIG. 3 is executed by the copy task 22 when it is time to acquire data in the update RAM 30 and write it to the reference RAM 42. In S410 of FIG. 3, the copy task 22 determines whether or not the reference flag 44 is on.

S410の判定がYesであり、参照中フラグ44がオンの場合、参照タスク24が参照用RAM42を参照中であることを表している。この場合、参照タスク24が参照用RAM42を参照中にコピータスク22が更新用RAM30のデータを取得して参照用RAM42に書き込むことを抑制するために、コピータスク22は本処理を終了する。   If the determination in S410 is Yes and the reference flag 44 is on, it indicates that the reference task 24 is referring to the reference RAM 42. In this case, the copy task 22 ends this processing in order to prevent the copy task 22 from acquiring the data in the update RAM 30 and writing it to the reference RAM 42 while the reference task 24 is referring to the reference RAM 42.

S410の判定がNoであり、参照タスク24が参照用RAM42を参照中ではない場合、S412においてコピータスク22は、更新開始カウンタ32の値と更新終了カウンタ34の値とが一致しているか否かを判定する。   If the determination in S410 is No and the reference task 24 is not referring to the reference RAM 42, the copy task 22 determines in S412 whether or not the value of the update start counter 32 matches the value of the update end counter 34. Determine.

例えば、図4に示すように、更新開始カウンタ32の値と更新終了カウンタ34の値とが「4」で等しくS412の判定がYesの場合、コピータスク22は、更新タスク12が更新用RAM30のデータを更新中ではないと判断する。この場合、コピータスク22はS414に処理を移行する。   For example, as shown in FIG. 4, when the value of the update start counter 32 and the value of the update end counter 34 are “4” and the determination in S 412 is Yes, the copy task 22 is updated in the update RAM 30. Judge that the data is not being updated. In this case, the copy task 22 shifts the process to S414.

尚、図4において4種類の実行タイミングで実行されるコピー処理は、各タイミングでそれぞれ実行されるのではなく、4種類の実行タイミングのうちいずれかのタイミングで実行される。   In FIG. 4, the copy process executed at four types of execution timing is not executed at each timing, but is executed at any one of the four types of execution timing.

更新開始カウンタ32の値が「5」であり、更新終了カウンタ34の値が「4」であるためにS412の判定がNoの場合、コピータスク22は、更新タスク12が更新用RAM30のデータを更新中であると判断する。   When the value of the update start counter 32 is “5” and the value of the update end counter 34 is “4”, so that the determination in S 412 is No, the copy task 22 has the update task 12 store the data in the update RAM 30. Judge that update is in progress.

この場合、コピータスク22は、更新開始カウンタ32の値と更新終了カウンタ34の値とが「5」になり等しくなるまで待機する。そして、更新開始カウンタ32の値と更新終了カウンタ34の値とが「5」になると、更新タスク12による更新用RAM30のデータの更新が終了したと判断し、コピータスク22はS414に処理を移行する。   In this case, the copy task 22 waits until the value of the update start counter 32 and the value of the update end counter 34 become “5” and become equal. When the value of the update start counter 32 and the value of the update end counter 34 become “5”, it is determined that the update task 12 has finished updating the data in the update RAM 30, and the copy task 22 proceeds to S414. To do.

S414においてコピータスク22は、更新開始カウンタ32の値を一時格納用RAM40等の一時記憶エリアに退避する。
S416においてコピータスク22は、更新用RAM30から取得したデータを一時格納用RAM40に格納する。更新用RAM30のデータの一時格納用RAM40への格納が終了すると、S418においてコピータスク22は、S414において一時記憶エリアに退避していた更新開始カウンタ32の値と現在の更新開始カウンタ32の値とが一致しているか否かを判定する。
In S <b> 414, the copy task 22 saves the value of the update start counter 32 in a temporary storage area such as the temporary storage RAM 40.
In S 416, the copy task 22 stores the data acquired from the update RAM 30 in the temporary storage RAM 40. When the storage of the data in the update RAM 30 to the temporary storage RAM 40 is completed, in S418, the copy task 22 determines the value of the update start counter 32 saved in the temporary storage area in S414 and the current value of the update start counter 32. It is determined whether or not.

S418の判定がNoであり、一時記憶エリアに退避していた更新開始カウンタ32の値と現在の更新開始カウンタ32の値とが異なる場合、コピータスク22は、更新用RAM30のデータを一時格納用RAM40に格納中に、コア10の更新タスク12が更新用RAM30のデータを更新したと判断する。   If the determination in S418 is No and the value of the update start counter 32 saved in the temporary storage area is different from the current value of the update start counter 32, the copy task 22 uses the data in the update RAM 30 for temporary storage. During the storage in the RAM 40, it is determined that the update task 12 of the core 10 has updated the data in the update RAM 30.

この場合、コピータスク22が一時格納用RAM40に格納した更新用RAM30のデータには、更新タスク12による更新前と更新後とのデータが混在している可能性がある。この状態では、一時格納用RAM40に格納した更新用RAM30のデータに更新タイミングの異なるデータが混在し、データの同時性が確保できないので、コピータスク22はS412に処理を移行してコピー処理を再実行する。   In this case, the data in the update RAM 30 stored in the temporary storage RAM 40 by the copy task 22 may include data before and after the update by the update task 12. In this state, the data in the update RAM 30 stored in the temporary storage RAM 40 is mixed with data with different update timings, and data simultaneity cannot be ensured. Therefore, the copy task 22 shifts the process to S412 and restarts the copy process. Run.

S418の判定がYesであり、一時記憶エリアに退避していた更新開始カウンタ32の値と現在の更新開始カウンタ32の値とが一致する場合、コピータスク22は、一時格納用RAM40に格納した更新用RAM30のデータの同時性が確保されていると判断する。そこで、S420においてコピータスク22は、一時格納用RAM40に格納した更新用RAM30のデータを参照用RAM42に書き込む。   If the determination in S418 is Yes and the value of the update start counter 32 saved in the temporary storage area matches the current value of the update start counter 32, the copy task 22 updates the update stored in the temporary storage RAM 40. It is determined that the data synchronism of the RAM 30 is secured. Therefore, in S420, the copy task 22 writes the data of the update RAM 30 stored in the temporary storage RAM 40 into the reference RAM 42.

(3)参照処理
図5に示す参照処理は、参照タスク24が参照用RAM42を参照するタイミングになり、参照タスク24よりも優先度の高いコピータスク22が実行中ではない場合に実行される。図5のS430において参照タスク24は、参照中フラグ44をオンに設定する。参照中フラグ44がオンに設定されることにより、コピータスク22はコピー処理を実行しない。S432において参照タスク24は参照用RAM42のデータを参照する。
(3) Reference Process The reference process shown in FIG. 5 is executed when the reference task 24 refers to the reference RAM 42 and the copy task 22 having a higher priority than the reference task 24 is not being executed. In S430 of FIG. 5, the reference task 24 sets the reference flag 44 to ON. When the reference flag 44 is set to ON, the copy task 22 does not execute the copy process. In S432, the reference task 24 refers to the data in the reference RAM 42.

ここで、図6に示すように、コピータスク22が更新用RAM30から変数A、B、Cを取得して参照用RAM42の変数a、b、cに書き込み、参照タスク24が次式(1)からXを算出する場合を例にして、各タスクの実行タイミングを説明する。尚、図6において、式(1)から算出されるXの値は四捨五入されている。   Here, as shown in FIG. 6, the copy task 22 acquires the variables A, B, and C from the update RAM 30 and writes them in the variables a, b, and c of the reference RAM 42, and the reference task 24 has the following equation (1): The execution timing of each task will be described using the case where X is calculated from the above as an example. In FIG. 6, the value of X calculated from the equation (1) is rounded off.

X=(a+b+c)/3 ・・・(1)
最初、更新用RAM30の変数A、B、Cには、それぞれ10、15、45が設定されている。図6に示す(1)のタイミングでコピータスク22が実行されることにより、参照用RAM42の変数a、b、cにそれぞれ10、15、45が書き込まれる。コピータスク22の実行終了後、(2)のタイミングで参照タスク24は、参照用RAM42の変数a、b、cを参照し、式(1)からX=23を算出する。
X = (a + b + c) / 3 (1)
Initially, the variables A, B, and C of the update RAM 30 are set to 10, 15, and 45, respectively. By executing the copy task 22 at the timing (1) shown in FIG. 6, 10, 15, and 45 are written in the variables a, b, and c of the reference RAM 42, respectively. After the execution of the copy task 22, the reference task 24 refers to the variables a, b, and c in the reference RAM 42 at the timing (2), and calculates X = 23 from the equation (1).

(3)のタイミングでコピータスク22が実行されても、更新用RAM30の変数A、B、Cの値が更新されていないので、参照用RAM42の変数a、b、cの値は変化しない。   Even if the copy task 22 is executed at the timing of (3), the values of the variables a, B, and C in the update RAM 30 are not updated, so the values of the variables a, b, and c in the reference RAM 42 do not change.

(4)のタイミングで参照タスク24が実行されても、参照用RAM42の変数a、b、cの値が変化していないので、X=23のままである。参照タスク24が実行されている途中の(5)のタイミングで更新タスク12が実行され、更新用RAM30の変数A、B、Cの値が20、30、29に更新されても、コピータスク22が実行されないので、参照用RAM42の変数a、b、cの値は変化しない。   Even if the reference task 24 is executed at the timing of (4), the values of the variables a, b, and c in the reference RAM 42 have not changed, so X = 23 remains. Even if the update task 12 is executed at the timing (5) while the reference task 24 is being executed, and the values of the variables A, B, and C in the update RAM 30 are updated to 20, 30, and 29, the copy task 22 Is not executed, the values of the variables a, b, c in the reference RAM 42 do not change.

(5)のタイミングで更新タスク12が実行され、(6)のタイミングでコピータスク22が実行されることにより、参照用RAM42の変数a、b、cに20、30、29が書き込まれる。   The update task 12 is executed at the timing (5), and the copy task 22 is executed at the timing (6), whereby 20, 30, 29 are written in the variables a, b, c of the reference RAM 42.

(7)のタイミングで更新タスク12が実行され、更新タスク12が実行されている途中の(8)のタイミングで参照タスク24が実行されても、コピータスク22が実行されないので、参照用RAM42の変数a、b、cの値は20、30、29のままである。したがって、参照タスク24は式(1)からX=26を算出する。   Even if the update task 12 is executed at the timing (7) and the reference task 24 is executed at the timing (8) while the update task 12 is being executed, the copy task 22 is not executed. The values of the variables a, b, and c remain 20, 30, and 29. Therefore, the reference task 24 calculates X = 26 from the equation (1).

(7)のタイミングで更新タスク12が実行されてから、(9)のタイミングでコピータスク22が実行されることにより、参照用RAM42の変数a、b、cに30、22、8が書き込まれる。   After the update task 12 is executed at the timing (7), the copy task 22 is executed at the timing (9), whereby 30, 22, and 8 are written in the variables a, b, and c of the reference RAM 42. .

(10)のタイミングでコピータスク22が実行されても、その前に更新タスク12が実行されていないので、参照用RAM42の変数a、b、cの値は30、22、8のままである。(11)のタイミングで参照タスク24は、式(1)からX=20を算出する。   Even if the copy task 22 is executed at the timing of (10), since the update task 12 has not been executed before that, the values of the variables a, b, and c in the reference RAM 42 remain 30, 22, and 8. . At the timing of (11), the reference task 24 calculates X = 20 from Expression (1).

次に、S432において参照用RAM42のデータを参照すると、S434において参照タスク24は、参照中フラグ44をオフに設定する。これにより、コピータスク22の実行が可能になる。   Next, referring to the data in the reference RAM 42 in S432, the reference task 24 sets the reference flag 44 to OFF in S434. As a result, the copy task 22 can be executed.

[1−3.効果]
以上説明した第1実施形態によれば、以下の効果を得ることができる。
(1)更新タスク12がデータを更新する更新用RAM30と、参照タスク24が参照する参照用RAM42とを別のメモリにした。これにより、更新タスク12が更新用RAM30のデータを更新しても、更新タスク12は参照用RAM42のデータを更新しない。そして、参照タスク24よりも優先度が高いコピータスク22が更新用RAM30から参照用RAM42にデータを書き込んでいる間、参照タスク24は実行されない。
[1-3. effect]
According to the first embodiment described above, the following effects can be obtained.
(1) The update RAM 30 for updating data by the update task 12 and the reference RAM 42 to which the reference task 24 refers are made different memories. Thereby, even if the update task 12 updates the data in the update RAM 30, the update task 12 does not update the data in the reference RAM 42. The reference task 24 is not executed while the copy task 22 having higher priority than the reference task 24 writes data from the update RAM 30 to the reference RAM 42.

したがって、更新タスク12と参照タスク24とが重複して実行されても、更新タスク12による更新タイミングの異なる更新用RAM30のデータを、参照タスク24が参照用RAM42から参照することを抑制できる。   Therefore, even if the update task 12 and the reference task 24 are executed in duplicate, the reference task 24 can be prevented from referring to the data in the update RAM 30 having different update timings by the update task 12 from the reference RAM 42.

(2)コピータスク22と参照タスク24とを実行する優先度は予め設定されているので、コピータスク22の実行中に参照タスク24の実行を禁止し、コピータスク22の実行が終了すると参照タスク24の実行を許可する処理を行う必要がない。これにより、処理負荷を極力低減して参照タスク24の実行タイミングを調整できる。   (2) Since the priority of executing the copy task 22 and the reference task 24 is set in advance, the execution of the reference task 24 is prohibited during the execution of the copy task 22, and when the execution of the copy task 22 ends, the reference task It is not necessary to perform processing for permitting the execution of 24. Thereby, the processing load can be reduced as much as possible, and the execution timing of the reference task 24 can be adjusted.

(3)更新開始カウンタ32の値と更新終了カウンタ34の値とを比較することにより、更新タスク12が更新用RAM30のデータを更新中であれば、コピータスク22は更新用RAM30のデータを一時格納用RAM40に格納しない。   (3) If the update task 12 is updating the data in the update RAM 30 by comparing the value of the update start counter 32 with the value of the update end counter 34, the copy task 22 temporarily stores the data in the update RAM 30. The data is not stored in the storage RAM 40.

さらに、更新開始カウンタ32の値の変化に基づいて、コピータスク22が一時格納用RAM40にデータを格納中に更新タスク12がデータを更新したと判定すると、コピータスク22は一時格納用RAM40のデータを参照用RAM42に書き込まない。   Further, when it is determined that the update task 12 has updated the data while the copy task 22 is storing data in the temporary storage RAM 40 based on the change in the value of the update start counter 32, the copy task 22 determines the data in the temporary storage RAM 40. Are not written in the reference RAM 42.

このように、更新開始カウンタ32の値と更新終了カウンタ34の値とに基づいて、処理負荷を極力低減して、更新タスク12による更新タイミングの異なるデータをコピータスク22が参照用RAM42に書き込むことを抑制できる。   As described above, the copy task 22 writes the data with different update timings by the update task 12 to the reference RAM 42 while reducing the processing load as much as possible based on the values of the update start counter 32 and the update end counter 34. Can be suppressed.

(4)参照中フラグ44を設定することにより、処理負荷を極力低減して、参照タスク24の実行中にコピータスク22の実行を禁止できる。
(5)更新開始カウンタ32の値と更新終了カウンタ34の値の設定、ならびにコピータスク22と参照タスク24との予め設定された優先度、ならびに参照中フラグ44の設定により、コピータスク22と参照タスク24との実行タイミングが調整される。
(4) By setting the reference flag 44, the processing load can be reduced as much as possible, and execution of the copy task 22 can be prohibited while the reference task 24 is being executed.
(5) Refer to the copy task 22 by setting the value of the update start counter 32 and the value of the update end counter 34, the preset priority of the copy task 22 and the reference task 24, and the setting of the reference flag 44. The execution timing with the task 24 is adjusted.

割り込み処理により調整する場合に比べ、コピータスク22と参照タスク24との実行タイミングの調整に要する処理負荷を極力低減できる。さらに、コピータスク22と参照タスク24との実行タイミングを調整するための処理部が不要である。   Compared with the case where adjustment is performed by interrupt processing, the processing load required for adjusting the execution timing of the copy task 22 and the reference task 24 can be reduced as much as possible. Furthermore, a processing unit for adjusting the execution timing of the copy task 22 and the reference task 24 is not necessary.

[2.第2実施形態]
[2−1.構成]
図7に示す第2実施形態のデータ処理装置4は、第1実施形態のデータ処理装置2に対し、さらにコア50と、一時格納用RAM60と、参照用RAM62と、参照中フラグ64とを備えている。つまり、参照タスク24、54毎に、参照中フラグ44、64がそれぞれ備えられている。
[2. Second Embodiment]
[2-1. Constitution]
The data processing device 4 according to the second embodiment shown in FIG. 7 further includes a core 50, a temporary storage RAM 60, a reference RAM 62, and a reference flag 64, as compared with the data processing device 2 according to the first embodiment. ing. That is, a reference flag 44 or 64 is provided for each reference task 24 or 54.

尚、第2実施形態において第1実施形態と同じ符号は同一の構成を示すものであって、詳細については先行する説明を参照するものとする。
第2プロセッサコアに対応するコア50は、コア20と同様にコピータスク52と参照タスク54とを実行する。コピータスク52が実行するコピー処理は、コピータスク22が実行するコピー処理と実質的に同一である。参照タスク54が実行する参照処理は、参照タスク24が実行する参照処理と実質的に同一である。
In the second embodiment, the same reference numerals as those in the first embodiment indicate the same configuration, and the preceding description will be referred to for details.
The core 50 corresponding to the second processor core executes the copy task 52 and the reference task 54 similarly to the core 20. The copy process executed by the copy task 52 is substantially the same as the copy process executed by the copy task 22. The reference process executed by the reference task 54 is substantially the same as the reference process executed by the reference task 24.

一時格納用RAM40と一時格納用RAM60、参照用RAM42と参照用RAM62、参照中フラグ44と参照中フラグ64のそれぞれの機能は実質的に同一である。
そして、コア20とコア50とはそれぞれ独立してコア毎にタスクを実行する。
The functions of the temporary storage RAM 40 and the temporary storage RAM 60, the reference RAM 42 and the reference RAM 62, the reference flag 44, and the reference flag 64 are substantially the same.
The core 20 and the core 50 each independently execute a task for each core.

[2−2.効果]
データ処理装置4が第2プロセッサコアとして2個のコア20、50を備えても、コア10とコア20、ならびにコア10とコア50との関係において、第1実施形態の効果(1)〜(5)と同様の効果を得ることができる。
[2-2. effect]
Even if the data processing device 4 includes the two cores 20 and 50 as the second processor cores, the effects (1) to (1) of the first embodiment in relation to the cores 10 and 20 and the cores 10 and 50. The same effect as 5) can be obtained.

[3.第3実施形態]
[3−1.構成]
図8に示す第3実施形態のデータ処理装置6では、第1実施形態の参照中フラグ44に代えて参照中カウンタ82を備え、コア20に代えてコア70を備えている。参照用RAM80は第1実施形態の参照用RAM42に対応する。
[3. Third Embodiment]
[3-1. Constitution]
In the data processing device 6 of the third embodiment shown in FIG. 8, a reference counter 82 is provided instead of the reference flag 44 of the first embodiment, and a core 70 is provided instead of the core 20. The reference RAM 80 corresponds to the reference RAM 42 of the first embodiment.

尚、第3実施形態において第1実施形態と同じ符号は同一の構成を示すものであって、詳細については先行する説明を参照するものとする。
コア70は、コピータスク72と、2個の参照タスク74、76とを実行する。コピータスク72の優先度は参照タスク74、76の優先度よりも高い。参照タスク74の優先度は参照タスク76の優先度よりも高い。コピータスク72が実行するコピー処理は、コピータスク22が実行するコピー処理と実質的に同一である。参照タスク74、76が実行する参照処理は、参照したデータの処理内容が異なっている。
In the third embodiment, the same reference numerals as those in the first embodiment indicate the same configuration, and the preceding description will be referred to for details.
The core 70 executes a copy task 72 and two reference tasks 74 and 76. The priority of the copy task 72 is higher than the priority of the reference tasks 74 and 76. The priority of the reference task 74 is higher than the priority of the reference task 76. The copy process executed by the copy task 72 is substantially the same as the copy process executed by the copy task 22. The reference processing executed by the reference tasks 74 and 76 differs in the processing content of the referenced data.

[3−2.処理]
(1)参照処理
図9に示す参照処理は、参照タスク74、76が参照用RAM80を参照するタイミングになり、コピータスク72が実行中ではない場合に実行される。参照タスク76よりも優先度の高い参照タスク74が実行中は、参照タスク76は実行されない。
[3-2. processing]
(1) Reference Process The reference process shown in FIG. 9 is executed when the reference tasks 74 and 76 refer to the reference RAM 80 and the copy task 72 is not being executed. While the reference task 74 having a higher priority than the reference task 76 is being executed, the reference task 76 is not executed.

図9のS440において参照タスク74、76は、参照中カウンタ82の値を+1する。参照中カウンタ82の初期値は例えば0である。
参照中カウンタ82の値が0ではない場合、参照タスク74、76のいずれかが参照用RAM80を参照していることを表している。この場合、コピータスク72はコピー処理を実行しない。
In S440 of FIG. 9, the reference tasks 74 and 76 increment the value of the reference counter 82 by one. The initial value of the reference counter 82 is 0, for example.
When the value of the reference counter 82 is not 0, it indicates that one of the reference tasks 74 and 76 is referring to the reference RAM 80. In this case, the copy task 72 does not execute the copy process.

参照タスク76が実行中に参照タスク76よりも優先度の高い参照タスク74が起動されると、参照中カウンタ82の値は+1されて2になる。
S442において参照タスク74、76は、参照用RAM80のデータを参照する。参照用RAM80のデータの参照が終了すると、S444において参照タスク74、76は参照中カウンタ82を−1する。
When the reference task 74 having a higher priority than the reference task 76 is activated while the reference task 76 is being executed, the value of the reference counter 82 is incremented by 1 and becomes 2.
In S442, the reference tasks 74 and 76 refer to the data in the reference RAM 80. When the reference of data in the reference RAM 80 is completed, the reference tasks 74 and 76 decrement the reference counter 82 by 1 in S444.

(2)コピー処理
図10に示すコピー処理は、更新用RAM30のデータを参照用RAM80にコピーするタイミングになるとコピータスク72により実行される。図10のS450においてコピータスク72は、参照中カウンタ82が0であるか否かを判定する。
(2) Copy Process The copy process shown in FIG. 10 is executed by the copy task 72 when it is time to copy the data in the update RAM 30 to the reference RAM 80. In S450 of FIG. 10, the copy task 72 determines whether or not the reference counter 82 is zero.

S450の判定がNoであり、参照中カウンタ82の値が0ではない場合、参照タスク74、76の少なくとも一方が参照用RAM80を参照中であることを表している。この場合、参照タスク74、76が参照用RAM80を参照中にコピータスク72が更新用RAM30のデータを取得して参照用RAM80に書き込むことを抑制するために、コピータスク72は本処理を終了する。   When the determination in S450 is No and the value of the reference counter 82 is not 0, it indicates that at least one of the reference tasks 74 and 76 is referring to the reference RAM 80. In this case, the copy task 72 ends this processing in order to prevent the copy task 72 from acquiring the data in the update RAM 30 and writing it to the reference RAM 80 while the reference tasks 74 and 76 are referring to the reference RAM 80. .

S450の判定がYesであり、参照タスク74、76のいずれも参照用RAM80を参照中ではない場合、コピータスク72はS452〜S460の処理を実行する。S452〜S460の処理は、第1実施形態のS412〜S420の処理と実質的に同一であるから説明を省略する。   When the determination in S450 is Yes and neither of the reference tasks 74 and 76 is referring to the reference RAM 80, the copy task 72 executes the processes of S452 to S460. Since the processes of S452 to S460 are substantially the same as the processes of S412 to S420 of the first embodiment, the description thereof is omitted.

[3−3.効果]
以上説明した第3実施形態では、第1実施形態の効果(1)〜(5)において参照中フラグ44を参照中カウンタ82に代えて得られる効果に加え、以下の効果を得ることができる。
[3-3. effect]
In the third embodiment described above, in addition to the effects obtained by replacing the reference flag 44 with the reference counter 82 in the effects (1) to (5) of the first embodiment, the following effects can be obtained.

参照中カウンタ82の値を参照タスク74、76のそれぞれが増加および減少することにより、コア70が複数の参照タスク74、76を実行しても、参照タスク74、76の少なくともいずれかが実行中であることを容易に判定できる。   Even if the core 70 executes a plurality of reference tasks 74 and 76 by increasing and decreasing each of the reference tasks 74 and 76 by the value of the reference counter 82, at least one of the reference tasks 74 and 76 is being executed. It can be easily determined.

[4.第4実施形態]
[4−1.構成]
図11に示す第4実施形態のデータ処理装置8は、第1実施形態のデータ処理装置2に対し、さらに第3実施形態で説明したコア70と、コア70に対応して、一時格納用RAM84と、参照用RAM80と、参照中カウンタ82とを備えている。一時格納用RAM84と、参照用RAM80と、参照中カウンタ82は、第3実施形態の一時格納用RAM40と、参照用RAM80と、参照中カウンタ82とに対応している。
[4. Fourth Embodiment]
[4-1. Constitution]
The data processing device 8 according to the fourth embodiment shown in FIG. 11 is different from the data processing device 2 according to the first embodiment in that the core 70 described in the third embodiment and the temporary storage RAM 84 correspond to the core 70. A reference RAM 80 and a reference counter 82. The temporary storage RAM 84, the reference RAM 80, and the reference counter 82 correspond to the temporary storage RAM 40, the reference RAM 80, and the reference counter 82 of the third embodiment.

尚、第4実施形態において第1実施形態および第3実施形態と同じ符号は同一の構成を示すものであって、詳細については先行する説明を参照するものとする。
そして、コア20とコア70とはそれぞれ独立してコア毎にタスクを実行する。
In addition, in 4th Embodiment, the same code | symbol as 1st Embodiment and 3rd Embodiment shows the same structure, Comprising: The previous description shall be referred for the detail.
The core 20 and the core 70 execute tasks for each core independently.

[4−2.効果]
データ処理装置8が第2プロセッサコアとして2個のコア20、70を備え、コア70が優先度の異なる2個の参照タスク74、76を実行する。したがって、第2実施形態と第3実施形態とを合わせた効果を得ることができる。
[4-2. effect]
The data processing device 8 includes two cores 20 and 70 as second processor cores, and the core 70 executes two reference tasks 74 and 76 having different priorities. Therefore, it is possible to obtain the combined effect of the second embodiment and the third embodiment.

以上説明した上記実施形態において、コア10が第1プロセッサコアに対応し、コア20、50、70が第2プロセッサコアに対応する。さらに、更新用RAM30が更新用メモリに対応し、一時格納用RAM40、60、84が一時格納用メモリに対応し、参照用RAM42、62、80が参照用メモリに対応する。   In the above-described embodiment, the core 10 corresponds to the first processor core, and the cores 20, 50, and 70 correspond to the second processor core. Further, the update RAM 30 corresponds to the update memory, the temporary storage RAMs 40, 60, and 84 correspond to the temporary storage memory, and the reference RAMs 42, 62, and 80 correspond to the reference memory.

また、上記実施形態において、S400〜S404が更新タスク12としての処理に対応し、S410〜S420がコピータスク22としての処理に対応し、S430〜S432が参照タスク24としての処理に対応し、S440〜S444が参照タスク74、76としての処理に対応し、S450〜S460がコピータスク72としての処理に対応する。   In the above embodiment, S400 to S404 correspond to processing as the update task 12, S410 to S420 correspond to processing as the copy task 22, S430 to S432 correspond to processing as the reference task 24, and S440. To S444 correspond to the processing as the reference tasks 74 and 76, and S450 to S460 correspond to the processing as the copy task 72.

[5.他の実施形態]
(1)上記実施形態では、データ処理装置が複数の第2プロセッサコアを備える場合、2個の第2プロセッサコアを例示した。これに対し、データ処理装置が備える複数の第2プロセッサコアは3個以上でもよい。
[5. Other Embodiments]
(1) In the above embodiment, when the data processing apparatus includes a plurality of second processor cores, two second processor cores are exemplified. On the other hand, the number of the second processor cores included in the data processing device may be three or more.

(2)上記実施形態では、コピータスクが更新用RAM30のデータを一時格納用RAMに格納する前か、一時格納用RAMに格納中に更新タスク12が更新用RAM30のデータを更新すると、コピータスクはコピー処理を再実行する。   (2) In the above embodiment, when the copy task updates the data in the update RAM 30 before the copy task stores the data in the update RAM 30 in the temporary storage RAM or while the data is stored in the temporary storage RAM, the copy task Re-executes the copy process.

これに対し、コピータスクが更新用RAM30のデータを一時格納用RAMに格納する前か一時格納用RAMに格納中に更新タスク12が更新用RAM30のデータを更新すると、コピータスクは今回のコピー処理を終了してもよい。   On the other hand, when the update task 12 updates the data in the update RAM 30 before the copy task stores the data in the update RAM 30 in the temporary storage RAM or while the data is stored in the temporary storage RAM, the copy task performs the current copy process. May be terminated.

(3)上記第3実施形態では、参照タスク74、76の少なくともいずれかが参照用RAM42を参照中であるか否かを参照中カウンタ82の値を増加および減少することにより表した。これに対し、参照用RAM42を参照中であるか否かを表す参照中フラグを参照タスク74、76のそれぞれに設けてもよい。   (3) In the third embodiment, whether or not at least one of the reference tasks 74 and 76 is referring to the reference RAM 42 is expressed by increasing and decreasing the value of the reference counter 82. On the other hand, a reference flag indicating whether or not the reference RAM 42 is being referred to may be provided in each of the reference tasks 74 and 76.

(4)上記第3実施形態では、第2プロセッサコアに対応するコア70は、優先度の異なる2個の参照タスク74、76を実行した。これに対し、一つの第2プロセッサコアが、複数の参照タスクとして優先度の異なる3個以上の参照タスクを実行してもよい。   (4) In the third embodiment, the core 70 corresponding to the second processor core executes the two reference tasks 74 and 76 having different priorities. On the other hand, one second processor core may execute three or more reference tasks having different priorities as a plurality of reference tasks.

(5)上記第3実施形態では、第2プロセッサコアに対応する一つのコア70が優先度の異なる2個の参照タスク74、76を実行した。これに対し、2個以上の第2プロセッサコアが優先度の異なる複数の参照タスクを実行してもよい。この場合、複数の参照タスクを実行する第2プロセッサ毎に参照中カウンタが備えられる。   (5) In the third embodiment, one core 70 corresponding to the second processor core executes the two reference tasks 74 and 76 having different priorities. On the other hand, two or more second processor cores may execute a plurality of reference tasks having different priorities. In this case, a reference counter is provided for each second processor that executes a plurality of reference tasks.

(6)上記実施形態における一つの構成要素が有する複数の機能を複数の構成要素によって実現したり、一つの構成要素が有する一つの機能を複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を一つの構成要素によって実現したり、複数の構成要素が有する一つの機能を一つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加または置換してもよい。尚、特許請求の範囲に記載した文言のみによって特定される技術思想に含まれるあらゆる態様が本発明の実施形態である。   (6) A plurality of functions of one constituent element in the above embodiment may be realized by a plurality of constituent elements, or a single function of one constituent element may be realized by a plurality of constituent elements. Further, a plurality of functions possessed by a plurality of constituent elements may be realized by one constituent element, or a single function possessed by a plurality of constituent elements may be realized by one constituent element. Moreover, you may abbreviate | omit a part of structure of the said embodiment. Further, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of the other embodiment. In addition, all the aspects included in the technical idea specified only by the wording described in the claims are embodiments of the present invention.

(7)上述したデータ処理装置の他、当該データ処理装置としてコンピュータを機能させるためのデータ処理プログラム、このデータ処理プログラムを記録した記録媒体、データ処理方法など、種々の形態で本発明を実現することもできる。   (7) In addition to the data processing apparatus described above, the present invention is realized in various forms such as a data processing program for causing a computer to function as the data processing apparatus, a recording medium on which the data processing program is recorded, and a data processing method. You can also.

2〜8:データ処理装置、10:コア(第1プロセッサコア)、12:更新タスク、20、50、70:コア(第2プロセッサコア)、22、52、72:コピータスク、24、54、74、76:参照タスク、30:更新用RAM(更新用メモリ)、32:更新開始カウンタ、34:更新終了カウンタ、40、60、84:一時格納用RAM(一時格納用メモリ)、42、62、80:参照用RAM(参照用メモリ)、44、64:参照中フラグ、82:参照中カウンタ 2-8: Data processing device, 10: Core (first processor core), 12: Update task, 20, 50, 70: Core (second processor core), 22, 52, 72: Copy task, 24, 54, 74, 76: Reference task, 30: Update RAM (update memory), 32: Update start counter, 34: Update end counter, 40, 60, 84: Temporary storage RAM (temporary storage memory), 42, 62 80: Reference RAM (reference memory) 44, 64: Referenced flag 82: Referenced counter

Claims (8)

一つの第1プロセッサコア(10)と、
一つ以上の第2プロセッサコア(20、50、70)と、
前記第1プロセッサコアが実行する更新タスク(12、S400〜S404)がデータを書き込む更新用メモリ(30)と、
前記第2プロセッサコア毎に設けられ、前記第2プロセッサコアが実行する少なくとも一つの参照タスク(24、54、74、76、S430〜S434、S440〜S444)が参照し、前記第2プロセッサコアが実行し前記参照タスクよりも優先度の高いコピータスク(22、52、72、S410〜S420、S450〜S460)が前記更新用メモリから取得するデータを書き込む参照用メモリ(42、62、80)と、
を備えるデータ処理装置(2、4、6、8)。
One first processor core (10);
One or more second processor cores (20, 50, 70);
An update memory (30) in which the update task (12, S400 to S404) executed by the first processor core writes data;
At least one reference task (24, 54, 74, 76, S430 to S434, S440 to S444) provided by each second processor core and executed by the second processor core refers to the second processor core. A reference memory (42, 62, 80) for writing data acquired from the update memory by a copy task (22, 52, 72, S410 to S420, S450 to S460) that is executed and has a higher priority than the reference task; ,
A data processing device (2, 4, 6, 8).
請求項1に記載のデータ処理装置において、
少なくとも一つの前記第2プロセッサコア(20、50)が一つの前記参照タスク(24、54)を実行する場合、前記参照タスクが前記参照用メモリを参照中であることを示す参照中フラグ(44、64)を前記参照タスク毎にさらに備え、
前記コピータスク(S410)は、前記参照タスクが前記参照用メモリを参照中であることを前記参照中フラグが示している場合、前記更新用メモリのデータを取得して前記参照用メモリに書き込むコピー処理を実行せず、
少なくとも一つの前記第2プロセッサコア(70)が複数の前記参照タスク(74、76)を実行する場合、複数の前記参照タスクを実行する前記第2プロセッサコア毎に、複数の前記参照タスクが増加および減少させる参照中カウンタ(82)をさらに備え、
複数の前記参照タスク(S440、S444)は、前記参照用メモリ(80)の参照を開始するときに前記参照中カウンタの増加または減少の一方を実行し、前記参照用メモリの参照を終了するときに前記参照中カウンタの増加または減少の他方を実行し、
前記コピータスク(72、S450)は、前記参照タスクが前記参照用メモリを参照中であることを前記参照中カウンタが示している場合、前記更新用メモリのデータを取得して前記参照用メモリに書き込むコピー処理を実行しない、
データ処理装置。
The data processing apparatus according to claim 1,
When at least one second processor core (20, 50) executes one reference task (24, 54), a reference flag (44) indicating that the reference task is referring to the reference memory 64) for each reference task,
The copy task (S410) obtains data in the update memory and writes to the reference memory when the reference flag indicates that the reference task is referring to the reference memory Do not execute the process,
When at least one second processor core (70) executes a plurality of reference tasks (74, 76), the plurality of reference tasks increases for each second processor core that executes the plurality of reference tasks. And a decrementing reference counter (82),
The plurality of reference tasks (S440, S444) execute one of incrementing or decrementing of the reference counter when starting the reference of the reference memory (80), and ending the reference of the reference memory The other of the incrementing or decrementing of the reference counter
When the reference counter indicates that the reference task is referring to the reference memory, the copy task (72, S450) acquires data in the update memory and stores it in the reference memory. Do not execute the copy process to write,
Data processing device.
請求項1に記載のデータ処理装置において、
前記第2プロセッサコア(20、50)が実行する少なくとも一つの前記参照タスク(24、54)が前記参照用メモリを参照中であることを示す参照中フラグ(44、64)を前記参照タスク毎にさらに備え、
前記コピータスク(S410)は、前記参照タスクが前記参照用メモリを参照中であることを前記参照中フラグが示している場合、前記更新用メモリのデータを取得して前記参照用メモリに書き込むコピー処理を実行しない、
データ処理装置。
The data processing apparatus according to claim 1,
A reference flag (44, 64) indicating that at least one reference task (24, 54) executed by the second processor core (20, 50) is referring to the reference memory is set for each reference task. In addition,
The copy task (S410) obtains data in the update memory and writes to the reference memory when the reference flag indicates that the reference task is referring to the reference memory Do not perform processing,
Data processing device.
請求項1から3のいずれか一項に記載のデータ処理装置において、
前記更新用メモリに書き込みを開始するときに前記更新タスクが増加または減少させる更新開始カウンタ(32)と、
前記更新用メモリへの書き込みを終了するときに前記更新タスクが前記更新開始カウンタと同一方向に増加または減少させる更新終了カウンタ(34)と、
をさらに備え、
前記コピータスク(S412、S452)は、前記更新開始カウンタと前記更新終了カウンタとの値に基づいて前記更新タスクが前記更新用メモリへの書き込み中であると判定すると、前記更新用メモリのデータを取得して前記参照用メモリに書き込むコピー処理を再実行する、
データ処理装置。
In the data processing device according to any one of claims 1 to 3,
An update start counter (32) that causes the update task to increase or decrease when writing to the update memory is started;
An update end counter (34) that causes the update task to increase or decrease in the same direction as the update start counter when writing to the update memory is terminated;
Further comprising
When the copy task (S412, S452) determines that the update task is writing to the update memory based on the values of the update start counter and the update end counter, the copy task stores the data in the update memory. Re-execute the copy process of acquiring and writing to the reference memory;
Data processing device.
請求項4に記載のデータ処理装置において、
前記コピータスク(S418、S458)は、前記コピー処理の実行中に、前記更新開始カウンタの値が変化すると前記更新タスクが前記更新用メモリに書き込んだと判定し、前記コピー処理を再実行する、
データ処理装置。
The data processing apparatus according to claim 4, wherein
The copy task (S418, S458) determines that the update task has written in the update memory when the value of the update start counter changes during execution of the copy process, and re-executes the copy process.
Data processing device.
請求項1から3のいずれか一項に記載のデータ処理装置において、
前記更新用メモリに書き込みを開始するときに前記更新タスクが増加または減少させる更新開始カウンタ(32)と、
前記更新用メモリへの書き込みを終了するときに前記更新タスクが前記更新開始カウンタと同一方向に増加または減少させる更新終了カウンタ(34)と、
をさらに備え、
前記コピータスクは、前記更新開始カウンタと前記更新終了カウンタとの値に基づいて前記更新タスクが前記更新用メモリへの書き込み中であると判定すると、前記更新用メモリのデータを取得して前記参照用メモリに書き込むコピー処理を終了する、
データ処理装置。
In the data processing device according to any one of claims 1 to 3,
An update start counter (32) that causes the update task to increase or decrease when writing to the update memory is started;
An update end counter (34) that causes the update task to increase or decrease in the same direction as the update start counter when writing to the update memory is terminated;
Further comprising
When the copy task determines that the update task is writing to the update memory based on the values of the update start counter and the update end counter, the copy task acquires data of the update memory and references the End the copy process to write to the memory
Data processing device.
請求項6に記載のデータ処理装置において、
前記コピータスクは、前記コピー処理の実行中に、前記更新開始カウンタの値が変化すると前記更新タスクが前記更新用メモリに書き込んだと判定して前記コピー処理を終了する、
データ処理装置。
The data processing apparatus according to claim 6, wherein
When the value of the update start counter changes during execution of the copy process, the copy task determines that the update task has written to the update memory and ends the copy process.
Data processing device.
請求項1から7のいずれか一項に記載のデータ処理装置において、
前記コピータスクが前記更新用メモリから取得するデータを一時的に格納する一時格納用メモリ(40、60、84)をさらに備え、
前記コピータスク(S416、S456)は、前記参照タスクが前記参照用メモリを参照中ではなく、かつ前記更新タスクが前記更新用メモリを更新中ではなく、かつ前記コピータスクが前記更新用メモリから取得するデータを前記一時格納用メモリに格納中に前記更新タスクが前記更新用メモリを更新していない場合、前記一時格納用メモリに格納した前記更新用メモリのデータを前記参照用メモリに書き込む、
データ処理装置。
In the data processing device according to any one of claims 1 to 7,
A temporary storage memory (40, 60, 84) for temporarily storing data acquired from the update memory by the copy task;
In the copy task (S416, S456), the reference task is not referring to the reference memory, the update task is not updating the update memory, and the copy task is acquired from the update memory. When the update task has not updated the update memory while storing the data to be stored in the temporary storage memory, the data of the update memory stored in the temporary storage memory is written to the reference memory.
Data processing device.
JP2016010668A 2016-01-22 2016-01-22 Data processor Pending JP2017130140A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016010668A JP2017130140A (en) 2016-01-22 2016-01-22 Data processor
DE102017200571.8A DE102017200571A1 (en) 2016-01-22 2017-01-16 DATA PROCESSING DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016010668A JP2017130140A (en) 2016-01-22 2016-01-22 Data processor

Publications (1)

Publication Number Publication Date
JP2017130140A true JP2017130140A (en) 2017-07-27

Family

ID=59295720

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016010668A Pending JP2017130140A (en) 2016-01-22 2016-01-22 Data processor

Country Status (2)

Country Link
JP (1) JP2017130140A (en)
DE (1) DE102017200571A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123127A (en) * 2019-01-30 2020-08-13 日立オートモティブシステムズ株式会社 Electronic control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009245009A (en) 2008-03-28 2009-10-22 Fujitsu Ten Ltd Vehicle control device and multi-core processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020123127A (en) * 2019-01-30 2020-08-13 日立オートモティブシステムズ株式会社 Electronic control device
JP7140689B2 (en) 2019-01-30 2022-09-21 日立Astemo株式会社 electronic controller

Also Published As

Publication number Publication date
DE102017200571A1 (en) 2017-07-27

Similar Documents

Publication Publication Date Title
US9043806B2 (en) Information processing device and task switching method
WO2013186722A4 (en) Selectively controlling instruction execution in transactional processing
WO2017096917A1 (en) Method and apparatus for injecting hot patch
JP2011095952A (en) Method for updating firmware and electronic equipment
US20120226843A1 (en) Method and Computer System for Processing Data in a Memory
US9317438B2 (en) Cache memory apparatus, cache control method, and microprocessor system
JP2017130140A (en) Data processor
JP6468053B2 (en) Information processing apparatus, parallel processing program, and shared memory access method
JP2010061620A (en) Dma device and dma transfer method
JP5870043B2 (en) Start control device, information device, and start control method
US10324751B2 (en) Information processing apparatus, information processing method, and non-transitory computer-readable recording medium recording information processing program
US20120005687A1 (en) System activation method in multi-task system
US20100146332A1 (en) Data correction circuit and semiconductor integrated circuit
JP6160571B2 (en) Data processing device
CN109358903B (en) Data access device and access error notification method
US11681527B2 (en) Electronic device and multiplexing method of spatial
JP6252259B2 (en) Electronic control unit
JP2005157717A (en) Data transfer method and device
JP7124023B2 (en) controller
KR101779118B1 (en) Method for managing stack of memory
JP6073004B1 (en) Information processing device
KR101014524B1 (en) Method of reading data coherently
KR20180118699A (en) Register access control
JP2019179282A (en) Control program and control system
JP2013190929A (en) Microcomputer