JP3356677B2 - Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously - Google Patents

Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously

Info

Publication number
JP3356677B2
JP3356677B2 JP5207398A JP5207398A JP3356677B2 JP 3356677 B2 JP3356677 B2 JP 3356677B2 JP 5207398 A JP5207398 A JP 5207398A JP 5207398 A JP5207398 A JP 5207398A JP 3356677 B2 JP3356677 B2 JP 3356677B2
Authority
JP
Japan
Prior art keywords
task
instruction
unit
identifier
instructions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP5207398A
Other languages
Japanese (ja)
Other versions
JPH10307731A (en
Inventor
卓敏 田中
潔 前信
康介 ▲よし▼岡
誠 平井
督三 清原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP5207398A priority Critical patent/JP3356677B2/en
Publication of JPH10307731A publication Critical patent/JPH10307731A/en
Application granted granted Critical
Publication of JP3356677B2 publication Critical patent/JP3356677B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】MPEGストリームを始めとする
可変符号長のマルチメディアデータを再生するAVデコー
ダに備えられ、専らAVデコーダ内部のメインプロセッサ
の周辺制御を担うプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor which is provided in an AV decoder for reproducing multimedia data having a variable code length such as an MPEG stream, and exclusively controls peripherals of a main processor in the AV decoder.

【0002】[0002]

【従来の技術】MPEGストリームの再生技術はマルチメデ
ィア社会の基盤技術の一つでもあり、近年におけるその
需要の高まりには目を見張るものがある。MPEGストリー
ムの再生技術の新たな活躍の舞台として注目を浴びてい
るのは、インタラクティブな動画再生、音声再生を可能
とする民生機器の分野であり、この分野にて成功を収め
るべく、メーカー各社の技術者はMPEGストリームの再生
を高度になしえるAVデコーダの研究開発に心血を注いで
いる。
2. Description of the Related Art MPEG stream reproduction technology is also one of the basic technologies of the multimedia society, and the demand for such technology has been remarkable in recent years. Attention has been focused on the new stage of MPEG stream playback technology in the field of consumer electronics that enables interactive video playback and audio playback. Engineers are working hard on research and development of AV decoders that can play MPEG streams at a high level.

【0003】MPEGストリームの再生技術にて行うべき処
理には様々なものがあるが、それらはコア処理と、非同
期イベント処理とに大別されるといわれる。コア処理と
は、逆量子化、逆離散余弦変換、動き補償等、縦16×横
16個の画素からなるマクロブロックを対象とした処理で
ある。毎秒4050個ものマクロブロックを処理せねばなら
ないので(4050=30フレーム×30スライス×45マクロブロ
ック)、その演算量は膨大なものとなる。コア処理の実
行には、パイプライン処理が好適とされるが、ハードウ
ェア規模の増大を厭わない場合は、解読器や演算器を複
数にしてコア処理の負荷を分散させるのが良い。
There are various types of processing to be performed by the MPEG stream reproduction technology, and these are said to be roughly classified into core processing and asynchronous event processing. Core processing is 16 × H, such as inverse quantization, inverse discrete cosine transform, and motion compensation.
This is a process for a macroblock composed of 16 pixels. Since 4050 macroblocks must be processed per second (4050 = 30 frames × 30 slices × 45 macroblocks), the amount of calculation becomes enormous. Pipeline processing is preferable for executing the core processing. However, if the hardware scale is tolerated, it is preferable to disperse the load of the core processing by using a plurality of decoders and arithmetic units.

【0004】非同期イベント処理とは、複数の要因が重
なることにより特定の事象が成立している期間において
集中的に行うべき処理、或は、所定の周期をもって間欠
的に行うべき処理であり、コア処理と同期して行なえな
い処理の総称をいう。AVデコーダにおいて、このような
非同期イベント処理に相当する処理には、記録媒体や通
信媒体からのMPEGストリーム入力に関するもの(1)、AV
デコーダから映像再生機器、音声再生機器への出力に関
するもの(2)、AVデコーダと、AVデコーダ外部に接続さ
れた拡張メモリとの入出力に関するもの(3)の三種類が
ある。
[0004] Asynchronous event processing is processing that should be performed intensively during a period in which a specific event is established due to the overlapping of a plurality of factors, or processing that should be performed intermittently at a predetermined cycle. A generic term for processing that cannot be performed in synchronization with processing. In the AV decoder, processing corresponding to such asynchronous event processing includes processing relating to MPEG stream input from a recording medium or a communication medium (1), AV processing.
There are three types, one related to output from the decoder to the video playback device and the audio playback device (2), and the other related to input / output between the AV decoder and an extended memory connected outside the AV decoder (3).

【0005】記録媒体からのストリーム入力に関する非
同期イベント処理(1)は更に、光ディスク等の記録媒体
や通信媒体からMPEGストリームを取り込んで、エレメン
タリィストリームを抽出する抽出処理(1-1)、抽出され
たエレメンタリィストリームを拡張メモリとして接続さ
れているSDRAMに書き込む書込処理(1-2)がある。再生出
力に関する非同期イベント処理(2)は更に、復号が済ん
だ動画ストリーム、オーディオストリームを映像信号、
音声信号にそれぞれ変換してディスプレィ、スピーカに
出力する処理(2-1)と、MPEGストリームのプライベート
ストリームとして出力されてくる副映像を描画し、これ
を動画データと混合して映像信号に字幕を合成する処理
(2-2)を含む。
The asynchronous event processing (1) relating to stream input from a recording medium is further performed by extracting an MPEG stream from a recording medium such as an optical disk or a communication medium and extracting an elementary stream (1-1). There is a write process (1-2) for writing the elementary stream to the SDRAM connected as the extended memory. Asynchronous event processing (2) relating to playback output further includes a decoded video stream, audio stream as a video signal,
The process of converting each to an audio signal and outputting it to a display and a speaker (2-1), drawing the sub-video output as a private stream of the MPEG stream, mixing this with video data, and adding subtitles to the video signal Compositing process
(2-2) is included.

【0006】拡張メモリとの入出力に関する非同期イベ
ント処理(3)は更に、逆量子化、逆離散余弦変換、動き
補償等の処理が施されたデータが内部バッファに蓄積さ
れるのを監視し、その蓄積量が一定量になった段階でSD
RAMにまとめて書き込む処理(3-1)、逆量子化、逆離散余
弦変換、動き補償の進捗に応じて、次に処理すべきデー
タを外部に接続されたSDRAMから内部バッファに間欠的
に補充する補充処理(3-2)がある。
Asynchronous event processing (3) relating to input / output to / from the extended memory further monitors whether data subjected to processing such as inverse quantization, inverse discrete cosine transform, and motion compensation is accumulated in an internal buffer. When the accumulated amount reaches a certain amount, SD
Data to be collectively written to RAM (3-1), intermittent replenishment of data to be processed next from the externally connected SDRAM to the internal buffer according to the progress of inverse quantization, inverse discrete cosine transform, and motion compensation (3-2).

【0007】以上の処理の他にも、操作者からの操作に
応じて行うべき処理はこの非同期イベント処理に分類さ
れる。単にMPEGストリームの再生だけではなく、操作者
の対話性を重視した再生装置の応用システムを設計する
場合やホストコンピュ−タとの同期制御を前提にしたシ
ステムを設計する場合は、更に多くの非同期イベント処
理をAVデコーダに処理させる必要がある。
[0007] In addition to the above-described processing, processing to be performed in response to an operation from the operator is classified into this asynchronous event processing. More than just asynchronous playback when designing an application system for a playback device that places emphasis on operator interactivity, or when designing a system that assumes synchronization control with the host computer, rather than simply playing back an MPEG stream. It is necessary to have the AV decoder process the event processing.

【0008】上記の処理のうち、処理(2-1)のオーディ
オに関する処理は、オーディオアウトタスクと呼ばれ、
90μsecという間欠的な周期を有する。また処理(2-1)の
うち、ビデオに関する処理はビデオアウトタスクと呼ば
れ、ディスプレィの水平同期信号の間欠的な周期に基づ
いた50μsecにおいて、一ライン分の画像の処理を完遂
させねばならない。
[0008] Of the above processing, the processing related to audio in the processing (2-1) is called an audio out task.
It has an intermittent cycle of 90 μsec. In the process (2-1), a process related to video is called a video out task, and it is necessary to complete processing of an image for one line in 50 μsec based on an intermittent cycle of a horizontal synchronization signal of a display.

【0009】このようにビデオアウトタスク、オーディ
オアウトタスクに実行周期が与えられるのは、これらの
タスクの処理が完遂されないと、動画-音声が時間の流
れに沿って円滑に再生されないからである。即ち、ビデ
オアウトタスク、オーディオアウトタスクの処理を50μ
sec、90μsecという周期内に完遂することが、動画再
生、音声再生のリアルタイム性を満たすための最大要件
となる。
The reason why the execution cycle is given to the video-out task and the audio-out task is that, if the processing of these tasks is not completed, the moving image-sound cannot be smoothly reproduced along the flow of time. That is, the processing of video out task and audio out task is 50μ.
Completion within a cycle of 90 sec and 90 μsec is the maximum requirement to satisfy the real-time performance of moving image reproduction and audio reproduction.

【0010】従来のMPEGストリーム再生技術において
は、以上の非同期イベント処理を汎用プロセッサに行わ
せる場合、非同期事象の発生や所定周期の到来を割込信
号により汎用プロセッサに通知する。通知後、汎用プロ
セッサは分岐命令を用いて非同期イベント処理へと分岐
する。
In the conventional MPEG stream reproduction technology, when the above-described asynchronous event processing is performed by a general-purpose processor, the occurrence of the asynchronous event and the arrival of a predetermined period are notified to the general-purpose processor by an interrupt signal. After the notification, the general-purpose processor branches to asynchronous event processing using a branch instruction.

【0011】[0011]

【発明が解決しようとする課題】しかしながら割込信号
を用いて汎用プロセッサに非同期イベント処理を実行さ
せるという従来の方式では、オーディオアウトタスク、
ビデオアウトタスクの処理を完遂させるには動作クロッ
クをいくらに定めればよいかを示す動作クロック数の最
適な下限値が一義的に計算できないという問題点があ
る。
However, in the conventional method of causing a general-purpose processor to execute asynchronous event processing using an interrupt signal, an audio-out task,
There is a problem that the optimum lower limit of the number of operation clocks, which indicates how much the operation clock should be determined to complete the video out task processing, cannot be uniquely calculated.

【0012】最適な下限値が計算できないため、大まか
な見積もりで動作クロック数を決定せざるを得ず、動作
クロック数をどうしても高めに設定してしまう傾向があ
る。従来の方式では、どのような計算法で動作クロック
を計算していたかを以下に説明する。周期が異なる非同
期イベントタスクとして90μsecの実行周期を有するオ
ーディオアウトタスクと、50μsecの実行周期を有する
ビデオアウトタスクを実行せねばならないものとする。
この場合、オーディオアウトタスクは0μsec、90μsec,
180μsec,270μsec,360μsec,450μsecというように90
μsec毎にオーディオストリームの復号を完遂せねばな
らず、ビデオアウトタスクは0μsec、50μsec,100μse
c,150μsec,200μsec,250μsec,300μsec,350μsecとい
うように50μsec毎に動画ストリームの復号を完遂せね
ばならない。従来の汎用プロセッサは、2つの実行周期
の到来を割込信号にて通知して、それからビデオアウト
タスク、オーディオアウトタスクを処理することにな
る。
Since the optimum lower limit cannot be calculated, the number of operation clocks must be determined by rough estimation, and the number of operation clocks tends to be set higher. The following describes how the operation clock is calculated in the conventional method. As an asynchronous event task having a different cycle, an audio out task having an execution cycle of 90 μsec and a video out task having an execution cycle of 50 μsec must be executed.
In this case, the audio out task is 0μsec, 90μsec,
180 μsec, 270 μsec, 360 μsec, 450 μsec, etc.
The audio stream must be decoded every μsec, and the video out task is 0 μsec, 50 μsec, 100 μse
c, the decoding of the video stream must be completed every 50 μsec, such as 150 μsec, 200 μsec, 250 μsec, 300 μsec, 350 μsec. The conventional general-purpose processor notifies the arrival of two execution periods by an interrupt signal, and then processes the video-out task and the audio-out task.

【0013】割込信号によって実行時期の到来を知って
から、オーディオアウトタスク、ビデオアウトタスクを
起動しようとすると、各タスクが処理を完遂せねばなら
ないタイムリミットは、自身を起動するための割込信号
の発生タイミングから、次のタスクを起動するための割
込信号の発生タイミングまでに定められる。図57は、
これらの周期が割込信号により汎用プロセッサに通知さ
れて、実行する場合を想定したタイミングチャートであ
る。本図において、オーディオアウトタスク−ビデオア
ウトタスクの処理完遂のためのタイムリミットがどのよ
うに現れるかを説明する。
When the audio-out task and the video-out task are to be started after the execution time has come to be known from the interrupt signal, the time limit at which each task must complete the processing is an interrupt for starting itself. It is determined from the signal generation timing to the interrupt signal generation timing for activating the next task. FIG.
It is a timing chart assuming a case where these cycles are notified to a general-purpose processor by an interrupt signal and executed. In the figure, how the time limit for completing the processing of the audio out task-video out task appears will be described.

【0014】パルスP1の立ち上がり及びパルスP5の立ち
上がりが発生して、ビデオアウトタスク、オーディオア
ウトタスクを起動する旨が汎用プロセッサに通知される
と、次の割込信号であるパルスP2の立ち上がりが通知さ
れるまでの50μsec期間がビデオアウトタスク及びオー
ディオアウトタスクの処理を完遂させるためのタイムリ
ミットとなる。
When the rising of the pulse P1 and the rising of the pulse P5 occur and the general-purpose processor is notified that the video-out task and the audio-out task are to be started, the rising of the pulse P2 which is the next interrupt signal is notified. The time period of 50 μsec until the processing is completed is a time limit for completing the processing of the video out task and the audio out task.

【0015】一方、パルスP6の立ち上がりが発生して、
オーディオアウトタスクを起動する旨が汎用プロセッサ
に通知されると、次の割込信号であるパルスP3の立ち上
がりが通知されるまでの僅か10μsecの期間がオーディ
オアウトタスク完遂のためのタイムリミットとなる。タ
イムリミットから動作クロックを計算する方式では、10
μsecのような極めて短いタイムリミット、即ち、タイ
ムリミットのワーストケースにおいてもオーディオアウ
トタスク、ビデオアウトタスクを完遂するだけの動作ク
ロック数が要求される。そうすると動作クロックを一段
と高いものに決定せさるを得ない。しかし安易に動作ク
ロックを高速にすれば、消費電力の増大も著しくなり、
民生機器の用途に適さなくなる。
On the other hand, when the rising of the pulse P6 occurs,
When the general-purpose processor is notified that the audio-out task is to be activated, the time limit for completing the audio-out task is only 10 μsec until the rise of the pulse P3 as the next interrupt signal is notified. In the method of calculating the operation clock from the time limit, 10
Even in a very short time limit such as μsec, that is, the worst case of the time limit, the number of operation clocks required to complete the audio out task and the video out task is required. Then, the operation clock must be determined to be higher. However, if the operating clock is easily increased, the power consumption will increase significantly,
It is no longer suitable for consumer equipment.

【0016】本発明の目的は、所定の周期で完遂せねば
ならない処理量が予め定められている非同期イベント処
理が複数ある場合に、それぞれの非同期イベントタスク
にどれだけのサイクル数を割り当てればよいかを示す最
適な下限値を一義的に計算することできると共に、それ
らの最適な下限値から全タスクを動作させるための動作
サイクル数の下限値を一義的に計算することができるプ
ロセッサを提供することである。
An object of the present invention is to assign an appropriate number of cycles to each asynchronous event task when there are a plurality of asynchronous event processes in which the amount of processing to be completed in a predetermined cycle is predetermined. And a processor capable of uniquely calculating an optimum lower limit value indicating whether or not, and uniquely calculating a lower limit value of the number of operation cycles for operating all tasks from the optimum lower limit value. That is.

【0017】[0017]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、n個のタスクを実行対象タスクとしたプ
ロセッサであって、n個のタスク識別子について、その
タスクに割り当てられた数の命令が実行されると次のタ
スク識別子を出力する実行タスク指示手段と、出力され
たタスク識別子で特定されるタスク中の実行すべき命令
を順次指定する命令指定手段と、指定された命令を実行
する実行手段とを備え、前記実行タスク指示手段は、n
個のタスクにおいて、通常のタスクに割り当てられる命
令数よりも少ない命令数が割り当てられるタスクである
ペナルティタスクの識別子を保持するペナルティタスク
保持部と、次のタスク識別子を出力すると、前記ペナル
ティタスク保持部を参照して、当該タスク識別子で特定
されるタスクがペナルティタスクか否かを判定し、ペナ
ルティタスク以外ならば第1の命令数を、ペナルティタ
スクならば第1の命令数よりも少ない第2の命令数を、
当該タスクに割り当てられる命令数とする命令数選択手
段とを含むことを特徴としている
In order to achieve the above-mentioned object, the present invention provides a processor having n tasks to be executed, wherein the number of task identifiers assigned to the tasks is n. Execution instruction instruction means for outputting the next task identifier when the instruction is executed; instruction designation means for sequentially designating instructions to be executed in the task specified by the output task identifier; Execution means for executing, the execution task instruction means, n
In the number of tasks, a penalty task holding unit that holds an identifier of a penalty task that is a task to which the number of instructions less than the number of instructions assigned to a normal task is assigned, and a penalty task holding unit that outputs a next task identifier. , It is determined whether the task identified by the task identifier is a penalty task. If the task is not a penalty task, the first instruction number is determined. If the task is a penalty task, the second instruction number is smaller than the first instruction number. The number of instructions
Means for selecting the number of instructions to be assigned to the task .

【0018】[0018]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第1実施形態)I/Oプロセッサについての説明を開始
する前に、AVデコーダがどのような内部構成を有してお
り、その構成において本発明に係るI/Oプロセッサがど
のような役割を果たしているかを説明する。図1にAVデ
コーダの内部構成を示す。
(First Embodiment) Before starting the description of the I / O processor, what kind of internal configuration of the AV decoder is and what role the I / O processor according to the present invention plays in that configuration Explain what is being done. FIG. 1 shows the internal configuration of the AV decoder.

【0019】AVデコーダは、コア処理を行うデコーダコ
ア部と、複数の非同期イベントタスクを行うI/O部とか
なる。デコーダコア部は、setup部104、VLD部10
5、IQ/IDCT部106、動き補償部107を含み、I/O部
は、ストリーム入力部101、バッファメモリ102、
ビットストリームFIFO103、ビデオ出力部108、オ
ーディオ出力部109、I/Oプロセッサ113、バッフ
ァメモリコントローラ110、RAMコントローラ11
1、FIFOコントローラ112、ホストI/O部115を備
えている。またバスとしてバッファメモリバス121、
SDRAMバス122、ビットストリームバス123、IOPコ
ントロールバス124が設けられており、拡張メモリと
してSDRAM300と接続している。
The AV decoder consists of a decoder core unit for performing core processing and an I / O unit for performing a plurality of asynchronous event tasks. The decoder core unit includes a setup unit 104 and a VLD unit 10.
5, including an IQ / IDCT unit 106 and a motion compensation unit 107. The I / O unit includes a stream input unit 101, a buffer memory 102,
Bit stream FIFO 103, video output unit 108, audio output unit 109, I / O processor 113, buffer memory controller 110, RAM controller 11
1, a FIFO controller 112 and a host I / O unit 115. As a bus, a buffer memory bus 121,
An SDRAM bus 122, a bit stream bus 123, and an IOP control bus 124 are provided, and are connected to the SDRAM 300 as an extended memory.

【0020】(1.)MPEGストリームの復号処理の概要 次に図2を参照して、MPEGストリームの復号処理の概要
について簡単に説明しておく。本実施形態においてMPEG
ストリームは、動画ストリーム、オーディオストリー
ム、副映像ストリームからなる。このうち動画ストリー
ムは、圧縮された動画像データであり、復号処理におい
て、差分算出の基準となる画像(以下「参照画像」と呼
ぶ)と、算出された差分を符号化した画像(以下「差分
画像」と呼ぶ)とを加算することにより、動画像に復元
される。
(1.) Outline of MPEG Stream Decoding Process Next, an outline of the MPEG stream decoding process will be briefly described with reference to FIG. In the present embodiment, MPEG
The stream includes a moving picture stream, an audio stream, and a sub-picture stream. The moving image stream is compressed moving image data, and in a decoding process, an image serving as a reference for calculating a difference (hereinafter referred to as a “reference image”) and an image obtained by encoding the calculated difference (hereinafter referred to as a “difference The image is restored to a moving image.

【0021】図2において、MPEGストリーム内の動画ス
トリームのデータ構造は、階層的に表現されている。第
1層はMPEGストリームの階層であり、第2層は1秒長の
動画の階層である。第3層は1フレームの階層であり、
第4層は1スライスの階層である。第5層はマクロブロ
ックの階層である。破線C1に示す第1層と第2層との対
応関係を参照すると、MPEG(Motion Picture Image Codi
ng Experts Group)において1秒長の動画は、NTSC方式に
おける30フレームの画像(PAL方式では25フレームの画
像)にて構成されることがわかる。また、各フレームの
画像は、Iピクチャ(図中のI0)、Pピクチャ(図中のP
3)、Bピクチャ(図中のB1,B2)という3つのタイプが
あることもわかる。
In FIG. 2, the data structure of the moving picture stream in the MPEG stream is expressed hierarchically. The first layer is a layer of an MPEG stream, and the second layer is a layer of a moving image having a length of one second. The third layer is a layer of one frame,
The fourth layer is a layer of one slice. The fifth layer is a macroblock hierarchy. Referring to the correspondence between the first layer and the second layer indicated by the broken line C1, the MPEG (Motion Picture Image
It can be seen that a 1 second long moving image in the NG Experts Group) is composed of 30 frame images in the NTSC system (25 frame images in the PAL system). The images of each frame are composed of an I picture (I0 in the figure) and a P picture (P in the figure).
3) and three types of B pictures (B1, B2 in the figure).

【0022】ここでIピクチャとは、圧縮された画像デ
ータであるが、一フレーム分の輝度成分及び色差成分を
含むものをいう。Pピクチャ(Predictive-Picture )又
はBピクチャ(Bidirectionally predictive Picture)
は差分画像と呼ばれるものである。ここでPピクチャと
は、過去方向に位置するフレームとの差分からなる差分
画像であり、Bピクチャとは、過去方向及び未来方向に
位置するフレームとの差分からなる差分画像である。
Here, the I picture is compressed image data, but includes one frame of a luminance component and a color difference component. P picture (Predictive-Picture) or B picture (Bidirectionally predictive Picture)
Is called a difference image. Here, the P picture is a difference image including a difference from a frame located in the past direction, and the B picture is a difference image including a difference from a frame located in the past direction and the future direction.

【0023】Bピクチャ及びPピクチャがどのような単位
で作成されるかであるが、破線C2に示す第2層と第3層
との対応関係を参照すると、NTSC方式においてこれらの
画像は30本のスライスというデータにて構成され、PAL
方式では36本のスライスというデータにて構成されるこ
とがわかる。破線C3に示す第3層と第4層との対応関係
を参照すると、各スライスは、45のマクロブロックに
て構成されることがわかる。マクロブロックとは、横16
画素×縦16画素の輝度成分、色差成分にて構成される。
破線C4に示す第4層と第5層との対応関係を参照する
と、横16×縦16の輝度成分からなる輝度ブロックと、横
8×縦8の青色差成分からなる青色差ブロック(Cbブロッ
ク)と、横8×縦8の赤色差成分からなる赤色差ブロック
(Crブロック)とを含むことがわかる。本マクロブロッ
クは、AVデコーダにおける画像復号の一単位となる。
Regarding the unit in which the B picture and the P picture are created, referring to the correspondence between the second layer and the third layer shown by the broken line C2, these images are 30 lines in the NTSC system. PAL
It can be seen that the method is constituted by data of 36 slices. Referring to the correspondence between the third layer and the fourth layer indicated by the broken line C3, it can be seen that each slice is composed of 45 macroblocks. Macro blocks are 16 horizontal
It is composed of a luminance component and a color difference component of pixel × 16 pixels.
Referring to the correspondence between the fourth layer and the fifth layer indicated by the broken line C4, a luminance block composed of 16 × 16 luminance components and a horizontal
It can be seen that the image includes a blue difference block (Cb block) composed of 8 × 8 blue color difference components and a red difference block (Cr block) composed of 8 × 8 red color difference components. This macroblock is one unit of image decoding in the AV decoder.

【0024】マクロブロックより下は、AVデコーダの構
成要素間がマクロブロックに含まれている輝度ブロッ
ク、色差ブロックをどのように処理するかを示すタイミ
ングチャートになっている。マクロブロックに対してど
のような復号化がなされるかであるが、マクロブロック
に対する復号化は、圧縮動画像データを可変長復号(Va
riable Length codeDecoding:以降VLDと略す)し
て、6つの空間周波数成分データ、ヘッダ情報、動きベ
クトルを得る。
Below the macroblock is a timing chart showing how to process the luminance block and the chrominance block included in the macroblock between the components of the AV decoder. Decoding is performed on a macroblock. Decoding on a macroblock is performed by performing variable-length decoding (Va
riable Length code Decoding: hereinafter abbreviated as VLD) to obtain six spatial frequency component data, header information, and a motion vector.

【0025】その後、6つの空間周波数成分データに対
して逆離散余弦変換処理(DiscereteCosine Transform:D
CT)を行って低周波数帯に位置する空間周波数成分と、
高周波数帯に位置する空間周波数成分とに分離し、高周
波数帯を切り捨てて、低周波帯に位置する空間周波数成
分に対して逆量子化処理を行うことによりなされる。符
号化されたマクロブロックは、逆量子化及び逆離散余弦
変換処理がなされた後、動きベクトルに基づいた動き補
償により、映像として表示される。動きベクトルとは、
前後のフレームの画像と比較して相関性の最も高い箇所
を指し示す情報をいう。つまり動きベクトルは画像内の
人物像や建造物像がフレームの前後でどう動いたかをブ
ロック単位で表現している。
Then, an inverse discrete cosine transform (Discrete Cosine Transform: D) is performed on the six spatial frequency component data.
CT) to perform spatial frequency components located in the low frequency band,
This is performed by separating into spatial frequency components located in the high frequency band, discarding the high frequency band, and performing inverse quantization on the spatial frequency components located in the low frequency band. The coded macroblock is subjected to inverse quantization and inverse discrete cosine transform processing, and then displayed as video by motion compensation based on a motion vector. What is a motion vector?
This refers to information indicating a location having the highest correlation as compared with the images of the preceding and following frames. In other words, the motion vector expresses in a block unit how a human image or a building image in the image has moved before and after the frame.

【0026】動き補償とは、差分の前後に表示されるべ
き参照画像と、当該差分とを足し合わせて(ブレンドし
て)一枚の完結した表示用画像を得ることをいう。以上
のMPEG準拠の動画像の符号化・複号化技術のうち、本明
細書で特に引用する内容は以上の通りである。より詳細
内容な技術内容については、株式会社アスキー「ポイン
ト図解式最新MPEG教科書」などの公知文献を参照さ
れたい。
The motion compensation refers to adding (blending) a reference image to be displayed before and after the difference and the difference to obtain one complete display image. Of the above-described MPEG-compliant moving picture coding / decoding techniques, the contents particularly cited in this specification are as described above. For more detailed technical contents, refer to publicly known documents such as ASCII Corporation "Point Illustrated Latest MPEG Textbook".

【0027】図2におけるタイミングチャートは、デコ
ーダコア部におけるsetup部104、VLD部105、IQ/I
DCT部106、動き補償部107の処理がどのようなタ
イミングが行われるか説明する際に引用するものとす
る。以上でMPEGストリームの復号処理の概要について説
明を終え、続いてAVデコーダの構成要素についての説明
を開始する。
The timing chart in FIG. 2 shows a setup section 104, a VLD section 105, an IQ / I
It will be referred to when explaining what timing the processing of the DCT unit 106 and the motion compensation unit 107 is performed. This concludes the description of the outline of the MPEG stream decoding process, and then starts the description of the components of the AV decoder.

【0028】(2.)AVデコーダの構成要素 ストリーム入力部101は、記録媒体や通信媒体からMP
EGストリームが取り出されると、MPEGストリームをAVデ
コーダ内部に取り込み、I/Oプロセッサ113による制
御に応じてバッファメモリバス121に出力する。バッ
ファメモリ102は、バッファメモリコントローラ11
0の制御に従って、ストリーム入力部101が取り込ん
だMPEGストリームを保持する。またMPEGストリームを出
力するようバッファメモリコントローラ110に命じら
れると、これまでに格納しているMPEGストリームをSDRA
Mバス122に出力する。
(2.) Components of AV Decoder The stream input unit 101 transmits an MP
When the EG stream is taken out, the MPEG stream is taken into the AV decoder and output to the buffer memory bus 121 under the control of the I / O processor 113. The buffer memory 102 is a buffer memory controller 11
In accordance with the control of 0, the MPEG stream captured by the stream input unit 101 is held. When the buffer memory controller 110 is instructed to output the MPEG stream, the MPEG stream stored so far is converted to the SDRA format.
Output to the M bus 122.

【0029】ビットストリームFIFO103は、MPEGスト
リームに含まれているエレメンタリィストリームがSDRA
Mバス122に出力されると、FIFOコントローラ112
による制御に従って出力されたエレメンタリィストリー
ムを取り込む。ビットストリームFIFO103は取り込ん
だエレメンタリィストリームを先入れ先出し方式に保持
する。このようにして保持したエレメンタリィストリー
ムをFIFOコントローラ112の制御に従って、ビットス
トリームバス123に出力する。
The bit stream FIFO 103 has an elementary stream included in the MPEG stream that is an SDRA.
When output to the M bus 122, the FIFO controller 112
Captures the elementary stream output under the control of. The bit stream FIFO 103 holds the captured elementary stream in a first-in first-out manner. The elementary stream thus held is output to the bit stream bus 123 under the control of the FIFO controller 112.

【0030】setup部104は、ビットストリームFIFO
103に保持されているMPEGストリームからエレメンタ
リィストリームが抽出されるのを待ち、そのエレメンタ
リィストリームが動画ストリーム或はオーディオストリ
ームなら、VLD部105による復号によりそのヘッダ部
が伸長されるのを待つ。ヘッダが伸長されるとこれの解
析処理e1を図2に示すように行う。またエレメンタリィ
ストリームが動画ストリームなら動きベクトルの抽出e2
を行う。その後、逆量子化、逆離散余弦変換、動き補償
等が行われている間、音声ストリームの復号処理e3を行
う。
The setup unit 104 includes a bit stream FIFO
It waits for an elementary stream to be extracted from the MPEG stream held in 103, and if the elementary stream is a moving image stream or an audio stream, waits for its header to be expanded by decoding by the VLD unit 105. When the header is decompressed, the analyzing process e1 is performed as shown in FIG. If the elementary stream is a video stream, motion vector extraction e2
I do. Thereafter, while the inverse quantization, the inverse discrete cosine transform, the motion compensation, and the like are being performed, the audio stream decoding process e3 is performed.

【0031】VLD部105は、ビットストリームFIFO1
03に格納されているエレメンタリィストリームが動画
ストリームであり、これを構成するマクロブロックがビ
ットストリームバス123に出力されると、マクロブロ
ックに含まれている4つの輝度ブロックY0,Y1,Y2,Y3
と、2つの色差ブロックCb,Crとに対して可変符号長デ
コードt21,t22,t23,t24,t25,t26を行う。
The VLD unit 105 includes a bit stream FIFO 1
When the elementary stream stored in the macroblock 03 is a moving image stream, and the macroblocks constituting the stream are output to the bit stream bus 123, the four luminance blocks Y0, Y1, Y2, Y3 included in the macroblock are output.
And variable code length decoding t21, t22, t23, t24, t25, t26 for the two color difference blocks Cb, Cr.

