JP2007219925A - Bus controller, bus control program and recording medium - Google Patents

Bus controller, bus control program and recording medium Download PDF

Info

Publication number
JP2007219925A
JP2007219925A JP2006040898A JP2006040898A JP2007219925A JP 2007219925 A JP2007219925 A JP 2007219925A JP 2006040898 A JP2006040898 A JP 2006040898A JP 2006040898 A JP2006040898 A JP 2006040898A JP 2007219925 A JP2007219925 A JP 2007219925A
Authority
JP
Japan
Prior art keywords
bus
priority
processor
task
bus master
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.)
Withdrawn
Application number
JP2006040898A
Other languages
Japanese (ja)
Inventor
Koki Hasebe
弘毅 長谷部
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.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2006040898A priority Critical patent/JP2007219925A/en
Publication of JP2007219925A publication Critical patent/JP2007219925A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a bus controller, a bus control program and a recording medium, for arbitrating a bus use right suitable for processing executed in each bus master without largely affecting processing efficiency of a processor. <P>SOLUTION: A priority control part 180 changes priority of the bus master on the basis of an execution status of a task by the processor and priority of the processing executed by the bus master. A bus arbitration device 170 sets the bus use right to a common bus 110 of the plurality of bus masters connected to the common bus 110 on the basis of the priority of the bus master. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、共有バスに接続された複数のバスマスタの、共有バスに対するバス使用権を制御するバス制御装置及びバス制御プログラムに関する。また、本発明は、このバス制御プログラムを記録したコンピュータ読み取り可能な記録媒体にも関する。   The present invention relates to a bus control device and a bus control program for controlling a bus use right for a shared bus of a plurality of bus masters connected to the shared bus. The present invention also relates to a computer-readable recording medium on which the bus control program is recorded.

近年、多くの機能を単一の集積回路により実現するシステムLSIが電気機器に一般的に使用されている。このようなシステムLSIのアーキテクチャとして、各機能モジュール間の通信の実現とLSIの低コスト化を目論み、バスマスタとして複数の機能モジュールが共通のバスに接続された共有バスアーキテクチャが採用されることが少なくない。   In recent years, system LSIs that realize many functions by a single integrated circuit are generally used in electrical equipment. As such a system LSI architecture, a shared bus architecture in which a plurality of functional modules are connected to a common bus is rarely adopted as a bus master with the aim of realizing communication between each functional module and reducing the cost of the LSI. Absent.

共有バスアーキテクチャでは、各バスマスタが共有バスを排他的に使用するための調停を行うバス調停装置が設けられる。このバス調停装置は、複数のバスマスタからの共有バス使用要求が競合した場合に、システムの正常動作及びスループットの最大化のために予め設定されたバス調停方法に基づいて、各バスマスタにバス使用権を与える。このバス調停方法として、バス調停装置によって保持された各バスマスタの優先順位に基づいて、バス使用権を要求しているバスマスタのうち、最も高い優先順位のバスマスタにバス使用権を与えるという方法がよく知られている。   In the shared bus architecture, a bus arbitration device that performs arbitration for each bus master to exclusively use the shared bus is provided. This bus arbitration device allows each bus master to use a bus usage right based on a bus arbitration method set in advance for normal operation of the system and maximization of throughput when shared bus use requests from multiple bus masters compete. give. As this bus arbitration method, based on the priority order of each bus master held by the bus arbitration device, a method of giving the bus use right to the bus master having the highest priority among the bus masters requesting the bus use right is often used. Are known.

バスマスタの優先順位を設定する方法には、バスマスタ毎に固定的に設定する方法や、カウンタと組み合わせてバスマスタ毎のバス使用率を平均化するように設定する方法など、数多くの設定方法が存在する。また、特許文献1においては、プロセッサが、バス使用権を要求する毎に自己の優先順位を設定し、バス調停装置に優先順位を通知することにより、バス調停を行うための優先順位を動的に変更する優先順位設定方法が提案されている。
特開平6−243093号公報
There are many setting methods for setting the priority order of the bus masters, such as a method for setting a fixed value for each bus master and a method for setting the bus usage rate for each bus master in combination with a counter. . In Patent Document 1, each time a processor requests a right to use a bus, the processor sets its own priority, and notifies the bus arbitration device of the priority, thereby dynamically changing the priority for bus arbitration. A priority setting method for changing to is proposed.
Japanese Patent Laid-Open No. 6-243093

しかし、上述した優先順位の設定方法のうち、バスマスタ毎に固定的に優先順位を設定する方法には、バスマスタがプロセッサの場合に次のような問題がある。バスマスタがプロセッサの場合は、システムの正常動作を保つために、システムエラー処理のような優先度が特に高い処理をプロセッサが遅滞なく実行することができるように、構成するシステムで起こりうる最悪のケースを想定してプロセッサの優先順位を充分に高く設定する必要がある。   However, among the above-described priority setting methods, the method of setting the priority fixedly for each bus master has the following problems when the bus master is a processor. When the bus master is a processor, the worst case that can occur in the system that configures the processor so that the processor can execute processing with a particularly high priority without delay, such as system error processing, in order to maintain the normal operation of the system. Therefore, it is necessary to set the processor priority sufficiently high.

しかし、そのような設定を行うと、本来、優先的にバス使用権を与えられるべきバスマスタに対して、充分なバス使用権を与えられないことと、優先順位が低くても構わない処理を実行するためにプロセッサがバス使用権を要求する場合にも、プロセッサに優先的にバス使用権が与えられるため、プロセッサ以外のバスマスタにバス使用権を与える割合が不必要に下がることとにより、システム全体の処理効率が低下するという問題がある。   However, if such a setting is made, a bus master that should originally be given a bus use right preferentially cannot be given a sufficient bus use right, and processing that may have a low priority is executed. Therefore, even when the processor requests the right to use the bus, the right to use the bus is given preferentially to the processor, and the ratio of giving the right to use the bus to the bus master other than the processor is unnecessarily reduced, so that the entire system There is a problem that the processing efficiency is reduced.

また、複数のプロセッサがバスマスタとして設けられたシステムにおいて、各プロセッサが実行するプログラムは、優先度が高いタスクと低いタスクが混在して構成されることが少なくない。このようなプログラムを、優先順位が固定されたプロセッサに実行させると、プロセッサの優先順位とタスクの優先度との間に過不足が生じてしまう。この対策として、優先度が高いタスクは優先順位が高いプロセッサに実行させ、優先度が低いタスクは優先順位が低いプロセッサに実行させるというように、タスクを実行するプロセッサをタスク毎に決定する設計方法が考えられる。   In a system in which a plurality of processors are provided as a bus master, a program executed by each processor is often composed of a mixture of tasks with high priority and tasks with low priority. When such a program is executed by a processor having a fixed priority, an excess or deficiency occurs between the priority of the processor and the priority of the task. As a countermeasure, a design method that determines a processor to execute a task for each task, such that a higher priority task is executed by a higher priority processor, and a lower priority task is executed by a lower priority processor. Can be considered.

しかし、この設計方法を、複雑かつコード量が多いプログラムを必要とするシステムに対して適用することは容易ではない。また、もし、この設計方法を適用した場合でも、本来、連続的に実行されるべきタスクが、異なるプロセッサに配置されるため、そのようなタスクを連続的に実行させることが難しくなり、プロセッサの処理効率を低下させる恐れがあるという問題がある。   However, it is not easy to apply this design method to a system that requires a complicated program with a large amount of code. Moreover, even if this design method is applied, the tasks that should be executed continuously are arranged in different processors, so that it is difficult to execute such tasks continuously. There is a problem that processing efficiency may be reduced.

これらの問題を解決するために、特許文献1においては、プロセッサがバス使用権を要求する毎に優先順位を設定する方法が提案されている。この方法によれば、バスマスタがプロセッサの場合でも、状況に応じたバス調停を行うことが可能となっている。しかし、この方法においても、以下のような問題がある。   In order to solve these problems, Patent Document 1 proposes a method of setting priorities each time a processor requests a bus use right. According to this method, even when the bus master is a processor, it is possible to perform bus arbitration according to the situation. However, this method also has the following problems.

