Nothing Special   »   [go: up one dir, main page]

JP5511299B2 - Data arithmetic device control circuit and data arithmetic device - Google Patents

Data arithmetic device control circuit and data arithmetic device Download PDF

Info

Publication number
JP5511299B2
JP5511299B2 JP2009239281A JP2009239281A JP5511299B2 JP 5511299 B2 JP5511299 B2 JP 5511299B2 JP 2009239281 A JP2009239281 A JP 2009239281A JP 2009239281 A JP2009239281 A JP 2009239281A JP 5511299 B2 JP5511299 B2 JP 5511299B2
Authority
JP
Japan
Prior art keywords
instruction
address
register
loop
output
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.)
Active
Application number
JP2009239281A
Other languages
Japanese (ja)
Other versions
JP2011086157A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009239281A priority Critical patent/JP5511299B2/en
Publication of JP2011086157A publication Critical patent/JP2011086157A/en
Application granted granted Critical
Publication of JP5511299B2 publication Critical patent/JP5511299B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Executing Machine-Instructions (AREA)
  • Advance Control (AREA)

Description

この発明は、一連の演算命令を演算器に繰り返し実行させる制御回路と、その制御回路と演算器を実装しているデータ演算装置とに関するものである。   The present invention relates to a control circuit that causes an arithmetic unit to repeatedly execute a series of arithmetic instructions, and a data arithmetic device in which the control circuit and the arithmetic unit are mounted.

一連の演算命令を繰り返し実行(ループ実行)するプログラムの場合、一般的に、ループの初期化部分と、演算処理の本体部分と、ループの後処理部分とから構成される。
図7は一般的なループ制御を行うプログラム例を示す説明図である。
図7のプログラムは、一連の演算命令である「命令C0〜C99」を100回ループ実行するものである。
In the case of a program that repeatedly executes a series of arithmetic instructions (loop execution), it is generally composed of a loop initialization part, a main part of arithmetic processing, and a post-processing part of the loop.
FIG. 7 is an explanatory diagram showing a program example for performing general loop control.
The program shown in FIG. 7 executes a series of “instructions C0 to C99”, which are a series of arithmetic instructions, in a loop execution 100 times.

即ち、図7のプログラムでは、ループの初期化部分において、一連の演算命令の繰り返し回数(ループ回数)として、“100”をループカウンタに設定する初期化処理を実行している。
次に、演算処理の本体部分において、一連の演算命令である「命令C0〜C99」を実行している。
ループの後処理部分では、一連の演算命令である「命令C0〜C99」が実行されると、ループカウンタのカウント値をデクリメントし、デクリメント後のカウント値が“0”であるか否かを判定する。
デクリメント後のカウント値が“0”でなければ、再度、演算処理の本体部分に戻り、デクリメント後のカウント値が“0”であれば、ループを抜けて、一連の演算命令の実行を終了する。
That is, in the program of FIG. 7, in the loop initialization part, an initialization process is executed in which “100” is set in the loop counter as the number of repetitions of a series of operation instructions (the number of loops).
Next, “instructions C0 to C99” which are a series of arithmetic instructions are executed in the main part of the arithmetic processing.
In the post-processing portion of the loop, when “instruction C0 to C99”, which is a series of operation instructions, is executed, the count value of the loop counter is decremented and it is determined whether or not the count value after decrement is “0”. To do.
If the count value after decrement is not “0”, the process returns to the main part of the arithmetic processing again. If the count value after decrement is “0”, the loop is exited and execution of a series of operation instructions is terminated. .

このとき、ループの初期化部分と後処理部分は、ループ実行を制御するための処理を実行する部分であって、実際に演算命令を実行する部分ではないため、演算処理の本体部分から見るとオーバーヘッドとなる。
特に、ループの後処理部分は、演算処理の本体部分を1回実行する毎に発生するため、ループ回数が多くなれば、その分だけオーバーヘッドも増加して性能が低下する。
At this time, the initialization part and the post-processing part of the loop are parts for executing the process for controlling the loop execution and not the part for actually executing the arithmetic instruction. Overhead.
In particular, the post-processing portion of the loop occurs every time the main body of the arithmetic processing is executed once. Therefore, if the number of loops increases, the overhead increases accordingly and the performance deteriorates.

以下の非特許文献1には、ループ制御による性能低下を抑制する方法として、“ループアンローリング”が開示されている。
“ループアンローリング”は、本来のループ1回分の演算処理を数回分まとめて新たな演算処理の本体部分を生成することで、ループの繰り返し回数を削減するものである。
これにより、トータルのオーバーヘッドが削減されて、データ演算の高速化を図ることができるが、ループの繰り返し回数を削減する分だけ、演算処理の本体部分の命令数が増加する。
Non-Patent Document 1 below discloses “loop unrolling” as a method of suppressing performance degradation due to loop control.
“Loop unrolling” is to reduce the number of iterations of a loop by creating a main part of a new operation process by combining a number of operations for one original loop.
As a result, the total overhead can be reduced and the speed of data operation can be increased. However, the number of instructions in the main part of the operation processing increases as the number of loop iterations is reduced.

例えば、一連の演算処理を100回繰り返すループ実行のオーバーヘッドを削減するために、“ループアンローリング”によって、4回分の演算処理をまとめて新たな演算処理の本体部分を生成すると、ループの繰り返し回数が4分の1の25回に削減されるため、ループ制御によるオーバーヘッドが4分の1に削減される。
ただし、4回分の演算処理をまとめれば、演算処理の本体部分の命令数が4倍に増加して、プログラム量が増加することになる。
For example, in order to reduce the overhead of loop execution that repeats a series of arithmetic processes 100 times, if “loop unrolling” is used to generate a main part of the arithmetic process by combining four arithmetic processes, the number of loop iterations Is reduced to 25 times, which is a quarter, so that the overhead due to loop control is reduced to a quarter.
However, if the arithmetic processing for four times is put together, the number of instructions in the main part of the arithmetic processing increases four times and the program amount increases.

なお、以下の特許文献1には、ループ情報にしたがってループ実行を行う専用のループ制御回路を設けているデータ演算装置が開示されている。   The following Patent Document 1 discloses a data arithmetic device provided with a dedicated loop control circuit that performs loop execution according to loop information.

特表2006−508447号公報JP-T-2006-508447

曽和将容著、「コンピュータアーキテクチャ原理」、コロナ社、1993年8月20日発行、初版第1版、pp.110−112Masakazu Suwa, “Computer Architecture Principles”, Corona, published on August 20, 1993, first edition, first edition, pp. 110-112

従来のデータ演算装置の制御回路は以上のように構成されているので、ループ実行を行う専用のループ制御回路を設ければ、“ループアンローリング”のように、プログラム量の増加を招くことなく、ループ制御によるオーバーヘッドを削減することができる。しかし、ループ実行を伴わない演算命令の実行を制御する一般的な制御回路の他に、専用のループ制御回路を設ける必要があるため、ハードウェア規模の大型化を招いてしまうなどの課題があった。   Since the control circuit of the conventional data operation device is configured as described above, if a dedicated loop control circuit for performing loop execution is provided, the program amount does not increase as in “loop unrolling”. The overhead due to loop control can be reduced. However, it is necessary to provide a dedicated loop control circuit in addition to a general control circuit that controls the execution of arithmetic instructions that do not involve loop execution, resulting in an increase in hardware scale. It was.

この発明は上記のような課題を解決するためになされたもので、専用のループ制御回路を設けることなく、僅かなプログラム量の増加だけで、ループ制御によるオーバーヘッドを削減することができるデータ演算装置の制御回路及びデータ演算装置を得ることを目的とする。   The present invention has been made to solve the above-described problems, and is a data arithmetic apparatus capable of reducing the overhead due to loop control by providing only a slight increase in the program amount without providing a dedicated loop control circuit. It is an object to obtain a control circuit and a data operation device.

この発明に係るデータ演算装置の制御回路は、初期設定手段により設定されたスタートアドレスを読み出しアドレスに設定して、その読み出しアドレスを出力し、その後、その読み出しアドレスをインクリメントして、インクリメント後の読み出しアドレスを出力する処理を繰り返し実施するアドレス出力手段と、初期設定手段により設定された繰り返しの有無が“有”である場合、アドレス出力手段から出力された読み出しアドレスが初期設定手段により設定されたエンドアドレスと一致すると、1ループ終了通知を出力するとともに、現時点までに演算終了指示が出力されていなければ、アドレス出力手段により設定された読み出しアドレスをスタートアドレスに戻して、アドレス出力処理の継続をアドレス出力手段に指示し、初期設定手段により設定された繰り返しの有無が“無”である場合、アドレス出力手段から出力された読み出しアドレスが初期設定手段により設定されたエンドアドレスと一致すると、アドレス出力処理の停止をアドレス出力手段に指示する繰り返し処理制御手段とを設け、演算終了判定手段が、繰り返し処理制御手段による1ループ終了通知の出力回数と初期設定手段により設定された繰り返し回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に演算終了指示を繰り返し処理制御手段に出力するようにしたものである。   The control circuit of the data arithmetic device according to the present invention sets the start address set by the initial setting means to the read address, outputs the read address, then increments the read address, and reads after the increment If the presence / absence of the repetition set by the initial setting means and the address output means for repeatedly performing the process of outputting the address is “Yes”, the read address output from the address output means is the end set by the initial setting means. If it matches the address, a one-loop end notification is output, and if no operation end instruction has been output so far, the read address set by the address output means is returned to the start address, and the continuation of the address output processing is addressed. Instruct the output means and make initial settings When the presence / absence of repetition set by the stage is “None”, when the read address output from the address output means matches the end address set by the initial setting means, the address output means is instructed to stop address output processing. Whether or not the calculation end determination means ends the repetition calculation by comparing the number of outputs of one loop end notification by the repetition processing control means with the number of repetitions set by the initial setting means. When the determination is made and the repetitive calculation is ended, a calculation end instruction is output to the repetitive processing control means.

この発明によれば、初期設定手段により設定されたスタートアドレスを読み出しアドレスに設定して、その読み出しアドレスを出力し、その後、その読み出しアドレスをインクリメントして、インクリメント後の読み出しアドレスを出力する処理を繰り返し実施するアドレス出力手段と、初期設定手段により設定された繰り返しの有無が“有”である場合、アドレス出力手段から出力された読み出しアドレスが初期設定手段により設定されたエンドアドレスと一致すると、1ループ終了通知を出力するとともに、現時点までに演算終了指示が出力されていなければ、アドレス出力手段により設定された読み出しアドレスをスタートアドレスに戻して、アドレス出力処理の継続をアドレス出力手段に指示し、初期設定手段により設定された繰り返しの有無が“無”である場合、アドレス出力手段から出力された読み出しアドレスが初期設定手段により設定されたエンドアドレスと一致すると、アドレス出力処理の停止をアドレス出力手段に指示する繰り返し処理制御手段とを設け、演算終了判定手段が、繰り返し処理制御手段による1ループ終了通知の出力回数と初期設定手段により設定された繰り返し回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に演算終了指示を繰り返し処理制御手段に出力するように構成したので、専用のループ制御回路を設けることなく、僅かなプログラム量の増加だけで、ループ制御によるオーバーヘッドを削減することができる効果がある。   According to this invention, the start address set by the initial setting means is set as a read address, the read address is output, the read address is incremented, and the incremented read address is output. When the address output means to be repeatedly executed and the presence / absence of repetition set by the initial setting means are “present”, if the read address output from the address output means matches the end address set by the initial setting means, 1 A loop end notification is output, and if an operation end instruction has not been output by the present time, the read address set by the address output unit is returned to the start address, and the address output unit is instructed to continue the address output process. Repeat set by the initial setting means In the case where the presence / absence of the address is “None”, when the read address output from the address output unit coincides with the end address set by the initial setting unit, the repetitive process control unit instructs the address output unit to stop the address output process The calculation end determination means compares the number of outputs of one-loop end notification by the repetition processing control means with the number of repetitions set by the initial setting means, determines whether or not to end the repetition calculation, and repeats the calculation. Since the calculation end instruction is repeatedly output to the processing control means when ending the process, the overhead due to the loop control can be reduced with only a slight increase in the program amount without providing a dedicated loop control circuit. There is an effect that can be done.

この発明の実施の形態1によるデータ演算装置を示す構成図である。It is a block diagram which shows the data arithmetic device by Embodiment 1 of this invention. 演算用命令メモリ32により格納されている一連の演算命令を示す説明図である。4 is an explanatory diagram showing a series of operation instructions stored in an operation instruction memory 32. FIG. シーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。It is explanatory drawing which shows the command in the program for sequence control stored by the command memory 12 for sequence control. シーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。It is explanatory drawing which shows the command in the program for sequence control stored by the command memory 12 for sequence control. この発明の実施の形態3によるデータ演算装置を示す構成図である。It is a block diagram which shows the data arithmetic device by Embodiment 3 of this invention. シーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。It is explanatory drawing which shows the command in the program for sequence control stored by the command memory 12 for sequence control. 一般的なループ制御を行うプログラム例を示す説明図である。It is explanatory drawing which shows the example of a program which performs general loop control.

実施の形態1.
図1はこの発明の実施の形態1によるデータ演算装置を示す構成図である。
図1において、制御回路1はシーケンス制御用のプログラムを実行することで、一連の演算命令を演算器2に発行して、演算器2の演算結果を取得する処理を実施する。
演算器2は制御回路1から発行された演算命令を実行して、その演算命令の演算結果を制御回路1に返す処理を実施する。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a data operation apparatus according to Embodiment 1 of the present invention.
In FIG. 1, the control circuit 1 executes a sequence control program, thereby issuing a series of arithmetic instructions to the arithmetic unit 2 and executing a process of acquiring the arithmetic result of the arithmetic unit 2.
The arithmetic unit 2 executes a calculation instruction issued from the control circuit 1 and performs a process of returning the calculation result of the calculation instruction to the control circuit 1.

シーケンス制御部11はシーケンス制御用のプログラム内の命令が、演算用命令メモリ32に格納されている一連の演算命令を演算器2に実行させる演算開始命令であれば、一連の演算命令の中の先頭の演算命令が格納されている演算用命令メモリ32内のアドレスを示すスタートアドレスをレジスタ群22のスタートアドレスレジスタ22bに設定するとともに、一連の演算命令の中の最後の演算命令が格納されている演算用命令メモリ32内のアドレスを示すエンドアドレスをレジスタ群22のエンドアドレスレジスタ22cに設定し、また、一連の演算命令の繰り返しの有無を示すループ指示(ON/OFF)をレジスタ群22のループ指示レジスタ22aに設定する処理を実施する。また、シーケンス制御用のプログラム内の命令が、一連の演算命令の繰り返し回数(以下、「ループ回数」と称する)を設定する設定命令であれば、ループ回数を汎用レジスタ15に設定する処理を実施する。
また、シーケンス制御部11は演算器制御部21における演算命令の発行処理と並行して、ループ制御の後処理として、繰り返し演算(ループ実行)を終了するか否かを判定する処理を実施する。即ち、PC制御部23による「1ループ終了通知」の出力回数とループ回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に「演算終了指示」をPC制御部23に出力する処理を実施する。
If the instruction in the sequence control program is an operation start instruction that causes the arithmetic unit 2 to execute a series of operation instructions stored in the operation instruction memory 32, the sequence control unit 11 A start address indicating an address in the operation instruction memory 32 in which the first operation instruction is stored is set in the start address register 22b of the register group 22, and the last operation instruction in the series of operation instructions is stored. An end address indicating an address in the operation instruction memory 32 is set in the end address register 22c of the register group 22, and a loop instruction (ON / OFF) indicating whether a series of operation instructions is repeated is set in the register group 22. Processing to set in the loop instruction register 22a is performed. Also, if the instruction in the program for sequence control is a setting instruction that sets the number of repetitions of a series of arithmetic instructions (hereinafter referred to as “loop number”), a process of setting the loop number in the general-purpose register 15 is performed. To do.
In addition, the sequence control unit 11 performs a process of determining whether or not to end the repetitive calculation (loop execution) as a post-process of the loop control in parallel with the calculation instruction issuance process in the arithmetic unit control unit 21. That is, the PC control unit 23 compares the number of outputs of “1 loop end notification” with the number of loops to determine whether or not to end the repetitive calculation. When the repetitive calculation is ended, the “control end instruction” is controlled by the PC. The process of outputting to the unit 23 is performed.