【0032】IQ/IDCT部106は、可変符号長デコード
がなされた四つの輝度ブロックと、2つの色差ブロック
とに対して逆量子化及び逆離散余弦変換を行う。動き補
償部107は、IQ/IDCT部106により逆量子化及び逆
離散余弦変換がなされると、これらの処理がなされた輝
度ブロック及び色差ブロックに対応する参照画像(Y0,Y
1),(Y2,Y3),(Cb.Cr)をAVデコーダ外部に接続されたSDRA
M300から読み出し、輝度ブロック及び色差ブロック
と、参照画像とをブレンドする。そしてそのブレンド結
果に対してハーフペル補間を行うことにより動き補償を
行う。その後、RAMコントローラ111を制御すること
により動き補償の結果をSDRAM300に書き込ませる。
The IQ / IDCT unit 106 performs inverse quantization and inverse discrete cosine transform on the four luminance blocks subjected to variable code length decoding and the two chrominance blocks. When the inverse quantization and the inverse discrete cosine transform are performed by the IQ / IDCT unit 106, the motion compensation unit 107 generates a reference image (Y0, Y
1), (Y2, Y3), (Cb.Cr) are connected to the SDRA
Read from M300, blend the luminance block and the chrominance block with the reference image. Then, motion compensation is performed by performing half-pel interpolation on the blend result. After that, the result of the motion compensation is written into the SDRAM 300 by controlling the RAM controller 111.

【0033】ビデオ出力部108は、動き補償部107
により参照画像とのブレンドとハーフペル補間とがなさ
れた一フレームの画像を映像信号に変換して外部に接続
されたテレビ受像器等のディスプレィ装置に出力する。
オーディオ出力部109は、setup部104により復号
されたオーディオストリームを音声信号に変換して外部
に接続されたスピーカ装置に出力する。
The video output unit 108 includes a motion compensation unit 107
, A one-frame image blended with a reference image and half-pel interpolation are converted into a video signal, and output to a display device such as a television receiver connected externally.
The audio output unit 109 converts the audio stream decoded by the setup unit 104 into an audio signal and outputs the audio signal to an externally connected speaker device.

【0034】バッファメモリコントローラ(図中のBMコ
ントローラ)110は、I/Oプロセッサ113周辺にお
けるストリーム入力部101、ビデオ出力部108、オ
ーディオ出力部109間のアクセス調停を行うバッファ
メモリインターフェィスと、バッファメモリ102と、
ストリーム入力部101、ビデオ出力部108、オーデ
ィオ出力部109間のDMA転送機能を有するDMAコントロ
ーラとからなる。
A buffer memory controller (BM controller in the figure) 110 includes a buffer memory interface for arbitrating access between the stream input unit 101, the video output unit 108, and the audio output unit 109 around the I / O processor 113, and a buffer memory. 102,
It comprises a DMA controller having a DMA transfer function between the stream input unit 101, the video output unit 108, and the audio output unit 109.

【0035】RAMコントローラ111は、SDRAM300に
対してのバーストリードと、バーストライトとが可能な
SDRAMインターフェィスと、SDRAM300−バッファメモ
リ102間、動き補償部107−バッファメモリ102
間のDMA転送機能を有するDMAコントローラとからなる。
FIFOコントローラ112は、ディアルポートRAMと、当
該RAMのRead/Writeを制御するコントローラと、ビット
ストリームFIFO103におけるアクセスアドレスを示す
ポインタを管理するポインタ管理機能とを有する。
The RAM controller 111 can perform burst read and burst write to the SDRAM 300.
SDRAM interface, between SDRAM 300 and buffer memory 102, motion compensator 107 and buffer memory 102
And a DMA controller having a DMA transfer function between them.
The FIFO controller 112 has a dual port RAM, a controller that controls read / write of the RAM, and a pointer management function that manages a pointer indicating an access address in the bit stream FIFO 103.

【0036】I/Oプロセッサ113は、AVデコーダにお
ける6本もの非同期イベントタスクを6本のスレッドに
割り当てることにより、非同期イベントタスクを時分割
多重にて実行する。各非同期イベントタスクに割り当て
たスレッドは、I/Oプロセッサ内部の全ての構成要素が
同期制御のために用いているクロック信号のサイクル数
にて表現され、その長さは原則4サイクルであるものと
する。
The I / O processor 113 executes the asynchronous event task by time division multiplexing by allocating as many as six asynchronous event tasks in the AV decoder to six threads. The thread assigned to each asynchronous event task is represented by the number of clock signal cycles used by all components inside the I / O processor for synchronous control, and the length is 4 cycles in principle. I do.

【0037】(3.)I/Oプロセッサに実行が課された非
同期イベントタスクとは、どのような処理内容であるか AVデコーダにおいてI/Oプロセッサに実行が課された非
同期イベントタスクが、どのような処理内容であるかを
逐一説明する。 ・ホストI/Oタスク 本タスクは、ホストコンピュ−タとの通信と、操作者と
の対話に応じた二次元グラフィックスの描画に関するタ
スクである。具体的には、ホストI/O部115を介した
ホストコンピュ−タとの通信処理と、操作者による操作
に応じて二次元グラフィックスを描画し、ビデオ出力部
108に出力する処理とからなる。 ・パージングタスク 本タスクはバッファメモリ102に入力されたMPEGスト
リームのパージング処理と、MPEGストリームから動画ス
トリーム、オーディオストリーム、副映像ストリームと
いったエレメンタリィストリームの抽出を行う抽出処理
に関する。
(3.) What kind of processing is the asynchronous event task whose execution is imposed on the I / O processor? What is the asynchronous event task whose execution is imposed on the I / O processor in the AV decoder? Whether such processing contents are described one by one. -Host I / O task This task is a task related to communication with the host computer and drawing of two-dimensional graphics according to the dialog with the operator. More specifically, the process includes a process of communicating with the host computer via the host I / O unit 115, and a process of drawing two-dimensional graphics in accordance with an operation by the operator and outputting the two-dimensional graphics to the video output unit 108. . Purging Task This task relates to a parsing process of an MPEG stream input to the buffer memory 102 and an extracting process of extracting an elementary stream such as a moving image stream, an audio stream, and a sub-video stream from the MPEG stream.

【0038】パージングタスクの実行時において、I/O
プロセッサ113は外部からストリーム入力部101に
入力されたMPEGストリームをバッファメモリバス(図中
ではBMバス)121に出力させる。バッファメモリコン
トローラ110を制御することによりバッファメモリバ
ス121に出力されたMPEGストリームをバッファメモリ
102に書き込ませる。その後I/Oプロセッサ113
は、バッファメモリコントローラ110を制御すること
によりMPEGストリームをバッファメモリバス121に出
力させ、MPEGストリームからエレメンタリィストリーム
を抽出する。バッファメモリコントローラ110を制御
することにより抽出されたエレメンタリィストリームを
バッファメモリ102に書き込ませる。その結果、バッ
ファメモリ102には、エレメンタリィストリームとし
てビットストリーム、オーディオストリーム、副映像ス
トリームが格納された状態となる。 ・オーディオストリーム転送制御タスク オーディオストリーム転送制御タスクはオーディオスト
リームに関する全ての転送制御からなるタスクである。
When a purging task is executed, I / O
The processor 113 outputs the MPEG stream input from the outside to the stream input unit 101 to a buffer memory bus (BM bus in the figure) 121. By controlling the buffer memory controller 110, the MPEG stream output to the buffer memory bus 121 is written to the buffer memory 102. Then I / O processor 113
Controls the buffer memory controller 110 to output an MPEG stream to the buffer memory bus 121, and extracts an elementary stream from the MPEG stream. By controlling the buffer memory controller 110, the extracted elementary stream is written to the buffer memory 102. As a result, the buffer memory 102 stores a bit stream, an audio stream, and a sub-picture stream as elementary streams. -Audio stream transfer control task The audio stream transfer control task is a task composed of all transfer controls related to the audio stream.

【0039】オーディオストリーム転送制御タスクに従
って、I/Oプロセッサ113はバッファメモリコントロ
ーラ110を制御することによりバッファメモリ102
にエレメンタリィストリームとして格納されているオー
ディオストリームをSDRAMバス122に出力させる。そ
の後、RAMコントローラ111を制御することによりSDR
AMバス122に出力されたオーディオストリームをSDRA
M300に書き込ませる。setup部104がビットストリ
ームFIFO103に格納されているオーディオストリーム
の復号を開始すると、その復号処理がどれだけ進捗した
かを監視し、オーディオストリームの残量が所定値以下
となると、RAMコントローラ111を制御して、SDRAM3
00に格納されているオーディオストリームを読み出さ
せてSDRAMバス122に出力させる。FIFOコントローラ
112を制御してこのように出力されたオーディオスト
リームをビットストリームFIFO103に書き込ませる。
In accordance with the audio stream transfer control task, the I / O processor 113 controls the buffer memory controller 110 to
Output an audio stream stored as an elementary stream to the SDRAM bus 122. Then, by controlling the RAM controller 111, the SDR
The audio stream output to the AM bus 122 is
Write to M300. When the setup unit 104 starts decoding an audio stream stored in the bit stream FIFO 103, the progress of the decoding process is monitored, and when the remaining amount of the audio stream becomes equal to or less than a predetermined value, the RAM controller 111 is controlled. And SDRAM3
The audio stream stored in 00 is read and output to the SDRAM bus 122. By controlling the FIFO controller 112, the audio stream thus output is written to the bit stream FIFO 103.

【0040】このようなビットストリームFIFO103へ
の書き込みにより、オーディオストリームの復号の進捗
に応じたオーディオストリームの補充を行う。デコード
が済むと、I/Oプロセッサ113はFIFOコントローラ1
12を制御することによりデコード済みオーディオスト
リームをSDRAMバス122に出力させる。バッファメモ
リコントローラ110を制御して、SDRAMバス122に
出力されたオーディオストリームをバッファメモリ10
2に書き込ませる。 ・動画ストリーム転送制御タスク 動画ストリーム転送制御タスクは動画ストリームに関す
る全ての転送制御からなるタスクである。
By writing to the bit stream FIFO 103, the audio stream is supplemented according to the progress of the decoding of the audio stream. When decoding is completed, the I / O processor 113
12 to output the decoded audio stream to the SDRAM bus 122. By controlling the buffer memory controller 110, the audio stream output to the SDRAM bus 122 is transferred to the buffer memory 10
2 is written. -Moving image stream transfer control task The moving image stream transfer control task is a task composed of all transfer controls related to the moving image stream.

【0041】I/Oプロセッサ113は、バッファメモリ
コントローラ110を制御することによりバッファメモ
リ102に格納されている動画ストリームをSDRAMバス
122に出力させ、RAMコントローラ111を制御する
ことによりSDRAMバス122に出力された動画ストリー
ムをSDRAM300に書き込ませる。VLD部105、IQ/IDC
T部106、動き補償部107がビットストリームFIFO
103に格納されている動画ストリームの復号を開始す
ると、動画ストリームの復号がどれだけ進捗したかを監
視し、復号すべき残量が所定値以下となると、RAMコン
トローラ111を制御して、SDRAM300に格納されて
いる動画ストリームを読み出させて、FIFOコントローラ
112にビットストリームFIFO103に書き込ませる。
このようなビットストリームFIFO103の書き込みによ
り、復号処理の進捗に応じた動画ストリームの補充を行
う。 ・ビデオアウトタスク ビデオアウトタスクは映像出力に関する出力制御からな
るタスクである。
The I / O processor 113 outputs the moving image stream stored in the buffer memory 102 to the SDRAM bus 122 by controlling the buffer memory controller 110 and outputs the moving image stream to the SDRAM bus 122 by controlling the RAM controller 111. The created moving image stream is written to the SDRAM 300. VLD unit 105, IQ / IDC
T unit 106 and motion compensation unit 107 are bit stream FIFO
When the decoding of the moving image stream stored in the video stream 103 is started, the progress of the decoding of the moving image stream is monitored. The stored moving image stream is read, and the FIFO controller 112 writes the moving image stream to the bit stream FIFO 103.
By writing the bit stream FIFO 103 as described above, a moving image stream is supplemented according to the progress of the decoding process. -Video out task The video out task is a task consisting of output control related to video output.

【0042】本非同期イベントタスクの実行時において
I/Oプロセッサ113はRAMコントローラ111を制御す
ることにより、VLD部105、IQ/IDCT部106、動き補
償部107による処理が済んでSDRAM300に格納され
ている動画データをSDRAMバス122に出力させ、バッ
ファメモリコントローラ110を制御して、SDRAMバス
122に出力された動画ストリームをバッファメモリ1
02に書き込ませる。バッファメモリコントローラ11
0を制御して、SDRAM300に書き込まれた動画ストリ
ームをSDRAMバス122に出力させ、ビデオ出力部10
8に映像信号に変換させる。それと共に副映像ストリー
ムを展開して得られた副映像と、二次元グラフィックス
とを混合してビデオ出力部108に出力させる。 ・setupI/Oタスク setup部104とI/Oプロセッサ113とが通信する際に
実行すべき処理からなる。
At the time of execution of this asynchronous event task
The I / O processor 113 controls the RAM controller 111 to output the moving image data stored in the SDRAM 300 after being processed by the VLD unit 105, the IQ / IDCT unit 106, and the motion compensation unit 107 to the SDRAM bus 122, By controlling the buffer memory controller 110, the moving image stream output to the SDRAM bus 122 is stored in the buffer memory 1
02. Buffer memory controller 11
0 to output the video stream written in the SDRAM 300 to the SDRAM bus 122,
8 is converted into a video signal. At the same time, the sub-image obtained by developing the sub-image stream and the two-dimensional graphics are mixed and output to the video output unit 108. The setup I / O task consists of processing to be executed when the setup unit 104 and the I / O processor 113 communicate.

【0043】当該コマンドがホストコンピュ−タが備え
ているレジスタを読み書きするためのコマンドなら、I/
Oプロセッサ113を制御して当該読み書きのための処
理と、当該コマンドがVLD部105、IQ/IDCT部106の
初期化コマンドなら、VLD部105、IQ/IDCT部106を
リセットする処理とからなる。以上の非同期イベントタ
スクは、個々の処理負荷は軽いが、間欠的な起動が要求
される。特にビデオアウトタスクは水平ブランキング期
間の50μsec毎の起動が要求され、オーディオアウトタ
スクは90μsec毎の起動が要求される。
If the command is a command for reading / writing a register provided in the host computer, I / O
The read / write process is controlled by controlling the O-processor 113, and if the command is an initialization command for the VLD unit 105 and the IQ / IDCT unit 106, the VLD unit 105 and the IQ / IDCT unit 106 are reset. The asynchronous event task described above has a light processing load, but requires intermittent activation. In particular, the video out task requires activation every 50 μsec during the horizontal blanking period, and the audio out task requires activation every 90 μsec.

【0044】(4.)I/Oプロセッサがどのように構成さ
れているか I/Oプロセッサの第1実施形態を図面を参照しながら説
明する。上述したように、I/Oプロセッサはそれぞれの
非同期イベントタスクを実行すべき事象が成立したか否
かの監視を行っており、事象が成立した非同期イベント
タスクをより優先的に実行する。本実施形態において優
先実行の手順までも言及すると、説明が煩雑になるので
この優先実行についての説明は第3実施形態において行
うものとする。第1実施形態では、I/Oプロセッサの基
本構成、即ち、AVデコーダにおける6本もの非同期イベ
ントタスクを時分割多重にて実行する構成について説明
する。
(4.) How the I / O Processor is Configured A first embodiment of the I / O processor will be described with reference to the drawings. As described above, the I / O processor monitors whether or not an event to execute each asynchronous event task has been established, and executes the asynchronous event task in which the event has been established with higher priority. If the procedure of the priority execution is also referred to in the present embodiment, the description becomes complicated. Therefore, the description of the priority execution will be made in the third embodiment. In the first embodiment, a basic configuration of an I / O processor, that is, a configuration in which as many as six asynchronous event tasks in an AV decoder are executed by time division multiplexing will be described.

【0045】図3はI/Oプロセッサの内部構成を示す図
であり、本図に示すようにI/Oプロセッサは命令メモリ
100、命令読出回路10、命令解読制御部11、レジ
スタセット12、演算実行部14、及びタスク管理部1
5から構成される。命令メモリ100は、上述した六本
の非同期イベントタスクを構成する命令を記憶する。図
8は、命令メモリ100がどのように命令列を記憶して
いるかを示す図である。本図において各命令には、0-0,
0-1,0-2といった識別子が付されている。この識別子の
うち、上位の数は、当該命令が6本の非同期イベントタ
スクの何れに属するかを示し、下位の数は、属する非同
期イベントタスクにおいて当該命令が何番目に位置する
かを示す。以降の説明において、命令メモリ100にお
ける各命令の配置アドレスは、この識別子を用いて表す
ものとする。
FIG. 3 is a diagram showing the internal configuration of the I / O processor. As shown in FIG. 3, the I / O processor includes an instruction memory 100, an instruction reading circuit 10, an instruction decoding control unit 11, a register set 12, an operation Execution unit 14 and task management unit 1
5 is comprised. The instruction memory 100 stores instructions constituting the above-mentioned six asynchronous event tasks. FIG. 8 is a diagram showing how the instruction memory 100 stores an instruction sequence. In this figure, each instruction has 0-0,
Identifiers such as 0-1, 0-2 are attached. Among the identifiers, the upper number indicates which of the six asynchronous event tasks the instruction belongs to, and the lower number indicates the order of the instruction in the asynchronous event task to which the instruction belongs. In the following description, the location address of each instruction in the instruction memory 100 will be represented using this identifier.

【0046】命令メモリ100内に記憶されている命令
は、全てのオペレーションが一命令語長に収まるよう命
令フォーマットが規定されている。本実施形態において
命令語長は16bitに規定されており、その命令フォーマ
ットを図9〜図11に示す。図9は、レジスタをオペラ
ンドに指定した算術演算命令の命令フォーマットを示
す。本命令フォーマットでは、2bit〜4bitに第1オペラ
ンドに指定すべきレジスタ番号を指定でき、5bit〜7bit
には、第2オペランドに指定すべきレジスタ番号を指定
できる。8bit〜10bitには、演算結果の格納先に指定す
べきレジスタ番号を指定でき、11bitから15bitまでの5b
itにオペレーション内容が指定される。下段の表は、当
該オペレーション内容の指定が可能な5bitのうち、上位
2bitと、下位3bitの組み合わせと、その組み合わせにて
表現されるオペレーション内容とを示している。例えば
上位2bitが『00』であり、下位3bitが『000』である場
合、その組み合わせは加算演算のオペレーションを表現
しており、上位2bitが『01』であり、下位3bitが『00
0』である場合、その組み合わせは減算演算を表現して
いる。上位2bitが『00』であり、下位3bitが『001』で
ある場合、その組み合わせは左シフト演算(図中の<<は
左シフト演算の意味である)を表現しており、上位2bit
が『01』であり、下位3bitが『001』である場合、その
組み合わせは右シフト演算(図中の>>は右シフト演算の
意味である)を表現している。
The instruction format of the instruction stored in the instruction memory 100 is defined so that all operations can be accommodated in one instruction word length. In this embodiment, the instruction word length is defined as 16 bits, and the instruction format is shown in FIGS. FIG. 9 shows an instruction format of an arithmetic operation instruction in which a register is specified as an operand. In this instruction format, the register number to be specified in the first operand can be specified in 2 bits to 4 bits, and 5 bits to 7 bits
Can specify the register number to be specified in the second operand. 8bit to 10bit can specify the register number to be specified as the storage destination of the operation result, 5b from 11bit to 15bit
The operation content is specified in it. The lower table shows the upper 5 bits of the 5 bits for which the operation content can be specified.
It shows a combination of 2 bits and lower 3 bits, and the operation content expressed by the combination. For example, if the upper 2 bits are “00” and the lower 3 bits are “000”, the combination expresses the operation of the addition operation, the upper 2 bits are “01”, and the lower 3 bits are “00”.
If "0", the combination represents a subtraction operation. When the upper 2 bits are “00” and the lower 3 bits are “001”, the combination expresses a left shift operation (<< in the figure means left shift operation), and the upper 2 bits
Is "01" and the lower three bits are "001", the combination represents a right shift operation (>> in the figure means a right shift operation).

【0047】図10は、レジスタにて読出先アドレス、
書込先アドレスを指定したメモリロード命令/メモリス
トア命令の命令フォーマットを示す。この命令フォーマ
ットでは、2bit〜4bitに第1オペランドに指定すべきレ
ジスタ番号を指定でき、5bit〜7bitに読出元に指定すべ
きレジスタ番号又は演算結果の格納先に指定すべきレジ
スタ番号を指定できる。10bitから12bitまでの3bitにオ
ペレーション内容が指定され、13bitから15bitまでの3b
itに3bit長の即値が指定される。
FIG. 10 shows a read destination address in a register,
This shows an instruction format of a memory load instruction / memory store instruction specifying a write destination address. In this instruction format, a register number to be specified as the first operand can be specified in 2 bits to 4 bits, and a register number to be specified as a read source or a register number to be specified as a storage destination of an operation result can be specified in 5 bits to 7 bits. The operation content is specified in 3 bits from 10 bits to 12 bits, and 3b from 13 bits to 15 bits
A 3-bit immediate value is specified for it.

【0048】下段の表は、3bitによるオペレーション内
容の指定のうち、上位1bitと、下位2bitの組み合わせ
と、その組み合わせにて表現されるオペレーション内容
とを示している。例えば上位1bitが『1』であり、下位2
bitが『10』である場合、読出元オペランドsrc_REGで指
定されたレジスタの値を、第1オペランドsrc1と3bitの
即値im:3との組み合わせ(src1+im:3)を用いて指定され
たメモリに格納するストア命令を指定している。
The lower table shows a combination of the upper 1 bit and the lower 2 bits in the specification of the operation content by 3 bits, and the operation content expressed by the combination. For example, the upper 1 bit is “1” and the lower 2
If the bit is "10", the value of the register specified by the read source operand src_REG is stored in the memory specified using the combination of the first operand src1 and the 3-bit immediate value im: 3 (src1 + im: 3). Specifies a store instruction to be stored in.

【0049】上位1bitが『0』であり、下位2bitが『1
0』である場合、その組み合わせは第1オペランドsrc1と
3bitの即値との組み合わせ(src1+im:3)を用いたアドレ
ッシングモードによりメモリから値を読み出し、格納先
dst_REGに指定されたレジスタに格納するロード命令を
指定している。図11は、8bit、11bitの即値の指定が
可能な比較命令/演算命令/分岐命令の命令フォーマッ
トを示す。本命令フォーマットにおいて即値が8bitであ
る場合は、5bitから7bitまでに第1オペランド及び演算
結果の格納に相当するレジスタの指定が可能であり、8b
itから15bitまでを即値の格納に用いる。即値が11bitで
ある場合は、5bitから15bitまでを即値の格納に用い
る。2bitから5bitまでの4bitを用いて下段の表のように
オペレーション内容が指定される。
The upper 1 bit is “0” and the lower 2 bits are “1”.
0 ', the combination is the first operand src1
Reads the value from the memory by the addressing mode using the combination with the 3-bit immediate value (src1 + im: 3)
A load instruction to be stored in the register specified by dst_REG is specified. FIG. 11 shows an instruction format of a comparison instruction / operation instruction / branch instruction capable of specifying an 8-bit or 11-bit immediate value. If the immediate value is 8 bits in this instruction format, the register corresponding to the storage of the first operand and the operation result can be specified from 5 bits to 7 bits.
Use from it to 15 bits for storing immediate values. When the immediate value is 11 bits, 5 bits to 15 bits are used for storing the immediate value. The operation content is specified as shown in the table below using 4 bits from 2 bits to 5 bits.

【0050】下段の表は、当該4bitのうち、上位2bit
と、下位2bitの組み合わせと、その組み合わせにて表現
されるオペレーション内容とを示している。例えば上位
2bitが『10』であり、下位2bitが『01』である場合、そ
の組み合わせは第1オペランドで指定されたレジスタの
値を第2オペランドと8bitの即値とを比較する比較命令
を指定している。
The lower table shows the upper 2 bits of the 4 bits.
And the combination of the lower 2 bits and the operation content expressed by the combination. For example, top
When 2 bits are “10” and the lower 2 bits are “01”, the combination specifies a comparison instruction that compares the value of the register specified by the first operand with the immediate value of the second operand and 8 bits. .

【0051】上位2bitが『10』であり、下位2bitが『1
0』である場合、その組み合わせはオペランドと8bitの
即値とを乗算する乗算命令を指定している。上位2bitが
『11』であり、下位2bitが『11』である場合、その組み
合わせは11bitの即値を分岐先アドレスとした絶対アド
レス指定型の分岐命令を指定している。以上の説明にお
いて、オペレーション内容は一命令語長である16bitに
て表現されるため、命令メモリ100内の如何なるオペ
レーション内容の命令を読み出す場合でも、またどの命
令を解読・実行する場合でも、それらの読出、解読、実
行が均一に一サイクル内に完遂することができる。即
ち、命令の読出・解読・実行が完遂するまでの時間が命令
間でバラツキが生じないように命令フォーマットが規定
されているのである。特に図11において即値の幅を8b
it、11bitとしていることに、この規定の意図は大きく
現れている。つまり指定される即値を長くすると、命令
語長が24bit、32bitまで拡張されてしまう恐れがあり、
その拡張を防ぐため、命令語長が16bitに収まるよう
に、即値長を8bit、11bitに留めているのである。一つ
の命令の実行に、どれだけのサイクル数が必要であるか
を示す単位(CPI(Cycle Per Instruction)という)にて表
現すると、本I/OプロセッサのCPIは純粋に『1』であ
り、『命令を何回読み出したか』『命令を何回解読・実
行したか』はサイクル数にて表現される。
The upper 2 bits are “10” and the lower 2 bits are “1”.
If “0”, the combination specifies a multiplication instruction that multiplies the operand by an 8-bit immediate value. When the upper 2 bits are “11” and the lower 2 bits are “11”, the combination specifies an absolute addressing type branch instruction using an 11-bit immediate value as a branch destination address. In the above description, since the operation content is represented by 16 bits, which is one instruction word length, even when an instruction of any operation content in the instruction memory 100 is read, and when any instruction is decoded and executed, the Reading, decoding, and execution can be uniformly completed within one cycle. That is, the instruction format is defined so that the time required for completing the reading, decoding, and execution of the instruction does not vary between instructions. In particular, in FIG.
The intention of this regulation is greatly expressed in the fact that it and 11 bits are used. That is, if the specified immediate value is lengthened, the instruction word length may be extended to 24 bits or 32 bits.
In order to prevent the expansion, the immediate value length is limited to 8 bits and 11 bits so that the instruction word length is within 16 bits. Expressed in units (called CPI (Cycle Per Instruction)) indicating how many cycles are required to execute one instruction, the CPI of this I / O processor is purely "1", "How many times the instruction has been read" and "how many times the instruction has been decoded and executed" are represented by the number of cycles.

【0052】命令読出回路10は、命令メモリ100内
の読み出し先アドレスを命令メモリ100に出力する。
命令解読制御部11(図中ではDecoder11)は、命令
メモリ100が出力する命令を解読し、その解読結果に
従って命令読出回路10及び演算実行部14を制御す
る。
The instruction reading circuit 10 outputs a read destination address in the instruction memory 100 to the instruction memory 100.
The instruction decoding control unit 11 (Decoder 11 in the figure) decodes the instruction output from the instruction memory 100, and controls the instruction reading circuit 10 and the operation execution unit 14 according to the result of the decoding.

【0053】レジスタセット12は、32bit長の汎用レ
ジスタ(GR)と、16bit長の汎用レジスタとをそれぞれ24
本有する。このように24本ものレジスタを有しているの
は、32bit長のレジスタと、16bit長のレジスタとを4本
ずつ、6本の非同期イベントタスクに割り当てるためで
ある。このように各非同期イベントタスク毎に8本のレ
ジスタを割り当てることにより、タスクの切り換え時に
レジスタの値を退避・復元する必要がなくなる。
The register set 12 stores a general-purpose register (GR) having a length of 32 bits and a general-purpose register having a length of 16 bits.
Have a book. The reason why there are as many as twenty-four registers is to allocate four 32-bit registers and sixteen-bit registers to six asynchronous event tasks. By allocating eight registers to each asynchronous event task in this way, it is not necessary to save and restore the register values when switching tasks.

【0054】演算実行部14は、ALU,乗算器,バレルシ
フタを備え、命令解読制御部11による制御に基づきレ
ジスタセット12における汎用レジスタの格納値を用い
て演算を行う。非同期イベントタスクから別タスクへの
切り換えられた際、演算実行部14はそれに対応する4
本の32bit長の汎用レジスタ、4本の16bit長の汎用レジ
スタを用いて、切り換え後のタスクに含まれている命令
についての演算を実行するタスク管理部15は、命令解
読制御部11における命令実行を監視し、各タスクに割
り当てられたスレッドの時間長が経過すれば次にスレッ
ドを割り当てるべきタスクの識別子を命令読出回路10
に出力する。 (4.1)命令読出回路10は、読出先アドレスの更新を
どのように行うか 命令読出回路10がどのような内部構成にて読出先アド
レスの更新を行うかを図4を参照しながら説明する。命
令読出回路10の内部構成を図4に示す。
The arithmetic execution unit 14 includes an ALU, a multiplier, and a barrel shifter, and performs an arithmetic operation using values stored in general-purpose registers in the register set 12 under the control of the instruction decoding control unit 11. When switching from the asynchronous event task to another task, the operation execution unit 14
The task management unit 15, which uses the 32-bit general-purpose registers and the four 16-bit general-purpose registers to perform an operation on the instruction included in the switched task, executes the instruction execution in the instruction decoding control unit 11. When the time length of the thread assigned to each task has elapsed, the instruction reading circuit 10
Output to (4.1) How the Instruction Read Circuit 10 Updates the Read Destination Address The following describes how the instruction read circuit 10 updates the read destination address with reference to FIG. FIG. 4 shows the internal configuration of the instruction reading circuit 10.

【0055】図4に示すように、命令読出回路10はIF
1+1保持部20、increment回路21、IF2保持部22、D
ECPC保持部23、タスク別PC格納部24、セレクタ25
及びセレクタ26からなり、解読ステージの前に二段の
読出ステージを行うパイプライン処理を実現するよう構
成されている。この二段の読出ステージにおけるそれぞ
れの読出先アドレスを第1読出先アドレスIF1、第2読
出先アドレスIF2という。
As shown in FIG. 4, the instruction reading circuit 10
1 + 1 holding unit 20, increment circuit 21, IF2 holding unit 22, D
ECPC storage unit 23, task-specific PC storage unit 24, selector 25
And a selector 26, and is configured to realize pipeline processing for performing two reading stages before the decoding stage. The respective read destination addresses in these two read stages are referred to as a first read destination address IF1 and a second read destination address IF2.

【0056】図4においてIF1はセレクタ26が出力し
たアドレスをいい、IF2はIF2保持部22が保持するアド
レスをいう。図12は、命令読出回路10内で行われる
パイプライン処理を示すタイミングチャートである。以
降、命令読出回路10の構成要素について言及する場合
は、本タイミングチャートを引用するものとする。IF1+
1保持部20は、カウント値を保持するためのカウント
値レジスタとして用いられるものであり、タスク別PC格
納部24から何れか一つの読出先アドレスが出力される
と、当該アドレスをカウント初期値として保持し、その
カウント値のインクリメントがincrement回路21より
行われると、インクリメント後のアドレスを最新のカウ
ント値として保持する。
In FIG. 4, IF1 refers to the address output from the selector 26, and IF2 refers to the address held by the IF2 holding unit 22. FIG. 12 is a timing chart showing the pipeline processing performed in the instruction reading circuit 10. Hereinafter, the timing chart will be referred to when referring to the components of the instruction reading circuit 10. IF1 +
The 1 holding unit 20 is used as a count value register for holding a count value. When any one of the read destination addresses is output from the task-specific PC storage unit 24, the address is set as a count initial value. When the count value is incremented by the increment circuit 21, the incremented address is held as the latest count value.

