[go: up one dir, main page]

JP2006048661A - Arithmetic processing device for controlling data transfer between processor and coprocessor - Google Patents

Arithmetic processing device for controlling data transfer between processor and coprocessor Download PDF

Info

Publication number
JP2006048661A
JP2006048661A JP2005191931A JP2005191931A JP2006048661A JP 2006048661 A JP2006048661 A JP 2006048661A JP 2005191931 A JP2005191931 A JP 2005191931A JP 2005191931 A JP2005191931 A JP 2005191931A JP 2006048661 A JP2006048661 A JP 2006048661A
Authority
JP
Japan
Prior art keywords
coprocessor
instruction
data
arithmetic processing
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005191931A
Other languages
Japanese (ja)
Inventor
Masaki Maeda
昌樹 前田
Hiroyuki Morishita
広之 森下
Takeshi Tanaka
健 田中
Tokuzo Kiyohara
督三 清原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005191931A priority Critical patent/JP2006048661A/en
Publication of JP2006048661A publication Critical patent/JP2006048661A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)

Abstract

【課題】 主プロセッサとコプロセッサとの間でのデータ転送に要するサイクル数を低減し得る演算処理装置を提供する。
【解決手段】 主プロセッサにおける、命令を逐次解釈して命令に基づく制御を行う命令解釈制御部は、単一命令中のフィールド22で前記コプロセッサに実行させるべき演算処理の種別を指定してフィールド24で当該演算処理の対象が格納されている第1のレジスタを指定してフィールド23で前記コプロセッサが演算処理をした結果が格納されるべき第2のレジスタを指定しコプロセッサへの演算を依頼するコプロセッサ演算命令を、取得し解釈することにより、前記コプロセッサに、第1のレジスタの内容を演算処理対象として当該種別の演算処理を実行させ、更に、コプロセッサによりなされた演算処理の結果を、第2のレジスタに書き込む制御を行う。
【選択図】 図2
PROBLEM TO BE SOLVED: To provide an arithmetic processing device capable of reducing the number of cycles required for data transfer between a main processor and a coprocessor.
An instruction interpretation control unit that sequentially interprets instructions and performs control based on instructions in a main processor specifies a type of arithmetic processing to be executed by the coprocessor in a field 22 in a single instruction. 24 designates the first register in which the subject of the arithmetic processing is stored, and designates the second register in which the result of the arithmetic processing by the coprocessor is to be stored in the field 23, and performs the operation on the coprocessor By obtaining and interpreting the requested coprocessor operation instruction, the coprocessor is caused to execute the operation processing of the type with the contents of the first register as the operation processing target, and further the operation processing performed by the coprocessor Control is performed to write the result to the second register.
[Selection] Figure 2

Description

本発明は、プロセッサとコプロセッサとを備える演算処理装置に関し、特に、プロセッサと所定の演算を行うコプロセッサとの間での演算対象及び演算結果のデータ転送制御技術に関する。   The present invention relates to an arithmetic processing device including a processor and a coprocessor, and more particularly, to a data transfer control technique for an operation target and an operation result between the processor and a coprocessor that performs a predetermined operation.

従来、計算機システムにおける演算処理装置として、汎用的なプロセッサ(以下、「主プロセッサ」という。)と特定演算用のプロセッサ(以下、「コプロセッサ」という。)とを含み、これら複数のプロセッサが協調して動作するように構成されている演算処理装置がある。
このような主プロセッサとコプロセッサとを含む演算処理装置は、例えば、MPEG(Moving Picture Experts Group)方式での動画像の符号化(エンコード)処理に用いられる。
Conventionally, an arithmetic processing unit in a computer system includes a general-purpose processor (hereinafter referred to as “main processor”) and a processor for specific operation (hereinafter referred to as “coprocessor”), and these plural processors are coordinated. There is an arithmetic processing unit configured to operate as described above.
An arithmetic processing unit including such a main processor and a coprocessor is used for, for example, a moving picture encoding process in the MPEG (Moving Picture Experts Group) system.

このエンコード処理における計算量の大部分を占めるME(Motion Estimation)処理において、処理対象とする動画を構成する各画像の画素データ間の差分絶対値演算及びその和を計算する必要があり、一般に非常に多くの画素データを計算対象とすることから、その差分絶対値演算及びその和に係る演算回数は非常に多いものとなる。
そこで、この差分絶対値演算及びその和を、並列計算することに特化した演算器を有するコプロセッサに計算させ、それ以外に、エンコード処理のために必要な処理を、主プロセッサが行うことにより、処理全体に必要となるクロックサイクル(以下、単に「サイクル」という。)の数を低減する。
In ME (Motion Estimation) processing, which occupies most of the calculation amount in this encoding processing, it is necessary to calculate the absolute value difference between pixel data of each image constituting the moving image to be processed and the sum thereof. Since a large amount of pixel data is subject to calculation, the difference absolute value calculation and the number of calculations related to the sum thereof are very large.
Therefore, the main processor performs the processing necessary for the encoding process in addition to the coprocessor having an arithmetic unit specialized in calculating the difference absolute value calculation and the sum thereof. The number of clock cycles (hereinafter simply referred to as “cycles”) required for the entire process is reduced.

このように、主プロセッサとコプロセッサとが協調動作を行う演算処理装置は、当然ながら、単一のプロセッサからなる演算処理装置に処理を行わせる場合よりも、少ないサイクル数で目的の処理を完了できるので、演算処理装置の動作周波数を比較的低く抑えてもその目的の処理を完了できるようになる。
一般に演算処理装置の動作周波数を高めるための技術開発には多くのコストを要するため、目的の処理を完了するためのサイクル数を低減することは、比較的コストの低い演算処理装置により目的の処理を行わせることができるようになるという効果に繋がり、演算処理装置の動作周波数を低く抑えることは消費電力を低く抑えることができるようになるという効果に繋がる。
In this way, the arithmetic processing unit in which the main processor and the coprocessor perform a cooperative operation, as a matter of course, completes the target processing in a smaller number of cycles than when the arithmetic processing unit consisting of a single processor performs processing. Therefore, even if the operating frequency of the arithmetic processing unit is kept relatively low, the intended processing can be completed.
In general, technology development for increasing the operating frequency of an arithmetic processing unit requires a large amount of cost. Therefore, reducing the number of cycles for completing a target process can be achieved by using a relatively low-cost arithmetic processing unit. This leads to the effect that the power consumption can be performed, and suppressing the operating frequency of the arithmetic processing device low leads to the effect that the power consumption can be suppressed low.

ところで、従来、コプロセッサに行わせるべき演算を指示するための命令として、コプロセッサ・データ操作命令、コプロセッサ・レジスタ転送命令が知られており、主プロセッサとコプロセッサとの間での演算対象や演算結果のデータ転送を指示するための命令としては、コプロセッサ・レジスタ転送命令が知られている(非特許文献1参照)。
このコプロセッサ・レジスタ転送命令は、主プロセッサとコプロセッサとの間での一方向のデータ転送を指定する命令である。
By the way, conventionally, coprocessor / data manipulation instructions and coprocessor / register transfer instructions are known as instructions for instructing operations to be performed by the coprocessor. A coprocessor register transfer instruction is known as an instruction for instructing data transfer of operation results (see Non-Patent Document 1).
This coprocessor register transfer instruction is an instruction for designating one-way data transfer between the main processor and the coprocessor.

具体的に言えば、このコプロセッサ・レジスタ転送命令では、演算対象であるソースデータ及び演算結果であるデスティネーションデータのいずれか一方しか主プロセッサのレジスタを指定できない。
図17に、コプロセッサに演算を行わせるプログラムの例を示す。
同図のプログラムにおいて、行L1における命令MCRは、コプロセッサへのデータ転送を伴いコプロセッサに指示をするコプロセッサ・レジスタ転送命令であり、コプロセッサを特定する第1オペランドp0と、コプロセッサの処理内容を特定する第2オペランドであって値0なら3サイクル要する特定のコプロセッサ演算を行う旨を示すものと、演算対象のソースデータが格納されている主プロセッサ内のレジスタを指定する第3オペランドr1と、コプロセッサ内で演算に用いられるレジスタを指定する第4オペランドCr1及び第5オペランドCr2とからなる。また、行L2及び行L3における命令nopは1サイクル費やして特段の処理を行わない命令であり、行L4における命令MRCは、コプロセッサからのデータ転送を伴いコプロセッサに指示をするコプロセッサ・レジスタ転送命令であり、コプロセッサを特定する第1オペランドp0と、コプロセッサの処理内容を特定する第2オペランドであって値が1なら演算を行わない旨を示すものと、演算結果であるデスティネーションデータが格納されるべき主プロセッサ内のレジスタを指定する第3オペランドr0と、コプロセッサ内で演算に用いられるレジスタを指定する第4オペランドCr1及び第5オペランドCr2とからなる。
More specifically, in this coprocessor / register transfer instruction, only one of the source data as the operation target and the destination data as the operation result can specify the register of the main processor.
FIG. 17 shows an example of a program that causes the coprocessor to perform an operation.
In the program shown in the figure, the instruction MCR in the row L1 is a coprocessor / register transfer instruction that instructs the coprocessor with data transfer to the coprocessor, and includes a first operand p0 for specifying the coprocessor, A second operand for specifying the processing contents, and a value of 0 indicates that a specific coprocessor operation requiring 3 cycles is to be performed, and a third for specifying a register in the main processor in which the source data to be calculated is stored It consists of an operand r1 and a fourth operand Cr1 and a fifth operand Cr2 that specify a register used for calculation in the coprocessor. Further, the instruction nop in the row L2 and the row L3 is an instruction that spends one cycle and does not perform any special processing, and the instruction MRC in the row L4 is a coprocessor register that instructs the coprocessor with data transfer from the coprocessor. A first instruction p0 that specifies a coprocessor, a second operand that specifies the processing contents of the coprocessor and indicates that no operation is performed if the value is 1, and a destination that is an operation result It comprises a third operand r0 for designating a register in the main processor in which data is to be stored, and a fourth operand Cr1 and a fifth operand Cr2 for designating registers used for operations in the coprocessor.

このように、ソースデータは主プロセッサに格納されており、そのソースデータに基づいてコプロセッサにおいて演算を行い、その演算結果として生成されたデスティネーションデータを主プロセッサに格納しなければならない場合には、ソースデータの転送のためと、デスティネーションデータの転送のためにコプロセッサ・レジスタ転送命令を2度発行する。
Steve Furber著,アーム株式会社(監訳),「改訂ARMプロセッサ」,2001年12月18日(初版発行),CQ出版株式会社(発行)、p.122−126
As described above, when the source data is stored in the main processor, the coprocessor performs an operation based on the source data, and the destination data generated as a result of the operation must be stored in the main processor. The coprocessor register transfer instruction is issued twice for the transfer of the source data and the transfer of the destination data.
Steve Furber, Arm Co., Ltd. (supervised), “Revised ARM Processor”, December 18, 2001 (first edition issued), CQ Publishing Co., Ltd. (issued), p. 122-126

本発明は、上述したサイクル数低減による有用な効果を得るべくなされたものであり、従来技術よりも、主プロセッサとコプロセッサとの間でのデータ転送に要するサイクル数を低減し得る演算処理装置を提供することを目的とし、また、この演算処理装置に入力すべき命令列を生成する命令列生成装置を提供することを目的とする。   The present invention has been made to obtain a useful effect by reducing the number of cycles described above, and is an arithmetic processing unit capable of reducing the number of cycles required for data transfer between a main processor and a coprocessor as compared with the prior art. It is another object of the present invention to provide an instruction sequence generation device that generates an instruction sequence to be input to the arithmetic processing unit.

上記目的を達成するために、本発明に係る演算処理装置は、主プロセッサとコプロセッサとを備える演算処理装置であって、前記主プロセッサは、命令を逐次解釈して命令に基づく制御を行う命令解釈制御部を有し、前記命令解釈制御部は、前記コプロセッサに実行させるべき演算処理の種別と、当該演算処理の対象が格納されている第1記憶領域と、前記コプロセッサが演算処理をした結果が格納されるべき第2記憶領域とを指定する処理依頼命令を解釈することにより、前記コプロセッサに、第1記憶領域の内容を演算処理対象として当該種別の演算処理を実行させ、更に、前記コプロセッサによりなされた、ある演算処理の結果を、第2記憶領域に書き込む制御を行うことを特徴とする。   In order to achieve the above object, an arithmetic processing unit according to the present invention is an arithmetic processing unit comprising a main processor and a coprocessor, wherein the main processor sequentially interprets instructions and performs control based on the instructions. An instruction control unit, wherein the instruction interpretation control unit includes a type of arithmetic processing to be executed by the coprocessor, a first storage area in which a target of the arithmetic processing is stored, and the coprocessor performs arithmetic processing. By interpreting a processing request instruction for designating a second storage area in which the result is to be stored, causing the coprocessor to execute the type of arithmetic processing with the contents of the first storage area as an arithmetic processing target; The control of writing a result of a certain arithmetic process performed by the coprocessor in the second storage area is performed.

上記構成の演算処理装置は、コプロセッサに演算処理を依頼するための処理依頼命令が、コプロセッサにより実行されるべき演算処理の種別の指定と、コプロセッサへのソースデータの転送元となる第1記憶領域の指定と、コプロセッサからのデスティネーションデータの転送先となる第2記憶領域の指定とを併せ持っている場合に、この処理依頼命令に対応して動作可能であるため、目的の処理を完了するために必要なサイクル数を比較的低く抑え得る。基本的に演算処理装置は、1命令の実行に1サイクル以上を必要とするため、同じ目的を達成するための命令数が少なければ命令数が多い場合よりも目的達成に必要なサイクル数を抑え得るからである。また、このような演算処理装置に、処理依頼命令を行わせるためのプログラムのコードサイズを、従来のものより小さくすることができるという効果も得られる。このことは、命令メモリの容量低減化に繋がり得る。   In the arithmetic processing unit configured as described above, the processing request instruction for requesting the coprocessor to perform arithmetic processing specifies the type of arithmetic processing to be executed by the coprocessor and becomes the source of transfer of source data to the coprocessor. In the case where both the designation of one storage area and the designation of the second storage area to which the destination data is transferred from the coprocessor are combined, it is possible to operate in response to this processing request instruction. The number of cycles required to complete can be kept relatively low. Basically, an arithmetic processing unit requires one or more cycles to execute one instruction. Therefore, if the number of instructions for achieving the same purpose is small, the number of cycles required for achieving the purpose is suppressed as compared with the case where the number of instructions is large. Because you get. In addition, there is an effect that the code size of a program for causing such an arithmetic processing device to execute a processing request instruction can be made smaller than that of the conventional one. This can lead to a reduction in the capacity of the instruction memory.

ここで、前記主プロセッサは、演算命令に基づき演算を行う際に、演算の対象又は結果を格納するための複数のレジスタを有しており、処理依頼命令は、第1記憶領域を指定するものとして前記複数のレジスタのうちいずれかを識別する第1データと、第2記憶領域を指定するものとして前記複数のレジスタのうちいずれかを識別する第2データとを含み、前記命令解釈制御部は、前記コプロセッサに、処理依頼命令に含まれる第1データで識別されるレジスタの内容を演算処理対象として、当該処理依頼命令で指定される種別の演算処理を実行させ、更に、前記コプロセッサによりなされた、ある演算処理の結果を、当該処理依頼命令に含まれる第2データで識別されるレジスタに書き込む制御を行うこととしてもよい。   Here, the main processor has a plurality of registers for storing an operation target or a result when performing an operation based on the operation instruction, and the processing request instruction specifies the first storage area Including: first data for identifying any one of the plurality of registers; and second data for identifying any one of the plurality of registers as designating a second storage area, , Causing the coprocessor to execute the arithmetic processing of the type specified by the processing request instruction with the contents of the register identified by the first data included in the processing request instruction as an arithmetic processing target. It is also possible to perform control to write a result of a certain arithmetic processing performed to a register identified by the second data included in the processing request instruction.

これにより、主プロセッサのレジスタ群の中のいずれかのレジスタを、ソースデータの転送元及びデスティネーションデータの転送先として指定してコプロセッサに演算を行わせるための1つの処理依頼命令に対応して演算処理装置が動作するため、主プロセッサの演算結果をコプロセッサに引き渡して特定の演算を行わせて、かつ、あるコプロセッサによる演算結果を主プロセッサで演算対象にするような処理を1つの命令で記述できることから、そのような処理手順が積み重ねられて構成される一連の処理に対応するプログラムを、少ない命令数の命令列で記述することができ、この結果としてその一連の処理についての実行性能は従来よりも向上する。   As a result, one of the registers in the main processor register group is designated as a source data transfer source and a destination data transfer destination, and corresponds to one processing request instruction for causing the coprocessor to perform an operation. Therefore, the processing result of the main processor is handed over to the coprocessor to perform a specific operation, and the processing result of a certain coprocessor is processed by the main processor as one operation target. Since it can be described by an instruction, a program corresponding to a series of processes configured by stacking such processing procedures can be described by an instruction string with a small number of instructions, and as a result, execution of the series of processes is executed. The performance is improved than before.

また、処理依頼命令は、コードフォーマットとして、前記主プロセッサが実行可能な命令群中で当該処理依頼命令を他の命令と識別するための命令識別コードを格納するフィールドの他に、コプロセッサに実行させるべき演算処理の種別を示すコプロセッサ用命令コードを格納するフィールドと、第1データを格納するフィールドと、第2データを格納するフィールドとの各々を含み、前記命令解釈制御部は、処理依頼命令に含まれるコプロセッサ用命令コードを前記コプロセッサへと送出するよう制御し、当該処理依頼命令に含まれる第1データにより識別されるレジスタの内容であるソースデータを前記コプロセッサへと送出するよう制御し、更に、前記コプロセッサから送出された、ある演算処理の結果である結果データを取得して、当該処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御し、前記コプロセッサは、前記主プロセッサから送出されたコプロセッサ用命令コードを解釈し、前記主プロセッサから送出されたソースデータを取得して演算処理対象にして、当該コプロセッサ用命令コードにより示されている種別の演算処理を実行し、当該演算処理の結果である結果データを前記主プロセッサへと送出することとしてもよい。   The processing request instruction is executed as a code format in the coprocessor in addition to a field for storing an instruction identification code for identifying the processing request instruction from other instructions in the instruction group executable by the main processor. The instruction interpretation control unit includes a field for storing a coprocessor instruction code indicating a type of arithmetic processing to be performed, a field for storing first data, and a field for storing second data. The instruction code for the coprocessor included in the instruction is controlled to be transmitted to the coprocessor, and the source data which is the content of the register identified by the first data included in the processing request instruction is transmitted to the coprocessor. In addition, the result data which is the result of a certain arithmetic processing sent from the coprocessor is acquired, Control is performed to write to the register identified by the second data included in the processing request instruction, and the coprocessor interprets the instruction code for the coprocessor sent from the main processor, and the source sent from the main processor It is also possible to acquire data and make it an arithmetic processing target, execute the type of arithmetic processing indicated by the instruction code for the coprocessor, and send result data as a result of the arithmetic processing to the main processor. Good.

これにより、主プロセッサの演算結果をコプロセッサに引き渡して特定の演算を行わせて、かつ、その特定の演算の演算結果を更に主プロセッサで演算対象にするような処理におけるコプロセッサへのデータの転送元となる主プロセッサのレジスタの指定と、コプロセッサに行わせるべき演算処理の種別の指定と、コプロセッサからのデータの転送先となる主プロセッサのレジスタの指定とを、1つの命令で記述できるようになる。   As a result, the operation result of the main processor is handed over to the coprocessor to perform a specific operation, and the operation result of the specific operation is further processed by the main processor. Specify the register of the main processor that is the transfer source, the type of arithmetic processing to be performed by the coprocessor, and the register of the main processor that is the transfer destination of data from the coprocessor in one instruction. become able to.

また、前記命令解釈制御部は、処理依頼命令に含まれるコプロセッサ用命令コードを前記コプロセッサへ送出する際に、当該処理依頼命令に含まれる第2データを当該コプロセッサ用命令コードと共に前記コプロセッサに送出し、前記コプロセッサは、前記主プロセッサから送出されたコプロセッサ用命令コードにより示されている種別の演算処理を実行した結果である結果データを前記主プロセッサへと送出する際に、当該コプロセッサ用命令コードと共に前記主プロセッサから送出された第2データを、当該結果データと共に前記主プロセッサへと送出し、前記命令解釈制御部は、前記コプロセッサから共に送出された結果データと第2データとを取得して、当該結果データを当該第2データにより識別されるレジスタに書き込むよう制御することとしてもよい。   Further, when the instruction interpretation control unit sends the coprocessor instruction code included in the processing request instruction to the coprocessor, the instruction interpretation control unit transmits the second data included in the processing request instruction together with the coprocessor instruction code. When sending the result data to the main processor, the coprocessor sends out the result data, which is the result of executing the type of arithmetic processing indicated by the coprocessor instruction code sent from the main processor. The second data sent from the main processor together with the instruction code for the coprocessor is sent to the main processor together with the result data, and the instruction interpretation control unit and the result data sent together from the coprocessor 2 data and the result data is written to the register identified by the second data. It is also possible to be.

これにより、主プロセッサ側で、処理依頼命令に対応してコプロセッサに演算開始のトリガとなる信号つまりコプロセッサ用命令コード等を送出した後に、何サイクルか経過してからその処理依頼命令に対応してコプロセッサによる演算結果が返却されるまでの間、ずっとそのコプロセッサによる演算結果を格納すべきレジスタがいずれであるかを記憶保持しておく必要がなくなり、コプロセッサに一旦預けておいて後に戻された情報に基づいて特定されるレジスタに、コプロセッサによる演算結果を格納しさえすればよくなる。   This allows the main processor to respond to the processing request instruction after several cycles have elapsed after sending a signal that triggers the start of computation to the coprocessor, that is, the instruction code for the coprocessor, in response to the processing request instruction. Until the calculation result by the coprocessor is returned, it is no longer necessary to store and hold which register should store the calculation result by the coprocessor. It is only necessary to store the operation result by the coprocessor in a register specified based on the information returned later.