シーケンス制御用命令メモリ12はシーケンス制御用のプログラムを格納している記録媒体である。
なお、シーケンス制御用のプログラムには、演算用命令メモリ32に格納されている一連の演算命令を演算器2に実行させる演算開始命令(スタートアドレス、エンドアドレス、ループ指示(ON/OFF)を含む命令)のほか、ループ回数を汎用レジスタ15に設定するための命令や、ループ制御の後処理として、繰り返し演算(ループ実行)を終了するか否かを判定するための命令や、内部演算器14が実行する単一演算命令(単一演算命令は、シーケンス制御に必要な演算を行う命令であり、例えば、2値の加算、減算、乗算、比較、レジスタの読み書きなどの命令が該当する)などが含まれている。
The sequence control instruction memory 12 is a recording medium storing a sequence control program.
The sequence control program includes a calculation start instruction (start address, end address, loop instruction (ON / OFF)) that causes the calculator 2 to execute a series of calculation instructions stored in the calculation instruction memory 32. In addition to an instruction), an instruction for setting the number of loops in the general-purpose register 15, an instruction for determining whether to repeat operation (loop execution) as post-processing of loop control, and an internal arithmetic unit 14 Single operation instructions executed by (single operation instructions are instructions that perform operations necessary for sequence control, such as instructions for binary addition, subtraction, multiplication, comparison, and register read / write) It is included.

演算器制御指示生成回路13はシーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令が、演算用命令メモリ32に格納されている一連の演算命令を演算器2に実行させる演算開始命令であれば、書き込みイネーブルをレジスタ群22に出力することで、その演算開始命令のオペランドであるスタートアドレスをレジスタ群22のスタートアドレスレジスタ22bに設定し、その演算開始命令のオペランドであるエンドアドレスをレジスタ群22のエンドアドレスレジスタ22cに設定し、また、その演算開始命令のオペランドであるループ指示(ON/OFF)をレジスタ群22のループ指示レジスタ22aに設定する処理を実施する。
また、演算器制御指示生成回路13はスタートアドレス等の設定を完了したのち、内部演算器14の指示の下、「演算開始指示」又は「演算終了指示」をPC制御部23に出力する一方、PC制御部23から出力された「1ループ終了通知」を内部演算器14に転送する処理を実施する。
なお、演算器制御指示生成回路13は初期設定手段を構成している。
The arithmetic unit control instruction generation circuit 13 causes the arithmetic unit 2 to execute a series of arithmetic instructions stored in the arithmetic instruction memory 32 according to instructions in the sequence control program stored in the sequence control instruction memory 12. If it is an operation start instruction, a write enable is output to the register group 22 to set a start address that is an operand of the operation start instruction in the start address register 22b of the register group 22, and is an operand of the operation start instruction. An end address is set in the end address register 22c of the register group 22, and a loop instruction (ON / OFF) that is an operand of the operation start instruction is set in the loop instruction register 22a of the register group 22.
Further, after completing the setting of the start address and the like, the arithmetic unit control instruction generation circuit 13 outputs “calculation start instruction” or “calculation end instruction” to the PC control unit 23 under the instruction of the internal arithmetic unit 14, A process of transferring the “1 loop end notification” output from the PC control unit 23 to the internal computing unit 14 is performed.
The calculator control instruction generation circuit 13 constitutes an initial setting means.

内部演算器14はシーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令が、ループ回数を設定する設定命令であれば、ループ回数を汎用レジスタ15に設定し、シーケンス制御用のプログラム内の命令が、単一演算命令であれば、その単一演算命令にしたがって単一演算を実行し、その演算結果を汎用レジスタ15に格納する処理を実施する。
また、内部演算器14はシーケンス制御用のプログラム内の命令が、ループ制御の後処理部分に相当する「do−while命令」であれば、演算器制御指示生成回路13による「1ループ終了通知」の転送回数と汎用レジスタ15に設定しているループ回数を比較して繰り返し演算(ループ実行)を終了するか否かを判定し、繰り返し演算を終了する際に、演算器制御指示生成回路13を介して、「演算終了指示」をPC制御部23に出力する処理を実施する。
さらに、内部演算器14は演算器2から返された演算結果を用いて、所定のシーケンス制御を実行する。
なお、内部演算器14は演算終了判定手段を構成している。
汎用レジスタ15はループ回数や単一演算の演算結果などを格納する記録媒体である。
If the instruction in the sequence control program stored in the sequence control instruction memory 12 is a setting instruction for setting the number of loops, the internal arithmetic unit 14 sets the number of loops in the general-purpose register 15 and is used for sequence control. If the instruction in the program is a single operation instruction, a single operation is executed in accordance with the single operation instruction, and the result of storing the operation result in the general-purpose register 15 is executed.
Further, if the instruction in the sequence control program is a “do-while instruction” corresponding to a post-processing part of the loop control, the internal calculator 14 performs “1 loop end notification” by the calculator control instruction generation circuit 13. Is compared with the number of loops set in the general-purpose register 15 to determine whether or not to end the repetitive operation (loop execution). Then, a process of outputting an “arithmetic end instruction” to the PC control unit 23 is performed.
Further, the internal computing unit 14 executes a predetermined sequence control using the computation result returned from the computing unit 2.
The internal computing unit 14 constitutes a computation end judging means.
The general-purpose register 15 is a recording medium that stores the number of loops and the result of a single operation.

演算器制御部21はレジスタ群22、PC制御部23及び命令発行部31から構成されており、シーケンス制御部11の指示の下、一連の演算命令を演算器2に発行する処理を実施する。
レジスタ群22はループ指示(ON/OFF)を格納するループ指示レジスタ22aと、スタートアドレスを格納するスタートアドレスレジスタ22bと、エンドアドレスを格納するエンドアドレスレジスタ22cとから構成されている記録媒体である
PC制御部23はレジスタ群22を参照して、演算用命令メモリ32に格納されている演算命令を読み出すための読み出しアドレスを生成する処理を実施する。
The computing unit control unit 21 includes a register group 22, a PC control unit 23, and an instruction issuing unit 31, and performs a process of issuing a series of computing instructions to the computing unit 2 under the instruction of the sequence control unit 11.
The register group 22 is a recording medium including a loop instruction register 22a for storing a loop instruction (ON / OFF), a start address register 22b for storing a start address, and an end address register 22c for storing an end address. The PC control unit 23 refers to the register group 22 and performs a process of generating a read address for reading the operation instruction stored in the operation instruction memory 32.

フラグ生成回路24は演算器制御指示生成回路13から「演算開始指示」が出力されると、実行フラグレジスタ25に“有効”(“1”)を設定し、また、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する処理を実施する。
また、フラグ生成回路24は現PCレジスタ29のレジスタ値(初期状態では、レジスタ値は“0”)が上記差分値に到達すると、ループ指示レジスタ22aに格納されているループ指示が「ON」である場合、演算終了フラグレジスタ26が“無効”(“0”)であれば、実行フラグレジスタ25に設定されている“有効”(“1”)を維持し、演算終了フラグレジスタ26が“有効”(“1”)であれば、実行フラグレジスタ25に設定されている“有効”(“1”)を“無効”(“0”)に変更する処理を実施する。
一方、ループ指示レジスタ22aに格納されているループ指示が「OFF」である場合、実行フラグレジスタ25に設定されている“有効”(“1”)を“無効”(“0”)に変更する処理を実施する。
また、フラグ生成回路24は演算器制御指示生成回路13から「演算終了指示」が出力されると、演算終了フラグレジスタ26に“有効”(“1”)を設定する処理を実施する。
When the “calculation start instruction” is output from the arithmetic unit control instruction generation circuit 13, the flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25 and also starts the start address from the start address register 22 b. , The end address is acquired from the end address register 22c, and the start address is subtracted from the end address to calculate a difference value (end address-start address).
When the register value of the current PC register 29 (the register value is “0” in the initial state) reaches the difference value, the flag generation circuit 24 sets the loop instruction stored in the loop instruction register 22a to “ON”. In some cases, if the operation end flag register 26 is “invalid” (“0”), “valid” (“1”) set in the execution flag register 25 is maintained, and the operation end flag register 26 is “valid”. If “” (“1”), a process of changing “valid” (“1”) set in the execution flag register 25 to “invalid” (“0”) is performed.
On the other hand, when the loop instruction stored in the loop instruction register 22a is “OFF”, “valid” (“1”) set in the execution flag register 25 is changed to “invalid” (“0”). Perform the process.
Further, the flag generation circuit 24 executes a process of setting “valid” (“1”) in the calculation end flag register 26 when the “calculation end instruction” is output from the arithmetic unit control instruction generation circuit 13.

実行フラグレジスタ25は初期状態では“無効”(“0”)が設定されており、フラグ生成回路24によって、適宜設定状態が変更される。
演算終了フラグレジスタ26は初期状態では“無効”(“0”)が設定されており、フラグ生成回路24によって、適宜設定状態が変更される。
The execution flag register 25 is set to “invalid” (“0”) in the initial state, and the setting state is appropriately changed by the flag generation circuit 24.
The operation end flag register 26 is set to “invalid” (“0”) in the initial state, and the setting state is appropriately changed by the flag generation circuit 24.

PC生成回路27はスタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する処理を実施する。
また、PC生成回路27は実行フラグレジスタ25が“有効”(“1”)である場合、次PCレジスタ28のレジスタ値(初期状態では、レジスタ値は“0”)を現PCレジスタ29に設定し、現PCレジスタ29のレジスタ値が上記差分値と一致しなければ、次PCレジスタ28のレジスタ値を1だけインクリメントする処理を実施する。
一方、現PCレジスタ29のレジスタ値が上記差分値と一致すれば、次PCレジスタ28のレジスタ値を“0”にクリアするとともに、「1ループ終了通知」を演算器制御指示生成回路13に出力する処理を実施する。
The PC generation circuit 27 obtains the start address from the start address register 22b, obtains the end address from the end address register 22c, and subtracts the start address from the end address to calculate a difference value (end address-start address). Perform the process.
The PC generation circuit 27 sets the register value of the next PC register 28 (the register value is “0” in the initial state) in the current PC register 29 when the execution flag register 25 is “valid” (“1”). If the register value of the current PC register 29 does not match the difference value, a process of incrementing the register value of the next PC register 28 by 1 is performed.
On the other hand, if the register value of the current PC register 29 matches the difference value, the register value of the next PC register 28 is cleared to “0” and “1 loop end notification” is output to the arithmetic unit control instruction generation circuit 13. Perform the process.

次PCレジスタ28は初期状態ではカウント値が“0”に設定されており、そのカウント値がPC生成回路27によって1ずつインクリメントされ、あるいは、“0”にクリアされる。
現PCレジスタ29は初期状態ではカウント値が“0”に設定されており、そのカウント値がPC生成回路27によって次PCレジスタ28のレジスタ値に設定される。
アドレス生成回路30はスタートアドレスレジスタ22bからスタートアドレスを取得するとともに、現PCレジスタ29のレジスタ値を取得し、そのスタートアドレスと現PCレジスタ29のレジスタ値との加算値を読み出しアドレスとして命令発行部31に出力する処理を実施する。
The count value of the next PC register 28 is set to “0” in the initial state, and the count value is incremented by 1 by the PC generation circuit 27 or cleared to “0”.
The count value of the current PC register 29 is set to “0” in the initial state, and the count value is set to the register value of the next PC register 28 by the PC generation circuit 27.
The address generation circuit 30 acquires the start address from the start address register 22b, acquires the register value of the current PC register 29, and uses the addition value of the start address and the register value of the current PC register 29 as a read address to issue an instruction. The process which outputs to 31 is implemented.

なお、PC生成回路27、次PCレジスタ28、現PCレジスタ29及びアドレス生成回路30からアドレス出力手段が構成されている。
また、フラグ生成回路24、実行フラグレジスタ25、演算終了フラグレジスタ26、PC生成回路27、次PCレジスタ28及び現PCレジスタ29から繰り返し処理制御手段が構成されている。
The PC output circuit 27, the next PC register 28, the current PC register 29, and the address generation circuit 30 constitute address output means.
The flag generation circuit 24, the execution flag register 25, the operation end flag register 26, the PC generation circuit 27, the next PC register 28, and the current PC register 29 constitute a repetitive processing control means.

命令発行部31は実行フラグレジスタ25が“有効”(“1”)である場合、演算用命令メモリ32に格納されている演算命令の中から、アドレス生成回路30から出力された読み出しアドレスに対応する演算命令を読み出し、その演算命令を演算器2に発行する処理を実施する。なお、命令発行部31は命令発行手段を構成している。
演算用命令メモリ32は演算器2に発行する一連の演算命令を格納している記録媒体である。
When the execution flag register 25 is “valid” (“1”), the instruction issuing unit 31 corresponds to the read address output from the address generation circuit 30 among the arithmetic instructions stored in the arithmetic instruction memory 32. The operation instruction to be read is read and the operation instruction is issued to the computing unit 2. The instruction issuing unit 31 constitutes an instruction issuing unit.
The calculation instruction memory 32 is a recording medium that stores a series of calculation instructions issued to the calculator 2.

ここで、図2は演算用命令メモリ32により格納されている一連の演算命令を示す説明図である。
図3はシーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。
図3では、PROC_C(命令C0〜C99)を100回繰り返し実行し、PROC_D(命令D0〜D44)を1回実行する例を示している。
Here, FIG. 2 is an explanatory diagram showing a series of operation instructions stored in the operation instruction memory 32.
FIG. 3 is an explanatory diagram showing instructions in the sequence control program stored in the sequence control instruction memory 12.
FIG. 3 shows an example in which PROC_C (instructions C0 to C99) is repeatedly executed 100 times and PROC_D (instructions D0 to D44) is executed once.

次に動作について説明する。
この実施の形態1では、説明の便宜上、シーケンス制御用のプログラム内の命令が図3の命令であり、演算用命令メモリ32により格納されている一連の演算命令が図2の命令であるものとして説明する。
Next, the operation will be described.
In the first embodiment, for convenience of explanation, it is assumed that the instructions in the program for sequence control are the instructions in FIG. 3, and the series of arithmetic instructions stored in the arithmetic instruction memory 32 are the instructions in FIG. explain.

制御回路1は、処理開始前に初期化され、レジスタ群22のループ指示レジスタ22a、スタートアドレスレジスタ22b及びエンドアドレスレジスタ22cには“0”が設定される。
また、実行フラグレジスタ25及び演算終了フラグレジスタ26には、“無効”(“0”)が設定され、次PCレジスタ28及び現PCレジスタ29のカウント値には、“0”が設定される。
The control circuit 1 is initialized before the processing starts, and “0” is set in the loop instruction register 22a, the start address register 22b, and the end address register 22c of the register group 22.
Further, “invalid” (“0”) is set in the execution flag register 25 and the operation end flag register 26, and “0” is set in the count values of the next PC register 28 and the current PC register 29.

シーケンス制御部11は、シーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラムを読み込み、そのプログラム内の命令を解析する。
図3の例では、最初に、PROC_C(命令C0〜C99)を100回繰り返すために、ループ回数を設定する設定命令(図3では、“ループカウンタを100に設定する”と記述されている)がプログラムに記述されているので、シーケンス制御部11の内部演算器14は、その設定命令にしたがってループ回数を汎用レジスタ15に設定する。
図3の例では、ループ回数として、“100”を汎用レジスタ15に設定する。
The sequence control unit 11 reads a sequence control program stored in the sequence control instruction memory 12 and analyzes instructions in the program.
In the example of FIG. 3, first, a setting command for setting the number of loops in order to repeat PROC_C (commands C0 to C99) 100 times (in FIG. 3, “setting the loop counter to 100” is described). Is described in the program, the internal arithmetic unit 14 of the sequence control unit 11 sets the number of loops in the general-purpose register 15 in accordance with the setting instruction.
In the example of FIG. 3, “100” is set in the general-purpose register 15 as the number of loops.