一般的に、プロセッサが実行する命令が記述されたプログラムでは、関連性の高い命令が連続するように配置され、関連性の高い各命令の優先度が近いことが多い。また、関連性が高い複数の命令はタスクとして管理されることが多く、プロセッサが実行プログラムをメモリから取り出す場合は、タスク単位で実行プログラムを取り出している。このため、関連性が高い複数の命令は、連続するメモリ領域にまとめて格納されている。   In general, in a program in which instructions executed by a processor are described, highly related instructions are arranged consecutively, and the priority of each highly related instruction is often close. In addition, a plurality of highly related instructions are often managed as tasks, and when the processor takes out the execution program from the memory, the execution program is taken out in units of tasks. For this reason, a plurality of highly related instructions are stored together in a continuous memory area.

また、プロセッサが実行するタスクによっては、共有メモリ上に格納されているデータに対して、データを加工するための同一の命令を用いて連続的にデータ加工を行うことがある。そのようなデータ加工の途中で、データ加工を実施しているプロセッサの優先順位を変化させる必要がない場合がある。さらに、このようなデータ加工を施されるデータは、共有メモリのメモリ領域にまとめて格納されていることが多い。   Further, depending on the task executed by the processor, data stored in the shared memory may be continuously processed using the same instruction for processing the data. In the middle of such data processing, there is a case where it is not necessary to change the priority of the processor performing the data processing. Furthermore, data subjected to such data processing is often stored together in a memory area of a shared memory.

したがって、特許文献1のように、プロセッサがバスにアクセスする度に優先順位設定処理を行うことは、優先順位の変更に関して一般的なプログラム構成においては過剰な処理であり、プロセッサの処理効率が大きく低下するという問題がある。   Therefore, as in Patent Document 1, performing the priority setting process every time the processor accesses the bus is an excessive process in a general program configuration with respect to the change of the priority, and the processing efficiency of the processor is large. There is a problem of lowering.

本発明は、上述した問題点に鑑みてなされたものであって、プロセッサの処理効率に対して大きな影響を及ぼさずに、個々のバスマスタにおいて実行される処理に適したバス使用権の調停を行うことができるバス制御装置、バス制御プログラム及び記録媒体を提供することを目的とする。   The present invention has been made in view of the above-described problems, and performs arbitration of bus use right suitable for processing executed in each bus master without significantly affecting the processing efficiency of the processor. An object of the present invention is to provide a bus control device, a bus control program, and a recording medium.

本発明は、上記の課題を解決するためになされたもので、共有バスに接続された、少なくとも1つのプロセッサを含む複数のバスマスタの、前記共有バスに対するバス使用権を、前記バスマスタの優先順位に基づいて設定するバス調停手段と、前記プロセッサによるタスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、記バスマスタの優先順位を変更する優先順位制御手段とを備えたことを特徴とするバス制御装置である。   The present invention has been made in order to solve the above-described problem. The bus use right for the shared bus of a plurality of bus masters including at least one processor connected to the shared bus is assigned to the priority order of the bus master. Bus arbitration means that is set based on the priority, and priority control means that changes the priority order of the bus masters based on the task execution status by the processor and the priority of processing executed by the bus master. Is a bus control device characterized by

また、本発明のバス制御装置において、前記プロセッサは、前記タスクの実行状況を前記優先順位制御手段に通知し、前記優先順位制御手段は、前記プロセッサから通知された前記タスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更することを特徴とする。   In the bus control device of the present invention, the processor notifies the execution status of the task to the priority control means, and the priority control means includes the execution status of the task notified from the processor, and The priority order of the bus masters is changed based on the priority of processing executed by the bus master.

また、本発明のバス制御装置において、前記優先順位制御手段は、前記プロセッサによるタスクの実行状況を監視した結果、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更することを特徴とする。   In the bus control device according to the present invention, the priority control means may determine the priority of the bus master based on the result of monitoring the task execution status by the processor and the priority of processing executed by the bus master. It is characterized by changing.

また、本発明のバス制御装置において、前記優先順位制御手段は、前記プロセッサによって実行される処理単位毎に、前記バスマスタによって実行されるタスクの優先度が予め記憶された優先タスク記憶手段と、前記プロセッサを含む前記バスマスタによる前記タスクの実行状況と、前記優先タスク記憶手段によって記憶された内容とに基づいて、前記バスマスタの優先順位を変更する優先順位変更手段とを備えたことを特徴とする。   Further, in the bus control device of the present invention, the priority order control means includes priority task storage means in which priority of tasks executed by the bus master is stored in advance for each processing unit executed by the processor; Priority level changing means for changing the priority level of the bus master based on the execution status of the task by the bus master including a processor and the contents stored by the priority task storage means is provided.

また、本発明は、共有バスに接続された、少なくとも1つのプロセッサを含む複数のバスマスタの、前記共有バスに対するバス使用権を、前記バスマスタの優先順位に基づいて設定するバス調停装置を備えるバス制御装置内の前記プロセッサに、前記プロセッサによるタスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理を実行させるためのバス制御プログラムである。   Further, the present invention provides a bus control including a bus arbitration device that sets a bus use right for the shared bus of a plurality of bus masters including at least one processor connected to a shared bus based on the priority order of the bus master. A bus control program for causing the processor in the apparatus to execute a process of changing the priority of the bus master based on a task execution status by the processor and a priority of a process executed by the bus master. .

また、本発明のバス制御プログラムにおいて、前記バスマスタに第1のプロセッサと第2のプロセッサが含まれ、前記バスマスタの優先順位を変更する処理として、前記第2のプロセッサからの前記タスクの実行状況の通知、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理を前記第1のプロセッサに実行させることを特徴とする。   In the bus control program of the present invention, the bus master includes a first processor and a second processor, and the task execution status from the second processor is changed as a process of changing the priority order of the bus master. The first processor is caused to execute a process of changing the priority order of the bus master based on the notification and the priority of the process executed by the bus master.

また、本発明のバス制御プログラムにおいて、前記バスマスタに第1のプロセッサと第2のプロセッサが含まれ、前記バスマスタの優先順位を変更する処理として、前記第2のプロセッサによる前記タスクの実行状況を監視した結果、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理を前記第1のプロセッサに実行させることを特徴とする。   In the bus control program of the present invention, the bus master includes a first processor and a second processor, and the execution status of the task by the second processor is monitored as a process of changing the priority order of the bus master. Based on the result and the priority of the processing executed by the bus master, the first processor is caused to execute processing for changing the priority order of the bus master.

また、本発明のバス制御プログラムにおいて、前記バスマスタの優先順位を変更する処理として、前記プロセッサを含む前記バスマスタによる前記タスクの実行状況と、前記プロセッサによって実行される処理単位毎に予め設定された、前記バスマスタによって実行されるタスクの優先度とに基づいて、前記バスマスタの優先順位を変更する処理とを前記プロセッサに実行させることを特徴とする。   Further, in the bus control program of the present invention, as a process of changing the priority order of the bus master, the task execution status by the bus master including the processor and a processing unit executed by the processor are preset. The processor is caused to execute a process of changing the priority of the bus master based on the priority of a task executed by the bus master.

また、本発明は、上記のバス制御プログラムを記録したコンピュータ読み取り可能な記録媒体である。   The present invention is also a computer-readable recording medium on which the above bus control program is recorded.

本発明によれば、プロセッサにより実行されるタスクの実行状況と、各バスマスタにより実行される処理の優先度とに応じてバスマスタの優先順位を変更することによって、プロセッサの処理効率に対して大きな影響を及ぼさずに、個々のバスマスタにおいて実行される処理に適したバス使用権の調停を行うことができるという効果が得られる。   According to the present invention, the priority of the bus master is changed according to the execution status of the task executed by the processor and the priority of the processing executed by each bus master, thereby greatly affecting the processing efficiency of the processor. Thus, the bus use right arbitration suitable for the processing executed in each bus master can be performed.