また、前記命令解釈制御部が処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御する結果データは、前記コプロセッサから送出された、当該処理依頼命令で指定された演算処理の結果であり、前記命令解釈制御部は、前記演算処理の各種別に対応付けて演算処理時間を示す時間情報を予め記憶しており、処理依頼命令に含まれていた前記コプロセッサ用命令コードと、前記ソースデータとを前記コプロセッサへと送出した後、当該コプロセッサ用命令コードで示される演算処理の種別に対応して記憶している時間情報が示す演算処理時間が経過した時に、前記コプロセッサから送出された結果データを、当該処理依頼命令に含まれていた第2データにより識別されたレジスタに書き込むよう制御することとしてもよい。   In addition, the result data that the instruction interpretation control unit controls to write to the register identified by the second data included in the processing request instruction is transmitted from the coprocessor, and the result data of the arithmetic processing specified by the processing request instruction is transmitted. The instruction interpretation control unit stores in advance time information indicating an operation processing time in association with each of the operation processes, and the coprocessor instruction code included in the process request instruction; After the source data is sent to the coprocessor, when the arithmetic processing time indicated by the stored time information corresponding to the type of arithmetic processing indicated by the coprocessor instruction code has elapsed, the coprocessor As a result, the result data sent from the control request is written to the register identified by the second data included in the processing request instruction. Good.

これにより、主プロセッサは、処理依頼命令に対応してコプロセッサに演算開始を行わせた後に、コプロセッサによる演算結果が返却されるべきレジスタを記憶しておかなければならないが、コプロセッサからその処理依頼命令に対応した演算が終了した旨の通知を受けなくても、コプロセッサがデータ伝送路上に出力している演算結果を取得すべきタイミングを自ら特定することができ、その演算結果を取得して、先に記憶していたレジスタに格納することができるようになる。   As a result, the main processor must store the register to which the operation result by the coprocessor is to be returned after the coprocessor has started the operation in response to the processing request instruction. Even without receiving notification that the operation corresponding to the processing request command has been completed, the coprocessor can identify the timing at which the operation result output on the data transmission path should be acquired, and acquire the operation result. Thus, it can be stored in the previously stored register.

また、前記命令解釈制御部は、前記コプロセッサから送出された結果データが前記処理依頼命令に含まれる第2データにより識別されるレジスタに書き込まれる際に、所定信号を前記コプロセッサへと送出するよう制御し、前記コプロセッサは、前記所定信号が前記主プロセッサにより送出されたことを検知するまで、前記結果データの送出を継続し、当該検知後に当該結果データの送出を停止することとしてもよい。   The instruction interpretation control unit sends a predetermined signal to the coprocessor when the result data sent from the coprocessor is written to a register identified by the second data included in the processing request instruction. The coprocessor may continue sending the result data until detecting that the predetermined signal is sent by the main processor, and stop sending the result data after the detection. .

これにより、主プロセッサが、処理依頼命令を含むプログラムの実行中でその処理依頼命令に対応してコプロセッサに演算を開始させた後に、例えば外部からの割込信号に対応して割込対応処理を行っているような場合等、コプロセッサの演算終了時点で速やかに主プロセッサがコプロセッサの演算結果としてデータ伝送路上に出力されたデータをレジスタに書き込むことができないような場合であっても、その書き込むことができるようになってから書き込まれる際に、つまり書き込まれる直前か書き込まれる時か書き込まれた直後かに、その旨をコプロセッサに送出することとして、その送出があるまでコプロセッサは演算結果の出力を継続するので、コプロセッサによる演算結果を主プロセッサが確実に取得することができる。   As a result, after the main processor is executing a program including a processing request instruction, the coprocessor starts the operation in response to the processing request instruction, and then, for example, an interrupt handling process corresponding to an external interrupt signal Even when the main processor cannot immediately write the data output on the data transmission path as the result of the coprocessor operation at the end of the coprocessor operation, When it is written after it becomes ready to be written, that is, immediately before writing, when it is written, or immediately after writing, it is sent to the coprocessor. Since the output of the calculation result is continued, the main processor can reliably acquire the calculation result by the coprocessor.

また、前記コプロセッサは、コプロセッサ用命令コードにより指定される各種別の演算処理について、演算処理開始からいずれも同一時間の経過後に結果データを出力するものであり、前記命令解釈制御部が処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御する結果データは、前記コプロセッサから送出された、当該処理依頼命令に先行して解釈した別の処理依頼命令により指定される演算処理の結果データであり、前記命令解釈制御部は、処理依頼命令に第2データと共に含まれていた前記コプロセッサ用命令コードを前記コプロセッサへと送出した後、当該処理依頼命令に後続して別の命令を解釈する前に、前記コプロセッサが当該処理依頼命令に先行する処理依頼命令で指定した演算処理を行った結果として送出した結果データを、当該第2データにより識別されたレジスタに書き込むよう制御することとしてもよい。   The coprocessor outputs the result data after the same time has elapsed from the start of the arithmetic processing for each type of arithmetic processing specified by the coprocessor instruction code. The result data that is controlled to be written to the register identified by the second data included in the request command is an operation specified by another processing request command that is sent from the coprocessor and interpreted prior to the processing request command. The processing result data, and the instruction interpretation control unit sends the coprocessor instruction code included in the processing request instruction together with the second data to the coprocessor, and then follows the processing request instruction. The result of the arithmetic processing specified by the processing request instruction preceding the processing request instruction by the coprocessor before interpreting another instruction The result data sent by, may be controlled to write into the register identified by the second data.

これにより、例えば、コプロセッサが依頼された演算をパイプライン方式で処理することを前提として演算処理装置に複数の連続する処理依頼命令を供給して解釈実行させるような場合において、連続する処理依頼命令の1つの処理依頼命令において、コプロセッサに与えるデータを格納するレジスタの指定のみならず、それより先行する処理依頼命令に対応するコプロセッサの演算結果を受け取るレジスタを指定することができるため、つまり1命令で主プロセッサからコプロセッサへのデータ転送とコプロセッサから主プロセッサへのデータ転送に係る主プロセッサ内のデータ格納位置を指定できるため、何らかの目的を達成するために必要な命令数を従来よりも低減させることができ、目的達成のために必要なサイクル数を抑え得る。   As a result, for example, in the case where the arithmetic processing unit is supplied with a plurality of continuous processing request instructions and is interpreted and executed on the assumption that the operation requested by the coprocessor is processed in a pipeline manner, the continuous processing request In one processing request instruction of an instruction, not only a register for storing data to be given to a coprocessor but also a register for receiving a coprocessor operation result corresponding to a preceding processing request instruction can be specified. In other words, since the data storage position in the main processor related to data transfer from the main processor to the coprocessor and data transfer from the coprocessor to the main processor can be specified with one instruction, the number of instructions necessary to achieve some purpose is conventionally set. The number of cycles required to achieve the purpose can be suppressed.

また、前記命令解釈制御部が行うところの、処理依頼命令に含まれる第2データで識別されるレジスタに書き込む前記制御は、当該処理依頼命令で指定される種別の演算処理を前記コプロセッサに実行させた結果を当該レジスタに書き込む制御であることとしてもよい。
これにより、処理依頼命令により指定した演算をコプロセッサに実行させた結果を主プロセッサが受け取るためのレジスタの指定をその処理依頼命令に含めることができるので、一般の演算命令と同様に、その演算命令に応じた演算結果を格納するレジスタの指定をオペランドとして含む命令形式で、コプロセッサに演算を行わせる処理依頼命令の命令形式を定めることができるようになり、例えばプログラム作成者における命令の理解の容易化等に役立つ。
Further, the control performed by the instruction interpretation control unit to write to the register identified by the second data included in the processing request instruction executes the type of arithmetic processing specified by the processing request instruction to the coprocessor. It is good also as control which writes the result made to the said register | resistor.
As a result, the processing request instruction can include the specification of a register for the main processor to receive the result of causing the coprocessor to execute the operation specified by the processing request instruction. It is now possible to define the instruction format of a processing request instruction that causes a coprocessor to perform an operation in an instruction format that includes the specification of a register that stores an operation result according to the instruction as an operand. For example, the program creator can understand the instruction It is useful for making it easier.

また、前記演算処理装置は第1及び第2のコプロセッサを備え、第2のコプロセッサは、複数のレジスタを有しており、前記処理依頼命令は、第1のコプロセッサに実行させるべき演算処理の種別の指定と、第1記憶領域を指定するものとして第2のコプロセッサの複数のレジスタのうちいずれかを識別する第1データと、第2記憶領域を指定するものとして第2のコプロセッサの複数のレジスタのうちいずれかを識別する第2データとを含み、前記命令解釈制御部は、第1のコプロセッサに、処理依頼命令に含まれる第1データで識別される、第2のコプロセッサ内のレジスタの内容を演算処理対象として、当該処理依頼命令で指定される種別の演算処理を実行させ、更に、第1のコプロセッサによりなされた、ある演算処理の結果を、当該処理依頼命令に含まれる第2データで識別される、第2のコプロセッサ内のレジスタに書き込む制御を行うこととしてもよい。   The arithmetic processing unit includes first and second coprocessors, the second coprocessor has a plurality of registers, and the processing request instruction is an operation to be executed by the first coprocessor. The specification of the type of processing, the first data for identifying one of the plurality of registers of the second coprocessor as specifying the first storage area, and the second data as specifying the second storage area Second instruction for identifying any one of the plurality of registers of the processor, and the instruction interpretation control unit identifies the first coprocessor to the second data identified by the first data included in the processing request instruction. The contents of the register in the coprocessor are subject to arithmetic processing, the type of arithmetic processing specified by the processing request instruction is executed, and the result of certain arithmetic processing performed by the first coprocessor is Identified by second data contained in the processing request command may perform a control to write to registers in the second co-processor.

これにより、あるコプロセッサ内のデータに基づいて他のコプロセッサに演算を行わせてその演算結果を元のコプロセッサ内部に返却することを1命令で指示することができるようになる。
また、本発明に係る命令列生成装置は、入力されるデータに基づいて、クレーム1の演算処理装置にコプロセッサと共に備えられている主プロセッサに実行させるための機械語の命令列を生成する命令列生成装置であって、記憶手段と、入力されたデータを取得する入力データ取得手段と、前記入力されたデータに基づいて、コプロセッサに実行させるべき演算処理の種別と、当該演算処理の対象が格納されている、当該コプロセッサの外部の第1記憶領域と、前記コプロセッサが演算処理をした結果が格納されるべき、当該コプロセッサの外部の第2記憶領域とを指定する処理依頼命令を含む機械語の命令列を生成し、前記記憶手段に当該命令列を記録する命令列生成手段とを備えることを特徴とする。
As a result, it is possible to instruct the other coprocessor to perform an operation based on data in a certain coprocessor and return the operation result to the original coprocessor with one instruction.
An instruction sequence generation device according to the present invention generates an instruction sequence in a machine language for causing a main processor included in the arithmetic processing unit of claim 1 to be executed together with a coprocessor based on input data. A column generation device, a storage unit, an input data acquisition unit for acquiring input data, a type of arithmetic processing to be executed by a coprocessor based on the input data, and a target of the arithmetic processing A processing request instruction for designating a first storage area outside the coprocessor and a second storage area outside the coprocessor in which the result of arithmetic processing performed by the coprocessor is to be stored And a command sequence generation unit for generating the command sequence in machine language including the command sequence and recording the command sequence in the storage unit.

上述の演算処理装置に供給して解釈させ実行させることができる命令列を必要とする場合に、この命令列生成装置により、コプロセッサ外部の記憶領域の内容に基づいてコプロセッサに演算を行わせてその演算結果をコプロセッサ外部の記憶領域に格納することを指定する1つの処理依頼命令を含む命令列を生成させることができる。
ここで、前記命令列生成手段により生成される処理依頼命令は、コードフォーマットとして、前記主プロセッサが実行可能な命令群中で当該処理依頼命令を他の命令と識別するための命令識別コードを格納するフィールドの他に、コプロセッサに実行させるべき演算処理の種別を示すコプロセッサ用命令コードを格納するフィールドと、第1記憶領域を指定するものとして、前記主プロセッサが有する複数のレジスタのうちのいずれかを識別する第1データを格納するフィールドと、第2記憶領域を指定するものとして、前記主プロセッサが有する複数のレジスタのうちのいずれかを識別する第2データを格納するフィールドとの各々を含むこととしてもよい。
When an instruction sequence that can be supplied to the above arithmetic processing unit and interpreted and executed is required, the instruction sequence generation device causes the coprocessor to perform an operation based on the contents of the storage area outside the coprocessor. Thus, it is possible to generate an instruction sequence including one processing request instruction specifying that the operation result is stored in a storage area outside the coprocessor.
Here, the process request instruction generated by the instruction sequence generation means stores, as a code format, an instruction identification code for identifying the process request instruction from other instructions in the instruction group executable by the main processor. A field for storing a coprocessor instruction code indicating the type of arithmetic processing to be executed by the coprocessor, and a first storage area. Each of a field for storing first data for identifying one of them, and a field for storing second data for identifying any one of a plurality of registers of the main processor as specifying a second storage area It is good also as including.

この命令列生成装置により、主プロセッサのレジスタの内容を用いてコプロセッサに演算を行わせてその演算結果を主プロセッサのレジスタに格納することを指定する1つの処理依頼命令を含む命令列を生成させることができる。
また、前記命令列生成装置は、更に、コプロセッサが実行可能な演算処理の各種別に対応付けて、演算処理時間を示す時間情報を予め記憶している演算時間管理手段を含み、前記命令列生成手段は、生成した処理依頼命令に含まれる第2データで識別される前記主プロセッサのレジスタの内容を演算対象とする演算命令を、命令列において当該処理依頼命令に後続する位置に生成する際には、当該処理依頼命令に含まれるコプロセッサ用命令コードで示される種別の演算処理に関する演算処理時間を、前記演算時間管理手段により記憶されている時間情報に基づいて特定し、当該処理依頼命令から、特定した演算処理時間に相当する命令数分以上の間隔を空けた位置に当該演算命令を置くようにして前記命令列の生成を行うこととしてもよい。
This instruction sequence generation device generates an instruction sequence including one processing request instruction that specifies that the coprocessor performs an operation using the contents of the main processor register and stores the operation result in the main processor register. Can be made.
The instruction sequence generation device further includes an operation time management unit that stores in advance time information indicating an operation processing time in association with various types of operation processing that can be executed by the coprocessor. The means generates a calculation instruction for calculating the contents of the register of the main processor identified by the second data included in the generated processing request instruction at a position subsequent to the processing request instruction in the instruction sequence. Specifies an operation processing time related to the operation processing of the type indicated by the instruction code for the coprocessor included in the process request instruction based on the time information stored by the operation time management means, and from the process request instruction The instruction sequence may be generated by placing the operation instruction at a position having an interval equal to or more than the number of instructions corresponding to the specified operation processing time.

これにより、処理依頼命令で指定したデスティネーションデータを演算対象とする演算命令がその処理依頼命令に後続する場合に、その演算命令の実行時点で、処理依頼命令に応じてコプロセッサが演算中であってまだデスティネーションデータが生成されていないような事態が発生することを防止した命令列が生成されるようになる。   As a result, when an operation instruction for which the destination data specified by the process request instruction is an operation target follows the process request instruction, the coprocessor is operating according to the process request instruction at the time of execution of the operation instruction. Thus, an instruction sequence that prevents the occurrence of a situation in which the destination data has not been generated yet is generated.

<実施の形態1>
以下、本発明の実施の形態1に係る演算処理装置について説明する。
<概要>
本発明の実施の形態1に係る演算処理装置は、主プロセッサとコプロセッサとを備え、主プロセッサにおける取得、解釈及び実行の対象となる命令セットに、コプロセッサに演算を行わせるためのコプロセッサ演算命令が含まれている。このコプロセッサ演算命令に該当するxexec命令について、ニーモニック表記で表すと次のようになる。
<Embodiment 1>
Hereinafter, the arithmetic processing apparatus according to the first embodiment of the present invention will be described.
<Overview>
An arithmetic processing apparatus according to Embodiment 1 of the present invention includes a main processor and a coprocessor, and causes the coprocessor to perform an operation on an instruction set to be acquired, interpreted, and executed by the main processor. Arithmetic instructions are included. The xexec instruction corresponding to this coprocessor operation instruction is expressed in mnemonic notation as follows.

xexec OPn,dstRn,srcRn
ここで、コプロセッサ演算命令つまりxexec命令は、OPn、dstRn及びsrcRnという3つのオペランドの指定を必要とする命令である。このOPnはコプロセッサにおける演算処理の種別の指定であり、srcRnはコプロセッサの演算に用いられるソースデータを格納している主プロセッサ側のレジスタの番号の指定であり、dstRnはコプロセッサによるその演算結果を格納するための主プロセッサ側のレジスタ番号の指定である。
xexec OPn, dstRn, srcRn
Here, the coprocessor operation instruction, that is, the xexec instruction, is an instruction that requires specification of three operands OPn, dstRn, and srcRn. This OPn is the designation of the type of arithmetic processing in the coprocessor, srcRn is the designation of the register number on the main processor side that stores the source data used for the coprocessor computation, and dstRn is the computation by the coprocessor This is the designation of the register number on the main processor side for storing the result.

このコプロセッサ演算命令を取得し解釈すると、主プロセッサは、srcRnで指定されたレジスタの内容であるソースデータと、演算処理の種別とをコプロセッサに伝達することにより、コプロセッサに演算を依頼する。これを受けてコプロセッサは、ソースデータを用いて演算処理を行い演算結果であるデスティネーションデータを主プロセッサに伝達し、主プロセッサは、そのデスティネーションデータを受け取ってdstRnで指定されたレジスタに格納する。   When this coprocessor operation instruction is acquired and interpreted, the main processor requests the coprocessor to perform operation by transmitting the source data, which is the contents of the register designated by srcRn, and the type of operation processing to the coprocessor. . In response to this, the coprocessor performs arithmetic processing using the source data and transmits the destination data as the arithmetic result to the main processor. The main processor receives the destination data and stores it in the register specified by dstRn. To do.

このように、1つのコプロセッサ演算命令が、コプロセッサにより実行されるべき演算処理の種別の指定と、主プロセッサからコプロセッサへのソースデータ転送の指定と、コプロセッサから主プロセッサへのデスティネーションデータ転送の指定とを併せ持つことにより、このコプロセッサ演算命令を用いることのできる演算処理装置は、目的の処理を完了するために必要なサイクル数を比較的低く抑え得る。基本的に演算処理装置は、1命令の実行に1サイクル以上を必要とするため、同じ目的を達成するための命令数が少なければ命令数が多い場合よりも目的達成に必要なサイクル数を抑え得る。   Thus, one coprocessor operation instruction specifies the type of operation processing to be executed by the coprocessor, specifies the source data transfer from the main processor to the coprocessor, and the destination from the coprocessor to the main processor. By combining the designation of data transfer, the arithmetic processing device that can use this coprocessor arithmetic instruction can keep the number of cycles required to complete the target processing relatively low. Basically, an arithmetic processing unit requires one or more cycles to execute one instruction. Therefore, if the number of instructions for achieving the same purpose is small, the number of cycles required for achieving the purpose is suppressed as compared with the case where the number of instructions is large. obtain.

図1は、xexec命令を含むアセンブラプログラムの一部を例示する図である。
主プロセッサは、このプログラム、実際は機械語に変換された後のプログラムコード、を解釈して実行することができる。
行L11は、レジスタr1の内容を用いてコプロセッサにOP0により識別される演算処理を実行させて、その演算結果をレジスタr0に格納することを指示するxexec命令である。また、行L12及び行L13は各々1サイクルの期間を費やす命令である。
FIG. 1 is a diagram illustrating a part of an assembler program including a xexec instruction.
The main processor can interpret and execute this program, actually the program code after being converted into machine language.
Line L11 is an xexec instruction that instructs the coprocessor to execute the arithmetic processing identified by OP0 using the contents of the register r1 and stores the arithmetic result in the register r0. Rows L12 and L13 are instructions that each spend a period of one cycle.

コプロセッサによるOP0で識別される演算処理の実行に3サイクル必要であることを想定すると、このプログラム例における行L13に後続する命令においては、レジスタr0には先行するxexec命令の実行結果が格納されているものとして、レジスタr0の内容を用いることができる。
以下、実施の形態1に係る演算処理装置について詳しく説明する。
Assuming that 3 cycles are required for the execution of the arithmetic processing identified by OP0 by the coprocessor, in the instruction following line L13 in this program example, the execution result of the preceding xexec instruction is stored in register r0. The contents of the register r0 can be used.
Hereinafter, the arithmetic processing apparatus according to the first embodiment will be described in detail.

<コプロセッサ演算命令フォーマット>
まず、上述した主プロセッサの命令セットに属する1命令であるコプロセッサ演算命令(xexec命令)のフォーマットについて説明する。
図2は、コプロセッサ演算命令(xexec命令)のフォーマットを示す図である。
同図に示すように、xexec命令は、命令長が16ビットであり、命令識別コードフィールド21と、オペランドを指定するための、コプロセッサ用命令コードフィールド22、デスティネーションレジスタ指定フィールド23及びソースレジスタ指定フィールド24とから構成される。
<Coprocessor operation instruction format>
First, the format of a coprocessor operation instruction (xexec instruction) that is one instruction belonging to the above-described instruction set of the main processor will be described.
FIG. 2 is a diagram illustrating a format of a coprocessor operation instruction (xexec instruction).
As shown in the figure, the xexec instruction has an instruction length of 16 bits, an instruction identification code field 21, a coprocessor instruction code field 22 for specifying an operand, a destination register specification field 23, and a source register. And a designation field 24.

ここで、命令識別コードフィールド21は、主プロセッサが解読、実行可能な命令群においてxexec命令であることを識別するための6ビットの命令識別コードを設定するフィールドであり、そのコード値は、例えば100010b等と、予め定められている。
コプロセッサ用命令コードフィールド22は、オペランドOPnに対応し、コプロセッサに実行させるべき演算処理の種別を識別するための2ビットのコードを設定するフィールドである。このビット長は、ここでは、コプロセッサが4種類以下の演算処理が可能であることを想定して定めている。
Here, the instruction identification code field 21 is a field for setting a 6-bit instruction identification code for identifying an xexec instruction in an instruction group that can be decoded and executed by the main processor. 100010b and the like are predetermined.
The coprocessor instruction code field 22 corresponds to the operand OPn and is a field for setting a 2-bit code for identifying the type of arithmetic processing to be executed by the coprocessor. Here, this bit length is determined on the assumption that the coprocessor can perform four or less types of arithmetic processing.

