JP4641391B2 - Direct memory access device, control method therefor, and data processing device - Google Patents

Direct memory access device, control method therefor, and data processing device Download PDF

Info

Publication number
JP4641391B2
JP4641391B2 JP2004170294A JP2004170294A JP4641391B2 JP 4641391 B2 JP4641391 B2 JP 4641391B2 JP 2004170294 A JP2004170294 A JP 2004170294A JP 2004170294 A JP2004170294 A JP 2004170294A JP 4641391 B2 JP4641391 B2 JP 4641391B2
Authority
JP
Japan
Prior art keywords
instruction
data transfer
execution
program counter
memory access
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 - Fee Related
Application number
JP2004170294A
Other languages
Japanese (ja)
Other versions
JP2005352594A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004170294A priority Critical patent/JP4641391B2/en
Publication of JP2005352594A publication Critical patent/JP2005352594A/en
Application granted granted Critical
Publication of JP4641391B2 publication Critical patent/JP4641391B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Description

本発明は、様々なアクセスパターンによる複雑なデータ転送を同時並行的且つ自立的に実行可能とするダイレクトメモリアクセス装置及びその制御方法、データ処理装置に関する。 The present invention relates to a direct memory access device, a control method therefor, and a data processing device capable of simultaneously and independently executing complicated data transfer using various access patterns.

従来、デバイス(データを生成しメモリに書き込むデバイス、またはメモリからデータを読み出しデータ処理を行うデバイス)とメモリとの間のデータ転送を、CPUに負荷をかけることなく実現するために、様々なダイレクトメモリアクセス(Direct Memory Access:以下DMAと略称する)装置が提案されている(例えば、特許文献1参照)。   Conventionally, in order to realize data transfer between a device (a device that generates data and writes data in a memory, or a device that reads data from the memory and performs data processing) and the memory without applying a load on the CPU, various direct operations are performed. A memory access (Direct Memory Access: hereinafter abbreviated as DMA) device has been proposed (see, for example, Patent Document 1).

代表的なDMA装置においては、まず、データ転送先またはデータ転送元のメモリアドレス、データ転送方向(デバイスからメモリへのデータ転送方向、メモリからデバイスへのデータ転送方向)、転送するデータのサイズ等を予めCPUにより設定する。次に、データ転送動作を起動すると、設定されたメモリアドレスを順次更新しながら設定されたサイズのデータを転送し終わるまで、CPUの介在なしにデバイスとメモリとの間のデータ転送を行う。データ転送が完了すると、DMA装置がCPUに割り込みを通知することで、CPUはデータ転送完了を認識し、転送されたデータの処理を行う。更に、上記同様に、引き続き別のデータ転送に関わる設定と起動を行う。
特開平5−67033号公報
In a typical DMA device, first, the memory address of the data transfer destination or data transfer source, the data transfer direction (the data transfer direction from the device to the memory, the data transfer direction from the memory to the device), the size of the data to be transferred, etc. Is previously set by the CPU. Next, when the data transfer operation is started, data transfer between the device and the memory is performed without intervention of the CPU until the transfer of the data of the set size is completed while sequentially updating the set memory addresses. When the data transfer is completed, the DMA device notifies the CPU of an interrupt, so that the CPU recognizes the completion of the data transfer and processes the transferred data. Further, similarly to the above, setting and starting related to another data transfer are continuously performed.
JP-A-5-67033

しかしながら、従来のDMA装置は、固定的なアクセスパターンによってデータ転送を行っている。そのため、様々なアクセスパターンによる複雑なデータ転送を実行するためには、アクセスパターン毎にCPU(ソフトウエア)が介在して設定を切り替える必要があり、CPUの負荷が増大するという問題点があった。その解消策として、予め様々なアクセスパターンを備えたDMA装置が提案されているが、アクセスパターンを数多く備えるほど回路規模が増大してしまうという問題点があった。   However, the conventional DMA device performs data transfer according to a fixed access pattern. For this reason, in order to execute complex data transfer using various access patterns, it is necessary to change the setting for each access pattern with a CPU (software), which increases the load on the CPU. . As a solution to this problem, DMA devices having various access patterns have been proposed in advance, but there is a problem that the circuit scale increases as the number of access patterns increases.

また、DMA装置のハードウエアの開発後に新たなアクセスパターンに対応する必要が生じた場合には、開発したハードウエアでは固定的なアクセスパターンにしか対応できないため、ハードウエアを作り直す必要があるという問題点があった。   In addition, when it becomes necessary to cope with a new access pattern after the development of the hardware of the DMA device, the developed hardware can only deal with a fixed access pattern, so that it is necessary to recreate the hardware. There was a point.

更に、複数のデバイスが同時にデータ転送要求を発行し、各データ転送要求に応じたそれぞれ異なるメモリアドレスへのデータ転送を行う必要がある場合には、デバイスの数に対応した分のDMA装置を用意する必要があるため、回路規模が増大するという問題点があった。   In addition, if multiple devices issue data transfer requests at the same time and need to transfer data to different memory addresses according to each data transfer request, prepare DMA devices for the number of devices. Therefore, there is a problem that the circuit scale increases.

本発明の目的は、複雑なデータ転送を回路規模を増大することなく実現することを可能とし、データ転送命令を受け付けた場合にデータ転送命令に関わるデバイスからのデータ転送要求が無ければ他の命令を処理するように制御することで、効率良く処理することを可能としたダイレクトメモリアクセス装置及びその制御方法、データ処理装置を提供することにある。 An object of the present invention is to enable complex data transfer without increasing the circuit scale, and when a data transfer command is received, if there is no data transfer request from a device related to the data transfer command, other commands It is an object of the present invention to provide a direct memory access device, a control method therefor, and a data processing device that are capable of processing efficiently by controlling so as to process.

上述の目的を達成するために、本発明のダイレクトメモリアクセス装置は、命令を格納しているアドレスを保持する複数のプログラムカウンタと、前記複数のプログラムカウンタの1つを選択する選択手段と、データ転送命令を含む複数の命令を格納し、前記選択手段により選択されたプログラムカウンタのアドレスに格納している命令を出力する命令格納手段と、前記命令格納手段から出力された命令に従い、デバイスとメモリとの間のデータ転送を実行する実行手段と、前記命令格納手段により出力されたデータ転送命令によるデータ転送の対象となるデバイスからデータ転送要求が出力されていない場合に、当該データ転送要求のないデバイスのデータ転送命令に対応するプログラムカウンタの前記選択手段による選択を抑制することで前記実行手段による当該データ転送命令の実行を保留し、当該データ転送命令を保持しているプログラムカウンタ以外のプログラムカウンタが保持するアドレスにより示される命令を前記実行手段に実行させる実行制御手段とを備えることを特徴とする。 In order to achieve the above object, a direct memory access device according to the present invention includes a plurality of program counters that hold addresses storing instructions, a selection unit that selects one of the plurality of program counters , and data A plurality of instructions including a transfer instruction, an instruction storage means for outputting an instruction stored at an address of a program counter selected by the selection means, a device and a memory according to the instruction output from the instruction storage means When no data transfer request is output from an execution unit that executes data transfer between the data transfer device and a device that is a target of data transfer by the data transfer command output from the command storage unit, there is no data transfer request. Suppressing selection by the selection means of a program counter corresponding to a device data transfer instruction Suspends execution of the data transfer instruction by said execution means, and a execution control means for executing on said execution means an instruction program counter other than the program counter that holds the data transfer instruction is indicated by the address holding It is characterized by that.

本発明によれば、データ転送命令を含む複数の命令を格納する命令格納手段から出力された命令に従い、デバイスとメモリとの間のデータ転送を実行する。ここで、データ転送命令によるデータ転送の対象となるデバイスからデータ転送要求が出力されていない場合に、当該データ転送要求のないデバイスのデータ転送命令に対応するプログラムカウンタの選択を抑制することで当該データ転送命令の実行を保留し、当該データ転送命令を保持しているプログラムカウンタ以外のプログラムカウンタが保持するアドレスにより示される命令を実行手段に実行させる。これにより、複数のデータ転送をそれぞれのデータ転送要求に応じて並列的に実行することが可能となる。従って、従来のように、複雑なデータ転送を実行する際にCPUが介在して設定を切り替えることが不要となり、複雑なデータ転送(ダイレクトメモリアクセス転送)を回路規模を増大することなく実現することが可能となる。その結果、複数の転送命令に関するタスクの切り替えにCPUを介在させることなく柔軟に切り替えることが可能となる。また、データ転送命令を受け付けた場合に、このデータ転送命令に関わるデバイスからのデータ転送要求が無ければ、データ転送要求が無いデータ転送命令の実行を保留し、他の命令を処理するように制御することで、効率良く処理することができる。 According to the present invention, data transfer between a device and a memory is executed in accordance with an instruction output from an instruction storage unit that stores a plurality of instructions including a data transfer instruction. Here, when a data transfer request is not output from a device that is a target of data transfer by the data transfer instruction, the selection of the program counter corresponding to the data transfer instruction of the device that does not have the data transfer request is suppressed. The execution of the data transfer instruction is suspended, and the execution means is caused to execute the instruction indicated by the address held by the program counter other than the program counter holding the data transfer instruction. Thereby, a plurality of data transfers can be executed in parallel according to each data transfer request. Therefore, unlike the conventional case, it is not necessary to switch the setting through the CPU when executing complicated data transfer, and complex data transfer (direct memory access transfer) can be realized without increasing the circuit scale. Is possible. As a result, it is possible to flexibly switch tasks related to a plurality of transfer instructions without interposing a CPU. Also, when a data transfer instruction is received, if there is no data transfer request from the device related to the data transfer instruction, execution of the data transfer instruction without the data transfer request is suspended and other instructions are processed. By doing so, it is possible to process efficiently.

以下、本発明の実施の形態を図面に基づき説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[第1の実施の形態]
図1は、本発明の第1の実施の形態に係るデータ転送装置としてのDMA装置の電気的な構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing an electrical configuration of a DMA device as a data transfer device according to the first embodiment of the present invention.

図1において、DMA装置は、プログラムカウンタ(PC)3−1、3−2、3−3、プログラムカウンタ選択部4、命令メモリ5、命令デコード部6、データ転送実行部7、実行抑制・選択許可信号生成部8、プログラムカウンタ選択信号生成部9、プログラムカウンタ更新部10を備えている。   In FIG. 1, the DMA device includes a program counter (PC) 3-1, 3-2, 3-3, a program counter selection unit 4, an instruction memory 5, an instruction decoding unit 6, a data transfer execution unit 7, an execution suppression / selection. A permission signal generation unit 8, a program counter selection signal generation unit 9, and a program counter update unit 10 are provided.

DMA装置には、データ転送要求を行うDMAデバイス1−1、1−2と、CPUバス14に接続され、データを格納すると共にデータ転送元またはデータ転送先となるメモリ2と、CPUバス14に接続され、DMA装置の動作を制御するCPU11とが接続されている。DMA装置、DMAデバイス1−1、1−2、メモリ2、CPU11が、データ処理装置を構成している。   The DMA device is connected to the DMA devices 1-1 and 1-2 for making a data transfer request and the CPU bus 14, and stores data and the memory 2 as the data transfer source or the data transfer destination, and the CPU bus 14. A CPU 11 is connected to control the operation of the DMA device. The DMA device, the DMA devices 1-1 and 1-2, the memory 2, and the CPU 11 constitute a data processing device.