以下、図面を参照し、本発明の実施形態を説明する。図1は、本発明の一実施形態によるバス制御装置を備えたLSI100の構成を示している。バスマスタであるメインプロセッサ120と、第1のサブプロセッサ130と、第2のサブプロセッサ140と、ハードウェアIP150とがバス110に接続されている。ハードウェアIP150は、特定の処理を行う専用の回路であり、例えば画像処理回路である。各プロセッサはプログラムを実行し、ハードウェアIP150はハードウェア処理を実行する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration of an LSI 100 including a bus control device according to an embodiment of the present invention. A main processor 120 that is a bus master, a first sub-processor 130, a second sub-processor 140, and a hardware IP 150 are connected to the bus 110. The hardware IP 150 is a dedicated circuit that performs specific processing, and is, for example, an image processing circuit. Each processor executes a program, and the hardware IP 150 executes hardware processing.

これらの複数のバスマスタは、個々のバスマスタでの処理を実行するために、バス110に接続されたスレーブであるメモリコントローラ160を介してメモリ190と通信を行う。また、各バスマスタのバス使用権を調停するバス調停装置170がバス110に接続されている。バス調停装置170は、各バスマスタの優先順位を記憶する優先順位レジスタ171を備えている。バス調停装置170は、複数のバスマスタからのバス使用権の要求が競合した場合に、優先順位レジスタ171によって記憶された各バスマスタの優先順位に基づいて、バス使用権を要求しているバスマスタのうち、最も高い優先順位を有するバスマスタにバス使用権を与える。この優先順位レジスタ171の値は、プロセッサが各バスマスタの優先順位の変更を要求した際に、バス調停装置170と接続された優先順位制御部180によって、新しい優先順位を表す値に設定される。   The plurality of bus masters communicate with the memory 190 via the memory controller 160, which is a slave connected to the bus 110, in order to execute processing in each bus master. In addition, a bus arbitration device 170 that arbitrates the bus use right of each bus master is connected to the bus 110. The bus arbitration device 170 includes a priority order register 171 that stores the priority order of each bus master. The bus arbitration device 170, when there are conflicting requests for bus usage rights from a plurality of bus masters, based on the priority order of each bus master stored in the priority order register 171, The right to use the bus is given to the bus master having the highest priority. The value of the priority order register 171 is set to a value representing a new priority order by the priority order control unit 180 connected to the bus arbitration device 170 when the processor requests a change in the priority order of each bus master.

優先順位制御部180は、各プロセッサによるタスクの実行状況と、バスマスタにより実行される処理の優先度とに基づいて、優先順位レジスタ171に格納されているバスマスタの優先順位を変更する。この優先順位制御部180は、シーケンスID記憶部181、優先タスクテーブル182、タスクID記憶部183、タスクID取得部184、及び優先順位設定部185を備えている。各部の詳細は後述する。   The priority order control unit 180 changes the priority order of the bus master stored in the priority order register 171 based on the task execution status by each processor and the priority of processing executed by the bus master. The priority order control unit 180 includes a sequence ID storage unit 181, a priority task table 182, a task ID storage unit 183, a task ID acquisition unit 184, and a priority order setting unit 185. Details of each part will be described later.

次に、図2を参照し、メインプロセッサ120の動作を説明する。LSI100の動作要求に応じて、メインプロセッサ120は起動し(ステップS201)、装置全体の制御を行うメイン処理(メインタスク)の実行を開始する(ステップS202)。装置全体の制御は、通常、複数の機能を順番に駆動することによって実現される。このような複数の機能を順番に駆動するための命令の集合を、以下、シーケンスと称する。   Next, the operation of the main processor 120 will be described with reference to FIG. In response to the operation request of the LSI 100, the main processor 120 is activated (step S201) and starts executing a main process (main task) for controlling the entire apparatus (step S202). Control of the entire apparatus is usually realized by sequentially driving a plurality of functions. A set of instructions for sequentially driving such a plurality of functions is hereinafter referred to as a sequence.

また、本実施形態においては、図5のように、メインプロセッサ120が実行中のシーケンスを表すシーケンスID(SEQ_ID)がメインプログラムに予め埋め込まれている。このシーケンスIDは、各バスマスタの優先順位の変更を要する場合に更新される。しかし、後述するタスクIDの量が少ない場合は、特にシーケンスIDを変化させる必要はなく、また、その場合はシーケンスIDそのものをメインプログラムに残しておく必要はない。後述するように、シーケンスIDには、優先タスクテーブル182のアドレスと同じ値が用いられている。   In this embodiment, as shown in FIG. 5, a sequence ID (SEQ_ID) representing a sequence being executed by the main processor 120 is embedded in the main program in advance. This sequence ID is updated when the priority order of each bus master needs to be changed. However, when the amount of task IDs to be described later is small, it is not necessary to change the sequence ID. In that case, it is not necessary to leave the sequence ID itself in the main program. As will be described later, the same value as the address of the priority task table 182 is used for the sequence ID.

メイン処理の実行が終了しない限り(ステップS203でNOの場合)、メインプロセッサ120は、メインプログラム中にシーケンスIDの更新命令が記述されているか否かを判断する(ステップS204)。シーケンスIDの更新命令を検出した場合、メインプロセッサ120は優先順位変更要求と新たなシーケンスIDを優先順位制御部へ送信し(ステップS205)、新たなシーケンスの処理を実行する(ステップS202)。一方、ステップS204において、シーケンスIDの更新命令を検出しなかった場合(ステップS204でNOの場合)、メインプロセッサ120はメイン処理の実行を継続する(ステップS202)。以上のような動作を、メイン処理が終了する(ステップS203でYESの場合)まで継続する。   As long as the execution of the main process does not end (NO in step S203), the main processor 120 determines whether or not a sequence ID update instruction is described in the main program (step S204). When a sequence ID update command is detected, the main processor 120 transmits a priority change request and a new sequence ID to the priority control unit (step S205), and executes a new sequence process (step S202). On the other hand, if the sequence ID update command is not detected in step S204 (NO in step S204), the main processor 120 continues to execute the main process (step S202). The above operation is continued until the main process ends (in the case of YES in step S203).

次に、図3を参照し、第1のサブプロセッサ130及び第2のサブプロセッサ140の動作を説明する。LSI100の動作要求またはメインプロセッサ120からの動作要求に応じてサブプロセッサは起動し(ステップS301)、初めに割り振られたタスクの実行を開始する(ステップS302)。全タスクの実行が完了する前に(ステップS303でNOの場合)、タスクの実行により、タスクの切り替えが生じた場合は(ステップS304でYESの場合)、サブプロセッサは該当タスクのタスクIDを所定の場所から取り出す(ステップS305)。また、タスクの切り替えが生じていない場合(ステップS304でNOの場合)には、サブプロセッサはタスクの実行を続行する(ステップS302)。   Next, operations of the first sub-processor 130 and the second sub-processor 140 will be described with reference to FIG. The sub processor is activated in response to the operation request of the LSI 100 or the operation request from the main processor 120 (step S301), and starts executing the task allocated first (step S302). If task switching has occurred due to task execution before execution of all tasks is completed (in the case of NO in step S303), the sub processor assigns the task ID of the corresponding task to a predetermined value. (Step S305). If task switching has not occurred (NO in step S304), the sub processor continues to execute the task (step S302).

このタスクIDは、タスク毎にタスク内部のプログラムに埋め込んでも構わないし、OSが一括管理するように用意したテーブルに設定しておいても構わない。また、このタスクIDとして、複数のタスクに共通のIDを割り振ってもよいし、単一のタスク毎にIDを割り振ってもよい。例えば、ある機能を実現するために必要な複数のタスクには共通のIDを割り振り、あるエラー処理を行うタスクには特徴的なIDを割り振るということが可能である。また、タスクIDは、プログラムのタスクに割り振られるだけではなく、便宜的に、ハードウェアIP150で実行されているハードウェア処理に対しても割り振られる。   The task ID may be embedded in a program inside the task for each task, or may be set in a table prepared so that the OS can collectively manage the task ID. As the task ID, a common ID may be assigned to a plurality of tasks, or an ID may be assigned to each single task. For example, it is possible to assign a common ID to a plurality of tasks necessary for realizing a certain function, and to assign a characteristic ID to a task that performs a certain error processing. The task ID is not only assigned to the task of the program, but is also assigned to the hardware process executed by the hardware IP 150 for convenience.