【0057】この際、increment回路21より新たにイ
ンクリメントされたアドレスが出力されてくると、IF1+
1保持部20はそれまで保持していたアドレスを信号線
を介してセレクタ25に出力すると共にセレクタ26
に出力する。increment回路21は、セレクタ26によ
り出力されたIF1をクロック信号に従ってインクリメン
トする。インクリメントされたアドレスはIF1+1保持部
20により保持される。セレクタ26により出力された
IF1は、それまでIF1+1保持部20により保持されていた
値であるので、increment回路21によるインクリメン
トにより、IF1+1保持部20が保持していたカウント値
は一クロック毎にインクリメントされてゆく。
At this time, when a newly incremented address is output from the increment circuit 21, IF1 +
1 The holding unit 20 outputs the address held up to that time to the selector 25 via a signal line,
Output to The increment circuit 21 increments IF1 output from the selector 26 according to the clock signal. The incremented address is held by the IF1 + 1 holding unit 20. Output by selector 26
Since IF1 is the value held by the IF1 + 1 holding unit 20 until then, the count value held by the IF1 + 1 holding unit 20 is incremented every clock by the increment by the increment circuit 21. .

【0058】図12のタイミングチャートにおいて、読
出先アドレスとして出力された命令0-0の読出先アドレ
スは、increment回路21によってインクリメントされ
る(図中のinc1,inc2,inc3参照)。これによりIF1+1保
持部20が保持する読出先アドレスは、命令0-1のアド
レス、命令0-2のアドレス、命令0-3のアドレスというよ
うに更新されてゆく。
In the timing chart of FIG. 12, the read destination address of the instructions 0-0 output as the read destination address is incremented by the increment circuit 21 (see inc1, inc2, and inc3 in the figure). As a result, the read destination address held by the IF1 + 1 holding unit 20 is updated to the address of the instruction 0-1, the address of the instruction 0-2, the address of the instruction 0-3, and the like.

【0059】IF2保持部22は、クロック信号に同期し
て前回IF1+1保持部20により出力されたアドレスを命
令を読み出すべき第2の読出先アドレスとして保持す
る。図12のタイミングチャートでは、第2の読出先ア
ドレスとして命令0-0のアドレス、命令0-1のアドレス、
命令0-2のアドレス、命令0-3のアドレスが出力されてい
ることがわかる。これらのアドレスは第1の読出先アド
レスより一サイクルだけ遅れていることがわかる。新た
なアドレスがIF1+1保持部20から出力されると、IF2保
持部22はそれまで保持していたアドレスをDECPC保持
部23に出力し、信号線を介してセレクタ25にも出
力する。出力後、IF1+1保持部20により出力されたそ
の新たなアドレスを保持する。
The IF2 holding unit 22 holds the address previously output by the IF1 + 1 holding unit 20 in synchronization with the clock signal as a second read destination address from which an instruction is to be read. In the timing chart of FIG. 12, the addresses of the instructions 0-0, the addresses of the instructions 0-1,
It can be seen that the address of the instruction 0-2 and the address of the instruction 0-3 are output. It can be seen that these addresses are one cycle behind the first read destination address. When a new address is output from the IF1 + 1 holding unit 20, the IF2 holding unit 22 outputs the address held so far to the DECPC holding unit 23, and also outputs to the selector 25 via a signal line. After the output, the new address output by the IF1 + 1 holding unit 20 is held.

【0060】DECPC保持部23は、前回IF2保持部22に
より出力されたアドレスを保持する。このアドレスは命
令解読制御部11による解読制御の対象となる命令のア
ドレスと一致する。新たなアドレスがIF2保持部22に
より出力されると、その新たなアドレスを保持して解読
対象のアドレスの更新を行う。DECPC保持部23が保持
するアドレスは、IF2保持部22がそれまで保持してい
たアドレスであり、IF2保持部22が保持するアドレス
は、IF1+1保持部20がそれまで保持していたアドレス
であるから、IF1+1保持部20が保持しているアドレス
と比較すると、DECPC保持部23に保持されているアド
レスは二命令遅れであり、IF2保持部22が保持してい
るアドレスと比較すると、DECPC保持部23に保持され
ているアドレスは一命令遅れである。
The DECPC holding unit 23 holds the address previously output from the IF2 holding unit 22. This address coincides with the address of an instruction to be subjected to decoding control by the instruction decoding control unit 11. When the new address is output by the IF2 holding unit 22, the new address is held and the address to be decoded is updated. The address held by the DECPC holding unit 23 is the address held by the IF2 holding unit 22 until then, and the address held by the IF2 holding unit 22 is the address held by the IF1 + 1 holding unit 20 until then. Therefore, when compared with the address held by the IF1 + 1 holding unit 20, the address held by the DECPC holding unit 23 is delayed by two instructions, and when compared with the address held by the IF2 holding unit 22, The address held in the DECPC holding unit 23 is delayed by one instruction.

【0061】タスク別PC格納部24は、タスク毎の読出
先アドレスを保持する領域をその内部に有するメモリ回
路或はタスク毎に設けられたアドレスレジスタである。
内部領域或は個々のアドレスレジスタにおいて、個々に
記憶されている読出先アドレスには、3ビット長のタス
ク識別子がアドレスとして付されている。尚、タスク
(0)の読出先アドレスをIPC0と呼び、タスク(1)の読出先
アドレスをIPC1と呼ぶ。以降タスク(2)、タスク(3)、タ
スク(4)、タスク(5)についても同様である。
The task-specific PC storage section 24 is a memory circuit having an area for holding a read destination address for each task therein or an address register provided for each task.
In the internal area or in each address register, a 3-bit task identifier is assigned as an address to a read destination address stored individually. The task
The read destination address of (0) is called IPC0, and the read destination address of task (1) is called IPC1. The same applies to task (2), task (3), task (4), and task (5).

【0062】タスク別PC格納部24におけるこれらの読
出先アドレスの読み書き動作はタスク管理部15からタ
スクを切り換える旨の指示(タスク切替信号chg_task_e
xのHigh値)が出力された場合に行われる。このタスク
切替信号chg_task_exがHigh値である場合においてタス
ク管理部15よりタスク切替信号chg_task_exと共に実
行が済んだタスクの3ビット長の識別子(書き込みアド
レス選択信号taskid(wr_adr))及び次に実行すべきタス
クの3ビット長の識別子(読み出しアドレス選択信号nxt
taskid(rd_adr))が出力されるが、タスク別PC格納部2
4はこれらの信号に従った内部領域の読み書きを行う。
即ちタスク別PC格納部24は書き込みアドレス選択信号
taskid(wr_adr)をタスク別PC格納部24内のアドレスと
して解釈して、それに指示される内部領域にセレクタ2
5から出力された読出先アドレスを格納する。図12の
タイミングチャートにおいてタスク切替信号chg_task_e
xが立ち上がったタイミングa1,b1において読出先アドレ
スの書き込みa2,b2が行われる。
The read / write operation of these read destination addresses in the task-specific PC storage unit 24 is performed by the task management unit 15 to instruct the task switching (task switching signal chg_task_e).
This is performed when (High value of x) is output. When the task switching signal chg_task_ex is at the high value, the task management unit 15 executes the task switching signal chg_task_ex together with the task switching signal chg_task_ex and executes the task with the 3-bit identifier (write address selection signal taskid (wr_adr)) and the next task to be executed. 3-bit identifier (read address selection signal nxt
taskid (rd_adr)) is output, but the task-specific PC storage unit 2
4 reads and writes the internal area according to these signals.
That is, the task-specific PC storage unit 24 uses the write address selection signal.
The taskid (wr_adr) is interpreted as an address in the task-specific PC storage unit 24, and the selector 2 is stored in the internal area designated by the taskid (wr_adr).
5 is stored. In the timing chart of FIG. 12, the task switching signal chg_task_e
At timings a1 and b1 when x rises, writing a2 and b2 of the read destination address are performed.

【0063】書き込みa2が行われた時期には、IF2保持
部22は命令0-3のアドレスを保持しており、IF1+1保持
部20はこの命令0-3のアドレスに『1』を加算したアド
レス0-4を信号線を介してセレクタ25に出力してい
る。このように出力されると、アドレス0-4がタスク別P
C格納部24に格納される。これにより、タスク別PC格
納部24内のタスク(0)に次のスレッドが巡ってくれ
ば、タスク(0)の読出はアドレス0-4から行われる。
When the write a2 is performed, the IF2 holding unit 22 holds the address of the instruction 0-3, and the IF1 + 1 holding unit 20 adds "1" to the address of the instruction 0-3. Addresses 0-4 are output to the selector 25 via signal lines. When output in this way, addresses 0-4 are
It is stored in the C storage unit 24. Thus, when the next thread goes around the task (0) in the task-specific PC storage unit 24, the task (0) is read from the address 0-4.

【0064】書き込みb2が行われた時期には、IF2保持
部22は命令1-3のアドレスを保持しており、IF1+1保持
部20はこの命令1-3のアドレスに『1』を加算したアド
レス1-4を信号線を介してセレクタ25に出力してい
る。このように出力すると、インクリメントされたアド
レス1-4がタスク別PC格納部24に格納される。これに
より、タスク別PC格納部24内のタスク(1)に次のスレ
ッドが巡ってくれば、タスク(1)の読出はアドレス1-4か
ら行われる。
When writing b2 is performed, the IF2 holding unit 22 holds the address of the instruction 1-3, and the IF1 + 1 holding unit 20 adds “1” to the address of the instruction 1-3. The selected address 1-4 is output to the selector 25 via a signal line. When output is performed in this manner, the incremented addresses 1-4 are stored in the task-specific PC storage unit 24. Thus, when the next thread goes around the task (1) in the task-specific PC storage unit 24, the task (1) is read from the address 1-4.

【0065】また読み出しアドレス選択信号nxttaskid
(rd_adr)がタスク管理部15より与えられると、タスク
別PC格納部24は、その識別子をタスク別PC格納部24
内のアドレスとして解釈して、それにより指示される内
部領域から非同期イベントタスクの読出先アドレスを取
り出してセレクタ26に出力する。図12のタイミング
チャートにおいて、読み出しアドレス選択信号nxttaski
dとして識別子(1)がタスク管理部15より与えられ、ch
g_task_exが立ち上がると(参照符号a3参照)、タスク
別PC格納部24は、その識別子により指示されるタスク
(1)をタスク別PC格納部24内のアドレスとして解釈し
て、そこに格納されている読出先アドレス(1-0)を取り
出してセレクタ26に出力する(参照符号a4参照)。
The read address selection signal nxttaskid
When (rd_adr) is given from the task management unit 15, the task-specific PC storage unit 24 stores the identifier in the task-specific PC storage unit 24.
And reads the address of the asynchronous event task from the internal area designated by the address and outputs it to the selector 26. In the timing chart of FIG. 12, the read address selection signal nxttaski
The identifier (1) is given from the task management unit 15 as d, and ch
When g_task_ex rises (see reference symbol a3), the task-specific PC storage unit 24 stores the task designated by the identifier.
It interprets (1) as an address in the task-specific PC storage unit 24, extracts the read destination address (1-0) stored there, and outputs it to the selector 26 (see reference numeral a4).

【0066】命令2-0のアドレスが読出先アドレスIF1と
して出力されたタイミングで、読み出しアドレス選択信
号nxttaskidとして識別子(2)がタスク管理部15より与
えられ、chg_task_exが立ち上がると(参照符号a5参
照)、タスク別PC格納部24は、その識別子により指示
されるタスク(2)の読出先アドレスとして読出先アドレ
ス(2-0)を取り出してセレクタ26に出力する(参照符
号a6参照)。
At the timing when the address of the instruction 2-0 is output as the read destination address IF1, the identifier (2) is given as the read address selection signal nxttaskid from the task management unit 15, and the chg_task_ex rises (see reference numeral a5). Then, the task-specific PC storage unit 24 extracts the read destination address (2-0) as the read destination address of the task (2) specified by the identifier and outputs it to the selector 26 (see reference numeral a6).

【0067】以上のように読出先アドレスが出力される
と、タスク(0)の命令は4命令だけ実行され、これに続
いてタスク(1)の命令が4命令だけ実行される。以降、
タスク(2)、タスク(3)、タスク(4)、タスク(5)の命令列
がそれぞれ四命令ずつ実行されてゆく。4入力−1出力の
セレクタであるセレクタ25は、、、、の信号
線に伝送されるアドレスの何れかを選択的にタスク別PC
格納部24に出力する。これらの〜の何れを選択す
るかは図5に示す出力論理表に示す通りであり、命令解
読制御部11が命令の解読結果に応じて出力するselpc
信号に基づいてなされる。ここでの信号線はIF1+1保
持部20の出力であり、タスク管理部15よりタスク切
替信号chg_task_exがHigh値に切り換えられた場合はセ
レクタ25はこれを選択する。
When the read destination address is output as described above, only four instructions of task (0) are executed, and subsequently, only four instructions of task (1) are executed. Or later,
Instruction sequences of task (2), task (3), task (4), and task (5) are each executed by four instructions. The selector 25, which is a 4-input-1-output selector, selectively selects one of the addresses transmitted to the signal lines of the task-specific PC.
Output to the storage unit 24. Which one of these is selected is as shown in the output logic table shown in FIG. 5, and the instruction decoding control unit 11 outputs the selpc output according to the decoding result of the instruction.
This is done based on the signal. The signal line here is the output of the IF1 + 1 holding unit 20, and when the task switching signal chg_task_ex is switched to the high value by the task management unit 15, the selector 25 selects this.

【0068】また、の信号線はそれぞれ命令解読制
御部11及び演算実行部14を接続されている。は、
絶対アドレス指定を用いた分岐命令の解読時において、
分岐命令の即値を分岐先アドレスとして命令解読制御部
11から取得するために選択される。は、間接参照指
定を用いた分岐命令の解読時において、演算実行部14
により算出されたアドレスを分岐先アドレスとして用い
る際に選択される。
The signal lines are connected to the instruction decoding control unit 11 and the operation execution unit 14, respectively. Is
When decoding a branch instruction using absolute addressing,
This is selected to obtain the immediate value of the branch instruction from the instruction decoding control unit 11 as the branch destination address. Is used when decoding a branch instruction using indirect reference designation.
Is selected when the address calculated by the above is used as the branch destination address.

【0069】セレクタ26は、2入力−1出力のセレクタ
であり、タスク切替信号chg_task_exがLowの期間におい
てincrement回路21によるインクリメント後のアドレ
スを選択してIF1としてincrement回路21及びIF2保持
部22に出力する。タスク切替信号chg_task_exがHigh
の期間においてタスク別PC格納部24に格納されている
次に実行すべきタスクのアドレスをIF1としてincrement
回路21及びIF2保持部22に出力する。
The selector 26 is a 2-input / 1-output selector. The selector 26 selects an address after increment by the increment circuit 21 during a period when the task switching signal chg_task_ex is Low, and outputs the selected address as IF1 to the increment circuit 21 and the IF2 holding unit 22. I do. Task switching signal chg_task_ex is High
The address of the next task to be executed stored in the task-specific PC storage unit 24 during the period of
The signal is output to the circuit 21 and the IF2 holding unit 22.

【0070】以上のように構成された命令読み出し回路
によれば、タスク切り換え時において、これまで実行さ
れていたタスクの読出先アドレスはセレクタ25により
タスク別PC格納部24に格納され、これに代えてタスク
別PC格納部24に格納されている次のタスクのアドレス
がセレクタ26によりIF1として出力される。以上の読
出先アドレスの切り換えは、一サイクルにて行われ、こ
の読出先アドレスの切り換えにおいて、I/Oプロセッサ
は余計な処理を行う必要がない。割り込み信号の通知時
に行われる分岐のように先行的に読み出したアドレスを
無効化することもない。従って、命令読出回路10によ
る読出先アドレスの退避・復元は、オーバーヘッドの発
生無しに行われる。 (4.2)タスク管理部15は、次に実行すべき非同期イ
ベントタスクをどのように決定するか タスク管理部15がどのような内部構成にて次に実行す
べき非同期イベントタスクを決定するかを図6に示すタ
スク管理部15の内部構成を参照しながら説明する。
According to the instruction reading circuit configured as described above, at the time of task switching, the read-out address of the task that has been executed so far is stored in the task-specific PC storage unit 24 by the selector 25, and is replaced with this. Then, the address of the next task stored in the task-specific PC storage unit 24 is output by the selector 26 as IF1. The above switching of the read destination address is performed in one cycle, and the switching of the read destination address does not require the I / O processor to perform extra processing. There is no need to invalidate the address read out earlier, as in the case of branching when an interrupt signal is notified. Therefore, the saving and restoring of the read destination address by the instruction reading circuit 10 are performed without generating overhead. (4.2) How the task management unit 15 determines an asynchronous event task to be executed next The figure shows how the task management unit 15 determines an asynchronous event task to be executed next with an internal configuration. 6 will be described with reference to the internal configuration of the task management unit 15 shown in FIG.

【0071】図6は、タスク管理部15の内部構成を示
す図である。図6に示すようにタスク管理部15はスレ
ッドマネージャー61及びスケジューラ62からなり、
スレッドマネージャー61はフリップフロップ 51、
カウンタ52、及び比較器54から構成され、スケジュ
ーラ62はタスクID保持部71、タスクID保持部72、
タスクラウンド管理部73、及びプライオリティエンコ
ーダ74から構成される。
FIG. 6 is a diagram showing the internal configuration of the task management unit 15. As shown in FIG. 6, the task management unit 15 includes a thread manager 61 and a scheduler 62.
The thread manager 61 is a flip-flop 51,
The scheduler 62 includes a counter 52 and a comparator 54. The scheduler 62 includes a task ID storage 71, a task ID storage 72,
It comprises a task round management unit 73 and a priority encoder 74.

【0072】フリップフロップ 51は、次に実行され
る命令が何番目であるかを示す整数値(これをカウント
値iと呼ぶ)を保持する。カウンタ52は、初期値が
『1』に設定され、上限値が『4』に設定されたカウンタ
であり、クロック信号に同期してフリップフロップ 5
1に保持されているカウント値を1,2,3,4,1,2,3,4とい
うようにカウントアップする。
The flip-flop 51 holds an integer value indicating the next instruction to be executed (this is called a count value i). The counter 52 is a counter whose initial value is set to “1” and whose upper limit value is set to “4”.
The count value held at 1 is counted up as 1,2,3,4,1,2,3,4.

【0073】比較器54は、カウンタ52がカウントア
ップした値と、整数値『4』との比較を行い、もしカウ
ンタ52のカウント値と整数値『4』とが一致すれば、
タスク切替信号chg_task_exをHigh値にしてセレクタ2
6及びタスク別PC格納部24に出力する。このようにカ
ウンタ52が『4』をカウントする度にタスク切替信号
chg_task_exがHighになることにより、セレクタ26に
よるタスク別PC格納部24の選択は、4サイクルにつき
一回行われることになる。この際、タスク別PC格納部2
4は次にスレッドを割り当てるべきタスクの読出先アド
レスをセレクタ26に出力しているから、タスク別PC格
納部24からの読出先アドレスの出力は、4サイクルの
実行につき一回行われることになる。
The comparator 54 compares the value counted up by the counter 52 with the integer value “4”, and if the count value of the counter 52 matches the integer value “4”,
Selector 2 by setting task switching signal chg_task_ex to High value
6 and the task-specific PC storage unit 24. Thus, every time the counter 52 counts “4”, the task switching signal
By setting chg_task_ex to High, the selection of the task-specific PC storage unit 24 by the selector 26 is performed once every four cycles. At this time, the task-specific PC storage unit 2
4 outputs the read destination address of the task to which the thread is to be allocated next to the selector 26, so that the output of the read destination address from the task-specific PC storage unit 24 is performed once every four cycles. .

【0074】タスクID保持部71は、命令実行のカウン
トがカウンタ52により行われているタスクの識別子
(これをタスク識別子taskidと呼ぶ。)を保持する。タ
スク識別子の一例を図7(a)に示す。図7(a)に示
すように、タスク識別子は3ビットを用いて、命令メモ
リ100に記憶されている6つのタスクの何れか一つを
指示する。命令実行のカウントが4回行われると、スケ
ジューラ62においてプライオリティエンコーダ74か
ら次にスレッドを割り当てるべきタスクのタスク識別子
taskidが出力されてくるが、この際タスクID保持部71
は、これまで保持していたタスク識別子taskidをタスク
ラウンド管理部73に出力し、新たに出力されてくるタ
スク識別子taskidを保持する。
The task ID holding unit 71 holds an identifier of a task whose instruction execution is counted by the counter 52 (this is called a task identifier taskid). FIG. 7A shows an example of the task identifier. As shown in FIG. 7A, the task identifier uses three bits to indicate any one of the six tasks stored in the instruction memory 100. When the instruction execution count is performed four times, the task identifier of the task to which the next thread is to be assigned from the priority encoder 74 in the scheduler 62
The taskid is output. At this time, the task ID holding unit 71
Outputs the task identifier taskid held so far to the task round management unit 73, and holds the newly output task identifier taskid.

【0075】タスクラウンド管理部73は、タスクID保
持部71においてタスク識別子がどのように更新されて
きたかを監視し、6ビット長のレジスタを用いて六個の
タスクのうちスレッドが割り当てられたものを管理す
る。またカウンタ52が4命令の実行をカウントする
と、タスクID保持部71によりタスク識別子taskidが出
力され、タスクラウンド管理部73はスレッドの割り当
てが済んだタスクを示す数値(この数値をラウンド値ta
sknと呼ぶ)をプライオリティエンコーダ74に出力す
る。ラウンド値tasknの一例を図7(b)に示す。この
ラウンド値tasknにおいて、第1ビットが『1』であれ
ば、タスク(1)にスレッドが割り当てられたことを示
し、第1ビットが『0』であればタスク(1)がそうでない
ことを示す。タスク管理レジスタ13の第2ビットが
『1』であれば、タスク(2)にスレッドが割り当てられた
ことを示し、第2ビットが『0』であればタスク(2)がそ
うでないことを示す。
The task round management unit 73 monitors how the task ID has been updated in the task ID holding unit 71, and uses a 6-bit register to assign a thread among the six tasks. Manage. When the counter 52 counts the execution of the four instructions, the task ID holding unit 71 outputs a task identifier taskid, and the task round management unit 73 outputs a numerical value indicating the task to which the thread has been allocated (this numerical value is represented by the round value ta).
skn) is output to the priority encoder 74. An example of the round value taskn is shown in FIG. In this round value taskn, if the first bit is “1”, it indicates that a thread has been allocated to task (1). If the first bit is “0”, it indicates that task (1) is not. Show. If the second bit of the task management register 13 is “1”, it indicates that the thread is allocated to the task (2), and if the second bit is “0”, it indicates that the task (2) is not. .

【0076】タスク(0)、タスク(1)にスレッドの割り当
てが済めば、タスクラウンド管理部73は『000011』を
プライオリティエンコーダ74に出力する。またタスク
(0)、タスク(1)、タスク(2)にスレッドの割り当てが済
めば、タスクラウンド管理部73は『000111』をプライ
オリティエンコーダ74に出力し、タスク(0)、タスク
(1)、タスク(2)、タスク(3)にスレッドの割り当てが済
めば、タスクラウンド管理部73は『001111』をプライ
オリティエンコーダ74に出力する。
When the threads are assigned to the tasks (0) and (1), the task round manager 73 outputs “000011” to the priority encoder 74. Also tasks
If the threads are assigned to (0), task (1), and task (2), the task round management unit 73 outputs “000111” to the priority encoder 74, and outputs the tasks (0),
When the threads are assigned to (1), task (2), and task (3), the task round management unit 73 outputs “001111” to the priority encoder 74.

【0077】尚タスク(0)〜タスク(5)へのスレッドの割
り当てが一巡すると、『111111』をプライオリティエン
コーダ74に出力した後6ビット長のレジスタを『00000
0』にリセットする。プライオリティエンコーダ74
は、タスクラウンド管理部73が出力したラウンド値ta
sknを受け取り、受け取ったタスクラウンド管理部73
のラウンド値tasknにおいて何ビット目に『1』から
『0』への反転が生じているかを検出する。このように
『0』への反転が生じたビットを検出すると、この反転
が生じたビットに割り当られているタスクのタスク識別
子taskidをタスクID保持部71に出力する。出力された
タスク識別子は、アドレス選択信号nxttaskid(rd_adr)
としてタスク別PC格納部24に出力される。
When the thread allocation to tasks (0) to (5) has completed one cycle, "111111" is output to the priority encoder 74, and then the 6-bit register is set to "00000".
Reset to "0". Priority encoder 74
Is the round value ta output from the task round management unit 73.
Receiving the skn, the received task round management unit 73
In the round value taskn, the bit number at which the inversion from “1” to “0” occurs is detected. When the bit inversion to “0” is detected, the task identifier taskid of the task assigned to the bit inversion is output to the task ID holding unit 71. The output task identifier is the address selection signal nxttaskid (rd_adr)
Is output to the task-specific PC storage unit 24.

【0078】例えばタスクラウンド管理部73からラウ
ンド値tasknとして『000011』が出力されると、プライ
オリティエンコーダ74はこのラウンド値tasknにおい
て下位から第2ビット目に『0』への反転が生じている
ことを検出する(尚、最下位ビットをゼロビットと数え
ていることは留意されたい。)。この第2ビット目は図
7(b)においてタスク(2)に割り当られているビット
であるから、プライオリティエンコーダ74はタスク
(2)のタスク識別子taskidをタスクID保持部71に出力
する。
For example, when “000011” is output as the round value taskn from the task round management unit 73, the priority encoder 74 determines that the inversion of “0” has occurred in the second bit from the lower order in the round value taskn. (Note that the least significant bit is counted as a zero bit). Since the second bit is a bit assigned to the task (2) in FIG. 7B, the priority encoder 74
The task identifier (2) is output to the task ID holding unit 71.

【0079】例えばタスクラウンド管理部73からラウ
ンド値tasknとして『000111』が出力されると、プライ
オリティエンコーダ74はこのラウンド値tasknにおい
て下位から第3ビット目に『0』への反転が生じている
ことを検出する。この第3ビット目は図7(b)におい
てタスク(3)に割り当られているビットであるから、プ
ライオリティエンコーダ74はタスク(3)のタスク識別
子taskidをタスクID保持部71に出力する。ラウンド値
tasknは既にスレッドの割り当てが済んだタスクを示す
から、このラウンド値tasknにおいて『0』へと反転して
いるビットは次にスレッドを割り当てるべきタスクがど
れであるかを意味する。『0』へと反転しているビット
をタスク識別子taskidに変換すると、タスクID保持部7
1には次にスレッドを割り当てるべきタスクが格納され
る。
For example, when “000111” is output as the round value taskn from the task round management unit 73, the priority encoder 74 determines that the inversion of “0” has occurred in the third bit from the lower order in the round value taskn. Is detected. Since this third bit is a bit assigned to task (3) in FIG. 7B, the priority encoder 74 outputs the task identifier taskid of task (3) to the task ID holding unit 71. Round value
Since taskn indicates a task to which a thread has already been assigned, a bit inverted to “0” in this round value taskn indicates which task is to be assigned a thread next. When the bit inverted to “0” is converted into the task identifier taskid, the task ID holding unit 7
1 stores a task to which a thread is to be assigned next.

【0080】タスクID保持部72は、プライオリティエ
ンコーダ74が新たなタスク識別子taskidを出力する
と、直前に出力されていたタスク識別子taskidを書き込
みアドレス選択信号taskid(wr_adr)として保持して、タ
スク別PC格納部24に出力する。以上のように構成され
た第1実施形態のI/Oプロセッサによって、どのように
スレッドが割り当てられるかを図13に示す。図13
は、タスク(0)からタスク(5)までのタスクに割り当てた
スレッドを時間順に並べることにより形成されるフレー
ムという単位を示す。
When the priority encoder 74 outputs a new task identifier taskid, the task ID holding unit 72 holds the previously output task identifier taskid as a write address selection signal taskid (wr_adr), and stores the task ID in the PC for each task. Output to the unit 24. FIG. 13 shows how threads are allocated by the I / O processor of the first embodiment configured as described above. FIG.
Indicates a unit called a frame formed by arranging threads assigned to tasks from task (0) to task (5) in chronological order.

【0081】タスク(0)〜タスク(5)にはそれぞれ4サイ
クルのスレッドが割り当てられるので、24サイクルの
フレームが形成されることになる。このフレームによ
り、図7に示した命令列は四命令ずつ均一に実行される
ことになる。 (5.)動作クロック数の計算について 第1実施形態のI/Oプロセッサにおいて動作クロック数
がどのように計算されるかについて図55を参照しなが
ら説明する。図55は第1実施形態におけるスレッド割
り当てにてビデオアウトタスク、オーディオアウトタス
クを実行する場合に動画ストリーム、オーディオストリ
ームがどのように処理されるかを示すタイミングチャー
トである。ここでビデオアウトタスク、オーディオアウ
トタスクのリアルタイム性を保証するには、動画ストリ
ームを映像信号に変換するためのビデオアウトタスクは
ディスプレィの水平同期信号の周期に基づいた50μsec
において、一ライン分の画像を処理させねばならないと
し、オーディオストリームを音声信号に変換するための
オーディオアウトタスクは90μsecという周期におい
て、所定の音声ストリームを処理せねばならないとす
る。
Tasks (0) to (5) are each assigned a 4-cycle thread, so that a 24-cycle frame is formed. With this frame, the instruction sequence shown in FIG. 7 is uniformly executed every four instructions. (5.) Calculation of Number of Operation Clocks How the number of operation clocks is calculated in the I / O processor of the first embodiment will be described with reference to FIG. FIG. 55 is a timing chart showing how a moving image stream and an audio stream are processed when a video out task and an audio out task are executed by thread allocation in the first embodiment. Here, in order to guarantee the real-time performance of the video-out task and the audio-out task, the video-out task for converting the video stream into a video signal is 50 μsec based on the cycle of the display horizontal synchronization signal.
In this example, it is assumed that an image for one line must be processed, and that an audio out task for converting an audio stream into an audio signal must process a predetermined audio stream at a period of 90 μsec.

【0082】この場合、先ず第1に上記の周期において
『これだけの数の命令は最低実行しておかねばならな
い』という最低消化数を導出する。ここで一ライン分の
映像データを復号するには、ビデオアウトタスク内の44
8個もの命令実行を最低消化せねばならず、一周期分の
音声データを復号するには、オーディオアウトタスク内
の808個もの命令実行を最低消化せねばならない。ま
た、本実施形態においてCPI=1であり、命令数はサイ
クル数と等価であるため、最低消化数からビデオアウト
タスク、オーディオアウトタスクに割り当てるべきサイ
クル数が448(=4×112)サイクル、808(=4×202)サイクル
と決定される。
In this case, first, in the above-mentioned cycle, the minimum digestion number of "this number of instructions must be executed at least" is derived. Here, to decode one line of video data, 44
At least eight instructions must be executed, and in order to decode one cycle of audio data, at least 808 instructions in the audio out task must be executed. In this embodiment, CPI = 1 and the number of instructions is equivalent to the number of cycles. Therefore, the number of cycles to be allocated to the video-out task and the audio-out task from the minimum digest number is 448 (= 4 × 112) cycles, 808 (= 4 × 202) cycles.

【0083】またタスク(0)〜タスク(5)はそれぞれを四
サイクルずつ実行される。ここで命令読出回路10内で
のセレクタ25、セレクタ26によるプログラムカウン
タの切り換えによりオーバーヘッドは発生しないので、
タスク(0)〜タスク(5)の一巡に要する時間は実質24サイ
クルとなる。命令サイクル数は4であり、タスク総数は6
であるので、全てのタスクは、24サイクルにて4命令ず
つ実行されることになる。
Each of the tasks (0) to (5) is executed by four cycles. Here, no overhead occurs due to the switching of the program counter by the selector 25 and the selector 26 in the instruction reading circuit 10, so that
The time required for one round of task (0) to task (5) is substantially 24 cycles. 4 instruction cycles and 6 tasks
Therefore, all tasks are executed by four instructions in 24 cycles.