尚、図1の各ブロック間を結合する線の表記は、データ系の接続を白抜きの太い実線で図示し、制御系の接続を細い実線で図示している。ただし、全ての接続が図示されているわけではなく、本実施の形態の説明に必要な代表的な接続のみを図示している。   In addition, in the notation of the lines connecting the blocks in FIG. 1, the data system connection is illustrated by a thick white solid line, and the control system connection is illustrated by a thin solid line. However, not all the connections are illustrated, and only representative connections necessary for the description of the present embodiment are shown.

プログラムカウンタ3−1、3−2、3−3は、命令メモリ5における実行中のデータ転送命令のアドレスを示すものである。プログラムカウンタ選択部4は、プログラムカウンタ3−1、3−2、3−3のうち何れかのプログラムカウンタに格納された値を、プログラムカウンタ選択信号生成部9から出力されるプログラムカウンタ選択信号に基づいて命令メモリ5のアドレスとして選択する。命令メモリ5は、データ転送命令を格納する。命令デコード部6は、命令メモリ5のデータ出力であるデータ転送命令を解読し、データ転送方向、データ転送先、データ転送元等を判定する。   Program counters 3-1, 3-2 and 3-3 indicate addresses of data transfer instructions being executed in the instruction memory 5. The program counter selection unit 4 converts the value stored in one of the program counters 3-1, 3-2 and 3-3 into the program counter selection signal output from the program counter selection signal generation unit 9. Based on this, the address of the instruction memory 5 is selected. The instruction memory 5 stores a data transfer instruction. The instruction decoding unit 6 decodes a data transfer instruction that is a data output of the instruction memory 5 and determines a data transfer direction, a data transfer destination, a data transfer source, and the like.

データ転送実行部7は、命令デコード部6により解読されたデータ転送命令に従って、2つのDMAポート7−1、7−2またはバスインタフェース7−3を駆動することで、DMAデバイス1−1、1−2とメモリ2との間のデータ転送を実行する。尚、データ転送実行部7の詳細については後述する。   The data transfer execution unit 7 drives the two DMA ports 7-1 and 7-2 or the bus interface 7-3 in accordance with the data transfer instruction decoded by the instruction decoding unit 6, so that the DMA devices 1-1, 1 and 1 are driven. -2 and data transfer between the memory 2 are executed. Details of the data transfer execution unit 7 will be described later.

実行抑制・選択許可信号生成部8は、転送元/転送先検出部8−1、DMA要求検出部8−2、一致判定部8−3、実行抑制信号生成部8−4、選択許可信号生成部8−5を備えている。実行抑制・選択許可信号生成部8は、データ転送元またはデータ転送先としてのDMAデバイスからデータ転送要求が出力されていない場合、実行中のデータ転送命令に対応するプログラムカウンタを非選択とし、他のプログラムカウンタで示されるデータ転送命令を実行可能とする。尚、実行抑制・選択許可信号生成部8の詳細については後述する。   The execution suppression / selection permission signal generation unit 8 includes a transfer source / transfer destination detection unit 8-1, a DMA request detection unit 8-2, a match determination unit 8-3, an execution suppression signal generation unit 8-4, and a selection permission signal generation. Part 8-5. When the data transfer request is not output from the DMA device as the data transfer source or the data transfer destination, the execution suppression / selection permission signal generation unit 8 deselects the program counter corresponding to the data transfer instruction being executed. The data transfer instruction indicated by the program counter can be executed. The details of the execution suppression / selection permission signal generator 8 will be described later.

転送元/転送先検出部8−1は、命令デコード部6の出力に基づき、データ転送元またはデータ転送先を検出する。DMA要求検出部8−2は、DMAデバイス1−1、1−2からのデータ転送要求を検出する。一致判定部8−3は、転送元/転送先検出部8−1の検出結果とDMA要求検出部8−2の検出結果が一致するか否か、即ち、データ転送元またはデータ転送先がDMAデバイスであり且つ当該DMAデバイスがデータ転送要求を出力しているか否かを判定する。   The transfer source / transfer destination detector 8-1 detects the data transfer source or the data transfer destination based on the output of the instruction decode unit 6. The DMA request detector 8-2 detects a data transfer request from the DMA devices 1-1 and 1-2. The coincidence determination unit 8-3 determines whether or not the detection result of the transfer source / transfer destination detection unit 8-1 matches the detection result of the DMA request detection unit 8-2, that is, whether the data transfer source or the data transfer destination is DMA. It is determined whether or not the DMA device is outputting a data transfer request.

実行抑制信号生成部8−4は、一致判定部8−3の判定結果が不一致(転送元/転送先検出部8−1の検出結果とDMA要求検出部8−2の検出結果が不一致)の場合、データ転送実行部7のデータ転送を抑制する実行抑制信号を出力する。選択許可信号生成部8−5は、一致判定部8−3の判定結果が不一致の場合、当該DMAデバイスからデータ転送要求が出力されるまで現在実行中のデータ転送命令に対応するプログラムカウンタを非選択とするためのプログラムカウンタ選択許可信号を生成する。   In the execution suppression signal generation unit 8-4, the determination result of the match determination unit 8-3 does not match (the detection result of the transfer source / transfer destination detection unit 8-1 does not match the detection result of the DMA request detection unit 8-2). In this case, an execution suppression signal for suppressing data transfer of the data transfer execution unit 7 is output. When the determination result of the match determination unit 8-3 does not match, the selection permission signal generation unit 8-5 sets the program counter corresponding to the currently executing data transfer instruction until the data transfer request is output from the DMA device. A program counter selection permission signal for selection is generated.

プログラムカウンタ選択信号生成部9は、選択許可信号生成部8−5から出力されるプログラムカウンタ選択許可信号に基づき、データ転送実行毎にプログラムカウンタ選択部4に送出するプログラムカウンタ選択信号を生成する。プログラムカウンタ更新部10は、プログラムカウンタ選択信号生成部9から出力されるプログラムカウンタ選択信号に基づき、データ転送実行毎に選択されたプログラムカウンタの値を1ずつ更新する。CPU11は、データポート(不図示)を経由して命令メモリ5にデータ転送命令を格納し、DMA装置の動作を制御する。   The program counter selection signal generation unit 9 generates a program counter selection signal to be sent to the program counter selection unit 4 every time data transfer is executed based on the program counter selection permission signal output from the selection permission signal generation unit 8-5. Based on the program counter selection signal output from the program counter selection signal generation unit 9, the program counter update unit 10 updates the value of the selected program counter one by one for each data transfer execution. The CPU 11 stores a data transfer command in the command memory 5 via a data port (not shown) and controls the operation of the DMA device.

次に、図1に示したプログラムカウンタ3−1、3−2、3−3、プログラムカウンタ選択部4、命令メモリ5、データ転送実行部7、実行抑制・選択許可信号生成部8、プログラムカウンタ更新部10、CPU11について更に詳細に説明する。   Next, the program counter 3-1, 3-2, 3-3, the program counter selection unit 4, the instruction memory 5, the data transfer execution unit 7, the execution suppression / selection permission signal generation unit 8, the program counter shown in FIG. The update unit 10 and the CPU 11 will be described in more detail.

図1の各ブロックのうち、まず、CPU11のリセットが解除される。CPU11は、内蔵しているROMから命令をフェッチし実行することにより、不図示のリセット信号を制御することで順次各ブロックのリセットを解除することが可能となっている。CPU11以外の全てのブロックのリセット状態において、まず、CPU11は、DMA装置が実行するデータ転送命令を命令メモリ5に書き込む。   In each block of FIG. 1, first, the reset of the CPU 11 is released. The CPU 11 can sequentially release the reset of each block by controlling a reset signal (not shown) by fetching and executing an instruction from the built-in ROM. In the reset state of all the blocks other than the CPU 11, first, the CPU 11 writes a data transfer instruction executed by the DMA device into the instruction memory 5.

図2は、DMA装置において使用する命令メモリ5の実際の構成及び入出力ポートを示すブロック図である。   FIG. 2 is a block diagram showing the actual configuration and input / output ports of the instruction memory 5 used in the DMA device.

図2において、命令メモリ5は、2ポート(1Read/1Write)のSRAMであり、データ幅は32ビット、ワード長は64である。命令メモリ5の読み出しアドレス(READ ADDRESS)は6ビットであり、読み出し許可信号(READ ENABLE)をアサートすると、32ビットの読み出しデータがREAD DATAポートから読み出される。本実施の形態では、読み出しアドレスはプログラムカウンタ選択部4から供給され、読み出しデータは命令デコード部6に供給される。   In FIG. 2, an instruction memory 5 is a 2-port (1Read / 1Write) SRAM, and has a data width of 32 bits and a word length of 64. The read address (READ ADDRESS) of the instruction memory 5 is 6 bits. When a read enable signal (READ ENABLE) is asserted, 32-bit read data is read from the READ DATA port. In the present embodiment, the read address is supplied from the program counter selection unit 4 and the read data is supplied to the instruction decoding unit 6.

命令メモリ5の書き込みアドレス(WRITE ADDRESS)は6ビットであり、書き込み許可信号(WRITE ENABLE)をアサートすると、32ビットの書き込みデータ(WRITE DATA)信号上にドライブされているデータ転送命令データが書き込みアドレスに書き込まれる。本実施の形態では、書き込みアドレス、書き込みデータともにCPU11から供給される。   The write address (WRITE ADDRESS) of the instruction memory 5 is 6 bits, and when the write enable signal (WRITE ENABLE) is asserted, the data transfer instruction data driven on the 32-bit write data (WRITE DATA) signal is written to the write address. Is written to. In this embodiment, both the write address and the write data are supplied from the CPU 11.

命令メモリ5に対するデータ転送命令データの書き込みが終了すると、CPU11が各ブロックのリセットを解除することによりDMA装置が動作を開始する。   When the writing of the data transfer command data to the command memory 5 is completed, the CPU 11 releases the reset of each block and the DMA device starts its operation.

図3は、プログラムカウンタ3−1、3−2、3−3、プログラムカウンタ選択部4、プログラムカウンタ更新部10の詳細構成を示すブロック図である。   FIG. 3 is a block diagram showing the detailed configuration of the program counter 3-1, 3-2, 3-3, the program counter selection unit 4, and the program counter update unit 10.

図3において、プログラムカウンタ3−1、3−2、3−3は、各々6ビットのフリップフロップから構成されており、リセット時の初期値は各々“000000”、“010000”、“100000”となっている。即ち、プログラムカウンタ3−1は、0x0番地からの命令を実行し、プログラムカウンタ3−2は、0x10番地からの命令を実行し、プログラムカウンタ3−3は、0x20番地からの命令を実行する。プログラムカウンタ更新部10は、セレクタ10−1、セレクタ10−2、+1加算器10−3を備えている。   In FIG. 3, each of the program counters 3-1, 3-2, 3-3 is composed of 6-bit flip-flops, and initial values at reset are “000000”, “010000”, “100000”, respectively. It has become. That is, the program counter 3-1 executes an instruction from the address 0x0, the program counter 3-2 executes an instruction from the address 0x10, and the program counter 3-3 executes an instruction from the address 0x20. The program counter update unit 10 includes a selector 10-1, a selector 10-2, and a +1 adder 10-3.