デスティネーションレジスタ指定フィールド23は、オペランドdstRnに対応し、主プロセッサにおけるレジスタ群の1つを特定するための4ビットのデータを設定するフィールドであり、コプロセッサから伝達される演算結果であるデスティネーションデータを格納すべきレジスタを指定するために用いられる。
また、ソースレジスタ指定フィールド24は、オペランドsrcRnに対応し、主プロセッサにおけるレジスタ群の1つを特定するための4ビットのデータを設定するフィールドであり、コプロセッサでの演算処理に用いられるべきソースデータが格納されているレジスタを指定するために用いられる。
The destination register designation field 23 is a field for setting 4-bit data for specifying one of the register groups in the main processor corresponding to the operand dstRn, and is a destination that is an operation result transmitted from the coprocessor. Used to specify a register to store data.
The source register specification field 24 is a field for setting 4-bit data for specifying one of the register groups in the main processor, corresponding to the operand srcRn, and is a source to be used for arithmetic processing in the coprocessor. Used to specify the register in which data is stored.

<演算処理装置の構成>
図3は、実施の形態1に係る演算処理装置の構成を示すブロック図である。
同図に示すように、演算処理装置100は、主プロセッサ3000と、コプロセッサ4000と、コプロセッサ演算命令を含む命令列を格納する命令メモリ5000と、主プロセッサによるデータアクセスの対象となるデータメモリ6000とを備える。
<Configuration of arithmetic processing unit>
FIG. 3 is a block diagram showing a configuration of the arithmetic processing apparatus according to the first embodiment.
As shown in the figure, the arithmetic processing unit 100 includes a main processor 3000, a coprocessor 4000, an instruction memory 5000 that stores an instruction sequence including coprocessor arithmetic instructions, and a data memory that is a target of data access by the main processor. 6000.

ここで、主プロセッサ3000は、従来のプロセッサを部分的に変形したものであり、命令解釈制御回路3100と、算術演算や論理演算を行うための回路群である演算器3200と、演算器3200との間でデータ転送を行えるように構成されたレジスタ群であるレジスタバンク3500とを有する。この主プロセッサ3000は、コプロセッサ4000に演算を実行させている間に別の演算を行うことができる。   Here, the main processor 3000 is a partial modification of the conventional processor, and includes an instruction interpretation control circuit 3100, an arithmetic unit 3200 that is a circuit group for performing arithmetic operations and logical operations, and an arithmetic unit 3200. And a register bank 3500 which is a register group configured so as to be able to transfer data between them. The main processor 3000 can perform another operation while causing the coprocessor 4000 to execute the operation.

命令解釈制御回路3100は、命令メモリ5000に格納されている命令列から逐次命令を読み出して解釈し、その解釈対象の命令に応じて、レジスタバンク3500及びデータメモリ6000へのアクセスに係る制御つまりデータ転送制御や、演算器3200に、命令で指定された演算を実行させる制御や、コプロセッサ4000の制御や、命令メモリ5000における命令の読出しに係る制御等を行う機能を有する。なお、コプロセッサ4000の制御は、命令解釈制御回路3100が上述のコプロセッサ演算命令を解釈した場合に、そのコプロセッサ演算命令に含まれる演算処理の種別の指定をコプロセッサ4000に伝達すること等により行われる。また、レジスタバンク3500の構成及びそのデータ転送に係る動作ついては後に詳しく説明する。   The instruction interpretation control circuit 3100 sequentially reads and interprets instructions from the instruction sequence stored in the instruction memory 5000, and controls or data related to access to the register bank 3500 and the data memory 6000 according to the interpretation target instruction. It has functions for performing transfer control, control for causing the arithmetic unit 3200 to execute an operation specified by an instruction, control of the coprocessor 4000, control related to reading of an instruction in the instruction memory 5000, and the like. Note that the control of the coprocessor 4000 is such that, when the instruction interpretation control circuit 3100 interprets the above-described coprocessor arithmetic instruction, the designation of the type of arithmetic processing included in the coprocessor arithmetic instruction is transmitted to the coprocessor 4000. Is done. The configuration of the register bank 3500 and the operation related to the data transfer will be described in detail later.

また、コプロセッサ4000は、従来のコプロセッサを部分的に変形したものであり、論理制御回路4100と、特定の演算処理を行う回路である演算器4200と、演算器4200との間でデータ転送を行えるように構成されたレジスタ群であるレジスタバンク4500とを有する。なお、コプロセッサ4000は、主プロセッサ3000により指定された演算種別の演算処理を1つずつ逐次実行することができる。また、主プロセッサ3000とコプロセッサ4000の動作周波数は同じである。   The coprocessor 4000 is a partial modification of the conventional coprocessor, and transfers data between the logic control circuit 4100, the arithmetic unit 4200 that is a circuit that performs specific arithmetic processing, and the arithmetic unit 4200. And a register bank 4500 which is a register group configured to be able to perform the above. The coprocessor 4000 can sequentially execute the arithmetic processing of the arithmetic type designated by the main processor 3000 one by one. The operating frequency of the main processor 3000 and the coprocessor 4000 is the same.

論理制御回路4100は、主プロセッサ3000から伝達される演算処理の種別の指定を受けてこれを解釈しその結果に応じて、レジスタバンク4500へのデータ転送制御や、演算器4200に、特定の演算処理を実行させる制御や、主プロセッサへの演算処理完了の通知等を行う機能を有する。また、論理制御回路4100内には各演算種別の演算処理実行に要するサイクル数を示すデータが記憶されており、演算器による演算処理の実行中に経過するサイクルの数をカウントして、その記憶しているサイクル数を示すデータと照合することにより、演算の終了タイミングを検知する機構を有している。   The logic control circuit 4100 receives the designation of the type of arithmetic processing transmitted from the main processor 3000, interprets it, and controls the data transfer to the register bank 4500 or the arithmetic unit 4200 according to the result. It has a function of performing control of processing, and notifying the main processor of completion of arithmetic processing. The logic control circuit 4100 stores data indicating the number of cycles required to execute the arithmetic processing of each arithmetic type. The number of cycles that elapse during execution of arithmetic processing by the arithmetic unit is counted and stored. It has a mechanism for detecting the end timing of the calculation by collating with data indicating the number of cycles being performed.

演算器4200は、例えば、MPEG方式でのエンコード処理を構成するME処理に用いられる差分絶対値演算及びその和の並列計算を、比較的高速に行えるようなもの等、特定用途に特化した演算機能を有する。
なお、図3においては、制御信号の伝送路(以下、「制御信号線」という。)を細い矢印線で表しており、命令を含むデータの伝送用のバス(以下、「データ伝送路」という。)を太い矢印線で表している。
The arithmetic unit 4200 is an arithmetic unit specialized for a specific application, such as one that can perform parallel calculation of the differential absolute value calculation and the sum thereof used in the ME process constituting the encoding process in the MPEG system at a relatively high speed. It has a function.
In FIG. 3, a control signal transmission path (hereinafter referred to as “control signal line”) is represented by a thin arrow line, and a bus for transmitting data including instructions (hereinafter referred to as “data transmission path”). .) Is represented by a thick arrow line.

制御信号線3010は、命令メモリ5000を制御するために命令解釈制御回路3100から送出される信号を伝送し、この制御信号に対応して命令メモリ5000からは命令がデータ伝送路5010を介して命令解釈制御回路3100へと送出される。
制御信号線3020は演算器3200を制御するために、制御信号線3030はレジスタバンク3500を制御するために、制御信号線3050はデータメモリ6000を制御するために、そして制御信号線3040はコプロセッサに演算処理の種別等を伝達するために、それぞれ命令解釈制御回路3100から送出される信号を伝送する。
The control signal line 3010 transmits a signal sent from the command interpretation control circuit 3100 to control the command memory 5000. In response to this control signal, a command is sent from the command memory 5000 via the data transmission path 5010. It is sent to the interpretation control circuit 3100.
The control signal line 3020 controls the arithmetic unit 3200, the control signal line 3030 controls the register bank 3500, the control signal line 3050 controls the data memory 6000, and the control signal line 3040 is the coprocessor. In order to transmit the type of arithmetic processing, etc., signals transmitted from the instruction interpretation control circuit 3100 are transmitted.

また、演算器3200とレジスタバンク3500との間ではデータ伝送路3060及びデータ伝送路3065を介してデータが転送され、レジスタバンク3500とデータメモリ6000との間ではデータ伝送路3080及びデータ伝送路3085を介してデータが伝送され、演算器4200とレジスタバンク4500との間ではデータ伝送路4060及びデータ伝送路4065を介してデータが伝送され、主プロセッサ3000のレジスタバンク3500とコプロセッサ4000のレジスタバンク4500との間ではデータ伝送路3070及びデータ伝送路3075を介してデータが伝送される。   Data is transferred between the arithmetic unit 3200 and the register bank 3500 via the data transmission path 3060 and the data transmission path 3065, and between the register bank 3500 and the data memory 6000, the data transmission path 3080 and the data transmission path 3085. The data is transmitted between the arithmetic unit 4200 and the register bank 4500 via the data transmission path 4060 and the data transmission path 4065, and the register bank 3500 of the main processor 3000 and the register bank of the coprocessor 4000 are transmitted. Data is transmitted to and from 4500 via a data transmission path 3070 and a data transmission path 3075.

図4は、レジスタバンク3500の構成を詳細に示す構成図である。
レジスタバンク3500は、レジスタ3600(R0)、レジスタ3601(R1)〜レジスタ3615(R15)と、レジスタへデータを書き込むためにデータ伝送路及びレジスタの選択を行うセレクタ群つまりセレクタ3650、セレクタ3651〜セレクタ3665及びセレクタ3670と、どのレジスタから出力されたデータをデータ伝送路に供給するかの選択を行うセレクタ3680とを有する。
FIG. 4 is a configuration diagram showing the configuration of the register bank 3500 in detail.
The register bank 3500 includes a register 3600 (R0), a register 3601 (R1) to a register 3615 (R15), and a selector group that selects a data transmission path and a register in order to write data to the register, that is, a selector 3650 and a selector 3651-selector. 3665, a selector 3670, and a selector 3680 for selecting which register outputs data to be supplied to the data transmission path.

これらのレジスタ群及びセレクタ群は、命令解釈制御回路3100から制御信号線3030を介して与えられる制御信号に応じて動作するように構成されている。
従って、命令解釈制御回路3100は、命令の解釈結果に応じて、あるデータをあるレジスタに書き込むべき場合において、適切に制御信号を与えてセレクタ3670、セレクタ3650、セレクタ3651〜セレクタ3665を切り替えることにより、データメモリ6000からデータ伝送路3080上に出力されたデータと、演算器3200からデータ伝送路3060上に出力されたデータと、コプロセッサ4000からデータ伝送路3070上に出力されたデータとのいずれかを、書き込むべきレジスタに供給し、そのレジスタに制御信号を与えて、データをレジスタに記憶させる。また、命令解釈制御回路3100は、命令の解釈結果に応じて、あるレジスタからデータをデータ伝送路に供給させるべき場合には、そのレジスタに制御信号を与えてデータを出力させるとともに、適切に制御信号をセレクタ3680に与えることにより、演算器3200に繋がるデータ伝送路3065と、データメモリ6000に繋がるデータ伝送路3085と、コプロセッサ4000に繋がるデータ伝送路3075とにそのレジスタから出力されたデータが現れるように制御する。
These register group and selector group are configured to operate in accordance with a control signal supplied from the instruction interpretation control circuit 3100 via the control signal line 3030.
Accordingly, the instruction interpretation control circuit 3100 switches the selector 3670, the selector 3650, and the selector 3651 to the selector 3665 by appropriately giving a control signal when certain data is to be written to a certain register according to the interpretation result of the instruction. Any of the data output from the data memory 6000 to the data transmission path 3080, the data output from the computing unit 3200 to the data transmission path 3060, and the data output from the coprocessor 4000 to the data transmission path 3070 Is supplied to a register to be written, and a control signal is given to the register to store data in the register. In addition, when the instruction interpretation control circuit 3100 is to supply data from a certain register to the data transmission path according to the interpretation result of the instruction, the instruction interpretation control circuit 3100 outputs a data by outputting a control signal to the register and appropriately controls the data. By supplying the signal to the selector 3680, the data output from the register is transferred to the data transmission path 3065 connected to the arithmetic unit 3200, the data transmission path 3085 connected to the data memory 6000, and the data transmission path 3075 connected to the coprocessor 4000. Control it to appear.

<一般の演算命令に係る動作>
上述した構成を備える演算処理装置100においては、コプロセッサ演算命令以外の演算命令は、主プロセッサ3000により、主に演算器3200を用いて実行される。この場合における主プロセッサ3000の動作は一般的なプロセッサと同様である。
例えば、命令解釈制御回路3100が命令メモリ5000から、内部レジスタR0の内容に基づき、ある演算を実行して、その結果を内部レジスタR1に格納するような演算命令を、読み出して解釈した場合においては、セレクタ3680を制御してレジスタR0の内容であるデータをデータ伝送路3065等に出力させておき、演算器3200を制御してその出力されたデータに基づいてその演算を行わせて演算結果をデータ伝送路3060に出力させ、セレクタ3670及びセレクタ3651とレジスタR1とを制御して、データ伝送路3060上のデータをレジスタR1に書き込ませる。
<Operations related to general operation instructions>
In the arithmetic processing unit 100 having the above-described configuration, arithmetic instructions other than the coprocessor arithmetic instructions are executed by the main processor 3000 mainly using the arithmetic unit 3200. The operation of the main processor 3000 in this case is the same as that of a general processor.
For example, when the instruction interpretation control circuit 3100 reads and interprets an operation instruction that executes a certain operation from the instruction memory 5000 based on the contents of the internal register R0 and stores the result in the internal register R1. Then, the selector 3680 is controlled to output the data as the contents of the register R0 to the data transmission line 3065, etc., and the arithmetic unit 3200 is controlled to perform the operation based on the output data, and the operation result is obtained. The data is transmitted to the data transmission path 3060, and the selector 3670, the selector 3651 and the register R1 are controlled to write the data on the data transmission path 3060 to the register R1.

なお、演算に用いるデータがレジスタから読み出されて演算が行われてその結果がレジスタに書き込まれるまでの処理時間は、例えば数サイクルであり、演算処理内容によってサイクル数は異なる。
上述の演算例についての処理タイミングとしては、レジスタR0から演算器へのデータ転送が行われる期間T1と、それに続く、演算器での演算が行われる期間T2と、その後の演算結果がレジスタR1に書き込まれる期間T3とを含むことになる。例えば期間T1を含む1つのサイクルに後続する1又は複数のサイクルにまたがって期間T2が含まれ、その後の1つのサイクルに期間T3が含まれる。2つのレジスタを入力とする演算について考えると、例えば1つのサイクルの間に、一方のレジスタから演算器へのデータ転送が行われる期間T1と他方のレジスタから演算器へのデータ転送が行われる期間T1’とが重複せずに含まれる。
It should be noted that the processing time from when the data used for the operation is read out from the register, the operation is performed and the result is written into the register is, for example, several cycles, and the number of cycles varies depending on the operation processing content.
The processing timing for the above-described calculation example includes a period T1 in which data transfer from the register R0 to the calculator is performed, a subsequent period T2 in which calculation is performed in the calculator, and a subsequent calculation result in the register R1. It includes a writing period T3. For example, the period T2 is included across one or more cycles subsequent to one cycle including the period T1, and the period T3 is included in one subsequent cycle. Considering an operation using two registers as inputs, for example, during a cycle, a period T1 during which data transfer from one register to the arithmetic unit is performed and a period during which data transfer from the other register to the arithmetic unit is performed. T1 ′ is included without duplication.