次に、PROC_C(命令C0〜C99)の演算開始命令(記述(1))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、その演算開始命令のオペランド(スタートアドレス、エンドアドレス、ループ指示(ON/OFF))をレジスタ群22に設定する。
図3の例では、演算器制御指示生成回路13が書き込みイネーブルをレジスタ群22に出力することにより、スタートアドレス=0x0110をスタートアドレスレジスタ22bに設定し、エンドアドレス=0x0173をエンドアドレスレジスタ22cに設定し、また、ループ指示(LOOP=ON)をループ指示レジスタ22aに設定する。
Next, since the operation start instruction (description (1)) of PROC_C (instructions C0 to C99) is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the operand (start address, end address, loop instruction (ON / OFF)) of the operation start instruction is set in the register group 22.
In the example of FIG. 3, the arithmetic unit control instruction generation circuit 13 outputs a write enable to the register group 22, thereby setting the start address = 0x0110 in the start address register 22b and the end address = 0x0173 in the end address register 22c. In addition, a loop instruction (LOOP = ON) is set in the loop instruction register 22a.

ここで、スタートアドレス=0x0110は、演算用命令メモリ32に格納されている命令C0(ループ先頭の演算命令)のアドレスを示し、エンドアドレス=0x0173は、演算用命令メモリ32に格納されている命令C99(ループ最後の演算命令)のアドレスを示している。また、ループ指示(LOOP=ON)は、ループ実行を行う旨を示している。
したがって、この演算開始命令は、命令C0〜C99のループ実行を意味している。
演算器制御指示生成回路13は、スタートアドレス等の設定を完了したのち、内部演算器14の指示の下、「演算開始指示」をPC制御部23のフラグ生成回路24に出力する。
Here, the start address = 0x0110 indicates the address of the instruction C0 (the operation instruction at the head of the loop) stored in the operation instruction memory 32, and the end address = 0x0173 is the instruction stored in the operation instruction memory 32. The address of C99 (the last calculation instruction of the loop) is shown. The loop instruction (LOOP = ON) indicates that loop execution is performed.
Therefore, this operation start instruction means loop execution of the instructions C0 to C99.
After completing the setting of the start address and the like, the arithmetic unit control instruction generation circuit 13 outputs “calculation start instruction” to the flag generation circuit 24 of the PC control unit 23 under the instruction of the internal arithmetic unit 14.

フラグ生成回路24は、演算器制御指示生成回路13から「演算開始指示」が出力されると、実行フラグレジスタ25に“有効”(“1”)を設定する。
また、フラグ生成回路24は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する。
この例では、スタートアドレス=0x0110、エンドアドレス=0x0173であるため、差分値(エンドアドレス−スタートアドレス)は“99”となる。
なお、この差分値は、フラグ生成回路24により、後で、現PCレジスタ29のレジスタ値と比較されるものであるため、内部のメモリ等に保持される。
The flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25 when the “calculation start instruction” is output from the arithmetic unit control instruction generation circuit 13.
Further, the flag generation circuit 24 acquires the start address from the start address register 22b, acquires the end address from the end address register 22c, subtracts the start address from the end address, and calculates a difference value (end address−start address). ) Is calculated.
In this example, since the start address = 0x0110 and the end address = 0x0173, the difference value (end address−start address) is “99”.
The difference value is stored in an internal memory or the like because it is compared later with the register value of the current PC register 29 by the flag generation circuit 24.

PC生成回路27は、フラグ生成回路24が実行フラグレジスタ25に“有効”(“1”)を設定すると、下記に示すレジスタ値の更新処理を開始する。
即ち、PC生成回路27は、フラグ生成回路24が実行フラグレジスタ25に“有効”(“1”)を設定すると、フラグ生成回路24と同様に、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する。ここでは、PC生成回路27が差分値を算出しているが、フラグ生成回路24により算出された差分値を取得するようにしてもよい。あるいは、PC生成回路27が算出した差分値をフラグ生成回路24に与えるようにしてもよい。
また、PC生成回路27は、実行フラグレジスタ25が“有効”(“1”)である場合、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“0”であるため、現PCレジスタ29のレジスタ値を“0”に設定する。
When the flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25, the PC generation circuit 27 starts a register value update process described below.
That is, when the flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25, the PC generation circuit 27 acquires the start address from the start address register 22b, as in the flag generation circuit 24, and The end address is obtained from the end address register 22c, and the start address is subtracted from the end address to calculate a difference value (end address-start address). Here, the PC generation circuit 27 calculates the difference value, but the difference value calculated by the flag generation circuit 24 may be acquired. Alternatively, the difference value calculated by the PC generation circuit 27 may be given to the flag generation circuit 24.
The PC generation circuit 27 sets the register value of the next PC register 28 in the current PC register 29 when the execution flag register 25 is “valid” (“1”).
At this time, since the register value of the next PC register 28 is “0”, the register value of the current PC register 29 is set to “0”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“0”であり、差分値は“99”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致しないので、次PCレジスタ28のレジスタ値を1だけインクリメントする。
この時点では、次PCレジスタ28のレジスタ値は“1”となる。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “0”, and the difference value is “99”.
The PC generation circuit 27 increments the register value of the next PC register 28 by 1 because the register value of the current PC register 29 does not match the difference value.
At this time, the register value of the next PC register 28 is “1”.

アドレス生成回路30は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、現PCレジスタ29のレジスタ値を取得し、そのスタートアドレスと現PCレジスタ29のレジスタ値とを加算する。
この時点では、現PCレジスタ29のレジスタ値は“0”であり、スタートアドレス=0x0110であるため、そのスタートアドレスとレジスタ値の加算値は、“0x0110”となる。
アドレス生成回路30は、その加算値“0x0110”を読み出しアドレスとして、命令発行部31に出力する。
The address generation circuit 30 acquires the start address from the start address register 22b, acquires the register value of the current PC register 29, and adds the start address and the register value of the current PC register 29.
At this time, since the register value of the current PC register 29 is “0” and the start address = 0x0110, the added value of the start address and the register value is “0x0110”.
The address generation circuit 30 outputs the addition value “0x0110” to the instruction issuing unit 31 as a read address.

命令発行部31は、実行フラグレジスタ25が“有効”(“1”)である場合、演算用命令メモリ32に格納されている演算命令の中から、アドレス生成回路30から出力された読み出しアドレスに対応する演算命令の読み出しを行う。
この時点では、読み出しアドレスが“0x0110”であるため、演算用命令メモリ32から“0x0110”に対応する命令C0の読み出しを行う。
命令発行部31は、演算命令である命令C0の読み出しを行うと、その命令C0を演算器2に発行する。
演算器2は、命令発行部31から命令C0が発行されると、命令C0を実行して、命令C0の演算結果を制御回路1のシーケンス制御部11に出力する。
When the execution flag register 25 is “valid” (“1”), the instruction issuing unit 31 sets the read address output from the address generation circuit 30 from among the operation instructions stored in the operation instruction memory 32. Read the corresponding operation instruction.
At this time, since the read address is “0x0110”, the instruction C0 corresponding to “0x0110” is read from the operation instruction memory 32.
The instruction issuing unit 31 issues the instruction C0 to the computing unit 2 when reading the instruction C0 that is an operation instruction.
When the instruction C0 is issued from the instruction issuing unit 31, the arithmetic unit 2 executes the instruction C0 and outputs the calculation result of the instruction C0 to the sequence control unit 11 of the control circuit 1.

PC生成回路27は、アドレス生成回路30が読み出しアドレス“0x0110”を命令発行部31に出力すると、引き続き、実行フラグレジスタ25が“有効”(“1”)であることを確認し、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“1”であるため、現PCレジスタ29のレジスタ値を“1”に設定する。
When the address generation circuit 30 outputs the read address “0x0110” to the instruction issuing unit 31, the PC generation circuit 27 continues to confirm that the execution flag register 25 is “valid” (“1”), and the next PC register 28 register values are set in the current PC register 29.
At this time, since the register value of the next PC register 28 is “1”, the register value of the current PC register 29 is set to “1”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“1”であり、差分値は“99”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致しないので、次PCレジスタ28のレジスタ値を1だけインクリメントする。
この時点では、次PCレジスタ28のレジスタ値は“2”となる。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “1”, and the difference value is “99”.
The PC generation circuit 27 increments the register value of the next PC register 28 by 1 because the register value of the current PC register 29 does not match the difference value.
At this time, the register value of the next PC register 28 is “2”.

アドレス生成回路30は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、現PCレジスタ29のレジスタ値を取得し、そのスタートアドレスと現PCレジスタ29のレジスタ値とを加算する。
この時点では、現PCレジスタ29のレジスタ値は“1”であり、スタートアドレス=0x0110であるため、そのスタートアドレスとレジスタ値の加算値は、“0x0111”となる。
アドレス生成回路30は、その加算値“0x0111”を読み出しアドレスとして、命令発行部31に出力する。
The address generation circuit 30 acquires the start address from the start address register 22b, acquires the register value of the current PC register 29, and adds the start address and the register value of the current PC register 29.
At this time, since the register value of the current PC register 29 is “1” and the start address = 0x0110, the added value of the start address and the register value is “0x0111”.
The address generation circuit 30 outputs the added value “0x0111” to the instruction issuing unit 31 as a read address.

命令発行部31は、実行フラグレジスタ25が“有効”(“1”)である場合、演算用命令メモリ32に格納されている演算命令の中から、アドレス生成回路30から出力された読み出しアドレスに対応する演算命令の読み出しを行う。
この時点では、読み出しアドレスが“0x0111”であるため、演算用命令メモリ32から“0x0111”に対応する命令C1の読み出しを行う。
命令発行部31は、演算命令である命令C1の読み出しを行うと、その命令C1を演算器2に発行する。
演算器2は、命令発行部31から命令C1が発行されると、命令C1を実行して、命令C1の演算結果を制御回路1のシーケンス制御部11に出力する。
When the execution flag register 25 is “valid” (“1”), the instruction issuing unit 31 sets the read address output from the address generation circuit 30 from among the operation instructions stored in the operation instruction memory 32. Read the corresponding operation instruction.
At this time, since the read address is “0x0111”, the instruction C1 corresponding to “0x0111” is read from the operation instruction memory 32.
The instruction issuing unit 31 issues the instruction C1 to the computing unit 2 when reading the instruction C1 that is an operation instruction.
When the instruction C1 is issued from the instruction issuing unit 31, the arithmetic unit 2 executes the instruction C1 and outputs the calculation result of the instruction C1 to the sequence control unit 11 of the control circuit 1.

以降、現PCレジスタ29のレジスタ値が“98”になるまで、PC生成回路27、アドレス生成回路30、命令発行部31及び演算器2が同様の処理を繰り返し実施する。
これにより、命令C2〜C98が演算器2により実行されて、命令C2〜C98の演算結果が制御回路1のシーケンス制御部11に出力される。
この時点では、次PCレジスタ28のレジスタ値は“99”であり、現PCレジスタ29のレジスタ値は“98”である。
また、読み出しアドレスは“0x0172”である。
Thereafter, until the register value of the current PC register 29 reaches “98”, the PC generation circuit 27, the address generation circuit 30, the instruction issuing unit 31, and the arithmetic unit 2 repeatedly perform the same processing.
As a result, the instructions C2 to C98 are executed by the computing unit 2, and the calculation results of the instructions C2 to C98 are output to the sequence control unit 11 of the control circuit 1.
At this time, the register value of the next PC register 28 is “99”, and the register value of the current PC register 29 is “98”.
The read address is “0x0172”.

PC生成回路27は、アドレス生成回路30が読み出しアドレス“0x0172”を命令発行部31に出力すると、引き続き、実行フラグレジスタ25が“有効”(“1”)であることを確認し、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“99”であるため、現PCレジスタ29のレジスタ値を“99”に設定する。
When the address generation circuit 30 outputs the read address “0x0172” to the instruction issuing unit 31, the PC generation circuit 27 continues to confirm that the execution flag register 25 is “valid” (“1”), and the next PC register 28 register values are set in the current PC register 29.
At this time, since the register value of the next PC register 28 is “99”, the register value of the current PC register 29 is set to “99”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“99”であり、差分値は“99”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致すると、次PCレジスタ28のレジスタ値を“0”にクリアするとともに、「1ループ終了通知」を演算器制御指示生成回路13に出力する。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “99”, and the difference value is “99”.
When the register value of the current PC register 29 coincides with the difference value, the PC generation circuit 27 clears the register value of the next PC register 28 to “0” and outputs “1 loop end notification” to the arithmetic unit control instruction generation circuit 13. Output to.

フラグ生成回路24は、現PCレジスタ29のレジスタ値と内部のメモリ等に保持している差分値を比較し、現PCレジスタ29のレジスタ値が差分値と一致すると、ループ指示レジスタ22aに格納されているループ指示が「ON」であるのか、「OFF」であるのかを確認する。
この時点では、ループ指示レジスタ22aに格納されているループ指示は「ON」である。
フラグ生成回路24は、ループ指示が「ON」であることを確認すると、演算終了フラグレジスタ26が“無効”(“0”)であるのか、“有効”(“1”)であるのかを確認する。
この時点では、未だ、演算器制御指示生成回路13から「演算終了指示」が出力されていないので、演算終了フラグレジスタ26は“無効”(“0”)である。
The flag generation circuit 24 compares the register value of the current PC register 29 with the difference value held in the internal memory or the like, and if the register value of the current PC register 29 matches the difference value, it is stored in the loop instruction register 22a. It is confirmed whether the current loop instruction is “ON” or “OFF”.
At this time, the loop instruction stored in the loop instruction register 22a is “ON”.
When the flag generation circuit 24 confirms that the loop instruction is “ON”, it confirms whether the calculation end flag register 26 is “invalid” (“0”) or “valid” (“1”). To do.
At this time, since the “calculation end instruction” has not yet been output from the arithmetic unit control instruction generation circuit 13, the calculation end flag register 26 is “invalid” (“0”).

フラグ生成回路24は、演算終了フラグレジスタ26が“無効”(“0”)であることを確認すると、実行フラグレジスタ25に設定されている“有効”(“1”)を維持する。
フラグ生成回路24が実行フラグレジスタ25に設定されている“有効”(“1”)を維持すると、PC生成回路27、アドレス生成回路30、命令発行部31及び演算器2は、上述した処理と同様の処理を繰り返し実施する。
即ち、PC生成回路27が、現PCレジスタ29のレジスタ値が“0”から“99”になるまで、そのレジスタ値を更新する処理を繰り返し、アドレス生成回路30が、読み出しアドレスが“0x0110”から“0x0173”になるまで、その読み出しアドレスを順次出力し、命令発行部31が命令C0〜C99を順次発行する。
これにより、演算器2は、命令C0〜C99を順次実行する。
When the flag generation circuit 24 confirms that the operation end flag register 26 is “invalid” (“0”), the flag generation circuit 24 maintains “valid” (“1”) set in the execution flag register 25.
When the flag generation circuit 24 maintains “valid” (“1”) set in the execution flag register 25, the PC generation circuit 27, the address generation circuit 30, the instruction issuing unit 31, and the arithmetic unit 2 perform the above-described processing. The same process is repeated.
That is, the PC generation circuit 27 repeats the process of updating the register value of the current PC register 29 from “0” to “99”, and the address generation circuit 30 reads the read address from “0x0110”. The read addresses are sequentially output until “0x0173” is reached, and the instruction issuing unit 31 sequentially issues instructions C0 to C99.
As a result, the arithmetic unit 2 sequentially executes the instructions C0 to C99.

このように、命令発行部31から命令C0〜C99が順次発行される処理は、後述するように、演算器制御指示生成回路13から「演算終了指示」が出力されて、演算終了フラグレジスタ26が“有効”(“1”)になるまで繰り返される。
図3の例では、ループ回数が“100”に設定されているので、命令発行部31から命令C0〜C99が順次発行される処理は、100回繰り返される。
なお、上記の繰り返し処理において、現PCレジスタ29のレジスタ値が“99”となるサイクルの次のサイクルには、現PCレジスタ29のレジスタ値を“0”に戻すことが可能であるため、オーバーヘッドなしに、ループ先頭の演算命令を発行する処理に戻ることができる。
In this way, in the process in which the instructions C0 to C99 are sequentially issued from the instruction issuing unit 31, the “computation end instruction” is output from the computing unit control instruction generation circuit 13 and the operation end flag register 26 is set. Repeat until “valid” (“1”).
In the example of FIG. 3, since the loop count is set to “100”, the process of sequentially issuing the instructions C0 to C99 from the instruction issuing unit 31 is repeated 100 times.
It should be noted that in the above iterative process, the register value of the current PC register 29 can be returned to “0” in the cycle following the cycle in which the register value of the current PC register 29 is “99”, so that overhead is achieved. Without being able to return to the process of issuing the operation instruction at the head of the loop.