プログラムカウンタ3−1には、セレクタ10−1の出力信号が入力される。セレクタ10−1は、プログラムカウンタの現在の値、現在の値に1を加算した値、Load命令によりローディングされる値(store_d)、Loop命令によりループバックする際のプログラムカウンタの戻り値(lp_back_pc)、Jump命令によるジャンプ先アドレス(jump_pc)、のうちの1つを選択して出力する。   The output signal of the selector 10-1 is input to the program counter 3-1. The selector 10-1 includes the current value of the program counter, the value obtained by adding 1 to the current value, the value loaded by the Load instruction (store_d), and the return value of the program counter when looping back by the Loop instruction (lp_back_pc) , One of the jump destination addresses (jump_pc) by the Jump instruction is selected and output.

セレクタ10−2は、プログラムカウンタの出力自身(現在の値)、プログラムカウンタの値に1を加えた値(+1加算器10−3の出力)、のうちの何れかをプログラムカウンタ選択信号pc_selに基づいて選択する。即ち、セレクタ10−2は、当該クロックサイクルにおいて、当該プログラムカウンタが選択されている場合は当該プログラムカウンタの値に1を加えた値を選択し、当該プログラムカウンタが非選択の場合は現在の値を選択する。   The selector 10-2 selects either the program counter output itself (current value) or the value obtained by adding 1 to the program counter value (the output of the +1 adder 10-3) as the program counter selection signal pc_sel. Select based on. That is, the selector 10-2 selects a value obtained by adding 1 to the value of the program counter when the program counter is selected in the clock cycle, and the current value when the program counter is not selected. Select.

プログラムカウンタ3−2、3−3においても、プログラムカウンタ3−1と同様の構成を備えており、プログラムカウンタ更新部10によりプログラムカウンタ値の更新が行われる。   The program counters 3-2 and 3-3 also have the same configuration as the program counter 3-1, and the program counter update unit 10 updates the program counter value.

プログラムカウンタ選択部4は、3ビットのプログラムカウンタ選択信号pc_sel[2:0]に応じてプログラムカウンタ3−1 (PC(0))、3−2(PC(1))、3−3(PC(2))の各出力のうちの1つを選択し、命令メモリ5の読み出しアドレスとして出力する。pc_sel[2:0]はone-hotの信号(3ビット中1ビットが“1”となる信号)であり、“001”のときプログラムカウンタ3−1を選択し、“010”のときプログラムカウンタ3−2を選択し、“100”のときプログラムカウンタ3−3を選択する。即ち、pc_sel[n]=“1”のときPC(n) を選択する(ただしn=0,1,2)。   The program counter selection unit 4 responds to the 3-bit program counter selection signal pc_sel [2: 0] with program counters 3-1 (PC (0)), 3-2 (PC (1)), 3-3 (PC One of the outputs of (2)) is selected and output as a read address of the instruction memory 5. pc_sel [2: 0] is a one-hot signal (a signal in which 1 of 3 bits is “1”). When “001”, the program counter 3-1 is selected, and when “010”, the program counter 3-1 is selected. 3-2 is selected. When “100”, the program counter 3-3 is selected. That is, when pc_sel [n] = “1”, PC (n) is selected (where n = 0, 1, 2).

図4は、プログラムカウンタ選択信号生成部9の詳細構成を示すブロック図である。   FIG. 4 is a block diagram showing a detailed configuration of the program counter selection signal generation unit 9.

図4において、プログラムカウンタ選択信号生成部9のフリップフロップ9−1、9−2、9−3は、各々、クロック信号とリセット信号に接続されており、出力がプログラムカウンタ選択信号となる。フリップフロップ9−1は、リセット信号により“1”がセットされ、D入力にはセレクタ9−4の出力が接続され、Q出力がpc_sel[0]となる。フリップフロップ9−2は、リセット信号により“0”がセットされ、D入力にはセレクタ9−5の出力が接続され、Q出力がpc_sel[1]となる。フリップフロップ9−3は、リセット信号により“0”がセットされ、D入力にはセレクタ9−6の出力が接続され、Q出力がpc_sel[2]となる。   In FIG. 4, flip-flops 9-1, 9-2, 9-3 of the program counter selection signal generation unit 9 are connected to a clock signal and a reset signal, respectively, and the output is a program counter selection signal. The flip-flop 9-1 is set to “1” by the reset signal, the output of the selector 9-4 is connected to the D input, and the Q output becomes pc_sel [0]. In the flip-flop 9-2, "0" is set by the reset signal, the output of the selector 9-5 is connected to the D input, and the Q output becomes pc_sel [1]. In the flip-flop 9-3, "0" is set by the reset signal, the output of the selector 9-6 is connected to the D input, and the Q output becomes pc_sel [2].

プログラムカウンタ選択信号生成部9のデコーダ9−7は、実行抑制・選択許可信号生成部8の選択許可信号生成部8−5が出力するプログラムカウンタ選択許可信号と、データ転送命令実行のストール指示を示すストール信号をデコードする。デコーダ9−7は、デコードの結果、どのプログラムカウンタを選択すべきかを示すプログラムカウンタ選択信号(sel_cnt[0]、sel_cnt[1]、sel_cnt[2])を生成し、セレクタ9−4、9−5、9−6にそれぞれ出力する。   The decoder 9-7 of the program counter selection signal generator 9 outputs a program counter selection permission signal output from the selection permission signal generator 8-5 of the execution suppression / selection permission signal generator 8 and a stall instruction for executing the data transfer instruction. Decode the stall signal shown. The decoder 9-7 generates program counter selection signals (sel_cnt [0], sel_cnt [1], sel_cnt [2]) indicating which program counter should be selected as a result of decoding, and selects the selectors 9-4, 9-. 5 and 9-6, respectively.

図5は、入力であるストールとプログラムカウンタ選択許可信号に対する出力であるプログラムカウンタ選択信号の関係を示す図である。   FIG. 5 is a diagram showing a relationship between a stall that is an input and a program counter selection signal that is an output with respect to the program counter selection permission signal.

図5において、図示の表は、入力であるストールと、プログラムカウンタ選択許可信号pc_en[2:0]に対する出力であるプログラムカウンタ選択信号sel_cnt[2:0]の関係を示している。例えばストールが“1”の場合、sel_cnt[2]、sel_cnt[1]、sel_cnt[0]は全て2となり、プログラムカウンタ選択信号生成部9の全てのフリップフロップ9−1、9−2、9−3は現在の値を保持する。即ち、pc_selは更新されない。   In FIG. 5, the illustrated table shows the relationship between the stall that is an input and the program counter selection signal sel_cnt [2: 0] that is an output with respect to the program counter selection permission signal pc_en [2: 0]. For example, when the stall is “1”, sel_cnt [2], sel_cnt [1], and sel_cnt [0] are all 2, and all the flip-flops 9-1, 9-2, 9− of the program counter selection signal generation unit 9 are set. 3 holds the current value. That is, pc_sel is not updated.

ストールが“0”でpc_en=“111”の場合は、sel_cnt[2]、sel_cnt[1]、sel_cnt[0]は全て0となり、pc_selはシフトレジスタ動作する。即ち、“001”→“010”→“100”→“001”と遷移し、プログラムカウンタはPC(0)→PC(1)→PC(2)→PC(0)の順に選択される。ストールが“0”でpc_en=“011”の場合は、PC(2)が選択不許可となるように、sel_cnt=“301”となり、pc_selは“001”→“010”→“001”→“010”→“001”と遷移し、プログラムカウンタはPC(0)→PC(1)→PC(0)→PC(1)→PC(0)の順に選択される。   When stall is “0” and pc_en = “111”, sel_cnt [2], sel_cnt [1], and sel_cnt [0] are all 0, and pc_sel operates as a shift register. That is, transition is made from “001” → “010” → “100” → “001”, and the program counter is selected in the order of PC (0) → PC (1) → PC (2) → PC (0). If the stall is “0” and pc_en = “011”, sel_cnt = “301” and pc_sel is “001” → “010” → “001” → “ Transition is made from “010” to “001”, and the program counter is selected in the order of PC (0) → PC (1) → PC (0) → PC (1) → PC (0).

プログラムカウンタ選択部4によって選択されたプログラムカウンタに対応するデータ転送命令は、命令メモリ5から読み出され、命令デコード部6に入力される。データ転送命令は32ビットから構成されており、命令デコード部6により図6に示すように解読される。   A data transfer instruction corresponding to the program counter selected by the program counter selection unit 4 is read from the instruction memory 5 and input to the instruction decoding unit 6. The data transfer instruction is composed of 32 bits and is decoded by the instruction decoding unit 6 as shown in FIG.

図6は、命令デコード部6により解読された命令を示す図である。   FIG. 6 is a diagram showing an instruction decoded by the instruction decoding unit 6.

図6において、下記に示すInstの[ ]内の数字は図6の上段2列に記載した数字に対応している。32ビットのデータ転送命令をInst[31:0]と表記すると、命令デコード部6は、Inst[31:30]=“00”のとき特殊命令(Special Instruction)、Inst[31:30]=“01”のときロード命令(Load Instruction) 、Inst[31:30]= “10”のときストア命令(Store Instruction)、Inst[31:30]=“11”のとき無効命令とそれぞれ解読する。   In FIG. 6, the numbers in [] of Inst shown below correspond to the numbers described in the upper two columns of FIG. When a 32-bit data transfer instruction is expressed as Inst [31: 0], the instruction decoding unit 6 has a special instruction when Inst [31:30] = “00”, and Inst [31:30] = “ When 01 ”, it is decoded as a load instruction, when Inst [31:30] =“ 10 ”, it is decoded as a store instruction (Store Instruction), and when Inst [31:30] =“ 11 ”, it is decoded as an invalid instruction.

ロード命令とは、メモリ2からDMA装置の内部リソース(DMAポートを含む)へのデータ転送命令である。ストア命令とは、内部リソースからメモリ2へのデータ転送命令である。特殊命令には、NOP命令(なにもしない命令)、ループ命令(Loop)、ジャンプ命令(Jump)等の、一般的なプロセッサに備わっている命令が含まれる。   The load instruction is a data transfer instruction from the memory 2 to the internal resources (including the DMA port) of the DMA device. The store instruction is a data transfer instruction from the internal resource to the memory 2. Special instructions include instructions provided in general processors such as NOP instructions (instructions that do nothing), loop instructions (Loop), jump instructions (Jump), and the like.

Inst[29:27]は、データサイズを示すフィールドであり、詳細は図7に示されている。例えばデータサイズが“000”の場合は1バイトのデータ転送を示し、データサイズが“100”の場合は5バイトのデータ転送であることを示す。   Inst [29:27] is a field indicating the data size, and details are shown in FIG. For example, when the data size is “000”, 1-byte data transfer is indicated, and when the data size is “100”, it indicates 5-byte data transfer.

Inst[26:23]は、データ転送元リソースのインデックスを示すフィールド、Inst[22:19]は、データ転送先リソースのインデックスを示すフィールドである。これらは、Inst[18:16]で示されるリソースの識別子(ロード命令の場合はデータ転送先を示し、ストア命令の場合はデータ転送元を示す)と共に、どの内部リソースの何番目のリソースをデータ転送対象にするかを示す。   Inst [26:23] is a field indicating the index of the data transfer source resource, and Inst [22:19] is a field indicating the index of the data transfer destination resource. These include the resource identifier indicated by Inst [18:16] (indicating the data transfer destination in the case of a load instruction and the data transfer source in the case of a store instruction), and what number of which internal resource is data Indicates whether to transfer.