ステップS305に続いて、サブプロセッサは、次に実行するタスクのタスクIDと、それまで実行していたタスクのタスクIDとを比較する(ステップS306)。それらのタスクIDが一致する場合は、サブプロセッサは、優先順位を変更する必要がないと判定し、次のタスクの実行を開始する(ステップS308)。一方、IDが一致しない場合は、サブプロセッサは、優先順位を変更する必要があると判定し、優先順位変更要求と、次に実行するタスクのタスクIDとを優先順位制御部180へ送信し(ステップS307)、次のタスクの実行を開始する(ステップS308)。ステップS308に続いて、処理はステップS302に戻る。サブプロセッサは、以上のような動作を繰り返し、全てのタスクの実行を終えた場合は(ステップS303でYESの場合)、その動作を終了する。   Subsequent to step S305, the sub processor compares the task ID of the next task to be executed with the task ID of the task that has been executed so far (step S306). If the task IDs match, the sub processor determines that it is not necessary to change the priority, and starts executing the next task (step S308). On the other hand, if the IDs do not match, the sub-processor determines that the priority needs to be changed, and sends a priority change request and the task ID of the task to be executed next to the priority control unit 180 ( Step S307), the execution of the next task is started (Step S308). Following step S308, processing returns to step S302. The sub-processor repeats the operation as described above, and when the execution of all tasks is completed (YES in step S303), the operation ends.

次に、各バスマスタにおいて実行されるタスクが図7のような時間変化をする場合を例に、優先順位の設定方法をより具体的に説明する。時間T0において、メインプロセッサ120はメイン処理を実行中であり、第1のサブプロセッサ130はタスクxを実行中であり、第2のサブプロセッサ140はタスクyを実行中であり、ハードウェアIP150はハードウェア処理を実行中である。優先順位制御部180のタスクID記憶部183は、第1のサブプロセッサ130及び第2のサブプロセッサ140によって実行されるタスクのIDを記憶する。ここで、バス110に接続された各バスマスタを図8のようにタスクID記憶部183のアドレスにラベル付けすると、時間T0においてタスクID記憶部183によって記憶されているデータは図9の通りである。   Next, the priority setting method will be described more specifically by taking as an example the case where the task executed in each bus master changes with time as shown in FIG. At time T0, the main processor 120 is executing main processing, the first sub-processor 130 is executing task x, the second sub-processor 140 is executing task y, and the hardware IP 150 is Hardware processing is being executed. The task ID storage unit 183 of the priority control unit 180 stores the IDs of tasks executed by the first sub processor 130 and the second sub processor 140. Here, when each bus master connected to the bus 110 is labeled to the address of the task ID storage unit 183 as shown in FIG. 8, the data stored in the task ID storage unit 183 at time T0 is as shown in FIG. .

優先順位制御部180の優先タスクテーブル182は、メインプロセッサ120によって実行されるメイン処理内のシーケンス毎に、各バスマスタによって実行されるタスクの優先度を予め記憶する。図6は、優先タスクテーブル182によって記憶されているデータを示している。優先タスクテーブル182のアドレスは、メインプロセッサ120によって実行されるメイン処理内のシーケンスに対応したシーケンスIDと一致している。シーケンスID毎に、各プロセッサ及びハードウェアIP150によって実行されるタスクの優先順位が予め優先タスクテーブル182によって記憶されている。   The priority task table 182 of the priority order control unit 180 stores in advance the priority of tasks executed by each bus master for each sequence in the main process executed by the main processor 120. FIG. 6 shows data stored in the priority task table 182. The address of the priority task table 182 matches the sequence ID corresponding to the sequence in the main process executed by the main processor 120. The priority order of tasks executed by each processor and hardware IP 150 is stored in advance in the priority task table 182 for each sequence ID.

図5によれば、時間T0においてメインプロセッサ120により実行されるメイン処理のシーケンスIDは0x10なので、このシーケンスにおいて実行されるタスクのIDが優先順に並べられたデータは図6のアドレス0x10のデータである。このデータによると、該当シーケンス内で実行されるタスクは、優先順位が高い順に、タスクn、メイン処理、タスクx、タスクy、ハードウェア処理、タスクmとなっている。   According to FIG. 5, since the sequence ID of the main process executed by the main processor 120 at time T0 is 0x10, the data in which task IDs executed in this sequence are arranged in priority order is the data at address 0x10 in FIG. is there. According to this data, the tasks executed in the corresponding sequence are task n, main process, task x, task y, hardware process, and task m in descending order of priority.

このタスクの優先順位に基づいて、図9に示される各タスクの優先順位を比較すると、時間T0において実行中のタスクは、優先順位が高い順に、メイン処理、タスクx、タスクy、ハードウェア処理となる。この順序通りに、それぞれのタスクを実行しているバスマスタに置き換えると、バスマスタの優先順位が明らかになる。つまり、時間T0におけるバスマスタの優先順位は、高い順に、メインプロセッサ120、第1のサブプロセッサ130、第2のサブプロセッサ140、ハードウェアIP150と設定される。図13はこのときの優先順位レジスタ171の記憶内容を示している。   When comparing the priorities of the tasks shown in FIG. 9 based on the priorities of the tasks, the tasks being executed at the time T0 are the main process, task x, task y, and hardware process in descending order of priority. It becomes. By replacing the bus master executing each task in this order, the priority order of the bus master becomes clear. That is, the priority order of the bus master at time T0 is set to the main processor 120, the first sub-processor 130, the second sub-processor 140, and the hardware IP 150 in descending order. FIG. 13 shows the stored contents of the priority order register 171 at this time.

処理時間が経過し、時間T1において、第1のサブプロセッサ130はタスクxの実行を終え、タスクmの実行を開始する。この新たなタスクmに対して、タスクxと異なるタスクIDが割り振られているとすると、この実行タスクの切り替えには優先順位変更が伴う。そのため、第1のサブプロセッサ130は、優先順位制御部180に対して優先順位の変更を要求し、同時にタスクmのタスクIDを通知する。優先順位制御部180は、優先順位変更要求を検出すると、要求元のバスマスタを判別し、タスクID記憶部183の該当アドレスに新たな実行タスクのタスクIDを格納する。図10はこのときのタスクID記憶部183の記憶内容を示している。   The processing time elapses, and at time T1, the first sub-processor 130 finishes executing task x and starts executing task m. If a task ID different from the task x is assigned to the new task m, the switching of the execution task is accompanied by a change in priority. For this reason, the first sub-processor 130 requests the priority control unit 180 to change the priority, and simultaneously notifies the task ID of the task m. When detecting the priority change request, the priority control unit 180 determines the requesting bus master, and stores the task ID of the new execution task at the corresponding address in the task ID storage unit 183. FIG. 10 shows the stored contents of the task ID storage unit 183 at this time.

図5によれば、時間T0とT1の間でシーケンスIDには変更がないので、参照済みのシーケンスIDにおけるタスクの優先順位と、各バスマスタにおいて実行されるタスクとが比較される。その比較結果より、時間T1において実行中のタスクは、優先順位が高い順に、メイン処理、タスクy、ハードウェア処理、タスクmとなる。したがって、各バスマスタの優先順位は、高い順に、メインプロセッサ120、第2のサブプロセッサ140、ハードウェアIP150、第1のサブプロセッサ130と設定される。図14はこのときの優先順位レジスタ171の記憶内容を示している。   According to FIG. 5, since there is no change in the sequence ID between times T0 and T1, the priority of the task in the referenced sequence ID is compared with the task executed in each bus master. From the comparison result, the tasks being executed at time T1 are main processing, task y, hardware processing, and task m in descending order of priority. Therefore, the priority order of each bus master is set to the main processor 120, the second sub processor 140, the hardware IP 150, and the first sub processor 130 in descending order. FIG. 14 shows the stored contents of the priority order register 171 at this time.