シーケンス制御部11は、演算器制御部21における演算命令の発行処理と並行して、ループ制御の後処理として、繰り返し演算(ループ実行)を終了するか否かを判定する処理を実施する。
即ち、シーケンス制御部11の内部演算器14は、シーケンス制御用のプログラム内の命令が、ループ制御の後処理部分に相当する「do−while命令」であれば、do−while命令(図3では、記述(2)の命令)を実行する。
具体的には、以下の通りである。
The sequence control unit 11 performs a process of determining whether or not to end the repetitive calculation (loop execution) as a post-process of the loop control in parallel with the calculation instruction issuance process in the calculator control unit 21.
That is, if the instruction in the sequence control program is a “do-while instruction” corresponding to a post-processing part of loop control, the internal arithmetic unit 14 of the sequence control unit 11 performs a do-while instruction (in FIG. 3). , Instruction of description (2)).
Specifically, it is as follows.

まず、シーケンス制御部11の内部演算器14は、汎用レジスタ15に設定されているループ回数“100”をループカウンタ(図示せぬ)に設定する。
ここでは、ループ回数をループカウンタに設定する例を示しているが、汎用レジスタ15をループカウンタとして用いる場合には、ループ回数を別のループカウンタに設定する必要はない。
演算器制御指示生成回路13は、PC制御部23のPC生成回路27から「1ループ終了通知」が出力されると、「1ループ終了通知」を内部演算器14に転送する。
First, the internal arithmetic unit 14 of the sequence control unit 11 sets the loop count “100” set in the general-purpose register 15 in a loop counter (not shown).
Here, an example is shown in which the loop count is set in the loop counter. However, when the general-purpose register 15 is used as the loop counter, it is not necessary to set the loop count in another loop counter.
When the “1 loop end notification” is output from the PC generation circuit 27 of the PC control unit 23, the arithmetic unit control instruction generation circuit 13 transfers the “1 loop end notification” to the internal calculator 14.

内部演算器14は、演算器制御指示生成回路13から「1ループ終了通知」が転送される毎に、ループカウンタのカウント値を1だけデクリメントする。
内部演算器14は、ループカウンタのカウント値をデクリメントすると、デクリメント後のカウント値が“1”であるか否かを判定(演算終了判定)する。
ループカウンタのカウント値は、上述したように、“100”が設定されており、PC制御部23のPC生成回路27から「1ループ終了通知」が出力される毎(1回分のループ実行が完了する毎)に、カウント値が1デクリメントされるので、演算器制御部21において、99回分のループ実行が完了すると、ループカウンタのカウント値が“1”となる。
The internal computing unit 14 decrements the count value of the loop counter by 1 each time “1 loop end notification” is transferred from the computing unit control instruction generation circuit 13.
When the count value of the loop counter is decremented, the internal computing unit 14 determines whether or not the count value after the decrement is “1” (calculation end determination).
As described above, the count value of the loop counter is set to “100”, and every time “1 loop end notification” is output from the PC generation circuit 27 of the PC control unit 23 (one loop execution is completed). Since the count value is decremented by 1 every time the operation unit control unit 21 completes 99 loop executions, the count value of the loop counter becomes “1”.

内部演算器14は、ループカウンタのカウント値が“1”になると、「演算終了指示」を演算器制御指示生成回路13に出力する。
即ち、内部演算器14は、残りのループ回数が1回になると、「演算終了指示」を演算器制御指示生成回路13に出力する。
演算器制御指示生成回路13は、内部演算器14から「演算終了指示」を受けると、「演算終了指示」をPC制御部23のフラグ生成回路24に出力する。
When the count value of the loop counter becomes “1”, the internal arithmetic unit 14 outputs “calculation end instruction” to the arithmetic unit control instruction generation circuit 13.
That is, when the remaining number of loops reaches one, the internal computing unit 14 outputs “calculation end instruction” to the computing unit control instruction generation circuit 13.
Upon receiving the “calculation end instruction” from the internal arithmetic unit 14, the arithmetic unit control instruction generation circuit 13 outputs the “calculation end instruction” to the flag generation circuit 24 of the PC control unit 23.

PC制御部23のPC生成回路27は、99回分のループ実行が完了して(残りのループ回数が1回)、99回目の「1ループ終了通知」を出力した時点では、未だシーケンス制御部11の演算器制御指示生成回路13から「演算終了指示」が出力されておらず(内部演算器14は、PC生成回路27から99回目の「1ループ終了通知」を受けた時点から、99回目の演算終了判定を開始するので、PC生成回路27が99回目の「1ループ終了通知」を出力した時点では、演算器制御指示生成回路13から「演算終了指示」が出力されない)、アドレス生成回路30が読み出しアドレスを命令発行部31に出力すると、直ちに、実行フラグレジスタ25が“有効”(“1”)であることを確認して、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定するので、100回目のループ実行が開始される。
したがって、シーケンス制御部11の演算器制御指示生成回路13から出力される「演算終了指示」は、100回目のループ実行が行われているときに、PC制御部23のフラグ生成回路24に入力される。
The PC generation circuit 27 of the PC control unit 23 has yet to execute the loop execution for 99 times (the remaining number of loops is 1) and outputs the 99th “1 loop end notification” yet, the sequence control unit 11 No “computation end instruction” is output from the arithmetic unit control instruction generation circuit 13 (the internal arithmetic unit 14 has received the 99th “1 loop end notification” from the PC generation circuit 27 and Since the calculation end determination is started, when the PC generation circuit 27 outputs the 99th “1 loop end notification”, the “calculation end instruction” is not output from the calculator control instruction generation circuit 13), the address generation circuit 30 When the read address is output to the instruction issuing unit 31, it is immediately confirmed that the execution flag register 25 is “valid” (“1”), and the register value of the next PC register 28 is displayed. Since set in the C register 29, 100th loop execution is started.
Therefore, the “computation end instruction” output from the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 is input to the flag generation circuit 24 of the PC control unit 23 when the 100th loop execution is performed. The

フラグ生成回路24は、演算器制御指示生成回路13から「演算終了指示」を受けると、演算終了フラグレジスタ26に“有効”(“1”)を設定する。
フラグ生成回路24は、100回目のループ実行において、現PCレジスタ29のレジスタ値が“99”になり(レジスタ値が“99”になると、読み出しアドレスが“0x0173”になって、命令C99が発行される)、現PCレジスタ29のレジスタ値が差分値(エンドアドレス−スタートアドレス)に到達すると、演算終了フラグレジスタ26が“有効”(“1”)であることを確認して、実行フラグレジスタ25に設定されている“有効”(“1”)を“無効”(“0”)に変更する。
The flag generation circuit 24 sets “valid” (“1”) in the calculation end flag register 26 when receiving the “calculation end instruction” from the arithmetic unit control instruction generation circuit 13.
In the 100th loop execution, the flag generation circuit 24 sets the register value of the current PC register 29 to “99” (when the register value reaches “99”, the read address becomes “0x0173” and the instruction C99 is issued). When the register value of the current PC register 29 reaches the difference value (end address-start address), it is confirmed that the operation end flag register 26 is “valid” (“1”), and the execution flag register “Valid” (“1”) set to 25 is changed to “invalid” (“0”).

PC生成回路27は、実行フラグレジスタ25に“有効”(“1”)が設定されているときに、レジスタ値の更新処理を開始し、実行フラグレジスタ25に“無効”(“0”)が設定されている場合には、レジスタ値の更新処理を行わないので、アドレス生成回路30から101回目のループ実行に係る読み出しアドレスが出力されることはない。
また、命令発行部31についても、実行フラグレジスタ25に“有効”(“1”)が設定されているときに演算命令を発行し、実行フラグレジスタ25に“無効”(“0”)が設定されている場合には、演算命令を発行しないので、101回目のループ実行に係る演算命令が発行されることはない。
これにより、PROC_C(命令C0〜C99)に係る100回のループ実行が終了する。
When the execution flag register 25 is set to “valid” (“1”), the PC generation circuit 27 starts the register value update process, and the execution flag register 25 is set to “invalid” (“0”). If it is set, the register value is not updated, so that the address generation circuit 30 does not output the read address related to the 101st loop execution.
The instruction issuing unit 31 also issues an operation instruction when “valid” (“1”) is set in the execution flag register 25 and “invalid” (“0”) is set in the execution flag register 25. If it is, the operation instruction is not issued, so the operation instruction related to the 101st loop execution is not issued.
Thus, 100 loop executions related to PROC_C (commands C0 to C99) are completed.

次に、PROC_D(命令D0〜D44)の演算開始命令(記述(3))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、その演算開始命令のオペランド(スタートアドレス、エンドアドレス、ループ指示(ON/OFF))をレジスタ群22に設定する。
図3の例では、演算器制御指示生成回路13が書き込みイネーブルをレジスタ群22に出力することにより、スタートアドレス=0x0174をスタートアドレスレジスタ22bに設定し、エンドアドレス=0x01A0をエンドアドレスレジスタ22cに設定し、また、ループ指示(LOOP=OFF)をループ指示レジスタ22aに設定する。
Next, since the operation start instruction (description (3)) of PROC_D (instructions D0 to D44) is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the operand (start address, end address, loop instruction (ON / OFF)) of the operation start instruction is set in the register group 22.
In the example of FIG. 3, when the arithmetic unit control instruction generation circuit 13 outputs a write enable to the register group 22, the start address = 0x0174 is set in the start address register 22b, and the end address = 0x01A0 is set in the end address register 22c. In addition, a loop instruction (LOOP = OFF) is set in the loop instruction register 22a.

ここで、スタートアドレス=0x0174は、演算用命令メモリ32に格納されている命令D0のアドレスを示し、エンドアドレス=0x01A0は、演算用命令メモリ32に格納されている命令D44のアドレスを示している。また、ループ指示(LOOP=OFF)は、ループ実行を行わない旨を示している。
したがって、この演算開始命令は、命令D0〜D44を1回ずつ実行することを意味している。
演算器制御指示生成回路13は、スタートアドレス等の設定を完了したのち、内部演算器14の指示の下、「演算開始指示」をPC制御部23のフラグ生成回路24に出力する。
Here, the start address = 0x0174 indicates the address of the instruction D0 stored in the arithmetic instruction memory 32, and the end address = 0x01A0 indicates the address of the instruction D44 stored in the arithmetic instruction memory 32. . The loop instruction (LOOP = OFF) indicates that loop execution is not performed.
Therefore, this calculation start command means that the commands D0 to D44 are executed once.
After completing the setting of the start address and the like, the arithmetic unit control instruction generation circuit 13 outputs “calculation start instruction” to the flag generation circuit 24 of the PC control unit 23 under the instruction of the internal arithmetic unit 14.

フラグ生成回路24は、演算器制御指示生成回路13から「演算開始指示」が出力されると、実行フラグレジスタ25に“有効”(“1”)を設定する。
また、フラグ生成回路24は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する。
この例では、スタートアドレス=0x0174、エンドアドレス=0x01A0であるため、差分値(エンドアドレス−スタートアドレス)は“44”となる。
なお、この差分値は、フラグ生成回路24により、後で、現PCレジスタ29のレジスタ値と比較されるものであるため、内部のメモリ等に保持される。
The flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25 when the “calculation start instruction” is output from the arithmetic unit control instruction generation circuit 13.
Further, the flag generation circuit 24 acquires the start address from the start address register 22b, acquires the end address from the end address register 22c, subtracts the start address from the end address, and calculates a difference value (end address−start address). ) Is calculated.
In this example, since the start address = 0x0174 and the end address = 0x01A0, the difference value (end address−start address) is “44”.
The difference value is stored in an internal memory or the like because it is compared later with the register value of the current PC register 29 by the flag generation circuit 24.

PC生成回路27は、フラグ生成回路24が実行フラグレジスタ25に“有効”(“1”)を設定すると、下記に示すレジスタ値の更新処理を開始する。
即ち、PC生成回路27は、フラグ生成回路24が実行フラグレジスタ25に“有効”(“1”)を設定すると、フラグ生成回路24と同様に、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、エンドアドレスレジスタ22cからエンドアドレスを取得し、そのエンドアドレスからスタートアドレスを減算して、差分値(エンドアドレス−スタートアドレス)を算出する。ここでは、PC生成回路27が差分値を算出しているが、フラグ生成回路24により算出された差分値を取得するようにしてもよい。あるいは、PC生成回路27が算出した差分値をフラグ生成回路24に与えるようにしてもよい。
また、PC生成回路27は、実行フラグレジスタ25が“有効”(“1”)である場合、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“0”であるため、現PCレジスタ29のレジスタ値を“0”に設定する。
When the flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25, the PC generation circuit 27 starts a register value update process described below.
That is, when the flag generation circuit 24 sets “valid” (“1”) in the execution flag register 25, the PC generation circuit 27 acquires the start address from the start address register 22b, as in the flag generation circuit 24, and The end address is obtained from the end address register 22c, and the start address is subtracted from the end address to calculate a difference value (end address-start address). Here, the PC generation circuit 27 calculates the difference value, but the difference value calculated by the flag generation circuit 24 may be acquired. Alternatively, the difference value calculated by the PC generation circuit 27 may be given to the flag generation circuit 24.
The PC generation circuit 27 sets the register value of the next PC register 28 in the current PC register 29 when the execution flag register 25 is “valid” (“1”).
At this time, since the register value of the next PC register 28 is “0”, the register value of the current PC register 29 is set to “0”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“0”であり、差分値は“44”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致しないので、次PCレジスタ28のレジスタ値を1だけインクリメントする。
この時点では、次PCレジスタ28のレジスタ値は“1”となる。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “0”, and the difference value is “44”.
The PC generation circuit 27 increments the register value of the next PC register 28 by 1 because the register value of the current PC register 29 does not match the difference value.
At this time, the register value of the next PC register 28 is “1”.

アドレス生成回路30は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、現PCレジスタ29のレジスタ値を取得し、そのスタートアドレスと現PCレジスタ29のレジスタ値とを加算する。
この時点では、現PCレジスタ29のレジスタ値は“0”であり、スタートアドレス=0x0174であるため、そのスタートアドレスとレジスタ値の加算値は、“0x0174”となる。
アドレス生成回路30は、その加算値“0x0174”を読み出しアドレスとして、命令発行部31に出力する。
The address generation circuit 30 acquires the start address from the start address register 22b, acquires the register value of the current PC register 29, and adds the start address and the register value of the current PC register 29.
At this time, since the register value of the current PC register 29 is “0” and the start address = 0x0174, the added value of the start address and the register value is “0x0174”.
The address generation circuit 30 outputs the addition value “0x0174” to the instruction issuing unit 31 as a read address.

命令発行部31は、実行フラグレジスタ25が“有効”(“1”)である場合、演算用命令メモリ32に格納されている演算命令の中から、アドレス生成回路30から出力された読み出しアドレスに対応する演算命令の読み出しを行う。
この時点では、読み出しアドレスが“0x0174”であるため、演算用命令メモリ32から“0x0174”に対応する命令D0の読み出しを行う。
命令発行部31は、演算命令である命令D0の読み出しを行うと、その命令D0を演算器2に発行する。
演算器2は、命令発行部31から命令D0が発行されると、命令D0を実行して、命令D0の演算結果を制御回路1のシーケンス制御部11に出力する。
When the execution flag register 25 is “valid” (“1”), the instruction issuing unit 31 sets the read address output from the address generation circuit 30 from among the operation instructions stored in the operation instruction memory 32. Read the corresponding operation instruction.
At this time, since the read address is “0x0174”, the instruction D0 corresponding to “0x0174” is read from the operation instruction memory 32.
The instruction issuing unit 31 issues the instruction D0 to the computing unit 2 when reading the instruction D0 that is an operation instruction.
When the instruction D0 is issued from the instruction issuing unit 31, the arithmetic unit 2 executes the instruction D0 and outputs the calculation result of the instruction D0 to the sequence control unit 11 of the control circuit 1.

PC生成回路27は、アドレス生成回路30が読み出しアドレス“0x0174”を命令発行部31に出力すると、引き続き、実行フラグレジスタ25が“有効”(“1”)であることを確認し、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“1”であるため、現PCレジスタ29のレジスタ値を“1”に設定する。
When the address generation circuit 30 outputs the read address “0x0174” to the instruction issuing unit 31, the PC generation circuit 27 continues to confirm that the execution flag register 25 is “valid” (“1”), and the next PC register 28 register values are set in the current PC register 29.
At this time, since the register value of the next PC register 28 is “1”, the register value of the current PC register 29 is set to “1”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“1”であり、差分値は“44”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致しないので、次PCレジスタ28のレジスタ値を1だけインクリメントする。
この時点では、次PCレジスタ28のレジスタ値は“2”となる。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “1”, and the difference value is “44”.
The PC generation circuit 27 increments the register value of the next PC register 28 by 1 because the register value of the current PC register 29 does not match the difference value.
At this time, the register value of the next PC register 28 is “2”.