内部リソース識別子の詳細は図8に示されている。“000”の場合、PC即ちプログラムカウンタを示す。“001”の場合、AR即ちアドレスレジスタを示す。“010”の場合、GPR即ち汎用レジスタを示す。“011”の場合、IN/OUT即ちDMAポートを示す(IN/OUTはロードかストアかにより識別される)。“100”の場合、LP即ちループレジスタを示す。“101”の場合、OFST即ちオフセットレジスタを示す。尚、アドレスレジスタAR、汎用レジスタGPR、ループレジスタLP、オフセットレジスタOFSTの詳細については後述する。 Details of the internal resource identifier are shown in FIG. “000” indicates a PC, that is, a program counter. “001” indicates AR, that is, an address register. “010” indicates GPR, that is, a general-purpose register. “01 1 ” indicates IN / OUT, that is, a DMA port (IN / OUT is identified by whether it is a load or a store). “100” indicates LP, that is, a loop register. “101” indicates OFST, that is, an offset register. Details of the address register AR, the general-purpose register GPR, the loop register LP, and the offset register OFST will be described later.

ロード命令の場合のデータ転送元とストア命令の場合のデータ転送先を示す内部リソース識別子は、アドレスレジスタに固定されており、インデックスのみをそれぞれのインデックスフィールドにより指定する。   The internal resource identifier indicating the data transfer source in the case of the load instruction and the data transfer destination in the case of the store instruction is fixed in the address register, and only the index is designated by each index field.

Inst[15:13]は、データ転送元またはデータ転送先の有効バイトレーンを示すフィールドであり、データサイズフィールドと共に何バイトをどのバイトレーンにまたはどのバイトレーンから転送するかを示す。   Inst [15:13] is a field indicating the valid byte lane of the data transfer source or the data transfer destination, and indicates how many bytes are transferred to and from which byte lane together with the data size field.

図9及び図10は、データサイズフィールドとバイトレーンフィールドと有効バイトレーンの関係を示す図である。   9 and 10 are diagrams illustrating the relationship among the data size field, the byte lane field, and the effective byte lane.

図9及び図10において、図示の表は、データサイズとバイトレーンの組み合わせにより有効となるバイトレーンを詳細に示したものである。データは64ビットであり、バイトレーンは[63:56]、[55:48], [47:40]、[39:32]、[31:24]、[23:16]、[15:8]、[7:0]の8レーンあり、有効バイトレーンに“v”が表記されている。例えば、データサイズフィールド(size)が“000”即ち1バイトで、バイトレーンフィールド(pos_d/s)が“011”即ち第4バイトレーンの場合、データ[31:24] (データバス信号)を使用して1バイトのデータが転送される。   In FIG. 9 and FIG. 10, the tables shown in detail show the byte lanes that are effective depending on the combination of the data size and the byte lane. The data is 64-bit and byte lanes are [63:56], [55:48], [47:40], [39:32], [31:24], [23:16], [15: 8 ], [7: 0], there are 8 lanes, and “v” is written in the effective byte lane. For example, if the data size field (size) is “000” or 1 byte, and the byte lane field (pos_d / s) is “011” or 4th byte lane, data [31:24] (data bus signal) is used. Thus, 1 byte of data is transferred.

ここで、DMA装置で扱うデータ転送命令(ロード命令、ストア命令、特殊命令)についてより理解を深めるために、以下にいくつかのデータ転送命令の実例を示す。   Here, in order to deepen the understanding of data transfer instructions (load instruction, store instruction, special instruction) handled by the DMA device, some examples of data transfer instructions are shown below.

Inst=“01_000_0001_0010_100_001_000000000000”の場合、ロード命令であり、アドレスレジスタAR(1)の示すメモリ2上の1バイトデータを、ループレジスタLP(2)の[15:8]にロードする。   When Inst = “01_000_0001_0010_100_001_000000000000”, this is a load instruction, and 1-byte data on the memory 2 indicated by the address register AR (1) is loaded into [15: 8] of the loop register LP (2).

Inst=“10_111_0001_0010_011_000_000000000000”の場合、ストア命令であり、DMA入力ポートIN(1)から読み込まれた8バイトデータを、アドレスレジスタAR(2)の示すメモリ上にストアする。   When Inst = “10_111_0001_0010_011_000_000000000000”, this is a store instruction, and 8-byte data read from the DMA input port IN (1) is stored in the memory indicated by the address register AR (2).

図11は、特殊命令のエンコーディングを示す図である。   FIG. 11 is a diagram illustrating encoding of special instructions.

図11において、EnableThreadは、特定のプログラムカウンタを有効にする命令であり、当該プログラムカウンタ以外の休眠状態の他のプログラムカウンタを起動するときに使用できる。DisableThreadは、特定のプログラムカウンタを無効にする命令であり、当該プログラムカウンタ以外の実行中の他のプログラムカウンタを休眠状態にする場合や、プログラムの実行が終了した際にプログラムカウンタ自身を休眠状態にする場合に使用できる。   In FIG. 11, EnableThread is a command for enabling a specific program counter, and can be used when starting another program counter other than the program counter. DisableThread is a command that disables a specific program counter. When other program counters other than the program counter are put into a sleep state or when program execution ends, the program counter itself is put into a sleep state. Can be used when

Jumpは、ジャンプ命令であり、オペランドInst[23:12]を現在選択中のプログラムカウンタにコピーする。本実施の形態ではプログラムカウンタは6ビットであるので、実際はInst[17:12]がコピーされる。LoadImmidiateByteは、即値を内部リソースにロードする命令であり、オペランドInst[7:0]で示される1バイトを、その他のオペランドにより特定される内部リソースにコピーする。ClearResigerは、内部リソースを0クリアする命令である。LoopInは、ループ突入命令であり、LoopIndicator(Inst[22:19])で指定されるループレジスタLP及びオフセットレジスタOFSTの組み合わせによりループを実現する。   Jump is a jump instruction and copies the operand Inst [23:12] to the currently selected program counter. In the present embodiment, since the program counter has 6 bits, Inst [17:12] is actually copied. LoadImmidiateByte is an instruction for loading an immediate value into an internal resource, and copies 1 byte indicated by the operand Inst [7: 0] to the internal resource specified by the other operand. ClearResiger is an instruction to clear internal resources to zero. LoopIn is a loop entry instruction and realizes a loop by a combination of the loop register LP and the offset register OFST specified by LoopIndicator (Inst [22:19]).

上記図1に戻り、データ転送実行部7は、命令デコード部6の命令解読結果に応じてデータ転送を実行する。また、データ転送実行部7は、内部リソースとして、不図示の汎用レジスタGPR、アドレスレジスタAR、ループレジスタLP、オフセットレジスタOFSTをそれぞれ4本ずつ備えている。更に、データ転送実行部7は、DMAデバイス1−1とのデータ転送用にDMAポート7−1(IN(0)及びOUT(0))と、DMAデバイス1−2とのデータ転送用にDMAポート7−2(IN(1)及びOUT(1))と、メモリ1とのデータ転送用にバスインタフェース7−3を備える。   Returning to FIG. 1, the data transfer execution unit 7 executes data transfer according to the instruction decoding result of the instruction decoding unit 6. The data transfer execution unit 7 includes four general-purpose registers GPR, address registers AR, loop registers LP, and offset registers OFST (not shown) as internal resources. Further, the data transfer execution unit 7 uses the DMA port 7-1 (IN (0) and OUT (0)) for data transfer with the DMA device 1-1 and the DMA for data transfer with the DMA device 1-2. A bus interface 7-3 is provided for data transfer between the port 7-2 (IN (1) and OUT (1)) and the memory 1.

汎用レジスタGPRは、データを一時的に保持するレジスタであり、例えばメモリ2からロードしたデータを1バイト毎に別の内部リソースにコピーするときなどに用いる。アドレスレジスタARは、バスインタフェース7−3に対して出力するアドレスを生成するレジスタである。一般的なプロセッサと同様に、1データ転送毎にアドレスレジスタARの値を更新するモード(自動更新アドレッシングモード)を備える構成も好ましい。ループレジスタLPは、命令のループ回数を示すレジスタである。オフセットレジスタOFSTは、ループバックすべき命令アドレスを示すレジスタである。   The general-purpose register GPR is a register that temporarily holds data. For example, the general-purpose register GPR is used when data loaded from the memory 2 is copied to another internal resource for each byte. The address register AR is a register that generates an address to be output to the bus interface 7-3. Similar to a general processor, a configuration including a mode (automatic update addressing mode) for updating the value of the address register AR for each data transfer is also preferable. The loop register LP is a register indicating the number of instruction loops. The offset register OFST is a register indicating an instruction address to be looped back.

ループレジスタLPとオフセットレジスタOFSTに所定値をロードし、ループ命令を実行することにより、ループ内に入る。プログラムカウンタの動作が進行してプログラムカウンタの値がオフセットレジスタOFSTに格納された値と一致したときに、プログラムカウンタの値をループ命令の次の命令を示すアドレスに更新すると共に、ループレジスタLPの値を1減じる。ループレジスタLPの値が0になった場合は、ループを脱出する、即ちプログラムカウンタの値に単に1を加える。   A predetermined value is loaded into the loop register LP and the offset register OFST, and a loop instruction is executed to enter the loop. When the operation of the program counter progresses and the value of the program counter matches the value stored in the offset register OFST, the value of the program counter is updated to the address indicating the instruction next to the loop instruction, and the loop register LP Decrease the value by 1. When the value of the loop register LP becomes 0, the loop is exited, that is, 1 is simply added to the value of the program counter.

ここで、非常に単純なループを用いたプログラム例を示す。
命令アドレス 命令
0x00 AR(0)[7:0]に即値0x20をロード
0x01 LP(0)にAR(0)の示すメモリ上の値をロード(メモリの0x20番地上の
データ=0x20)
0x02 OFST(0)に即値0x04をロード
0x03 LoopIn命令 (インディケータ0)
0x04 DMAPort(0)から読み出したデータをAR(1)の示すメモリアドレスに
ストアし、AR(1)++
0x05 DisableThreadにより自分自身を休眠させる。
Here is an example of a program that uses a very simple loop.
Instruction address Instruction
0x00 Load immediate value 0x20 to AR (0) [7: 0]
0x01 Loads the value in memory indicated by AR (0) into LP (0)
(Data = 0x20)
0x02 Load immediate value 0x04 to OFST (0)
0x03 LoopIn instruction (indicator 0)
0x04 Read data from DMAPort (0) to memory address indicated by AR (1)
Store and AR (1) ++
0x05 Sleep yourself with DisableThread.

上記プログラムを構成する命令列によれば、0x03番地の命令実行によりループに入り、0x04番地のDMAポートからメモリ2へのデータ転送において、プログラムカウンタがオフセットレジスタOFSTと一致するためループバックし、LoopIn命令の次アドレス、即ち0x04番地にジャンプする。これを、LP(0)の回数、即ち32回繰り返してループを抜けて終了する。   According to the instruction sequence that constitutes the above program, a loop is entered by executing the instruction at address 0x03, and in the data transfer from the DMA port at address 0x04 to memory 2, the program counter loops back because it matches the offset register OFST. Jump to the next address of the instruction, that is, address 0x04. This is repeated the number of times of LP (0), that is, 32 times, and exits the loop and ends.