続いて、時間T2において、第2のサブプロセッサ140はタスクyの実行を終え、タスクnの実行を開始する。この新たなタスクnに対して、タスクyと異なるタスクIDを割り振られているとすると、この実行タスクの切り替えには優先順位変更が伴う。そのため、第2のサブプロセッサ140は、優先順位制御部180に対して優先順位の変更を要求し、同時にタスクnのタスクIDを通知する。優先順位制御部180は、優先順位変更要求を検出すると、要求元のバスマスタを判別し、タスクID記憶部183の該当アドレスに新たな実行タスクのタスクIDを格納する。図11はこのときのタスクID記憶部183の記憶内容を示している。   Subsequently, at time T2, the second sub-processor 140 finishes executing task y and starts executing task n. If a task ID different from the task y is assigned to the new task n, the switching of the execution task involves a change in priority. For this reason, the second sub-processor 140 requests the priority control unit 180 to change the priority, and simultaneously notifies the task ID of the task n. When detecting the priority change request, the priority control unit 180 determines the requesting bus master, and stores the task ID of the new execution task at the corresponding address in the task ID storage unit 183. FIG. 11 shows the stored contents of the task ID storage unit 183 at this time.

図5によれば、時間T1とT2の間でシーケンスIDには変更がないので、参照済みのシーケンスIDにおけるタスクの優先順位と、各バスマスタにおいて実行されるタスクとが比較される。その比較結果より、時間T2において実行中のタスクは、優先順位が高い順に、タスクn、メイン処理、ハードウェア処理、タスクmとなる。したがって、各バスマスタの優先順位は、高い順に、第2のサブプロセッサ140、メインプロセッサ120、ハードウェアIP150、第1のサブプロセッサ130と設定される。図15はこのときの優先順位レジスタ171の記憶内容を示している。   According to FIG. 5, since there is no change in the sequence ID between times T1 and T2, the priority of the task in the referenced sequence ID is compared with the task executed in each bus master. From the comparison result, the tasks being executed at time T2 are task n, main process, hardware process, and task m in descending order of priority. Therefore, the priority order of each bus master is set to the second sub processor 140, the main processor 120, the hardware IP 150, and the first sub processor 130 in descending order. FIG. 15 shows the stored contents of the priority order register 171 at this time.

さらに処理時間が経過すると、時間T3において、メイン処理のシーケンスが変化する(図5)。この場合、メインプロセッサ120は優先順位制御部180に優先順位の変更を要求する。また、同時にメインプロセッサ120は新たなシーケンスのシーケンスIDを優先順位制御部180に通知する。ここで、新たなシーケンスIDは、図5に示されるように0x11である。優先順位制御部180は、優先順位変更要求を検出すると、新たなシーケンスIDである0x11をアドレスとして、優先タスクテーブル182を参照する(図6)。   When the processing time further elapses, the main processing sequence changes at time T3 (FIG. 5). In this case, the main processor 120 requests the priority control unit 180 to change the priority. At the same time, the main processor 120 notifies the priority control unit 180 of the sequence ID of the new sequence. Here, the new sequence ID is 0x11 as shown in FIG. When detecting the priority change request, the priority control unit 180 refers to the priority task table 182 using the new sequence ID 0x11 as an address (FIG. 6).

図6によれば、新たなシーケンスにおいて実行されるタスクは、優先度が高い順に、メイン処理、タスクn、タスクm、タスクu、タスクv、ハードウェア処理である。時間T2とT3のそれぞれにおけるタスクID記憶部183の記憶内容を示す図11と図12によれば、各バスマスタにおいて実行されているタスクは、時間T2と時間T3において変化はない。時間T0〜T2と同様にして、該当シーケンスにおけるタスクの優先順位と、実行中のタスクとを比較すると、実行中のタスクの優先順位は、高い順に、メイン処理、タスクn、タスクm、ハードウェア処理となる。したがって時間T3における各バスマスタの優先順位は、高い順に、メインプロセッサ120、第2のサブプロセッサ140、第1のサブプロセッサ130、ハードウェアIP150となる。図16はこのときの優先順位レジスタ171の記憶内容を示している。   According to FIG. 6, the tasks executed in the new sequence are main processing, task n, task m, task u, task v, and hardware processing in descending order of priority. According to FIG. 11 and FIG. 12 showing the storage contents of the task ID storage unit 183 at each of the times T2 and T3, the task being executed in each bus master does not change at the times T2 and T3. Similar to the times T0 to T2, when the priority of the task in the corresponding sequence is compared with the task being executed, the priority of the task being executed is the main process, task n, task m, hardware It becomes processing. Therefore, the priority order of each bus master at time T3 is the main processor 120, the second sub-processor 140, the first sub-processor 130, and the hardware IP 150 in descending order. FIG. 16 shows the stored contents of the priority order register 171 at this time.

次に、図4を参照し、上述した優先順位の設定方法に係る優先順位制御部180の動作を説明する。LSI100の動作が開始すると、優先順位制御部180は起動し(ステップS401)、優先順位変更要求を検出するか、制御を終了するまで待機する(ステップS402)。制御を続行し(ステップS403でNOの場合)、優先順位変更要求を検出した場合(ステップS404でYESの場合)、優先順位制御部180は、その優先順位変更要求がメインプロセッサ120からの要求か、第1もしくは第2のサブプロセッサ(130,140)からの要求かを判別する(ステップS405)。   Next, the operation of the priority control unit 180 according to the above-described priority setting method will be described with reference to FIG. When the operation of the LSI 100 starts, the priority control unit 180 is activated (step S401), and waits until the priority change request is detected or the control is finished (step S402). If the control is continued (NO in step S403) and a priority change request is detected (YES in step S404), the priority control unit 180 determines whether the priority change request is a request from the main processor 120. It is determined whether the request is from the first or second sub-processor (130, 140) (step S405).

その優先順位変更要求が第1もしくは第2のサブプロセッサ(130,140)からの要求である場合、優先順位制御部180は、優先順位の変更を要求しているバスマスタを判別し(ステップS406)、タスクID記憶部183の該当領域に新たなタスクIDを格納する(ステップS407)。続いて、ステップS410の処理が行われる。一方、優先順位変更要求がメインプロセッサ120からの要求である場合、優先順位制御部180はシーケンスID記憶部181に新たなシーケンスIDを格納する(ステップS408)。続いて、タスクID取得部184は、新たなシーケンスIDをアドレスとして優先タスクテーブル182を参照し、該当シーケンス内で実行されるタスクのIDと、そのタスクに対応する優先度とが記録されているデータを取り出して優先順位設定部185へ出力する(ステップS409)。続いて、ステップS410の処理が行われる。   If the priority change request is a request from the first or second sub-processor (130, 140), the priority control unit 180 determines the bus master requesting the priority change (step S406). The new task ID is stored in the corresponding area of the task ID storage unit 183 (step S407). Subsequently, the process of step S410 is performed. On the other hand, when the priority order change request is a request from the main processor 120, the priority order control unit 180 stores a new sequence ID in the sequence ID storage unit 181 (step S408). Subsequently, the task ID acquisition unit 184 refers to the priority task table 182 using the new sequence ID as an address, and records the ID of the task executed in the corresponding sequence and the priority corresponding to the task. The data is extracted and output to the priority order setting unit 185 (step S409). Subsequently, the process of step S410 is performed.

ステップS407及びステップS409に続いて、優先順位設定部185は、各バスマスタが実行するタスクのIDと、該当シーケンスにおいて優先的に実行されるタスクのIDとを比較し、優先度が高いタスクを実行するバスマスタから順に、高い優先順位を設定(決定)する(ステップS411)。これにより、優先順位設定部185は、各プロセッサを含むバスマスタによるタスクの実行状況と優先タスクテーブル182の記憶内容とに基づいて各バスマスタの優先順位を設定することになる。全てのバスマスタについて新たな優先順位が設定(決定)されたら、優先順位設定部185は適切なタイミングでバス調停装置170の優先順位レジスタ171に新たな優先順位を設定する(ステップS412)。ステップS412に続いて、処理はステップS402に戻る。優先順位制御部180は、制御が終了する(ステップS403でYESの場合)まで、以上のような動作を繰り返す。   Subsequent to step S407 and step S409, the priority order setting unit 185 compares the task ID executed by each bus master with the task ID executed preferentially in the corresponding sequence, and executes the task with the higher priority. The higher priority is set (determined) in order from the bus master to be executed (step S411). Thus, the priority order setting unit 185 sets the priority order of each bus master based on the task execution status by the bus master including each processor and the stored contents of the priority task table 182. When new priority levels are set (determined) for all the bus masters, the priority level setting unit 185 sets a new priority level in the priority level register 171 of the bus arbitration device 170 at an appropriate timing (step S412). Following step S412, the process returns to step S402. The priority control unit 180 repeats the above operation until the control is completed (YES in step S403).