【0084】そうすると、1サイクルに要する時間S1,S2
は以下の式を満たさねばならない。 50μsec > 6×4×112×S1nsec 90μsec > 6×4×202×S2nsec S1 < 50μsec / 6×4×112 = 18.6nsec S2 < 90μsec / 6×4×202 = 18.56nsec 動作クロック数を1÷S2nsecの計算から定めると、 54MHz = 1÷18.56nsec となる。以上の計算により、ビデオアウトタスク、オー
ディオアウトタスクの処理完遂に最適な動作クロック数
を一義的に導出することができる。以上のように本実施
形態によれば、動作クロック数の最適な下限値を所定の
周期において実行せねばならない命令の最低消化数と、
実行周期と、タスク総数とから一義的に導出することが
できる。動作クロックの最適な下限値が求まるので、動
作クロック信号を一段と高いものに定めずとも、オーデ
ィオアウトタスク、ビデオアウトタスクのリアルタイム
性を保証でき、動作クロックが低速なタイプが多い民生
機器に搭載される場合でも、MPEGストリームを好適に復
号することができる。
Then, the time required for one cycle S1, S2
Must satisfy the following equation. 50μsec> 6 × 4 × 112 × S1nsec 90μsec> 6 × 4 × 202 × S2nsec S1 <50μsec / 6 × 4 × 112 = 18.6nsec S2 <90μsec / 6 × 4 × 202 = 18.56nsec The number of operation clocks is 1 ÷ S2nsec From calculation, 54MHz = 1 ÷ 18.56nsec. With the above calculations, the optimal number of operation clocks for completing the processing of the video out task and the audio out task can be uniquely derived. As described above, according to the present embodiment, the optimal lower limit of the number of operation clocks is the minimum digestion number of instructions that must be executed in a predetermined cycle,
It can be uniquely derived from the execution cycle and the total number of tasks. Since the optimum lower limit value of the operation clock is determined, the real-time performance of the audio out task and video out task can be guaranteed without setting the operation clock signal to a higher level. In this case, the MPEG stream can be suitably decoded.

【0085】また、複数の非同期イベントタスクを時分
割多重にて実行するI/Oプロセッサを設けることによ
り、割込にて非同期イベント処理を処理しなくて済むの
で、setup部104、VLD部105、IQ/IDCT部106は
逆量子化、逆離散余弦変換、動き補償の処理に専念する
ことができる。また、I/Oプロセッサはプログラムカウ
ンタの値を退避し、復元するためのオーバーヘッドの発
生無しに高速にタスクを切り換えて実行するので、動作
クロックを高速にしなくても、MPEGストリームの再生に
要求されるリアルタイム性を満たすことができる。
Further, by providing an I / O processor for executing a plurality of asynchronous event tasks in a time-division multiplex manner, it is not necessary to process asynchronous event processing by interruption. The IQ / IDCT unit 106 can concentrate on the processes of inverse quantization, inverse discrete cosine transform, and motion compensation. In addition, the I / O processor switches and executes tasks at high speed without the overhead of saving and restoring the value of the program counter. Real-time performance.

【0086】尚、本実施形態において各タスクについて
のスレッドを一律に4サイクルとしたが、各タスクの処
理内容に応じて、それぞれ異なる値に設定しても良い。
タスク別にサイクル数を可変にする場合、図6に示した
スレッドマネージャーを図56に示すように構成する。
本図においてセレクタ200は、タスク(0)からタスク
(5)までの固有のサイクル数である『cycle number for
task0』〜『 cycle number for task5』と接続され、ス
ケジューラ62が出力したnxttaskidに応じて対応する
サイクル数を択一式に比較器54に出力する。図26に
おいて次にスレッドを割り当てるべきタスクがタスク
(0)なら、セレクタ200は『cyclenumber for task0』
を比較器54に出力する。このように構成すれば、タス
ク(0)からタスク(5)までのそれぞれの処理負荷に応じた
最適なサイクル数を各タスクに分配することができる。
またこのような最適なサイクル数をメモリ又はレジスタ
に記憶させておき、これを後日書き換えてもよい。
In the present embodiment, the number of threads for each task is uniformly set to four, but may be set to different values according to the processing contents of each task.
When the number of cycles is made variable for each task, the thread manager shown in FIG. 6 is configured as shown in FIG.
In this figure, the selector 200 is a task (0) to a task (0).
(Cycle number for cycle number for
It is connected to “task0” to “cycle number for task5”, and outputs the number of cycles corresponding to the nxttaskid output from the scheduler 62 to the comparator 54 as an alternative. In FIG. 26, the next task to be assigned a thread
If (0), selector 200 is "cyclenumber for task0"
Is output to the comparator 54. With this configuration, the optimal number of cycles according to the respective processing loads from task (0) to task (5) can be distributed to each task.
Further, such an optimal number of cycles may be stored in a memory or a register, and may be rewritten later.

【0087】更に、本実施形態において実行すべきタス
クを非同期イベントタスクに絞って説明したが、別のタ
スクでもよい。 (第2実施形態)第1実施形態では各タスクのスレッド
に割り当る命令数を一律四サイクルとしていたが、第2
実施形態ではどれだけのサイクルを1スレッドに割り当
るかを、各タスクが独自に変更できるようにした実施形
態である。スレッドへの割り当ては、Wait_Until_Next
命令によりなされる。Wait_Until_Next命令とはスレッ
ドにおける命令を途中で打ち切り、Wait_Until_Next命
令の次順に位置する一連の命令列を次のスレッドに先送
りする旨の命令である。尚Wait_Until_Next命令の解読
時における読み出し先アドレスの格納であるが、この際
図4に示した5入力−1出力のセレクタ25は、の信号
線を介してIF1+1保持部20の出力を選択してタスクPC
格納部24に格納する。
Further, in the present embodiment, the task to be executed has been described as being limited to the asynchronous event task, but another task may be used. (Second Embodiment) In the first embodiment, the number of instructions assigned to each task thread is uniformly set to four cycles.
In this embodiment, each task can independently change how many cycles are allocated to one thread. Assignment to thread is Wait_Until_Next
Made by instruction. The Wait_Until_Next instruction is an instruction to abort an instruction in a thread in the middle and to postpone a series of instruction sequences located next to the Wait_Until_Next instruction to the next thread. Note that the destination address is stored when the Wait_Until_Next instruction is decoded. At this time, the 5-input / 1-output selector 25 shown in FIG. Task pc
It is stored in the storage unit 24.

【0088】図14は、Wait_Until_Next命令(図中のW
UN命令)を命令0-1としてその内部に有した非同期イベ
ントタスクの一例であり、図16は、図14の非同期イ
ベントタスクがどのように実行されるかを示すタイミン
グチャートである。Wait_Until_Next命令が図14に示
すように命令0-1として非同期イベントタスクの第1番
目の命令として格納されている場合、この命令0-1がDEC
PC保持部23に格納され、命令解読制御部11により解
読されると、セレクタ25は、の信号線を介して命令
0-2の読出先アドレスをタスク別PC格納部24に格納す
る(図16のも同様である。)。その後命令解読制御
部11は、命令0-2、命令0-3を無効化する(図16にお
ける『NOP』)。
FIG. 14 shows a Wait_Until_Next instruction (W in FIG. 14).
FIG. 16 is a timing chart showing how the asynchronous event task of FIG. 14 is executed. When the Wait_Until_Next instruction is stored as instruction 0-1 as the first instruction of the asynchronous event task as shown in FIG.
When stored in the PC holding unit 23 and decoded by the instruction decoding control unit 11, the selector 25
The read destination address 0-2 is stored in the task-specific PC storage unit 24 (the same applies to FIG. 16). Thereafter, the instruction decoding control unit 11 invalidates the instructions 0-2 and 0-3 ("NOP" in FIG. 16).

【0089】ここで命令0-2は、I/Oプロセッサのローカ
ルメモリ内のアドレスmem1の値をレジスタセット12内
のレジスタr0に読み出す命令であり、命令0-3はI/Oプロ
セッサのローカルメモリ内のアドレスbuf1の値をレジス
タr1に読み出す命令である。命令0-4はレジスタr0の値
とレジスタr1の値とを乗じて、その結果をレジスタr2に
格納する命令であり、命令0-5は、レジスタr2の値をI/O
プロセッサのローカルメモリ内のアドレスmem1に格納す
る命令である。
Here, the instruction 0-2 is an instruction for reading the value of the address mem1 in the local memory of the I / O processor into the register r0 in the register set 12, and the instruction 0-3 is an instruction for reading the local memory of the I / O processor. Is an instruction to read the value of the address buf1 in the register into the register r1. Instruction 0-4 is an instruction for multiplying the value of register r0 by the value of register r1 and storing the result in register r2.Instruction 0-5 is an instruction for multiplying the value of register r2 by I / O.
This is an instruction to be stored at address mem1 in the local memory of the processor.

【0090】以上の四つの命令は、読出先アドレス、書
込先アドレスが共にI/Oプロセッサのローカルメモリで
あり、命令0-0がWait_Until_Next命令であることによ
り、I/Oプロセッサのローカルメモリを読出先アドレス
−書込先アドレスとした命令が一つのスレッドに納めら
れたことがわかる。図15は、Wait_Until_Next命令の
命令フォーマットの一例を示す。図15において、本命
令は図9に示したレジスタ指定型の算術演算命令の命令
フォーマットを有する。本フォーマットの11bitから13b
itを『010』に指定することにより、Wait_Until_Next命
令のオペレーションをI/Oプロセッサは実行する。
In the above four instructions, both the read destination address and the write destination address are local memories of the I / O processor, and the instructions 0-0 are Wait_Until_Next instructions. It can be seen that the instruction of read destination address-write destination address is stored in one thread. FIG. 15 shows an example of the instruction format of the Wait_Until_Next instruction. In FIG. 15, this instruction has the instruction format of the register designation type arithmetic operation instruction shown in FIG. 11bit to 13b of this format
By specifying it as “010”, the I / O processor executes the operation of the Wait_Until_Next instruction.

【0091】以上のように構成された第2実施形態のI/
Oプロセッサによって、どのようにスレッドが割り当て
られるかを図17を参照しながら説明する。タスク
(1)、タスク(2)、タスク(3)、タスク(4),タスク(5)には
四サイクルのスレッドが割り当てられる。しかしタスク
(0)には、wait_until_next命令が存在しているので、タ
スク(0)に割り当てられるスレッドは、wait_until_next
命令が配置されている位置までとなり、タスク(0)に割
り当てられるスレッドは2サイクルとなる。
The I / O of the second embodiment configured as described above
How a thread is allocated by the O processor will be described with reference to FIG. task
Four cycle threads are assigned to (1), task (2), task (3), task (4), and task (5). But the task
Since the wait_until_next instruction exists in (0), the thread assigned to task (0)
This is the position where the instruction is located, and the thread allocated to the task (0) has two cycles.

【0092】タスク(0)〜タスク(5)が一巡した後に形成
される次のフレームにおいて、タスク(1)は、他のタス
クと同様4サイクルのスレッドが割り当てられる。以上
のように本実施形態によれば、同一メモリをアクセス先
としたメモリアクセス命令を一つのスレッドにおいて集
中して実行することができる。 (第3実施形態)第1実施形態においては、非同期イベ
ントタスクを起動すべき事象が成立したか否かに係ら
ず、6本の非同期イベントタスクに公平にスレッドを割
り当てていたので、起動する必要がない非同期イベント
タスクと、その必要がある非同期イベントタスクとが実
質同時間であるという悪平等が横行していた。第3実施
形態は、非同期イベントタスクを起動すべき事象が成立
しているか否かのチェックを非同期イベントタスクに行
わせ、起動すべき事象が未成立のタスクについては、サ
イクルの割当数を削減するように制御を行う。
In the next frame formed after the task (0) to the task (5) make a round, the task (1) is assigned a thread of four cycles like the other tasks. As described above, according to the present embodiment, it is possible to centrally execute a memory access instruction having the same memory as an access destination in one thread. (Third Embodiment) In the first embodiment, regardless of whether or not an event to start an asynchronous event task is established, threads are fairly allocated to the six asynchronous event tasks. Asynchronous event tasks that do not have the same and the asynchronous event tasks that need to do so are substantially equal in time. In the third embodiment, the asynchronous event task checks whether or not an event to start the asynchronous event task is established, and reduces the number of allocated cycles for the task for which the event to be started is not established. Control as follows.

【0093】第3実施形態におけるI/Oプロセッサの内
部構成を図18に示す。図18においてI/Oプロセッサ
が命令メモリ100、命令読出回路10を備えている点
は第1実施形態と変わりはない。第3実施形態において
新規なのは、命令解読制御部11及び演算実行部14が
それぞれ、命令解読制御部81及び演算実行部84に置
き換えられている点である。また7本の状態監視レジス
タが追加され、タスク管理部15の内部にタスク管理レ
ジスタ13が備えられた点である。
FIG. 18 shows the internal configuration of the I / O processor according to the third embodiment. In FIG. 18, the point that the I / O processor includes the instruction memory 100 and the instruction reading circuit 10 is the same as the first embodiment. What is new in the third embodiment is that the instruction decoding control unit 11 and the operation execution unit 14 are replaced with an instruction decoding control unit 81 and an operation execution unit 84, respectively. Another point is that seven state monitoring registers are added, and a task management register 13 is provided inside the task management unit 15.

【0094】七本の状態監視レジスタCR1〜CR7は、それ
ぞれが5ビット長のレジスタであり、AVデコーダ内部に
おいてI/Oプロセッサの周辺に位置する構成要素、即
ち、ビデオ出力部108、バッファメモリコントローラ
110、RAMコントローラ111、FIFOコントローラ1
12等の構成要素と接続され、I/Oプロセッサの周辺部
における5個の事象の成否が各ビットに反映されている
(尚、ビデオ出力部108、バッファメモリコントロー
ラ110、RAMコントローラ111、FIFOコントローラ
112との接続は複雑であるため、その図示は省略して
いる。)。
Each of the seven status monitoring registers CR1 to CR7 is a 5-bit register, and components located around the I / O processor in the AV decoder, that is, the video output unit 108, the buffer memory controller 110, RAM controller 111, FIFO controller 1
12 and the like, and the success or failure of five events in the peripheral portion of the I / O processor is reflected in each bit (the video output unit 108, the buffer memory controller 110, the RAM controller 111, and the FIFO controller). Since the connection with 112 is complicated, its illustration is omitted.)

【0095】その一例として状態監視レジスタCR1、状
態監視レジスタCR2、状態監視レジスタCR3について図2
3を参照しながら説明する。図23は、状態監視レジス
タCR1、状態監視レジスタCR2、状態監視レジスタCR3の
ビット構成を示した図である。状態監視レジスタCR1の
第0ビットは、通常は『0』に設定され、バッファメモ
リバス121においてバッファメモリ102へのデータ
転送が所定回数が行われたときのみ『1』に設定され
る。
As an example, FIG. 2 shows the state monitoring register CR1, the state monitoring register CR2, and the state monitoring register CR3.
3 will be described. FIG. 23 is a diagram showing a bit configuration of the state monitoring register CR1, the state monitoring register CR2, and the state monitoring register CR3. The 0th bit of the status monitor register CR1 is normally set to “0”, and is set to “1” only when data transfer to the buffer memory 102 on the buffer memory bus 121 has been performed a predetermined number of times.

【0096】状態監視レジスタCR1の第1ビットは、通
常は『0』に設定され、バッファメモリバス121に出
力されたMPEGストリームのスタートコードが検出された
ときのみ『1』に設定される。状態監視レジスタCR1の第
2ビットは、通常は『0』に設定され、バッファメモリ
バス121に出力されたMPEGストリームに1バイト以上
の有効データの存在が確認されたときのみ『1』に設定
される。
The first bit of the state monitoring register CR1 is normally set to “0”, and is set to “1” only when the start code of the MPEG stream output to the buffer memory bus 121 is detected. The second bit of the status monitor register CR1 is normally set to “0”, and is set to “1” only when the presence of valid data of one byte or more in the MPEG stream output to the buffer memory bus 121 is confirmed. You.

【0097】状態監視レジスタCR1の第3ビットは、通
常は『0』に設定され、バッファメモリ102に、バッ
ファに有効ビットが3Byte以上存在するときのみ『1』に
設定される。また本ビットは、パージングタスクと、オ
ーディオストリーム転送制御タスク、動画ストリーム転
送制御タスクとの間の通信に用いられる。状態監視レジ
スタCR2の第0ビットは、通常は『0』に設定され、バッ
ファメモリ102上でSDRAM300への転送をサポート
する旨の要求が発せられば『1』に設定される。また本
ビットは、パージングタスクと、オーディオストリーム
転送制御タスク、動画ストリーム転送制御タスクとの間
の通信に用いられる。
The third bit of the state monitor register CR1 is normally set to “0”, and is set to “1” only when the buffer memory 102 has more than 3 bytes of valid bits in the buffer. This bit is used for communication between the purging task, the audio stream transfer control task, and the moving image stream transfer control task. The 0th bit of the state monitoring register CR2 is normally set to “0”, and is set to “1” when a request to support the transfer to the SDRAM 300 is issued on the buffer memory 102. This bit is used for communication between the purging task, the audio stream transfer control task, and the moving image stream transfer control task.

【0098】状態監視レジスタCR2の第1ビットは、通
常は『0』に設定され、DMA転送が完了したときのみ
『1』に設定される。状態監視レジスタCR2の第2ビット
は、通常は『0』に設定され、ビットストリームFIFO1
03に対しての転送要求がある場合のみ『1』に設定さ
れる。状態監視レジスタCR2の第3ビットは、通常は
『0』に設定され、FIFOコントローラ112内部の制御
レジスタが更新されれば、『1』に設定される。状態監
視レジスタCR3の第0ビットは、通常は『0』に設定さ
れ、バッファメモリ102がDMA_READY状態となれば
『1』に設定される。
The first bit of the state monitoring register CR2 is normally set to “0”, and is set to “1” only when the DMA transfer is completed. The second bit of the status monitor register CR2 is normally set to “0”, and the bit stream FIFO1
It is set to "1" only when there is a transfer request to the 03. The third bit of the status monitor register CR2 is normally set to “0”, and is set to “1” when the control register inside the FIFO controller 112 is updated. The 0th bit of the state monitoring register CR3 is normally set to “0”, and is set to “1” when the buffer memory 102 enters the DMA_READY state.

【0099】状態監視レジスタCR3の第1ビットは、通
常は『0』に設定され、SDRAM300へのDMA転送が完了
すれば『1』に設定される。状態監視レジスタCR3の第2
ビットは、通常は『0』に設定され、外部に接続された
ディスプレィ装置における水平帰線信号の立ち下がりに
て『1』に設定される。
The first bit of the state monitoring register CR3 is normally set to “0”, and is set to “1” when the DMA transfer to the SDRAM 300 is completed. Second of status monitor register CR3
The bit is normally set to "0", and set to "1" at the fall of the horizontal retrace signal in the externally connected display device.

【0100】状態監視レジスタCR3の第3ビットは、通
常は『0』に設定され、外部に接続されたディスプレィ
装置におけるビデオ信号が水平ブランキング期間になる
と『1』に設定される。状態監視レジスタCR3の第4ビッ
トは、通常は『0』に設定され、ビデオアウトタスクに
対する処理要求が発生した場合のみ『1』に設定され
る。
The third bit of the status monitor register CR3 is normally set to “0”, and is set to “1” when the video signal in the externally connected display device enters the horizontal blanking period. The fourth bit of the status monitor register CR3 is normally set to "0", and is set to "1" only when a processing request for the video out task occurs.

【0101】以上のように3本の状態監視レジスタは、
AVデコーダ内の各バッファやコントローラの制御状態を
表している。他の状態監視レジスタも同様であり、7本
の状態監視レジスタによりI/Oプロセッサは、各非同期
イベントタスクは、自身の起動要因となる各種事象が成
立しているか否かを監視することができる。演算実行部
84は、演算実行部14と同様の機能を有した構成であ
る。演算実行部14と比較して第1に新規なのは命令解
読制御部81からCR1〜CR7といった各状態監視レジスタ
に付された番号と即値とを受け取り、指定された状態監
視レジスタの保持値と受け取った即値との比較のための
減算を行う点である。この減算結果に応じてゼロフラ
グ、キャリーフラグをオン/オフして状態監視レジスタ
の保持値と即値との一致、不一致、大小を命令解読制御
部81に知らせる。
As described above, the three state monitoring registers are:
It indicates the control state of each buffer and controller in the AV decoder. The same applies to other status monitoring registers. The seven status monitoring registers enable the I / O processor to monitor each asynchronous event task to determine whether or not various events that cause its activation are established. . The operation execution unit 84 has a configuration having the same function as the operation execution unit 14. The first thing different from the operation execution unit 14 is that the number and immediate value assigned to each status monitoring register such as CR1 to CR7 are received from the instruction decoding control unit 81, and the values held by the designated status monitoring register are received. The point is that subtraction for comparison with the immediate value is performed. The zero flag and the carry flag are turned on / off in accordance with the result of the subtraction, and the instruction decoding control unit 81 is notified of the coincidence, inconsistency, and magnitude of the immediate value with the value held in the state monitoring register.

【0102】上記の通知において命令解読制御部81は
現在実行中の演算を無効化する旨の信号を出力し得る
が、これを受け取ると演算実行部84は汎用レジスタへ
の値の格納を中断する。命令解読制御部81は、命令解
読制御部11と同様の機能を有した構成であるが、命令
解読制御部11と異なるのは命令解読制御部81は事象
待ちループを形成し得る命令を命令メモリ100から読
み出して、これを解読した際にCR1〜CR7といった各状態
監視レジスタに付された番号と即値とを演算実行部84
に出力する。尚、事象待ちループを構成する命令とは、
以下の{例1}の旨の内容である。状態監視レジスタの
指定と即値とを演算実行部84に出力した後、演算実行
部84がゼロフラグ、キャリーフラグにより保持値と即
値との一致、不一致、大小を命令解読制御部81に知ら
せると、命令解読制御部81はこれを参照し、もし保持
値と即値との不一致が通知されれば、タスク管理レジス
タ13に事象不成立を示す信号を出力し、この次の命令
の実行結果を無効化する旨の信号を演算実行部84に出
力して読出先アドレスの値を先に進めないよう、命令読
出回路10に通知する。もし保持値と即値との不一致が
通知されれば、タスク管理レジスタ13に事象成立を示
す信号を出力する。 {例1} 命令 事象iの成立の真偽を判定し、事象iの成立が偽ならば読
出先アドレスを先には進めない。
In the above notification, the instruction decoding control unit 81 can output a signal to invalidate the operation currently being executed, but upon receiving this signal, the operation execution unit 84 interrupts the storage of the value in the general-purpose register. . The instruction decoding control unit 81 has a function similar to that of the instruction decoding control unit 11, but differs from the instruction decoding control unit 11 in that the instruction decoding control unit 81 stores an instruction that can form an event waiting loop in an instruction memory. 100 and read the number and the immediate value assigned to each state monitoring register, such as CR1 to CR7, when decoding it.
Output to The instructions constituting the event waiting loop are as follows:
This is the content of the following {Example 1}. After outputting the designation of the state monitoring register and the immediate value to the operation execution unit 84, the operation execution unit 84 notifies the instruction decoding control unit 81 of the match, mismatch, and magnitude of the held value and the immediate value by the zero flag and the carry flag. The decoding control unit 81 refers to this and, if notified of the mismatch between the held value and the immediate value, outputs a signal indicating that the event is not established to the task management register 13 and invalidates the execution result of the next instruction. To the instruction execution circuit 84 to notify the instruction reading circuit 10 not to advance the value of the read destination address. If a mismatch between the held value and the immediate value is notified, a signal indicating that the event has been established is output to the task management register 13. << Example 1 >> Instruction Whether the establishment of event i is true or false is determined, and if the establishment of event i is false, the read destination address is not advanced.