実行抑制・選択許可信号生成部8は、命令デコード部6による命令解読結果と、DMAデバイス1−1、1−2のDMA要求と、プログラムカウンタ選択信号生成部9からのプログラムカウンタ選択信号を基に、データ転送実行部7への実行抑制信号とプログラムカウンタ選択信号生成部9への選択許可信号を生成する。   The execution suppression / selection permission signal generation unit 8 is based on the instruction decoding result by the instruction decoding unit 6, the DMA request of the DMA devices 1-1 and 1-2, and the program counter selection signal from the program counter selection signal generation unit 9. In addition, an execution suppression signal to the data transfer execution unit 7 and a selection permission signal to the program counter selection signal generation unit 9 are generated.

図12は、実行抑制・選択許可信号生成部8の詳細構成を示すブロック図である。   FIG. 12 is a block diagram illustrating a detailed configuration of the execution suppression / selection permission signal generation unit 8.

図12において、比較器6−1、6−2、6−3、6−4、6−5は、命令デコード部6に含まれるが、説明の都合上、図12に示している。比較器6−1は、命令がロード命令であるかどうかを判定し、ロード命令である場合にはload信号をアサートする。比較器6−2は、命令がストア命令であるかどうかを判定し、ストア命令である場合にはstore信号をアサートする。   In FIG. 12, comparators 6-1, 6-2, 6-3, 6-4, and 6-5 are included in the instruction decode unit 6, but are shown in FIG. The comparator 6-1 determines whether the instruction is a load instruction, and asserts a load signal if the instruction is a load instruction. The comparator 6-2 determines whether the instruction is a store instruction, and asserts a store signal if the instruction is a store instruction.

比較器6−3は、データ転送元インデックスまたはデータ転送先インデックスが0であるかどうかを判定し、該インデックスが0である場合にはPort0信号をアサートする。比較器6−4は、データ転送元インデックスまたはデータ転送先インデックスが1であるかどうかを判定し、該インデックスが1である場合にはPort1信号をアサートする。比較器6−5は、データ転送元またはデータ転送先がDMAポートであるかどうかを判定し、DMAポートである場合にはDMA信号をアサートする。   The comparator 6-3 determines whether the data transfer source index or the data transfer destination index is 0, and asserts the Port0 signal when the index is 0. The comparator 6-4 determines whether the data transfer source index or the data transfer destination index is 1, and if the index is 1, asserts the Port1 signal. The comparator 6-5 determines whether the data transfer source or the data transfer destination is a DMA port, and asserts a DMA signal if it is a DMA port.

ゲート8−11、8−12、8−13、8−14は、実行抑制・選択許可信号生成部8の転送元/転送先検出部8−1を構成する。ゲート8−11にはload信号、Port0信号、DMA信号が入力され、3入力の論理積がLD_OUT0信号として出力される。LD_OUT0信号は、DMAポート0に対してデータをロードする命令が発行されていることを示す。ゲート8−12にはload信号、Port1信号、DMA信号が入力され、3入力の論理積がLD_OUT1信号として出力される。LD_OUT1信号は、DMAポート1に対してデータをロードする命令が発行されていることを示す。   The gates 8-11, 8-12, 8-13, and 8-14 constitute a transfer source / destination detection unit 8-1 of the execution suppression / selection permission signal generation unit 8. A load signal, a Port0 signal, and a DMA signal are input to the gate 8-11, and a logical product of three inputs is output as an LD_OUT0 signal. The LD_OUT0 signal indicates that an instruction for loading data to DMA port 0 has been issued. A load signal, a Port1 signal, and a DMA signal are input to the gate 8-12, and a logical product of three inputs is output as an LD_OUT1 signal. The LD_OUT1 signal indicates that an instruction to load data to DMA port 1 has been issued.

ゲート8−13にはstore信号、Port0信号、DMA信号が入力され、3入力の論理積がST_IN0信号として出力される。ST_IN0信号は、DMAポート0からデータを読み出してメモリにストアする命令が発行されていることを示す。ゲート8−14にはstore信号、Port1信号、DMA信号が入力され、3入力の論理積がST_IN1信号として出力される。ST_IN1信号は、DMAポート1からデータを読み出してメモリにストアする命令が発行されていることを示す。   The store signal, the Port0 signal, and the DMA signal are input to the gate 8-13, and a logical product of three inputs is output as the ST_IN0 signal. The ST_IN0 signal indicates that an instruction to read data from DMA port 0 and store it in the memory has been issued. The store signal, the Port1 signal, and the DMA signal are input to the gate 8-14, and a logical product of three inputs is output as the ST_IN1 signal. The ST_IN1 signal indicates that an instruction to read data from DMA port 1 and store it in the memory has been issued.

ゲート8−31、8−32、8−33、8−34は、発行された命令に対応するDMA要求がアサートされているかどうかを検出する一致判定部8−3を構成する。DMAOReq0は、DMAデバイス1−1がメモリ2からのデータ転送を要求しているときに“1”にアサートされる。DMAOReq1は、DMAデバイス1−2がメモリ2からのデータ転送を要求しているときに“1”にアサートされる。DMAIReq0は、DMAデバイス1−1がメモリ2へのデータ転送を要求しているときに“1”にアサートされる。DMAIReq1は、DMAデバイス1−2がメモリ2へのデータ転送を要求しているときに“1”にアサートされる。   Gates 8-31, 8-32, 8-33, and 8-34 constitute a coincidence determination unit 8-3 that detects whether or not a DMA request corresponding to the issued instruction is asserted. DMAOReq0 is asserted to “1” when the DMA device 1-1 requests data transfer from the memory 2. DMAOReq1 is asserted to “1” when the DMA device 1-2 requests data transfer from the memory 2. DMAIReq0 is asserted to “1” when the DMA device 1-1 requests data transfer to the memory 2. DMAIReq1 is asserted to “1” when the DMA device 1-2 requests data transfer to the memory 2.

ゲート8−31、8−32、8−33、8−34の出力は、発行された命令がアクセスしようとしているDMAポートからのデータ転送要求がない場合に、何れか1つが“0”レベルとなる。   The outputs of the gates 8-31, 8-32, 8-33, and 8-34 indicate that when there is no data transfer request from the DMA port that the issued instruction is trying to access, one of them is at the “0” level. Become.

ゲート8−41は、実行抑制信号生成部8−4を構成するものであり、ゲート8−31、8−32、8−33、8−34の出力の何れか1つが“0”になると出力が“0”となる。従って、ゲート8−41の出力が実行抑制信号(抑制すべき時“0”レベル)となる。   The gate 8-41 constitutes the execution suppression signal generator 8-4, and outputs when any one of the outputs of the gates 8-31, 8-32, 8-33, and 8-34 becomes “0”. Becomes “0”. Therefore, the output of the gate 8-41 becomes an execution suppression signal (“0” level when it should be suppressed).

ゲート8−51、8−52、8−53、8−54は、DMA命令を発行したプログラムカウンタのどれが、どのDMAポートをアクセスしたときに実行抑制を受けたかを検出する。フリップフロップ8−55、8−56、8−57、8−58は、実行抑制の検出結果を保持する。ゲート8−21、8−22、8−23、8−24は、実行抑制中のDMA命令に対応するDMA要求が発生したことを検出するDMA要求検出部8−2を構成する。   Gates 8-51, 8-52, 8-53, and 8-54 detect which of the program counters that issued the DMA instructions received execution suppression when accessing which DMA port. The flip-flops 8-55, 8-56, 8-57, 8-58 hold the execution suppression detection result. Gates 8-21, 8-22, 8-23, and 8-24 constitute a DMA request detection unit 8-2 that detects that a DMA request corresponding to a DMA instruction whose execution is being suppressed is generated.

実行抑制中のDMA命令に対応するDMA要求が発生したことを検出すると、フリップフロップ8−55、8−56、8−57、8−58はクリアされる。ゲート8−591は、実行抑制状態を生成し、ゲート8−592は、実行抑制解除状態を生成する。ゲート8−593により、特定のプログラムカウンタの実行抑制状態が生成され、これをプログラムカウンタ選択許可信号pc_en[2:0]としてプログラム選択信号生成部9へ出力する。即ち、pc_en[n]が“1”の場合は選択が許可され、“0”の場合は選択が不許可となる。   When it is detected that a DMA request corresponding to the DMA instruction whose execution is being suppressed is generated, the flip-flops 8-55, 8-56, 8-57, and 8-58 are cleared. The gate 8-591 generates an execution suppression state, and the gate 8-592 generates an execution suppression release state. The execution suppression state of a specific program counter is generated by the gate 8-593, and this is output to the program selection signal generation unit 9 as the program counter selection permission signal pc_en [2: 0]. That is, when pc_en [n] is “1”, selection is permitted, and when it is “0”, selection is not permitted.

図12では、どのプログラムカウンタであるかを整数nで示している。nは0,1,2の何れかであるので、本実施の形態では、ゲート8−21、8−22、8−23、8−24、8−51、8−52、8−53、8−54、8−591、8−592、8−593及びフリップフロップ8−55、8−56、8−57、8−58は、プログラムカウンタの数、即ち3セット存在するが、図示を省略している。   In FIG. 12, an integer n indicates which program counter is used. Since n is 0, 1, or 2, in this embodiment, the gates 8-21, 8-22, 8-23, 8-24, 8-51, 8-52, 8-53, 8 -54, 8-591, 8-592, 8-593 and flip-flops 8-55, 8-56, 8-57, 8-58 are the number of program counters, that is, there are three sets, but illustration is omitted. ing.

次に、上記構成を有する本実施の形態のDMA装置の全体的な動作を図13のタイミングチャートと図14及び図15のフローチャートを参照しながら詳細に説明する。   Next, the overall operation of the DMA apparatus of the present embodiment having the above configuration will be described in detail with reference to the timing chart of FIG. 13 and the flowcharts of FIGS.

本実施の形態では、基本的に、プログラムカウンタPC(0)の示すプログラム(0x03番地及び0x05番地の命令)がDMAデバイス1−1のデータ転送を行い、プログラムカウンタPC(1)の示すプログラム(0x12番地及び0x16番地の命令)がDMAデバイス1−2のデータ転送を行うように設定されている。   In the present embodiment, basically, a program indicated by the program counter PC (0) (instructions at addresses 0x03 and 0x05) transfers data to the DMA device 1-1, and the program indicated by the program counter PC (1) ( Instructions at addresses 0x12 and 0x16) are set to perform data transfer of the DMA device 1-2.

クロックサイクル0では、Reset信号がアサート(“1”)されており、リセット状態である(ステップS1)。リセット状態においては、プログラムカウンタ選択信号pc_selは“001”を出力し、プログラムカウンタ選択許可信号pc_enは“111”を出力している。また、プログラムカウンタの初期値はPC(0)=0x00、PC(1)=0x10、PC(2)=0x20である。   In clock cycle 0, the Reset signal is asserted (“1”) and is in a reset state (step S1). In the reset state, the program counter selection signal pc_sel outputs “001”, and the program counter selection permission signal pc_en outputs “111”. The initial values of the program counter are PC (0) = 0x00, PC (1) = 0x10, and PC (2) = 0x20.