<コプロセッサ演算命令に係る動作>
以下、上述した構成を備える演算処理装置100が、コプロセッサ演算命令(xexec命令)を実行する場合の各部の動作を説明する。
主プロセッサ3000の命令解釈制御回路3100は、命令メモリ5000から読み出した命令を解釈し、その命令が命令識別コードによりxexec命令であると判定した場合には、その命令のオペランドを指定する各フィールド(図2参照)の内容に基づいて1サイクル内に次の2つ処理を行う。
<Operations related to coprocessor operation instructions>
Hereinafter, the operation of each unit when the arithmetic processing unit 100 having the above-described configuration executes a coprocessor arithmetic instruction (xexec instruction) will be described.
When the instruction interpretation control circuit 3100 of the main processor 3000 interprets the instruction read from the instruction memory 5000 and determines that the instruction is the xexec instruction based on the instruction identification code, each field ( The following two processes are performed within one cycle based on the contents of FIG.

まず、命令解釈制御回路3100は、1つの処理として、コプロセッサ用命令コードフィールドの内容つまり演算種別、及びデスティネーションレジスタ指定フィールドの内容つまり演算結果格納用レジスタの指定を、制御信号線3040を介してコプロセッサ4000の論理制御回路4100に伝達する。
また、命令解釈制御回路3100は、他の1つの処理として、ソースレジスタ指定フィールドの内容により指定された1つのレジスタからデータ伝送路3075上にデータを出力させるようにするための各制御信号を、制御信号線3030を介してそのレジスタ及びセレクタ3680に与える。
First, the instruction interpretation control circuit 3100 performs, as one process, the contents of the instruction code field for the coprocessor, that is, the operation type, and the contents of the destination register designation field, that is, the designation of the operation result storage register via the control signal line 3040. To the logic control circuit 4100 of the coprocessor 4000.
In addition, as another process, the instruction interpretation control circuit 3100 outputs each control signal for outputting data from one register designated by the contents of the source register designation field onto the data transmission path 3075. The signal is supplied to the register and selector 3680 via the control signal line 3030.

これらの処理に呼応して、コプロセッサ4000においては、論理制御回路4100が、受信した演算種別に応じてレジスタバンク4500及び演算器4200を制御して、データ伝送路3075上に与えられたソースデータに基づいての演算処理を実行させる。この演算処理に要するサイクル数は、例えば3サイクルであり、演算種別によってサイクル数は異なる。   In response to these processes, in the coprocessor 4000, the logic control circuit 4100 controls the register bank 4500 and the calculator 4200 in accordance with the received calculation type, and the source data provided on the data transmission path 3075. The arithmetic processing based on is executed. The number of cycles required for this calculation process is, for example, three cycles, and the number of cycles varies depending on the calculation type.

更に論理制御回路4100は、受信していた演算結果格納用レジスタの指定を保持しておき、演算処理が終了する際に、つまり記憶している各演算処理実行に要するサイクル数を示すデータに基づき特定されるその演算処理の終了タイミングに合わせて、その演算結果格納用レジスタの指定を含む演算終了の旨の信号を、制御信号線4040を介して主プロセッサ3000の命令解釈制御回路3100に伝達する。なお、演算終了時点では、演算結果であるデータは演算器4200によりデータ伝送路3070上に出力されている。演算結果の主プロセッサ3000への返却はこのデータ伝送路3070によって行われる。   Further, the logic control circuit 4100 holds the designation of the received arithmetic result storage register, and when the arithmetic processing ends, that is, based on the stored data indicating the number of cycles required to execute each arithmetic processing. In accordance with the end timing of the specified arithmetic processing, a signal indicating the end of the operation including designation of the operation result storage register is transmitted to the instruction interpretation control circuit 3100 of the main processor 3000 via the control signal line 4040. . At the end of the calculation, the calculation result data is output on the data transmission path 3070 by the calculator 4200. The calculation result is returned to the main processor 3000 through the data transmission path 3070.

そして、命令解釈制御回路3100は、論理制御回路4100から、演算結果格納用レジスタの指定を含む演算終了の旨の信号を受信すると、その信号により演算結果格納用レジスタとして指定されている1つのレジスタにデータ伝送路3070上のデータを書き込ませるための各制御信号を、制御信号線3030を介してそのレジスタ及びセレクタ3650〜セレクタ3665に与える。この結果として、何サイクルか前に解釈したxexec命令においてデスティネーションレジスタ指定フィールドの内容により指定されていたレジスタに、コプロセッサ4000の演算結果が格納されることになる。   When the instruction interpretation control circuit 3100 receives from the logic control circuit 4100 a signal indicating the end of the operation including the specification of the operation result storage register, one register designated as the operation result storage register by that signal. Each control signal for causing the data on the data transmission path 3070 to be written to is supplied to the registers and selectors 3650 to 3665 via the control signal line 3030. As a result, the operation result of the coprocessor 4000 is stored in the register designated by the contents of the destination register designation field in the xexec instruction interpreted several cycles ago.

なお、命令解釈制御回路3100は、xexec命令に対応してのコプロセッサ4000の演算結果をあるレジスタに書き込ませるデータ転送期間と、そのxexec命令に後続する何らかの一般の演算命令に対応しての内部演算器による演算結果を別のレジスタに書き込ませるデータ転送期間とを、重複せずに1つのサイクル内に含ませるよう制御する。   The instruction interpretation control circuit 3100 has a data transfer period in which the operation result of the coprocessor 4000 corresponding to the xexec instruction is written to a certain register, and an internal corresponding to any general operation instruction following the xexec instruction. Control is performed so that the data transfer period in which the calculation result by the calculator is written to another register is included in one cycle without overlapping.

<動作タイミング>
以下、コプロセッサ演算命令の実行に関連する各処理の実行タイミングについて詳細に説明する。
ここでは、(1)主プロセッサ3000は、命令メモリ5000内に格納されたプログラムを構成する各命令を逐次読み出して解釈し実行している際に、外部から割込信号を受けるとそのプログラムに係る命令の実行を一時的に中断して割込対応の処理を行った後に元のプログラムの実行を再開するものであり、コプロセッサ4000は主プロセッサ3000が割込対応処理を行っている間は、演算処理を一時的に停止するという同期制御を行うものであり、(2)コプロセッサの演算器4200は、パイプライン構成になっておらず、前の演算結果を主プロセッサ3000内のレジスタに書き込むまで次のコプロセッサ演算命令を受け付けないものであって1つの演算処理の実行に2サイクル要するものとして、説明する。
<Operation timing>
Hereinafter, the execution timing of each process related to the execution of the coprocessor operation instruction will be described in detail.
Here, (1) when the main processor 3000 sequentially reads, interprets and executes each instruction constituting the program stored in the instruction memory 5000, the main processor 3000 relates to the program when receiving an interrupt signal from the outside. The execution of the original program is resumed after temporarily interrupting the execution of the instruction, and the coprocessor 4000 is executing the interrupt handling process while the main processor 3000 is performing the interrupt handling process. (2) The coprocessor computing unit 4200 does not have a pipeline configuration and writes the previous computation result to a register in the main processor 3000. In the following description, it is assumed that the next coprocessor operation instruction is not accepted and two cycles are required to execute one operation process.

図5は、コプロセッサ演算命令に係る各処理についてのタイミングチャートである。このタイミングチャートにおいて制御信号については上方か下方かの2段階で示しており、上方が処理契機となる信号がアクティブである状態を表している。
サイクルC1において、命令データ取得処理111が実行される。即ち、命令解釈制御回路3100が制御信号線3010を介して制御信号を送出することにより、命令メモリ5000から命令を取得する。
FIG. 5 is a timing chart for each process related to the coprocessor operation instruction. In this timing chart, the control signal is shown in two stages, upward or downward, and the upper part represents a state in which the signal that triggers the processing is active.
In cycle C1, instruction data acquisition processing 111 is executed. That is, the command interpretation control circuit 3100 sends a control signal via the control signal line 3010 to acquire a command from the command memory 5000.

サイクルC2において、命令デコード処理112が実行される。即ち、命令解釈制御回路3100が、取得した命令を解釈し、xexec命令のオペランドで指定される各レジスタを特定する。
サイクルC3において、コプロセッサへのデータ受け渡し処理113、及びコプロセッサへの制御受け渡し処理114が実行される。即ち、制御信号線3030を介しての命令解釈制御回路3100による制御により、ソースレジスタ指定フィールドで指定されたレジスタが、データをデータ伝送路3075上に出力してコプロセッサ4000にデータを受け渡し、命令解釈制御回路3100が演算種別と演算結果格納用レジスタの指定とを制御信号線3040に出力してコプロセッサ4000に受け渡す。
In cycle C2, instruction decode processing 112 is executed. That is, the instruction interpretation control circuit 3100 interprets the acquired instruction and specifies each register specified by the operand of the xexec instruction.
In cycle C3, data transfer processing 113 to the coprocessor and control transfer processing 114 to the coprocessor are executed. That is, under the control of the instruction interpretation control circuit 3100 via the control signal line 3030, the register designated in the source register designation field outputs the data on the data transmission path 3075 and delivers the data to the coprocessor 4000. The interpretation control circuit 3100 outputs the operation type and the operation result storage register designation to the control signal line 3040 and passes them to the coprocessor 4000.

サイクルC4及びサイクルC5において、コプロセッサ演算処理115が実行される。即ち、論理制御回路4100は、制御信号線3040を介して取得した演算種別に応じて、サイクルC4において制御信号線4020を介して制御信号を伝達して演算器4200に、データ伝送路3075上のデータを用いた演算を開始させ、サイクルC5において、既に取得して保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサ3000へと送出する。なお、サイクルC5においては、演算器4200は、演算を完了してその演算結果のデータをデータ伝送路3070上に出力する。   In cycle C4 and cycle C5, coprocessor arithmetic processing 115 is executed. That is, the logic control circuit 4100 transmits a control signal via the control signal line 4020 in the cycle C4 according to the operation type acquired via the control signal line 3040, and sends the control signal to the arithmetic unit 4200 on the data transmission path 3075. An operation using data is started, and in cycle C5, a signal indicating the end of the operation including the designation of the operation result storage register that has already been acquired and held is sent via the control signal line 4040 to the main processor 3000. To send to. In cycle C5, arithmetic unit 4200 completes the operation and outputs the data of the operation result on data transmission path 3070.

サイクルC6において、主プロセッサへのデータ受け渡し処理116が実行される。即ち、命令解釈制御回路3100は、受信した演算終了の旨を示す信号に含まれる演算結果格納用のレジスタの指定に基づいて、制御信号線3030を介して制御信号をレジスタバンク3500に伝えることにより、そのレジスタにデータ伝送路3070上のデータを書き込ませる。   In cycle C6, data transfer processing 116 to the main processor is executed. That is, the instruction interpretation control circuit 3100 transmits a control signal to the register bank 3500 via the control signal line 3030 based on the designation of the register for storing the operation result included in the received signal indicating the end of the operation. The data on the data transmission path 3070 is written to the register.

なお、主プロセッサ3000は、コプロセッサ演算命令に係る処理の実行開始後は、その実行と並行して、そのコプロセッサ演算命令に後続する命令に係る処理を行うものであり、図5のタイミングチャート上には示していないが、例えば、サイクルC2において、上述したxexec命令に後続する一般の演算命令Aを命令メモリ5000から取得し、サイクルC3でその演算命令Aの解釈を行い、サイクルC4で演算命令Aに係る演算対象データのレジスタからの演算器3200への転送を行い、サイクルC5で演算器3200により演算命令Aに応じた演算を行い、サイクルC6でその演算結果をレジスタに転送し、また演算命令Aに後続する演算命令BをC3において命令メモリ5000から取得し、サイクルC4でその演算命令Bの解釈を行い、サイクルC5で演算命令Bに係る演算対象データのレジスタからの演算器3200への転送を行い、サイクルC6で演算器3200により演算命令Bに応じた演算を行い、サイクルC7でその演算結果をレジスタに転送する。
<変形例1>
以下、上述した演算処理装置100の変形例1について説明する。変形例1に対して上述の元の例を、基本例と呼ぶことにする。
The main processor 3000 performs processing related to the instruction subsequent to the coprocessor arithmetic instruction in parallel with the execution of the processing related to the coprocessor arithmetic instruction after the start of execution of the processing related to the coprocessor arithmetic instruction. Although not shown above, for example, in cycle C2, a general operation instruction A following the above-described xexec instruction is acquired from the instruction memory 5000, the operation instruction A is interpreted in cycle C3, and operation is performed in cycle C4. The calculation target data related to the instruction A is transferred from the register to the calculator 3200, the calculation according to the calculation instruction A is performed by the calculator 3200 in the cycle C5, and the calculation result is transferred to the register in the cycle C6. An operation instruction B subsequent to the operation instruction A is acquired from the instruction memory 5000 in C3, and the operation instruction B is acquired in cycle C4. Interpretation is performed, and the operation target data related to the operation instruction B is transferred from the register to the operation unit 3200 in the cycle C5, and the operation according to the operation instruction B is performed by the operation unit 3200 in the cycle C6. Transfer the result to a register.
<Modification 1>
Hereinafter, Modification 1 of the above-described arithmetic processing device 100 will be described. The original example described above with respect to the first modification will be referred to as a basic example.

上述した基本例に係る演算処理装置100においては、コプロセッサ4000は、主プロセッサ3000により指定された演算種別の演算処理を1つずつ逐次実行するものであったが、変形例1に係る演算処理装置は、コプロセッサが各演算処理をパイプライン方式で並列実行する点で基本例に係る演算処理装置100と異なる。なお、変形例1に係る演算処理装置の各部については、説明上の必要に応じて、上述した基本例に係る演算処理装置100における対応する各部と同じ符号を用いて説明する。   In the arithmetic processing device 100 according to the basic example described above, the coprocessor 4000 sequentially executes arithmetic processing of the arithmetic type designated by the main processor 3000 one by one. The apparatus differs from the arithmetic processing apparatus 100 according to the basic example in that the coprocessor executes each arithmetic processing in parallel in a pipeline manner. In addition, about each part of the arithmetic processing apparatus which concerns on the modification 1, it demonstrates using the same code | symbol as each corresponding part in the arithmetic processing apparatus 100 which concerns on the basic example mentioned above as needed for description.

この変形例1に係る演算処理装置におけるコプロセッサ演算命令(xexec命令)の実行に関連する各処理の実行タイミングについて説明する。
なお、(1)主プロセッサが割込対応処理を行っている間は、コプロセッサは演算処理を一時的に停止するという同期制御を行うものであり、(2)コプロセッサの演算器は、パイプライン構成であり、前の演算結果を主プロセッサ内のレジスタに書き込む前であっても次のコプロセッサ演算命令を受け付け、演算処理をパイプラインステージ数が2であるパイプライン方式で実行し、1つの演算処理の実行に2サイクル要するものとして、説明する。
The execution timing of each process related to the execution of the coprocessor arithmetic instruction (xexec instruction) in the arithmetic processing apparatus according to the first modification will be described.
Note that (1) While the main processor is performing interrupt handling processing, the coprocessor performs synchronous control that temporarily stops arithmetic processing. (2) The coprocessor's arithmetic unit Even if the previous operation result is not written to a register in the main processor, the next coprocessor operation instruction is accepted and the operation processing is executed in a pipeline system with two pipeline stages. In the following description, it is assumed that two cycles are required to execute one arithmetic process.

図6は、変形例1におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。
ここでは、いずれもコプロセッサ演算命令であるn番目の命令とn+1番目の命令とに着目して説明する。
サイクルC1において、n番目のコプロセッサ演算命令について命令データ取得処理111が実行される。
FIG. 6 is a timing chart for each process related to the coprocessor operation instruction in the first modification.
Here, description will be given focusing on the n-th instruction and the (n + 1) -th instruction, both of which are coprocessor operation instructions.
In cycle C1, instruction data acquisition processing 111 is executed for the nth coprocessor operation instruction.

サイクルC2において、n+1番目のコプロセッサ演算命令について命令データ取得処理111が実行されるとともに、n番目のコプロセッサ演算命令について命令デコード処理112が実行される。即ち、命令解釈制御回路が制御信号線3010を介して制御信号を送出することにより、命令メモリからn+1番目のコプロセッサ演算命令を取得するとともに、その命令解釈制御回路は、サイクルC1において取得していたn番目のコプロセッサ演算命令を解釈する。   In cycle C2, the instruction data acquisition process 111 is executed for the (n + 1) th coprocessor operation instruction, and the instruction decode process 112 is executed for the nth coprocessor operation instruction. That is, the instruction interpretation control circuit sends out a control signal via the control signal line 3010 to acquire the (n + 1) th coprocessor operation instruction from the instruction memory, and the instruction interpretation control circuit acquires it in the cycle C1. The nth coprocessor operation instruction is interpreted.

以後のサイクルにおいても同様に、各サイクル内で複数のコプロセッサ演算命令それぞれに対応して別個の処理が施される。なお、図6や、これ以後に用いる図7等において、図5と同一の符号を付して示した各処理の内容は、基本例について図5に即して上述した内容と基本的に同じであり、相違点がある場合にはその説明を行う。
サイクルC3において、n番目のコプロセッサ演算命令に対応してコプロセッサへのデータ受け渡し処理113及びコプロセッサへの制御受け渡し処理114が実行されるとともに、n+1番目のコプロセッサ演算命令に対応して命令デコード処理112が実行される。
Similarly, in the subsequent cycles, separate processing is performed corresponding to each of a plurality of coprocessor operation instructions in each cycle. In FIG. 6 and FIG. 7 and the like used thereafter, the contents of each process indicated by the same reference numerals as those in FIG. 5 are basically the same as the contents described above with reference to FIG. If there is a difference, it will be explained.
In cycle C3, a data transfer process 113 to the coprocessor and a control transfer process 114 to the coprocessor are executed corresponding to the nth coprocessor operation instruction, and an instruction corresponding to the (n + 1) th coprocessor operation instruction. A decoding process 112 is executed.

サイクルC4において、n番目のコプロセッサ演算命令に対応して、2段階に分割されたコプロセッサ演算処理の前半処理115aが実行されるとともに、n+1番目のコプロセッサ演算命令に対応してコプロセッサへのデータ受け渡し処理113及びコプロセッサへの制御受け渡し処理114が実行される。コプロセッサ演算処理の前半処理115aにおいては、論理制御回路は、前半処理115aの対象となるコプロセッサ演算命令に対応して既に取得している演算結果格納用のレジスタの指定の保持をし続け、既に取得している演算種別に応じて制御信号線4020を介して制御信号を伝達して演算器4200に、データ伝送路3075上のデータを用いた演算を開始させる。なお、論理制御回路は内部に少なくともパイプラインのステージ数分だけの数の、演算結果格納用のレジスタの指定を保持するための記憶領域を有し、この記憶領域の集合は、例えば、格納した順に値を取り出せるFIFO(First In First Out)バッファで実現される。   In cycle C4, the first half process 115a of the coprocessor operation process divided into two stages is executed corresponding to the nth coprocessor operation instruction, and to the coprocessor corresponding to the n + 1th coprocessor operation instruction. Data transfer processing 113 and control transfer processing 114 to the coprocessor are executed. In the first half process 115a of the coprocessor arithmetic process, the logic control circuit continues to hold the designation of the register for storing the operation result that has already been acquired corresponding to the coprocessor arithmetic instruction that is the target of the first half process 115a. A control signal is transmitted via the control signal line 4020 according to the already obtained calculation type, and the calculator 4200 is caused to start calculation using data on the data transmission path 3075. Note that the logic control circuit has a storage area for holding the designation of registers for storing operation results, at least as many as the number of stages in the pipeline, and this set of storage areas is stored, for example, This is realized by a FIFO (First In First Out) buffer from which values can be sequentially extracted.

サイクルC5において、n番目のコプロセッサ演算命令に対応して、2段階に分割されたコプロセッサ演算処理の後半処理115bが実行されるとともに、n+1番目のコプロセッサ演算命令に対応して前半処理115aが実行される。なお、コプロセッサ演算処理の後半処理115bにおいては、演算器4200は、前半処理115aの結果を引き継いで更なる演算を最後まで行って演算結果のデータをデータ伝送路3070上に出力し、また、論理制御回路は、n番目のコプロセッサ演算命令に対応して、例えばFIFOバッファに既に保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出する。   In cycle C5, the second half process 115b of the coprocessor calculation process divided into two stages is executed corresponding to the nth coprocessor calculation instruction, and the first half process 115a corresponding to the n + 1th coprocessor calculation instruction. Is executed. In the second half process 115b of the coprocessor arithmetic process, the arithmetic unit 4200 takes over the result of the first half process 115a, performs further calculations to the end, and outputs the data of the calculation result on the data transmission path 3070. In response to the nth coprocessor operation instruction, the logic control circuit sends a signal indicating the end of the operation including the specification of the register for storing the operation result already held in the FIFO buffer, for example, to the control signal line 4040. To the main processor.

サイクルC6において、n番目のコプロセッサ演算命令に対応して主プロセッサへのデータ受け渡し処理116が実行されるとともに、n+1番目のコプロセッサ演算命令に対応して後半処理115bが実行される。なお、サイクルC6においては、主プロセッサの命令解釈制御回路の制御下で、n番目のコプロセッサ演算命令のデスティネーションレジスタ指定フィールドで示されたレジスタにデータ伝送路3070上のデータが書き込まれた後に、コプロセッサ側の演算器4200によるn+1番目のコプロセッサ演算命令に対応してなされる演算結果がデータ伝送路3070上に出力されるように、各動作タイミングが定められている。   In cycle C6, a data transfer process 116 to the main processor is executed corresponding to the nth coprocessor operation instruction, and a second half process 115b is executed corresponding to the n + 1th coprocessor operation instruction. In cycle C6, under the control of the instruction interpretation control circuit of the main processor, after the data on the data transmission path 3070 is written to the register indicated by the destination register designation field of the nth coprocessor operation instruction. Each operation timing is determined so that a calculation result corresponding to the (n + 1) th coprocessor calculation instruction by the calculator 4200 on the coprocessor side is output on the data transmission path 3070.

サイクルC7において、n+1番目のコプロセッサ演算命令に対応して主プロセッサへのデータ受け渡し処理116が実行される。
<変形例2>
以下、基本例に係る演算処理装置100の変形例2について説明する。
基本例に係る演算処理装置100においては、コプロセッサ4000は、主プロセッサ3000が割込対応処理を行っている間は演算処理を一時的に停止するという同期制御を行うものであったが、変形例2に係る演算処理装置は、主プロセッサが割込対応処理を行っている間もコプロセッサが演算処理を継続する点で基本例に係る演算処理装置100と異なる。なお、変形例2に係る演算処理装置の各部については、説明上の必要に応じて、上述した基本例に係る演算処理装置100における対応する各部と同じ符号を用いて説明する。
In cycle C7, data transfer processing 116 to the main processor is executed in response to the (n + 1) th coprocessor operation instruction.
<Modification 2>
Hereinafter, Modification 2 of the arithmetic processing device 100 according to the basic example will be described.
In the arithmetic processing unit 100 according to the basic example, the coprocessor 4000 performs synchronous control in which the arithmetic processing is temporarily stopped while the main processor 3000 performs the interrupt handling processing. The arithmetic processing device according to Example 2 differs from the arithmetic processing device 100 according to the basic example in that the coprocessor continues the arithmetic processing while the main processor performs the interrupt handling processing. In addition, about each part of the arithmetic processing apparatus which concerns on the modification 2, it demonstrates using the same code | symbol as each corresponding part in the arithmetic processing apparatus 100 which concerns on the basic example mentioned above as needed on description.

この変形例2に係る演算処理装置では、基本例に係る演算処理装置100と同様に、論理制御回路が、受信していた演算結果格納用レジスタの指定を保持しておき、演算器に演算を行わせて演算結果をデータ伝送路3070上に出力させ、また、演算処理が終了する際に、その演算結果格納用レジスタの指定を含む演算終了の旨の信号を、制御信号線4040を介して主プロセッサの命令解釈制御回路に伝達する。この後の処理が変形例2に係る演算処理装置に独特であり、演算終了の旨の信号を受けた命令解釈制御回路が、その演算結果の受け取り準備ができた段階で受け取り可能の旨を示す信号を、制御信号線3040を介して論理制御回路に伝達し、論理制御回路側ではこの受け取り可能の旨を示す信号を受け取ってない間は、演算終了の旨の信号をサイクル毎に繰り返し送出し、データ伝送路3070にデータを出力するような新たな演算を実行させないようにして、そのデータ伝送路3070上のデータを維持する。   In the arithmetic processing device according to the second modification, as in the arithmetic processing device 100 according to the basic example, the logic control circuit holds the designation of the received arithmetic result storage register, and performs an arithmetic operation on the arithmetic unit. The calculation result is output on the data transmission path 3070, and when the calculation process is completed, a signal indicating the completion of the calculation including the designation of the calculation result storage register is sent via the control signal line 4040. It is transmitted to the instruction interpretation control circuit of the main processor. The subsequent processing is unique to the arithmetic processing apparatus according to the second modification, and the instruction interpretation control circuit that has received the signal indicating the end of the operation indicates that the operation result can be received when ready to receive the operation result. The signal is transmitted to the logic control circuit via the control signal line 3040, and while the signal indicating that the signal can be received is not received on the logic control circuit side, a signal indicating the completion of the operation is repeatedly sent every cycle. The data on the data transmission path 3070 is maintained without executing a new calculation that outputs data to the data transmission path 3070.

以下、変形例2に係る演算処理装置におけるコプロセッサ演算命令(xexec命令)の実行に関連する各処理の実行タイミングについて説明する。
なお、コプロセッサの演算器は、パイプライン構成になっておらず、前の演算結果を主プロセッサ内のレジスタに書き込むまで次のコプロセッサ演算命令を受け付けないものであって1つの演算処理の実行に2サイクル要するものとして、説明する。
Hereinafter, the execution timing of each process related to the execution of the coprocessor arithmetic instruction (xexec instruction) in the arithmetic processing apparatus according to the modified example 2 will be described.
The arithmetic unit of the coprocessor does not have a pipeline configuration, and does not accept the next coprocessor arithmetic instruction until the previous arithmetic result is written to a register in the main processor, and executes one arithmetic process. It is assumed that two cycles are required.

図7は、変形例2におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。
サイクルC1〜C3までは、図5に示した基本例に係る演算処理装置100と同様の動作を行う。
サイクルC4及びサイクルC5において、コプロセッサ演算処理115が実行される。即ち、論理制御回路は、制御信号線3040を介して取得した演算種別に応じて、サイクルC4において制御信号線4020を介して制御信号を伝達して演算器4200に、データ伝送路3075上のデータを用いた演算を開始させ、サイクルC5において、既に取得して保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出し、演算器4200に、演算を完了した後の演算結果のデータをデータ伝送路3070上に出力させ、制御信号線3040を介して、受け取り可能の旨を示す信号が送られてくるのを待つ。
FIG. 7 is a timing chart for each process related to the coprocessor operation instruction in the second modification.
In cycles C1 to C3, the same operation as that of the arithmetic processing apparatus 100 according to the basic example shown in FIG. 5 is performed.
In cycle C4 and cycle C5, coprocessor arithmetic processing 115 is executed. That is, the logic control circuit transmits a control signal via the control signal line 4020 in cycle C4 in accordance with the computation type acquired via the control signal line 3040, and transmits data on the data transmission path 3075 to the computing unit 4200. In cycle C5, a signal indicating the end of the operation including the designation of the operation result storage register already acquired and held is transmitted to the main processor via the control signal line 4040. The operation unit 4200 outputs the operation result data after completion of the operation to the data transmission path 3070, and a signal indicating that reception is possible is sent via the control signal line 3040. wait.

図7では、主プロセッサが割込対応処理等をしておらず特段の遅滞なく受け取り可能の旨を示す信号を発した例を示している。
この例の場合には、論理制御回路は、サイクルC5の間に受け取り可能の旨の信号を受信したので、演算器4200にはサイクルC6において演算結果のデータをデータ伝送路3070に出力させる制御は行わない。
FIG. 7 shows an example in which the main processor does not perform interrupt handling processing or the like and issues a signal indicating that it can be received without any particular delay.
In this example, since the logic control circuit has received a signal indicating that it can be received during cycle C5, the arithmetic unit 4200 is controlled to output data of the operation result to the data transmission line 3070 in cycle C6. Not performed.

サイクルC6において、主プロセッサへのデータ受け渡し処理116が実行される。即ち、命令解釈制御回路は、受信した演算終了の旨を示す信号に含まれる演算結果格納用のレジスタの指定に基づいて、制御信号線3030を介して制御信号をレジスタバンク3500に伝えることにより、そのレジスタにデータ伝送路3070上のデータを書き込ませる。   In cycle C6, data transfer processing 116 to the main processor is executed. That is, the instruction interpretation control circuit transmits the control signal to the register bank 3500 via the control signal line 3030 based on the designation of the register for storing the operation result included in the received signal indicating the end of the operation. Data on the data transmission path 3070 is written to the register.

図8は、変形例2におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートであり、受け取り可能の旨を示す信号が遅れて発された場合の例を示す。
同図の例は、主プロセッサ側でコプロセッサ演算命令を解釈して、コプロセッサに演算を依頼した後、割込対応処理等を行ってその終了前に、依頼に応じたコプロセッサによる演算が完了した場合の例である。
FIG. 8 is a timing chart for each process related to the coprocessor operation instruction in the second modification, and shows an example in which a signal indicating that reception is possible is delayed.
In the example shown in the figure, the main processor interprets the coprocessor operation instruction, requests the coprocessor to perform the operation, performs interrupt handling processing, etc., and before the end, the operation by the coprocessor according to the request is performed. This is an example of completion.

サイクルC1〜C4までは、図7の例と同様の動作を行う。
サイクルC5において、既に取得して保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出し、演算器4200に、演算を完了した後の演算結果のデータをデータ伝送路3070上に出力させ、制御信号線3040を介して、受け取り可能の旨を示す信号が送られてくるのを待つ。
In cycles C1 to C4, the same operation as in the example of FIG. 7 is performed.
In cycle C5, a signal indicating the end of the operation including the designation of the operation result storage register that has already been acquired and held is sent to the main processor via the control signal line 4040, and the operation unit 4200 receives the signal. Data of the calculation result after completion of the calculation is output on the data transmission path 3070 and waits for a signal indicating that it can be received via the control signal line 3040.

サイクルC5において、論理制御回路は、受け取り可能の旨の信号を受信していないので、演算器4200にはサイクルC6において演算結果のデータをデータ伝送路3070に出力させ、再び、演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出する。そして、サイクルC6において、論理制御回路は、受け取り可能の旨の信号を受信したので、演算器4200にはサイクルC7において演算結果のデータをデータ伝送路3070に出力させる制御は行わない。   In cycle C5, since the logic control circuit has not received a signal indicating that it can be received, the arithmetic unit 4200 outputs the operation result data to the data transmission path 3070 in cycle C6, and again stores the operation result. A signal indicating the end of the calculation including the register designation is sent to the main processor via the control signal line 4040. Then, in cycle C6, the logic control circuit receives a signal indicating that it can be received. Therefore, the arithmetic unit 4200 is not controlled to output the data of the operation result to the data transmission path 3070 in cycle C7.

サイクルC7において、主プロセッサへのデータ受け渡し処理116が実行される。即ち、命令解釈制御回路は、受信した演算終了の旨を示す信号に含まれる演算結果格納用のレジスタの指定に基づいて、制御信号線3030を介して制御信号をレジスタバンク3500に伝えることにより、そのレジスタにデータ伝送路3070上のデータを書き込ませる。
<変形例3>
以下、基本例に係る演算処理装置100の変形例3について説明する。
In cycle C7, data transfer processing 116 to the main processor is executed. That is, the instruction interpretation control circuit transmits the control signal to the register bank 3500 via the control signal line 3030 based on the designation of the register for storing the operation result included in the received signal indicating the end of the operation. Data on the data transmission path 3070 is written to the register.
<Modification 3>
Hereinafter, Modification 3 of the arithmetic processing device 100 according to the basic example will be described.

この変形例3に係る演算処理装置は、上述した変形例1と同様にコプロセッサがパイプライン方式で各演算処理を実行するために必要な全ての構成を含み、かつ、上述した変形例2と同様に、主プロセッサが割込対応処理を行っている間もコプロセッサが演算処理を継続するものである。なお、変形例3に係る演算処理装置の各部については、説明上の必要に応じて、上述した基本例に係る演算処理装置100における対応する各部と同じ符号を用いて説明する。   The arithmetic processing apparatus according to the third modification includes all the configurations necessary for the coprocessor to execute each arithmetic process in a pipeline manner as in the first modification described above, and includes the second modification described above. Similarly, the coprocessor continues arithmetic processing while the main processor is performing interrupt handling processing. In addition, about each part of the arithmetic processing apparatus which concerns on the modification 3, it demonstrates using the same code | symbol as each corresponding part in the arithmetic processing apparatus 100 which concerns on the basic example mentioned above as needed on description.

この変形例3に係る演算処理装置では、変形例2においてと同様に、演算終了の旨の信号を受けた命令解釈制御回路が、その演算結果の受け取り準備ができた段階で受け取り可能の旨を示す信号を、制御信号線3040を介して論理制御回路に伝達し、論理制御回路側ではこの受け取り可能の旨を示す信号を受け取ってない間は、演算終了の旨の信号をサイクル毎に繰り返し送出し、データ伝送路3070にデータを出力するような新たな演算を実行させないようにして、そのデータ伝送路3070上のデータを維持する構成を備える。   In the arithmetic processing device according to the third modification, as in the second modification, the instruction interpretation control circuit that has received the signal indicating the completion of the operation can receive it when the operation result is ready to be received. Is transmitted to the logic control circuit via the control signal line 3040, and while the signal indicating that the signal can be received is not received on the logic control circuit side, the signal indicating the end of the calculation is repeatedly transmitted every cycle. In addition, the data transmission path 3070 is configured to maintain data on the data transmission path 3070 so as not to execute a new calculation that outputs data to the data transmission path 3070.

以下、変形例3に係る演算処理装置におけるコプロセッサ演算命令(xexec命令)の実行に関連する各処理の実行タイミングについて説明する。
なお、コプロセッサの演算器は、パイプライン構成であり、前の演算結果を主プロセッサ内のレジスタに書き込む前であっても次のコプロセッサ演算命令を受け付け、演算処理をパイプラインステージ数が2であるパイプライン方式で実行し、1つの演算処理の実行に2サイクル要するものとして、説明する。
Hereinafter, the execution timing of each process related to the execution of the coprocessor arithmetic instruction (xexec instruction) in the arithmetic processing apparatus according to the modification 3 will be described.
The arithmetic unit of the coprocessor has a pipeline configuration, accepts the next coprocessor arithmetic instruction even before writing the previous arithmetic result into the register in the main processor, and performs arithmetic processing with two pipeline stages. In the following description, it is assumed that two cycles are required to execute one arithmetic processing.

図9及び図10は、変形例3におけるコプロセッサ演算命令に係る各処理についてのタイミングチャート例であり、図10では、受け取り可能の旨を示す信号が図9の例より遅れて発された場合の例を示す。
図9の例及び図10の例は両方とも、サイクルC1〜C4までは、図6に即して変形例1について説明した動作と同様の動作を行う。
FIG. 9 and FIG. 10 are timing chart examples for each process related to the coprocessor operation instruction in the third modification. In FIG. 10, a signal indicating that reception is possible is issued later than the example in FIG. An example of
Both the example of FIG. 9 and the example of FIG. 10 perform the same operations as those described in the first modification with reference to FIG. 6 in cycles C1 to C4.

双方の例はサイクルC5において、n番目のコプロセッサ演算命令に対応して、2段階に分割されたコプロセッサ演算処理の後半処理115bが実行されるとともに、n+1番目のコプロセッサ演算命令に対応して前半処理115aが実行される。なお、コプロセッサ演算処理の後半処理115bにおいては、演算器4200は、前半処理115aの結果を引き継いで更なる演算を最後まで行って演算結果のデータをデータ伝送路3070上に出力し、また、論理制御回路は、n番目のコプロセッサ演算命令に対応して、例えばFIFOバッファに既に保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出し、制御信号線3040を介して、受け取り可能の旨を示す信号が送られてくるのを待つ。   In both examples, in the cycle C5, the second half processing 115b of the coprocessor arithmetic processing divided into two stages is executed corresponding to the nth coprocessor arithmetic instruction, and the n + 1th coprocessor arithmetic instruction is corresponded. Then, the first half process 115a is executed. In the second half process 115b of the coprocessor arithmetic process, the arithmetic unit 4200 takes over the result of the first half process 115a, performs further calculations to the end, and outputs the data of the calculation result on the data transmission path 3070. In response to the nth coprocessor operation instruction, the logic control circuit sends a signal indicating the end of the operation including the specification of the register for storing the operation result already held in the FIFO buffer, for example, to the control signal line 4040. To the main processor, and waits for a signal indicating that it can be received via the control signal line 3040.

図9の例においては、サイクルC5において、n番目のコプロセッサ演算命令に対応しての、受け取り可能の旨の信号が発されているので、サイクルC6においては、論理制御回路は、そのn番目のコプロセッサ演算命令に対応する演算終了の旨の信号の送出を繰り返さず、n+1番目のコプロセッサ演算命令に対応する演算終了の旨の信号の送出を行うとともに演算器4200にn+1番目のコプロセッサ演算命令に対応するコプロセッサ演算処理の後半処理115bを行わせる。   In the example of FIG. 9, in cycle C5, a signal indicating that reception is possible corresponding to the nth coprocessor operation instruction is issued. Therefore, in cycle C6, the logic control circuit The operation completion signal corresponding to the coprocessor operation instruction is not repeatedly transmitted, but the operation completion signal corresponding to the (n + 1) th coprocessor operation instruction is transmitted, and the n + 1th coprocessor is supplied to the arithmetic unit 4200. The second half process 115b of the coprocessor arithmetic process corresponding to the arithmetic instruction is performed.

一方、図10の例においては、サイクルC5において、n番目のコプロセッサ演算命令に対応しての、受け取り可能の旨の信号が発されていないので、サイクルC6においては、論理制御回路は、そのn番目のコプロセッサ演算命令に対応する演算終了の旨の信号の送出を繰り返し、そのn番目のコプロセッサ演算命令に対応する演算器4200による演算結果のデータ伝送路3070上への出力を繰り返させ、かつ、n+1番目のコプロセッサ演算命令に対応するコプロセッサ演算処理の後半処理115bの開始を抑止する。そして、サイクルC6において受け取り可能の旨の信号が発されているので、サイクルC7においては、論理制御回路は、n+1番目のコプロセッサ演算命令に対応して、例えばFIFOバッファに既に保持している演算結果格納用のレジスタの指定を含む演算終了の旨の信号の送出を行い、受け取り可能の旨を示す信号が送られてくるのを待つ。   On the other hand, in the example of FIG. 10, in cycle C5, the signal indicating that reception is possible corresponding to the nth coprocessor operation instruction is not issued. Therefore, in cycle C6, the logic control circuit Repeat sending of a signal indicating the end of the operation corresponding to the nth coprocessor operation instruction, and repeatedly outputting the operation result on the data transmission path 3070 by the operation unit 4200 corresponding to the nth coprocessor operation instruction. In addition, the start of the second half processing 115b of the coprocessor arithmetic processing corresponding to the (n + 1) th coprocessor arithmetic instruction is suppressed. Then, since a signal indicating that the signal can be received is issued in cycle C6, in cycle C7, the logic control circuit corresponds to the (n + 1) th coprocessor operation instruction, for example, an operation already held in the FIFO buffer. A signal indicating the end of the operation including the designation of the register for storing the result is transmitted, and the signal waiting for the reception is sent.

このように、受け取り可能の旨を示す信号の伝達に係る各種処理を行うことで、変形例3に係る演算処理装置においても、主プロセッサとコプロセッサは適切に連携動作することができる。
<変形例4>
以下、基本例に係る演算処理装置100の変形例4について説明する。
As described above, by performing various processes related to transmission of a signal indicating that reception is possible, the main processor and the coprocessor can appropriately cooperate in the arithmetic processing apparatus according to the third modification.
<Modification 4>
Hereinafter, Modification 4 of the arithmetic processing device 100 according to the basic example will be described.

この変形例4に係る演算処理装置は、上述した変形例2に係る演算処理装置と同様の機能構成を有し、コプロセッサの動作周波数が主プロセッサの2倍である点でのみ異なる。
即ち、変形例4に係る演算処理装置のコプロセッサの演算器は、パイプライン構成になっておらず、前の演算結果を主プロセッサ内のレジスタに書き込むまで次のコプロセッサ演算命令を受け付けないものである。
The arithmetic processing apparatus according to the fourth modification has a functional configuration similar to that of the arithmetic processing apparatus according to the second modification described above, and is different only in that the operating frequency of the coprocessor is twice that of the main processor.
That is, the arithmetic unit of the coprocessor of the arithmetic processing unit according to the modified example 4 does not have a pipeline configuration and does not accept the next coprocessor arithmetic instruction until the previous arithmetic result is written to the register in the main processor. It is.

図11は、変形例4におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。同図ではコプロセッサにおける1つの演算処理の実行に1サイクル要する場合を例示している。図7と対比すると、コプロセッサ演算処理115に要する時間が異なる程度であるため、詳細な説明は省略する。
この変形例4においても、変形例2と同様に受け取り可能の旨を示す信号の伝達に係る各種処理を行うことにより、主プロセッサとコプロセッサは適切に連係動作することができる。
<変形例5>
以下、基本例に係る演算処理装置100の変形例5について説明する。
FIG. 11 is a timing chart for each process related to the coprocessor operation instruction in the fourth modification. This figure illustrates the case where one cycle is required to execute one arithmetic process in the coprocessor. Compared with FIG. 7, the time required for the coprocessor arithmetic processing 115 is different, and thus detailed description is omitted.
Also in the fourth modification, the main processor and the coprocessor can appropriately cooperate with each other by performing various processes related to the transmission of a signal indicating that reception is possible, as in the second modification.
<Modification 5>
Hereinafter, Modification 5 of the arithmetic processing device 100 according to the basic example will be described.

この変形例5に係る演算処理装置は、上述した変形例3に係る演算処理装置と同様の機能構成を有し、コプロセッサの動作周波数が主プロセッサの2倍である点でのみ異なる。
即ち、変形例5に係る演算処理装置のコプロセッサの演算器は、パイプライン構成であり、前の演算結果を主プロセッサ内のレジスタに書き込む前であっても次のコプロセッサ演算命令を受け付け、演算処理をパイプラインステージ数が2であるパイプライン方式で実行する。
The arithmetic processing apparatus according to the modified example 5 has the same functional configuration as the arithmetic processing apparatus according to the modified example 3 described above, and is different only in that the operating frequency of the coprocessor is twice that of the main processor.
That is, the arithmetic unit of the coprocessor of the arithmetic processing device according to the modified example 5 has a pipeline configuration, and accepts the next coprocessor arithmetic instruction even before writing the previous arithmetic result into the register in the main processor, Arithmetic processing is executed in a pipeline system with two pipeline stages.

図12は、変形例5におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。同図ではコプロセッサにおける1つの演算処理の実行に1サイクル要する場合を例示している。図9と対比すると、コプロセッサ演算処理の前半処理115a及び後半処理115bに要する時間が異なる程度であるため、詳細な説明は省略する。
この変形例5においても、変形例3と同様に、FIFOバッファ等に演算結果格納用のレジスタの指定を保持し、また、受け取り可能の旨を示す信号の伝達に係る各種処理を行うことにより、主プロセッサとコプロセッサは適切に連係動作することができる。
<変形例6>
以下、基本例に係る演算処理装置100の変形例6について説明する。
FIG. 12 is a timing chart for each process related to the coprocessor operation instruction in the fifth modification. This figure illustrates the case where one cycle is required to execute one arithmetic process in the coprocessor. Compared with FIG. 9, since the time required for the first half process 115a and the second half process 115b of the coprocessor arithmetic process is different, detailed description is omitted.
In this modified example 5, as in the modified example 3, the designation of the register for storing the operation result is held in the FIFO buffer or the like, and various processes relating to the transmission of the signal indicating that reception is possible are performed. The main processor and the coprocessor can operate appropriately.
<Modification 6>
Hereinafter, Modification 6 of the arithmetic processing device 100 according to the basic example will be described.

この変形例6に係る演算処理装置は、上述した変形例2に係る演算処理装置と同様の機能構成を有し、コプロセッサの動作周波数が主プロセッサの1/2倍である点で異なる。
この動作周波数の違いに対応するため、変形例6に係る演算処理装置の主プロセッサは、更に、コプロセッサ演算命令のデスティネーションレジスタ指定フィールドの内容を記憶するためのバッファを有しており、命令解釈制御回路はコプロセッサ演算命令を解釈する際にそのデスティネーションレジスタ指定フィールドの内容である演算結果格納用のレジスタの指定をバッファに格納し、それ以後にバッファから読み出せるそのレジスタの指定と、コプロセッサから演算終了の旨の信号に含まれて伝えられるレジスタの指定とが一致するまではその指定されているレジスタを入力として用いるような演算命令の実行を抑止する機能を有する。
The arithmetic processing apparatus according to the sixth modification has the same functional configuration as the arithmetic processing apparatus according to the second modification described above, and is different in that the operating frequency of the coprocessor is ½ times that of the main processor.
In order to cope with this difference in operating frequency, the main processor of the arithmetic processing unit according to the modified example 6 further includes a buffer for storing the contents of the destination register designation field of the coprocessor arithmetic instruction. When interpreting the coprocessor operation instruction, the interpretation control circuit stores the operation result storage register specification, which is the contents of the destination register specification field, in the buffer, and then specifies the register that can be read from the buffer. It has a function of suppressing the execution of an arithmetic instruction that uses the designated register as an input until the designation of the register that is included in the signal indicating the completion of the computation from the coprocessor matches.

つまり、主プロセッサの動作周波数よりコプロセッサの動作周波数が低い場合には、コプロセッサ演算命令に基づいて、コプロセッサに演算を依頼してその演算結果を主プロセッサがレジスタに書き込むよりも先に、そのコプロセッサ演算命令に後続してその演算結果を用いるような一般の演算命令を実行してしまわないように、特別な制御を行う必要があり、そのために、変形例6に係る演算処理装置においては、主プロセッサに、デスティネーションレジスタ指定フィールドの内容を保持して、それにより指定されるレジスタにコプロセッサ演算命令の処理結果が格納されてから、そのレジスタを入力として用いる後続の演算命令を実行させるべく、そのような後続の演算命令の実行を一旦停止させる機能が設けられている。   That is, when the operating frequency of the coprocessor is lower than the operating frequency of the main processor, based on the coprocessor operation instruction, before the main processor asks the coprocessor to perform the operation and writes the operation result to the register, It is necessary to perform special control so that a general operation instruction that uses the operation result subsequent to the coprocessor operation instruction is not executed. For this reason, in the operation processing device according to the modified example 6, Holds the contents of the destination register specification field in the main processor, stores the processing result of the coprocessor operation instruction in the register specified by it, and then executes the subsequent operation instruction using that register as an input Therefore, a function for temporarily stopping the execution of the subsequent arithmetic instruction is provided.

以下、変形例6に係る演算処理装置におけるコプロセッサ演算命令(xexec命令)とこれに後続する一般の演算命令の実行に関連する各処理について説明する。
なお、コプロセッサの演算器は、パイプライン構成になっておらず、前の演算結果を主プロセッサ内のレジスタに書き込むまで次のコプロセッサ演算命令を受け付けないものである。
Hereinafter, each process related to execution of a coprocessor operation instruction (xexec instruction) and a general operation instruction subsequent thereto in the operation processing apparatus according to the modification 6 will be described.
Note that the arithmetic unit of the coprocessor does not have a pipeline configuration, and does not accept the next coprocessor arithmetic instruction until the previous arithmetic result is written to a register in the main processor.

図13は、変形例6におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。ここでは、コプロセッサにおいて1つの演算処理の実行に4サイクル要する場合を例示している。
サイクルC1〜C3までは、図7に示した変形例2に係る演算処理装置100と同様の動作を行う。但し、命令解釈制御回路は、コプロセッサ演算命令のデスティネーションレジスタ指定フィールドの内容をバッファに保持する。
FIG. 13 is a timing chart for each process related to the coprocessor operation instruction in the sixth modification. Here, a case where four cycles are required to execute one arithmetic process in the coprocessor is illustrated.
In cycles C1 to C3, the same operation as that of the arithmetic processing apparatus 100 according to the modification 2 shown in FIG. 7 is performed. However, the instruction interpretation control circuit holds the contents of the destination register designation field of the coprocessor operation instruction in the buffer.

サイクルC4〜C7において、コプロセッサ演算処理115が実行される。コプロセッサは2つ分のサイクルを1つの単位として動作を行う。まず、サイクルC4及びサイクルC5において、論理制御回路は、制御信号線3040を介して取得した演算種別に応じて、サイクルC4において制御信号線4020を介して制御信号を伝達して演算器4200に、データ伝送路3075上のデータを用いた演算を開始させ、サイクルC6及びサイクルC7において、既に取得して保持している演算結果格納用のレジスタの指定を含む演算終了の旨を示す信号を、制御信号線4040を介して主プロセッサへと送出し、演算器4200に、演算を完了した後の演算結果のデータをデータ伝送路3070上に出力させ、制御信号線3040を介して、受け取り可能の旨を示す信号が送られてくるのを待つ。   In cycles C4 to C7, the coprocessor arithmetic processing 115 is executed. The coprocessor operates with two cycles as one unit. First, in the cycle C4 and the cycle C5, the logic control circuit transmits a control signal via the control signal line 4020 in the cycle C4 according to the calculation type acquired via the control signal line 3040, and outputs to the arithmetic unit 4200. An operation using data on the data transmission path 3075 is started, and in cycles C6 and C7, a signal indicating the end of the operation including the designation of the operation result storage register already acquired and held is controlled. The data is sent to the main processor via the signal line 4040, and the computing unit 4200 is made to output the data of the computation result after the computation is completed on the data transmission path 3070 and can be received via the control signal line 3040. Wait for a signal to be sent.

主プロセッサは、演算終了の旨を示す信号を受信すると、制御信号線3040を介して、受け取り可能の旨の信号をコプロセッサに伝達する。なお、主プロセッサは、動作周波数の低いコプロセッサがその受け取り可能の旨の信号を認識可能となるように、1サイクル分以上の期間に渡りその受け取り可能の旨の信号を伝達する。
サイクルC6及びサイクルC7の期間において、受け取り可能の旨を示す信号を受信すると論理制御回路は、次のサイクルでの演算終了の旨の信号の伝達は行わない。
When the main processor receives a signal indicating the end of the calculation, it transmits a signal indicating that it can be received to the coprocessor via the control signal line 3040. Note that the main processor transmits a signal indicating that it can be received over a period of one cycle or more so that the coprocessor having a low operating frequency can recognize the signal indicating that it can be received.
When a signal indicating that reception is possible is received during the cycle C6 and cycle C7, the logic control circuit does not transmit a signal indicating the end of the calculation in the next cycle.

なお、主プロセッサは、サイクルC2では、図13には示していないが、コプロセッサ演算命令を解釈するとともに、その命令に後続する演算命令を読出すための命令データ取得処理111を行うことができ、その後続する演算命令についてはサイクルC3で命令デコード処理112を行う。しかし、その演算命令が演算の入力用の指定したレジスタが、先行するコプロセッサ演算命令で指定された演算結果格納用のレジスタと一致していて、かつ、まだそのレジスタへのコプロセッサによる演算結果の格納が行われていない場合には、その格納が行われるまで、その後続する演算命令についての演算器3200による演算の開始を遅らせる。   Although not shown in FIG. 13 in cycle C2, the main processor can interpret the coprocessor arithmetic instruction and perform instruction data acquisition processing 111 for reading the arithmetic instruction subsequent to the instruction. For the subsequent operation instruction, instruction decode processing 112 is performed in cycle C3. However, the register specified for the operation input by the operation instruction matches the register for storing the operation result specified by the preceding coprocessor operation instruction, and the operation result by the coprocessor for the register still exists. When the storage is not performed, the start of the operation by the operation unit 3200 for the subsequent operation instruction is delayed until the storage is performed.

サイクルC8において、主プロセッサへのデータ受け渡し処理116が実行される。即ち、命令解釈制御回路は、受信した演算終了の旨を示す信号に含まれる演算結果格納用のレジスタの指定に基づいて、制御信号線3030を介して制御信号をレジスタバンク3500に伝えることにより、そのレジスタにデータ伝送路3070上のデータを書き込ませ、その後に上述したバッファに保持しているレジスタの指定を削除する。このバッファにレジスタの指定が含まれていない状態になると、命令解釈制御回路は、もしそのレジスタを入力とするために待たせていた演算命令があれば、その演算命令の演算器3200による演算を開始させる。
<実施の形態2>
以下、本発明の実施の形態2に係る演算処理装置について説明する。
In cycle C8, data transfer processing 116 to the main processor is executed. That is, the instruction interpretation control circuit transmits the control signal to the register bank 3500 via the control signal line 3030 based on the designation of the register for storing the operation result included in the received signal indicating the end of the operation. The data on the data transmission path 3070 is written to the register, and thereafter, the designation of the register held in the buffer is deleted. If the buffer does not contain a register specification, the instruction interpretation control circuit, if there is an operation instruction that has been waiting for the register as an input, performs an operation of the operation instruction by the arithmetic unit 3200. Let it begin.
<Embodiment 2>
Hereinafter, the arithmetic processing apparatus according to the second embodiment of the present invention will be described.

実施の形態2に係る演算処理装置においては、上述した実施の形態1に係る演算処理装置の変形例1、3、5それぞれ同様に装置内部のコプロセッサが演算をパイプライン方式で実行する。実施の形態2に係る演算処理装置においては、コプロセッサ演算命令(xexec命令)のオペランドの取り扱いが異なることから、実施の形態1に係る演算処理装置と若干の装置構成上の差異がある。   In the arithmetic processing apparatus according to the second embodiment, the coprocessor in the apparatus executes the calculation in a pipeline manner in the same manner as the first, third, and fifth modifications of the arithmetic processing apparatus according to the first embodiment. In the arithmetic processing apparatus according to the second embodiment, since the handling of the operand of the coprocessor arithmetic instruction (xexec instruction) is different, there is a slight difference in apparatus configuration from the arithmetic processing apparatus according to the first embodiment.

まず、xexec命令について、ニーモニック表記で表すと実施の形態1と同じく次のようになる。
xexec OPn,dstRn,srcRn
ここで、コプロセッサ演算命令つまりxexec命令は、OPn、dstRn及びsrcRnという3つのオペランドの指定を必要とする命令である。このOPnはコプロセッサにおける演算処理の種別の指定であり、srcRnはコプロセッサの演算に用いられるソースデータを格納している主プロセッサ側のレジスタの番号の指定であることまでは、実施の形態1と同様であるが、dstRnはコプロセッサによるその演算結果ではなく、コプロセッサのパイプラインステージ数に対応するサイクルだけ先行するxexec命令に対応し、そのサイクルだけ先行してコプロセッサが依頼を受けた演算の結果を、格納するための主プロセッサ側のレジスタ番号の指定である。
First, the xexec instruction is expressed in mnemonic notation as in the first embodiment.
xexec OPn, dstRn, srcRn
Here, the coprocessor operation instruction, that is, the xexec instruction, is an instruction that requires specification of three operands OPn, dstRn, and srcRn. This OPn is the designation of the type of arithmetic processing in the coprocessor, and srcRn is the designation of the register number on the main processor side that stores the source data used for the coprocessor computation. DstRn is not the result of the operation by the coprocessor, but corresponds to an xexec instruction that precedes the cycle corresponding to the number of pipeline stages of the coprocessor, and the coprocessor has received a request ahead of that cycle. This is the designation of the register number on the main processor side for storing the result of the operation.

このコプロセッサ演算命令を取得し解釈すると、主プロセッサは、srcRnで指定されたレジスタの内容であるソースデータと、演算処理の種別とをコプロセッサに伝達することにより、コプロセッサに演算を依頼し、また、コプロセッサに先行して依頼した演算の結果を受け取ってdstRnで指定されたレジスタに格納する。
なお、コプロセッサ演算命令(xexec命令)のフォーマットについてもそのデータ構成は、図2を用いて実施の形態1で示したものと同じである。
When this coprocessor operation instruction is acquired and interpreted, the main processor requests the coprocessor to perform operation by transmitting the source data, which is the contents of the register specified by srcRn, and the type of operation processing to the coprocessor. Also, the result of the operation requested in advance by the coprocessor is received and stored in the register specified by dstRn.
Note that the data structure of the coprocessor operation instruction (xexec instruction) format is the same as that shown in the first embodiment with reference to FIG.

実施の形態2に係る演算処理装置の構成及び動作は、実施の形態1で説明した演算処理装置の構成及び動作と基本的に同様であるので(図3及び図4参照)、ここでは異なる点に重点を置いて説明する。
主プロセッサの命令解釈制御回路は、命令メモリから読み出した命令を解釈し、その命令が命令識別コードによりxexec命令であると判定した場合には、その命令のオペランドを指定する各フィールド(図2参照)の内容に基づいて1サイクル内に次の3つ処理を行う。
The configuration and operation of the arithmetic processing apparatus according to the second embodiment are basically the same as the configuration and operation of the arithmetic processing apparatus described in the first embodiment (see FIGS. 3 and 4), and are different here. Explain with emphasis on.
When the instruction interpretation control circuit of the main processor interprets the instruction read from the instruction memory and determines that the instruction is the xexec instruction by the instruction identification code, each field for specifying the operand of the instruction (see FIG. 2). The following three processes are performed within one cycle based on the contents of

まず、命令解釈制御回路は、1つ目の処理として、コプロセッサ用命令コードフィールドの内容つまり演算種別を、制御信号線3040を介してコプロセッサの論理制御回路に伝達する。この際にデスティネーションレジスタ指定フィールドの内容は伝達しない。従って論理制御回路もそのデスティネーションレジスタ指定フィールドの内容を保持する構成を有しない。   First, as the first process, the instruction interpretation control circuit transmits the contents of the instruction code field for the coprocessor, that is, the operation type, to the logic control circuit of the coprocessor via the control signal line 3040. At this time, the contents of the destination register designation field are not transmitted. Therefore, the logic control circuit does not have a configuration for holding the contents of the destination register designation field.

また、命令解釈制御回路は、2つ目の処理として、ソースレジスタ指定フィールドの内容により指定された1つのレジスタからデータ伝送路3075上にデータを出力させるようにするための各制御信号を、制御信号線3030を介してレジスタバンク3500に与える。
コプロセッサの論理制御回路は、主プロセッサから伝達される演算処理の種別の指定に応じて、レジスタバンク4500へのデータ転送制御や、演算器4200に、特定の演算処理を実行させる制御を行うが、演算処理が終了した場合であっても主プロセッサへの演算終了の旨の信号の通知は行わない。従って制御信号線4040は省かれる。なお、演算器4200は演算処理が終了すると演算結果であるデータをデータ伝送路3070上に出力する。
In addition, the instruction interpretation control circuit controls each control signal for causing data to be output on the data transmission path 3075 from one register designated by the contents of the source register designation field as a second process. The signal is supplied to the register bank 3500 through the signal line 3030.
The logic control circuit of the coprocessor performs data transfer control to the register bank 4500 and control for causing the arithmetic unit 4200 to execute specific arithmetic processing according to the designation of the type of arithmetic processing transmitted from the main processor. Even when the arithmetic processing is finished, the main processor is not notified of the signal indicating the end of the computation. Therefore, the control signal line 4040 is omitted. Note that the arithmetic unit 4200 outputs the data as the operation result onto the data transmission path 3070 when the arithmetic processing is completed.

また、命令解釈制御回路は、3つ目の処理として、そのxexec命令についてのデスティネーションレジスタ指定フィールドの内容により指定された1つのレジスタに、データ伝送路3070上のデータを書き込ませるための各制御信号を、制御信号線3030を介してそのレジスタ及びセレクタ3650〜セレクタ3665に与える。この結果として、そのxexec命令より数サイクル前に解釈したxexec命令に対応するコプロセッサによる演算結果が、主プロセッサのレジスタ内に書き込まれることになる。   In addition, as the third process, the instruction interpretation control circuit performs each control for writing data on the data transmission path 3070 to one register designated by the contents of the destination register designation field for the xexec instruction. A signal is supplied to the registers and selectors 3650 to 3665 through a control signal line 3030. As a result, the operation result by the coprocessor corresponding to the xexec instruction interpreted several cycles before the xexec instruction is written into the register of the main processor.

なお、命令解釈制御回路は、1サイクル内で1つのレジスタへの書込みを行えば足りるため、特に、xexec命令に対応してのコプロセッサの演算結果をあるレジスタに書き込ませるデータ転送期間と、他の一般の演算命令に対応しての内部演算器による演算結果を別のレジスタに書き込ませるデータ転送期間とを調整する必要はない。
また、命令解釈制御回路は、実施の形態1のいくつかの変形例で示したような制御信号線3040を介しての受け取り可能の旨の信号の送信を行わない。従って、コプロセッサ側においても受け取り可能の旨の信号を待つような制御は行わない。
Since the instruction interpretation control circuit only needs to write to one register within one cycle, in particular, a data transfer period in which the operation result of the coprocessor corresponding to the xexec instruction is written to a certain register, and the like. There is no need to adjust the data transfer period in which the operation result of the internal operation unit corresponding to the general operation instruction is written to another register.
Further, the instruction interpretation control circuit does not transmit a signal indicating that reception is possible via the control signal line 3040 as shown in some modified examples of the first embodiment. Therefore, the coprocessor side does not perform control to wait for a signal indicating that it can be received.

このような実施の形態2に係る演算処理装置の処理方式によれば、命令メモリに格納されたプログラムが、コプロセッサ演算命令の多数連続してなる部分を含む場合において、主プロセッサ側にもコプロセッサ側にも特に各命令のデスティネーションレジスタ指定フィールドの内容を複数保持するための機構を有さなくても、適切に処理を実行することができるようになる。   According to the processing method of the arithmetic processing apparatus according to the second embodiment, when the program stored in the instruction memory includes a large number of consecutive coprocessor arithmetic instructions, the main processor also has a coprocessor. Even if the processor does not have a mechanism for holding a plurality of contents of the destination register designation field of each instruction, the process can be appropriately executed.

但し、プログラム中で、あるコプロセッサ演算命令のオペランドで指定したデスティネーションデータを格納すべきレジスタには、そのコプロセッサ演算命令に先行するコプロセッサ演算命令が存在して、かつ、その先行するコプロセッサ演算命令に対応したコプロセッサによる演算結果がデータ伝送路3070上に出力されている場合でなければ、有効な値は格納されていないので、例えば、プログラム作成者がプログラムを直接記述する場合には、そのことを意識してコプロセッサ演算の実行に要するサイクル数を把握した上でプログラムを記述する必要がある。
<実施の形態3>
以下、本発明の実施の形態3に係るオブジェクトコード生成装置について説明する。
However, in the program, the register that should store the destination data specified by the operand of a certain coprocessor operation instruction has a coprocessor operation instruction that precedes the coprocessor operation instruction, and the preceding coprocessor operation instruction exists. If the operation result by the coprocessor corresponding to the processor operation instruction is not output on the data transmission path 3070, the effective value is not stored. For example, when the program creator directly describes the program With this in mind, it is necessary to describe the program after understanding the number of cycles required to execute coprocessor operations.
<Embodiment 3>
Hereinafter, an object code generation device according to Embodiment 3 of the present invention will be described.

実施の形態3に係るオブジェクトコード生成装置は、コンピュータとソフトウェアとにより実現される、いわゆるコンパイラであり、実施の形態1で示したような演算処理装置により実行される命令列からなるプログラムであるオブジェクトコードを、高級言語で記述されたソースコードに基づいて生成する命令列生成装置である。
図14は、実施の形態3に係るオブジェクトコード生成装置の構成を示すブロック図である。なお、同図には、ソースコード7001及びオブジェクトコード7002も付記している。
The object code generation device according to the third embodiment is a so-called compiler realized by a computer and software, and is an object that is a program including an instruction sequence executed by the arithmetic processing device as described in the first embodiment. This is an instruction sequence generation device that generates code based on source code written in a high-level language.
FIG. 14 is a block diagram illustrating a configuration of the object code generation device according to the third embodiment. In the figure, source code 7001 and object code 7002 are also appended.

同図に示すように、オブジェクトコード生成装置7000は、機能面に着目すれば、ソースコード取得部7010、命令コード記憶部7020及びオブジェクトコード生成部7030を備えている。
ここで、ソースコード取得部7010は、例えばハードディスク装置等に記録されているソースコード7001を、メモリに読み込んで参照する機能を有する。
As shown in the figure, the object code generation device 7000 includes a source code acquisition unit 7010, an instruction code storage unit 7020, and an object code generation unit 7030 in terms of functional aspects.
Here, the source code acquisition unit 7010 has a function of reading and referencing a source code 7001 recorded in, for example, a hard disk device or the like into a memory.

命令コード記憶部7020は、オブジェクトコードの実行環境となる演算処理装置における主プロセッサの命令セットに含まれる全命令コードに係る情報を記憶しており、更にコプロセッサ演算命令に対応して、演算種別毎つまりコプロセッサ用命令コード毎に、コプロセッサが演算実行に要するサイクル数を示すサイクル情報を記憶している。なお、全命令コードに係る情報の中には、図2に示したフォーマットのコプロセッサ演算命令を生成するために必要な情報も含まれ、高級言語においてそのコプロセッサ演算命令を指定するための関数の定義情報も含まれる。   The instruction code storage unit 7020 stores information related to all instruction codes included in the instruction set of the main processor in the arithmetic processing apparatus serving as the execution environment of the object code, and further, according to the coprocessor arithmetic instruction, the arithmetic type For each coprocessor instruction code, cycle information indicating the number of cycles required for the coprocessor to execute an operation is stored. It should be noted that the information relating to all instruction codes includes information necessary for generating the coprocessor arithmetic instruction in the format shown in FIG. 2, and a function for designating the coprocessor arithmetic instruction in a high-level language. Definition information is also included.

オブジェクトコード生成部7030は、ソースコード取得部7010を介してソースコードを参照して、一般のコンパイラと同様に、命令コードに係る情報に基づいて、ソースコード中の各文を、命令列に変換する。但し、一般のコンパイラとは異なる処理として、上述したサイクル情報を参照して、コプロセッサ演算命令を解釈した後から、コプロセッサ演算命令のオペランドで指定したデスティネーションデータを格納するためのレジスタにコプロセッサによる演算結果が反映されるまでのサイクル数を特定し、その間の期間でそのレジスタが他の命令の入力用として用いられないように、変換後の命令列の順序を調整する処理を行う。   The object code generation unit 7030 refers to the source code via the source code acquisition unit 7010, and converts each sentence in the source code into an instruction sequence based on information related to the instruction code, as in a general compiler. To do. However, as a process different from a general compiler, the cycle information described above is referred to, the coprocessor operation instruction is interpreted, and then the destination data specified by the coprocessor operation instruction operand is stored in the register. The number of cycles until the calculation result by the processor is reflected is specified, and processing for adjusting the order of the converted instruction sequence is performed so that the register is not used for input of other instructions during the period.

図15は、ソースコードの例を示す図である。ここでは、C言語の例を示している。
行L51は、data0からdata5までの変数の宣言であり、行L52は、data3を引数としてfunctionX01というコプロセッサ演算用として予め定められている関数を呼び出してその演算結果をdata0に設定する旨を示す文である。
また、行L53は、data0とdata3との和をdata4に設定する旨を示す文であり、行L54は、data5とdata1との和をdata5に設定する旨を示す文であり、行L55は、data5とdata2との和をdata5に設定する旨を示す文である。
FIG. 15 is a diagram illustrating an example of source code. Here, an example of C language is shown.
Line L51 is a declaration of a variable from data0 to data5, and line L52 indicates that a function predetermined as a function for coprocessor calculation called functionX01 is called with data3 as an argument and the calculation result is set to data0. It is a sentence.
Line L53 is a sentence indicating that the sum of data0 and data3 is set to data4, line L54 is a sentence indicating that the sum of data5 and data1 is set to data5, and line L55 is This is a statement indicating that the sum of data5 and data2 is set to data5.

図16は、図15に例示するソースコードに基づいて生成されるオブジェクトコードの例を示す図である。なお、説明の便宜上、オブジェクトコードは、ニーモニック表記で表している。ここで、add命令は、第2番目のオペランドで指定されたレジスタの内容と第3番目のオペランドで指定されたレジスタの内容とを加算してその結果を第1番目のオペランドで指定されたレジスタに格納する命令であるものとする。   FIG. 16 is a diagram illustrating an example of object code generated based on the source code illustrated in FIG. For convenience of explanation, the object code is expressed in mnemonic notation. Here, the add instruction adds the contents of the register specified by the second operand and the contents of the register specified by the third operand, and the result is the register specified by the first operand. It is assumed that the instruction is stored in

この例では、オブジェクトコード生成装置7000が、変数data0〜data5をそれぞれレジスタR0〜R5に割り付けた例であり、オブジェクトコード生成装置7000は、ソースコードの行L52のfunctionX01を、コプロセッサ用命令コードがOP01であるコプロセッサ演算命令に変換して、行L21を生成する。行L21のxexec命令は、コプロセッサにおける演算処理の種別としてOP01を指定し、コプロセッサの演算に用いられるソースデータを格納している主プロセッサ側のレジスタとしてレジスタR3を指定し、コプロセッサによるその演算結果を格納するための主プロセッサ側のレジスタとしてレジスタR0を指定した命令である。   In this example, the object code generation device 7000 assigns the variables data0 to data5 to the registers R0 to R5, respectively. The object code generation device 7000 stores the function X01 in the line L52 of the source code and the instruction code for the coprocessor. It is converted into a coprocessor operation instruction which is OP01, and a row L21 is generated. The xexec instruction in line L21 designates OP01 as the type of arithmetic processing in the coprocessor, designates register R3 as a register on the main processor side that stores source data used for the coprocessor arithmetic, This is an instruction that designates the register R0 as a register on the main processor side for storing the operation result.

即ち、オブジェクトコード生成装置7000は、ソースコード中にこのfunctionX01関数を発見すると、コプロセッサ用命令コードがOP01であるxexec命令に置き換える。この関数の引数である変数に割り付けられたレジスタが、ソースデータを格納している主プロセッサ側のレジスタを指定するオペランドに変換され、関数の戻り値である変数に割り付けられたレジスタが、コプロセッサによる演算結果を格納するための主プロセッサ側のレジスタを指定するオペランドに変換される。   That is, when the object code generation device 7000 finds the functionX01 function in the source code, the object code generation device 7000 replaces it with a xexec instruction whose coprocessor instruction code is OP01. The register allocated to the variable that is the argument of this function is converted to an operand that specifies the register on the main processor side that stores the source data, and the register allocated to the variable that is the return value of the function is Is converted into an operand that specifies a register on the main processor side for storing the result of the operation.

ここでは、コプロセッサ用命令コードがOP01であれば、演算に必要なサイクル数は3であるものとする(図14参照)。このため、ソースコードの行L53に対応する命令として、行L21の次に、「add R4,R0,R3」というadd命令が生成されるはずであるが、その3というサイクル数分だけ後にならないとコプロセッサ演算命令の演算結果がレジスタR0には格納されていないので、そのadd命令は行L24の位置に生成される。その代わりに、図15の行L54と行L55の各文に対応する各命令が、行L22と行L23の位置に生成される。   Here, if the instruction code for the coprocessor is OP01, the number of cycles required for the operation is assumed to be 3 (see FIG. 14). Therefore, an add instruction “add R4, R0, R3” should be generated next to the line L21 as an instruction corresponding to the line L53 of the source code. Since the operation result of the coprocessor operation instruction is not stored in the register R0, the add instruction is generated at the position of the row L24. Instead, instructions corresponding to the statements in the lines L54 and L55 in FIG. 15 are generated at the positions of the lines L22 and L23.

従って、このオブジェクトコード生成装置7000によれば、ソースコードを記述するプログラム作成者は、特にコプロセッサ演算命令に対応してコプロセッサが演算を完了するまでに要するサイクル数を意識しなくても、適切なオブジェクトコードを得ることができるようになる。なお、図15の例では、結局、行L54の文と行L55の文とを行L53の文より先に実行することになったが、データの依存関係等によっては、このような文の順番の入れ替えが不可能となる場合もある。その場合には、オブジェクトコード生成装置7000は、必要数のnop命令を、コプロセッサ演算命令の後であってそのコプロセッサ演算命令の演算結果を用いて実行されるべき他の演算命令の前に、挿入することにより、コプロセッサ演算命令に対応する演算結果が格納されていないレジスタを入力とする演算命令が含まれないようにしたオブジェクトコードを生成する。
<補足>
以上、本発明に係る演算処理装置及びオブジェクトコード生成装置の実施の形態について説明したが、本発明は、上述の実施の形態そのものに限定されることはない。即ち、各実施の形態で示した演算処理装置又はオブジェクトコード生成装置は、以下に示すように部分的に変形してもよい。
(1)実施の形態1では、主プロセッサがコプロセッサ演算命令のデスティネーションレジスタ指定フィールドの内容をコプロセッサ側に伝達しておき、コプロセッサ側でその内容を保持して演算終了時点で演算終了の旨の通知にその内容を含めて主プロセッサに伝達することとしたが、主プロセッサが、コプロセッサ演算命令のデスティネーションレジスタ指定フィールドの内容を伝達せず自ら記憶保持しておき、そのコプロセッサ演算命令に対応する演算結果がコプロセッサから返却される際に演算終了の旨の信号を受けると、返却された演算結果を、自ら記憶保持していた内容で指定されるレジスタに格納することとしてもよい。このデスティネーションレジスタ指定フィールドの内容は例えばFIFOバッファに記憶しておくとよい。
Therefore, according to this object code generation device 7000, the program creator who describes the source code does not need to be aware of the number of cycles required for the coprocessor to complete the operation in response to the coprocessor operation instruction. Appropriate object code can be obtained. In the example of FIG. 15, the sentence in the line L54 and the sentence in the line L55 are eventually executed before the sentence in the line L53. It may not be possible to replace them. In that case, the object code generation device 7000 may add the necessary number of nop instructions after the coprocessor operation instruction and before another operation instruction to be executed using the operation result of the coprocessor operation instruction. , The object code is generated so as not to include an operation instruction that inputs a register in which an operation result corresponding to the coprocessor operation instruction is not stored.
<Supplement>
The embodiments of the arithmetic processing device and the object code generation device according to the present invention have been described above, but the present invention is not limited to the above-described embodiments themselves. That is, the arithmetic processing device or the object code generation device shown in each embodiment may be partially modified as described below.
(1) In the first embodiment, the main processor transmits the contents of the destination register designation field of the coprocessor operation instruction to the coprocessor, holds the content on the coprocessor, and ends the operation when the operation ends. However, the main processor does not transmit the contents of the destination register designation field of the coprocessor operation instruction, and stores and holds the contents of the coprocessor. When the operation result corresponding to the operation instruction is returned from the coprocessor and a signal indicating the end of the operation is received, the returned operation result is stored in a register designated by the content stored and held by itself. Also good. The contents of the destination register designation field may be stored in a FIFO buffer, for example.

また更に、コプロセッサ側から演算終了の旨の信号の伝達を行わない方式にしてもよく、この場合には、主プロセッサの命令解釈制御回路は、コプロセッサ演算命令に対応する演算結果がコプロセッサから返却されるまでのタイミングを演算種別に応じて予め記憶しておいて、サイクル数をカウントすることにより、返却された演算結果を取得するタイミングを検知して、その演算結果を、自ら記憶保持していた内容で指定されるレジスタに格納することとしてもよい。そのカウントに係る制御の仕方としては、コプロセッサ演算命令解釈時に演算種別に応じて適切なカウント値を設定しておき、1サイクル経過の度に1つカウンタ値を減算し、カウンタ値が例えば0になったときに、データ伝送路3070上のデータをレジスタに書き込むように制御することとしてもよい。   Furthermore, a method may be used in which a signal indicating the end of the operation is not transmitted from the coprocessor side. In this case, the instruction interpretation control circuit of the main processor displays the operation result corresponding to the coprocessor operation instruction as a coprocessor. The timing until the return is returned is stored in advance according to the operation type, and by counting the number of cycles, the timing for acquiring the returned operation result is detected, and the operation result is stored and held by itself. It may be stored in a register specified by the contents. As a control method related to the count, an appropriate count value is set according to the operation type when the coprocessor operation instruction is interpreted, and one counter value is subtracted every time one cycle elapses. Then, the data on the data transmission path 3070 may be controlled to be written in the register.

なお、コプロセッサ演算命令を解釈した後に、何サイクルでコプロセッサによる演算結果がデータ伝送路3070上に現れるかを、コプロセッサ演算命令のコプロセッサ命令用コードフィールドの内容となる演算種別と対応させて予め命令解釈制御回路に記憶させておくために設計段階で考慮すべき事項は、主プロセッサ内のレジスタのデータがコプロセッサの演算器4200に到達するまでのサイクル数と、演算種別毎にコプロセッサの演算器4200にて行われる演算に要するサイクル数と、コプロセッサの演算器4200から演算結果が主プロセッサのレジスタバンクにまで到達するサイクル数とである。
(2)実施の形態1の変形例において、コプロセッサの動作周波数が主プロセッサの動作周波数の2倍である場合について示したが、2倍に限られることはなく例えば4倍等であってもよいし、1/2倍である場合について示したが、1/2倍に限られることはなく例えば1/4倍等であってもよい。
(3)実施の形態1、2に係る各演算処理装置では、命令解釈制御回路が、コプロセッサ演算命令のコプロセッサ用命令コードフィールドの内容である演算種別をコプロセッサの論理制御回路に伝達することとし、その解釈はコプロセッサの論理制御回路が行うこととしたが、解釈の分担はこれに限定されることはなく、例えば、命令解釈制御回路がコプロセッサ用命令コードフィールドの内容を解釈することによって演算を特定してその旨を示す信号を論理制御回路に伝達して、論理制御回路はその指定された信号で特定される演算を演算器4200に実行させることとしてもよい。
(4)実施の形態1〜3で示したコプロセッサ演算命令は、ソースデータを格納するレジスタ及びデスティネーションデータを格納するレジスタはそれぞれ1つずつしか指定できないものとしたが、これらを複数指定できるようにしても良い。この場合には、演算処理装置における主プロセッサからコプロセッサへのデータ伝送路とコプロセッサから主プロセッサへのデータ伝送路とをそれぞれ複数設けて、それに応じてデータ転送の制御を行うとよい。
(5)実施の形態1で図5〜図13を用いて説明したコプロセッサ演算命令に係る各処理、例えば命令データ取得処理や命令デコード処理やコプロセッサへのデータ受け渡し処理等は、必ずしもそれぞれ1サイクルで実行しなければならないものではなく、例えば命令データ取得処理と命令デコード処理とを1サイクルで実行しても差し支えない。
(6)実施の形態1、2に係る各演算処理装置において、コプロセッサは、命令メモリ5000やデータメモリ6000内のデータを直接アクセスしていないが、専用のバスや命令を設けアクセス可能となるように構成してもよい。
(7)実施の形態1、2に係る各演算処理装置では、コプロセッサ演算命令で指定するソースデータを格納するレジスタとデスティネーションデータを格納するレジスタとはいずれも主プロセッサ側のレジスタとしたが、演算処理装置がコプロセッサを複数有することとし、あるコプロセッサAに演算を行わせるためのコプロセッサ演算命令において指定するソースデータ及びデスティネーションデータを格納するレジスタとして、別のコプロセッサBのレジスタを指定可能にしてもよい。この場合には、コプロセッサ演算命令に対応して主プロセッサの命令解釈制御回路が行ったレジスタバンク3500への制御内容を、そのまま、コプロセッサBのレジスタバンクへの制御内容として適用するとよい。また、そのコプロセッサBのレジスタバンクへの制御は、命令解釈制御回路からの指示を受けてコプロセッサBにおける論理制御回路が実行することとしてもよい。
(8)実施の形態1のいくつかの変形例において、主プロセッサが、コプロセッサの演算結果の受け取り準備ができたときに、受け取り可能の旨の信号を送出することとしたが、この受け取り可能の信号の代わりに、コプロセッサの演算結果をレジスタに書き込んだ直後に書込完了の旨の信号を送出することとし、コプロセッサ側においては、書込完了の旨の信号を受信するまでは演算結果のデータ伝送路3070上への出力を継続するようにしてもよい。
(9)実施の形態1、2で示した主プロセッサとコプロセッサとを含む演算処理装置は、半導体集積回路として1つの半導体チップ上に構成されていてもよく、その中には、更に命令メモリが含まれていてもよく、更にデータメモリが含まれていてもよい。
(10)実施の形態3では、オブジェクトコード生成装置は、C言語等の高級言語で記述されたソースコードに基づいて、オブジェクトコードを生成するいわゆるコンパイラであることとしたが、オブジェクトコード生成装置は例えばいわゆるアセンブラやアセンブラオプティマイザ等であってもよく、ソースコードは、例えば、実施の形態1で示した演算処理装置の命令セットに対応した命令列からなるコードであってもよく、オブジェクトコード生成装置がそのコードの順序を変更して、コプロセッサ演算命令に対応する演算結果が格納されていないレジスタを入力とする演算命令が含まれないようにしたオブジェクトコード、つまりコプロセッサ演算命令の演算結果を用いる演算命令をそのコプロセッサ演算命令の演算結果がレジスタに格納されるはずのサイクル数だけそのコプロセッサ演算命令より後にずらして配置してなるオブジェクトコードを、生成するようにしてもよい。
In addition, after interpreting the coprocessor operation instruction, the number of cycles in which the operation result by the coprocessor appears on the data transmission path 3070 is associated with the operation type that is the content of the coprocessor instruction code field of the coprocessor operation instruction. In order to store the instruction in the instruction interpretation control circuit in advance, the items to be considered in the design stage are the number of cycles until the register data in the main processor reaches the arithmetic unit 4200 of the coprocessor and the number of operations for each operation type. The number of cycles required for the calculation performed by the processor 4200 of the processor and the number of cycles in which the calculation result reaches the register bank of the main processor from the calculator 4200 of the coprocessor.
(2) In the modification of the first embodiment, the case where the operating frequency of the coprocessor is twice the operating frequency of the main processor has been described. However, the operating frequency is not limited to twice. In addition, although the case of ½ times has been described, it is not limited to ½ times, and may be ¼ times, for example.
(3) In each arithmetic processing unit according to the first and second embodiments, the instruction interpretation control circuit transmits the operation type that is the content of the coprocessor instruction code field of the coprocessor operation instruction to the logic control circuit of the coprocessor. The interpretation is performed by the logic control circuit of the coprocessor, but the sharing of the interpretation is not limited to this. For example, the instruction interpretation control circuit interprets the contents of the instruction code field for the coprocessor. Thus, the operation may be specified and a signal indicating that may be transmitted to the logic control circuit, and the logic control circuit may cause the calculator 4200 to execute the operation specified by the designated signal.
(4) In the coprocessor operation instructions shown in the first to third embodiments, only one register for storing source data and one register for storing destination data can be specified, but a plurality of these can be specified. You may do it. In this case, it is preferable to provide a plurality of data transmission paths from the main processor to the coprocessor and a data transmission path from the coprocessor to the main processor in the arithmetic processing unit, and control data transfer accordingly.
(5) Each process related to the coprocessor operation instruction described in Embodiment 1 with reference to FIGS. 5 to 13, for example, an instruction data acquisition process, an instruction decode process, a data transfer process to the coprocessor, etc. For example, the instruction data acquisition process and the instruction decode process may be executed in one cycle.
(6) In each arithmetic processing unit according to the first and second embodiments, the coprocessor does not directly access the data in the instruction memory 5000 or the data memory 6000, but can be accessed by providing a dedicated bus or instruction. You may comprise.
(7) In each arithmetic processing unit according to the first and second embodiments, the register for storing the source data and the register for storing the destination data specified by the coprocessor arithmetic instruction are both registers on the main processor side. The arithmetic processing unit has a plurality of coprocessors, and a register of another coprocessor B is used as a register for storing source data and destination data specified in a coprocessor arithmetic instruction for causing a certain coprocessor A to perform arithmetic operations. May be specified. In this case, the control contents to the register bank 3500 performed by the instruction interpretation control circuit of the main processor corresponding to the coprocessor operation instruction may be applied as the control contents to the register bank of the coprocessor B as it is. The control of the register bank of the coprocessor B may be executed by the logic control circuit in the coprocessor B in response to an instruction from the instruction interpretation control circuit.
(8) In some variations of the first embodiment, when the main processor is ready to receive the calculation result of the coprocessor, it sends a signal indicating that it can be received. Instead of this signal, the write completion signal is sent immediately after the coprocessor operation result is written to the register. On the coprocessor side, the calculation is completed until the write completion signal is received. You may make it continue the output on the data transmission path 3070 of a result.
(9) The arithmetic processing unit including the main processor and the coprocessor shown in the first and second embodiments may be configured on one semiconductor chip as a semiconductor integrated circuit, and further includes an instruction memory. May be included, and a data memory may be further included.
(10) In the third embodiment, the object code generation device is a so-called compiler that generates object code based on source code described in a high-level language such as C language. For example, a so-called assembler or assembler optimizer may be used, and the source code may be, for example, a code including an instruction sequence corresponding to the instruction set of the arithmetic processing apparatus described in the first embodiment, or an object code generation apparatus. Changes the order of the codes so that it does not include an operation instruction that inputs a register that does not store the operation result corresponding to the coprocessor operation instruction, that is, the operation result of the coprocessor operation instruction. The operation result of the coprocessor operation instruction is registered in the operation instruction to be used. The object code formed by staggered after the number of cycles by the coprocessor calculation instruction that should be stored, may be generated.

なお、実施の形態2で示した演算処理装置が実行可能なプログラムであってコプロセッサ演算命令を含むものを生成する方法としても、プログラム作成者が直接的にプログラムを記述する他に、実施の形態3で示したオブジェクトコード生成装置からコプロセッサ演算命令に関連して命令順序を変更する機能を省略したものによって、生成することとしてもよい。
(11)実施の形態3で示したオブジェクトコード生成装置の命令コード記憶部7020に記憶されている情報のうち、サイクル情報を他のコプロセッサに対応した内容のものに切り替えられるようにしてもよい。これにより、このオブジェクトコード生成装置は、演算処理装置におけるコプロセッサを他のものに切り替えた場合に対応したオブジェクトコードの生成を行うことができるようになる。
(12)実施の形態3で示したオブジェクトコード生成装置が、コプロセッサ演算命令を含むオブジェクトコードを生成する場合においては、そのコプロセッサ演算命令で指定するソースデータを格納するレジスタとデスティネーションデータを格納するレジスタとはいずれも主プロセッサ側のレジスタであることとしたが、主プロセッサ側のレジスタに限られることはなく、複数のコプロセッサを有する演算処理装置を対象にしたオブジェクトコードを生成するために、あるコプロセッサAに演算を行わせるための演算のソースデータ及びデスティネーションデータを格納するレジスタとして、別のコプロセッサBのレジスタを指定したコプロセッサ演算命令を出力することとしてもよい。
(13)実施の形態3で示したオブジェクトコード生成装置において実行される、命令コード記憶部に記憶された情報とソースコードとに基づいてオブジェクトコードを生成する処理を、定義しているコンピュータプログラムを、記録媒体に記録し又は各種通信路等を介して、流通させ頒布することもできる。このような記録媒体には、フラッシュメモリ、ICカード、光ディスク、フレキシブルディスク、ROM等がある。流通、頒布されたコンピュータプログラムはコンピュータに読み出され得るメモリ等に格納されることにより利用に供され、そのコンピュータはそのコンピュータプログラムを実行して実施の形態3で示したオブジェクトコード生成装置の各機能を実現するものとなる。
(14)実施の形態1、2で示したコプロセッサは、演算器4200内に複数の要素演算器と選択器を含み、要素演算器は加算、減算、乗算等の演算を行い、コプロセッサの命令やレジスタの設定により、動的に演算の種類を変更できるように構成してもよい。また、要素演算器同士は互いに接続され、主プロセッサ又はコプロセッサ内のレジスタ及び他の要素演算器の演算結果を、選択器を介して、要素演算器に入力可能にし、コプロセッサの命令やレジスタの設定により、その入力先を動的に変更できるようにしてもよい。
(15)実施の形態1、2で示した演算処理装置は、複数のコプロセッサで構成されていてもよく、コプロセッサの演算器4200へ入力されるソースデータとして、主プロセッサのレジスタの内容が用いられることに限られず、自コプロセッサ又は他コプロセッサのレジスタの内容が用いられるようにしてもよく、コプロセッサの命令やレジスタの設定により、その入力先となるソースデータの格納場所を動的に変更できるようにしてもよい。
In addition, as a method for generating a program that can be executed by the arithmetic processing unit shown in the second embodiment and includes a coprocessor arithmetic instruction, the program creator directly describes the program in addition to describing the program. The object code generation apparatus shown in the third embodiment may be generated by a function in which the function of changing the instruction order in relation to the coprocessor operation instruction is omitted.
(11) Of the information stored in the instruction code storage unit 7020 of the object code generation device shown in the third embodiment, the cycle information may be switched to the content corresponding to another coprocessor. . Thus, the object code generation device can generate an object code corresponding to a case where the coprocessor in the arithmetic processing device is switched to another one.
(12) When the object code generation device shown in the third embodiment generates an object code including a coprocessor operation instruction, a register for storing source data designated by the coprocessor operation instruction and destination data are stored. The registers to be stored are all registers on the main processor side, but are not limited to the registers on the main processor side, and to generate object code for an arithmetic processing unit having a plurality of coprocessors Alternatively, a coprocessor operation instruction designating a register of another coprocessor B may be output as a register for storing source data and destination data of an operation for causing a certain coprocessor A to perform an operation.
(13) A computer program defining a process for generating an object code based on information stored in an instruction code storage unit and a source code, which is executed in the object code generation device shown in the third embodiment. It can also be recorded on a recording medium or distributed and distributed via various communication channels. Examples of such a recording medium include a flash memory, an IC card, an optical disk, a flexible disk, and a ROM. The computer program distributed and distributed is used by being stored in a memory or the like that can be read by the computer, and the computer executes the computer program to execute each of the object code generation apparatuses described in the third embodiment. The function will be realized.
(14) The coprocessors described in the first and second embodiments include a plurality of element calculators and selectors in the calculator 4200. The element calculator performs operations such as addition, subtraction, and multiplication, and the coprocessor The type of operation may be dynamically changed by setting an instruction or a register. In addition, the element arithmetic units are connected to each other, and the operation results of the registers in the main processor or the coprocessor and other element arithmetic units can be input to the element arithmetic unit via the selector. This setting may be used to dynamically change the input destination.
(15) The arithmetic processing units described in the first and second embodiments may be constituted by a plurality of coprocessors, and the contents of the main processor registers are used as source data input to the coprocessor arithmetic unit 4200. The register contents of the local coprocessor or another coprocessor may be used, and the storage location of the source data as the input destination is dynamically determined by the coprocessor instruction or register setting. It may be possible to change to

また、コプロセッサの演算器4200は加算、減算、乗算等の演算を行い、コプロセッサの命令やレジスタの設定により、演算器4200の演算を動的に変更できるようにしてもよい。更に、コプロセッサの論理制御回路4100は、特殊命令やレジスタの設定により、コプロセッサ演算命令のフォーマット等を動的に変更できるようにしてもよい。つまり、命令コード、入力先、出力先、演算等のビット割付のマッピングを動的に変更できるように構成してもよい。   In addition, the arithmetic unit 4200 of the coprocessor may perform operations such as addition, subtraction, and multiplication, and the operation of the arithmetic unit 4200 may be dynamically changed by setting the coprocessor instruction or register. Further, the coprocessor logic control circuit 4100 may be configured to dynamically change the format or the like of the coprocessor operation instruction by setting a special instruction or a register. In other words, the bit allocation mapping of the instruction code, input destination, output destination, operation, etc. may be dynamically changed.

本発明に係る演算処理装置は、各種コンピュータ、各種家電機器等のプログラム実行可能な機器に搭載され利用されるものである。   The arithmetic processing apparatus according to the present invention is installed and used in devices capable of executing programs such as various computers and various home appliances.

xexec命令を含むアセンブラプログラムの一部を例示する図である。It is a figure which illustrates a part of assembler program containing a xexec instruction. コプロセッサ演算命令(xexec命令)のフォーマットを示す図である。It is a figure which shows the format of a coprocessor arithmetic instruction (xexec instruction). 実施の形態1に係る演算処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an arithmetic processing device according to a first embodiment. レジスタバンク3500の構成を詳細に示す構成図である。3 is a configuration diagram showing a configuration of a register bank 3500 in detail. FIG. コプロセッサ演算命令に係る各処理についてのタイミングチャートである。It is a timing chart about each processing concerning a coprocessor operation instruction. 変形例1におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。10 is a timing chart for each process related to a coprocessor operation instruction in Modification 1; 変形例2におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。10 is a timing chart for each process related to a coprocessor operation instruction in Modification 2; 変形例2におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートであり、受け取り可能の旨を示す信号が遅れて発された場合の例を示す。It is a timing chart about each process which concerns on the coprocessor arithmetic instruction in the modification 2, and shows the example when the signal which shows that it can receive is issued with a delay. 変形例3におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。10 is a timing chart for each process related to a coprocessor operation instruction in Modification 3. 変形例3におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートであり、受け取り可能の旨を示す信号が遅れて発された場合の例を示す。It is a timing chart about each process which concerns on the coprocessor arithmetic instruction in the modification 3, and shows the example when the signal which shows that it can receive is issued late. 変形例4におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。10 is a timing chart for each process related to a coprocessor operation instruction in Modification 4; 変形例5におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。16 is a timing chart for each process related to a coprocessor operation instruction in Modification 5. 変形例6におけるコプロセッサ演算命令に係る各処理についてのタイミングチャートである。16 is a timing chart for each process related to a coprocessor operation instruction in Modification 6; 実施の形態3に係るオブジェクトコード生成装置の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of an object code generation device according to a third embodiment. ソースコードの例を示す図である。It is a figure which shows the example of a source code. 図15に例示するソースコードに基づいて生成されるオブジェクトコードの例を示す図である。It is a figure which shows the example of the object code produced | generated based on the source code illustrated in FIG. コプロセッサに演算を行わせるプログラムの例を示す図である。It is a figure which shows the example of the program which makes a coprocessor perform an operation.

符号の説明Explanation of symbols

21 命令識別コードフィールド
22 コプロセッサ用命令コードフィールド
23 デスティネーションレジスタ指定フィールド
24 ソースレジスタ指定フィールド
100 演算処理装置
3000 主プロセッサ
3010、3020、3030、3040、3050、4020、4040 制御信号線
3060、3065、3070、3075、3080、3085、4060、4065、5010 データ伝送路
3100 命令解釈制御回路
3200 演算器
3500、4500 レジスタバンク
3650、3651、3665、3670、3680 セレクタ
4000 コプロセッサ
4100 論理制御回路
4200 演算器
5000 命令メモリ
6000 データメモリ
7000 オブジェクトコード生成装置
7010 ソースコード取得部
7020 命令コード記憶部
7030 オブジェクトコード生成部
21 Instruction identification code field 22 Coprocessor instruction code field 23 Destination register designation field 24 Source register designation field 100 Arithmetic processing unit 3000 Main processor 3010, 3020, 3030, 3040, 3050, 4020, 4040 Control signal lines 3060, 3065, 3070, 3075, 3080, 3085, 4060, 4065, 5010 Data transmission path 3100 Instruction interpretation control circuit 3200 Arithmetic unit 3500, 4500 Register bank 3650, 3651, 3665, 3670, 3680 Selector 4000 Coprocessor 4100 Logic control circuit 4200 Arithmetic unit 5000 Instruction memory 6000 Data memory 7000 Object code generation device 7010 Source code acquisition unit 70 0 instruction code storage unit 7030 object code generator

Claims (12)

主プロセッサとコプロセッサとを備える演算処理装置であって、
前記主プロセッサは、命令を逐次解釈して命令に基づく制御を行う命令解釈制御部を有し、
前記命令解釈制御部は、前記コプロセッサに実行させるべき演算処理の種別と、当該演算処理の対象が格納されている第1記憶領域と、前記コプロセッサが演算処理をした結果が格納されるべき第2記憶領域とを指定する処理依頼命令を解釈することにより、前記コプロセッサに、第1記憶領域の内容を演算処理対象として当該種別の演算処理を実行させ、更に、前記コプロセッサによりなされた、ある演算処理の結果を、第2記憶領域に書き込む制御を行う
ことを特徴とする演算処理装置。
An arithmetic processing device comprising a main processor and a coprocessor,
The main processor has an instruction interpretation control unit that sequentially interprets instructions and performs control based on the instructions,
The instruction interpretation control unit should store a type of arithmetic processing to be executed by the coprocessor, a first storage area in which a target of the arithmetic processing is stored, and a result of arithmetic processing performed by the coprocessor By interpreting the processing request instruction designating the second storage area, the coprocessor is caused to execute the type of arithmetic processing with the contents of the first storage area as the arithmetic processing target, and is further performed by the coprocessor. An arithmetic processing device that performs control to write a result of a certain arithmetic processing into the second storage area.
前記主プロセッサは、演算命令に基づき演算を行う際に、演算の対象又は結果を格納するための複数のレジスタを有しており、
処理依頼命令は、第1記憶領域を指定するものとして前記複数のレジスタのうちいずれかを識別する第1データと、第2記憶領域を指定するものとして前記複数のレジスタのうちいずれかを識別する第2データとを含み、
前記命令解釈制御部は、前記コプロセッサに、処理依頼命令に含まれる第1データで識別されるレジスタの内容を演算処理対象として、当該処理依頼命令で指定される種別の演算処理を実行させ、更に、前記コプロセッサによりなされた、ある演算処理の結果を、当該処理依頼命令に含まれる第2データで識別されるレジスタに書き込む制御を行う
ことを特徴とする請求項1記載の演算処理装置。
The main processor has a plurality of registers for storing an operation target or a result when performing an operation based on an operation instruction;
The processing request instruction identifies first data for identifying one of the plurality of registers as specifying the first storage area, and identifies any of the plurality of registers as specifying the second storage area. Second data,
The instruction interpretation control unit causes the coprocessor to execute the type of arithmetic processing specified by the processing request instruction, with the contents of the register identified by the first data included in the processing request instruction as an arithmetic processing target. The arithmetic processing apparatus according to claim 1, further comprising a control for writing a result of a certain arithmetic processing performed by the coprocessor to a register identified by the second data included in the processing request instruction.
処理依頼命令は、コードフォーマットとして、前記主プロセッサが実行可能な命令群中で当該処理依頼命令を他の命令と識別するための命令識別コードを格納するフィールドの他に、コプロセッサに実行させるべき演算処理の種別を示すコプロセッサ用命令コードを格納するフィールドと、第1データを格納するフィールドと、第2データを格納するフィールドとの各々を含み、
前記命令解釈制御部は、処理依頼命令に含まれるコプロセッサ用命令コードを前記コプロセッサへと送出するよう制御し、当該処理依頼命令に含まれる第1データにより識別されるレジスタの内容であるソースデータを前記コプロセッサへと送出するよう制御し、更に、前記コプロセッサから送出された、ある演算処理の結果である結果データを取得して、当該処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御し、
前記コプロセッサは、前記主プロセッサから送出されたコプロセッサ用命令コードを解釈し、前記主プロセッサから送出されたソースデータを取得して演算処理対象にして、当該コプロセッサ用命令コードにより示されている種別の演算処理を実行し、当該演算処理の結果である結果データを前記主プロセッサへと送出する
ことを特徴とする請求項2記載の演算処理装置。
The processing request instruction should be executed by the coprocessor as a code format in addition to a field for storing an instruction identification code for identifying the processing request instruction from other instructions in the instruction group executable by the main processor. Each including a field for storing a coprocessor instruction code indicating a type of arithmetic processing, a field for storing first data, and a field for storing second data;
The instruction interpretation control unit controls to send a coprocessor instruction code included in a processing request instruction to the coprocessor, and is a source that is a content of a register identified by first data included in the processing request instruction Control to send data to the coprocessor, and obtain result data that is a result of a certain arithmetic processing sent from the coprocessor, and is identified by the second data included in the processing request instruction. Control to write to the register
The coprocessor interprets a coprocessor instruction code sent from the main processor, obtains source data sent from the main processor, and makes it an arithmetic processing target, which is indicated by the coprocessor instruction code. The arithmetic processing apparatus according to claim 2, further comprising: executing a certain type of arithmetic processing and sending result data as a result of the arithmetic processing to the main processor.
前記命令解釈制御部は、処理依頼命令に含まれるコプロセッサ用命令コードを前記コプロセッサへ送出する際に、当該処理依頼命令に含まれる第2データを当該コプロセッサ用命令コードと共に前記コプロセッサに送出し、
前記コプロセッサは、前記主プロセッサから送出されたコプロセッサ用命令コードにより示されている種別の演算処理を実行した結果である結果データを前記主プロセッサへと送出する際に、当該コプロセッサ用命令コードと共に前記主プロセッサから送出された第2データを、当該結果データと共に前記主プロセッサへと送出し、
前記命令解釈制御部は、前記コプロセッサから共に送出された結果データと第2データとを取得して、当該結果データを当該第2データにより識別されるレジスタに書き込むよう制御する
ことを特徴とする請求項3記載の演算処理装置。
When the instruction interpretation control unit sends the coprocessor instruction code included in the processing request instruction to the coprocessor, the instruction interpretation control unit sends the second data included in the processing request instruction to the coprocessor together with the coprocessor instruction code. Send out,
When the coprocessor sends to the main processor result data that is a result of executing the type of arithmetic processing indicated by the coprocessor instruction code sent from the main processor, the coprocessor instruction Sending the second data sent from the main processor together with the code to the main processor together with the result data;
The instruction interpretation control unit obtains result data and second data sent together from the coprocessor, and controls to write the result data in a register identified by the second data. The arithmetic processing apparatus according to claim 3.
前記命令解釈制御部が処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御する結果データは、前記コプロセッサから送出された、当該処理依頼命令で指定された演算処理の結果であり、
前記命令解釈制御部は、前記演算処理の各種別に対応付けて演算処理時間を示す時間情報を予め記憶しており、処理依頼命令に含まれていた前記コプロセッサ用命令コードと、前記ソースデータとを前記コプロセッサへと送出した後、当該コプロセッサ用命令コードで示される演算処理の種別に対応して記憶している時間情報が示す演算処理時間が経過した時に、前記コプロセッサから送出された結果データを、当該処理依頼命令に含まれていた第2データにより識別されたレジスタに書き込むよう制御する
ことを特徴とする請求項3記載の演算処理装置。
The result data for controlling the instruction interpretation control unit to write to the register identified by the second data included in the processing request instruction is the result of the arithmetic processing specified by the processing request instruction sent from the coprocessor. Yes,
The instruction interpretation control unit stores in advance time information indicating an operation processing time in association with each of the operation processes, the instruction code for the coprocessor included in the process request instruction, the source data, Is sent from the coprocessor when the computation processing time indicated by the time information stored corresponding to the type of computation processing indicated by the instruction code for the coprocessor has elapsed. 4. The arithmetic processing unit according to claim 3, wherein the result data is controlled to be written in a register identified by the second data included in the processing request instruction. 5.
前記命令解釈制御部は、前記コプロセッサから送出された結果データが前記処理依頼命令に含まれる第2データにより識別されるレジスタに書き込まれる際に、所定信号を前記コプロセッサへと送出するよう制御し、
前記コプロセッサは、前記所定信号が前記主プロセッサにより送出されたことを検知するまで、前記結果データの送出を継続し、当該検知後に当該結果データの送出を停止する
ことを特徴とする請求項3記載の演算処理装置。
The instruction interpretation control unit controls to send a predetermined signal to the coprocessor when result data sent from the coprocessor is written to a register identified by second data included in the processing request instruction. And
The coprocessor continues sending the result data until it detects that the predetermined signal is sent by the main processor, and stops sending the result data after the detection. The arithmetic processing unit described.
前記コプロセッサは、コプロセッサ用命令コードにより指定される各種別の演算処理について、演算処理開始からいずれも同一時間の経過後に結果データを出力するものであり、
前記命令解釈制御部が処理依頼命令に含まれる第2データにより識別されるレジスタに書き込むよう制御する結果データは、前記コプロセッサから送出された、当該処理依頼命令に先行して解釈した別の処理依頼命令により指定される演算処理の結果データであり、
前記命令解釈制御部は、処理依頼命令に第2データと共に含まれていた前記コプロセッサ用命令コードを前記コプロセッサへと送出した後、当該処理依頼命令に後続して別の命令を解釈する前に、前記コプロセッサが当該処理依頼命令に先行する処理依頼命令で指定した演算処理を行った結果として送出した結果データを、当該第2データにより識別されたレジスタに書き込むよう制御する
ことを特徴とする請求項3記載の演算処理装置。
The coprocessor outputs the result data after the lapse of the same time from the start of the arithmetic processing for various types of arithmetic processing specified by the instruction code for the coprocessor,
The result data that the command interpretation control unit controls to write to the register identified by the second data included in the processing request command is another process that is sent from the coprocessor and interpreted prior to the processing request command. It is the result data of the arithmetic processing specified by the request instruction,
The instruction interpretation control unit sends the coprocessor instruction code included in the processing request instruction together with the second data to the coprocessor and then interprets another instruction following the processing request instruction. In addition, the coprocessor is controlled to write the result data sent as a result of performing the arithmetic processing designated by the processing request instruction preceding the processing request command to the register identified by the second data. The arithmetic processing device according to claim 3.
前記命令解釈制御部が行うところの、処理依頼命令に含まれる第2データで識別されるレジスタに書き込む前記制御は、当該処理依頼命令で指定される種別の演算処理を前記コプロセッサに実行させた結果を当該レジスタに書き込む制御である
ことを特徴とする請求項2記載の演算処理装置。
The control performed by the instruction interpretation control unit, which writes to the register identified by the second data included in the processing request instruction, causes the coprocessor to execute the type of arithmetic processing specified by the processing request instruction. The arithmetic processing unit according to claim 2, wherein the result is control to write the result in the register.
前記演算処理装置は第1及び第2のコプロセッサを備え、
第2のコプロセッサは、複数のレジスタを有しており、
前記処理依頼命令は、第1のコプロセッサに実行させるべき演算処理の種別の指定と、第1記憶領域を指定するものとして第2のコプロセッサの複数のレジスタのうちいずれかを識別する第1データと、第2記憶領域を指定するものとして第2のコプロセッサの複数のレジスタのうちいずれかを識別する第2データとを含み、
前記命令解釈制御部は、第1のコプロセッサに、処理依頼命令に含まれる第1データで識別される、第2のコプロセッサ内のレジスタの内容を演算処理対象として、当該処理依頼命令で指定される種別の演算処理を実行させ、更に、第1のコプロセッサによりなされた、ある演算処理の結果を、当該処理依頼命令に含まれる第2データで識別される、第2のコプロセッサ内のレジスタに書き込む制御を行う
ことを特徴とする請求項1記載の演算処理装置。
The arithmetic processing unit includes first and second coprocessors,
The second coprocessor has a plurality of registers,
The processing request instruction specifies a type of arithmetic processing to be executed by the first coprocessor, and identifies a first storage area as a first storage area that identifies one of a plurality of registers of the second coprocessor. Data and second data identifying any one of the plurality of registers of the second coprocessor as specifying the second storage area;
The instruction interpretation control unit designates the contents of the register in the second coprocessor identified by the first data included in the processing request instruction to the first coprocessor as an operation processing target by the processing request instruction. In the second coprocessor identified by the second data included in the processing request instruction, and the result of the certain arithmetic processing performed by the first coprocessor is further executed. The arithmetic processing unit according to claim 1, wherein control for writing to the register is performed.
入力されるデータに基づいて、クレーム1の演算処理装置にコプロセッサと共に備えられている主プロセッサに実行させるための機械語の命令列を生成する命令列生成装置であって、
記憶手段と、
入力されたデータを取得する入力データ取得手段と、
前記入力されたデータに基づいて、コプロセッサに実行させるべき演算処理の種別と、当該演算処理の対象が格納されている、当該コプロセッサの外部の第1記憶領域と、前記コプロセッサが演算処理をした結果が格納されるべき、当該コプロセッサの外部の第2記憶領域とを指定する処理依頼命令を含む機械語の命令列を生成し、前記記憶手段に当該命令列を記録する命令列生成手段とを備える
ことを特徴とする命令列生成装置。
An instruction sequence generator for generating a machine language instruction sequence to be executed by a main processor provided with a coprocessor in an arithmetic processing unit of claim 1 based on input data,
Storage means;
Input data acquisition means for acquiring input data;
Based on the input data, the type of arithmetic processing to be executed by the coprocessor, a first storage area outside the coprocessor in which the target of the arithmetic processing is stored, and the coprocessor performs arithmetic processing. Generating a command sequence in machine language including a processing request command for designating a second storage area outside the coprocessor in which the result of the operation should be stored, and recording the command sequence in the storage means An instruction sequence generation device.
前記命令列生成手段により生成される処理依頼命令は、コードフォーマットとして、前記主プロセッサが実行可能な命令群中で当該処理依頼命令を他の命令と識別するための命令識別コードを格納するフィールドの他に、コプロセッサに実行させるべき演算処理の種別を示すコプロセッサ用命令コードを格納するフィールドと、第1記憶領域を指定するものとして、前記主プロセッサが有する複数のレジスタのうちのいずれかを識別する第1データを格納するフィールドと、第2記憶領域を指定するものとして、前記主プロセッサが有する複数のレジスタのうちのいずれかを識別する第2データを格納するフィールドとの各々を含む
ことを特徴とする請求項10記載の命令列生成装置。
The processing request instruction generated by the instruction sequence generation means is a code format of a field for storing an instruction identification code for identifying the processing request instruction from other instructions in an instruction group executable by the main processor. In addition, a field for storing a coprocessor instruction code indicating the type of arithmetic processing to be executed by the coprocessor, and one of a plurality of registers included in the main processor as a first storage area are designated. Including a field for storing first data to be identified, and a field for storing second data for identifying any one of the plurality of registers of the main processor as a second storage area. The instruction sequence generation device according to claim 10.
前記命令列生成装置は、更に、コプロセッサが実行可能な演算処理の各種別に対応付けて、演算処理時間を示す時間情報を予め記憶している演算時間管理手段を含み、
前記命令列生成手段は、生成した処理依頼命令に含まれる第2データで識別される前記主プロセッサのレジスタの内容を演算対象とする演算命令を、命令列において当該処理依頼命令に後続する位置に生成する際には、当該処理依頼命令に含まれるコプロセッサ用命令コードで示される種別の演算処理に関する演算処理時間を、前記演算時間管理手段により記憶されている時間情報に基づいて特定し、当該処理依頼命令から、特定した演算処理時間に相当する命令数分以上の間隔を空けた位置に当該演算命令を置くようにして前記命令列の生成を行う
ことを特徴とする請求項11記載の命令列生成装置。
The instruction sequence generation device further includes calculation time management means for preliminarily storing time information indicating calculation processing time in association with various types of calculation processing executable by the coprocessor,
The instruction sequence generation means is configured to place an operation instruction whose operation target is the content of the register of the main processor identified by the second data included in the generated process request instruction at a position subsequent to the process request instruction in the instruction sequence. When generating, specify the processing time for the type of calculation processing indicated by the coprocessor instruction code included in the processing request instruction based on the time information stored by the calculation time management means, 12. The instruction sequence according to claim 11, wherein the instruction sequence is generated by placing the operation instruction at a position spaced from the processing request instruction by an interval equal to or more than the number of instructions corresponding to the specified operation processing time. Column generator.
JP2005191931A 2004-07-06 2005-06-30 Arithmetic processing device for controlling data transfer between processor and coprocessor Pending JP2006048661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005191931A JP2006048661A (en) 2004-07-06 2005-06-30 Arithmetic processing device for controlling data transfer between processor and coprocessor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004199138 2004-07-06
JP2005191931A JP2006048661A (en) 2004-07-06 2005-06-30 Arithmetic processing device for controlling data transfer between processor and coprocessor

Publications (1)

Publication Number Publication Date
JP2006048661A true JP2006048661A (en) 2006-02-16

Family

ID=36027088

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005191931A Pending JP2006048661A (en) 2004-07-06 2005-06-30 Arithmetic processing device for controlling data transfer between processor and coprocessor

Country Status (1)

Country Link
JP (1) JP2006048661A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252374A (en) * 2011-05-31 2012-12-20 Renesas Electronics Corp Information processor
JP2017224342A (en) * 2012-09-27 2017-12-21 インテル・コーポレーション Processor and apparatus
JP2018120307A (en) * 2017-01-23 2018-08-02 Necプラットフォームズ株式会社 Accelerator processing management apparatus, host apparatus, accelerator processing execution system, method and program
JP2020042782A (en) * 2018-08-10 2020-03-19 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Calculation method applied to artificial intelligence chip and artificial intelligence chip

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06161745A (en) * 1992-11-18 1994-06-10 Fujitsu Ltd Data processing apparatus verification method and apparatus
JPH09212360A (en) * 1996-02-02 1997-08-15 Toshiba Microelectron Corp Data processor
JPH1185513A (en) * 1997-09-03 1999-03-30 Hitachi Ltd Processor
JP2001265593A (en) * 2000-03-16 2001-09-28 Fujitsu Ltd Information processing device
US6434689B2 (en) * 1998-11-09 2002-08-13 Infineon Technologies North America Corp. Data processing unit with interface for sharing registers by a processor and a coprocessor
US20040227763A1 (en) * 2003-05-14 2004-11-18 Wichman Shannon A. Coprocessor responsive to user-defined commands, and data processing systems including same

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06161745A (en) * 1992-11-18 1994-06-10 Fujitsu Ltd Data processing apparatus verification method and apparatus
JPH09212360A (en) * 1996-02-02 1997-08-15 Toshiba Microelectron Corp Data processor
JPH1185513A (en) * 1997-09-03 1999-03-30 Hitachi Ltd Processor
US6434689B2 (en) * 1998-11-09 2002-08-13 Infineon Technologies North America Corp. Data processing unit with interface for sharing registers by a processor and a coprocessor
JP2001265593A (en) * 2000-03-16 2001-09-28 Fujitsu Ltd Information processing device
US20040227763A1 (en) * 2003-05-14 2004-11-18 Wichman Shannon A. Coprocessor responsive to user-defined commands, and data processing systems including same

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012252374A (en) * 2011-05-31 2012-12-20 Renesas Electronics Corp Information processor
JP2017224342A (en) * 2012-09-27 2017-12-21 インテル・コーポレーション Processor and apparatus
US10901748B2 (en) 2012-09-27 2021-01-26 Intel Corporation Processor having multiple cores, shared core extension logic, and shared core extension utilization instructions
US10963263B2 (en) 2012-09-27 2021-03-30 Intel Corporation Processor having multiple cores, shared core extension logic, and shared core extension utilization instructions
US11494194B2 (en) 2012-09-27 2022-11-08 Intel Corporation Processor having multiple cores, shared core extension logic, and shared core extension utilization instructions
US12086603B2 (en) 2012-09-27 2024-09-10 Intel Corporation Processor having multiple cores, shared core extension logic, and shared core extension utilization instructions
JP2018120307A (en) * 2017-01-23 2018-08-02 Necプラットフォームズ株式会社 Accelerator processing management apparatus, host apparatus, accelerator processing execution system, method and program
JP2020042782A (en) * 2018-08-10 2020-03-19 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Calculation method applied to artificial intelligence chip and artificial intelligence chip
JP7096213B2 (en) 2018-08-10 2022-07-05 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド Calculation method applied to artificial intelligence chip and artificial intelligence chip

Similar Documents

Publication Publication Date Title
CN100557565C (en) Arithmetic processing device and instruction sequence generating device
JP4987882B2 (en) Thread-optimized multiprocessor architecture
US5941983A (en) Out-of-order execution using encoded dependencies between instructions in queues to determine stall values that control issurance of instructions from the queues
EP2951681B1 (en) Solution to divergent branches in a simd core using hardware pointers
KR100538727B1 (en) Multi-processor system
CN100461094C (en) An Instruction Control Method for Stream Processor
US20080250227A1 (en) General Purpose Multiprocessor Programming Apparatus And Method
EP2951682B1 (en) Hardware and software solutions to divergent branches in a parallel pipeline
US20140143524A1 (en) Information processing apparatus, information processing apparatus control method, and a computer-readable storage medium storing a control program for controlling an information processing apparatus
JP2003005958A (en) Data processor and method for controlling the same
US5907693A (en) Autonomously cycling data processing architecture
EP1623318B1 (en) Processing system with instruction- and thread-level parallelism
JP2006048661A (en) Arithmetic processing device for controlling data transfer between processor and coprocessor
CN116841614B (en) Sequential vector scheduling method under disordered access mechanism
US7278014B2 (en) System and method for simulating hardware interrupts
JPH1185513A (en) Processor
JP2006506727A (en) VLIW with copy register file
KR101482210B1 (en) A reconfigurable processor for reducing power consumption and a method of operating the same
JP5013966B2 (en) Arithmetic processing unit
JP3743155B2 (en) Pipeline controlled computer
CN119025162A (en) Instruction processing method, processor and computing device
HK40069196A (en) Method for instruction scheduling, processing circuit, and electronic device
JPH06139075A (en) Instruction arraying system for program and compiler
Ascott JavaFlow: a Java DataFlow Machine
JP2001092663A (en) Data processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101105

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110809

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120529

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120725

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120801

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20121012