アドレス生成回路30は、スタートアドレスレジスタ22bからスタートアドレスを取得するとともに、現PCレジスタ29のレジスタ値を取得し、そのスタートアドレスと現PCレジスタ29のレジスタ値とを加算する。
この時点では、現PCレジスタ29のレジスタ値は“1”であり、スタートアドレス=0x0174であるため、そのスタートアドレスとレジスタ値の加算値は、“0x0175”となる。
アドレス生成回路30は、その加算値“0x0175”を読み出しアドレスとして、命令発行部31に出力する。
The address generation circuit 30 acquires the start address from the start address register 22b, acquires the register value of the current PC register 29, and adds the start address and the register value of the current PC register 29.
At this time, since the register value of the current PC register 29 is “1” and the start address = 0x0174, the added value of the start address and the register value is “0x0175”.
The address generation circuit 30 outputs the added value “0x0175” to the instruction issuing unit 31 as a read address.

命令発行部31は、実行フラグレジスタ25が“有効”(“1”)である場合、演算用命令メモリ32に格納されている演算命令の中から、アドレス生成回路30から出力された読み出しアドレスに対応する演算命令の読み出しを行う。
この時点では、読み出しアドレスが“0x0175”であるため、演算用命令メモリ32から“0x0175”に対応する命令D1の読み出しを行う。
命令発行部31は、演算命令である命令D1の読み出しを行うと、その命令D1を演算器2に発行する。
演算器2は、命令発行部31から命令D1が発行されると、命令D1を実行して、命令D1の演算結果を制御回路1のシーケンス制御部11に出力する。
When the execution flag register 25 is “valid” (“1”), the instruction issuing unit 31 sets the read address output from the address generation circuit 30 from among the operation instructions stored in the operation instruction memory 32. Read the corresponding operation instruction.
At this time, since the read address is “0x0175”, the instruction D1 corresponding to “0x0175” is read from the operation instruction memory 32.
The instruction issuing unit 31 issues the instruction D1 to the computing unit 2 when reading the instruction D1, which is an operation instruction.
When the instruction D1 is issued from the instruction issuing unit 31, the arithmetic unit 2 executes the instruction D1 and outputs the calculation result of the instruction D1 to the sequence control unit 11 of the control circuit 1.

以降、現PCレジスタ29のレジスタ値が“43”になるまで、PC生成回路27、アドレス生成回路30、命令発行部31及び演算器2が同様の処理を繰り返し実施する。
これにより、命令D2〜D43が演算器2により実行されて、命令D2〜D43の演算結果が制御回路1のシーケンス制御部11に出力される。
この時点では、次PCレジスタ28のレジスタ値は“44”であり、現PCレジスタ29のレジスタ値は“43”である。
また、読み出しアドレスは“0x019F”である。
Thereafter, until the register value of the current PC register 29 becomes “43”, the PC generation circuit 27, the address generation circuit 30, the instruction issuing unit 31, and the arithmetic unit 2 repeatedly perform the same processing.
Thereby, the instructions D2 to D43 are executed by the computing unit 2, and the calculation results of the instructions D2 to D43 are output to the sequence control unit 11 of the control circuit 1.
At this time, the register value of the next PC register 28 is “44”, and the register value of the current PC register 29 is “43”.
The read address is “0x019F”.

PC生成回路27は、アドレス生成回路30が読み出しアドレス“0x019F”を命令発行部31に出力すると、引き続き、実行フラグレジスタ25が“有効”(“1”)であることを確認し、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定する。
この時点では、次PCレジスタ28のレジスタ値は“44”であるため、現PCレジスタ29のレジスタ値を“44”に設定する。
When the address generation circuit 30 outputs the read address “0x019F” to the instruction issuing unit 31, the PC generation circuit 27 continues to confirm that the execution flag register 25 is “valid” (“1”), and the next PC register 28 register values are set in the current PC register 29.
At this time, since the register value of the next PC register 28 is “44”, the register value of the current PC register 29 is set to “44”.

PC生成回路27は、次PCレジスタ28のレジスタ値を現PCレジスタ29に設定すると、現PCレジスタ29のレジスタ値と差分値(エンドアドレス−スタートアドレス)を比較する。
この時点では、現PCレジスタ29のレジスタ値は“44”であり、差分値は“44”である。
PC生成回路27は、現PCレジスタ29のレジスタ値が差分値と一致すると、次PCレジスタ28のレジスタ値を“0”にクリアするとともに、「1ループ終了通知」を演算器制御指示生成回路13に出力する。
When the register value of the next PC register 28 is set in the current PC register 29, the PC generation circuit 27 compares the register value of the current PC register 29 with the difference value (end address-start address).
At this time, the register value of the current PC register 29 is “44”, and the difference value is “44”.
When the register value of the current PC register 29 coincides with the difference value, the PC generation circuit 27 clears the register value of the next PC register 28 to “0” and outputs “1 loop end notification” to the arithmetic unit control instruction generation circuit 13. Output to.

フラグ生成回路24は、現PCレジスタ29のレジスタ値と内部のメモリ等に保持している差分値を比較し、現PCレジスタ29のレジスタ値が差分値と一致すると、ループ指示レジスタ22aに格納されているループ指示が「ON」であるのか、「OFF」であるのかを確認する。
この時点では、ループ指示レジスタ22aに格納されているループ指示は「OFF」である。
フラグ生成回路24は、ループ指示が「OFF」であることを確認すると、実行フラグレジスタ25に設定されている“有効”(“1”)を“無効”(“0”)に変更する。
The flag generation circuit 24 compares the register value of the current PC register 29 with the difference value held in the internal memory or the like, and if the register value of the current PC register 29 matches the difference value, it is stored in the loop instruction register 22a. It is confirmed whether the current loop instruction is “ON” or “OFF”.
At this time, the loop instruction stored in the loop instruction register 22a is “OFF”.
Upon confirming that the loop instruction is “OFF”, the flag generation circuit 24 changes “valid” (“1”) set in the execution flag register 25 to “invalid” (“0”).

PC生成回路27は、実行フラグレジスタ25に“無効”(“0”)が設定されている場合には、レジスタ値の更新処理を行わず、命令発行部31は、実行フラグレジスタ25に“無効”(“0”)が設定されている場合には、演算命令を発行しないので、PROC_D(命令D0〜D45)の実行が終了する。   When “invalid” (“0”) is set in the execution flag register 25, the PC generation circuit 27 does not perform the register value update process, and the instruction issuing unit 31 sets “invalid” in the execution flag register 25. When "" ("0") is set, the operation instruction is not issued, so that the execution of PROC_D (instructions D0 to D45) ends.

以上で明らかなように、この実施の形態1によれば、スタートアドレスレジスタ22bに設定されているスタートアドレスを読み出しアドレスに設定して、その読み出しアドレスを出力し、その後、その読み出しアドレスをインクリメントして、インクリメント後の読み出しアドレスを出力する処理を繰り返し実施するアドレス出力手段と、ループ指示レジスタ22aに設定されているループ指示が「LOOP=ON」である場合、アドレス出力手段から出力された読み出しアドレスがエンドアドレスレジスタ22cに設定されているエンドアドレスと一致すると、「1ループ終了通知」を出力するとともに、現時点までにシーケンス制御部11から「演算終了指示」が出力されていなければ、アドレス出力手段により設定された読み出しアドレスをスタートアドレスに戻して、アドレス出力処理の継続をアドレス出力手段に指示し、ループ指示が「LOOP=OFF」である場合、アドレス出力手段から出力された読み出しアドレスがエンドアドレスと一致すると、アドレス出力処理の停止をアドレス出力手段に指示する繰り返し処理制御手段とを設け、内部演算器14が、「1ループ終了通知」の出力回数とループ回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に「演算終了指示」を繰り返し処理制御手段に出力するように構成したので、専用のループ制御回路を設けることなく(演算器制御部21が、ループ実行を伴う演算命令の発行制御と、ループ実行を伴わない演算命令の発行制御とを兼ねている)、僅かなプログラム量の増加だけで、ループ制御によるオーバーヘッドを削減することができる効果を奏する。   As apparent from the above, according to the first embodiment, the start address set in the start address register 22b is set as the read address, the read address is output, and then the read address is incremented. If the loop instruction set in the loop instruction register 22a is “LOOP = ON”, the address output means that repeatedly executes the process of outputting the incremented read address and the read address output from the address output means If the end address matches the end address set in the end address register 22c, “1 loop end notification” is output, and if no “computation end instruction” has been output from the sequence control unit 11 up to the present time, the address output means The read address set by Is returned to the start address, the address output means is instructed to continue the address output process, and if the loop instruction is “LOOP = OFF”, if the read address output from the address output means matches the end address, It is provided with repetition processing control means for instructing the address output means to stop the output processing, and the internal computing unit 14 compares the number of outputs of “1 loop end notification” with the number of loops to determine whether or not to repeat the calculation Since it is configured to output a “computation end instruction” to the repetitive processing control means when the repetitive calculation is finished, the dedicated control circuit 21 is not accompanied by a loop execution without providing a dedicated loop control circuit. (Combined operation instruction issuance control and operation instruction issuance control without loop execution), only a slight increase in program amount , An effect which can reduce the overhead of loop control.

即ち、ループ制御の後処理部分に相当する「do−while命令」が、内部演算器14によって、演算器制御部21における演算命令の発行処理と並行して実行されるため、ループ実行(最終回のループ実行を除く)の後処理に係るサイクル数を隠蔽することができるようになり、ループ制御の後処理に係るオーバーヘッドを削減することができる。
ループ制御の後処理に係るオーバーヘッドを削減するために追加するプログラムは、内部演算器14が実行する「do−while命令」だけであるため、僅かなプログラム量の増加だけで、ループ制御によるオーバーヘッドを削減することができる。
このように、ループ制御によるオーバーヘッドの削減が可能であるため、処理の高速化を実現することができるとともに、低消費電力化を図ることができる。
That is, since the “do-while instruction” corresponding to the post-processing part of the loop control is executed by the internal arithmetic unit 14 in parallel with the operation instruction issuance process in the arithmetic unit control unit 21, loop execution (final round) It is possible to conceal the number of cycles related to post-processing) (excluding loop execution), and it is possible to reduce overhead related to post-processing of loop control.
The only program added to reduce the overhead associated with the post-processing of the loop control is the “do-while instruction” executed by the internal computing unit 14, so the overhead due to the loop control can be reduced by a slight increase in the program amount. Can be reduced.
As described above, since the overhead can be reduced by the loop control, the processing speed can be increased and the power consumption can be reduced.

なお、この実施の形態1では、シーケンス制御用のプログラムがシーケンス制御用命令メモリ12に格納され、演算命令が演算用命令メモリ32に格納されているものを示したが、シーケンス制御用のプログラムや演算命令が外部からダウンロードされるようにしてもよい。   In the first embodiment, the sequence control program is stored in the sequence control instruction memory 12 and the operation instruction is stored in the operation instruction memory 32. However, the sequence control program or Arithmetic instructions may be downloaded from the outside.

実施の形態2.
上記実施の形態1では、シーケンス制御用のプログラム内の命令である演算開始命令が、オペランドとして、スタートアドレス、エンドアドレス及びループ指示(ON/OFF)を有し、その演算開始命令によってスタートアドレス、エンドアドレス及びループ指示(ON/OFF)が設定されるものについて示したが、オペランドを有しない演算開始命令と別のパラメータ設定命令によって、スタートアドレス、エンドアドレス及びループ指示(ON/OFF)が設定されるようにしてもよい。
Embodiment 2. FIG.
In the first embodiment, the operation start instruction that is an instruction in the sequence control program has a start address, an end address, and a loop instruction (ON / OFF) as operands, and the start address, Although the end address and loop instruction (ON / OFF) are shown, the start address, end address and loop instruction (ON / OFF) are set by a parameter setting instruction different from the operation start instruction having no operand. You may be made to do.

図4はシーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。
図4でも、図3と同様に、PROC_C(命令C0〜C99)を100回繰り返し実行し、PROC_D(命令D0〜D44)を1回実行する例を示している。
FIG. 4 is an explanatory diagram showing instructions in the sequence control program stored in the sequence control instruction memory 12.
4 also shows an example in which PROC_C (instructions C0 to C99) is repeatedly executed 100 times and PROC_D (instructions D0 to D44) is executed once, similarly to FIG.

次に動作について説明する。
ただし、演算器制御指示生成回路13によるスタートアドレス等の設定処理以外は、上記実施の形態1と同様であるため、主に演算器制御指示生成回路13の設定処理について説明する。
Next, the operation will be described.
However, since the processing other than the setting processing of the start address and the like by the arithmetic unit control instruction generation circuit 13 is the same as that of the first embodiment, the setting processing of the arithmetic unit control instruction generation circuit 13 will be mainly described.

制御回路1は、上記実施の形態1と同様に、処理開始前に初期化され、レジスタ群22のループ指示レジスタ22a、スタートアドレスレジスタ22b及びエンドアドレスレジスタ22cには“0”が設定される。
また、実行フラグレジスタ25及び演算終了フラグレジスタ26には、“無効”(“0”)が設定され、次PCレジスタ28及び現PCレジスタ29のカウント値には、“0”が設定される。
As in the first embodiment, the control circuit 1 is initialized before the start of processing, and “0” is set in the loop instruction register 22a, the start address register 22b, and the end address register 22c of the register group 22.
Further, “invalid” (“0”) is set in the execution flag register 25 and the operation end flag register 26, and “0” is set in the count values of the next PC register 28 and the current PC register 29.

シーケンス制御部11は、シーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラムを読み込み、そのプログラム内の命令を解析する。
図4の例では、最初に、PROC_C(命令C0〜C99)を100回繰り返すために、ループ回数を設定する設定命令(図4では、“ループカウンタを100に設定する”と記述されている)がプログラムに記述されているので、シーケンス制御部11の内部演算器14は、その設定命令にしたがってループ回数を汎用レジスタ15に設定する。
図4の例では、ループ回数として、“100”を汎用レジスタ15に設定する。
The sequence control unit 11 reads a sequence control program stored in the sequence control instruction memory 12 and analyzes instructions in the program.
In the example of FIG. 4, in order to first repeat PROC_C (commands C0 to C99) 100 times, a setting command for setting the number of loops (in FIG. 4, “setting the loop counter to 100” is described). Is described in the program, the internal arithmetic unit 14 of the sequence control unit 11 sets the number of loops in the general-purpose register 15 in accordance with the setting instruction.
In the example of FIG. 4, “100” is set in the general-purpose register 15 as the number of loops.

次に、オペランドがスタートアドレスであるパラメータ設定命令(記述(1−1))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるスタートアドレス=0x0110をスタートアドレスレジスタ22bに設定する。
次に、オペランドがエンドアドレスであるパラメータ設定命令(記述(1−2))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるエンドアドレス=0x0173をエンドアドレスレジスタ22cに設定する。
Next, since the parameter setting instruction (description (1-1)) whose operand is the start address is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the start address = 0x0110, which is the operand of the parameter setting instruction, is set in the start address register 22b.
Next, since the parameter setting instruction (description (1-2)) whose operand is the end address is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the end address = 0x0173 which is the operand of the parameter setting instruction is set in the end address register 22c.

次に、オペランドがループ指示であるパラメータ設定命令(記述(1−3))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるループ指示(LOOP=ON)をループ指示レジスタ22aに設定する。
次に、オペランドを有しない演算開始命令(記述(1−4))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13が、内部演算器14の指示の下、「演算開始指示」をPC制御部23のフラグ生成回路24に出力する。
以降、上記実施の形態1と同様にして、PROC_C(命令C0〜C99)が100回ループ実行される。
Next, since the parameter setting instruction (description (1-3)) whose operand is a loop instruction is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the loop instruction (LOOP = ON) which is the operand of the parameter setting instruction is set in the loop instruction register 22a.
Next, since an operation start instruction (description (1-4)) having no operand is described in the program, the operation unit control instruction generation circuit 13 of the sequence control unit 11 performs the following operation under the instruction of the internal operation unit 14: “Calculation start instruction” is output to the flag generation circuit 24 of the PC control unit 23.
Thereafter, PROC_C (instructions C0 to C99) is looped 100 times in the same manner as in the first embodiment.