なお、ハードウェアIP150、メモリコントローラ160、及びメモリ190の動作は本発明の要点とは関係がないため、これらの各部の動作説明は省略する。   Note that the operations of the hardware IP 150, the memory controller 160, and the memory 190 are not related to the main points of the present invention, and thus the description of the operations of these units is omitted.

次に、本実施形態に対する付加説明を行う。本実施形態では、メインプロセッサ120によって実行されるメイン処理内のシーケンス毎に、各バスマスタによって実行されるタスクの優先度が予め設定されている(図5及び図6参照)。以下、このような設定を行う具体例を説明する。システムに電源が投入された直後、まずシステム内の各部に初期設定が行われる。この初期設定に係る処理は、メインプロセッサ120のメイン処理によって実行される。初期設定を他のバスマスタよりも優先して行うため、メイン処理の優先順位は最も高く設定される。   Next, additional explanation to the present embodiment will be given. In this embodiment, the priority of the task executed by each bus master is set in advance for each sequence in the main process executed by the main processor 120 (see FIGS. 5 and 6). Hereinafter, a specific example for performing such setting will be described. Immediately after the system is turned on, initial settings are first made in each part of the system. The process related to the initial setting is executed by the main process of the main processor 120. Since the initial setting is performed with priority over other bus masters, the priority order of the main processing is set highest.

システム内の各部の初期設定が終了し、メイン処理の優先度を最も高く設定しておく必要がなくなった場合は、メイン処理の優先順位が下がるように設定される。この例では、電源投入直後からシステム内の全てに初期設定が終了するまでが1つのシーケンスとして設定されると共に、初期設定の終了後に別のシーケンスが設定され、各シーケンスに対して異なるシーケンスIDが付与される。   When the initial setting of each unit in the system is completed and it is no longer necessary to set the priority of the main process to the highest level, the priority of the main process is set to be lowered. In this example, one sequence is set immediately after the power is turned on until the initial setting is completed in the entire system, and another sequence is set after the initial setting is completed, and a different sequence ID is assigned to each sequence. Is granted.

また、本実施形態においては、優先順位制御部180がハードウェアとして設けられているが、システム構成に応じて、プロセッサで実行するソフトウェア処理として優先順位制御部180を実装することも、勿論、可能である。優先順位制御部180をソフトウェア処理として実装した場合には、ハードウェアとして実装した場合と比較して、回路規模を削減することができる。優先順位制御部180をソフトウェア処理として実装する場合、図4に示す優先順位制御部180の動作をプログラム化してコンピュータ読み取り可能な記録媒体に記録し、この記録媒体に記録されたプログラムをシステム内部のいずれか1つのプロセッサに読み込ませ、実行させればよい。   In the present embodiment, the priority order control unit 180 is provided as hardware, but it is of course possible to implement the priority order control unit 180 as software processing executed by the processor according to the system configuration. It is. When the priority control unit 180 is implemented as software processing, the circuit scale can be reduced as compared with the case where it is implemented as hardware. When the priority control unit 180 is implemented as software processing, the operation of the priority control unit 180 shown in FIG. 4 is programmed and recorded on a computer-readable recording medium, and the program recorded on the recording medium is stored in the system. Any one of the processors may be read and executed.

ここで、「コンピュータ」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。   Here, the “computer” includes a homepage providing environment (or display environment) if the WWW system is used. The “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and a hard disk built in the computer. Further, the “computer-readable recording medium” refers to a volatile memory (RAM) in a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, those holding programs for a certain period of time are also included.

また、上述したプログラムは、このプログラムを記憶装置等に格納したコンピュータから、伝送媒体を介して、あるいは伝送媒体中の伝送波により他のコンピュータに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように、情報を伝送する機能を有する媒体のことをいう。また、上述したプログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能を、コンピュータに既に記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   The program described above may be transmitted from a computer storing the program in a storage device or the like to another computer via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting a program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the above-described program may be for realizing a part of the above-described function. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer, what is called a difference file (difference program) may be sufficient.

また、本実施形態においては、各プロセッサが、タスクの実行状況に応じて優先順位変更要求を優先順位制御部180に通知することにより優先順位設定処理を行っていたが、システムの構成に応じて、優先順位制御部180が各プロセッサのタスクの実行状況を監視し、優先順位変更を要すると判断した場合に優先順位設定処理を行うようにしても構わない。したがって、優先順位制御部180をソフトウェア処理として実装する場合は、優先順位設定を行う要因を割り込みとして処理しても構わないし、ポーリングとして処理しても構わない。すなわち、優先順位制御部180の機能を実現するプログラムを実施するプロセッサ(第1のプロセッサとする)に対して、他のプロセッサ(第2のプロセッサ)が優先順位の変更要求を通知してもよいし、第1のプロセッサが、第2のプロセッサによるタスクの実行状況を監視してもよい。   Further, in this embodiment, each processor performs the priority setting process by notifying the priority control unit 180 of a priority change request according to the task execution status, but depending on the system configuration, The priority order control unit 180 may monitor the task execution status of each processor and perform priority order setting processing when it is determined that the priority order needs to be changed. Therefore, when the priority order control unit 180 is implemented as software processing, the factor for setting the priority order may be processed as an interrupt or may be processed as polling. That is, another processor (second processor) may notify a priority change request to a processor (referred to as a first processor) that executes a program that implements the function of the priority control unit 180. However, the first processor may monitor the task execution status by the second processor.

また、本実施形態においては、バス調停装置170では、優先順位が最も高いバスマスタにバス使用権を与える方法により、バス使用権の調停を行っていた。しかし、この方法に限らず、優先順位レジスタを有するバス調停装置が設けられたバスシステムならば、本実施形態と、バス使用権の獲得回数を平均化するような公知技術とを組み合わせて使用することも可能である。   In this embodiment, the bus arbitration device 170 arbitrates the bus use right by a method of giving the bus use right to the bus master having the highest priority. However, the present invention is not limited to this method, and if the bus system is provided with a bus arbitration device having a priority order register, the present embodiment is used in combination with a known technique that averages the number of acquisition times of the bus use right. It is also possible.

また、本実施形態におけるシーケンスIDは、メインプロセッサが実行するメインプログラムの実行中のシーケンスを示すIDとしていたが、メインプロセッサが実行するメインプログラム中のタスクのIDを通知するように変形させても構わない。   Further, the sequence ID in the present embodiment is an ID indicating a sequence during execution of the main program executed by the main processor. However, the sequence ID may be modified so as to notify the ID of the task in the main program executed by the main processor. I do not care.

また、本実施形態におけるタスクIDそのものを優先順位とすることもできるが、システムを構成する上では好ましくない。なぜなら、タスクIDを優先順位とすると、バスマスタの優先順位が固定的になってしまうため、バスマスタの実行しているタスクは変わらないが、バスマスタの優先順位を変更する必要が生じた場合に、優先順位変更に対応することが難しくなるからである。また、システムを拡張して外部装置が接続される場合、その外部装置を接続するインタフェースの優先順位を予め想定しておくことは難しく、もし、適当な優先順位を設定したとしても、優先度の過不足が生じる可能性がある。したがって、本実施形態においてはタスクIDと優先順位とはそれぞれ区別されている。   In addition, although the task ID itself in this embodiment can be set as a priority, it is not preferable in configuring the system. This is because if the task ID is a priority, the bus master's priority is fixed, so the task being executed by the bus master does not change, but it is necessary to change the bus master's priority. This is because it becomes difficult to respond to the change of rank. Also, when an external device is connected by expanding the system, it is difficult to assume the priority order of the interface to which the external device is connected in advance, and even if an appropriate priority order is set, the priority level Excess or deficiency may occur. Therefore, in this embodiment, the task ID and the priority order are distinguished from each other.