【0103】また本命令のニーモニックを{例2}に示
す。 {例2} cmp_and_wait cr_statei,即値 {例2}において第1オペランドにcr_statei(i=0,1,2,
3,4・・・7)が記述されているのは、I/Oプロセッサにおけ
る7本の状態監視レジスタのうち何れかを指示できるこ
とを意味する。
The mnemonic of this instruction is shown in {Example 2}. {Example 2} cmp_and_wait cr_statei, immediate {cr_statei (i = 0,1,2,
The description of 3, 4,... 7) means that any one of the seven state monitoring registers in the I / O processor can be designated.

【0104】この第1オペランドにおける状態監視レジ
スタの指定と、第2オペランドにおける即値指定とを組
み合わせて、35もの事象のうち、任意のもの成否を確認
することができる。上記命令を以降の説明ではCmp_And_
Wait命令と呼ぶ。また上述した事象待ちループは、この
Cmp_And_Wait命令の第1オペランド、第2オペランドに
おいて指定された事象の成否が何度も否と判定されるこ
とにより発生することはいうまでもない。
By combining the designation of the status monitor register in the first operand and the immediate value designation in the second operand, it is possible to confirm the success or failure of any of the 35 events. The above instruction is referred to as Cmp_And_
This is called a Wait instruction. The event waiting loop described above
It goes without saying that this occurs when the success or failure of the event specified in the first operand and the second operand of the Cmp_And_Wait instruction is determined many times.

【0105】第3実施形態における変更が加えられた命
令読出回路10の構成を図19に示す。図19において
命令読出回路10がIF1+1保持部20、increment回路2
1、IF2保持部22、DECPC保持部23、タスク別PC格納
部24、セレクタ25、セレクタ26を備えている点は
第1実施形態と差違はない。命令読出回路10において
新規なのは、DECPC保持部23の出力段に接続されたフ
リップフロップ 27である。
FIG. 19 shows the configuration of the instruction reading circuit 10 in the third embodiment in which a change has been made. In FIG. 19, the instruction reading circuit 10 includes an IF1 + 1 holding unit 20, an increment circuit 2
1. There is no difference from the first embodiment in that it includes an IF2 storage unit 22, a DECPC storage unit 23, a task-specific PC storage unit 24, a selector 25, and a selector 26. What is new in the instruction reading circuit 10 is a flip-flop 27 connected to the output stage of the DECPC holding unit 23.

【0106】フリップフロップ 27は、Cmp_And_Wait
命令が指定した事象が不成立である場合に備え、命令解
読制御部81が解読中の命令の読出先アドレスをセレク
タ25に出力できるようDECPC保持部23の値を保持し
ている。もしプログラムカウント値を戻す旨の指示が命
令解読制御部11より与えられれば、フリップフロップ
27はその保持値をの信号線を通じてセレクタ25
に出力し、セレクタ25は、このフリップフロップ 2
7の保持値をタスク別PC格納部24に格納するよう、タ
スク別PC格納部24の入力元をの信号線に切り換え
る。第3実施形態における命令読出回路の出力論理表を
図20に示す。
The flip-flop 27 has the Cmp_And_Wait
The instruction decoding control unit 81 holds the value of the DECPC holding unit 23 so that the instruction decoding control unit 81 can output the read destination address of the instruction being decoded to the selector 25 in case the event specified by the instruction is not satisfied. If an instruction to return the program count value is given from the instruction decoding control unit 11, the flip-flop 27 outputs the held value to the selector 25 through the signal line.
And the selector 25 outputs the flip-flop 2
The input source of the task-specific PC storage unit 24 is switched to the signal line so that the held value of 7 is stored in the task-specific PC storage unit 24. FIG. 20 shows an output logic table of the instruction reading circuit according to the third embodiment.

【0107】図26は、Cmp_and_Wait命令の解読時のフ
レームにおけるI/Oプロセッサの構成要素についてのタ
イミングチャートであり、本タイミングチャートにおけ
るフリップフロップ27の役割について説明する。図2
6においてフリップフロップ 27が保持値としてCmp_a
nd_Wait命令のアドレスに相当する命令0-0のアドレスを
参照符号a7に示すように出力すると、命令0-0のアドレ
スはIPC0としてタスク別PC格納部24に格納される。こ
れによりタスク別PC格納部24には、IPC0としてCmp_an
d_Wait命令のアドレスが格納されることになる。
FIG. 26 is a timing chart of the components of the I / O processor in the frame when the Cmp_and_Wait instruction is decoded. The role of the flip-flop 27 in this timing chart will be described. FIG.
In step 6, the flip-flop 27 stores Cmp_a
When the address of the instruction 0-0 corresponding to the address of the nd_Wait instruction is output as indicated by reference numeral a7, the address of the instruction 0-0 is stored in the task-specific PC storage unit 24 as IPC0. As a result, the task-specific PC storage unit 24 stores Cmp_an as IPC0.
The address of the d_Wait instruction will be stored.

【0108】本実施形態におけるタスク管理部15の内
部構成を図21に示す。図21に示すタスク管理レジス
タ13は、事象待ちループ(以降wait状態と呼ぶ)に陥
ったタスクを個別に管理するためのビットが割り当られ
たレジスタである。タスク管理レジスタ13は命令解読
制御部81から事象不成立を示す信号が通知されると、
タスクID保持部72が保持しているタスク識別子taskid
を参照し、そのタスク識別子taskidに対応するビットを
『1』に切り換える。逆に事象成立を示す信号が通知さ
れると、タスクID保持部72が保持しているタスク識別
子taskidを参照し、そのタスク識別子taskidに対応する
ビットを『0』に切り換える。
FIG. 21 shows the internal configuration of the task management unit 15 in this embodiment. The task management register 13 shown in FIG. 21 is a register to which bits for individually managing tasks that have entered an event waiting loop (hereinafter referred to as a wait state) are assigned. When the task management register 13 receives a signal indicating that the event is not established from the instruction decoding control unit 81,
Task identifier taskid held by the task ID holding unit 72
And switches the bit corresponding to the task identifier taskid to “1”. Conversely, when a signal indicating that the event is established is notified, the task ID holding unit 72 refers to the task identifier taskid held and switches the bit corresponding to the task identifier taskid to “0”.

【0109】図22は、タスク管理レジスタ13におけ
るwait状態タスクの管理用のビット構成を示す。本図に
おいて第0ビットが『1』であれば、タスク(0)がwait状
態であることを示し、第0ビットが『0』であればタス
ク(0)がそうでないことを示す。また本図において第1
ビットが『1』であれば、タスク(1)がwait状態であるこ
とを示し、第1ビットが『0』であればタスク(1)がそう
でないことを示す。タスク管理レジスタ13の第2ビッ
トが『1』であれば、タスク(2)がwait状態であることを
示し、第2ビットが『0』であればタスク(2)がそうでな
いことを示す。タスク管理レジスタ13による事象待ち
ループの管理により、複数のタスクにおいて同時多発し
た事象待ちループを個別に管理することができる。
FIG. 22 shows a bit configuration for managing a wait state task in the task management register 13. In the figure, if the 0th bit is “1”, it indicates that the task (0) is in a wait state, and if the 0th bit is “0”, it indicates that the task (0) is not. In the figure, the first
If the bit is “1”, it indicates that the task (1) is in a wait state, and if the first bit is “0”, it indicates that the task (1) is not. If the second bit of the task management register 13 is “1”, it indicates that the task (2) is in a wait state, and if the second bit is “0”, it indicates that the task (2) is not. By managing the event waiting loop by the task management register 13, it is possible to individually manage the event waiting loops that occurred frequently in a plurality of tasks.

【0110】図26のタイミングチャートにおいて、命
令0-0がCmp_and_Wait命令であると解読され、事象が不
成立であると判定されたものとする。この場合、命令解
読制御部81はタスク(0)が事象成立待ち状態になった
旨を参照符号a8に示すように通知する。そうすると、タ
スク管理レジスタ13はタスク(0)のタスク識別子に対
応するビットを参照符号a9に示すように『1』に設定す
る。
In the timing chart of FIG. 26, assume that instructions 0-0 are decoded as Cmp_and_Wait instructions, and it is determined that the event is not established. In this case, the instruction decoding control unit 81 notifies that the task (0) has entered the event establishment waiting state as indicated by reference numeral a8. Then, the task management register 13 sets the bit corresponding to the task identifier of the task (0) to “1” as indicated by reference numeral a9.

【0111】続いて『事象成立待ち時』、『事象成立
時』、『事象成立時以降』においてタスク管理レジスタ
13に割り当てられた各ビットがどのように設定される
かについてタイミングチャートを参照しながら説明す
る。図27に事象成立待ち時、図28に事象成立時、図
29に事象成立時以降におけるタイミングチャートを示
す。
Next, how the bits allocated to the task management register 13 are set in “waiting for event establishment”, “at the time of event establishment”, and “after the event establishment” will be described with reference to a timing chart. explain. FIG. 27 is a timing chart when the event is established, FIG. 28 is a timing chart when the event is established, and FIG. 29 is a timing chart after the event is established.

【0112】タスク(0)におけるCmp_and_Wait命令が成
立を待っていた事象が図28において成立したとする。
この場合、命令解読制御部81は事象が成立した旨を参
照符号d1に示すように通知する。そうすると、タスク管
理レジスタ13はタスク(0)のタスク識別子に対応する
ビットを参照符号d2に示すように『0』に設定する。図
21を参照して、第3実施形態におけるスレッドマネー
ジャー61の内部構成について説明する。スレッドマネ
ージャー61においてフリップフロップ 51、カウン
タ52、比較器54を備えている点は第1実施形態と差
違は無い。図21において新規なのはIDコンバータ53
及びセレクタ55である。
Assume that the event waiting for the execution of the Cmp_and_Wait instruction in task (0) is established in FIG.
In this case, the instruction decoding control unit 81 notifies that the event has been established, as indicated by reference numeral d1. Then, the task management register 13 sets the bit corresponding to the task identifier of the task (0) to “0” as indicated by reference numeral d2. The internal configuration of the thread manager 61 according to the third embodiment will be described with reference to FIG. There is no difference from the first embodiment in that the thread manager 61 includes a flip-flop 51, a counter 52, and a comparator 54. What is new in FIG. 21 is the ID converter 53.
And the selector 55.

【0113】IDコンバータ53は、タスクID保持部72
に次にスレッドを割り当てるべきタスクの識別子が出力
されると、タスク管理レジスタ13においてwait状態に
設定されているタスクと次にスレッドを割り当てるべき
タスク識別子taskidとが一致しているかを判定し、もし
一致していればセレクタ55にHigh値を出力し、不一致
ならばセレクタ55にLow値を出力する。
The ID converter 53 includes a task ID holding unit 72
When the identifier of the task to which a thread is to be allocated next is output, it is determined whether the task set in the wait state in the task management register 13 matches the task identifier taskid to which the thread is to be allocated next. If they match, a High value is output to the selector 55, and if they do not match, a Low value is output to the selector 55.

【0114】セレクタ55は、IDコンバータ53が出力
した信号のHigh値、Low値に応じて、『2』或は『4』
の数値を択一式に比較器54に出力する。図26におい
て次にスレッドを割り当てるべきタスクがタスク(0)な
ら、参照符号a10においてセレクタ55にLow値が出力さ
れるので参照符号a12に示すように、セレクタ55は
『4』を比較器54に出力する。しかし図26の参照符
号a9においてタスク(0)についてのビットが『1』に設定
されて、図27の参照符号g1に示すようにセレクタ55
にHigh値が出力されると、セレクタ55は参照符号g2に
示すように『2』を比較器54に出力する。
The selector 55 outputs “2” or “4” according to the High value and Low value of the signal output from the ID converter 53.
Is output to the comparator 54 as an alternative. In FIG. 26, if the task to which a thread is to be allocated next is task (0), a low value is output to the selector 55 at reference numeral a10. Output. However, the bit for task (0) is set to "1" at reference numeral a9 in FIG. 26, and as shown by reference numeral g1 in FIG.
, The selector 55 outputs “2” to the comparator 54 as indicated by reference numeral g2.

【0115】図28の参照符号d2においてタスク(0)に
ついてのビットが『0』に設定されて、図29において
参照符号g5に示すようにセレクタ55にHigh値が出力さ
れると、セレクタ55は参照符号g6に示すように『4』
を比較器54に出力する。 セレクタ55が『2』又は
『4』の数値を択一的に比較器54に出力することによ
り、2サイクルのスレッド、4サイクルのスレッドの何
れか一方が各タスクに割り当てられる。セレクタ55が
『2』を出力した際には、その第2番目の命令を無効化
するので、その結果、1サイクルのスレッドが割り当て
られることになる。
When the bit for task (0) is set to “0” at reference numeral d2 in FIG. 28 and a High value is output to selector 55 as shown at reference numeral g5 in FIG. "4" as indicated by reference sign g6
Is output to the comparator 54. The selector 55 selectively outputs the numerical value of “2” or “4” to the comparator 54, so that one of a two-cycle thread and a four-cycle thread is assigned to each task. When the selector 55 outputs “2”, the second instruction is invalidated. As a result, a thread of one cycle is allocated.

【0116】タイミングチャートの時間軸に沿って、図
26から図29までのタイミングチャートに示されてい
る命令読出回路10の構成要素及びタスク管理部15の
構成要素の動作について説明する。初期状態においてタ
スク管理レジスタ13のビットはオールゼロであるもの
とする。そうして図26においてタスク(0)から命令の
読み出しが開始されると、タスク(0)についてのビット
はタスク管理レジスタ13において『0』に設定されて
いるので、参照符号a12に示すようにセレクタ55はカ
ウンタの上限値として『4』を出力する。カウンタの上
限値が『4』に設定されたので、タスク(0)を四サイク
ル実行しようとするが、命令0-0がCmp_and_Wait命令で
あるので、参照符号a7に示すようにタスク別PC格納部2
4に命令0-0の読出先アドレスを書き込む。それと共
に、参照符号a8,a9に示すようにCmp_and_Wait命令の実
行時においてタスク管理レジスタ13の第0ビットを
『1』に設定する。この設定により、タスク(0)は事象成
立待ちとなる。このようにビットを設定した後、タスク
(1)、タスク(2)、タスク(3)、タスク(4)、タスク(5)の
実行が済んで次のフレームに移行したものとする。
The operation of the components of the instruction reading circuit 10 and the components of the task management unit 15 shown in the timing charts of FIGS. 26 to 29 will be described along the time axis of the timing chart. Assume that the bits of the task management register 13 are all zero in the initial state. 26, when the reading of the instruction is started from the task (0), the bit for the task (0) is set to “0” in the task management register 13. The selector 55 outputs “4” as the upper limit value of the counter. Since the upper limit value of the counter is set to "4", the task (0) is to be executed for four cycles. 2
Write the read destination address of instructions 0-0 to 4. At the same time, the 0th bit of the task management register 13 is set to “1” when the Cmp_and_Wait instruction is executed, as indicated by reference numerals a8 and a9. With this setting, task (0) waits for the establishment of an event. After setting the bits in this way, the task
It is assumed that execution of (1), task (2), task (3), task (4), and task (5) has been completed and the process has shifted to the next frame.

【0117】事象成立待ち状態においてタスク管理レジ
スタ13のビットはタスク(0)のみが『1』であり、その
他のビットはゼロであるものとする。そうして図27に
おいてタスク(0)から命令の読み出しが開始されると、
タスク(0)についてのビットはタスク管理レジスタ13
において『1』に設定されているので、参照符号g2に示
すようにセレクタ55はカウンタの上限値として『2』
を出力する。カウンタの上限値が『2』に設定されたの
で、タスク(0)を2サイクル実行しようとするが、命令0
-0がCmp_and_Wait命令であるので、タスク別PC格納部2
4に命令0-0の読出先アドレスを書き込む。このような
書き込み後、タスク(1)、タスク(2)、タスク(3)、タス
ク(4)、タスク(5)の実行が済んで次のフレームに移行し
たものとする。
In the event establishment waiting state, it is assumed that only the task (0) of the task management register 13 is "1" and the other bits are zero. Then, when the reading of the instruction is started from the task (0) in FIG. 27,
The bit for task (0) is stored in task management register 13
Is set to "1", the selector 55 sets the upper limit of the counter to "2" as shown by reference numeral g2.
Is output. Since the upper limit of the counter is set to "2", the task (0) is to be executed for two cycles, but the instruction 0
-0 is the Cmp_and_Wait instruction, so the task-specific PC storage unit 2
Write the read destination address of instructions 0-0 to 4. After such writing, it is assumed that the task (1), the task (2), the task (3), the task (4), and the task (5) have been executed and the process has shifted to the next frame.

【0118】次のフレームにおいて事象が成立したもの
とする。図28においてタスク(0)から命令の読み出し
が開始されると、タスク(0)についてのビットはタスク
管理レジスタ13において『1』に設定されているの
で、参照符号g4に示すようにセレクタ55はカウンタの
上限値として『2』を出力する。カウンタの上限値が
『2』に設定されたので、タスク(0)を2サイクル実行
しようとする。
It is assumed that an event has occurred in the next frame. In FIG. 28, when the reading of the instruction is started from the task (0), the bit for the task (0) is set to “1” in the task management register 13, so that the selector 55 "2" is output as the upper limit value of the counter. Since the upper limit of the counter has been set to "2", task (0) is to be executed for two cycles.

【0119】命令0-0であるCmp_and_Wait命令の実行時
において、事象成立が確認されるので、参照符号d1,d2
に示すようにCmp_and_Wait命令の実行時においてタスク
管理レジスタ13の第0ビットを『0』に設定する。こ
の設定により、タスク(0)は事象成立待ちから解放され
る。このようにビットを設定した後、タスク(1)、タス
ク(2)、タスク(3)、タスク(4)、タスク(5)の実行が済ん
で次のフレームに移行したものとする。
At the time of execution of the Cmp_and_Wait instruction, which is the instructions 0-0, the establishment of the event is confirmed.
As shown in (1), the 0th bit of the task management register 13 is set to “0” when the Cmp_and_Wait instruction is executed. With this setting, task (0) is released from waiting for event establishment. After setting the bits in this way, it is assumed that the task (1), task (2), task (3), task (4), and task (5) have been executed and the process has shifted to the next frame.

【0120】図29に示す事象成立以降のフレームにお
いては、タスク(0)についてのビットがタスク管理レジ
スタ13において『0』に設定されているので、参照符
号g6に示すようにセレクタ55はカウンタの上限値とし
て『4』を出力する。カウンタの上限値が『4』に設定
されたので、タスク(0)を4サイクル実行する。以上の
ように構成された第3実施形態のI/Oプロセッサによっ
て、どのようにスレッドが割り当てられるかを図24
(a)〜図24(d)を参照しながら説明する。
In the frame after the occurrence of the event shown in FIG. 29, the bit for task (0) is set to “0” in the task management register 13, so that the selector 55 "4" is output as the upper limit value. Since the upper limit value of the counter is set to “4”, task (0) is executed for four cycles. FIG. 24 shows how threads are allocated by the I / O processor of the third embodiment configured as described above.
This will be described with reference to FIGS.

【0121】図24(a)においてタスク(0)、タスク
(3)、タスク(4)、タスク(5)は何れもメモリ転送制御タ
スクであり、その第1番目の命令がCmp_and_Wait命令で
あるものとする。ここで図24(b)の状態では、これ
らのCmp_and_Wait命令が待機している事象が未成立であ
るものとすると、タスク(0)、タスク(3)〜タスク(5)に
2サイクルのスレッドが割り当ており、第2命令は無効
化されているが、タスク(1)、タスク(2)には4サイクル
のスレッドが割り当てられる。
In FIG. 24A, task (0), task
(3), task (4), and task (5) are all memory transfer control tasks, and the first instruction is a Cmp_and_Wait instruction. Here, in the state of FIG. 24 (b), assuming that the event waiting for these Cmp_and_Wait instructions has not been established, a two-cycle thread is assigned to task (0), task (3) to task (5). Assigned, the second instruction is invalidated, but a thread of 4 cycles is assigned to task (1) and task (2).

【0122】図24(c)においてタスク(0)〜タスク
(5)が何回か巡回し、タスク(0)のCmp_and_Wait命令が待
っていた事象のみが成立したものとする。そうすると当
該事象が成立したフレームにおいては、タスク(3)〜タ
スク(5)には依然として2サイクルのスレッドが割り当て
られており、第2命令は無効化されているが、タスク
(0)は事象が成立したので第2命令は実行される。
In FIG. 24C, tasks (0) to task
It is assumed that (5) circulates several times, and only the event for which the Cmp_and_Wait instruction of task (0) is waiting has been established. Then, in the frame in which the event is established, the task (3) to the task (5) are still assigned a two-cycle thread, and the second instruction is invalidated.
In (0), the second instruction is executed because the event is established.

【0123】図24(d)において事象j0の成立以降の
フレームにおいては、タスク(0)には、タスク(1)、タス
ク(2)と同一の4サイクルのスレッドが割り当てられ
る。図25は、Cmp_and_Wait命令の命令フォーマットの
一例を示す。図25において、5bitから7bitまでの3bit
を用いて7本の状態監視レジスタのうち何れかを指定で
き、11bitから15bitまでを用いて 5bit長の即値を格納
できる。本フォーマットの9bitから10bitを用いてオペ
レーション内容の指定が可能である。この2bitを『10』
に指定することにより、Cmp_and_Wait命令のオペレーシ
ョンをI/Oプロセッサは実行する。また、この2bitを『0
0』に指定することにより、七本の状態監視レジスタの
うち、一本のものの値と5bit即値との比較命令のオペレ
ーションをI/Oプロセッサは実行する。
In the frame after the occurrence of the event j0 in FIG. 24D, the same 4-cycle thread as the tasks (1) and (2) is assigned to the task (0). FIG. 25 shows an example of an instruction format of the Cmp_and_Wait instruction. In FIG. 25, 3 bits from 5 bits to 7 bits
Can be used to specify any of the seven status monitoring registers, and a 5-bit immediate value can be stored using 11 to 15 bits. The operation content can be specified using 9 to 10 bits of this format. This 2bit is "10"
, The I / O processor executes the operation of the Cmp_and_Wait instruction. In addition, these 2 bits are changed to "0
By specifying "0", the I / O processor executes the operation of the instruction to compare the value of one of the seven state monitoring registers with the 5-bit immediate value.

【0124】以上のように本実施形態によれば、メモリ
アクセスが可能な状態を待っているメモリ転送制御タス
クにより短い時間長のスレッドを割り当ることにより、
他のタスクの進捗を向上させることができる。 (第4実施形態)第4実施形態は、ディスプレィの水平
ブランキング期間、垂直ブランキング期間において、ビ
デオアウトタスクにより多くのスレッドを割り当てる技
術に関する。
As described above, according to the present embodiment, by assigning a thread having a short time length to the memory transfer control task waiting for a state in which memory access is possible,
You can improve the progress of other tasks. (Fourth Embodiment) The fourth embodiment relates to a technique of allocating more threads to the video-out task in the horizontal blanking period and the vertical blanking period of the display.

【0125】スレッドの増加を行うI/Oプロセッサは、
第1実施形態におけるタスク管理部15の構成に図30
〜図31に示す変更を加えて実現される。第4実施形態
におけるI/Oプロセッサは、命令メモリ100、命令読
出回路10、命令解読制御部81、演算実行部84、タ
スク管理部15を備えている点は第3実施形態と変わり
はない。第4実施形態において新規なのは、タスク管理
レジスタ13が緊急状態遷移許可信号iexecmodeを監視
している点である。
An I / O processor that increases the number of threads is
FIG. 30 shows the configuration of the task management unit 15 in the first embodiment.
31 is realized by adding the changes shown in FIG. The I / O processor according to the fourth embodiment is the same as the third embodiment in that it includes an instruction memory 100, an instruction reading circuit 10, an instruction decoding control unit 81, an operation execution unit 84, and a task management unit 15. What is new in the fourth embodiment is that the task management register 13 monitors the emergency state transition permission signal iexecmode.

【0126】第4実施形態におけるタスク管理部15の
内部構成を図30に示す。図30におけるタスク管理レ
ジスタ13における3ビットは、タスク管理レジスタ1
3内の3ビットを用いて緊急扱いを要するタスクの識別
子が指定される。当該3ビットにおいて六個のタスクの
うちどのタスクを緊急扱いするかは、上記緊急状態遷移
許可信号iexecmodeがどのような内容の信号であるかに
応じて適宜変更する。本実施形態では、緊急状態遷移許
可信号iexecmodeは水平ブランキング期間、垂直ブラン
キング期間等に相当し、ビデオアウトタスクの識別子を
タスク管理レジスタ13における3ビットに指定してい
る。
FIG. 30 shows the internal configuration of the task management unit 15 in the fourth embodiment. The three bits in the task management register 13 in FIG.
The identifier of the task requiring urgent handling is specified using 3 bits in 3. Which one of the six tasks is treated as urgent in the three bits is appropriately changed according to the content of the emergency state transition permission signal iexecmode. In the present embodiment, the emergency state transition permission signal iexecmode corresponds to a horizontal blanking period, a vertical blanking period, and the like.

【0127】何れかのタスクを緊急扱いを要するタスク
としてタスク管理レジスタ13に登録するかは、何れの
タスク内にemergecy命令が含まれているかをタスク管理
レジスタ13が参照することにより、決定されるものと
する。命令解読制御部81が次に実行すべき命令を解読
した際、その解読結果がemergecy命令であれば、タスク
管理レジスタ13は当該命令を含むタスクを緊急扱いを
要するタスクとしてその識別子を保持する。
Which task is registered in the task management register 13 as a task requiring urgent handling is determined by referring to the task management register 13 which task contains an emergecy instruction. Shall be. When the instruction decoding control unit 81 decodes an instruction to be executed next, if the decoding result is an emergecy instruction, the task management register 13 holds a task including the instruction as an urgent task.

【0128】第4実施形態におけるスケジューラ62の
内部構成を図31に示す。図31においてスケジューラ
62がタスクID保持部72を備えている点は第1実施形
態と差違は無い。図31において新規なのは、タスクラ
ウンド管理部73及びプライオリティエンコーダ74が
それぞれ、タスクラウンド管理部75及びプライオリテ
ィエンコーダ80に置き換えられている点である。また
コンバータ76、緊急タスクマスク部77及びタスクID
保持部83が追加されている点である。
FIG. 31 shows the internal configuration of the scheduler 62 in the fourth embodiment. In FIG. 31, there is no difference from the first embodiment in that the scheduler 62 includes the task ID holding unit 72. What is new in FIG. 31 is that the task round management unit 73 and the priority encoder 74 are replaced with a task round management unit 75 and a priority encoder 80, respectively. Also, the converter 76, the emergency task mask unit 77 and the task ID
The point is that the holding unit 83 is added.

【0129】タスクラウンド管理部75がタスクラウン
ド管理部73と異なるのは、タスクラウンド管理部73
がタスクID保持部71においてタスク識別子がどのよう
に更新されてきたかを監視し、6ビット長のレジスタを
用いて六個のタスクのうちスレッドの割り当てが済んだ
ものを管理するのに対して、タスクラウンド管理部75
は、スレッドの割り当てが済んだタスクの管理を、通常
期間におけるタスク管理と、緊急期間における通常タス
クの管理とに区別して行う点である。例えばタスク管理
レジスタ13においてタスク(1)をインターリーブ式に
実行する場合、6個のタスクのうち5個のタスクがタス
ク(0)、タスク(2)、タスク(3)、タスク(4)、タスク(5)
というように巡回することになる。
The difference between the task round management unit 75 and the task round management unit 73 is that the task round management unit 73
Monitors how the task identifier has been updated in the task ID holding unit 71, and manages the tasks to which the threads have been allocated among the six tasks using a 6-bit register. Task round management unit 75
The point is that the management of tasks to which threads have been assigned is performed separately in task management in a normal period and management of normal tasks in an emergency period. For example, when the task (1) is executed in the task management register 13 in an interleaved manner, five of the six tasks are task (0), task (2), task (3), task (4), and task (4). (Five)
And so on.

【0130】5個のタスクを上記のように巡回する場
合、実行の済んだタスクを示すラウンド値はタスク管理
レジスタ13において管理されている緊急タスク抜きの
数値で表現する必要がある。このようにタスクラウンド
管理部75は緊急タスク抜きのラウンド値を管理するた
め、ラウンド値tasknとは別に緊急タスク抜きのラウン
ド値taskneを緊急タスクマスク部77に出力する。ちな
みにtaskneの『ne』とは、『Not』及び『Emergency』の
頭文字に由来している。
When the five tasks are circulated as described above, the round value indicating the task that has been executed needs to be represented by a value without the emergency task managed in the task management register 13. As described above, the task round management unit 75 outputs the round value taskne without the emergency task to the emergency task mask unit 77 separately from the round value taskn in order to manage the round value without the emergency task. By the way, "ne" in taskne is derived from the initials of "Not" and "Emergency".

【0131】コンバータ76は、タスク管理レジスタ1
3に管理されている緊急タスクの識別子を6ビットのラ
ウンド値emgcytaskに変換する。緊急タスクマスク部7
7は、コンバータ76により変換されたラウンド値emgc
ytaskと、タスクラウンド管理部75が出力したラウン
ド値taskneとの6ビット長の論理和をとるOR回路78を
備える。
The converter 76 has a task management register 1
3 is converted to a 6-bit round value emgcytask. Emergency task mask part 7
7 is a round value emgc converted by the converter 76.
An OR circuit 78 is provided for performing a 6-bit OR operation of ytask and the round value taskne output from the task round management unit 75.

【0132】ここでOR回路78において論理和をとるの
は、ラウンド値taskne及び緊急タスクを示すラウンド値
の両者を含んだ6ビット長のラウンド値を算出すること
を意味する。例えばラウンド値taskneがタスク(0)、タ
スク(2)、タスク(3)にスレッドが割り当てられたことを
示す『001101』であり、ラウンド値emgcytaskが緊急タ
スクがタスク(1)であることを示す『000010』である場
合、OR回路78の出力は、タスク(0)、タスク(1)、タス
ク(2)、タスク(3)にスレッドが割り当てられたことを示
す『001111』となる。
Here, ORing in the OR circuit 78 means calculating a 6-bit length round value including both the round value taskne and the round value indicating the urgent task. For example, the round value taskne is “001101” indicating that a thread has been allocated to task (0), task (2), and task (3), and the round value emgcytask indicates that the urgent task is task (1). In the case of “000010”, the output of the OR circuit 78 is “001111” indicating that a thread has been assigned to the task (0), the task (1), the task (2), and the task (3).

【0133】プライオリティエンコーダ80は、プライ
オリティエンコーダ74の機能に加えて、タスクラウン
ド管理部75が出力したラウンド値taskne(ラウンド値
maskne)を受け取り、受け取ったタスクラウンド管理部
73のラウンド値taskne(ラウンド値maskne)において
何ビット目に『1』から『0』への反転が生じているかを
検出する。このように『0』への反転が生じたビットを
検出すると、この反転が生じたビットに割り当られてい
るタスクのタスク識別子taskidをそれぞれ個別にタスク
ID保持部83に格納させる。
The priority encoder 80 has, in addition to the function of the priority encoder 74, a round value taskne (round value) output from the task round management unit 75.
maskne), and detects at what bit the inversion from “1” to “0” occurs in the received round value taskne (round value maskne) of the task round management unit 73. When a bit that has been inverted to “0” is detected in this way, the task identifier taskid of the task assigned to this inverted bit is individually set to each task.
It is stored in the ID holding unit 83.

【0134】例えば緊急タスクのラウンド値とラウンド
値taskneとの論理和であるラウンド値maskne『000111』
が緊急タスクマスク部77から出力されると、プライオ
リティエンコーダ80はこのラウンド値maskneにおいて
下位から第3ビット目に『0』への反転が生じているこ
とを検出する。この第3ビット目は図7(b)において
タスク(3)に割り当られているビットであるから、プラ
イオリティエンコーダ80はタスク(3)のタスク識別子t
askidをセレクタ82に出力する。
For example, the round value maskne “000111” which is the logical sum of the round value of the urgent task and the round value taskne
Is output from the urgent task mask unit 77, the priority encoder 80 detects that the third bit from the lower order is inverted to “0” in the round value maskne. Since this third bit is a bit assigned to task (3) in FIG. 7B, the priority encoder 80 sets the task identifier t of task (3).
The askid is output to the selector 82.

【0135】cstate記憶部85は、I/Oプロセッサが通
常状態であるか緊急状態であるかを示すフラグcstateを
記憶する。図33は、cstate記憶部85が記憶するフラ
グの状態遷移図である。本図において、通常状態から緊
急状態への遷移は、緊急状態遷移許可信号iexecmodeがH
ighであり、尚且つタスク切替信号chg_task_exがHigh値
になった場合に行われる。逆に緊急状態から通常状態へ
の遷移は、タスク切替信号chg_task_exがHigh値になっ
た場合に行われる。図34は緊急状態遷移許可信号iexe
cmode、タスク切替信号chg_task_ex、cstate間のタイミ
ングを示すタイミングチャートである。
The cstate storage unit 85 stores a flag cstate indicating whether the I / O processor is in a normal state or an emergency state. FIG. 33 is a state transition diagram of the flags stored in the cstate storage unit 85. In the figure, the transition from the normal state to the emergency state is performed when the emergency state transition permission signal iexecmode is set to H.
igh, and the task switching signal chg_task_ex becomes High. Conversely, the transition from the emergency state to the normal state is performed when the task switching signal chg_task_ex has a High value. FIG. 34 shows an emergency state transition permission signal iexe.
6 is a timing chart showing timing between cmode, a task switching signal chg_task_ex, and cstate.

【0136】iexecmode信号がHighに立ち上がったタイ
ミングa30において参照符号a31に示すようにタスク切替
信号chg_task_exがHigh値になったとする。そうするとc
stateは参照符号a32に示すようにHighとなって緊急状態
に遷移する。タスク切替信号chg_task_exが参照符号a33
に示すように再度Highになるとcstateは参照符号a34に
示すようにLow値となって通常状態に戻る。このような
緊急状態から通常状態への遷移、通常状態から緊急状態
への遷移を繰り返すことになる。
It is assumed that the task switching signal chg_task_ex has a High value at a timing a30 when the iexecmode signal has risen to High as indicated by reference numeral a31. Then c
The state becomes High as indicated by reference numeral a32, and the state transits to the emergency state. The task switching signal chg_task_ex is indicated by reference numeral a33.
When the state becomes high again as shown in (3), the cstate becomes the low value as shown by reference numeral a34 and returns to the normal state. The transition from the emergency state to the normal state and the transition from the normal state to the emergency state are repeated.

【0137】セレクタ82は、入力されてきた緊急状態
遷移許可信号iexecmodeがHighであり、尚且つcstateが
参照符号a32に示すようにHighである場合、(cstateの
逆の真理値cstate!が参照符号a35に示すようにLowであ
る場合)に、タスク管理レジスタ13に記憶されている
タスク識別子taskideを選択してタスクID保持部72に
出力する。その他の場合、プライオリティエンコーダ8
0の出力であるラウンド値maskneから変換されたタスク
識別子taskidneを選択してタスクID保持部72に出力す
る。図32は、セレクタ82におけるtaskideの真理値
表を示す図である。
When the input emergency state transition permission signal iexecmode is High and the cstate is High as indicated by the reference numeral a32, the selector 82 sets the reference value (the opposite of the cstate to the truth value cstate!). In the case of Low as indicated by a35), the task identifier taskide stored in the task management register 13 is selected and output to the task ID holding unit 72. Otherwise, priority encoder 8
The task identifier taskidne converted from the round value maskne, which is the output of 0, is selected and output to the task ID holding unit 72. FIG. 32 is a diagram showing a truth table of taskide in the selector 82.

【0138】このようにラウンド値maskneから変換され
たタスク識別子taskidneと、緊急タスクの識別子とをセ
レクタ82が緊急状態遷移許可信号iexecmodeのHigh期
間/Low期間に応じて切り換えて出力することは、緊急
状態遷移許可信号iexecmodeのHigh期間/Low期間に応じ
て、緊急タスク抜きの何れかのタスクと、緊急タスクと
を切り換えてタスクID保持部72に格納することを意味
する。
The selector 82 switching and outputting the task identifier taskidne converted from the round value maskne and the urgent task identifier in accordance with the High period / Low period of the emergency state transition permission signal iexecmode is an emergency. This means that one of the tasks without the emergency task and the emergency task are switched and stored in the task ID holding unit 72 according to the High period / Low period of the state transition permission signal iexecmode.

【0139】例えばタスク(1)が緊急タスクであるもの
とすると、緊急タスク抜きのタスク識別子として、タス
ク(0)、タスク(2)、タスク(3)、タスク(4)、タスク(5)
というようにセレクタ82はタスク識別子を出力する。
通常状態では、図35(a)に示すように、セレクタ8
2により緊急タスク抜きの何れかのタスクが出力される
ため、タスク(0)、タスク(2)、タスク(3)、タスク(4)、
タスク(5)というように、タスク(1)に割り当てられるス
レッドは0サイクルとなる。
For example, if task (1) is an urgent task, task (0), task (2), task (3), task (4), task (5) are used as task identifiers without the urgent task.
Thus, the selector 82 outputs the task identifier.
In the normal state, as shown in FIG.
2 outputs any task without the emergency task, so task (0), task (2), task (3), task (4),
The thread assigned to the task (1), such as the task (5), has 0 cycles.

【0140】緊急状態では、図35(b)に示すよう
に、セレクタ82により緊急タスク抜きの何れかのタス
クと、緊急タスクとが選択的に出力されるため、タスク
(0)、タスク(1)、タスク(2)、タスク(1)、タスク(3)、
タスク(1)、タスク(4)、タスク(1)、タスク(5)、タスク
(1)というように、タスク(1)は二回に一回の割合でスレ
ッドが割り当てられる。セレクタ82による緊急状態に
おけるタスク識別子の出力では、タスク(1)にタスク実
行が巡ってくるのは二回につき一回となり確率に換算す
ると1/2となる。
In the emergency state, as shown in FIG. 35B, the selector 82 selectively outputs any of the tasks without the emergency task and the emergency task.
(0), task (1), task (2), task (1), task (3),
Task (1), Task (4), Task (1), Task (5), Task
As in (1), task (1) is assigned a thread once every two times. In the output of the task identifier in the emergency state by the selector 82, the task execution goes to the task (1) once every two times, which is 1 / when converted into the probability.

【0141】このような1/2の確率は、通常の実行確
率の3倍という極めて高確率であり、緊急タスクは非常
に高速に実行されることになる。以上のように本実施形
態によれば、水平ブランキング期間、垂直ブランキング
期間においてビデオアウトタスクのみを優先して実行す
ることができる。この期間において動画データを映像信
号に変換すれば、映像信号をディスプレィの表示期間ま
でに好適に処理することができる。
Such a probability of 1/2 is an extremely high probability of three times the normal execution probability, and the urgent task is executed at a very high speed. As described above, according to the present embodiment, only the video out task can be preferentially executed in the horizontal blanking period and the vertical blanking period. If the moving image data is converted into a video signal during this period, the video signal can be suitably processed by the display period of the display.

【0142】尚第4実施形態の構成では、緊急タスクを
優先して実行するため、緊急タスク以外のタスクの実行
頻度が落ちてしまうという弊害が発生するが、これを防
止する防止機構を設けても良い。その防止機構とは、
『最低限これだけの実行速度を維持しなければならな
い』という制約付きタスク(例外タスクという)の識別
子をタスク管理レジスタに記憶させ、この例外タスクに
ついては、四命令実行というタスク切り換えの条件を除
外する旨の信号をスレッドマネージャー61宛に出力さ
せる。
In the configuration of the fourth embodiment, since the urgent task is executed with priority, the frequency of execution of tasks other than the urgent task is reduced. However, a prevention mechanism for preventing this is provided. Is also good. The prevention mechanism is
The identifier of the restricted task (called an exceptional task) that "the execution speed must be maintained at least this much" is stored in the task management register, and the exceptional task excludes the task switching condition of executing four instructions. A signal to the effect is output to the thread manager 61.

【0143】スレッドマネージャー61内の比較器54
は、この旨の信号を受け付けると、タスク切替信号の出
力を所定時間だけ猶予する。ここでの所定時間の時間長
とは緊急タスク優先による各タスクの遅れを取り戻せる
だけの時間長である。このように所定時間だけタスク切
替信号の出力を猶予することにより、例外タスクの処理
を4命令以上行わせ、緊急タスク挿入に伴う処理の遅延
を取り戻させることができる。
The comparator 54 in the thread manager 61
Receives the signal to that effect, delays the output of the task switching signal for a predetermined time. Here, the time length of the predetermined time is a time length that can recover the delay of each task due to the priority of the urgent task. As described above, by delaying the output of the task switching signal for a predetermined time, it is possible to execute the processing of the exceptional task by four or more instructions and to recover the processing delay accompanying the emergency task insertion.

【0144】また本実施形態は、外部から入力されてく
る特定信号に同期して、特定タスクを高速化に実行する
ことについて述べているが、特定命令によって高速実行
するタスクを定めても良い。状態監視レジスタCR2の第
3ビットは、通常は『0』に設定され、外部に接続され
たディスプレィ装置におけるビデオ信号が帰線期間にな
ると『1』に設定されるので、状態監視レジスタCR2と、
即値とをオペランドに指定し、これらの一致、不一致を
判定させる旨のCMP命令をビデオアウトタスクに配置し
ておき、この命令についての演算の実行結果が真となる
場合のみ、ビデオアウトタスクを高速に実行してもよ
い。命令のオペランドにて緊急扱いを要するタスクを指
定できるようにしてもよい。
In the present embodiment, the specific task is executed at high speed in synchronization with a specific signal input from the outside. However, a task to be executed at high speed by a specific instruction may be determined. The third bit of the status monitor register CR2 is normally set to “0”, and is set to “1” when the video signal in the externally connected display device is in the retrace period.
An immediate and an operand are specified in the operand, and a CMP instruction for judging the match / mismatch is placed in the video out task, and only when the execution result of the operation for this instruction is true, the video out task is executed at high speed. May be executed. A task requiring urgent handling may be specified by the operand of the instruction.