PROC_C(命令C0〜C99)のループ実行が完了すると、PROC_D(命令D0〜D44)を1回実行するために、オペランドがスタートアドレスであるパラメータ設定命令(記述(3−1))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるスタートアドレス=0x0174をスタートアドレスレジスタ22bに設定する。
次に、オペランドがエンドアドレスであるパラメータ設定命令(記述(3−2))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるエンドアドレス=0x01A0をエンドアドレスレジスタ22cに設定する。
When the loop execution of PROC_C (instructions C0 to C99) is completed, a parameter setting instruction (description (3-1)) whose operand is the start address is described in the program in order to execute PROC_D (instructions D0 to D44) once. Therefore, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 outputs the write enable to the register group 22 to set the start address = 0x0174 as the operand of the parameter setting instruction in the start address register 22b. To do.
Next, since the parameter setting instruction (description (3-2)) whose operand is the end address is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the end address = 0x01A0 which is the operand of the parameter setting instruction is set in the end address register 22c.

次に、オペランドがループ指示であるパラメータ設定命令(記述(3−3))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13は、書き込みイネーブルをレジスタ群22に出力することで、そのパラメータ設定命令のオペランドであるループ指示(LOOP=OFF)をループ指示レジスタ22aに設定する。
次に、オペランドを有しない演算開始命令(記述(3−4))がプログラムに記述されているので、シーケンス制御部11の演算器制御指示生成回路13が、内部演算器14の指示の下、「演算開始指示」をPC制御部23のフラグ生成回路24に出力する。
以降、上記実施の形態1と同様にして、PROC_D(命令D0〜D44)が1回実行される。
Next, since the parameter setting instruction (description (3-3)) whose operand is a loop instruction is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the write enable to the register group 22. By outputting, the loop instruction (LOOP = OFF) which is the operand of the parameter setting instruction is set in the loop instruction register 22a.
Next, since the operation start instruction (description (3-4)) having no operand is described in the program, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 performs the following operation under the instruction of the internal arithmetic unit 14: “Calculation start instruction” is output to the flag generation circuit 24 of the PC control unit 23.
Thereafter, PROC_D (commands D0 to D44) is executed once as in the first embodiment.

以上で明らかなように、この実施の形態2によれば、演算開始命令と別命令であるパラメータ設定命令によって、スタートアドレス、エンドアドレス及びループ指示(ON/OFF)を設定するように構成したので、演算開始命令のオペランドを無くして、その演算開始命令が長くなり過ぎるのを抑制することができる効果を奏する。   As is apparent from the above, according to the second embodiment, the start address, the end address, and the loop instruction (ON / OFF) are set by the parameter setting instruction which is a separate instruction from the calculation start instruction. The operation start instruction operand is eliminated, and the operation start instruction can be prevented from becoming too long.

この実施の形態2では、パラメータ設定命令と演算開始命令の2つを使用するものについて示したが、パラメータ設定と演算開始を同時に指示する複合命令を設ければ、最後のパラメータ設定と同時に演算の開始を指示することができるため、演算開始指示までのサイクルを1サイクル分削減することができ、制御の高速化を図ることができる。   In the second embodiment, the parameter setting instruction and the calculation start instruction are used. However, if a compound instruction that simultaneously instructs parameter setting and calculation start is provided, the calculation is performed simultaneously with the last parameter setting. Since the start can be instructed, the cycle up to the calculation start instruction can be reduced by one cycle, and the control speed can be increased.

実施の形態3.
図5はこの発明の実施の形態3によるデータ演算装置を示す構成図であり、図において、図1と同一符号は同一又は相当部分を示すので説明を省略する。
したがって、図1のデータ演算装置と同様に、シーケンス制御部11は、シーケンス制御用命令メモリ12、演算器制御指示生成回路13、内部演算器14及び汎用レジスタ15から構成されている。
また、PC制御部23は、フラグ生成回路24、実行フラグレジスタ25、演算終了フラグレジスタ26、PC生成回路27、次PCレジスタ28、現PCレジスタ29及びアドレス生成回路30から構成されている。
また、命令発行部31は、演算用命令メモリ32を内蔵している。
Embodiment 3 FIG.
FIG. 5 is a block diagram showing a data operation apparatus according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
Therefore, the sequence control unit 11 includes a sequence control instruction memory 12, an arithmetic unit control instruction generation circuit 13, an internal arithmetic unit 14, and a general-purpose register 15 as in the data arithmetic unit of FIG.
The PC control unit 23 includes a flag generation circuit 24, an execution flag register 25, an operation end flag register 26, a PC generation circuit 27, a next PC register 28, a current PC register 29, and an address generation circuit 30.
The instruction issuing unit 31 includes a calculation instruction memory 32.

レジスタ格納部40は2個のレジスタ群41a,41bとセレクタ42,43を実装しているメモリなどの記録媒体である。
図5の例では、レジスタ格納部40が2個のレジスタ群41a,41bを実装しているものについて示しているが、これに限るものではなく、3個以上のレジスタ群を実装しているものであってもよい。
レジスタ群41a,41bは図1のレジスタ群22に相当し、ループ指示レジスタ22a、スタートアドレスレジスタ22b及びエンドアドレスレジスタ22cから構成されている。
The register storage unit 40 is a recording medium such as a memory in which two register groups 41 a and 41 b and selectors 42 and 43 are mounted.
In the example of FIG. 5, the register storage unit 40 is provided with two register groups 41a and 41b. However, the present invention is not limited to this, and three or more register groups are installed. It may be.
The register groups 41a and 41b correspond to the register group 22 in FIG. 1, and are composed of a loop instruction register 22a, a start address register 22b, and an end address register 22c.

セレクタ42はシーケンス制御部11の演算器制御指示生成回路13がスタートアドレス、エンドアドレス及びループ指示を設定する際、演算器制御指示生成回路13から設定先のレジスタ群41a又はレジスタ群41bを示すレジスタ選択信号が出力されると、そのレジスタ選択信号が示すレジスタ群41a又はレジスタ群41bを選択する処理を実施する。
セレクタ43はPC制御部23がスタートアドレス、エンドアドレス及びループ指示を取得する際、演算器制御指示生成回路13から取得先のレジスタ群41a又はレジスタ群41bを示すレジスタ選択信号が出力されると、そのレジスタ選択信号が示すレジスタ群41a又はレジスタ群41bを選択する処理を実施する。
The selector 42 is a register that indicates the register group 41a or the register group 41b that is the setting destination from the arithmetic unit control instruction generation circuit 13 when the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the start address, end address, and loop instruction. When the selection signal is output, a process of selecting the register group 41a or the register group 41b indicated by the register selection signal is performed.
When the PC control unit 23 acquires a start address, an end address, and a loop instruction, the selector 43 outputs a register selection signal indicating the register group 41a or the register group 41b as an acquisition destination from the arithmetic unit control instruction generation circuit 13. Processing for selecting the register group 41a or the register group 41b indicated by the register selection signal is performed.

上記実施の形態1では、演算器制御部21が1個のレジスタ群22を実装しているものについて示したが、演算器制御部21が2個のレジスタ群41a,41bを実装して、2個のレジスタ群41a,41bに対して、2個の演算開始命令に係るスタートアドレス、エンドアドレス及びループ指示を設定するようにしてもよい。
以下、具体的に処理内容を説明する。
In the first embodiment, the computing unit control unit 21 is mounted with one register group 22. However, the computing unit control unit 21 is mounted with two register groups 41a and 41b. A start address, an end address, and a loop instruction related to two calculation start instructions may be set for each of the register groups 41a and 41b.
The processing contents will be specifically described below.

図6はシーケンス制御用命令メモリ12により格納されているシーケンス制御用のプログラム内の命令を示す説明図である。
図6では、レジスタ群41aを使用して、PROC_C(命令C0〜C99)を100回繰り返し実行し、レジスタ群41bを使用して、PROC_D(命令D0〜D44)を1回実行し、レジスタ群41aのスタートアドレス等を書き換えてから、レジスタ群41aを使用して、PROC_A(命令A0〜A7)を1回実行する例を示している。
ただし、図6においては、PROC_C(命令C0〜C99)及びPROC_D(命令D0〜D44)に係るスタートアドレス等の設定に関する記述を省略している。
FIG. 6 is an explanatory diagram showing instructions in the sequence control program stored in the sequence control instruction memory 12.
In FIG. 6, PROC_C (instructions C0 to C99) is repeatedly executed 100 times using the register group 41a, and PROC_D (instructions D0 to D44) is executed once using the register group 41b. In this example, PROC_A (instructions A0 to A7) is executed once using the register group 41a after rewriting the start address and the like.
However, in FIG. 6, description regarding setting of the start address and the like related to PROC_C (commands C0 to C99) and PROC_D (commands D0 to D44) is omitted.

まず、シーケンス制御部11の演算器制御指示生成回路13は、制御処理の開始前に、PROC_C(命令C0〜C99)に係るスタートアドレス等をレジスタ群41aに設定するため、内部演算器14の指示の下、書き込みイネーブルをレジスタ格納部40に出力するとともに、設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)をセレクタ42に出力する。
セレクタ42は、演算器制御指示生成回路13から設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、演算器制御指示生成回路13から出力されるスタートアドレスをレジスタ群41aのスタートアドレスレジスタ22bに設定する。
また、演算器制御指示生成回路13から出力されるエンドアドレスをレジスタ群41aのエンドアドレスレジスタ22cに設定し、演算器制御指示生成回路13から出力されるループ指示をレジスタ群41aのループ指示レジスタ22aに設定する。
この例では、スタートアドレス=0x0110がスタートアドレスレジスタ22bに設定され、エンドアドレス=0x0173がエンドアドレスレジスタ22cに設定され、ループ指示(LOOP=ON)がループ指示レジスタ22aに設定される。
First, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the start address and the like related to PROC_C (commands C0 to C99) in the register group 41a before starting the control process. The write enable is output to the register storage unit 40, and a register selection signal ("0") indicating that the setting destination is the register group 41a is output to the selector 42.
When the selector 42 receives a register selection signal (“0”) indicating that the setting destination is the register group 41 a from the arithmetic unit control instruction generation circuit 13, the selector 42 selects the register group 41 a and the arithmetic unit control instruction generation circuit 13. Is set in the start address register 22b of the register group 41a.
The end address output from the arithmetic unit control instruction generation circuit 13 is set in the end address register 22c of the register group 41a, and the loop instruction output from the arithmetic unit control instruction generation circuit 13 is set as the loop instruction register 22a of the register group 41a. Set to.
In this example, the start address = 0x0110 is set in the start address register 22b, the end address = 0x0173 is set in the end address register 22c, and the loop instruction (LOOP = ON) is set in the loop instruction register 22a.

次に、シーケンス制御部11の演算器制御指示生成回路13は、制御処理の開始前に、PROC_D(命令D0〜D44)に係るスタートアドレス等をレジスタ群41bに設定するため、内部演算器14の指示の下、書き込みイネーブルをレジスタ格納部40に出力するとともに、設定先がレジスタ群41bである旨を示すレジスタ選択信号(“1”)をセレクタ42に出力する。
セレクタ42は、演算器制御指示生成回路13から設定先がレジスタ群41bである旨を示すレジスタ選択信号(“1”)を受けると、レジスタ群41bを選択して、演算器制御指示生成回路13から出力されるスタートアドレスをレジスタ群41bのスタートアドレスレジスタ22bに設定する。
また、演算器制御指示生成回路13から出力されるエンドアドレスをレジスタ群41bのエンドアドレスレジスタ22cに設定し、演算器制御指示生成回路13から出力されるループ指示をレジスタ群41bのループ指示レジスタ22aに設定する。
この例では、スタートアドレス=0x0174がスタートアドレスレジスタ22bに設定され、エンドアドレス=0x01A0がエンドアドレスレジスタ22cに設定され、ループ指示(LOOP=OFF)がループ指示レジスタ22aに設定される。
Next, the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 sets the start address and the like related to PROC_D (instructions D0 to D44) in the register group 41b before the start of the control processing. Under the instruction, a write enable is output to the register storage unit 40, and a register selection signal ("1") indicating that the setting destination is the register group 41b is output to the selector 42.
When the selector 42 receives a register selection signal (“1”) indicating that the setting destination is the register group 41 b from the arithmetic unit control instruction generation circuit 13, the selector 42 selects the register group 41 b and selects the arithmetic unit control instruction generation circuit 13. Is set in the start address register 22b of the register group 41b.
The end address output from the arithmetic unit control instruction generation circuit 13 is set in the end address register 22c of the register group 41b, and the loop instruction output from the arithmetic unit control instruction generation circuit 13 is set as the loop instruction register 22a of the register group 41b. Set to.
In this example, the start address = 0x0174 is set in the start address register 22b, the end address = 0x01A0 is set in the end address register 22c, and the loop instruction (LOOP = OFF) is set in the loop instruction register 22a.

上記のようにして、PROC_C(命令C0〜C99)及びPROC_D(命令D0〜D44)に係るスタートアドレス等を設定すると、PROC_C(命令C0〜C99)及びPROC_D(命令D0〜D44)の実行を開始する。
まず、PROC_C(命令C0〜C99)を100回繰り返すために、ループ回数を設定する設定命令(図6では、“ループカウンタを100に設定する”と記述されている)がプログラムに記述されているので、シーケンス制御部11の内部演算器14は、その設定命令にしたがってループ回数を汎用レジスタ15に設定する。
図6の例では、ループ回数として、“100”を汎用レジスタ15に設定する。
As described above, when the start address and the like related to PROC_C (commands C0 to C99) and PROC_D (commands D0 to D44) are set, execution of PROC_C (commands C0 to C99) and PROC_D (commands D0 to D44) is started. .
First, in order to repeat PROC_C (instructions C0 to C99) 100 times, a setting instruction for setting the number of loops (described as “setting the loop counter to 100” in FIG. 6) is described in the program. Therefore, the internal arithmetic unit 14 of the sequence control unit 11 sets the number of loops in the general-purpose register 15 in accordance with the setting instruction.
In the example of FIG. 6, “100” is set in the general-purpose register 15 as the number of loops.

次に、PROC_C(命令C0〜C99)の演算開始命令(記述(1))がプログラムに記述されており、その演算開始命令のオペランドが、取得先のレジスタ群がレジスタ群41aである旨を示しているので(レジスタ選択=0)、シーケンス制御部11の演算器制御指示生成回路13が、内部演算器14の指示の下、レジスタ群41aの選択を指示するレジスタ選択信号(“0”)をセレクタ43に出力する。
セレクタ43は、演算器制御指示生成回路13からレジスタ群41aの選択を指示するレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、レジスタ群41aのスタートアドレスレジスタ22bに設定されているスタートアドレス=0x0110をPC制御部23に出力し、レジスタ群41aのエンドアドレスレジスタ22cに設定されているエンドアドレス=0x0173をPC制御部23に出力する。
また、レジスタ群41aのループ指示レジスタ22aに設定されているループ指示(LOOP=ON)をPC制御部23に出力する。
演算器制御指示生成回路13は、内部演算器14の指示の下、「演算開始指示」をPC制御部23に出力する。
Next, the operation start instruction (description (1)) of PROC_C (instructions C0 to C99) is described in the program, and the operand of the operation start instruction indicates that the acquisition destination register group is the register group 41a. (Register selection = 0), the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 generates a register selection signal (“0”) instructing selection of the register group 41a under the instruction of the internal arithmetic unit 14. Output to the selector 43.
When the selector 43 receives a register selection signal (“0”) instructing selection of the register group 41a from the arithmetic unit control instruction generation circuit 13, the selector 43 selects the register group 41a and sets it to the start address register 22b of the register group 41a. The start address = 0x0110 is output to the PC control unit 23, and the end address = 0x0173 set in the end address register 22c of the register group 41a is output to the PC control unit 23.
Further, the loop instruction (LOOP = ON) set in the loop instruction register 22 a of the register group 41 a is output to the PC control unit 23.
The arithmetic unit control instruction generation circuit 13 outputs an “arithmetic start instruction” to the PC control unit 23 under the instruction of the internal arithmetic unit 14.