また、本実施形態におけるタスクIDやシーケンスIDを直接的に取り扱っていたが、必要に応じて、IDのエンコードやデコードを行う構成にしても構わない。例えば、システム全体が取り扱うIDが大量にある場合、転送線、レジスタやメモリのビット数も増大するため、IDのエンコードやデコードを行い、LSIやメモリの規模を抑えることが望ましい。   In addition, although the task ID and sequence ID in this embodiment are directly handled, the ID may be encoded or decoded as necessary. For example, when there are a large number of IDs handled by the entire system, the number of transfer lines, registers, and memory bits also increases, so it is desirable to encode and decode IDs to reduce the scale of LSIs and memories.

上述したように、本実施形態によるバス制御装置では、プロセッサにより実行されるタスクの実行状況と、各バスマスタにより実行される処理(タスク)の優先度とに応じて、プロセッサの処理効率に対して大きな影響を及ぼさずに、バスマスタの優先順位を動的に変更することができ、個々のバスマスタにおいて実行される処理に適したバス使用権の調停を行うことができる。   As described above, in the bus control device according to the present embodiment, the processing efficiency of the processor depends on the execution status of the task executed by the processor and the priority of the processing (task) executed by each bus master. The priority order of the bus masters can be dynamically changed without exerting a great influence, and the bus use right suitable for the processing executed in each bus master can be arbitrated.

特に、バスマスタの優先順位が、各バスマスタにより実行される処理の優先度に基づいて決定されるため、プロセッサと、そのプロセッサで実行させるタスクとを固定的に設計する必要がない。これにより、プロセッサの優先順位が固定されたシステムと比較して、容易にシステムを設計することが可能である。したがって、従来、プロセッサの優先順位が固定されたシステムでは、システム全体あるいはプロセッサの処理効率が低下するという問題が発生していたが、本実施形態によれば、システム全体あるいはプロセッサの処理効率に対する影響を少なくすることができる。   In particular, since the priority order of the bus masters is determined based on the priority of processing executed by each bus master, it is not necessary to design a processor and a task to be executed by the processor in a fixed manner. As a result, the system can be easily designed as compared with a system in which the priority order of processors is fixed. Therefore, conventionally, in a system in which the priority order of processors is fixed, there has been a problem that the processing efficiency of the entire system or the processor is lowered. However, according to the present embodiment, the influence on the processing efficiency of the entire system or the processor. Can be reduced.

また、本実施形態によれば、関連性が高い複数の命令が記述されたプログラムをメモリから読み出す場合や、共有メモリ上のデータに対して、同一の命令を用いて連続的にデータ加工を行う場合には、一連の処理の実行に係るタスクの優先度を同一に設定することによって、プロセッサの優先順位を変化させないようにすることができる。これにより、プロセッサがバス使用権を要求する毎に優先順位を設定するシステムと比較して、プロセッサの処理効率の低下を抑えることができる。   Further, according to this embodiment, when a program in which a plurality of highly related instructions are described is read from the memory, or data on the shared memory is continuously processed using the same instruction. In this case, it is possible to prevent the priority order of the processors from being changed by setting the priorities of tasks related to the execution of a series of processes to be the same. As a result, a decrease in the processing efficiency of the processor can be suppressed as compared with a system in which a priority is set every time the processor requests a bus use right.

なお、優先順位制御部をLSIの外部に設けることも可能だが、そのようなシステムを構築した場合には、LSIと優先順位制御部の同期制御を行う必要があるし、両者間の通信の遅延が増大する。そのため、優先順位の切り替えが遅くなり、プロセッサの処理効率が低下する可能性がある。本実施形態によるバス制御装置では、LSI内部のプロセッサが、実行すべきタスクを連続的に実行しながら、優先順位制御部が動的に適切な優先順位を設定するため、バスマスタの優先順位制御や、プロセッサが実行すべきタスクの割り振りをLSI外部から行う必要がなく、LSI内部で動的な優先順位制御を完結することが可能である。   Although the priority control unit can be provided outside the LSI, when such a system is constructed, it is necessary to perform synchronization control between the LSI and the priority control unit, and a delay in communication between the two. Will increase. For this reason, switching of the priority order is delayed, and the processing efficiency of the processor may be reduced. In the bus control device according to the present embodiment, the priority control unit dynamically sets an appropriate priority while the processor in the LSI continuously executes tasks to be executed. It is not necessary to allocate tasks to be executed by the processor from outside the LSI, and dynamic priority control can be completed inside the LSI.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   The embodiment of the present invention has been described in detail above with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design changes and the like without departing from the gist of the present invention.

本発明の一実施形態によるバス制御装置を備えたLSIの構成を示すブロック図である。It is a block diagram which shows the structure of LSI provided with the bus control apparatus by one Embodiment of this invention. 本発明の一実施形態によるLSIが備えるメインプロセッサの動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the main processor with which LSI by one Embodiment of this invention is provided. 本発明の一実施形態によるLSIが備えるサブプロセッサの動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the subprocessor with which LSI by one Embodiment of this invention is provided. 本発明の一実施形態によるLSIが備える優先順位制御部の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the priority order control part with which LSI by one Embodiment of this invention is provided. 本発明の一実施形態によるLSIが備えるメインプロセッサによって実行されるメイン処理内部のシーケンスを示す参考図である。It is a reference figure which shows the sequence in the main process performed by the main processor with which LSI by one Embodiment of this invention is provided. 本発明の一実施形態において、優先順位制御部が備える優先タスクテーブルの記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the priority task table with which a priority order control part is provided. 本発明の一実施形態において、各バスマスタで実行されるタスクの時間的な変化の例を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the example of the time change of the task performed by each bus master. 本発明の一実施形態において、タスクID記憶部のアドレスと、それに対応するバスマスタの一覧を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the list of the address of a task ID memory | storage part, and the bus master corresponding to it. 本発明の一実施形態において、時間T0におけるタスクID記憶部の記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the task ID memory | storage part in time T0. 本発明の一実施形態において、時間T1におけるタスクID記憶部の記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the task ID memory | storage part in time T1. 本発明の一実施形態において、時間T2におけるタスクID記憶部の記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the task ID memory | storage part in time T2. 本発明の一実施形態において、時間T3におけるタスクID記憶部の記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the task ID memory | storage part in time T3. 本発明の一実施形態において、時間T0における優先順位レジスタの記憶内容を示す参考図である。FIG. 14 is a reference diagram showing the contents stored in the priority order register at time T0 in the embodiment of the present invention. 本発明の一実施形態において、時間T1における優先順位レジスタの記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the priority order register | resistor in time T1. 本発明の一実施形態において、時間T2における優先順位レジスタの記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the priority order register | resistor in time T2. 本発明の一実施形態において、時間T3における優先順位レジスタの記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the priority order register | resistor in time T3. 本発明の一実施形態において、時間T4における優先順位レジスタの記憶内容を示す参考図である。In one Embodiment of this invention, it is a reference figure which shows the memory content of the priority order register | resistor in time T4.

符号の説明Explanation of symbols

100・・・LSI、110・・・バス、120・・・メインプロセッサ、130・・・第1のサブプロセッサ、140・・・第2のサブプロセッサ、150・・・ハードウェアIP、160・・・メモリコントローラ、170・・・バス調停装置(バス調停手段)、171・・・優先順位レジスタ、180・・・優先順位制御部(優先順位制御手段)、181・・・シーケンスID記憶部、182・・・優先タスクテーブル(優先タスク記憶手段)、183・・・タスクID記憶部、184・・・タスクID取得部、185・・・優先順位設定部(優先順位変更手段)、190・・・メモリ

DESCRIPTION OF SYMBOLS 100 ... LSI, 110 ... Bus, 120 ... Main processor, 130 ... 1st sub processor, 140 ... 2nd sub processor, 150 ... Hardware IP, 160 ... Memory controller, 170 ... bus arbitration device (bus arbitration means), 171 ... priority order register, 180 ... priority order control section (priority control means), 181 ... sequence ID storage section, 182 ... Priority task table (priority task storage means), 183 ... Task ID storage section, 184 ... Task ID acquisition section, 185 ... Priority order setting section (priority change means), 190 ... memory