【0145】更に通常状態にて実行すべきタスクを緊急
タスク抜きのラウンド値taskneにて指定したが、通常状
態にて緊急タスクを実行してもよい。 (第5実施形態)第5実施形態は、タスク同士の連携に
より、タスクの巡回効率を向上させることを意図した実
施形態である。
Further, although the task to be executed in the normal state is specified by the round value taskne without the emergency task, the emergency task may be executed in the normal state. (Fifth Embodiment) The fifth embodiment is an embodiment intended to improve the task traveling efficiency by cooperation between tasks.

【0146】ここでタスク同士の連携とは、特定時期が
到来しないとスレッドの割り当てが無駄に終わるタスク
は自ら進んで休眠状態に入り、休眠状態の解除を他のタ
スクに委ねる。そして解除を委ねられたタスクは、その
休眠状態を解除すべき時期が到来するのを待ち、もし到
来すれば特定タスクの休眠状態を解除することをいう。
[0146] Here, cooperation between tasks means that a task whose thread allocation is useless unless a specific time has arrived advances into a sleep state by itself and entrusts release of the sleep state to another task. The task entrusted with release means waiting for the time when the sleep state should be released, and if so, releasing the sleep state of the specific task.

【0147】タスクの休眠は、複数のタスクにおいて同
時多発する場合もあるし、全く発生しない場合もある。
休眠状態に陥ったタスクを個別に管理できるよう、第5
実施形態ではタスク管理レジスタ13に休眠(sleep状
態)に入ったタスクを管理するためのビットを割り当て
ている。図36は第5実施形態におけるタスク管理部1
5の構成であり、図37はタスク管理レジスタ13のビ
ット構成及び、これらの各ビットがどのようなフラグと
して機能するかを示す説明図である。本図においてタス
ク管理レジスタ13の第0ビットが『0』であれば、タ
スク(0)をsleep状態として処理することを示し、第0ビ
ットが『1』であればタスク(0)がそうでないことを示
す。
Task sleep may occur frequently in a plurality of tasks at the same time, or may not occur at all.
The 5th task so that dormant tasks can be managed individually
In the embodiment, a bit for managing a task that has entered sleep (sleep state) is assigned to the task management register 13. FIG. 36 shows a task management unit 1 according to the fifth embodiment.
FIG. 37 is an explanatory diagram showing the bit configuration of the task management register 13 and what kind of flag these bits function as. In this drawing, if the 0th bit of the task management register 13 is “0”, it indicates that the task (0) is processed as a sleep state, and if the 0th bit is “1”, the task (0) is not. Indicates that

【0148】タスク管理レジスタ13の第1ビットが
『0』であれば、タスク(1)をsleep状態として処理する
ことを示し、第1ビットが『1』であればタスク(1)がそ
うでないことを示す。タスク管理レジスタ13の第2ビ
ットが『0』であれば、タスク(2)をsleep状態として処
理することを示し、第2ビットが『1』であればタスク
(2)がそうでないことを示す。これらのビットをタスク
が切り換えることにより、自身を休眠状態にしたり、他
のタスクの休眠状態を解除したりする。
If the first bit of the task management register 13 is "0", it indicates that the task (1) is to be processed in the sleep state, and if the first bit is "1", the task (1) is not. Indicates that If the second bit of the task management register 13 is “0”, it indicates that the task (2) is to be processed as a sleep state, and if the second bit is “1”, the task (2) is processed.
Indicates that (2) is not. The task switches these bits so as to put itself into a sleep state or cancel the sleep state of another task.

【0149】タスク管理レジスタ13のビット操作は、
以下の{例3}{例4}にニーモニックを示す命令によ
りなされる。 {例3} sleep_task {例4} wake_task task(k) {例3}において『sleep_task命令』は、自身をsleep
状態にする命令である。{例4}において『wake_task
命令』は、第1オペランドにより6つのタスクのうち何
れか一つの識別子を指定できる。このような二種の命令
を各タスク内に配置することにより、各タスクは休眠状
態の移行と、これの解除とを交互に行う。尚、sleep_ta
sk命令においては第1オペランドにより他のタスクを指
定できるようにしてもよい。
The bit operation of the task management register 13 is as follows.
This is performed by an instruction indicating a mnemonic in the following {Example 3} Example 4. {Example 3} sleep_task {Example 4} wake_task task (k) In {Example 3}, the “sleep_task instruction” sleeps itself.
This is the instruction to set the state. In "Example 4", "wake_task
The instruction ”can designate any one of the six tasks with the first operand. By arranging such two types of instructions in each task, each task alternately shifts to a sleep state and cancels it. Sleep_ta
In the sk instruction, another task may be specified by the first operand.

【0150】図38は、第4実施形態におけるスケジュ
ーラ62の内部構成を示す図である。図38においてス
ケジューラ62がタスクID保持部71、タスクID保持部
72、タスクラウンド管理部73、プライオリティエン
コーダ74を備えている点は第1実施形態と差違は無
い。本図において新規なのはインバータ94及びOR回路
95からなるタスクスキップ管理回路93である。
FIG. 38 is a diagram showing the internal configuration of the scheduler 62 in the fourth embodiment. 38, there is no difference from the first embodiment in that the scheduler 62 includes a task ID holding unit 71, a task ID holding unit 72, a task round management unit 73, and a priority encoder 74. What is new in this figure is a task skip management circuit 93 including an inverter 94 and an OR circuit 95.

【0151】タスクスキップ管理回路93は、タスク管
理レジスタ13においてsleep状態に割り当られている6
ビットを反転するインバータ94と、反転された6ビッ
トと、タスクラウンド管理部73から出力されたラウン
ド値tasknとの論理和をとるOR回路95からなる。ここ
でタスク(0)、タスク(1)、タスク(2)の実行が済んで『0
00111』というラウンド値tasknがタスクラウンド管理部
73から出力され、またタスク管理レジスタ13におい
てタスク(3)がsleep状態に設定されているものとする。
この場合タスク管理レジスタ13のsleepビットは『110
111』となり、インバータ94によりこれの反転値『001
000』が出力される。インバータ94による反転値『001
000』とラウンド値taskn『000111』との論理和は、『00
1111』となる。この論理和がプライオリティエンコーダ
74に出力されると、第4ビットにおいて『1』から
『0』への反転が行われていることが検出され、タスク
(4)の識別子がタスクID保持部71及びタスクID保持部
72に出力される。タスク(4)の識別子が出力される
と、タスク(0)、タスク(1)、タスク(2)、タスク(4)の順
に実行が行われることになる。
The task skip management circuit 93 is assigned to the sleep state in the task management register 13.
It comprises an inverter 94 for inverting bits, and an OR circuit 95 for performing a logical sum of the inverted 6 bits and the round value taskn output from the task round management unit 73. Here, task (0), task (1), and task (2) have been executed
[00111] The round value taskn of “00111” is output from the task round management unit 73, and the task (3) is set to the sleep state in the task management register 13.
In this case, the sleep bit of the task management register 13 is "110
111 ”, and the inverted value“ 001 ”
000 "is output. The inverted value [001
000 "and the round value taskn" 000111 "are" 00
1111]. When this logical sum is output to the priority encoder 74, it is detected that the inversion from “1” to “0” is performed in the fourth bit, and the task
The identifier of (4) is output to the task ID holding unit 71 and the task ID holding unit 72. When the identifier of the task (4) is output, the task (0), the task (1), the task (2), and the task (4) are executed in this order.

【0152】図39は、sleep命令を命令1-1,2-1,3-1と
してその内部に有した非同期イベントタスクの一例であ
り、図41は、図39の非同期イベントタスクがどのよ
うに実行されるかを示すタイミングチャートである。sl
eep命令が図41に示すように命令1-1として非同期イベ
ントタスクの第1番目の命令として格納されている場
合、この命令1-1がDECPC保持部23に格納され、命令解
読制御部11により解読されると、セレクタ25は、
の信号線を介して命令1-2の読出先アドレスをタスク別P
C格納部24に格納する。その後命令解読制御部11
は、命令1-2、命令1-3を無効化する(図16における
『NOP』)。
FIG. 39 shows an example of an asynchronous event task having a sleep instruction as instructions 1-1, 2-1 and 3-1. FIG. 41 shows how the asynchronous event task of FIG. It is a timing chart which shows whether it is performed. sl
When the eep instruction is stored as the first instruction of the asynchronous event task as the instruction 1-1 as shown in FIG. 41, the instruction 1-1 is stored in the DECPC holding unit 23, and the instruction decoding control unit 11 Once decrypted, the selector 25
The read address of instructions 1-2 via task line P
It is stored in the C storage unit 24. After that, the instruction decoding control unit 11
Invalidates the instructions 1-2 and 1-3 ("NOP" in FIG. 16).

【0153】図40はsleep命令及びwake命令の命令フ
ォーマットの一例を示す。図40において、本命令は図
9に示したレジスタ指定型の算術演算命令の命令フォー
マットを有する。本フォーマットの11bitから13bitを
『010』に指定することにより、sleep命令のオペレーシ
ョンをI/Oプロセッサは実行する。また本フォーマット
の11bitから13bitを『011』に指定することにより、wak
e命令のオペレーションをI/Oプロセッサは実行する。
FIG. 40 shows an example of the command format of the sleep command and the wake command. In FIG. 40, this instruction has the instruction format of the register designation type arithmetic operation instruction shown in FIG. By designating 11 bits to 13 bits of this format as “010”, the I / O processor executes the operation of the sleep instruction. Also, by specifying 11 bits to 13 bits of this format to “011”, wak
The I / O processor performs the operation of the e-instruction.

【0154】以上のように構成された第5実施形態のI/
Oプロセッサによって、どのようにスレッドが割り当て
られるかを図42(a)〜図42(d)を参照しながら
説明する。タスク(1)はパージングタスク、タスク(3)は
ホストI/Oタスクであり、タスク(1)、タスク(2)、タス
ク(3)の第1番目の命令がsleep命令であるものとする。
タスク(0)、タスク(4)、タスク(5)に4サイクルのスレ
ッドが割り当てられるが、図42(a)においてタスク
(1)、タスク(2)、タスク(3)には、第1番目の命令とし
てsleep命令が格納されているので2サイクルのスレッド
が割り当てられる。
The I / O of the fifth embodiment configured as described above
How the O processor allocates threads will be described with reference to FIGS. 42 (a) to 42 (d). Task (1) is a purging task, task (3) is a host I / O task, and the first instruction of task (1), task (2), and task (3) is a sleep instruction.
Task (0), task (4), and task (5) are assigned four-cycle threads.
Since (1), task (2), and task (3) store a sleep instruction as the first instruction, a two-cycle thread is allocated.

【0155】sleep命令の実行後、次のフレームにおい
ては図42(b)に示すように、タスク(1)、タスク
(2)、タスク(3)に割り当てられるスレッドは0サイクル
である。タスク(0)は起動期間がより長いビットストリ
ーム転送制御タスクであり、タスク(0)には第1番目に
タスク(3)に対してのwake命令が格納されているものと
する。そうすると、図42(c)に示すように次のフレ
ームにおいてこのwake命令が解読されることによりタス
ク(3)に4サイクルのスレッドが割り当てられる。
After the execution of the sleep instruction, in the next frame, as shown in FIG.
(2) The thread assigned to the task (3) has 0 cycles. Task (0) is a bit stream transfer control task with a longer activation period, and it is assumed that task (0) stores a wake instruction for task (3) first. Then, as shown in FIG. 42 (c), this wake instruction is decoded in the next frame, so that a thread of 4 cycles is allocated to the task (3).

【0156】タスク(0)には第14番目にタスク(1)に対
してのwake命令が格納されているものとする。そうする
と、図42(d)に示すように次のフレームにおいてこ
のwake命令が解読されることによりタスク(1)に4サイ
クルのスレッドが割り当てられる。以上のように本実施
形態によれば、パージングタスク、ホストI/Oタスク
等、起動すべき期間が限定されているタスクは自ら進ん
で休眠状態に入り、起動期間がより長い転送制御タスク
に休眠状態の解除を委ねることにより、タスク巡回のス
ループットを向上させることができる。 (第6実施形態)第6実施形態は、第3実施形態におけ
るwait状態制御と、第4実施形態における緊急タスク制
御と、第5実施形態における休眠タスク制御とを共存さ
せる技術に係る。
It is assumed that the task (0) stores a wake instruction for the task (1) fourteenth. Then, as shown in FIG. 42 (d), by decoding this wake instruction in the next frame, a thread of 4 cycles is allocated to the task (1). As described above, according to the present embodiment, a task having a limited period to be started, such as a purging task or a host I / O task, goes into a sleep state by itself, and sleeps in a transfer control task having a longer startup period. By leaving the release of the state, the throughput of the task patrol can be improved. (Sixth Embodiment) The sixth embodiment relates to a technique in which the wait state control in the third embodiment, the emergency task control in the fourth embodiment, and the sleep task control in the fifth embodiment coexist.

【0157】図43は、タスク管理レジスタ13の各ビ
ットにwait状態、emgcy状態、sleep状態の管理を統括さ
せたものである。スレッドマネージャー61及びスケジ
ューラ62は、このようにタスク管理レジスタ13に統
括されたwait状態、emgcy状態、sleep状態を参照して次
のタスクの決定やタスクの次スレッドに割り当る命令数
の増減を行う。
FIG. 43 shows the management of the wait state, the emgcy state, and the sleep state in each bit of the task management register 13. The thread manager 61 and the scheduler 62 determine the next task and increase or decrease the number of instructions assigned to the next thread of the task with reference to the wait state, the emgcy state, and the sleep state integrated in the task management register 13 as described above. .

【0158】図44は、緊急タスク制御及びsleep状態
タスク制御を共存させ得るよう構成されたスケジューラ
62の構成図である。図44においてスケジューラ62
がタスクID保持部72、タスクラウンド管理部75、コ
ンバータ76、緊急タスクマスク部77、プライオリテ
ィエンコーダ80、セレクタ82、タスクID保持部83
から構成されている点は第4、第5実施形態と差違は無
い。本図において、タスクラウンド管理部75の出力
と、インバータ94により反転されたラウンド値taskne
のラウンド値との論理和をとるOR回路96が新たに追加
され、その結果をプライオリティエンコーダ80に出力
する。
FIG. 44 is a configuration diagram of the scheduler 62 configured so that emergency task control and sleep state task control can coexist. In FIG. 44, the scheduler 62
Is a task ID storage unit 72, a task round management unit 75, a converter 76, an emergency task mask unit 77, a priority encoder 80, a selector 82, and a task ID storage unit 83.
Is not different from the fourth and fifth embodiments. In the figure, the output of the task round management unit 75 and the round value taskne inverted by the inverter 94 are shown.
An OR circuit 96 for calculating the logical sum with the round value of is newly added, and the result is output to the priority encoder 80.

【0159】プライオリティエンコーダ80は、OR回路
96が出力したラウンド値をタスク識別子に変換して、
タスクID保持部72及びタスクID保持部83に出力す
る。以上のように本実施形態によれば、第4実施形態に
おける緊急タスク制御と、第5実施形態におけるsleep
状態タスク制御とを共存させることにより、より柔軟性
に富んだタスクスケジューリングを実現することができ
る。 (各実施形態における全体制御についての説明)以降、
第1実施形態〜第5実施形態に示したI/Oプロセッサの
全体制御をフロ−チャ−トを参照しながら説明する。
The priority encoder 80 converts the round value output from the OR circuit 96 into a task identifier,
Output to the task ID holding unit 72 and the task ID holding unit 83. As described above, according to the present embodiment, the emergency task control in the fourth embodiment and the sleep task control in the fifth embodiment
By coexisting with state task control, more flexible task scheduling can be realized. (Description of Overall Control in Each Embodiment)
The overall control of the I / O processor shown in the first to fifth embodiments will be described with reference to flowcharts.

【0160】図45は、第1実施形態におけるI/Oプロ
セッサの全体制御を図示したフロ−チャ−トである。本
図において、『変数k』とは命令メモリ100に記憶さ
れている6本の非同期イベントタスクを指示するための
変数でありタスクID保持部71及びタスクID保持部72
が保持するタスク識別子taskidに対応する。『変数i』
とはそれぞれのタスクに含まれる命令の実行の際、その
命令が当該スレッドにおいて何番目に実行されたかを指
示するための変数であり、カウンタ52によりカウント
されるカウント値に対応する。『変数adr』とは、タス
ク別PC格納部24に格納されている個々のタスクの読み
出し先アドレスを示す変数である。
FIG. 45 is a flowchart showing the overall control of the I / O processor in the first embodiment. In the figure, “variable k” is a variable for indicating six asynchronous event tasks stored in the instruction memory 100, and is a task ID holding unit 71 and a task ID holding unit 72.
Corresponds to the task identifier taskid held by. "Variable i"
Is a variable for indicating the order in which the instruction is executed in the thread when executing the instruction included in each task, and corresponds to the count value counted by the counter 52. The “variable adr” is a variable indicating a read destination address of each task stored in the task-specific PC storage unit 24.

【0161】図50は、図45のフロ−チャ−トによる
スレッド間の遷移を示す図である。図50において、縦
方向下向きが時間軸であり、4つの長方形を含む太枠で
囲まれた四角形がスレッドである。図45のフロ−チャ
−トにおける変数kにより個別に指示される。太枠の中
の一つの各四角形は一つの命令を実行するサイクルを表
し、これらの命令は変数iにより指示される。ステップ
S1は、上記タスクID保持部71がゼロのタスク識別子
taskidを出力する。これにより変数kがゼロクリアさ
れ、ステップS2に移行する。ステップS2は、カウン
タ52を初期化することにより変数iを1に初期化す
る。ステップS3においてタスクID保持部72がタスク
別PC格納部24に読み出しアドレス選択信号nxttaskid
(rd_adr)を出力することによりタスク(k)の読出先アド
レスをタスク別PC格納部24から読み出す。ステップS
4においてタスク(k)の読出先アドレスを用いて、命令
メモリ100から命令を取り出す。ステップS5におい
て命令解読制御部11は、取り出された命令を解読して
実行する。
FIG. 50 is a diagram showing transition between threads according to the flowchart of FIG. In FIG. 50, the downward direction in the vertical direction is the time axis, and the square surrounded by a thick frame including four rectangles is a thread. It is individually designated by a variable k in the flowchart of FIG. Each square in the bold frame represents a cycle of executing one instruction, and these instructions are indicated by a variable i. In step S1, the task ID holding unit 71 sets the task identifier to zero.
Output taskid. As a result, the variable k is cleared to zero, and the routine goes to Step S2. A step S2 initializes the variable i to 1 by initializing the counter 52. In step S3, the task ID holding unit 72 reads the task-specific PC storage unit 24 with the read address selection signal nxttaskid.
By outputting (rd_adr), the read destination address of the task (k) is read from the task-specific PC storage unit 24. Step S
In step 4, the instruction is fetched from the instruction memory 100 using the read destination address of the task (k). In step S5, the instruction decoding control unit 11 decodes and executes the extracted instruction.

【0162】ステップS6は、比較器54は変数iと上
限4との比較を行う。この場合はi=1であるのでステップ
S7に移行する。ステップS7は、カウンタ52に変数
iのインクリメントを行わせ、increment回路21に読出
先アドレスのインクリメントを行せるステップである
が、このインクリメントはタスクkにおけるある命令の
実行から別の命令の実行への切り換えを意味する。この
場合i=2であるから、スレッドにおける命令の実行から
第2命令の実行への切り換えが行われることになる。
In step S6, the comparator 54 compares the variable i with the upper limit 4. In this case, since i = 1, the process proceeds to step S7. Step S7 stores the variable in the counter 52
This is a step in which i is incremented and the increment circuit 21 can increment the read destination address. This increment means switching from execution of one instruction in task k to execution of another instruction. In this case, since i = 2, the execution of the instruction in the thread is switched to the execution of the second instruction.

【0163】変数iは、ステップS7においてインクリ
メントされてステップS4に移行する。変数iのインク
リメントよりi=2となり、読出先アドレスも一命令分進
行したので、ステップS4において命令読出回路10は
命令メモリ100内の読出先アドレス(adr+1)で指示さ
れる命令を読み出して、ステップS5において命令解読
制御部11はこれを解読し、実行する。
The variable i is incremented in step S7, and the process proceeds to step S4. Since i = 2 from the increment of the variable i and the read destination address has advanced by one instruction, the instruction reading circuit 10 reads the instruction indicated by the read destination address (adr + 1) in the instruction memory 100 in step S4. In step S5, the command decoding control section 11 decodes the command and executes it.

【0164】以上のステップS4〜ステップS7の一連
の手順を繰り返し行うことにより変数iは次々とインク
リメントされ、命令メモリ100におけるadr+0,adr+1,
adr+2,adr+3の領域に記憶されている命令を順次読み出
す。以上のステップS4、ステップS5の実行をステッ
プS6においてYesとなるまで繰り返す。ステップS6
がYesとなると、ステップS6からステップS8への移
行が行われる。以上の手順において、変数iが1,2,3であ
る内はステップS4、ステップS5、ステップS6、ス
テップS7の手順が繰り返されて、変数iが4になって初
めてステップS6からステップS8への移行が行われた
ことは、タスク(0)に対する命令実行を4回繰り返すこ
とを意味する(図50において最上段に位置する4つの
四角形の並びはタスク(0)の第1スレッドにおける4回
の命令実行の図解となる。)。ちなみにステップS8〜
ステップS10の手順はタスクからタスクへの切り換え
を行うものであるから、ステップS6における『変数i
=4』の判定は、命令の実行の4回の繰り返しをタスク
切り換えの条件に課していることを意味する。
By repeatedly performing the above-described series of steps S4 to S7, the variable i is incremented one after another, and adr + 0, adr + 1,
The instructions stored in the areas of adr + 2 and adr + 3 are sequentially read. The above steps S4 and S5 are repeated until the result of step S6 becomes Yes. Step S6
Is YES, the process proceeds from step S6 to step S8. In the above procedure, steps S4, S5, S6, and S7 are repeated as long as the variable i is 1, 2, and 3. Only when the variable i becomes 4, the steps from S6 to S8 are performed. The transition means that the execution of the instruction for task (0) is repeated four times (the arrangement of the four squares at the top in FIG. 50 indicates the four times in the first thread of task (0)). Illustration of instruction execution.) By the way, from step S8
Since the procedure of step S10 is to switch from task to task, the “variable i
= 4 "means that four repetitions of instruction execution are imposed on the condition of task switching.

【0165】ステップS6において変数iと上限値との
判定がなされると、ステップS8においてincrement回
路21により変数iがインクリメントされ、ステップS
9においてタスク(k)の読出先アドレス(adr+i-1)を読出
先アドレス(adr)としてタスク別PC格納部24に格納し
た後にステップS10に移行する。ステップS10で
は、タスクラウンド管理部73及びプライオリティエン
コーダ74に次に実行すべきタスクを決定させる。この
際タスクラウンド管理部73により『000000』のラウン
ド値tasknが出力され、プライオリティエンコーダ74
により、『001』のタスク識別子taskidが出力される。
『001』のタスク識別子taskid、即ちk=1となるので、タ
スク(0)からタスク(1)への切り換えが行われる。タスク
の切り換え後、ステップS2に移行すると、変数iの初
期化がなされ再度ステップS3〜ステップS7の繰り返
しがまた開始される。
If it is determined in step S6 that the variable i is equal to the upper limit value, the variable i is incremented by the increment circuit 21 in step S8,
In step 9, the task (k) read destination address (adr + i-1) is stored in the task-specific PC storage unit 24 as the read destination address (adr), and then the process proceeds to step S10. In step S10, the task round management unit 73 and the priority encoder 74 determine a task to be executed next. At this time, the round value taskn of “000000” is output by the task round management unit 73 and the priority encoder 74
As a result, a task identifier taskid of “001” is output.
Since the task identifier taskid of “001”, that is, k = 1, switching from task (0) to task (1) is performed. After the task is switched, when the process proceeds to step S2, the variable i is initialized, and the repetition of steps S3 to S7 is started again.

【0166】前回同様ステップS4において命令メモリ
100における当該読出先アドレスからタスク(1)に含
まれる一命令を取り出し、ステップS5において取り出
された命令を解読して実行する。ステップS6は、変数
iと上限4との比較を再度行う。この場合はi=1であるの
でステップS7に移行する。変数iは、ステップS7に
おいてインクリメントされてステップS4に移行する。
変数iのインクリメントよりi=2となるので、ステップS
4において読出先アドレス(adr+1)で指示される命令メ
モリ100内の領域のアクセスを行い、命令メモリ10
0において、読出先アドレス(adr+1)で指示される領域
に記憶されている命令を読み出して、ステップS5にお
いてこれを解読し、実行する。
As in the previous case, in step S4, one instruction included in task (1) is fetched from the read destination address in the instruction memory 100, and the fetched instruction is decoded and executed in step S5. Step S6 is a variable
The comparison between i and upper limit 4 is performed again. In this case, since i = 1, the process proceeds to step S7. The variable i is incremented in step S7, and the process proceeds to step S4.
Since i = 2 from the increment of the variable i, step S
In step 4, the area in the instruction memory 100 designated by the read destination address (adr + 1) is accessed.
At 0, the instruction stored in the area designated by the read destination address (adr + 1) is read, and it is decoded and executed at step S5.

【0167】以上のステップS4〜ステップS7の一連
の手順を繰り返し行うことにより変数iを次々とインク
リメントして、命令メモリ100におけるadr+0,adr+1,
adr+2,adr+3の領域に記憶されている命令を順次読み出
す。以上のステップS4、ステップS5の実行をステッ
プS6においてYesとなるまで繰り返す。ステップS6
がYesとなると、ステップS6からステップS8への移
行が行われる。以上の手順において、変数iが1,2,3であ
る内はステップS4、ステップS5、ステップS6、ス
テップS7の手順が繰り返されて、変数iが4になって初
めてステップS6からステップS8への移行が行われる
(以上までの動作により、図50ではタスク(1)におけ
る四命令分(タスク(1)に対する4個の命令)進行した
ことになる。)。ステップS8において変数iをインク
リメントして、ステップS9においてタスク(k)の読出
先アドレス(adr+i-1)を読出先アドレス(adr)として格納
した後にステップS10に移行する。ステップS10に
おいて再度タスクラウンド管理部73及びプライオリテ
ィエンコーダ74に変数kの決定行わせて、変数kをk=2
にして、タスク(1)からタスク(2)への切り換えを行わせ
る。タスクの切り換え後、ステップS2に移行すると、
変数iの初期化がなされ再度ステップS3〜ステップS
7の繰り返しがまた開始される。
By repeatedly performing the above-described series of steps S4 to S7, the variable i is incremented one after another, and adr + 0, adr + 1,
The instructions stored in the areas of adr + 2 and adr + 3 are sequentially read. The above steps S4 and S5 are repeated until the result of step S6 becomes Yes. Step S6
Is YES, the process proceeds from step S6 to step S8. In the above procedure, steps S4, S5, S6, and S7 are repeated as long as the variable i is 1, 2, and 3. Only when the variable i becomes 4, the steps from S6 to S8 are performed. The transition is performed (by the operation described above, in FIG. 50, four instructions in task (1) (four instructions for task (1)) have been advanced.) In step S8, the variable i is incremented. In step S9, the read destination address (adr + i-1) of the task (k) is stored as the read destination address (adr), and then the process proceeds to step S10. In step S10, the task round management unit 73 and the priority encoder 74 determine the variable k again, and set the variable k to k = 2.
Then, the task (1) is switched to the task (2). After the task is switched, the process proceeds to step S2.
Initialization of the variable i is performed and steps S3 to S
The repetition of 7 is started again.

【0168】以上の繰り返しにより、図50において、
タスク(1)、タスク(2)、タスク(3)、タスク(4)、タスク
(5)の実行が四命令ずつ行われ、各タスクが順次消費さ
れてゆく。 (第2実施形態における全体制御の説明)第2実施形態
におけるI/Oプロセッサの全体制御は、図46のフロー
チャートに示す手順にて行われる。図46のフロ−チャ
−トは、ステップS1〜ステップS10からなる図45
のフロ−チャ−トをベースにして作成されている。ここ
で図46において新規なのはステップS12がステップ
S4〜ステップS5の間に挿入されている点である。
By repeating the above, in FIG.
Task (1), Task (2), Task (3), Task (4), Task
The execution of (5) is performed four instructions at a time, and each task is sequentially consumed. (Description of Overall Control in Second Embodiment) Overall control of the I / O processor in the second embodiment is performed according to the procedure shown in the flowchart of FIG. The flowchart of FIG. 46 is composed of steps S1 to S10 in FIG.
Is created based on the flowchart of FIG. Here, what is new in FIG. 46 is that step S12 is inserted between steps S4 and S5.

【0169】ステップS12は、ステップS4により命
令メモリ100から読み出された命令がWait_Until_Nex
t命令であるかを判定する。もしWait_Until_Next命令で
あれば、ステップS8へと移行して変数iをインクリメ
ントし、ステップS9においてタスク(k)の読出先アド
レス(adr+i-1)を読出先アドレス(adr)として格納する。
In step S12, the instruction read from the instruction memory 100 in step S4 is Wait_Until_Nex
Determine whether the instruction is a t instruction. If it is a Wait_Until_Next instruction, the process proceeds to step S8 to increment the variable i, and in step S9, the read address (adr + i-1) of the task (k) is stored as the read address (adr).

【0170】ここで留意すべきは、ステップS12では
変数iの値に拘らず、Wait_Until_Next命令が実行された
時点にステップS8に移行して読出先アドレスを格納す
る点である。このようにステップS8が変数iの値に拘
らずステップS12の解読後に実行されるため、タスク
からタスクへの切り換えは、四回の命令を待たずして行
われることになる。
It should be noted here that, in step S12, regardless of the value of the variable i, the flow shifts to step S8 when the Wait_Until_Next instruction is executed, and stores the read destination address. As described above, since step S8 is executed after decoding in step S12 regardless of the value of the variable i, switching from task to task is performed without waiting for four instructions.

【0171】図51は、第2実施形態におけるるスレッ
ド間の遷移を示す図である。図51におけるシーケンス
は、図50同様縦方向下向きが時間軸であり、4つの長
方形を含む太枠で囲まれた四角形がスレッドとなる。太
枠の中の一つの各四角形は一つの命令を実行するサイク
ルを表している。これらの四角形のうち、『』が記入さ
れているものはWait_Until_Next命令を示す。またタス
ク(0)が各スレッドにおいて命令メモリ100内のどの
命令を実行するかを、四角形の右横の『PC』『PC+1』
『PC+2』『PC+3』といったプログラムカウント値及びプ
ログラムカウントからの相対値により表現している(尚
本図は、タスク(0)の第1スレッドの第1命令の読み出
し時におけるプログラムカウント値を基準にしてい
る。)。
FIG. 51 is a diagram showing transition between threads according to the second embodiment. In the sequence in FIG. 51, the vertical direction is the time axis as in FIG. 50, and the square surrounded by a thick frame including four rectangles is a thread. Each square in the bold frame represents a cycle for executing one instruction. Among these rectangles, those with “” indicate a Wait_Until_Next instruction. Also, which instruction in the instruction memory 100 the task (0) executes in each thread is indicated by “PC” “PC + 1” on the right side of the square.
It is expressed by a program count value such as "PC + 2" or "PC + 3" and a relative value from the program count. (Note that this figure shows the program count when reading the first instruction of the first thread of task (0). Based on the value.)

【0172】図47においてステップS1〜ステップS
4の手順が行われることにより、タスク(0)の第1スレ
ッドの第1命令が読み出される。読み出された命令の解
読結果の判定がステップS12において行われるが、タ
スク(0)の第1スレッド−第1命令はWait_Until_Next命
令ではないのでステップS5に移行する。ステップS5
への移行により、タスク(0)の第1スレッド−第1命令
の実行が行われて、1命令分進行したことになる。
In FIG. 47, steps S1 to S
By performing the procedure of No. 4, the first instruction of the first thread of the task (0) is read. The decoding result of the read instruction is determined in step S12. However, since the first thread-first instruction of the task (0) is not the Wait_Until_Next instruction, the process proceeds to step S5. Step S5
As a result, the execution of the first thread and the first instruction of the task (0) is performed, and one task is advanced.