クロックサイクル1では、リセットが解除され、まずプログラムカウンタPC(0)が選択され(selected PC = PC(0))、命令が実行される(ステップS2)。   In clock cycle 1, the reset is released, first the program counter PC (0) is selected (selected PC = PC (0)), and the instruction is executed (step S2).

クロックサイクル2では、pc_selが“010”となりプログラムカウンタPC(1)が選択され、命令が実行される(ステップS3)。   In clock cycle 2, pc_sel becomes “010”, the program counter PC (1) is selected, and the instruction is executed (step S3).

クロックサイクル3では、pc_selが“100”となりプログラムカウンタPC(2)が選択され、命令が実行される(ステップS4)。   In clock cycle 3, pc_sel becomes “100”, the program counter PC (2) is selected, and the instruction is executed (step S4).

このように、順次、プログラムカウンタPC(0)→PC(1)→PC(2)→PC(0)が選択されて命令が実行される。   In this way, the program counter PC (0) → PC (1) → PC (2) → PC (0) is sequentially selected and the instruction is executed.

クロックサイクル4では、DMAデバイス1−2のデータ転送要求DMAReq1がアサート(“1”)されるが、当該DMAデバイス1−2に対するデータ転送命令が実行されないため転送応答信号DMAAck1はアサートされない(ステップS5)。   In clock cycle 4, the data transfer request DMAReq1 of the DMA device 1-2 is asserted (“1”), but the transfer response signal DMAAck1 is not asserted because the data transfer command for the DMA device 1-2 is not executed (step S5). ).

クロックサイクル6では、プログラムカウンタPC(1)は0x12となり、このプログラムカウンタPC(1)がDMAデバイス1−2へのデータ転送命令を示している(ステップS6)。データ転送命令が実際に実行されるのは、次にpc_selが“010”になるクロックサイクル8であり、このクロックサイクル8においてDMAAck1がアサートされる(ステップS7)。   In clock cycle 6, the program counter PC (1) becomes 0x12, and this program counter PC (1) indicates a data transfer command to the DMA device 1-2 (step S6). The data transfer instruction is actually executed in clock cycle 8 when pc_sel becomes “010” next, and DMAAck1 is asserted in clock cycle 8 (step S7).

一方、クロックサイクル10では、プログラムカウンタPC(0)が示すDMAデバイス1−1へのデータ転送命令が発行されるが、当該クロックサイクル10においてDMAReq0がアサートされていないため、プログラムカウンタPC(0)の示す命令は実行を抑制される(ステップS8)。即ち、pc_enの値は“110”となりPC(0)は0x03を示したまま更新されない。DMAReq0がアサートされるクロックサイクル14までの間、プログラムカウンタPC(1)、PC(2)の示すプログラムが順に実行される(ステップS9)。   On the other hand, in clock cycle 10, a data transfer instruction to DMA device 1-1 indicated by program counter PC (0) is issued, but since DMAReq0 is not asserted in clock cycle 10, program counter PC (0) Is suppressed from being executed (step S8). That is, the value of pc_en is “110”, and PC (0) remains 0x03 and is not updated. Until the clock cycle 14 when DMAReq0 is asserted, the programs indicated by the program counters PC (1) and PC (2) are executed in order (step S9).

クロックサイクル14では、DMAReq0がアサートされると(ステップS10)、pc_enは“111“に更新される。   In clock cycle 14, when DMAReq0 is asserted (step S10), pc_en is updated to “111”.

クロックサイクル15では、PC(0)が選択され実行される。即ち、転送応答信号DMAAck0がアサートされてデータ転送が完了する(ステップS11)。   In clock cycle 15, PC (0) is selected and executed. That is, the transfer response signal DMAAck0 is asserted to complete the data transfer (step S11).

クロックサイクル19では、PC(1)=0x16の示すデータ転送命令が発行されるが、当該クロックサイクル19においてDMAReq1がアサートされていないため、pc_enは“101”となり、PC(0)、PC(2)の示す命令が順に実行される状態となる(ステップS12)。   In clock cycle 19, a data transfer instruction indicated by PC (1) = 0x16 is issued. However, since DMAReq1 is not asserted in clock cycle 19, pc_en becomes “101”, and PC (0), PC (2 ) Are sequentially executed (step S12).

クロックサイクル21では、PC(1)の示す命令の実行が抑制されており、PC(0)=0x05の示すデータ転送命令が発行されるが、当該クロックサイクル21においてはDMAReq0が既にアサート状態のため、データ転送命令は直ちに実行され、DMAAck0がアサートされる(ステップS13)。   In clock cycle 21, execution of the instruction indicated by PC (1) is suppressed, and a data transfer instruction indicated by PC (0) = 0x05 is issued. However, in this clock cycle 21, DMAReq0 has already been asserted. The data transfer instruction is immediately executed and DMAAck0 is asserted (step S13).

クロックサイクル23では、DAMReq1がアサートされると(ステップS14)、pc_enは“101”から“111”に復帰する。   In clock cycle 23, when DAMReq1 is asserted (step S14), pc_en returns from “101” to “111”.

クロックサイクル24では、データ転送命令が実行され、DMAAck1がアサートされる(ステップS15)。   In clock cycle 24, the data transfer instruction is executed and DMAAck1 is asserted (step S15).

上述した動作により、DMAデバイス1−1、1−2のデータ転送要求レートが2サイクルであった場合、2つのプログラムカウンタをイネーブルにしておけば、毎クロックサイクルのデータ転送が可能であることが容易に理解できる。即ち、DMAデバイス1−1、1−2に対して命令デコード部6やデータ転送実行部7の回路は共通化しながら、インターリーブ的にDMAデバイス1−1、1−2から要求されたデータ転送を行うことができるため、回路規模を大きくすることなく効率の良いデータ転送が可能となる。   If the data transfer request rate of the DMA devices 1-1 and 1-2 is 2 cycles by the above-described operation, data transfer at every clock cycle may be possible if two program counters are enabled. Easy to understand. That is, while the circuits of the instruction decode unit 6 and the data transfer execution unit 7 are made common to the DMA devices 1-1 and 1-2, the data transfer requested from the DMA devices 1-1 and 1-2 is interleaved. Therefore, efficient data transfer is possible without increasing the circuit scale.

しかも、2つのDMAデバイス1−1、1−2のメモリアドレスの生成パターンを全く異なるものに設定することが可能であるため、非常に柔軟なデータ転送が可能となる。例えば、一方のプログラムカウンタでx方向の画像データ参照を行い、もう一方のプログラムカウンタでy方向の画像データ参照を行うようにすれば、画像データ処理を行いながら画像回転操作を行うことも可能である。   In addition, since the memory address generation patterns of the two DMA devices 1-1 and 1-2 can be set to completely different ones, very flexible data transfer is possible. For example, if one program counter refers to image data in the x direction and the other program counter refers to image data in the y direction, it is possible to perform image rotation operations while performing image data processing. is there.

以上説明したように、本実施の形態によれば、複数のDMAデバイスからのデータ転送要求毎に異なるアクセスパターンを予めプログラムすることが可能となり、複数のデータ転送をそれぞれのデータ転送要求に応じて並列的に実行することが可能となる。これにより、従来のように、複雑なデータ転送を実行する際にアクセスパターン毎にCPUが介在して設定を切り替えることが不要となり、高機能且つ高性能の複雑なDMA転送を回路規模を増大することなく実現することが可能となる。   As described above, according to the present embodiment, it is possible to previously program different access patterns for each data transfer request from a plurality of DMA devices, and a plurality of data transfers can be performed according to each data transfer request. It is possible to execute in parallel. This eliminates the need for a CPU to switch the setting for each access pattern when executing complex data transfer as in the prior art, and increases the circuit scale of complex DMA transfer with high functionality and high performance. Can be realized without any problem.

また、連続する同一のDMAデバイスからのデータ転送要求に対しても、CPUの介在を必要とせずに途中でアクセスパターンを変更することが可能となる。これにより、DMA装置を含むデータ処理装置全体の性能を向上させることが可能となる。   Even for data transfer requests from the same consecutive DMA device, the access pattern can be changed in the middle without requiring the intervention of the CPU. As a result, the performance of the entire data processing device including the DMA device can be improved.

[第2の実施の形態]
図16は、本発明の第2の実施の形態に係るデータ転送装置としてのDMA装置にDMAデバイスとしてJPEG(Joint Photographic Experts Group)エンコーダモジュールを接続した場合の電気的な構成を示すブロック図である。
[Second Embodiment]
FIG. 16 is a block diagram showing an electrical configuration when a JPEG (Joint Photographic Experts Group) encoder module is connected as a DMA device to a DMA device as a data transfer device according to the second embodiment of the present invention. .

図16において、本実施の形態は、上述した第1の実施の形態に対して、DMA装置のデータ転送実行部7にDMAデバイスとしてJPEGエンコーダモジュール12を接続した点と、CPUバス14にストレージ13を接続した点において相違する。本実施の形態のその他の要素は、上述した第1の実施の形態(図1)の対応するものと同一なので、説明を省略する。   In FIG. 16, the present embodiment is different from the first embodiment described above in that a JPEG encoder module 12 is connected as a DMA device to the data transfer execution unit 7 of the DMA device, and a storage 13 is stored in the CPU bus 14. Is different in that they are connected. Since the other elements of the present embodiment are the same as the corresponding ones of the first embodiment (FIG. 1) described above, description thereof is omitted.

JPEGエンコーダモジュール12の入力部には、データ転送実行部7のDMAポート7−1が接続され、JPEGエンコーダモジュール12の出力部には、データ転送実行部7のDMAポート7−2が接続されている。また、CPUバス14上には、メモリマップされたストレージ13が接続されている。JPEGエンコーダモジュール12によりJPEG圧縮されたデータをストレージ13に格納することができる。   The DMA port 7-1 of the data transfer execution unit 7 is connected to the input unit of the JPEG encoder module 12, and the DMA port 7-2 of the data transfer execution unit 7 is connected to the output unit of the JPEG encoder module 12. Yes. A memory-mapped storage 13 is connected to the CPU bus 14. Data compressed by JPEG by the JPEG encoder module 12 can be stored in the storage 13.

上記構成において、プログラムカウンタPC(0)(3−1)は、メモリ2から画像データを読み出してJPEGエンコーダモジュール12に入力するためのシーケンスを実行する。JPEGエンコーダモジュール12は、入力された画像データをJPEG圧縮し、画像データのデータレートとは異なるデータレートを有する圧縮された符号データを生成し、データ転送要求をアサートする。   In the above configuration, the program counter PC (0) (3-1) executes a sequence for reading out image data from the memory 2 and inputting it to the JPEG encoder module 12. The JPEG encoder module 12 performs JPEG compression on the input image data, generates compressed code data having a data rate different from the data rate of the image data, and asserts a data transfer request.

データ転送要求に応じてプログラムカウンタPC(1)(3−2)が起動される。プログラムカウンタPC(1)は、符号データをメモリ2に転送する。ストレージ13のアクセス速度はメモリ2のアクセス速度に比べて遅いので、プログラムカウンタPC(2)(3−3)により制御されるシーケンスは、符号データをバックグラウンドでストレージ13に転送する。   The program counter PC (1) (3-2) is activated in response to the data transfer request. The program counter PC (1) transfers the code data to the memory 2. Since the access speed of the storage 13 is slower than the access speed of the memory 2, the sequence controlled by the program counter PC (2) (3-3) transfers the code data to the storage 13 in the background.