Claims (9)

共有バスに接続された、少なくとも1つのプロセッサを含む複数のバスマスタの、前記共有バスに対するバス使用権を、前記バスマスタの優先順位に基づいて設定するバス調停手段と、
前記プロセッサによるタスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する優先順位制御手段と、
を備えたことを特徴とするバス制御装置。
Bus arbitration means for setting a bus usage right for the shared bus of a plurality of bus masters including at least one processor connected to the shared bus based on the priority order of the bus master;
Priority control means for changing the priority of the bus master based on the task execution status by the processor and the priority of processing executed by the bus master;
A bus control device comprising:
前記プロセッサは、前記タスクの実行状況を前記優先順位制御手段に通知し、
前記優先順位制御手段は、前記プロセッサから通知された前記タスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する
ことを特徴とする請求項1に記載のバス制御装置。
The processor notifies the priority control means of the execution status of the task;
The priority order control means changes the priority order of the bus master based on the execution status of the task notified from the processor and the priority of processing executed by the bus master. The bus control device according to 1.
前記優先順位制御手段は、前記プロセッサによるタスクの実行状況を監視した結果、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更することを特徴とする請求項1に記載のバス制御装置。   The priority order control means changes the priority order of the bus master based on the result of monitoring the task execution status by the processor and the priority of processing executed by the bus master. The bus control device according to 1. 前記優先順位制御手段は、
前記プロセッサによって実行される処理単位毎に、前記バスマスタによって実行されるタスクの優先度が予め記憶された優先タスク記憶手段と、
前記プロセッサを含む前記バスマスタによる前記タスクの実行状況と、前記優先タスク記憶手段によって記憶された内容とに基づいて、前記バスマスタの優先順位を変更する優先順位変更手段と、
を備えたことを特徴とする請求項1に記載のバス制御装置。
The priority order control means includes:
For each processing unit executed by the processor, priority task storage means in which the priority of the task executed by the bus master is stored in advance,
Priority changing means for changing the priority of the bus master based on the execution status of the task by the bus master including the processor and the content stored by the priority task storage means;
The bus control device according to claim 1, further comprising:
共有バスに接続された、少なくとも1つのプロセッサを含む複数のバスマスタの、前記共有バスに対するバス使用権を、前記バスマスタの優先順位に基づいて設定するバス調停装置を備えるバス制御装置内の前記プロセッサに、
前記プロセッサによるタスクの実行状況、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理
を実行させるためのバス制御プログラム。
A plurality of bus masters including at least one processor connected to a shared bus, to the processor in the bus control device including a bus arbitration device that sets a bus use right for the shared bus based on the priority order of the bus master. ,
A bus control program for executing a process of changing the priority of the bus master based on the task execution status by the processor and the priority of the process executed by the bus master.
前記バスマスタに第1のプロセッサと第2のプロセッサが含まれ、前記バスマスタの優先順位を変更する処理として、前記第2のプロセッサからの前記タスクの実行状況の通知、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理を前記第1のプロセッサに実行させることを特徴とする請求項5に記載のバス制御プログラム。   The bus master includes a first processor and a second processor, and processing for changing the priority of the bus master is performed by the notification of the task execution status from the second processor and executed by the bus master. 6. The bus control program according to claim 5, wherein the first processor is caused to execute processing for changing the priority order of the bus masters based on processing priority. 前記バスマスタに第1のプロセッサと第2のプロセッサが含まれ、前記バスマスタの優先順位を変更する処理として、前記第2のプロセッサによる前記タスクの実行状況を監視した結果、及び、前記バスマスタにより実行される処理の優先度に基づいて、前記バスマスタの優先順位を変更する処理を前記第1のプロセッサに実行させることを特徴とする請求項5に記載のバス制御プログラム。   The bus master includes a first processor and a second processor, and the process of changing the priority order of the bus master is executed by the bus master as a result of monitoring the execution status of the task by the second processor. 6. The bus control program according to claim 5, wherein the first processor is caused to execute a process of changing a priority order of the bus masters based on a priority of a process to be performed. 前記バスマスタの優先順位を変更する処理として、
前記プロセッサを含む前記バスマスタによる前記タスクの実行状況と、前記プロセッサによって実行される処理単位毎に予め設定された、前記バスマスタによって実行されるタスクの優先度とに基づいて、前記バスマスタの優先順位を変更する処理と、
を前記プロセッサに実行させることを特徴とする請求項5に記載のバス制御プログラム。
As a process of changing the priority order of the bus masters,
Based on the execution status of the task by the bus master including the processor and the priority of the task executed by the bus master preset for each processing unit executed by the processor, the priority of the bus master is determined. The process to change,
The bus control program according to claim 5, wherein the processor is executed.
請求項5〜請求項8のいずれかに記載のバス制御プログラムを記録したコンピュータ読み取り可能な記録媒体。

A computer-readable recording medium on which the bus control program according to any one of claims 5 to 8 is recorded.

JP2006040898A 2006-02-17 2006-02-17 Bus controller, bus control program and recording medium Withdrawn JP2007219925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006040898A JP2007219925A (en) 2006-02-17 2006-02-17 Bus controller, bus control program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006040898A JP2007219925A (en) 2006-02-17 2006-02-17 Bus controller, bus control program and recording medium

Publications (1)

Publication Number Publication Date
JP2007219925A true JP2007219925A (en) 2007-08-30

Family

ID=38497146

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006040898A Withdrawn JP2007219925A (en) 2006-02-17 2006-02-17 Bus controller, bus control program and recording medium

Country Status (1)

Country Link
JP (1) JP2007219925A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010016169A1 (en) * 2008-08-07 2010-02-11 日本電気株式会社 Multiprocessor system and method for controlling the same
JP2012008919A (en) * 2010-06-28 2012-01-12 Renesas Electronics Corp Information processing device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010016169A1 (en) * 2008-08-07 2010-02-11 日本電気株式会社 Multiprocessor system and method for controlling the same
US8583845B2 (en) 2008-08-07 2013-11-12 Nec Corporation Multi-processor system and controlling method thereof
JP5360061B2 (en) * 2008-08-07 2013-12-04 日本電気株式会社 Multiprocessor system and control method thereof
JP2012008919A (en) * 2010-06-28 2012-01-12 Renesas Electronics Corp Information processing device
US8694705B2 (en) 2010-06-28 2014-04-08 Renesas Electronics Corporation Information processing device

Similar Documents

Publication Publication Date Title
CN107729159B (en) Address mapping method and device for shared memory
JP4982971B2 (en) Information processing apparatus, process control method, and computer program
JP4907166B2 (en) Resource management device
JP4456490B2 (en) DMA equipment
WO2018157836A1 (en) Resource management method for programmable hardware, programmable hardware device, and storage medium
US8661440B2 (en) Method and apparatus for performing related tasks on multi-core processor
JP5498505B2 (en) Resolving contention between data bursts
JP2005258867A (en) Resource managing apparatus
JP2007026094A (en) Execution device and application program
WO2017056725A1 (en) In-vehicle control device
JP5445669B2 (en) Multi-core system and startup method
JP2007207026A (en) Dma transfer device
JP5911548B1 (en) Apparatus, method, and computer program for scheduling access request to shared memory
JP2007219925A (en) Bus controller, bus control program and recording medium
JP2008146541A (en) Dma transfer system, dma controller and dma transfer method
JP2008041059A (en) Multiprocessor controller and information processor
JP2007249635A (en) Data transfer unit and data transfer method
JP2005085079A (en) Data transfer controller
JP4151362B2 (en) Bus arbitration method, data transfer device, and bus arbitration method
JP2008210280A (en) Semiconductor device and dma controller
US10025730B2 (en) Register device and method for software programming
JP7062142B2 (en) Information processing equipment, information processing methods and information processing programs
JP2019040325A (en) Power management device, node power management method and node power management program
JP2008165463A (en) Bus controller
JP4292218B2 (en) Image processing apparatus and image processing system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090512