【0173】再度ステップS1〜ステップS4の手順が
行われることにより、タスク(0)の第1スレッドの第2
命令が読み出される。読み出された命令の解読結果の判
定がステップS12において行われるが、タスク(0)の
第1スレッド−第2命令はWait_Until_Next命令であ
り、ステップS8への移行が行われる。ステップS8に
より変数iは1インクリメントされて『3』となり、ステ
ップS9において読出先アドレス(adr+2)がタスク(0)の
読み出し先アドレスとしてタスク別PC格納部110に格納
される。
By performing steps S1 to S4 again, the second thread of the first thread of task (0) is
The instruction is read. The decoding result of the read instruction is determined in step S12. The first thread-second instruction of the task (0) is a Wait_Until_Next instruction, and the process proceeds to step S8. In step S8, the variable i is incremented by 1 to "3". In step S9, the read destination address (adr + 2) is stored in the task-specific PC storage unit 110 as the read destination address of the task (0).

【0174】格納後、ステップS10において変数kは
インクリメントされ、ステップS2に移行する。このス
テップS10における変数kのインクリメントにより、
タスク(0)からタスク(1)への切り換えが、第1スレッド
の第3命令,第4命令の実行を待たずに行われる。タス
ク(1)の第1スレッドの実行が四命令の実行により行わ
れ、同様にタスク(2)、タスク(3)、タスク(4)、タスク
(5)の実行が行われて、タスク(5)の第1スレッド−第4
命令まで進んだとする。ステップS10において変数k
が決定され、ステップS2において変数iが『1』に初期
化されて、ステップS3においてタスク(0)の読出先ア
ドレスがタスク別PC格納部110から読み出される。ここ
で留意されたいのは、タスク(0)の第1スレッドの第2
命令(Wait_Until_Next命令)の実行時に、PC+2(『P
C』は第1命令のプログラムカウント値を示す。)がタ
スク(0)の読出先アドレスとしてタスク別PC格納部110に
格納されている点である。このようにタスク別PC格納部
110に(PC+2)が格納されているため、タスク(1)の第2ス
レッドの命令実行はPC+2から開始されることになる。
After the storage, the variable k is incremented in step S10, and the flow shifts to step S2. By incrementing the variable k in step S10,
Switching from task (0) to task (1) is performed without waiting for execution of the third and fourth instructions of the first thread. Execution of the first thread of task (1) is performed by executing four instructions, and similarly, task (2), task (3), task (4), task
Execution of (5) is performed, and the first thread to the fourth thread of the task (5) are executed.
Suppose you have advanced to the order. In step S10, the variable k
Is determined, the variable i is initialized to “1” in step S2, and the read destination address of the task (0) is read from the task-specific PC storage unit 110 in step S3. Note that the second thread of the first thread of task (0)
When the instruction (Wait_Until_Next instruction) is executed, PC + 2 (“P
"C" indicates the program count value of the first instruction. ) Is stored in the task-specific PC storage unit 110 as the read destination address of the task (0). In this way, the PC storage unit for each task
Since (PC + 2) is stored in 110, the instruction execution of the second thread of the task (1) is started from PC + 2.

【0175】(第3実施形態における全体制御の説明)
図47は第3実施形態におけるI/Oプロセッサのフロ−
チャ−トである。本図において、図45、図46の同一
処理内容のステップには、図45、図46と同一参照符
号を付してその説明を省略する。また図中の『変数Tota
l』とは、タスク管理レジスタ13の内容に基づき、セ
レクタ55が出力する数値を示し、命令実行数の上限を
指定するために用いられる。変数Totalはその初期状態
において、スレッドにおける命令総数である『4』に初
期化されるが、『2』にも更新され得る。
(Description of Overall Control in Third Embodiment)
FIG. 47 is a flow chart of the I / O processor according to the third embodiment.
It is a chart. 45, steps having the same processing contents in FIGS. 45 and 46 are denoted by the same reference numerals as in FIGS. 45 and 46, and description thereof is omitted. In the figure, "Variable Tota
“l” indicates a numerical value output by the selector 55 based on the contents of the task management register 13 and is used to specify the upper limit of the number of executed instructions. In the initial state, the variable Total is initialized to “4”, which is the total number of instructions in the thread, but can be updated to “2”.

【0176】図52は、第3実施形態のフロ−チャ−ト
によるスレッド間の遷移を示す図である。以降の説明で
は図52において、タスク(0)の第1スレッドの第1命
令、第2命令が実行済みであり、これから第3命令が読
み出されようとしている。ステップS93は、上記変数
kをゼロクリアし、変数Totalを4に設定する。ステップ
S2は、上記変数iをゼロクリアする。ステップS3に
おいて、ゼロクリアされた変数kの読出先アドレス、即
ち、タスク(0)の読出先アドレスをタスク別PC格納部110
から読み出す。ステップS4において命令メモリ100
において読み出されたタスクの読出先アドレスを絶対ア
ドレスとし、変数iをオフセット値としたアドレスから
命令を取り出す。
FIG. 52 is a diagram showing transition between threads according to the flowchart of the third embodiment. In the following description, in FIG. 52, the first instruction and the second instruction of the first thread of the task (0) have been executed, and the third instruction is about to be read from this. Step S93 is for the above variable
Clear k to zero and set the variable Total to 4. A step S2 clears the variable i to zero. In step S3, the read destination address of the variable k that has been cleared to zero, that is, the read destination address of task (0) is stored in the task-specific PC storage unit 110.
Read from In step S4, the instruction memory 100
The instruction is taken out from the address where the read destination address of the task read in step 2 is an absolute address and the variable i is an offset value.

【0177】ステップS81において取り出された命令
がCmp_And_Wait命令であるかを判定する。ステップS8
2では命令解読制御部81、演算実行部84はCmp_And_
Wait命令の第1オペランドに記述された状態監視レジス
タjの指定と、第2オペランドに記述された即値とを参
照してCmp_And_Wait命令が提示する事象の成立の真偽を
判定する。状態監視レジスタjの保持値と即値とが一致
せず、事象不成立が判定されると、ステップS83に移
行して、タスクkをwait状態に設定しステップS84に
移行する。ステップS84では、プログラムカウントを
進行させないよう、フリップフロップ27及びセレクタ
25に読出先アドレスをCmp_And_Wait命令のアドレスに
設定させてステップS87に移行する。
It is determined whether the instruction fetched in step S81 is a Cmp_And_Wait instruction. Step S8
In 2, the instruction decoding control unit 81 and the operation execution unit 84 perform Cmp_And_
With reference to the designation of the state monitoring register j described in the first operand of the Wait instruction and the immediate value described in the second operand, it is determined whether the event presented by the Cmp_And_Wait instruction is true or false. If the value held in the state monitoring register j and the immediate value do not match, and it is determined that the event is not satisfied, the flow shifts to step S83, sets the task k to the wait state, and shifts to step S84. In step S84, the flip-flop 27 and the selector 25 are caused to set the read destination address to the address of the Cmp_And_Wait instruction so that the program count does not advance, and the flow proceeds to step S87.

【0178】ステップS87は、図46のフロ−チャ−
トのステップS6同様、上限チェックを行うステップで
ある。ステップS6における『変数i=4』の判定は、
命令の実行の4回の繰り返しをタスク切り換えの条件に
課していた。これに対してステップS87における『変
数i=変数Total』の判定は、命令の実行の繰り返し回数
が変数Totalと等しいことをタスク切り換えの条件に課
している。ここでの変数Totalは未更新であるから、
『変数i=変数Total』は実質『変数i=4』の判定とな
る。Cmp_And_Wait命令はタスク(0)の第1スレッドにお
いて3命令目に含まれており、一方変数i=2なので、ステ
ップS87からステップS7への移行が行われる。ステ
ップS7において変数iがインクリメントされると、ス
テップS4における命令読み出しにより、Cmp_And_Wait
命令の次順の命令が命令解読制御部81に読み出され
る。読み出されるとステップS81がNoとなりステップ
S85では、命令解読制御部11は直前の命令において
状態不成立が判定され、読出先アドレスがCmp_And_Wait
命令のアドレスに設定されたか(PC戻りが発生したか)
を判定する。
Step S87 is a flow chart of FIG.
In this step, as in step S6 of FIG. The determination of “variable i = 4” in step S6 is as follows:
Four repetitions of instruction execution were imposed on the conditions for task switching. On the other hand, the determination of “variable i = variable Total” in step S87 imposes on the task switching condition that the number of repetitions of instruction execution is equal to the variable Total. Since the variable Total here has not been updated,
“Variable i = Variable Total” is actually a determination of “Variable i = 4”. The Cmp_And_Wait instruction is included in the third instruction in the first thread of the task (0). On the other hand, since the variable i = 2, the process proceeds from step S87 to step S7. When the variable i is incremented in step S7, Cmp_And_Wait is read by reading the instruction in step S4.
The instruction next to the instruction is read out by the instruction decoding control unit 81. When the instruction is read, step S81 is No, and in step S85, the instruction decoding control unit 11 determines that the state is not established in the immediately preceding instruction, and the read destination address is Cmp_And_Wait.
Was set to instruction address (whether PC return occurred)
Is determined.

【0179】ここでアドレス(adr+i)に格納されてい
た命令の直前命令とはCmp_And_Wait命令が相当し、この
Cmp_And_Wait命令の解読時にはPC戻りが発生している。
そのためステップS85はYesとなりステップS86に
移行する。ステップS86では命令解読制御部11は読
み出されたアドレス(adr+i)の命令を廃棄するよう、
汎用レジスタの格納値を無効化する旨の通知を行い、図
51のタスクシーケンスにおけるタスク(0)−第1スレ
ッドの第4命令に示すように、アドレス(adr+i)に格
納されていた命令を無効化してステップS87に移行す
る。変数iの値は4であるからステップS87において
『変数i=変数Total』の判定がなされるとYesとなり、
ステップS88に移行する。
Here, the instruction immediately before the instruction stored at the address (adr + i) corresponds to the Cmp_And_Wait instruction.
When the Cmp_And_Wait instruction was decoded, a PC return occurred.
Therefore, step S85 becomes Yes and the process moves to step S86. In step S86, the instruction decoding control unit 11 discards the instruction at the read address (adr + i).
The notification that the stored value of the general-purpose register is invalidated is performed, and the instruction stored at the address (adr + i) as shown in task (0) -fourth instruction of the first thread in the task sequence of FIG. Is invalidated, and the routine goes to Step S87. Since the value of the variable i is 4, if the determination of “variable i = variable Total” is made in step S87, the result becomes Yes,
The process moves to step S88.

【0180】ステップS87がYesと判定されたこと
は、一スレッド分の命令実行が済んだことを意味する
が、ステップS88では、その−スレッドにおいてPC戻
りが発生したかを判定する。このような判定を行うのは
PC戻りが発生した場合はタスク別PC格納部110にその戻
り先を格納しておく必要があるからである。タスク(0)
の場合は第4命令が廃棄され、第3命令においてPC戻り
が発生しているので、ステップS89においてフリップ
フロップ27及びセレクタ25に戻り先PC値を読出先ア
ドレス(adr)として格納させてステップS10に移行す
る。ステップS10においてタスクラウンド管理部73
及びプライオリティエンコーダ74に次のタスクを決定
させた後、変数kをインクリメントしステップS90に
移行する。
When the determination in step S87 is Yes, it means that the instruction execution for one thread has been completed. In step S88, it is determined whether or not the PC return has occurred in the minus thread. To make such a decision
This is because when a PC return occurs, it is necessary to store the return destination in the task-specific PC storage unit 110. Task (0)
In the case of (4), the fourth instruction is discarded, and a PC return occurs in the third instruction. In step S89, the flip-flop 27 and the selector 25 store the return destination PC value as the read destination address (adr), and then, in step S10 Move to In step S10, the task round management unit 73
After the next task is determined by the priority encoder 74, the variable k is incremented, and the process proceeds to step S90.

【0181】ステップS90〜ステップS92は、イン
クリメントされた変数kにより指示されるタスク、即ち
次に実行されるべきタスクがwait状態にあるか否かを判
定することにより、その次スレッドにおける命令数を切
り換えるという重要な意味合いを持つ。順を追って説明
するとステップS90では、IDコンバータ53はタスク
管理レジスタ13におけるタスク(k)に相当するビット
を参照して、タスク(k)がwait状態にあるかを判定す
る。もしそうであればセレクタ55はステップS91に
おいて変数Totalに4を設定し、異なれば変数Totalに2
を設定する。
Steps S90 to S92 determine whether the task designated by the incremented variable k, that is, the task to be executed next is in a wait state, and determine the number of instructions in the next thread. It has an important implication of switching. In step S90, the ID converter 53 refers to the bit corresponding to the task (k) in the task management register 13 and determines whether the task (k) is in a wait state. If so, the selector 55 sets 4 to the variable Total in step S91, and if different, 2 to the variable Total.
Set.

【0182】タスク(1)は、wait状態ではないのでステ
ップS91において変数Totalが4に設定されてステッ
プS2に移行する。ここでタスク(1)にはCmp_And_Wait
命令が含まれていないものとすると、ステップS5にお
ける命令実行が四回分繰り返されて、次のタスクへの切
り換えが行われる(以上の手順は、第1実施形態に記載
されたものと同様であるから重複説明はあえて行わな
い。)。
Since the task (1) is not in the wait state, the variable Total is set to 4 in step S91, and the flow shifts to step S2. Here, task (1) has Cmp_And_Wait
Assuming that no instruction is included, the execution of the instruction in step S5 is repeated four times to switch to the next task (the above procedure is the same as that described in the first embodiment). We will not repeat the explanation.)

【0183】Cmp_And_Wait命令を含んでいないタスク
(2)、タスク(3)、タスク(4)についても、四命令の実行
が順次行われて順々にタスクが切り換ってゆく。タスク
(5)についての四命令の実行が済んでステップS10に
移行し、ステップS10において変数kをゼロクリアし
て、ステップS90に移行したとする。ステップS90
では、タスク管理レジスタ13においてタスクkに割り
当られたビットkが『1』であるか『0』であるかを判定
する。この判定は、タスクkがwait状態であるか否かを
見極めを意味する。ここで変数k=0であり、タスク(0)
は先程wait状態に設定されているから、ステップS91
において変数Totalに『2』を設定する。ここで留意す
べきは、変数Totalは、スレッドに割り当る命令数の意
味合いを持っている点である。これをステップS91に
おいて『4』から『2』に更新することは、−スレッド
にマッピングする命令数を『4』から『2』に削減する
ことを意味する。そのため、タスク(0)の第2スレッド
では、変数iが1,2とインクリメントされている間だけ、
つまりステップS81〜ステップS85、ステップS5
の処理の繰り返しが2回だけとなる。この際、タスク
(0)の読出先アドレスとしてタスク別PC格納部110に格納
されているのはCmp_And_Wait命令の読出先アドレスであ
る。読出先アドレスのアドレスからCmp_And_Wait命令が
読み出されると第1スレッド同様、ステップS82にお
いて事象の成否の判定がなされる。この場合、事象は不
成立で終わったものとすると、第1スレッドと同様の処
理を行って読出先アドレスをCmp_And_Wait命令に戻して
第2スレッドを終える。
A task that does not include the Cmp_And_Wait instruction
As for (2), task (3), and task (4), the execution of the four instructions is sequentially performed, and the tasks are sequentially switched. task
It is assumed that the execution of the four instructions of (5) is completed, and the process proceeds to step S10. Step S90
Then, it is determined whether the bit k assigned to the task k in the task management register 13 is “1” or “0”. This determination means determining whether the task k is in the wait state. Here, the variable k = 0, and the task (0)
Has been set to the wait state earlier, so step S91
Set the variable Total to "2". It should be noted here that the variable Total has the meaning of the number of instructions allocated to the thread. Updating this from “4” to “2” in step S91 means reducing the number of instructions mapped to a thread from “4” to “2”. Therefore, in the second thread of the task (0), only while the variable i is incremented to 1,2,
That is, steps S81 to S85, step S5
Is repeated only twice. At this time, the task
The read destination address of the Cmp_And_Wait instruction is stored in the task-specific PC storage unit 110 as the read destination address of (0). When the Cmp_And_Wait instruction is read from the address of the read destination address, the success or failure of the event is determined in step S82 as in the first thread. In this case, assuming that the event ends in failure, the same processing as in the first thread is performed, the read destination address is returned to the Cmp_And_Wait instruction, and the second thread is terminated.

【0184】Cmp_And_Wait命令を含んでいないタスク
(1)、タスク(2)、タスク(3)、タスク(4)についても、四
命令の実行が順次行われて順々にタスクが切り換ってゆ
き、タスク(5)についての四命令の実行が済んでタスク
(0)の第3スレッドが始まろうとしている。ここでI/Oプ
ロセッサにおける事象に変化が生じ、タスク(0)のCmp_A
nd_Wait命令において指定されていた事象が成立してい
たとする。このためタスク(0)の第3スレッドでは、ス
テップS82において命令解読制御部81により事象成
立が判定され、ステップS80に移行して、タスク管理
レジスタ13におけるタスクkのwait状態が解除され
る。このようにwait状態が解除されると、ステップS8
0からステップS87への移行が行われ、ステップS8
7において変数iと変数Totalとの比較が行われ、ステッ
プS7において変数iのインクリメントがなされて、ス
テップS4において読出先アドレス(adr+1)から命令が
読み出される。ステップS81において読み出された命
令がCmp_And_Wait命令であるかの判定が行われるが、Cm
p_And_Wait命令ではないのでステップS85へと移行す
る。ステップS85では、直前の命令において状態不成
立が判定されPC戻りが発生したかが判定される。Cmp_An
d_Wait命令により指定された事象が成立したので、ステ
ップS85がNoとなり、Cmp_And_Wait命令の次順命令は
二度の事象成立待ちを経てやっとステップS5において
実行される。ステップS5における次順命令の実行後、
ステップS5からステップS87への移行が行われ、変
数iと変数Totalとの大小比較が行われる。但し第2スレ
ッドでは変数Totalが2に設定されているので、タスク
(0)の第3スレッドは2回実行されただけで終わってし
まう。ステップS87への移行後、ステップS88にお
いては、PC戻りの発生の真偽が判定されるがこの場合は
Noであり、ステップS89においてタスク(k)の読出先
アドレス(adr+i-1)を読出先アドレス(adr)として格納し
てステップS10に移行する。このようにしてタスク
(0)の第3スレッドが済むと、Cmp_And_Wait命令を含ん
でいないタスク(1)、タスク(2)、タスク(3)、タスク(4)
についても、四命令の実行が順次行われて順々にタスク
が切り換ってゆく。タスク(5)についての四命令の実行
が済んで変数kがゼロクリアされ、ステップS90に移
行したとする。
Task that does not include Cmp_And_Wait instruction
As for (1), task (2), task (3), and task (4), the four instructions are executed sequentially, and the tasks are sequentially switched. Tasks that have been executed
The third thread at (0) is about to start. Here, a change occurs in an event in the I / O processor, and Cmp_A of task (0) is changed.
Assume that the event specified in the nd_Wait instruction has been established. Therefore, in the third thread of the task (0), the instruction decoding control unit 81 determines in step S82 that the event has been established, and the process proceeds to step S80 where the wait state of the task k in the task management register 13 is released. When the wait state is released in this way, step S8
0, the process proceeds to step S87, and step S8 is performed.
In step 7, the variable i is compared with the variable Total. In step S7, the variable i is incremented. In step S4, the instruction is read from the read destination address (adr + 1). It is determined whether the instruction read in step S81 is a Cmp_And_Wait instruction.
Since the instruction is not the p_And_Wait instruction, the flow shifts to step S85. In step S85, it is determined whether the state has not been established in the immediately preceding instruction and a return to the PC has occurred. Cmp_An
Since the event specified by the d_Wait instruction has been established, step S85 is No, and the next order instruction of the Cmp_And_Wait instruction is executed in step S5 only after waiting for the establishment of the event twice. After execution of the next instruction in step S5,
The process proceeds from step S5 to step S87, and the magnitude comparison between the variable i and the variable Total is performed. However, since the variable Total is set to 2 in the second thread, the task
The third thread of (0) ends only after being executed twice. After shifting to step S87, in step S88, it is determined whether the return of the PC is true or false.
No, in step S89, the read destination address (adr + i-1) of the task (k) is stored as the read destination address (adr), and the flow advances to step S10. Tasks in this way
When the third thread of (0) is finished, tasks (1), (2), (3), and (4) that do not include the Cmp_And_Wait instruction
Also, the execution of the four instructions is performed sequentially, and the tasks are sequentially switched. Assume that the execution of the four instructions for the task (5) is completed, the variable k is cleared to zero, and the process proceeds to step S90.

【0185】ステップS90では、タスク管理レジスタ
13におけるタスク(k)に相当するビットを参照して、
タスク(k)がwait状態にあるかを判定する。この場合タ
スク(0)のwait状態は解除されたので、ステップS92
において変数Totalに4を設定してステップS2に移行
する。このように変数Totalが4に戻ったので、タスク
(0)の以降のスレッドは通常通りの四命令ずつ行われる
ことになる。
In step S 90, by referring to the bit corresponding to task (k) in task management register 13,
It is determined whether the task (k) is in a wait state. In this case, since the wait state of task (0) has been released, step S92
In step 4, the variable Total is set to 4, and the process proceeds to step S2. Since the variable Total returned to 4 in this way, the task
Threads after (0) are executed by four instructions as usual.

【0186】(第4実施形態における全体制御の説明)
図48は、第4実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。図48のフロ−チャ
−トにおけるステップS1〜ステップS9の手順は図4
6のフロ−チャ−トと同様である。図48において新規
なのは、30番台の参照符号が付与されたステップS3
0、ステップS31、ステップS32である。ステップ
S30は、緊急状態遷移許可信号がLow値であるか否か
を判定し、High値ならばステップS31に移行してステ
ップS31において緊急タスクを次に実行すべきタスク
として決定する。
(Explanation of Overall Control in Fourth Embodiment)
FIG. 48 is a flowchart showing the overall control of the I / O processor in the fourth embodiment. The procedure of steps S1 to S9 in the flowchart of FIG.
6 is the same as the flowchart. What is new in FIG. 48 is the step S3 to which reference numerals in the thirties are assigned.
0, step S31, and step S32. A step S30 decides whether or not the emergency state transition permission signal has a low value. If the emergency state transition permission signal has a high value, the process shifts to the step S31 to determine the emergency task as a task to be executed next in the step S31.

【0187】逆に緊急状態遷移許可信号がLow値なら
ば、ステップS32に移行してラウンド値taskneに基づ
いて、通常タスクの中から次に実行すべきタスクをプラ
イオリティエンコーダ80に決定させる。図53は、第
4実施形態におけるスレッド間の遷移を示す図である。
本図は、通常状態が始まりにおいて、ステップS31の
処理がスキップされて、図52のタスク(0)の第1スレ
ッド、タスク(2)の第1スレッド、タスク(3)の第1スレ
ッド、タスク(4)の第1スレッド、タスク(5)の第1スレ
ッドが順次行われる。
On the other hand, if the emergency state transition permission signal is low, the flow goes to step S32 to cause the priority encoder 80 to determine the next task to be executed from the normal tasks based on the round value taskne. FIG. 53 is a diagram showing transition between threads in the fourth embodiment.
In this drawing, at the beginning of the normal state, the processing of step S31 is skipped, and the first thread of task (0), the first thread of task (2), the first thread of task (3), and the task of FIG. The first thread of (4) and the first thread of task (5) are sequentially performed.

【0188】taskneの実行が一巡したところで、緊急状
態遷移許可信号のHigh期間が発生したとすると、ステッ
プS2〜ステップS9において一つのタスクが実行され
た後、ステップS30からステップS31への分岐が行
われる。分岐後、cstate記憶部85に示されたcstateの
High値、Low値に応じて緊急タスクの実行を行う。 (第5実施形態における全体制御)図49は第5実施形
態におけるマルチタスク手順のフロ−チャ−トである。
本図が第1実施形態におけるマルチタスク手順のフロ−
チャ−トと異なるのは、ステップS4とステップS6と
の間にステップS41〜ステップS44、S46、S4
7が挿入されている点である。
Assuming that a high period of the emergency state transition permission signal occurs when the execution of taskne has completed one cycle, after one task is executed in steps S2 to S9, the branch from step S30 to step S31 is executed. Will be After the branch, the cstate shown in the cstate storage unit 85
The emergency task is executed according to the High value and Low value. (Overall Control in Fifth Embodiment) FIG. 49 is a flowchart of a multitask procedure in the fifth embodiment.
This figure shows the flow of the multitask procedure in the first embodiment.
The difference from the chart is that steps S41 to S44, S46, S4 are performed between steps S4 and S6.
7 is inserted.

【0189】ステップS41は、命令メモリ100から
読み出された命令がsleep命令であるかを判定する。も
しsleep命令であれば、ステップS42へと移行する。
ステップS42では、タスク管理レジスタ13はタスク
(k)に対応するビットを0に反転する。その後ステップ
S43において変数iを1インクリメントして、ステップ
S44においてタスク(k)の読出先アドレス(adr+i-1)を
読出先アドレス(adr)として格納した後にステップS4
5に移行する。移行後、ステップS45では、インバー
タ94及びOR回路95はタスク管理レジスタ13におい
てsleep状態が指定されたビット抜きのラウンド値を生
成し、これをプライオリティエンコーダ74に出力し
て、次に実行すべきタスク(k)を決定させる。ここで留
意すべきは、先に述べたように『変数k』は命令メモリ
100に記憶されている6本のタスクのそれぞれを指示
するための変数であり、これの決定はタスクからタスク
への切り換えを意味する。
A step S41 decides whether or not the command read from the command memory 100 is a sleep command. If it is a sleep command, the process proceeds to step S42.
In step S42, the task management register 13 stores the task
Invert the bit corresponding to (k) to 0. Then, in step S43, the variable i is incremented by one, and in step S44, the read destination address (adr + i-1) of the task (k) is stored as the read destination address (adr).
Go to 5. After the shift, in step S45, the inverter 94 and the OR circuit 95 generate a round value without bits in which the sleep state is designated in the task management register 13, and outputs the round value to the priority encoder 74, and the task to be executed next (k) is determined. Here, it should be noted that, as described above, the “variable k” is a variable for indicating each of the six tasks stored in the instruction memory 100, and the determination thereof is made by the task to the task. Means switching.

【0190】ここでステップS45がステップS10と
異なるのは、ステップS10は変数iが4になった時点
で実行されるのに対して、ステップS45は変数iの値
に拘らず、sleep命令が解読された時点で実行される点
である。このようにステップS45が変数iの値に拘ら
ずsleep命令の解読後に実行されるため、タスクからタ
スクへの切り換えは、四回の命令を待たずして行われる
ことになる。
The difference between step S45 and step S10 is that step S10 is executed when the variable i becomes 4, whereas step S45 is executed when the sleep instruction is decoded regardless of the value of the variable i. It is the point that is executed at the time when it is done. As described above, since step S45 is executed after decoding the sleep instruction irrespective of the value of the variable i, switching from task to task is performed without waiting for four instructions.