PC制御部23は、演算器制御指示生成回路13から「演算開始指示」を受けると、上記実施の形態1と同様にして、PROC_C(命令C0〜C99)に係る読み出しアドレス“0x0110”〜“0x0173”を命令発行部31に順次出力する処理を100回繰り返し実行する。
命令発行部31は、上記実施の形態1と同様に、PC制御部23から出力された読み出しアドレス“0x0110”〜“0x0173”に対応する命令C0〜C99を演算器2に100回繰り返し発行する。
なお、PROC_C(命令C0〜C99)のループ実行は、上記実施の形態1と同様にして、PC制御部23がシーケンス制御部11から「演算終了指示」を受けることで終了する。
When receiving the “calculation start instruction” from the arithmetic unit control instruction generation circuit 13, the PC control unit 23 reads the read addresses “0x0110” to “0x0173” related to PROC_C (commands C0 to C99) in the same manner as in the first embodiment. The process of sequentially outputting “to the instruction issuing unit 31 is repeated 100 times.
The instruction issuing unit 31 repeatedly issues the instructions C0 to C99 corresponding to the read addresses “0x0110” to “0x0173” output from the PC control unit 100 to the arithmetic unit 2 100 times as in the first embodiment.
The loop execution of PROC_C (instructions C0 to C99) is terminated when the PC control unit 23 receives an “operation end instruction” from the sequence control unit 11 in the same manner as in the first embodiment.

PROC_C(命令C0〜C99)のループ実行が終了すると、PROC_D(命令D0〜D44)の演算開始命令(記述(3))がプログラムに記述されており、その演算開始命令のオペランドが、取得先のレジスタ群がレジスタ群41bである旨を示しているので(レジスタ選択=1)、シーケンス制御部11の演算器制御指示生成回路13が、内部演算器14の指示の下、レジスタ群41bの選択を指示するレジスタ選択信号(“1”)をセレクタ43に出力する。
セレクタ43は、演算器制御指示生成回路13からレジスタ群41bの選択を指示するレジスタ選択信号(“1”)を受けると、レジスタ群41bを選択して、レジスタ群41bのスタートアドレスレジスタ22bに設定されているスタートアドレス=0x0174をPC制御部23に出力し、レジスタ群41bのエンドアドレスレジスタ22cに設定されているエンドアドレス=0x01A0をPC制御部23に出力する。
また、レジスタ群41bのループ指示レジスタ22aに設定されているループ指示(LOOP=OFF)をPC制御部23に出力する。
演算器制御指示生成回路13は、内部演算器14の指示の下、「演算開始指示」をPC制御部23に出力する。
When the loop execution of PROC_C (instructions C0 to C99) is completed, the operation start instruction (description (3)) of PROC_D (instructions D0 to D44) is described in the program, and the operand of the operation start instruction is the acquisition destination. Since the register group indicates that it is the register group 41b (register selection = 1), the arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 selects the register group 41b under the instruction of the internal arithmetic unit 14. A register selection signal (“1”) to be instructed is output to the selector 43.
When the selector 43 receives a register selection signal (“1”) instructing selection of the register group 41b from the arithmetic unit control instruction generation circuit 13, the selector 43 selects the register group 41b and sets it to the start address register 22b of the register group 41b. The generated start address = 0x0174 is output to the PC control unit 23, and the end address = 0x01A0 set in the end address register 22c of the register group 41b is output to the PC control unit 23.
Further, the loop instruction (LOOP = OFF) set in the loop instruction register 22 a of the register group 41 b is output to the PC control unit 23.
The arithmetic unit control instruction generation circuit 13 outputs an “arithmetic start instruction” to the PC control unit 23 under the instruction of the internal arithmetic unit 14.

PC制御部23は、演算器制御指示生成回路13から「演算開始指示」を受けると、上記実施の形態1と同様にして、PROC_D(命令D0〜D44)に係る読み出しアドレス“0x0174”〜“0x01A0”を命令発行部31に順次出力する処理を1回実行する。
命令発行部31は、上記実施の形態1と同様に、PC制御部23から出力された読み出しアドレス“0x0174”〜“0x01A0”に対応する命令D0〜D44を演算器2に1回発行する。
なお、PROC_D(命令D0〜D44)の実行は、上記実施の形態1と同様に、命令発行部31から命令D0〜D44が発行されることで終了する。
When receiving the “calculation start instruction” from the arithmetic unit control instruction generation circuit 13, the PC control unit 23 reads the read addresses “0x0174” to “0x01A0” related to PROC_D (commands D0 to D44) in the same manner as in the first embodiment. The process of sequentially outputting “to the instruction issuing unit 31 is executed once.
The instruction issuing unit 31 issues the instructions D0 to D44 corresponding to the read addresses “0x0174” to “0x01A0” output from the PC control unit 23 once to the computing unit 2 as in the first embodiment.
Execution of PROC_D (instructions D0 to D44) is terminated when instructions D0 to D44 are issued from the instruction issuing unit 31, as in the first embodiment.

次に、シーケンス制御用のプログラムには、PROC_D(命令D0〜D44)の実行中に、レジスタ群41aのスタートアドレス等を書き換えるパラメータ設定命令が記述されている。
即ち、設定先のレジスタ群がレジスタ群41a(レジスタ選択=0)である旨を示すオペランドと、スタートアドレスが“0x0000”である旨を示すオペランドとを有するパラメータ設定命令(記述(4−1))がプログラムに記述されているので、演算器制御部21におけるPROC_D(命令D0〜D44)の発行処理と並行して、シーケンス制御部11の演算器制御指示生成回路13は、内部演算器14の指示の下、書き込みイネーブルをレジスタ格納部40に出力するとともに、設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)と、スタートアドレス=“0x0000”とをセレクタ42に出力する。
セレクタ42は、演算器制御指示生成回路13から設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、演算器制御指示生成回路13から出力されたスタートアドレス=“0x0000”をレジスタ群41aのスタートアドレスレジスタ22bに設定する。
Next, in the sequence control program, a parameter setting instruction for rewriting the start address and the like of the register group 41a during execution of PROC_D (instructions D0 to D44) is described.
That is, a parameter setting instruction (description (4-1)) having an operand indicating that the register group to be set is the register group 41a (register selection = 0) and an operand indicating that the start address is “0x0000”. ) Is described in the program, and in parallel with the issuance processing of PROC_D (commands D0 to D44) in the computing unit control unit 21, the computing unit control instruction generation circuit 13 in the sequence control unit 11 Under the instruction, a write enable is output to the register storage unit 40, and a register selection signal (“0”) indicating that the setting destination is the register group 41a and a start address = “0x0000” are output to the selector 42. .
When the selector 42 receives a register selection signal (“0”) indicating that the setting destination is the register group 41 a from the arithmetic unit control instruction generation circuit 13, the selector 42 selects the register group 41 a and the arithmetic unit control instruction generation circuit 13. Is set to the start address register 22b of the register group 41a.

次に、設定先のレジスタ群がレジスタ群41a(レジスタ選択=0)である旨を示すオペランドと、エンドアドレスが“0x0007”である旨を示すオペランドとを有するパラメータ設定命令(記述(4−2))がプログラムに記述されているので、演算器制御部21におけるPROC_D(命令D0〜D44)の発行処理と並行して、シーケンス制御部11の演算器制御指示生成回路13は、内部演算器14の指示の下、書き込みイネーブルをレジスタ格納部40に出力するとともに、設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)と、エンドアドレス=“0x0007”とをセレクタ42に出力する。
セレクタ42は、演算器制御指示生成回路13から設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、演算器制御指示生成回路13から出力されたエンドアドレス=“0x0007”をレジスタ群41aのエンドアドレスレジスタ22cに設定する。
Next, a parameter setting instruction (description (4-2) having an operand indicating that the register group to be set is the register group 41a (register selection = 0) and an operand indicating that the end address is “0x0007”. )) Is described in the program, and in parallel with the issuance processing of PROC_D (commands D0 to D44) in the computing unit control unit 21, the computing unit control instruction generation circuit 13 in the sequence control unit 11 Under the instruction, a write enable is output to the register storage unit 40, and a register selection signal (“0”) indicating that the setting destination is the register group 41a and an end address = “0x0007” are output to the selector 42. To do.
When the selector 42 receives a register selection signal (“0”) indicating that the setting destination is the register group 41 a from the arithmetic unit control instruction generation circuit 13, the selector 42 selects the register group 41 a and the arithmetic unit control instruction generation circuit 13. Is set to the end address register 22c of the register group 41a.

次に、設定先のレジスタ群がレジスタ群41a(レジスタ選択=0)である旨を示すオペランドと、ループ指示が“OFF”である旨を示すオペランドとを有するパラメータ設定命令(記述(4−3))がプログラムに記述されているので、演算器制御部21におけるPROC_D(命令D0〜D44)の発行処理と並行して、シーケンス制御部11の演算器制御指示生成回路13は、内部演算器14の指示の下、書き込みイネーブルをレジスタ格納部40に出力するとともに、設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)と、ループ指示(LOOP=OFF)とをセレクタ42に出力する。
セレクタ42は、演算器制御指示生成回路13から設定先がレジスタ群41aである旨を示すレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、演算器制御指示生成回路13から出力されたループ指示(LOOP=OFF)をレジスタ群41aのループ指示レジスタ22aに設定する。
Next, a parameter setting instruction (description (4-3) having an operand indicating that the register group to be set is the register group 41a (register selection = 0) and an operand indicating that the loop instruction is “OFF”. )) Is described in the program, and in parallel with the issuance processing of PROC_D (commands D0 to D44) in the computing unit control unit 21, the computing unit control instruction generation circuit 13 in the sequence control unit 11 Under the instruction, the write enable is output to the register storage unit 40, and a register selection signal (“0”) indicating that the setting destination is the register group 41a and a loop instruction (LOOP = OFF) are sent to the selector 42. Output.
When the selector 42 receives a register selection signal (“0”) indicating that the setting destination is the register group 41 a from the arithmetic unit control instruction generation circuit 13, the selector 42 selects the register group 41 a and the arithmetic unit control instruction generation circuit 13. The loop instruction (LOOP = OFF) output from is set in the loop instruction register 22a of the register group 41a.

シーケンス制御部11は、PROC_A(命令A0〜A7)に係るスタートアドレス等の設定が完了すると、PROC_D(命令D0〜D44)の実行が完了するまで待機する。あるいは、別の単一演算の実行等を行う。
シーケンス制御部11の演算器制御指示生成回路13は、PROC_A(命令A0〜A7)の演算開始命令(記述(5))がプログラムに記述されており、その演算開始命令のオペランドが、取得先のレジスタ群がレジスタ群41aである旨を示しているので(レジスタ選択=0)、PC制御部23のPC生成回路27から「1ループ終了通知」が出力されると、内部演算器14の指示の下、レジスタ群41aの選択を指示するレジスタ選択信号(“0”)をセレクタ43に出力する。
When the setting of the start address and the like related to PROC_A (commands A0 to A7) is completed, the sequence control unit 11 waits until the execution of PROC_D (commands D0 to D44) is completed. Alternatively, another single operation is executed.
The arithmetic unit control instruction generation circuit 13 of the sequence control unit 11 has the operation start instruction (description (5)) of PROC_A (instructions A0 to A7) described in the program, and the operand of the operation start instruction is the acquisition destination. Since the register group indicates that it is the register group 41a (register selection = 0), when “1 loop end notification” is output from the PC generation circuit 27 of the PC control unit 23, the instruction of the internal arithmetic unit 14 is instructed. Below, a register selection signal (“0”) instructing selection of the register group 41 a is output to the selector 43.

セレクタ43は、演算器制御指示生成回路13からレジスタ群41aの選択を指示するレジスタ選択信号(“0”)を受けると、レジスタ群41aを選択して、レジスタ群41aのスタートアドレスレジスタ22bに設定されているスタートアドレス=0x0000をPC制御部23に出力し、レジスタ群41aのエンドアドレスレジスタ22cに設定されているエンドアドレス=0x0007をPC制御部23に出力する。
また、レジスタ群41aのループ指示レジスタ22aに設定されているループ指示(LOOP=OFF)をPC制御部23に出力する。
演算器制御指示生成回路13は、内部演算器14の指示の下、「演算開始指示」をPC制御部23に出力する。
When the selector 43 receives a register selection signal (“0”) instructing selection of the register group 41a from the arithmetic unit control instruction generation circuit 13, the selector 43 selects the register group 41a and sets it to the start address register 22b of the register group 41a. The start address = 0x0000 is output to the PC control unit 23, and the end address = 0x0007 set in the end address register 22c of the register group 41a is output to the PC control unit 23.
Further, the loop instruction (LOOP = OFF) set in the loop instruction register 22 a of the register group 41 a is output to the PC control unit 23.
The arithmetic unit control instruction generation circuit 13 outputs an “arithmetic start instruction” to the PC control unit 23 under the instruction of the internal arithmetic unit 14.

PC制御部23は、演算器制御指示生成回路13から「演算開始指示」を受けると、PROC_D(命令D0〜D44)に係る読み出しアドレスを出力する場合と同様にして、PROC_A(命令A0〜A7)に係る読み出しアドレス“0x0000”〜“0x0007”を命令発行部31に順次出力する処理を1回実行する。
命令発行部31は、PC制御部23から出力された読み出しアドレス“0x0000”〜“0x0007”に対応する命令A0〜A7を演算器2に1回発行する。
なお、PROC_A(命令A0〜A7)の実行は、命令発行部31から命令A0〜A7が発行されることで終了する。
When receiving the “calculation start instruction” from the arithmetic unit control instruction generation circuit 13, the PC control unit 23 performs PROC_A (instructions A0 to A7) in the same manner as when the read address related to PROC_D (instructions D0 to D44) is output. The process of sequentially outputting the read addresses “0x0000” to “0x0007” to the instruction issuing unit 31 is executed once.
The instruction issuing unit 31 issues instructions A0 to A7 corresponding to the read addresses “0x0000” to “0x0007” output from the PC control unit 23 to the computing unit 2 once.
The execution of PROC_A (instructions A0 to A7) ends when instructions A0 to A7 are issued from the instruction issuing unit 31.

以上で明らかなように、この実施の形態3によれば、演算器制御部21が2個のレジスタ群41a,41bを実装して、2個のレジスタ群41a,41bに対して、2個の演算開始命令に係るスタートアドレス、エンドアドレス及びループ指示を設定するように構成したので、予め制御処理の開始前に、2個の演算開始命令に係るスタートアドレス、エンドアドレス及びループ指示をレジスタ群41a,41bに設定していれば、2個目の演算開始命令を実行する前に、2個目の演算開始命令に係るスタートアドレス等を設定する処理が不要になり、更なる演算処理の高速化を図ることができる効果を奏する。この効果は、レジスタ群の実装数が多いほど大きくなる。   As apparent from the above, according to the third embodiment, the arithmetic unit control unit 21 mounts two register groups 41a and 41b, and two register groups 41a and 41b are provided with two registers. Since the start address, the end address, and the loop instruction related to the calculation start instruction are set, the start address, the end address, and the loop instruction related to the two calculation start instructions are previously registered before starting the control process. , 41b, it becomes unnecessary to set a start address or the like related to the second calculation start instruction before executing the second calculation start instruction, thereby further speeding up the calculation process. The effect which can aim at is produced. This effect increases as the number of mounted register groups increases.

なお、この実施の形態3では、シーケンス制御部11が演算開始命令に係るスタートアドレス等を2個のレジスタ群41a,41bに設定するものについて示したが、制御処理の開始前に、外部から演算開始命令に係るスタートアドレス等を2個のレジスタ群41a,41bにダウンロードするようにしてもよい。   In the third embodiment, the sequence controller 11 sets the start address and the like related to the calculation start instruction in the two register groups 41a and 41b. However, before the control process is started, the calculation is performed from the outside. The start address or the like related to the start command may be downloaded to the two register groups 41a and 41b.