このような動作においては、プログラムカウンタPC(0)は、メモリ2上の画像データを8x8のブロック単位でロードアクセスする。プログラムカウンタPC(1)は、符号データを連続アドレスにストアアクセスする。プログラムカウンタPC(2)は、符号データを連続アドレスからロードアクセスしてストレージのデータポートである固定アドレスにストアアクセスする。   In such an operation, the program counter PC (0) loads and accesses the image data on the memory 2 in units of 8 × 8 blocks. The program counter PC (1) stores and accesses the code data at continuous addresses. The program counter PC (2) loads and accesses the code data from the continuous address, and stores and accesses the fixed address that is the data port of the storage.

上述した動作により、それぞれ異なるデータレートとアクセスパターンを有する3種類のデータ転送を、それぞれのデータ転送要求に応じて並列的に実行することが可能となる。更に、命令デコード部6及びデータ転送実行部7は時分割的に動作させることができるため、効率的なデータ転送及び複雑なアクセスパターンのデータ転送を、比較的少ない回路規模によって実現することが可能となる。   Through the above-described operation, three types of data transfer having different data rates and access patterns can be executed in parallel according to the respective data transfer requests. Furthermore, since the instruction decode unit 6 and the data transfer execution unit 7 can be operated in a time-sharing manner, efficient data transfer and data transfer with a complicated access pattern can be realized with a relatively small circuit scale. It becomes.

以上説明したように、本実施の形態によれば、上述した第1の実施の形態と同様に、高機能且つ高性能の複雑なDMA転送を回路規模を増大することなく実現することが可能となると共に、DMA装置を含むシステム全体の性能を向上させることが可能となる。   As described above, according to the present embodiment, it is possible to realize complex DMA transfer with high functionality and high performance without increasing the circuit scale, as in the first embodiment described above. In addition, the performance of the entire system including the DMA device can be improved.

[他の実施の形態]
上記第1及び第2の実施の形態では、DMA装置のデータ転送実行部7に2つのDMAデバイス1−1、1−2を接続した構成を説明したが、本発明は、これに限定されるものではなく、データ転送実行部7のDMAポートを増設することでデータ転送実行部7に3つ以上のDMAデバイスを接続するように構成してもよい。
[Other embodiments]
In the first and second embodiments described above, the configuration in which the two DMA devices 1-1 and 1-2 are connected to the data transfer execution unit 7 of the DMA device has been described. However, the present invention is limited to this. Instead, a configuration may be adopted in which three or more DMA devices are connected to the data transfer execution unit 7 by increasing the number of DMA ports of the data transfer execution unit 7.

上記第1及び第2の実施の形態では、DMA装置、DMAデバイス1−1、1−2、メモリ2、CPU11から構成されるデータ処理装置について説明したが、本発明は、データ処理装置のみへの適用に限定されるものではなく、データ処理装置を搭載した各種の画像処理装置(プリンタ、複写機、複合機、ファクシミリ等)に適用することができる。   In the first and second embodiments, the data processing device including the DMA device, the DMA devices 1-1 and 1-2, the memory 2, and the CPU 11 has been described. However, the present invention applies only to the data processing device. However, the present invention is not limited to the above-described application, and can be applied to various image processing apparatuses (printers, copiers, multifunction peripherals, facsimiles, etc.) equipped with a data processing apparatus.

本発明の第1の実施の形態に係るデータ転送装置としてのDMA装置の電気的な構成を示すブロック図である。1 is a block diagram showing an electrical configuration of a DMA device as a data transfer device according to a first embodiment of the present invention. DMA装置において使用する命令メモリの実際の構成及び入出力ポートを示すブロック図である。It is a block diagram which shows the actual structure and input / output port of the instruction memory used in a DMA apparatus. プログラムカウンタ、プログラムカウンタ選択部、プログラムカウンタ更新部の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of a program counter, a program counter selection part, and a program counter update part. プログラムカウンタ選択信号生成部の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of a program counter selection signal production | generation part. 入力であるストールとプログラムカウンタ選択許可信号に対する出力であるプログラムカウンタ選択信号の関係を示す図である。It is a figure which shows the relationship between the stall which is an input, and the program counter selection signal which is an output with respect to a program counter selection permission signal. 命令デコード部により解読された命令を示す図である。It is a figure which shows the command decoded by the command decoding part. データサイズフィールドの意味を示す図である。It is a figure which shows the meaning of a data size field. 内部リソース識別子の意味を示す図である。It is a figure which shows the meaning of an internal resource identifier. データサイズフィールドとバイトレーンフィールドと有効バイトレーンの関係を示す図である。It is a figure which shows the relationship between a data size field, a byte lane field, and an effective byte lane. 図9の続きを示す図である。FIG. 10 is a diagram showing a continuation of FIG. 9. 特殊命令のエンコーディングを示す図である。It is a figure which shows the encoding of a special instruction. 実行抑制・選択許可信号生成部の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of an execution suppression and selection permission signal production | generation part. DMA装置の全体動作を示すタイミングチャートである。It is a timing chart which shows the whole operation | movement of a DMA apparatus. DMA装置の全体動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of a DMA apparatus. 図14のフローチャートの続きである。It is a continuation of the flowchart of FIG. 本発明の第2の実施の形態に係るデータ転送装置としてのDMA装置にDMAデバイスとしてJPEGエンコーダモジュールを接続した場合の電気的な構成を示すブロック図である。It is a block diagram which shows an electrical structure at the time of connecting a JPEG encoder module as a DMA device to the DMA apparatus as a data transfer apparatus concerning the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

1−1、1−2 DMAデバイス(デバイスに対応)
2 メモリ(メモリに対応)
3−1、3−2、3−3 プログラムカウンタ(アドレス格納手段に対応)
4 プログラムカウンタ選択部(選択手段に対応)
5 命令メモリ(命令格納手段に対応)
6 命令デコード部(解読手段に対応)
7 データ転送実行部(実行手段に対応)
7−1、7−2 DMAポート(通信手段に対応)
7−3 バスインタフェース(通信手段に対応)
8 実行抑制・選択許可信号生成部(実行抑制手段に対応)
9 プログラムカウンタ選択信号生成部(選択制御手段に対応)
10 プログラムカウンタ更新部(更新手段に対応)
11 CPU(制御手段に対応)
12 JPEGエンコーダモジュール(エンコーダモジュールに対応)
1-1, 1-2 DMA devices (devices supported)
2 Memory (compatible with memory)
3-1, 3-2, 3-3 Program counter (corresponding to address storage means)
4 Program counter selection part (corresponding to the selection means)
5 Instruction memory (corresponding to instruction storage means)
6 Instruction decode unit (corresponds to decoding means)
7 Data transfer execution unit (corresponding to execution means)
7-1, 7-2 DMA port (corresponding to communication means)
7-3 Bus interface (corresponding to communication means)
8 Execution suppression / selection permission signal generator (corresponding to execution suppression means)
9 Program counter selection signal generator (corresponding to selection control means)
10 Program counter update unit (corresponding to update means)
11 CPU (corresponding to control means)
12 JPEG encoder module (supports encoder module)

Claims (14)