【0191】ステップS46では、読出先アドレス(adr
+1)から読み出された命令がタスク管理レジスタ内の何
れかのビットに対するwake命令であるかを判定する。も
し異なれば、ステップS5において読み出された命令を
解読して実行するがもしそうであれば、ステップS47
において当該wake命令において指定されたjビットを操
作することにより、タスクjのsleep状態を解除してステ
ップS6に移行する。
In step S46, the read destination address (adr
It is determined whether the instruction read from (+1) is a wake instruction for any bit in the task management register. If not, the instruction read in step S5 is decoded and executed. If so, step S47 is executed.
Then, the sleep state of the task j is released by operating the j bit specified in the wake instruction, and the process proceeds to step S6.

【0192】図54は、第5実施形態におけるスレッド
間の遷移を示す図である。本図においてタスク(1)の第
1スレッドにおいて印を付しているのは、タスク(1)の
第1スレッドの第2命令がsleep_task命令であることを
示している。sleep_task命令の実行時には、第2実施形
態におけるCmp_And_Wait命令の実行時と同様、第2命令
の解読においてステップS41〜ステップS44が実行
されてタスク(1)がsleep状態に設定された後にタスク切
り換えがなされ、第3命令及び第4命令は事実上廃棄さ
れることになる。
FIG. 54 is a diagram showing transition between threads in the fifth embodiment. In the drawing, the mark in the first thread of the task (1) indicates that the second instruction of the first thread of the task (1) is a sleep_task instruction. During execution of the sleep_task instruction, similarly to the execution of the Cmp_And_Wait instruction in the second embodiment, in decoding the second instruction, steps S41 to S44 are executed, and task switching is performed after task (1) is set to the sleep state. , The third instruction and the fourth instruction will be effectively discarded.

【0193】第1実施形態に述べたようなタスク間の切
り換えが順次行われて、タスク(2)、タスク(3)、タスク
(4)、タスク(5)というようにタスクの巡回が行われてス
テップS45に移行したとする。ステップS45におい
てプライオリティエンコーダ74は、sleep状態にある
タスクのビットがマスクされたラウンド値tasknによ
り、次に実行すべきタスクを決定する。ここでタスク管
理レジスタ13においてタスク(1)に割り当てられてい
るビットは、タスク(1)−第1スレッドの第2命令にお
いてsleep状態に設定されている。そのためタスク(1)の
実行はスキップされ、タスク(2)の第2スレッドが続い
て実行される。
The switching between tasks as described in the first embodiment is sequentially performed, and tasks (2), (3), and
It is assumed that the task is circulated as in (4) and task (5), and the process proceeds to step S45. In step S45, the priority encoder 74 determines a task to be executed next based on the round value taskn in which bits of the task in the sleep state are masked. Here, the bit assigned to the task (1) in the task management register 13 is set to the sleep state in the task (1) -the second instruction of the first thread. Therefore, the execution of task (1) is skipped, and the second thread of task (2) is subsequently executed.

【0194】同様のタスク間の切り換えが順次行われ
て、タスク(2)、タスク(3)、タスク(4)、タスク(5)とい
うようにタスクの巡回が行われてステップS45に移行
したとする。この巡回において、タスク(5)の第2スレ
ッドの第3命令がタスク(1)のsleep状態解除を指定した
wake_task命令であり、命令メモリ100から読み出さ
れたものとする。wake_task命令が命令メモリ100か
ら読み出されると、ステップS46の判定においてYes
となり、ステップS47に移行する。ステップS47で
は、タスク管理レジスタ13のタスク(1)に割り当られ
たビットをオフにすることにより、タスク(1)のsleep状
態の解除を行う。解除後、残りの命令をも同様に実行し
て、第2スレッド分の処理を終える。
It is assumed that the switching between the similar tasks is sequentially performed, the tasks are circulated in the order of task (2), task (3), task (4), and task (5), and the process proceeds to step S45. I do. In this tour, the third instruction of the second thread of task (5) has specified the release of the sleep state of task (1).
The wake_task instruction is assumed to have been read from the instruction memory 100. When the wake_task instruction is read from the instruction memory 100, the determination in step S46 is Yes.
And the process moves to step S47. In step S47, the sleep state of the task (1) is released by turning off the bit assigned to the task (1) in the task management register 13. After the release, the remaining instructions are similarly executed, and the processing for the second thread is completed.

【0195】タスク(5)の終了後、タスクがタスク(0)へ
の切り換えられたものとする。またタスク(0)の第3ス
レッドが実行されて、ステップS45へと移行したとす
る。ステップS45では、タスク管理レジスタ13にお
いてタスク(1)に割り当られているビットがオフである
かの判定がなされる。タスク(5)の第2スレッドにおい
て、タスク(1)の割り当てビットがオンに設定されたの
は先に述べた通りであるから、ステップS45からステ
ップS2、S3への移行が行われて、タスク(1)の実行
が再開される。
After the task (5) ends, it is assumed that the task has been switched to the task (0). It is also assumed that the third thread of the task (0) is executed, and the process proceeds to step S45. In step S45, it is determined whether the bit assigned to the task (1) in the task management register 13 is off. In the second thread of the task (5), since the assignment bit of the task (1) is set to ON as described above, the process proceeds from step S45 to steps S2 and S3, and the task is executed. Execution of (1) is resumed.

【0196】[0196]

【発明の効果】以上のように本発明によれば、n個のタ
スク識別子について、そのタスクに割り当てられた数の
命令が実行されると次のタスク識別子を出力する実行タ
スク指示手段と、出力されたタスク識別子で特定される
タスク中の実行すべき命令を順次指定する命令指定手段
と、指定された命令を実行する実行手段とを備え、前記
実行タスク指示手段は、n個のタスクにおいて、通常の
タスクに割り当てられる命令数よりも少ない命令数が割
り当てられるタスクであるペナルティタスクの識別子を
保持するペナルティタスク保持部と、次のタスク識別子
を出力すると、前記ペナルティタスク保持部を参照し
て、当該タスク識別子で特定されるタスクがペナルティ
タスクか否かを判定し、ペナルティタスク以外ならば第
1の命令数を、ペナルティタスクならば第1の命令数よ
りも少ない第2の命令数を、当該タスクに割り当てられ
る命令数とする命令数選択手段とを含んでいるので、
プロセッサは割込信号の発行を待つのでは無く、オーデ
ィオアウトタスク、ビデオアウトタスクを含めたn個の
タスクを所定の命令数ずつ順次実行する。
As described above, according to the present invention, n
For the task identifier, the number of tasks assigned to the task
An execution module that outputs the next task identifier when an instruction is executed.
Specified by the task instructing means and the output task identifier
Instruction specifying means for sequentially specifying instructions to be executed in a task
And execution means for executing a specified instruction,
The execution task instructing means is a normal task in n tasks.
The number of instructions less than the number of instructions assigned to the task
The identifier of the penalty task to be assigned
The penalty task holding unit to be held and the next task identifier
Is output, the penalty task holding unit is referred to.
The task identified by the task identifier
Judge whether the task is a task or not.
1 instruction number is the first instruction number for a penalty task
Less second instructions are assigned to the task
The present processor does not wait for the issuance of an interrupt signal, but executes n tasks including the audio-out task and the video-out task by a predetermined number of instructions. Execute sequentially.

【0197】このように順次実行されるので、オーディ
オアウトタスク、ビデオアウトタスクの処理を完遂させ
るための動作クロック数の最適な下限値を、所定の周期
において実行せねばならない命令の最低消化数と、実行
周期と、タスク総数とから一義的に導出することがで
き、それらの最適な下限値から全タスクを動作させるた
めの動作サイクル数の最適な下限値を一義的に計算する
ことができる。
Since execution is sequentially performed in this manner, the optimum lower limit of the number of operation clocks for completing the processing of the audio out task and the video out task is determined by the minimum digest number of instructions that must be executed in a predetermined cycle. , And the total number of tasks, the optimum lower limit of the number of operation cycles for operating all tasks can be uniquely calculated from the optimum lower limit.

【0198】動作クロック数の最適な下限値が一義的に
計算されるため、動作クロック信号を一段と高いものに
定めずとも、オーディオアウトタスク、ビデオアウトタ
スクのリアルタイム性を保証でき、動作クロックが低速
なタイプが多い民生機器に搭載される場合でも、MPEGス
トリームを好適に復号することができる
Since the optimum lower limit value of the number of operation clocks is unambiguously calculated, the real-time property of the audio out task and the video out task can be guaranteed without setting the operation clock signal to a higher level, and the operation clock is low The MPEG stream can be suitably decoded even when it is installed in consumer devices with many different types .

【0199】[0199]

【0200】[0200]

【0201】[0201]

【0202】[0202]

【0203】[0203]

【0204】[0204]

【0205】[0205]

【0206】[0206]

【0207】[0207]

【0208】[0208]

【0209】[0209]

【0210】[0210]

【0211】[0211]

【図面の簡単な説明】[Brief description of the drawings]

【図1】AVデコーダの内部構成を示す図である。FIG. 1 is a diagram showing an internal configuration of an AV decoder.

【図2】MPEGストリームの階層構造と、AVデコーダの構
成要素間の動作タイミングとを示すタイミングチャート
である。
FIG. 2 is a timing chart showing a hierarchical structure of an MPEG stream and operation timings between components of an AV decoder.

【図3】第1実施形態におけるI/Oプロセッサの内部構
成を示す図である。
FIG. 3 is a diagram illustrating an internal configuration of an I / O processor according to the first embodiment.

【図4】第1実施形態における命令読出回路10の内部
構成を示す図である。
FIG. 4 is a diagram showing an internal configuration of an instruction reading circuit 10 according to the first embodiment.

【図5】命令読出回路10内のセレクタ25の出力論理
表を示す図である。
FIG. 5 is a diagram showing an output logic table of a selector 25 in the instruction reading circuit 10;

【図6】第1実施形態におけるタスク管理部15の内部
構成を示す図である。
FIG. 6 is a diagram illustrating an internal configuration of a task management unit 15 according to the first embodiment.

【図7】(a)タスク識別子taskidのビット構成を示す
図である。 (b)ラウンド値のビット構成を示す図である。
FIG. 7A is a diagram illustrating a bit configuration of a task identifier taskid. FIG. 4B is a diagram illustrating a bit configuration of a round value.

【図8】第1実施形態において命令メモリ100に記憶
されている非同期イベントタスクがどのように構成され
ているかを示す図である。
FIG. 8 is a diagram showing how the asynchronous event task stored in the instruction memory 100 is configured in the first embodiment.

【図9】レジスタをオペランドに指定した算術演算命令
の命令フォーマットを示す。
FIG. 9 shows an instruction format of an arithmetic operation instruction in which a register is specified as an operand.

【図10】レジスタにて読出先アドレス、書込先アドレ
スを指定したメモリロード命令/メモリストア命令の命
令フォーマットを示す。
FIG. 10 shows an instruction format of a memory load instruction / memory store instruction in which a read destination address and a write destination address are specified by a register.

【図11】8bit、11bitの即値の指定が可能な比較命令
/演算命令/分岐命令の命令フォーマットを示す。
FIG. 11 shows an instruction format of a comparison instruction / operation instruction / branch instruction capable of specifying an 8-bit or 11-bit immediate value.

【図12】第1実施形態において、IPC,IF1,IF2,DECPC
がどのように更新されるかを示すタイミングチャートで
ある。
FIG. 12 is a diagram showing a configuration of the first embodiment, where IPC, IF1, IF2, and DECPC are used.
7 is a timing chart showing how is updated.

【図13】タスク(0)からタスク(5)までにどのようにス
レッドを割り当てるかを示す図である。
FIG. 13 is a diagram showing how threads are allocated from task (0) to task (5).

【図14】第2実施形態において命令メモリ100に記
憶されている非同期イベントタスクがどのような命令に
て構成されているかを示す図である。
FIG. 14 is a diagram showing what kind of instruction the asynchronous event task stored in the instruction memory 100 is configured in the second embodiment.

【図15】wait_until_next命令の命令フォーマットの
一例を示す。
FIG. 15 shows an example of an instruction format of a wait_until_next instruction.

【図16】第2実施形態において、IPC,IF1,IF2,DECPC
がどのように更新されるかを示すタイミングチャートで
ある。
FIG. 16 shows a second embodiment in which IPC, IF1, IF2, DECPC
7 is a timing chart showing how is updated.

【図17】第2実施形態においてタスク(0)からタスク
(5)までにどのようにスレッドを割り当てるかを示す図
である。
FIG. 17 shows tasks from task (0) to task in the second embodiment.
FIG. 14 is a diagram showing how threads are allocated by (5).

【図18】第3実施形態におけるAVデコーダの内部構成
を示す図である。
FIG. 18 is a diagram illustrating an internal configuration of an AV decoder according to a third embodiment.

【図19】第3実施形態における命令読出回路10の内
部構成を示す図である。
FIG. 19 is a diagram showing an internal configuration of an instruction reading circuit 10 according to a third embodiment.

【図20】第3実施形態における命令読出回路10内の
セレクタ25の出力論理表を示す図である。
FIG. 20 is a diagram illustrating an output logic table of a selector 25 in the instruction reading circuit 10 according to the third embodiment.

【図21】第3実施形態におけるスレッドマネージャー
61の内部構成を示す図である。
FIG. 21 is a diagram illustrating an internal configuration of a thread manager 61 according to the third embodiment.

【図22】タスク管理レジスタ13においてwait状態管
理用に割り当られた6bitのビット構成を示す図である。
FIG. 22 is a diagram showing a bit configuration of 6 bits allocated for wait state management in the task management register 13;

【図23】第3実施形態における状態監視レジスタのビ
ット構成を示す図である。
FIG. 23 is a diagram illustrating a bit configuration of a state monitoring register according to the third embodiment.

【図24】(a)第3実施形態においてどのタスクにCm
p_and_Wait命令が含まれているかを示す図である。 (b)事象j0,j3,j4,j5が不成立である状態において、
図24(a)に示す各タスクにどのようにスレッドが割
り当てられるかを示す図である。 (c)事象j0のみが成立したフレームにおいて、図24
(a)に示す各タスクにどのようにスレッドが割り当て
られるかを示す図である。 (d)事象j0が成立したフレーム以降において、図24
(a)に示す各タスクにどのようにスレッドが割り当て
られるかを示す図である。
FIG. 24 (a) shows which task is Cm in the third embodiment.
FIG. 11 is a diagram showing whether a p_and_Wait instruction is included. (B) In the state where the events j0, j3, j4, j5 are not satisfied,
FIG. 25 is a diagram showing how threads are allocated to the respective tasks shown in FIG. (C) In the frame where only event j0 is established, FIG.
It is a figure which shows how a thread is allocated to each task shown to (a). (D) After the frame in which event j0 is established, FIG.
It is a figure which shows how a thread is allocated to each task shown to (a).

【図25】Cmp_and_Wait命令の命令フォーマットの一例
を示す。
FIG. 25 shows an example of an instruction format of a Cmp_and_Wait instruction.

【図26】Cmp_and_Wait命令解読時においてIPC,IF1,IF
2,DECPCがどのように更新され、タスク管理レジスタ1
3のビット及びカウンタの上限値がどう設定されるかを
示すタイミングチャートである。
FIG. 26: IPC, IF1, IF when decoding the Cmp_and_Wait instruction
2, How DECPC is updated, Task Management Register 1
6 is a timing chart showing how the upper limit value of the bit 3 and the counter is set.

【図27】Cmp_and_Wait命令が待っていた事象の未成立
時のフレームにおいて、IPC,IF1,IF2,DECPCがどのよう
に更新され、タスク管理レジスタ13のビット及びカウ
ンタの上限値がどう設定されるかを示すタイミングチャ
ートである。
FIG. 27 shows how IPC, IF1, IF2, and DECPC are updated in a frame when an event waiting for the Cmp_and_Wait instruction is not established, and how the upper limit value of the bit of the task management register 13 and the counter are set. FIG.

【図28】Cmp_and_Wait命令が待っていた事象の成立時
のフレームにおいて、IPC,IF1,IF2,DECPCがどのように
更新され、タスク管理レジスタ13のビット及びカウン
タの上限値がどう設定されるかを示すタイミングチャー
トである。
FIG. 28 illustrates how the IPC, IF1, IF2, and DECPC are updated and how the bits of the task management register 13 and the upper limit of the counter are set in a frame at the time of establishment of an event for which the Cmp_and_Wait instruction has been waiting. It is a timing chart shown.

【図29】事象の成立時以降のフレームにおいて、IPC,
IF1,IF2,DECPCがどのように更新され、タスク管理レジ
スタ13のビット及びカウンタの上限値がどう設定され
るかを示すタイミングチャートである。
FIG. 29: In the frame after the event is established, the IPC,
6 is a timing chart showing how IF1, IF2, and DECPC are updated, and how the upper bits of the bits and the counter of the task management register 13 are set.

【図30】第3実施形態におけるタスク管理部15の内
部構成を示す図である。
FIG. 30 is a diagram illustrating an internal configuration of a task management unit 15 according to the third embodiment.

【図31】第3実施形態におけるスケジューラ62の内
部構成を示す図である。
FIG. 31 is a diagram illustrating an internal configuration of a scheduler 62 according to the third embodiment.

【図32】セレクタ82が緊急タスクの識別子を出力す
る条件を示す図である。
FIG. 32 is a diagram showing conditions under which the selector outputs an identifier of an emergency task.

【図33】cstate記憶部85が記憶しているモードの状
態遷移図である。
33 is a state transition diagram of a mode stored in a cstate storage unit 85. FIG.

【図34】緊急状態遷移許可信号、タスク切替信号chg_
task_ex、cstateの遷移に応じて、どのタスク識別子が
出力されるかのタイミングを示すタイミングチャートで
ある。
FIG. 34 shows an emergency state transition permission signal and a task switching signal chg_.
9 is a timing chart showing the timing of which task identifier is output according to transition of task_ex and cstate.

【図35】(a)通常状態において各タスクにどのよう
にスレッドを割り当てるかを示す図である。 (b)緊急状態において各タスクにどのようにスレッド
を割り当てるかを示す図である。
FIG. 35 (a) is a diagram showing how threads are allocated to each task in a normal state. (B) is a diagram showing how threads are assigned to each task in an emergency state.

【図36】第4実施形態におけるタスク管理部15の内
部構成を示す図である。
FIG. 36 is a diagram illustrating an internal configuration of a task management unit 15 according to the fourth embodiment.

【図37】タスク管理レジスタ13においてsleep状態
に割り当られたビットの割り当てを示す図である。
FIG. 37 is a diagram showing assignment of bits assigned to a sleep state in the task management register 13;

【図38】第4実施形態におけるスケジューラ62の内
部構成を示す図である。
FIG. 38 is a diagram illustrating an internal configuration of a scheduler 62 according to the fourth embodiment.

【図39】第4実施形態において、sleep命令及びwake
命令が各タスクにどのように配置されているかを示す図
である。
FIG. 39 shows a sleep command and a wake command in the fourth embodiment.
FIG. 4 is a diagram showing how instructions are arranged in each task.

【図40】sleep命令及びwake命令の命令フォーマット
の一例を示す。
FIG. 40 shows an example of a command format of a sleep command and a wake command.

【図41】第4実施形態においてIPC,IF1,IF2,DECPCが
どのように更新されるかを示すタイミングチャートであ
る。
FIG. 41 is a timing chart showing how IPC, IF1, IF2, and DECPC are updated in the fourth embodiment.

【図42】(a)〜(d)第4実施形態において、各タ
スクにどのようにスレッドを割り当てるかを示す図であ
る。
FIGS. 42A to 42D are diagrams illustrating how threads are assigned to respective tasks in the fourth embodiment.

【図43】第5実施形態におけるタスク管理部15の内
部構成を示す図である。
FIG. 43 is a diagram illustrating an internal configuration of a task management unit 15 according to the fifth embodiment.

【図44】第5実施形態におけるスケジューラ62の内
部構成を示す図である。
FIG. 44 is a diagram illustrating an internal configuration of a scheduler 62 according to the fifth embodiment.

【図45】第1実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。
FIG. 45 is a flowchart showing overall control of the I / O processor in the first embodiment.

【図46】第2実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。
FIG. 46 is a flowchart showing overall control of the I / O processor in the second embodiment.

【図47】第3実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。
FIG. 47 is a flowchart showing overall control of the I / O processor in the third embodiment.

【図48】第4実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。
FIG. 48 is a flowchart showing overall control of the I / O processor in the fourth embodiment.

【図49】第5実施形態におけるI/Oプロセッサの全体
制御を示すフロ−チャ−トである。
FIG. 49 is a flowchart showing overall control of the I / O processor in the fifth embodiment.

【図50】第1実施形態におけるスレッドの割り当てが
どのように進行するかを示す図である。
FIG. 50 is a diagram showing how thread allocation progresses in the first embodiment.

【図51】第2実施形態におけるスレッドの割り当てが
どのように進行するかを示す図である。
FIG. 51 is a diagram showing how thread assignment progresses in the second embodiment.

【図52】第3実施形態におけるスレッドの割り当てが
どのように進行するかを示す図である。
FIG. 52 is a diagram showing how thread assignment progresses in the third embodiment.

【図53】第4実施形態におけるスレッドの割り当てが
どのように進行するかを示す図である。
FIG. 53 is a diagram showing how thread assignment progresses in the fourth embodiment.

【図54】第5実施形態におけるスレッドの割り当てが
どのように進行するかを示す図である。
FIG. 54 is a diagram showing how thread assignment progresses in the fifth embodiment.

【図55】第1実施形態におけるスレッド割り当てにて
ビデオアウトタスク、オーディオアウトタスクを実行す
る場合に動画ストリーム、オーディオストリームがどの
ように処理されるかを示すタイミングチャートである。
FIG. 55 is a timing chart showing how a moving image stream and an audio stream are processed when a video out task and an audio out task are executed by thread allocation in the first embodiment.

【図56】タスク別にサイクル数を可変にする場合のス
レッドマネージャーの構成図である。
FIG. 56 is a configuration diagram of a thread manager when the number of cycles is variable for each task.

【図57】割込信号にてオーディオアウトタスク、ビデ
オアウトタスクを実行する場合に動画ストリーム、オー
ディオストリームの処理を何時までに完遂せねばならな
いかを示すタイミングチャートである。
FIG. 57 is a timing chart showing by what time processing of a moving image stream and an audio stream must be completed when executing an audio-out task and a video-out task with an interrupt signal.

【符号の説明】[Explanation of symbols]

10 命令読出回路 11 命令解読制御部 12 レジスタセット 13 タスク管理レジスタ 14 演算実行部 15 タスク管理部 20 IF1+1保持部 21 increment回路 22 IF2保持部 23 DECPC保持部 24 タスク別PC格納部 25 4入力-1出力セレクタ 26 2入力-1出力セレクタ 52 カウンタ 53 コンバータ 54 比較器 55 セレクタ 61 スロットマネージャー 62 スケジューラ 71 タスクID保持部 72 タスクID保持部 73 タスクラウンド管理部 74 プライオリティエンコーダ 75 タスクラウンド管理部 76 コンバータ 77 緊急タスクマスク部 80 プライオリティエンコーダ 81 命令解読制御部 82 セレクタ 83 タスクID保持部 84 演算実行部 85 CSTATE記憶部 93 タスクスキップ管理回路 94 インバータ 100 命令メモリ 101 ストリーム入力部 102 バッファメモリ 104 Setup部 105 VLD部 106 IQ/IDCT部 107 動き補償部 108 ビデオ出力部 109 オーディオ出力部 110 BMバッファメモリコントローラ 111 RAMコントローラ 112 FIFOコントローラ 113 プロセッサ 115 ホストI/O部 121 バッファメモリバス 122 SD-RAMバス 123 ビットストリームバス 124 コントロールバス DESCRIPTION OF SYMBOLS 10 Instruction readout circuit 11 Instruction decoding control part 12 Register set 13 Task management register 14 Operation execution part 15 Task management part 20 IF1 + 1 holding part 21 increment circuit 22 IF2 holding part 23 DECPC holding part 24 PC storage part for each task 25 4 inputs -1 output selector 26 2-input-1 output selector 52 counter 53 converter 54 comparator 55 selector 61 slot manager 62 scheduler 71 task ID holding unit 72 task ID holding unit 73 task round management unit 74 priority encoder 75 task round management unit 76 converter 77 Emergency task mask unit 80 Priority encoder 81 Instruction decoding control unit 82 Selector 83 Task ID holding unit 84 Operation execution unit 85 CSTATE storage unit 93 Task skip management circuit 94 Inverter 100 Instruction memory 101 Stream input unit 102 Buffer memory 104 Setup unit 105 VLD unit 106 IQ / IDCT unit 107 Motion compensation unit 108 Video output unit 109 Audio output unit 110 BM buffer memory controller 111 RAM controller 112 FIFO controller 113 Processor 115 Host I / O unit 121 Buffer Memory bus 122 SD-RAM bus 123 Bit stream bus 124 Control bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平井 誠 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (72)発明者 清原 督三 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 平1−99132(JP,A) 特開 平6−202887(JP,A) 特開 平8−249194(JP,A) 特開 平6−187170(JP,A) 特開 平1−154237(JP,A) 特開 平7−110773(JP,A) 藤井茂樹,外4名,メディア処理用組 み込みOS,情報処理学会研究報告,日 本,社団法人情報処理学会,1998年2月 26日,第98巻,第15号(98−OS− 77),p.61−66 菊田幸男,他1名,ディジタル衛星放 送 PerfecTV!用受信機 CS R−P1,東芝レビュー,日本,株式会 社東芝,1997年2月1日,第52巻,第2 号,p.63−66 (58)調査した分野(Int.Cl.7,DB名) G06F 9/46 - 9/54 G06F 9/30 - 9/355 G06F 9/40 - 9/42 H04N 7/12 H04N 7/24 - 7/68 ──────────────────────────────────────────────────の Continued on the front page (72) Inventor Makoto Hirai 1006 Kadoma Kadoma, Osaka Prefecture Inside Matsushita Electric Industrial Co., Ltd. In-house (56) References JP-A-1-99132 (JP, A) JP-A-6-202887 (JP, A) JP-A-8-249194 (JP, A) JP-A-6-187170 (JP, A) JP-A-1-154237 (JP, A) JP-A-7-110773 (JP, A) Shigeki Fujii, 4 others, Embedded OS for media processing, IPSJ Research Report, Japan, Information Processing Society of Japan, February 26, 1998, Vol. 98, No. 15, (98-OS-77), p. 61-66 Yukio Kikuta and 1 other, Digital Satellite Broadcasting Perfectec! Receiver CSRR-P1, Toshiba Review, Japan, Toshiba Corporation, February 1, 1997, Vol. 52, No. 2, p. 63-66 (58) Field surveyed (Int.Cl. 7 , DB name) G06F 9/46-9/54 G06F 9/30-9/355 G06F 9/40-9/42 H04N 7/12 H04N 7 / 24-7/68

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 n個のタスクを実行対象タスクとしたプ
ロセッサであって、 n個のタスク識別子について、そのタスクに割り当てら
れた数の命令が実行されると次のタスク識別子を出力す
る実行タスク指示手段と、 出力されたタスク識別子で特定されるタスク中の実行す
べき命令を順次指定する命令指定手段と、 指定された命令を実行する実行手段とを備え、 前記実行タスク指示手段は、 n個のタスクにおいて、通常のタスクに割り当てられる
命令数よりも少ない命令数が割り当てられるタスクであ
るペナルティタスクの識別子を保持するペナルティタス
ク保持部と、 次のタスク識別子を出力すると、前記ペナルティタスク
保持部を参照して、当該タスク識別子で特定されるタス
クがペナルティタスクか否かを判定し、ペナルティタス
ク以外ならば第1の命令数を、ペナルティタスクならば
第1の命令数よりも少ない第2の命令数を、当該タスク
に割り当てられる命令数とする命令数選択手段とを含む
ことを特徴とするプロセッサ。
1. An execution task which outputs n task identifiers when the number of instructions assigned to the task is executed for n task identifiers, wherein the processor outputs n task identifiers. Instruction means; instruction designation means for sequentially designating instructions to be executed in the task specified by the output task identifier; and execution means for executing the designated instructions. In the number of tasks, a penalty task holding unit that holds an identifier of a penalty task that is a task to which the number of instructions less than the number of instructions assigned to a normal task is assigned; and when the next task identifier is output, the penalty task holding unit To determine whether the task identified by the task identifier is a penalty task, And a second instruction number which is smaller than the first instruction number in the case of a penalty task. .
【請求項2】 n個のタスクを実行対象タスクとしたプ
ロセッサであって、 n個のタスク識別子について、そのタスクに割り当てら
れた数の命令が実行されると次のタスク識別子を出力す
る実行タスク指示手段と、 出力されたタスク識別子で特定されるタスク中の実行す
べき命令を順次指定する命令指定手段と、 指定された命令を実行する実行手段とを備え、 前記実行タスク指示手段は、 発行された命令数をカウントするカウンタと、 カウンタのカウント値を実行中タスクに割り当てられた
命令数と比較し、一致するとタスク切替信号を出力する
と共に前記カウンタのリセットを行う比較器と、 タスク切替信号が発される度に次順位のタスク識別子を
生成して出力するタスク識別子出力部と、 第1の命令数と、第1の命令数より少ない第2の命令数
を保持する命令数保持部と、 n個のタスクにおいて第2の命令数を割り当てるべきタ
スクであるペナルティタスクの識別子を保持するペナル
ティタスク保持部と、 タスク識別子出力部がタスク識別子を出力すると、当該
タスク識別子がペナルティタスクの識別子であるかを判
定する判定部と、 タスク識別子がペナルティタスクを示すと判定されれ
ば、命令数保持部が保持する第2の命令数を、ペナルテ
ィタスクを示すと判定されなければ、第1の命令数を当
該タスクに割り当てれられた命令数として、比較器に出
力する命令数選択部とを備えることを特徴とするプロセ
ッサ。
2. A processor having n tasks as execution target tasks, wherein, for n task identifiers, an execution task that outputs a next task identifier when the number of instructions assigned to the task is executed. Instruction means; instruction designating means for sequentially designating an instruction to be executed in the task specified by the output task identifier; and execution means for executing the designated instruction. A counter for counting the number of instructions executed, a comparator for comparing the count value of the counter with the number of instructions assigned to the task being executed, outputting a task switching signal when the values match, and resetting the counter; and a task switching signal. A task identifier output unit for generating and outputting a task identifier of the next order each time a is issued, a first instruction number, and a second instruction number less than the first instruction number An instruction number holding unit that holds the number of instructions, a penalty task holding unit that holds an identifier of a penalty task that is a task to which the second instruction number is to be assigned in n tasks, and a task identifier output unit that outputs a task identifier. A determining unit that determines whether the task identifier is an identifier of a penalty task; and, if it is determined that the task identifier indicates a penalty task, indicates a second instruction number held by the instruction number holding unit to indicate the penalty task. And determining that the first number of instructions is the number of instructions assigned to the task, and outputting the first number of instructions to the comparator.
【請求項3】 何れかのタスクには、事象成立の真偽条
件の指定を含む事象監視命令が含まれており、 前記実行手段は前記命令指定手段によって指定された命
令を解読する解読手段と、 解読手段による解読結果が事象監視命令であれば、事象
監視命令において指定された事象成立の真偽を確認する
旨の演算を実行する演算手段とを備え、 前記ペナルティタスク保持部は、 演算手段による演算結果が事象不成立を示すものなら
ば、事象監視命令を含んでいたタスクのタスク識別子を
ペナルティタスクの識別子として保持することを特徴と
する請求項1又は2記載のプロセッサ。
3. Any of the tasks includes an event monitoring instruction including designation of a true / false condition of establishment of an event, wherein the execution unit includes a decoding unit that decodes the instruction designated by the instruction designation unit. If the result of the decoding by the decoding means is an event monitoring instruction, the arithmetic means for executing an operation to confirm whether the event specified in the event monitoring instruction is true or false is provided. 3. The processor according to claim 1, wherein if the calculation result indicates that the event is not established, the task identifier of the task including the event monitoring instruction is held as a penalty task identifier.
【請求項4】 前記プロセッサは、その内部にバッファ
と、メモリとを有する情報処理システムに備えられ、 前記プロセッサは、内部バッファ及びメモリにおける状
態を示す状態レジスタを複数有し、 前記事象監視命令は、複数の状態レジスタの何れかにつ
いての指定と、即値指定とを有し、 前記演算手段は、 解読手段による解読結果が事象監視命令であれば、事象
監視命令において指定された状態監視レジスタの保持値
と、当該命令において指定された即値とを用いた演算を
行うことを特徴とする請求項3記載のプロセッサ。
4. The processor according to claim 1, wherein the processor is provided in an information processing system having a buffer and a memory therein, wherein the processor has a plurality of state registers indicating states in the internal buffer and the memory, Has a designation for any one of a plurality of status registers and an immediate designation, and when the result of decoding by the decoding means is an event monitoring instruction, the arithmetic means 4. The processor according to claim 3, wherein an operation is performed using the held value and an immediate value specified in the instruction.
JP5207398A 1997-03-04 1998-03-04 Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously Expired - Lifetime JP3356677B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5207398A JP3356677B2 (en) 1997-03-04 1998-03-04 Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP9-49370 1997-03-04
JP4937097 1997-03-04
JP5207398A JP3356677B2 (en) 1997-03-04 1998-03-04 Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2001182649A Division JP2002091782A (en) 1997-03-04 2001-06-15 Processor capable of efficiently executing asynchronous event tasks even when there are a large number of tasks to be asynchronously executed

Publications (2)

Publication Number Publication Date
JPH10307731A JPH10307731A (en) 1998-11-17
JP3356677B2 true JP3356677B2 (en) 2002-12-16

Family

ID=26389754

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5207398A Expired - Lifetime JP3356677B2 (en) 1997-03-04 1998-03-04 Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously

Country Status (1)

Country Link
JP (1) JP3356677B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4538161B2 (en) * 2000-03-08 2010-09-08 パナソニック株式会社 Video / audio processor
JP3813930B2 (en) 2002-01-09 2006-08-23 松下電器産業株式会社 Processor and program execution method
JP4750350B2 (en) 2003-03-13 2011-08-17 パナソニック株式会社 Task switching device, method and program
JP4982347B2 (en) 2007-12-11 2012-07-25 株式会社東芝 Program, method and image processing apparatus for detecting update of image information
JP5010492B2 (en) 2008-01-31 2012-08-29 株式会社東芝 Communication apparatus, method and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
菊田幸男,他1名,ディジタル衛星放送 PerfecTV!用受信機 CSR−P1,東芝レビュー,日本,株式会社東芝,1997年2月1日,第52巻,第2号,p.63−66
藤井茂樹,外4名,メディア処理用組み込みOS,情報処理学会研究報告,日本,社団法人情報処理学会,1998年2月26日,第98巻,第15号(98−OS−77),p.61−66

Also Published As

Publication number Publication date
JPH10307731A (en) 1998-11-17

Similar Documents

Publication Publication Date Title
KR100450228B1 (en) Processor capables of efficiently executing many asynchronous event tasks
KR100232961B1 (en) Apparatus and method for managing a frame buffer for mpeg video decoding in a pc environment
US6310921B1 (en) Media processing apparatus which operates at high efficiency
JP4519082B2 (en) Information processing method, moving image thumbnail display method, decoding device, and information processing device
US20030133506A1 (en) Image processor controlling b-picture memory
JP2003204556A (en) Moving picture decoding processor for multimedia signal processing
AU6401594A (en) Video peripheral for a computer
US6006020A (en) Video peripheral circuitry exercising bus master control over a bus of a host computer
JP3356677B2 (en) Processor that can execute asynchronous event tasks efficiently even if there are many tasks to be executed asynchronously
JP4526145B2 (en) MPEG video decoder and MPEG video decoding method
US7751687B2 (en) Data processing apparatus, data processing method, data processing system, program, and storage medium
US20090158379A1 (en) Low-Latency Multichannel Video Port Aggregator
JP4879381B2 (en) Image decoding method and image decoding apparatus
JP2000106677A (en) Compression stream decoder and compression stream decoding method
JP3589565B2 (en) Video and audio processing device
JP2002091782A (en) Processor capable of efficiently executing asynchronous event tasks even when there are a large number of tasks to be asynchronously executed
JP3410669B2 (en) Video and audio processing device
JP2000235501A (en) Task execution device
US20060088278A1 (en) Data processing apparatus, reproduction apparatus, data processing system, reproduction method, program, and storage medium
JPH08314793A (en) Memory access control method and semiconductor integrated circuit and image decoding device using this method
JP2004326228A (en) Parallel arithmetic processor
JP3327900B2 (en) Data processing device
JPH08265700A (en) Image signal decoding method and device
JP2004538562A (en) Method and system for processing media files
JP3295204B2 (en) Video playback method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081004

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091004

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091004

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101004

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111004

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121004

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131004

Year of fee payment: 11

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S131 Request for trust registration of transfer of right

Free format text: JAPANESE INTERMEDIATE CODE: R313135

SZ02 Written request for trust registration

Free format text: JAPANESE INTERMEDIATE CODE: R313Z02

SZ02 Written request for trust registration

Free format text: JAPANESE INTERMEDIATE CODE: R313Z02

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term