1 制御回路、2 演算器、11 シーケンス制御部、12 シーケンス制御用命令メモリ、13 演算器制御指示生成回路(初期設定手段)、14 内部演算器(演算終了判定手段)、15 汎用レジスタ、21 演算器制御部、22 レジスタ群、22a ループ指示レジスタ、22b スタートアドレスレジスタ、22c エンドアドレスレジスタ、23 PC制御部、24 フラグ生成回路(繰り返し処理制御手段)、25 実行フラグレジスタ(繰り返し処理制御手段)、26 演算終了フラグレジスタ(繰り返し処理制御手段)、27 PC生成回路(アドレス出力手段、繰り返し処理制御手段)、28 次PCレジスタ(アドレス出力手段、繰り返し処理制御手段)、29 現PCレジスタ(アドレス出力手段、繰り返し処理制御手段)、30 アドレス生成回路(アドレス出力手段)、31 命令発行部(命令発行手段)、32 演算用命令メモリ、40 レジスタ格納部、41a,41b レジスタ群、42,43 セレクタ。   DESCRIPTION OF SYMBOLS 1 Control circuit, 2 arithmetic unit, 11 Sequence control part, 12 Sequence control command memory, 13 Operation unit control instruction generation circuit (initial setting means), 14 Internal arithmetic unit (calculation end determination means), 15 General-purpose register, 21 arithmetic Control unit, 22 register group, 22a loop instruction register, 22b start address register, 22c end address register, 23 PC control unit, 24 flag generation circuit (repetition process control means), 25 execution flag register (repetition process control means), 26 calculation end flag register (repetition processing control means), 27 PC generation circuit (address output means, repetition processing control means), 28th PC register (address output means, repetition processing control means), 29 current PC register (address output means) , Repetitive processing control means), 0 address generation circuit (address output means), 31 instruction issue unit (instruction issuing means) 32 arithmetic instruction memory, 40 a register storing portion, 41a, 41b registers, 42 and 43 selector.

Claims (6)

シーケンス制御用のプログラム内の命令が、演算用命令メモリに格納されている一連の演算命令を外部の演算器に実行させる演算開始命令であれば、一連の演算命令の中の先頭の演算命令が格納されている上記演算用命令メモリ内のアドレスを示すスタートアドレスを設定する処理と、最後の演算命令が格納されている上記演算用命令メモリ内のアドレスを示すエンドアドレスを設定する処理と、一連の演算命令の繰り返しの有無を設定する処理とのそれぞれを、演算開始命令を実行する際に行うか、または、演算開始命令を実行することに先立って行い、一連の演算命令の繰り返しが有る場合には、一連の演算命令の繰り返し回数を設定する処理を、演算開始命令を実行することに先立って行う初期設定手段と、上記初期設定手段により設定されたスタートアドレスを読み出しアドレスに設定して、上記読み出しアドレスを出力し、その後、上記読み出しアドレスをインクリメントして、インクリメント後の読み出しアドレスを出力する処理を繰り返し実施するアドレス出力手段と、上記演算用命令メモリに格納されている演算命令の中から、上記アドレス出力手段から出力された読み出しアドレスに対応する演算命令を読み出し、上記演算命令を上記演算器に発行する命令発行手段と、上記初期設定手段により設定された繰り返しの有無が“有”である場合、上記アドレス出力手段から出力された読み出しアドレスが上記初期設定手段により設定されたエンドアドレスと一致すると、1ループ終了通知を出力するとともに、現時点までに演算終了指示が出力されていなければ、上記アドレス出力手段により設定された読み出しアドレスを上記スタートアドレスに戻して、アドレス出力処理の継続を上記アドレス出力手段に指示し、上記初期設定手段により設定された繰り返しの有無が“無”である場合、上記アドレス出力手段から出力された読み出しアドレスが上記初期設定手段により設定されたエンドアドレスと一致すると、アドレス出力処理の停止を上記アドレス出力手段に指示する繰り返し処理制御手段と、上記繰り返し処理制御手段による1ループ終了通知の出力回数と上記初期設定手段により設定された繰り返し回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に上記演算終了指示を上記繰り返し処理制御手段に出力する演算終了判定手段とを備えたデータ演算装置の制御回路。 If the instruction in the sequence control program is an operation start instruction that causes an external arithmetic unit to execute a series of operation instructions stored in the operation instruction memory, the first operation instruction in the series of operation instructions is A process of setting a start address indicating an address in the stored instruction memory, a process of setting an end address indicating an address in the instruction instruction memory storing the last operation instruction, and a series of When there is a repetition of a series of operation instructions , either when the operation start instruction is executed or before the execution of the operation start instruction. , the processing for setting the number of repetitions of a sequence of arithmetic instructions, the initial setting unit that performs prior to performing an operation start command, set by the initial setting means An address output means for setting the read start address as a read address, outputting the read address, then incrementing the read address, and outputting the read address after the increment; Instruction issuing means for reading out an operation instruction corresponding to the read address output from the address output means from among the operation instructions stored in the instruction memory, and issuing the operation instruction to the calculator; and the initial setting means When the presence / absence of the repetition set by “Yes” is “Yes”, if the read address output from the address output unit matches the end address set by the initial setting unit, a one-loop end notification is output and If the calculation end instruction has not been output before, When the read address set by the address output means is returned to the start address, the address output means is instructed to continue the address output processing, and the repetition set by the initial setting means is “None” When the read address output from the address output means coincides with the end address set by the initial setting means, a repetition processing control means for instructing the address output means to stop the address output processing, and the repetition processing control means The number of outputs of one-loop end notification by means of the above and the number of repetitions set by the initial setting means are compared to determine whether or not to end the repetition calculation, and when the repetition calculation ends, the calculation end instruction is sent to the repetition process. Control of a data operation device having operation end determination means for outputting to the control means circuit. 演算終了判定手段は、予め、初期設定手段により設定された繰り返し回数をループカウンタに設定しておき、繰り返し処理制御手段から1ループ終了通知が出力される毎に、上記ループカウンタのカウント値をデクリメントし、デクリメント後のカウント値が“1”になると、演算終了指示を上記繰り返し処理制御手段に出力することを特徴とする請求項1記載のデータ演算装置の制御回路。   The calculation end determination means sets the number of repetitions set by the initial setting means in advance in the loop counter, and decrements the count value of the loop counter every time one loop end notification is output from the repetition processing control means. 2. A control circuit for a data arithmetic device according to claim 1, wherein when the count value after decrement becomes "1", an arithmetic end instruction is output to said repetitive processing control means. 初期設定手段は、シーケンス制御用のプログラム内の命令が、スタートアドレス、エンドアドレス及び一連の演算命令の繰り返しの有無を含む演算開始命令である場合、上記演算開始命令に含まれているスタートアドレス、エンドアドレス及び一連の演算命令の繰り返しの有無を設定することを特徴とする請求項1または請求項2記載のデータ演算装置の制御回路。   When the instruction in the program for sequence control is an operation start instruction including a start address, an end address, and whether or not a series of operation instructions are repeated, a start address included in the operation start instruction, 3. The control circuit for a data arithmetic device according to claim 1, wherein an end address and whether or not a series of arithmetic instructions are repeated are set. 初期設定手段は、スタートアドレス、エンドアドレス及び一連の演算命令の繰り返しの有無が演算開始命令に含まれていない場合、スタートアドレス、エンドアドレス又は一連の演算命令の繰り返しの有無を設定する設定命令にしたがってスタートアドレス、エンドアドレス又は一連の演算命令の繰り返しの有無を設定することを特徴とする請求項1または請求項2記載のデータ演算装置の制御回路。   When the operation start instruction does not include the start address, the end address, and whether a series of operation instructions are repeated, the initial setting means sets the start address, the end address, or a series of operation instructions to be repeated. 3. The control circuit for a data arithmetic device according to claim 1, wherein a start address, an end address, or whether or not a series of arithmetic instructions are repeated is set. データ演算装置の制御回路には、スタートアドレス、エンドアドレス及び一連の演算命令の繰り返しの有無を格納するメモリが複数個実装されており、
初期設定手段は、複数の演算開始命令に係るスタートアドレス、エンドアドレス及び一連の演算命令の繰り返しの有無をそれぞれ上記メモリに設定し、
アドレス出力手段は、選択信号が指し示すメモリからスタートアドレスを読み出し、
繰り返し処理制御手段は、上記選択信号が指し示すメモリからエンドアドレス及び一連の演算命令の繰り返しの有無を読み出すことを特徴とする請求項1から請求項4のうちのいずれか1項記載のデータ演算装置の制御回路。
In the control circuit of the data operation device, a plurality of memories for storing the start address, end address and presence / absence of repetition of a series of operation instructions are mounted .
The initial setting means sets the start address, end address, and presence / absence of a series of operation instructions related to a plurality of operation start instructions in the memory,
The address output means reads the start address from the memory indicated by the selection signal,
5. The data operation device according to claim 1, wherein the repetitive processing control unit reads an end address and presence / absence of repetition of a series of operation instructions from a memory indicated by the selection signal. Control circuit.
発行された演算命令を実行して、上記演算命令の演算結果を返す演算器と、シーケンス制御用のプログラム内の命令が、演算用命令メモリに格納されている一連の演算命令を上記演算器に実行させる演算開始命令であれば、一連の演算命令の中の先頭の演算命令が格納されている上記演算用命令メモリ内のアドレスを示すスタートアドレスを設定する処理と、最後の演算命令が格納されている上記演算用命令メモリ内のアドレスを示すエンドアドレスを設定する処理と、一連の演算命令の繰り返しの有無を設定する処理とのそれぞれを、演算開始命令を実行する際に行うか、または、演算開始命令を実行することに先立って行い、一連の演算命令の繰り返しが有る場合には、一連の演算命令の繰り返し回数を設定する処理を、演算開始命令を実行することに先立って行う初期設定手段と、上記初期設定手段により設定されたスタートアドレスを読み出しアドレスに設定して、上記読み出しアドレスを出力し、その後、上記読み出しアドレスをインクリメントして、インクリメント後の読み出しアドレスを出力する処理を繰り返し実施するアドレス出力手段と、上記演算用命令メモリに格納されている演算命令の中から、上記アドレス出力手段から出力された読み出しアドレスに対応する演算命令を読み出し、上記演算命令を上記演算器に発行する命令発行手段と、上記初期設定手段により設定された繰り返しの有無が“有”である場合、上記アドレス出力手段から出力された読み出しアドレスが上記初期設定手段により設定されたエンドアドレスと一致すると、1ループ終了通知を出力するとともに、現時点までに演算終了指示が出力されていなければ、上記アドレス出力手段により設定された読み出しアドレスを上記スタートアドレスに戻して、アドレス出力処理の継続を上記アドレス出力手段に指示し、上記初期設定手段により設定された繰り返しの有無が“無”である場合、上記アドレス出力手段から出力された読み出しアドレスが上記初期設定手段により設定されたエンドアドレスと一致すると、アドレス出力処理の停止を上記アドレス出力手段に指示する繰り返し処理制御手段と、上記繰り返し処理制御手段による1ループ終了通知の出力回数と上記初期設定手段により設定された繰り返し回数を比較して繰り返し演算を終了するか否かを判定し、繰り返し演算を終了する際に上記演算終了指示を上記繰り返し処理制御手段に出力する演算終了判定手段とを備えたデータ演算装置。 An arithmetic unit that executes the issued arithmetic instruction and returns the operation result of the arithmetic instruction, and a series of arithmetic instructions stored in the arithmetic instruction memory are stored in the arithmetic unit. If it is an operation start instruction to be executed, a process for setting a start address indicating an address in the operation instruction memory in which the first operation instruction in the series of operation instructions is stored, and the last operation instruction are stored. Each of the processing for setting the end address indicating the address in the arithmetic instruction memory and the processing for setting the presence / absence of repetition of a series of arithmetic instructions when the arithmetic start instruction is executed, or be performed prior to performing the operation start instruction, when the repetition of a sequence of operation instruction is present, the process of setting the number of repetitions of a sequence of operation instruction, the operation start instruction An initial setting unit that carried out prior to the line, and set the read address start address set by the initial setting means, and outputs the read address, then increment the read address, the incremented Read out the operation instruction corresponding to the read address output from the address output means from among the address output means for repeatedly executing the process of outputting the read address and the operation instructions stored in the operation instruction memory. When the presence / absence of the repetition set by the instruction issuing means and the initial setting means is “Yes”, the read address output from the address output means is set by the initial setting means. If it matches the specified end address, a one-loop end notification is sent. If no calculation end instruction has been output by the present time, the read address set by the address output unit is returned to the start address, and the address output unit is instructed to continue the address output process. When the presence / absence of repetition set by the initial setting means is “none”, when the read address output from the address output means matches the end address set by the initial setting means, the address output processing is stopped. It is determined whether or not to end the repetitive calculation by comparing the repetitive processing control means instructing the address output means, the number of outputs of one loop end notification by the repetitive processing control means and the repetitive number set by the initial setting means When the repetitive calculation ends, the calculation end instruction is A data computation device comprising computation end determination means for outputting to the physical control means.
JP2009239281A 2009-10-16 2009-10-16 Data arithmetic device control circuit and data arithmetic device Active JP5511299B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009239281A JP5511299B2 (en) 2009-10-16 2009-10-16 Data arithmetic device control circuit and data arithmetic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009239281A JP5511299B2 (en) 2009-10-16 2009-10-16 Data arithmetic device control circuit and data arithmetic device

Publications (2)

Publication Number Publication Date
JP2011086157A JP2011086157A (en) 2011-04-28
JP5511299B2 true JP5511299B2 (en) 2014-06-04

Family

ID=44079048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009239281A Active JP5511299B2 (en) 2009-10-16 2009-10-16 Data arithmetic device control circuit and data arithmetic device

Country Status (1)

Country Link
JP (1) JP5511299B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9703559B2 (en) 2011-11-09 2017-07-11 Nec Corporation Digital signal processor, program control method, and control program

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS607536A (en) * 1983-06-24 1985-01-16 Mitsubishi Electric Corp Information processor
JPS63200234A (en) * 1987-02-17 1988-08-18 Toshiba Corp Data processor
JP2954671B2 (en) * 1990-07-17 1999-09-27 富士通株式会社 Controller for memory management
JPH0728639A (en) * 1993-07-13 1995-01-31 Nec Corp Microprocessor
JPH07253922A (en) * 1994-03-14 1995-10-03 Texas Instr Japan Ltd Address generation circuit
JPH09237186A (en) * 1996-03-04 1997-09-09 Hitachi Ltd Loop controller and processor
GB2325535A (en) * 1997-05-23 1998-11-25 Aspex Microsystems Ltd Data processor controller with accelerated instruction generation
JP3842474B2 (en) * 1999-02-02 2006-11-08 株式会社ルネサステクノロジ Data processing device
JP2000305778A (en) * 1999-04-22 2000-11-02 Matsushita Electric Ind Co Ltd Instruction processing unit
JP2002297378A (en) * 2001-03-30 2002-10-11 Sanyo Electric Co Ltd Signal processor
US7370136B2 (en) * 2005-01-26 2008-05-06 Stmicroelectronics, Inc. Efficient and flexible sequencing of data processing units extending VLIW architecture

Also Published As

Publication number Publication date
JP2011086157A (en) 2011-04-28

Similar Documents

Publication Publication Date Title
JP5512803B2 (en) Data processing apparatus and method for handling vector instructions
CN107688854B (en) An arithmetic unit, method and device capable of supporting arithmetic data of different bit widths
JP4526560B2 (en) Processor and signal processing method
KR101660659B1 (en) Executing subroutines in a multi-threaded processing system
US11816485B2 (en) Nested loop control
JP2019511056A (en) Complex multiplication instruction
JP2560988B2 (en) Information processing apparatus and processing method
KR20180137521A (en) Apparatus and method for address conflict management in performing vector operations
US11972236B1 (en) Nested loop control
JP7048612B2 (en) Vector generation instruction
JP5511299B2 (en) Data arithmetic device control circuit and data arithmetic device
JP7510253B2 (en) Branch Predictor
US8631173B2 (en) Semiconductor device
JP2007334563A (en) Vector processing device with mask
US11474946B2 (en) Calculator and calculation method
US20020124159A1 (en) Data processing apparatus
CN114115092A (en) A kind of heterogeneous dual-core PLC cooperative execution method and device
CN119690453A (en) Instruction scheduling method, apparatus, device, storage medium and program product
JP6107904B2 (en) Processor and store instruction conversion method
JP4703735B2 (en) Compiler, code generation method, code generation program
JP5013966B2 (en) Arithmetic processing unit
JP2825315B2 (en) Information processing device
WO2015136686A1 (en) Method and apparatus for processing information
JP4502983B2 (en) Vector control circuit, vector processing device, vector control method, and vector control program
JP2010140398A (en) Apparatus and method for data process

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140207

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: 20140225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140325

R150 Certificate of patent or registration of utility model

Ref document number: 5511299

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250