命令を格納しているアドレスを保持する複数のプログラムカウンタと、
前記複数のプログラムカウンタの1つを選択する選択手段と、
データ転送命令を含む複数の命令を格納し、前記選択手段により選択されたプログラムカウンタのアドレスに格納している命令を出力する命令格納手段と、
前記命令格納手段から出力された命令に従い、デバイスとメモリとの間のデータ転送を実行する実行手段と、
前記命令格納手段により出力されたデータ転送命令によるデータ転送の対象となるデバイスからデータ転送要求が出力されていない場合に、当該データ転送要求のないデバイスのデータ転送命令に対応するプログラムカウンタの前記選択手段による選択を抑制することで前記実行手段による当該データ転送命令の実行を保留し、当該データ転送命令を保持しているプログラムカウンタ以外のプログラムカウンタが保持するアドレスにより示される命令を前記実行手段に実行させる実行制御手段とを備えることを特徴とするダイレクトメモリアクセス装置。
A plurality of program counters holding addresses storing instructions ;
Selecting means for selecting one of the plurality of program counters ;
Instruction storage means for storing a plurality of instructions including a data transfer instruction and outputting an instruction stored in an address of a program counter selected by the selection means;
Execution means for executing data transfer between the device and the memory according to the instruction output from the instruction storage means;
The selection of the program counter corresponding to the data transfer instruction of the device without the data transfer request when the data transfer request is not output from the device subject to the data transfer by the data transfer instruction output by the instruction storage means By suppressing the selection by the means, the execution of the data transfer instruction by the execution means is suspended, and an instruction indicated by an address held by a program counter other than the program counter holding the data transfer instruction is given to the execution means A direct memory access device comprising: an execution control means for executing.
前記実行制御手段から実行を保留させている命令のアドレスを格納している前記プログラムカウンタを示す通知と前記実行手段からのデータ転送の実行通知に応じて、どのプログラムカウンタを選択すべきかを示す選択信号を前記選択手段に出力する選択制御手段と、
前記実行手段からのデータ転送の実行通知毎に、データ転送を起動した命令に対応するプログラムカウンタの格納値を更新する更新手段とを更に備え、
前記実行制御手段は、前記命令格納手段により出力されたデータ転送命令によるデータ転送の対象となるデバイスからデータ転送要求が出力されていない場合、前記実行手段によるデータ転送を抑制する実行抑制信号を前記実行手段に出力すると共に、前記データ転送命令によるデータ転送の対象となるデバイスからデータ転送要求が出力されるまで、当該データ転送命令を保持するプログラムカウンタを非選択とする選択許可信号を前記選択制御手段に出力することを特徴とする請求項1記載のダイレクトメモリアクセス装置。
Selection indicating which program counter should be selected in response to the notification indicating the program counter storing the address of the instruction whose execution is suspended from the execution control means and the data transfer execution notification from the execution means Selection control means for outputting a signal to the selection means;
Update means for updating the stored value of the program counter corresponding to the instruction that started the data transfer for each data transfer execution notification from the execution means;
The execution control means sends an execution suppression signal for suppressing data transfer by the execution means when a data transfer request is not output from a device subject to data transfer by the data transfer instruction output by the instruction storage means. The selection control signal is output to the execution means and the selection permission signal for deselecting the program counter holding the data transfer instruction until a data transfer request is output from the device subject to data transfer by the data transfer instruction. 2. The direct memory access device according to claim 1, wherein the direct memory access device outputs the data to a means.
前記実行手段は、複数の前記デバイス及び前記メモリとそれぞれデータ転送を行う複数の通信手段を備えることを特徴とする請求項1又は2に記載のダイレクトメモリアクセス装置。 The direct memory access apparatus according to claim 1, wherein the execution unit includes a plurality of communication units that respectively perform data transfer with the plurality of devices and the memory. 前記命令格納手段に格納される命令は、前記メモリから前記ダイレクトメモリアクセス装置の内部リソースへのデータ転送命令、前記ダイレクトメモリアクセス装置の内部リソースから前記メモリへのデータ転送命令、特定のプログラムカウンタを有効にする命令、特定のプログラムカウンタを無効にする命令を含むことを特徴とする請求項1乃至3のいずれか1項に記載のダイレクトメモリアクセス装置。 The instructions stored in said instruction storage means, the data transfer instruction from said memory to internal resources of the direct memory access device, the data transfer instruction from the internal resources of the direct memory access device to the memory, the specific program counter 4. The direct memory access device according to claim 1, further comprising an instruction for enabling and an instruction for invalidating a specific program counter . 前記デバイスは、画像データを圧縮して該画像データのデータレートとは異なるデータレートを有する符号データを生成するエンコーダモジュールを含むことを特徴とする請求項1乃至4のいずれか1項に記載のダイレクトメモリアクセス装置。 5. The device according to claim 1, wherein the device includes an encoder module that compresses image data to generate code data having a data rate different from a data rate of the image data. 6. Direct memory access device. 前記命令格納手段は、前記実行手段に実行させる命令としてデータ転送命令を複数回実行させるためのループ命令を有し、前記実行手段は、前記ループ命令に関するデータ転送命令を複数回実行することを特徴とする請求項1乃至5のいずれか1項に記載のダイレクトメモリアクセス装置。 The instruction storage means has a loop instruction for executing a data transfer instruction a plurality of times as an instruction to be executed by the execution means, and the execution means executes a data transfer instruction related to the loop instruction a plurality of times. The direct memory access device according to any one of claims 1 to 5. 前記命令格納手段は、前記ダイレクトメモリアクセス装置から前記ダイレクトメモリアクセス装置外部のメモリへ前記実行手段によりデータを転送させるストア命令と、前記ダイレクトメモリアクセス装置外部のメモリから前記ダイレクトメモリアクセス装置へ前記実行手段によりデータを転送させるロード命令とを格納していることを特徴とする請求項1乃至6のいずれか1項に記載のダイレクトメモリアクセス装置。 It said instruction storage means, said execution and store instructions to transfer data by the direct memory access said execution means from the apparatus to the direct memory access device outside the memory, from the direct memory access device external memory to said direct memory access device 7. The direct memory access device according to claim 1, further comprising a load instruction for transferring data by the means. 前記デバイスからのデータ転送に関する要求を検出する検出手段と、
前記命令格納手段の出力する命令に関するデバイスと前記検出手段の検出したデータ転送に関するデバイスとが一致しているかどうかを判定する判定手段と、を更に備え、
前記実行制御手段は、前記判定手段の判定により、前記命令格納手段の出力する命令に関するデバイスと前記検出手段の検出したデータ転送に関するデバイスとが一致すると判定される場合に、前記命令格納手段の出力する命令を前記実行手段に実行させ、前記命令格納手段の出力する命令に関するデバイスと前記検出手段の検出したデータ転送に関するデバイスとが一致しないと判定される場合に、前記実行手段による前記命令格納手段の出力する命令の実行を保留し、当該保留した命令に関するアドレスを保持するプログラムカウンタとは別のプログラムカウンタの保持するアドレスの示す命令を前記実行手段に実行させるように制御することを特徴とする請求項1乃至7のいずれか1項に記載のダイレクトメモリアクセス装置。
Detecting means for detecting a request for data transfer from the device;
Determination means for determining whether a device related to an instruction output by the instruction storage means matches a device related to data transfer detected by the detection means;
The execution control unit outputs the instruction storage unit when the determination unit determines that the device related to the instruction output from the instruction storage unit matches the device related to the data transfer detected by the detection unit. The instruction storage means by the execution means is executed when it is determined that the device related to the instruction output from the instruction storage means does not match the device related to the data transfer detected by the detection means. pending execution of the output commands, and controls so as to execute the instruction indicated by the address held in another program counter to the execution unit and the program counter for holding an address for the instruction that the hold The direct memory access device according to claim 1.
前記実行制御手段は、前記実行手段による実行を保留しているデータ転送命令に関するデバイスからデータ転送要求を受けた場合に、当該実行を保留しているデータ転送命令を前記実行手段により実行させることを特徴とする請求項1乃至のいずれか1項に記載のダイレクトメモリアクセス装置。 When the execution control means receives a data transfer request from a device related to a data transfer instruction that is suspended by the execution means, the execution control means causes the execution means to execute the data transfer instruction that is suspended. direct memory access apparatus according to any one of claims 1 to 8, characterized. 前記プログラムカウンタは、アドレスを示す値を保持するプログラムカウンタであって、前記プログラムカウンタの保持するアドレスが示す命令を前記実行手段が実行した場合に、前記プログラムカウンタは前記アドレスを示す値を1ずつ増加させることを特徴とする請求項1乃至のいずれか1項に記載のダイレクトメモリアクセス装置。 Said program counter, a program counter for holding a value indicative of an address, if the instruction indicated by the address held in said program counter and executing said execution means, said program counter by one the value indicating the address direct memory access apparatus according to any one of claims 1 to 9, characterized in that increasing. 前記選択手段は、選択するプログラムカウンタをクロックサイクル毎に順に切り替えることを特徴とする請求項1乃至10のいずれか1項に記載のダイレクトメモリアクセス装置。 It said selecting means, direct memory access device according to any one of claims 1 to 10, characterized in that switch the program counter to choose for each clock cycle. 解読手段を更に備え、
前記命令格納手段は、命令を示す信号を出力し、前記解読手段は、前記命令格納手段の出力する信号に基づいて前記実行手段に実行させる命令を解読し、解読した命令を前記実行手段に実行させることを特徴とする請求項1乃至11のいずれか1項に記載のダイレクトメモリアクセス装置。
A decryption means,
The instruction storage means outputs a signal indicating an instruction, and the decoding means decodes an instruction to be executed by the execution means based on a signal output from the instruction storage means, and executes the decoded instruction to the execution means direct memory access apparatus according to any one of claims 1 to 11, characterized in that to.
請求項1乃至12のいずれか1項に記載の前記ダイレクトメモリアクセス装置と、前記デバイスと、前記メモリと、前記ダイレクトメモリアクセス装置の動作を制御する制御手段とを備えることを特徴とするデータ処理装置。 A data processing comprising: the direct memory access device according to any one of claims 1 to 12, the device, the memory, and a control unit that controls an operation of the direct memory access device. apparatus. 命令を格納しているアドレスを保持する複数のプログラムカウンタと、前記プログラムカウンタの1つを選択する選択手段と、データ転送命令を含む複数の命令を格納する命令格納手段と、を有するダイレクトメモリアクセス装置の制御方法であって、
前記複数のプログラムカウンタの1つを選択する選択ステップと、
前記命令格納手段が、前記選択ステップで選択されたプログラムカウンタのアドレスに格納している命令を出力する命令出力ステップと、
前記命令出力ステップにおいて出力された命令に従い、デバイスとメモリとの間のデータ転送を実行する実行ステップと、
前記命令出力ステップで出力されたデータ転送命令が示すデータ転送元またはデータ転送先としてのデバイスからデータ転送要求が出力されていない場合に、当該データ転送要求のないデバイスのデータ転送命令に対応するプログラムカウンタの前記選択手段による選択を抑制することで当該データ転送命令の実行を保留し、当該データ転送命令を保持しているプログラムカウンタ以外のプログラムカウンタが保持するアドレスにより示される命令を前記実行ステップによって実行させる実行制御ステップとを備えることを特徴とするダイレクトメモリアクセス装置の制御方法。
Direct memory access having a plurality of program counters holding addresses storing instructions, a selection means for selecting one of the program counters, and an instruction storage means for storing a plurality of instructions including a data transfer instruction An apparatus control method comprising:
A selection step of selecting one of the plurality of program counters ;
An instruction output step for outputting the instruction stored in the address of the program counter selected in the selection step by the instruction storage means;
An execution step of performing data transfer between the device and the memory in accordance with the instruction output in the instruction output step;
A program corresponding to a data transfer instruction of a device having no data transfer request when a data transfer request is not output from the device as the data transfer source or data transfer destination indicated by the data transfer instruction output in the instruction output step The execution of the data transfer instruction is suspended by suppressing the selection by the selection means of the counter , and the instruction indicated by the address held by the program counter other than the program counter holding the data transfer instruction is executed by the execution step. An execution control step for executing the direct memory access apparatus.
JP2004170294A 2004-06-08 2004-06-08 Direct memory access device, control method therefor, and data processing device Expired - Fee Related JP4641391B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004170294A JP4641391B2 (en) 2004-06-08 2004-06-08 Direct memory access device, control method therefor, and data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004170294A JP4641391B2 (en) 2004-06-08 2004-06-08 Direct memory access device, control method therefor, and data processing device

Publications (2)

Publication Number Publication Date
JP2005352594A JP2005352594A (en) 2005-12-22
JP4641391B2 true JP4641391B2 (en) 2011-03-02

Family

ID=35587053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004170294A Expired - Fee Related JP4641391B2 (en) 2004-06-08 2004-06-08 Direct memory access device, control method therefor, and data processing device

Country Status (1)

Country Link
JP (1) JP4641391B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255061A (en) * 1988-04-01 1989-10-11 Hitachi Ltd Dma controller
JPH02254544A (en) * 1989-03-29 1990-10-15 Matsushita Electric Ind Co Ltd Multitask sequence processor and its starting method
JPH10177541A (en) * 1996-10-18 1998-06-30 Matsushita Electric Ind Co Ltd Data transfer device and system therefor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255061A (en) * 1988-04-01 1989-10-11 Hitachi Ltd Dma controller
JPH02254544A (en) * 1989-03-29 1990-10-15 Matsushita Electric Ind Co Ltd Multitask sequence processor and its starting method
JPH10177541A (en) * 1996-10-18 1998-06-30 Matsushita Electric Ind Co Ltd Data transfer device and system therefor

Also Published As

Publication number Publication date
JP2005352594A (en) 2005-12-22

Similar Documents

Publication Publication Date Title
KR101812569B1 (en) Mapping between registers used by multiple instruction sets
JP2651218B2 (en) Flexible ASIC microcomputer
EP0381471A2 (en) Method and apparatus for preprocessing multiple instructions in a pipeline processor
JPH09212358A (en) Data processor and microprocessor
JPH04109336A (en) Data processor
KR101913968B1 (en) Micro computer
JP2001092662A (en) Processor core and processor using the same
US6199156B1 (en) System for explicitly referencing a register for its current content when performing processor context switch
JPH10207717A (en) Microcomputer
US6363474B1 (en) Process switching register replication in a data processing system
EP1193594A2 (en) Register renaming apparatus and processor
JP4641391B2 (en) Direct memory access device, control method therefor, and data processing device
JP2754825B2 (en) Microprocessor
EP1220088A2 (en) Circuit and method for supporting misaligned accesses in the presence of speculative load instructions
JP3562215B2 (en) Microcomputer and electronic equipment
JP5062950B2 (en) Direct memory access device and control method thereof
JPH0793152A (en) Microprocessor controller
JPH08249175A (en) Method and apparatus for selective support of nonarchitectural instruction at inside of superscalar processor device
JP5328833B2 (en) Direct memory access system and control method thereof
EP1104558A1 (en) Data processor comprising a register stack
JP3077807B2 (en) Microcomputer system
US7206894B2 (en) Microcomputer application system, microcomputer, signal processing system and signal processing LSI
JP2005275703A (en) Processor, and context switching method
JPH11338735A (en) System lsi
JP3476314B2 (en) Microprocessor

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060418

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070607

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20070626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100419

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100727

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101025

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20101102

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101124

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101129

R150 Certificate of patent or registration of utility model

Ref document number: 4641391

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees