JP2009163338A - Information processor - Google Patents

Information processor Download PDF

Info

Publication number
JP2009163338A
JP2009163338A JP2007340051A JP2007340051A JP2009163338A JP 2009163338 A JP2009163338 A JP 2009163338A JP 2007340051 A JP2007340051 A JP 2007340051A JP 2007340051 A JP2007340051 A JP 2007340051A JP 2009163338 A JP2009163338 A JP 2009163338A
Authority
JP
Japan
Prior art keywords
instruction
information processing
processing apparatus
signal
outputs
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
JP2007340051A
Other languages
Japanese (ja)
Inventor
Toshihiro Yagi
俊宏 八木
Jiro Miyake
二郎 三宅
Hiroyuki Mizobata
博幸 溝端
Toru Morikawa
徹 森河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp filed Critical Panasonic Corp
Priority to JP2007340051A priority Critical patent/JP2009163338A/en
Publication of JP2009163338A publication Critical patent/JP2009163338A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To accurately control a waiting time when making a main operation part of a CPU (central processing unit) or the like wait execution of processing by an instruction. <P>SOLUTION: This information processor has: the main operation part performing the processing according to an instruction read from a memory; and an expansion operation part performing processing according to a prescribed instruction of the instructions read from the memory. The expansion operation part has a signal generation circuit counting a pulse of a clock signal, and outputting a signal showing that it has to wait when the instruction read from the memory is the wait instruction making the main operation part wait until a count corresponding to a wait count number designated in the wait instruction is completed. The main operation part stops the processing while the signal showing that it has to wait is output. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、CPU等の主演算部と所定の演算を実行する拡張演算部とを有する情報処理装置に関する。   The present invention relates to an information processing apparatus having a main calculation unit such as a CPU and an extended calculation unit that executes a predetermined calculation.

基本性能向上のために、主として処理を行うCPUに加えて、所定の演算を実行する拡張演算器を有する情報処理装置の例が、特許文献1に開示されている。拡張演算器は、受け取った命令が実行可能である場合には、CPUから演算に係わるデータを受け取って演算を実行し、その結果をCPUに出力する。拡張演算器を有することにより、CPUが実行できない特別な命令が実行可能となり、拡張演算器を持たない場合よりプログラムのコードサイズを小さくすることができる。これにより命令メモリの容量を小さくすることができる。また、拡張演算器が演算を実行している間はCPUは別の命令を実行することができるので、情報処理装置の基本性能が向上する。   In order to improve basic performance, an example of an information processing apparatus having an extended arithmetic unit that executes a predetermined calculation in addition to a CPU that mainly performs processing is disclosed in Patent Document 1. When the received instruction is executable, the extended arithmetic unit receives data related to the operation from the CPU, executes the operation, and outputs the result to the CPU. By having the extended arithmetic unit, a special instruction that cannot be executed by the CPU can be executed, and the code size of the program can be made smaller than when the extended arithmetic unit is not provided. Thereby, the capacity of the instruction memory can be reduced. Further, since the CPU can execute another instruction while the extended arithmetic unit is executing the calculation, the basic performance of the information processing apparatus is improved.

用途に応じた構成の拡張演算器を用いるようにすることにより、CPUの物理的構成を変更することなく、情報処理装置としての性能を上げることが容易となる。また、拡張演算器のみを用途によって改変すればよいので、一から専用の情報処理装置を作成する場合に比べて、開発に要する時間を短縮することができるという利点もある。
特開平8−305568号公報
By using the extended arithmetic unit having a configuration according to the application, it becomes easy to improve the performance as the information processing apparatus without changing the physical configuration of the CPU. Further, since only the extended arithmetic unit needs to be modified depending on the application, there is an advantage that the time required for development can be shortened as compared with the case where a dedicated information processing apparatus is created from scratch.
JP-A-8-305568

このような情報処理装置においても、CPUの処理を一定期間待たせる場合には、CPUにNOP命令やループ命令を実行させている。しかし、CPUによる命令フェッチ時のバスにおける競合によって、予定していた待ち時間と実際の待ち時間との間に誤差が生じてしまい、プログラムの修正が必要になるという問題があった。   Even in such an information processing apparatus, when the CPU processing is to be waited for a certain period, the CPU is caused to execute a NOP instruction or a loop instruction. However, there is a problem that an error occurs between the scheduled waiting time and the actual waiting time due to competition in the bus at the time of instruction fetch by the CPU, and the program needs to be corrected.

また、一定時間経過後に割り込みや外部回路の制御を行うことは、CPUから直接行うことはできないので、外部のタイマを操作してその出力信号によって制御する必要があった。すなわち、複雑な手順で操作することが必要であり、そのための機能を加えることで回路面積が増加するという問題があった。   Also, since interrupts and control of external circuits cannot be performed directly from the CPU after a certain period of time has elapsed, it has been necessary to operate an external timer and control it according to its output signal. That is, it is necessary to operate in a complicated procedure, and there is a problem that the circuit area is increased by adding a function therefor.

本発明は、命令によってCPU等の主演算部に処理を待たせる場合に、待たせる時間を正確に制御することを目的とする。   It is an object of the present invention to accurately control the waiting time when a main processing unit such as a CPU waits for processing according to an instruction.

前記課題を解決するため、本発明が講じた手段は、情報処理装置として、メモリから読み出された命令に従って処理を行う主演算部と、前記メモリから読み出された命令のうちの所定の命令に従って処理を行う拡張演算部とを有するものである。前記拡張演算部は、クロック信号のパルスをカウントし、前記メモリから読み出された命令が前記主演算部を待機させる待機命令である場合には、待機すべきであることを示す信号を、前記待機命令において指定された待機カウント数に相当するカウントが完了するまで出力する信号生成回路を有する。前記主演算部は、前記待機すべきであることを示す信号が出力されている間は、処理を停止する。   In order to solve the above problems, the means taken by the present invention includes an information processing device as a main operation unit that performs processing according to an instruction read from a memory, and a predetermined instruction among the instructions read from the memory. And an extended arithmetic unit that performs processing according to the above. The extended arithmetic unit counts pulses of a clock signal, and when the instruction read from the memory is a standby instruction that causes the main arithmetic unit to wait, a signal indicating that it should wait It has a signal generation circuit that outputs until the count corresponding to the standby count number specified in the standby instruction is completed. The main arithmetic unit stops the process while the signal indicating that the standby should be performed is output.

これによると、拡張演算部が所定の命令において指定された待機カウント数に基づいて生成した信号によって、主演算部が処理を停止する。処理を待機させるために主演算部に命令を実行させる必要がないので、命令フェッチの際に外部バスを用いることに起因して生じる予測待ち時間と実際の待ち時間との間の誤差がなくなる。また、このような処理を1つの命令で実現するので、プログラムのコードサイズを小さくすることができ、プログラムの作成を容易にすることができる。   According to this, the main arithmetic unit stops the processing by the signal generated by the extended arithmetic unit based on the standby count number specified in the predetermined instruction. Since it is not necessary to cause the main arithmetic unit to execute an instruction in order to wait for processing, there is no error between the predicted waiting time and the actual waiting time caused by using the external bus at the time of instruction fetch. In addition, since such processing is realized by one instruction, the code size of the program can be reduced, and the creation of the program can be facilitated.

本発明によれば、命令によってCPU等に処理を待たせる場合に、バスの状態の影響を受けることがなく、待たせる時間を正確に制御することができる。1つの命令を用い、クロック信号のサイクル数を指定すればよいので、プログラムの作成が容易になる。   According to the present invention, when the CPU or the like is caused to wait for processing by an instruction, it is possible to accurately control the waiting time without being affected by the state of the bus. Since it is sufficient to use one instruction and specify the number of cycles of the clock signal, it is easy to create a program.

以下、本発明の実施の形態について、図面を参照しながら説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(第1の実施形態)
図1は、本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。図1の情報処理装置100は、主演算部としてのCPU(central processing unit)110と、拡張演算部としての拡張演算器120と、ROM(read-only memory)130とを有している。CPU110は、CPU命令デコーダ111と、CPU制御回路112と、汎用レジスタ113と、演算器114とを有している。拡張演算器120は、拡張命令デコーダ121と、拡張命令制御回路122と、演算器123,124と、信号生成回路としての制御信号発生回路125と、セレクタ126と、論理和回路127とを有している。
(First embodiment)
FIG. 1 is a block diagram showing the configuration of the information processing apparatus according to the first embodiment of the present invention. The information processing apparatus 100 in FIG. 1 includes a central processing unit (CPU) 110 as a main arithmetic unit, an extended arithmetic unit 120 as an extended arithmetic unit, and a read-only memory (ROM) 130. The CPU 110 includes a CPU instruction decoder 111, a CPU control circuit 112, a general-purpose register 113, and an arithmetic unit 114. The extended arithmetic unit 120 includes an extended instruction decoder 121, an extended instruction control circuit 122, arithmetic units 123 and 124, a control signal generation circuit 125 as a signal generation circuit, a selector 126, and an OR circuit 127. ing.

CPU110及び拡張演算器120は、クロック信号CLKに同期して動作する。CPU110は、各種情報処理を実行する機能を有しており、命令アドレスをROM130に出力する。ROM130は、受け取った命令アドレスに対応する命令を、命令バス141を経由して命令デコーダ111及び拡張命令デコーダ121に供給する。   The CPU 110 and the extended arithmetic unit 120 operate in synchronization with the clock signal CLK. The CPU 110 has a function of executing various information processing, and outputs an instruction address to the ROM 130. The ROM 130 supplies an instruction corresponding to the received instruction address to the instruction decoder 111 and the extended instruction decoder 121 via the instruction bus 141.

CPU命令デコーダ111は、命令バス141から供給された命令をデコードし、デコード結果を出力する。CPU制御回路112は、CPU命令デコーダ111のデコード結果であるデコード信号CDCの内容と、拡張演算器120から供給される制御信号ECPとに基づいて、各種制御信号PCNを生成し、CPU110の各回路に出力する。   The CPU instruction decoder 111 decodes the instruction supplied from the instruction bus 141 and outputs a decoding result. The CPU control circuit 112 generates various control signals PCN based on the content of the decode signal CDC, which is the decoding result of the CPU instruction decoder 111, and the control signal ECP supplied from the extension arithmetic unit 120, and each circuit of the CPU 110 Output to.

汎用レジスタ113は、データを格納するレジスタD0,D1,D2,D3を有している。演算器114は、CPU制御回路112から供給される制御信号に従って、データ入力バス143及びデータ入力バス144から入力された値に対する演算を行い、演算処理結果をデータ出力バス145に出力する。   The general-purpose register 113 includes registers D0, D1, D2, and D3 that store data. The arithmetic unit 114 performs an operation on values input from the data input bus 143 and the data input bus 144 in accordance with a control signal supplied from the CPU control circuit 112 and outputs an operation processing result to the data output bus 145.

拡張演算器120は、ROM130から供給される命令が拡張命令の場合に、その拡張命令に従って各種情報処理を実行する機能を有している。拡張命令デコーダ121は、命令バス141から供給された拡張命令をデコードし、デコード結果を出力する。拡張命令制御回路122は、拡張命令デコーダ121のデコード結果であるデコード信号EDCの内容に従って、制御信号IC1,IC2,IC3,ICSを生成し出力する。   The extended arithmetic unit 120 has a function of executing various information processing according to the extended instruction when the instruction supplied from the ROM 130 is an extended instruction. The extension instruction decoder 121 decodes the extension instruction supplied from the instruction bus 141 and outputs a decoding result. The extension instruction control circuit 122 generates and outputs the control signals IC1, IC2, IC3, and ICS according to the content of the decode signal EDC that is the decoding result of the extension instruction decoder 121.

演算器123は、制御信号IC1に従って、データ入力バス143及びデータ入力バス144から入力された値に対して演算処理を行い、得られた演算処理結果PO1及び制御信号EC1を出力する。演算器124は、制御信号IC2に従って、データ入力バス143及びデータ入力バス144から入力された値に対して演算処理を行い、得られた演算処理結果PO2及び制御信号EC2を出力する。制御信号発生回路125は、制御信号IC3と、データ入力バス143から入力された値に基づいて演算処理を行い、制御信号EC3を出力する。   The arithmetic unit 123 performs arithmetic processing on the values input from the data input bus 143 and the data input bus 144 according to the control signal IC1, and outputs the obtained arithmetic processing result PO1 and the control signal EC1. The arithmetic unit 124 performs arithmetic processing on the values input from the data input bus 143 and the data input bus 144 according to the control signal IC2, and outputs the obtained arithmetic processing result PO2 and the control signal EC2. The control signal generation circuit 125 performs arithmetic processing based on the control signal IC3 and the value input from the data input bus 143, and outputs the control signal EC3.

セレクタ126は、制御信号ICSに従って、演算器123の演算処理結果PO1と、演算器124の演算処理結果PO2とのいずれか1つを選択し、選択された値をデータ出力バス145に出力する。論理和回路127は、制御信号EC1,EC2及びEC3の論理和を求め、制御信号ECPとして出力する。   The selector 126 selects one of the arithmetic processing result PO1 of the arithmetic unit 123 and the arithmetic processing result PO2 of the arithmetic unit 124 in accordance with the control signal ICS, and outputs the selected value to the data output bus 145. The logical sum circuit 127 calculates the logical sum of the control signals EC1, EC2, and EC3 and outputs the logical sum as the control signal ECP.

図2は、図1の制御信号発生回路125の構成例を示すブロック図である。制御信号発生回路125は、制御回路62と、比較値保持回路64と、カウンタ回路66と、比較器68とを有している。   FIG. 2 is a block diagram showing a configuration example of the control signal generation circuit 125 of FIG. The control signal generation circuit 125 includes a control circuit 62, a comparison value holding circuit 64, a counter circuit 66, and a comparator 68.

制御回路62は、制御信号IC3と、データ入力バス143の値と、比較器68から供給される一致信号CMRとに従って、比較値保持回路64を制御するための制御信号CHと、カウンタ回路66を制御するための制御信号CCと、制御信号EC3とを生成し、出力する。比較値保持回路64は、制御信号CHに従って、データ入力バス143からの入力値の出力データCMVとしての出力、データ入力バス143からの入力値の保持、及び保持している値の出力データCMVとしての出力を行う。   The control circuit 62 includes a control signal CH3 for controlling the comparison value holding circuit 64 and a counter circuit 66 in accordance with the control signal IC3, the value of the data input bus 143, and the coincidence signal CMR supplied from the comparator 68. A control signal CC for control and a control signal EC3 are generated and output. The comparison value holding circuit 64 outputs the input value from the data input bus 143 as the output data CMV, holds the input value from the data input bus 143, and outputs the held value as the output data CMV according to the control signal CH. Is output.

カウンタ回路66は、制御信号CCに従って、クロック信号CLKのパルスのカウントアップ、リセット、及びカウント値の出力データCNTとしての出力を行う。比較器68は、比較値保持回路64の出力データCMVと、カウンタ回路66の出力データCNTとを比較し、比較結果を一致信号CMRとして制御回路62に出力する。   The counter circuit 66 counts up and resets the pulses of the clock signal CLK and outputs the count value as output data CNT in accordance with the control signal CC. The comparator 68 compares the output data CMV of the comparison value holding circuit 64 with the output data CNT of the counter circuit 66, and outputs the comparison result to the control circuit 62 as a coincidence signal CMR.

図3は、図1の情報処理装置100の動作の例を示すタイミングチャートである。ウェイト命令(待機命令)は、その命令に指定された時間だけCPU110の処理を待機させる拡張命令であり、待機させる時間は例えば待機カウント数で表される。ウェイト命令は、例えば「WAIT Dm」(DmはレジスタD0〜D3のいずれかを示す)と記述される。この場合、レジスタDmに格納された値(待機カウント数)だけカウンタ回路66がカウントアップするまで、CPU110の処理が待たされる。   FIG. 3 is a timing chart showing an example of the operation of the information processing apparatus 100 of FIG. The wait command (standby command) is an extended command that waits for the processing of the CPU 110 for the time specified in the command, and the wait time is represented by, for example, a wait count number. The wait instruction is described, for example, as “WAIT Dm” (Dm indicates one of the registers D0 to D3). In this case, the processing of the CPU 110 is waited until the counter circuit 66 counts up by the value (standby count number) stored in the register Dm.

図3において、IFステージとは、命令がROM130から読み出される処理が行われている段階を示す。DECステージとは、ROM130から読み出された命令を、CPU命令デコーダ111及び拡張命令デコーダ121がデコード処理を行い、制御信号を出力する処理が行われている段階を示す。EXステージとは、デコードの結果得られた制御信号によって、CPU110及び拡張演算器120が演算を実行する処理が行われている段階を示す。各ステージの「W」は、ウェイト命令の処理中であることを示し、「N」は、ウェイト命令の後続の命令の処理中であることを示す。   In FIG. 3, the IF stage indicates a stage where a process for reading an instruction from the ROM 130 is being performed. The DEC stage refers to a stage in which the CPU instruction decoder 111 and the extended instruction decoder 121 decode the instruction read from the ROM 130 and output a control signal. The EX stage indicates a stage where the CPU 110 and the extended arithmetic unit 120 are performing processing based on a control signal obtained as a result of decoding. “W” in each stage indicates that a wait instruction is being processed, and “N” indicates that an instruction subsequent to the wait instruction is being processed.

CPU110は、ROM130から命令バス141を経由してウェイト命令を読み出す。時刻T1からCPU命令デコーダ111は、ウェイト命令をデコードし、得られたデコード信号CDCを出力する。CPU制御回路112は、デコード信号CDCに基づいて各種制御信号PCNを生成し、CPU110の各回路に出力する。   The CPU 110 reads a wait instruction from the ROM 130 via the instruction bus 141. From time T1, the CPU instruction decoder 111 decodes the wait instruction and outputs the obtained decode signal CDC. The CPU control circuit 112 generates various control signals PCN based on the decode signal CDC and outputs them to each circuit of the CPU 110.

CPU命令デコーダ111とほぼ同じタイミングで、拡張演算器120の拡張命令デコーダ121は、ウェイト命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、ウェイト命令が実行されたことをデコード信号EDCから判定し、時刻T1〜T2の間、制御信号IC3として「1」を出力する。また、拡張命令制御回路122は、ウェイト命令以外の命令が実行されないように、制御信号IC1,IC2,ICSとして「0」を出力する。   At substantially the same timing as the CPU instruction decoder 111, the extension instruction decoder 121 of the extension arithmetic unit 120 decodes the wait instruction and outputs the obtained decode signal EDC. The extended instruction control circuit 122 determines from the decode signal EDC that the wait instruction has been executed, and outputs “1” as the control signal IC3 between times T1 and T2. The extended instruction control circuit 122 outputs “0” as the control signals IC1, IC2, ICS so that instructions other than the wait instruction are not executed.

時刻T2から、CPU110は、ウェイト命令のデコードの結果得られた各種制御信号PCNに従って、ウェイト命令で指定された、汎用レジスタ113のレジスタDmから値を読み出し、データ入力バス143に出力する。例として、レジスタDmが格納している値は3であるとする。制御信号発生回路125内の制御回路62は、制御信号IC3が「1」なので、ウェイト命令動作を開始し、制御信号CH,CCを出力する。   From time T 2, CPU 110 reads a value from register Dm of general-purpose register 113 specified by the wait instruction in accordance with various control signals PCN obtained as a result of decoding the wait instruction, and outputs the value to data input bus 143. As an example, it is assumed that the value stored in the register Dm is 3. Since the control signal IC3 is “1”, the control circuit 62 in the control signal generation circuit 125 starts the wait command operation and outputs the control signals CH and CC.

制御信号CHに従って、比較値保持回路64は、データ入力バス143の値を保持して、出力データCMVとして値「3」を出力する。制御信号CCに従って、カウンタ回路66は、出力データCNTとして「0」を出力し、カウント値を「1」カウントアップする。比較器68は、出力データCMVと出力データCNTの値を比較し、一致しないので一致信号CMRとして「0」を出力する。制御回路62は、一致信号CMRが「0」なので、待機すべきであることを示す信号として、制御信号EC3を「1」にして出力する。   In accordance with the control signal CH, the comparison value holding circuit 64 holds the value of the data input bus 143 and outputs the value “3” as the output data CMV. In accordance with the control signal CC, the counter circuit 66 outputs “0” as the output data CNT and increments the count value by “1”. The comparator 68 compares the values of the output data CMV and the output data CNT, and outputs “0” as the match signal CMR because they do not match. Since the coincidence signal CMR is “0”, the control circuit 62 sets the control signal EC3 to “1” and outputs it as a signal indicating that it should wait.

論理和回路127は、制御信号ECPとして「1」を出力する。CPU制御回路112は、制御信号ECPが「1」なので、各種制御信号PCNを出力し、時刻T3からCPU110のパイプライン動作を停止させる。   The OR circuit 127 outputs “1” as the control signal ECP. Since the control signal ECP is “1”, the CPU control circuit 112 outputs various control signals PCN and stops the pipeline operation of the CPU 110 from time T3.

時刻T3以降、制御信号発生回路125は動作を続け、サイクル毎にカウンタ回路66をカウントアップし、比較値保持回路64の出力データCMVとカウンタ回路66の出力データCNTとを比較し、値が一致するまで動作を継続する。時刻T5で、比較値保持回路64の出力データCMVとカウンタ回路66の出力データCNTとが一致するので、比較器68は一致信号CMRとして「1」を出力する。   After time T3, the control signal generation circuit 125 continues to operate, counts up the counter circuit 66 every cycle, compares the output data CMV of the comparison value holding circuit 64 and the output data CNT of the counter circuit 66, and the values match. The operation continues until At time T5, the output data CMV of the comparison value holding circuit 64 and the output data CNT of the counter circuit 66 match, so the comparator 68 outputs “1” as the match signal CMR.

制御回路62は、一致信号CMRが「1」なので、ウェイト命令動作の終了と判断し、制御信号EC3として「0」を出力する。すると、論理和回路127は、制御信号ECPとして「0」を出力する。CPU制御回路112は、制御信号ECPが「0」なので、各種制御信号PCNを出力し、時刻T6からCPU110のパイプライン動作を再開させる。   Since the coincidence signal CMR is “1”, the control circuit 62 determines that the wait instruction operation is finished, and outputs “0” as the control signal EC3. Then, the OR circuit 127 outputs “0” as the control signal ECP. Since the control signal ECP is “0”, the CPU control circuit 112 outputs various control signals PCN and restarts the pipeline operation of the CPU 110 from time T6.

図3に示すように、ウェイト命令に指定されたレジスタDmの値を3に設定すれば、4サイクルの期間、CPUの処理を待たせることができる。レジスタDmへのサイクル数の設定値は、「待ち時間×動作周波数−1」とすればよく、容易に求めることができる。   As shown in FIG. 3, if the value of the register Dm specified in the wait instruction is set to 3, the CPU processing can be made to wait for a period of 4 cycles. The set value of the number of cycles in the register Dm may be “waiting time × operation frequency−1” and can be easily obtained.

以上説明したように、情報処理装置100においては、CPUの処理を一定期間、待たせる必要があるときには、レジスタDmに値を設定してウェイト命令を実行すればよい。拡張演算器120においてカウントを行うので、バスの状態の影響を受けることなく、CPU等に処理を待たせる時間を正確に制御することができる。   As described above, in the information processing apparatus 100, when it is necessary to wait for a certain period of time for CPU processing, a value may be set in the register Dm and a wait instruction may be executed. Since the extended arithmetic unit 120 performs the counting, the time for which the CPU or the like waits for processing can be accurately controlled without being affected by the state of the bus.

なお、第1の実施形態では、カウント回路66はカウントアップを行うと説明したが、カウントダウンを行うことによって、制御信号発生回路125の機能を実現することもできる。また、信号の論理は上記とは逆であってもよい。   In the first embodiment, it has been described that the count circuit 66 counts up. However, the function of the control signal generation circuit 125 can also be realized by performing countdown. Further, the logic of the signal may be opposite to the above.

また、ウェイト命令に記述されたレジスタDmが格納する値を待機カウント数として用いる場合について説明したが、ウェイト命令に値を直接記述し、その値を、待機カウント数として用いるようにしてもよい。   Although the case where the value stored in the register Dm described in the wait instruction is used as the wait count number has been described, the value may be directly described in the wait instruction and the value may be used as the wait count number.

また、拡張演算器120内に複数のサイクル数設定レジスタを設けることとし、ウェイト命令にDmとして記述された値に従って、サイクル数設定レジスタを1つ選択し、そのレジスタの値を、待機カウント数として用いるようにしてもよい。   Further, a plurality of cycle number setting registers are provided in the extended arithmetic unit 120, one cycle number setting register is selected according to the value described as Dm in the wait instruction, and the value of the register is set as the wait count number. You may make it use.

(第2の実施形態)
図1の装置によると、CPU等に処理を待たせるために制御信号発生回路125が必要であり、回路規模が増大する。そこで、本実施形態では、拡張演算器120内のウェイト命令実行中に動作をしない演算器のリソースを用いることにより、回路規模の増大を抑えるようにする。
(Second Embodiment)
According to the apparatus shown in FIG. 1, the control signal generation circuit 125 is necessary to make the CPU wait for processing, and the circuit scale increases. Therefore, in this embodiment, an increase in circuit scale is suppressed by using resources of an arithmetic unit that does not operate during execution of a wait instruction in the extended arithmetic unit 120.

図4は、本発明の第2の実施形態に係る情報処理装置の構成を示すブロック図である。図4の情報処理装置200は、拡張演算器120に代えて拡張演算器220を有する点以外は、図1の情報処理装置100と同様である。拡張演算器220は、演算器124に代えて演算器224を有し、制御信号発生回路125を有しない点以外は、拡張演算器120と同様である。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 4 is a block diagram showing the configuration of the information processing apparatus according to the second embodiment of the present invention. The information processing apparatus 200 in FIG. 4 is the same as the information processing apparatus 100 in FIG. 1 except that an extended arithmetic unit 220 is provided instead of the extended arithmetic unit 120. The extended arithmetic unit 220 is the same as the extended arithmetic unit 120 except that it includes an arithmetic unit 224 instead of the arithmetic unit 124 and does not include the control signal generation circuit 125. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図5は、図4の演算器224の構成例を示すブロック図である。演算器224は、制御回路262と、乗算器263と、セレクタ264,267,269と、レジスタ265,266と、加算器268とを有している。乗算器263、セレクタ264,267、レジスタ265,266、及び加算器268は、積和演算を行う演算回路を構成している。   FIG. 5 is a block diagram illustrating a configuration example of the arithmetic unit 224 of FIG. The arithmetic unit 224 includes a control circuit 262, a multiplier 263, selectors 264, 267, 269, registers 265, 266, and an adder 268. The multiplier 263, the selectors 264, 267, the registers 265, 266, and the adder 268 constitute an arithmetic circuit that performs a product-sum operation.

演算器224は、積和演算を行う回路である。演算器224は、拡張命令制御回路122から供給される制御信号IC2に従って、データ入力バス143から入力された値と、データ入力バス144から入力された値との間で乗算又は積和演算を行い、得られた結果を演算処理結果PO2として出力し、パイプライン制御のために制御信号EC2を出力する。更に、演算器224は、制御信号IC3に従って、データ入力バス143から入力された値に基づいて演算処理を行い、図1の制御信号発生回路125と同様の処理を行い、その結果を、制御信号EC3として出力する。   The arithmetic unit 224 is a circuit that performs a product-sum operation. The arithmetic unit 224 performs multiplication or product-sum operation between the value input from the data input bus 143 and the value input from the data input bus 144 in accordance with the control signal IC2 supplied from the extension instruction control circuit 122. The obtained result is output as the operation processing result PO2, and the control signal EC2 is output for pipeline control. Further, the arithmetic unit 224 performs arithmetic processing based on the value input from the data input bus 143 according to the control signal IC3, performs processing similar to the control signal generation circuit 125 of FIG. Output as EC3.

乗算命令は、乗算のための拡張命令であり、例えば「MUL Dm,Dn」(Dm及びDnはレジスタD0〜D3のいずれかを示す)と記述される。積和命令は、積和のための拡張命令であり、例えば「MAC Dm,Dn」(Dm及びDnはレジスタD0〜D3のいずれかを示す)と記述される。積和結果取得命令は、積和の結果を取得するための拡張命令であり、例えば「GETMAC Dn」(Dm及びDnはレジスタD0〜D3のいずれかを示す)と記述される。   The multiplication instruction is an extension instruction for multiplication, and is described as, for example, “MUL Dm, Dn” (Dm and Dn indicate any of registers D0 to D3). The product-sum instruction is an extension instruction for product-sum, and is described as, for example, “MAC Dm, Dn” (Dm and Dn indicate any of registers D0 to D3). The product-sum result acquisition instruction is an extension instruction for acquiring the product-sum result, and is described as, for example, “GETMAC Dn” (Dm and Dn indicate any of registers D0 to D3).

乗算命令が実行される際の情報処理装置200の動作について説明する。ウェイト命令の場合と同様に、CPU110は、ROM130から乗算命令を読み出し、デコードを行い、得られたデコード信号CDCを出力する。CPU制御回路112は、デコード信号CDCに基づいて各種制御信号PCNを生成し、CPU110の各回路に出力する。   An operation of the information processing apparatus 200 when a multiplication instruction is executed will be described. As in the case of the wait instruction, the CPU 110 reads the multiplication instruction from the ROM 130, performs decoding, and outputs the obtained decode signal CDC. The CPU control circuit 112 generates various control signals PCN based on the decode signal CDC and outputs them to each circuit of the CPU 110.

CPU命令デコーダ111とほぼ同じタイミングで、拡張演算器220の拡張命令デコーダ121は、乗算命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、乗算命令が実行されたことをデコード信号EDCから判定し、制御信号IC2,ICSを出力する。また、拡張命令制御回路122は、乗算命令以外の命令が実行されないように、制御信号IC1,IC3を出力する。   At substantially the same timing as the CPU instruction decoder 111, the extension instruction decoder 121 of the extension arithmetic unit 220 decodes the multiplication instruction and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the multiplication instruction has been executed, and outputs control signals IC2 and ICS. The extended instruction control circuit 122 outputs control signals IC1 and IC3 so that instructions other than multiplication instructions are not executed.

CPU110は、乗算命令のデコードの結果得られた各種制御信号PCNに従って、汎用レジスタ113のレジスタDmから値を読み出してデータ入力バス143に出力し、汎用レジスタ113のレジスタDnから値を読み出してデータ入力バス144に出力する。乗算器263は、データ入力バス143の値とデータ入力バス144の値とを乗算し、その乗算結果を出力する。   The CPU 110 reads a value from the register Dm of the general-purpose register 113 and outputs it to the data input bus 143 according to various control signals PCN obtained as a result of decoding the multiplication instruction, and reads a value from the register Dn of the general-purpose register 113 to input data. Output to bus 144. The multiplier 263 multiplies the value of the data input bus 143 and the value of the data input bus 144 and outputs the multiplication result.

演算器224の制御回路262は、制御信号IC2に従って乗算処理を開始し、制御信号SL3を出力する。セレクタ269は、制御信号SL3に従って乗算器263の出力を選択し、演算処理結果PO2として出力する。セレクタ126は、制御信号ICSに従って、演算器224の演算処理結果PO2を選択し、選択された値をデータ出力バス145に出力する。CPU110は、データ出力バス145の値を、汎用レジスタ113のレジスタDnに格納する。   The control circuit 262 of the arithmetic unit 224 starts multiplication processing according to the control signal IC2, and outputs a control signal SL3. The selector 269 selects the output of the multiplier 263 in accordance with the control signal SL3 and outputs it as the operation processing result PO2. The selector 126 selects the calculation processing result PO2 of the calculator 224 in accordance with the control signal ICS, and outputs the selected value to the data output bus 145. The CPU 110 stores the value of the data output bus 145 in the register Dn of the general-purpose register 113.

次に、積和命令及び積和結果取得命令が実行される際の情報処理装置200の動作について説明する。積和命令の処理の際も、乗算命令の場合と同様に、ROM130から命令が読み出されてデコードされ、各種制御信号PCNが出力される。   Next, the operation of the information processing apparatus 200 when the product-sum instruction and the product-sum result acquisition instruction are executed will be described. In the case of the multiply-add instruction processing, as in the case of the multiply instruction, the instruction is read from the ROM 130 and decoded, and various control signals PCN are output.

CPU命令デコーダ111とほぼ同じタイミングで、拡張命令デコーダ121は、積和命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、積和命令が実行されたことをデコード信号EDCから判定し、制御信号IC2を出力する。また、拡張命令制御回路122は、積和命令以外の命令が実行されないように、制御信号IC1,IC3,ICSを出力する。CPU110は、積和命令のデコードの結果得られた各種制御信号PCNに従って、汎用レジスタ113のレジスタDmから値を読み出してデータ入力バス143に出力し、汎用レジスタ113のレジスタDnから値を読み出してデータ入力バス144に出力する。   At substantially the same timing as the CPU instruction decoder 111, the extension instruction decoder 121 decodes the product-sum instruction and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the multiply-accumulate instruction has been executed, and outputs a control signal IC2. The extended instruction control circuit 122 outputs control signals IC1, IC3, and ICS so that instructions other than the product-sum instruction are not executed. The CPU 110 reads the value from the register Dm of the general-purpose register 113 and outputs the value to the data input bus 143 in accordance with various control signals PCN obtained as a result of decoding the multiply-accumulate instruction, and reads the value from the register Dn of the general-purpose register 113 Output to the input bus 144.

制御回路262は、制御信号IC2に従って積和処理を開始し、制御信号SL1,SL2,SL3,SR1,SR2,EC2を生成して出力する。セレクタ264は、制御信号SL1に従って、乗算器263の出力を選択し、出力する。レジスタ265は、制御信号SR1に従って、セレクタ264から出力された値を格納し、出力する。レジスタ266は、制御信号SR2に従って、保持している値を出力する。セレクタ267は、制御信号SL2に従って、レジスタ266から出力された値を選択し、出力する。   The control circuit 262 starts product-sum processing according to the control signal IC2, generates and outputs control signals SL1, SL2, SL3, SR1, SR2, and EC2. The selector 264 selects and outputs the output of the multiplier 263 according to the control signal SL1. Register 265 stores and outputs the value output from selector 264 in accordance with control signal SR1. Register 266 outputs the held value in accordance with control signal SR2. The selector 267 selects and outputs the value output from the register 266 in accordance with the control signal SL2.

次のサイクルで、加算器268は、レジスタ265から出力された値とセレクタ267から出力された値とを加算し、得られた結果を出力する。レジスタ266は、制御信号SR2に従って、加算器268から出力された値を格納する。   In the next cycle, the adder 268 adds the value output from the register 265 and the value output from the selector 267, and outputs the obtained result. Register 266 stores the value output from adder 268 in accordance with control signal SR2.

積和命令実行後に、積和結果取得命令を実行する。積和結果取得命令の処理の際も、乗算命令の場合と同様に、ROM130から命令が読み出されてデコードされ、各種制御信号PCNが出力される。   After execution of the product-sum instruction, the product-sum result acquisition instruction is executed. Also in the case of processing the product-sum result acquisition instruction, the instruction is read out from the ROM 130 and decoded, as in the case of the multiplication instruction, and various control signals PCN are output.

CPU命令デコーダ111とほぼ同じタイミングで、拡張命令デコーダ121は、積和結果取得命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、積和結果取得命令が実行されたことをデコード信号EDCから判定し、制御信号IC2,ICSを出力する。また、拡張命令制御回路122は、積和結果取得命令以外の命令が実行されないように、制御信号IC1,IC3を出力する。   At substantially the same timing as the CPU instruction decoder 111, the extension instruction decoder 121 decodes the product-sum result acquisition instruction and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the product-sum result acquisition instruction has been executed, and outputs control signals IC2 and ICS. Further, the extended instruction control circuit 122 outputs control signals IC1 and IC3 so that instructions other than the product-sum result acquisition instruction are not executed.

制御回路262は、制御信号IC2に従って積和結果取得処理を開始し、制御信号SL3を生成して出力する。セレクタ269は、制御信号SL3に従って、レジスタ266から出力された値を選択し、出力する。セレクタ126は、制御信号ICSに従って、演算器224から出力された演算処理結果PO2を選択し、データ出力バス145に出力する。CPU110は、データ出力バス145の値を、汎用レジスタ113のレジスタDnに格納する。   The control circuit 262 starts the product-sum result acquisition process according to the control signal IC2, and generates and outputs the control signal SL3. The selector 269 selects and outputs the value output from the register 266 in accordance with the control signal SL3. The selector 126 selects the calculation processing result PO2 output from the calculator 224 according to the control signal ICS, and outputs it to the data output bus 145. The CPU 110 stores the value of the data output bus 145 in the register Dn of the general-purpose register 113.

次に、ウェイト命令が実行される際の情報処理装置200の動作について説明する。ここでは演算器224の動作についてのみ説明する。その他の構成要素の動作は、第1の実施形態と同様である。汎用レジスタ113のレジスタDmから読み出された値が、データ入力バス143に出力されているとする。制御回路262は、制御信号IC3に従ってウェイト処理を開始し、制御信号SL1,SR1,SL2,EC3を生成して出力する。   Next, the operation of the information processing apparatus 200 when a wait instruction is executed will be described. Here, only the operation of the arithmetic unit 224 will be described. The operation of other components is the same as that of the first embodiment. It is assumed that the value read from the register Dm of the general-purpose register 113 is output to the data input bus 143. The control circuit 262 starts wait processing according to the control signal IC3, and generates and outputs the control signals SL1, SR1, SL2, and EC3.

セレクタ264は、制御信号SL1に従ってデータ入力バス143の値を選択し、出力する。レジスタ265は、制御信号SR1に従って、セレクタ264から出力された値を格納し、出力する。セレクタ267は、制御信号SL2に従って、「−1」を選択し、出力する。加算器268は、レジスタ265から出力された値とセレクタ267から出力された値とを加算し、得られた結果をセレクタ264及びレジスタ266に出力し、キャリーアウトを制御回路262に出力する。   The selector 264 selects and outputs the value of the data input bus 143 according to the control signal SL1. Register 265 stores and outputs the value output from selector 264 in accordance with control signal SR1. The selector 267 selects and outputs “−1” in accordance with the control signal SL2. The adder 268 adds the value output from the register 265 and the value output from the selector 267, outputs the obtained result to the selector 264 and the register 266, and outputs a carry-out to the control circuit 262.

制御信号SL1が「1」の間はウェイト命令が実行される。制御回路262は、加算器268のキャリーアウトが「1」の間は制御信号EC3として「1」を出力する。このとき、制御信号ECPとして「1」が出力される。CPU制御回路112は、制御信号ECPが「1」なので、各種制御信号PCNによってCPU110のパイプライン動作を停止させる。   While the control signal SL1 is “1”, a wait instruction is executed. The control circuit 262 outputs “1” as the control signal EC3 while the carry-out of the adder 268 is “1”. At this time, “1” is output as the control signal ECP. Since the control signal ECP is “1”, the CPU control circuit 112 stops the pipeline operation of the CPU 110 by various control signals PCN.

ウェイト命令実行中は、セレクタ264は、制御信号SL1に従って、加算器268から出力される値を選択して出力し、レジスタ265は、制御信号SR1に従って、セレクタ264から出力される値を保持し、出力する。加算器268は、前述のようなレジスタ265から出力された値とセレクタ267から出力された値との加算をサイクル毎に繰り返す。   During the execution of the wait instruction, the selector 264 selects and outputs the value output from the adder 268 according to the control signal SL1, and the register 265 holds the value output from the selector 264 according to the control signal SR1. Output. The adder 268 repeats the addition of the value output from the register 265 and the value output from the selector 267 as described above for each cycle.

制御回路262は、加算器268のキャリーアウトが「0」になったとき、ウェイト処理を終了すべきであると判定し、制御信号EC3として「0」を出力する。CPU制御回路112は、制御信号EC3によって制御信号ECPが「0」になるので、各種制御信号146によってCPU110のパイプライン動作を再開させる。   When the carry-out of the adder 268 becomes “0”, the control circuit 262 determines that the wait process should be terminated, and outputs “0” as the control signal EC3. Since the control signal ECP becomes “0” by the control signal EC3, the CPU control circuit 112 restarts the pipeline operation of the CPU 110 by various control signals 146.

(第3の実施形態)
図1の装置によると、パイプラインを停止させるので、待機状態を解除する必要がある場合に、CPU110は外部からの割り込みを受け付けることができない。そこで本実施形態では、拡張演算器120の制御信号発生回路125にも割り込み信号を与えることにより、ウェイト命令を実行中であっても割り込みが可能となるようにする。
(Third embodiment)
According to the apparatus of FIG. 1, since the pipeline is stopped, the CPU 110 cannot accept an external interrupt when it is necessary to cancel the standby state. Therefore, in the present embodiment, an interrupt signal is also given to the control signal generation circuit 125 of the extended arithmetic unit 120 so that an interrupt can be performed even while a wait instruction is being executed.

図6は、本発明の第3の実施形態に係る情報処理装置の構成を示すブロック図である。図6の情報処理装置200は、拡張演算器120に代えて拡張演算器320を有する点以外は、図1の情報処理装置100と同様である。拡張演算器320は、制御信号発生回路125に代えて制御信号発生回路325を有する点以外は、拡張演算器120と同様である。割り込み制御回路302は、情報処理装置200の外部から供給される割り込みのための制御信号INRが「0」になると、CPU110に割り込みを行う。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 6 is a block diagram showing the configuration of the information processing apparatus according to the third embodiment of the present invention. The information processing apparatus 200 in FIG. 6 is the same as the information processing apparatus 100 in FIG. 1 except that an extended arithmetic unit 320 is provided instead of the extended arithmetic unit 120. The extended arithmetic unit 320 is the same as the extended arithmetic unit 120 except that it has a control signal generation circuit 325 instead of the control signal generation circuit 125. The interrupt control circuit 302 interrupts the CPU 110 when the control signal INR for interrupt supplied from outside the information processing apparatus 200 becomes “0”. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図7は、図6の制御信号発生回路325の構成例を示すブロック図である。制御信号発生回路325は、論理和回路369を更に有している点以外は、図2の制御信号発生回路125と同様である。   FIG. 7 is a block diagram illustrating a configuration example of the control signal generation circuit 325 of FIG. The control signal generation circuit 325 is the same as the control signal generation circuit 125 in FIG. 2 except that the control signal generation circuit 325 further includes an OR circuit 369.

図8は、図6の情報処理装置300の動作の例を示すタイミングチャートである。例として、制御信号INRは負論理であるとして説明する。この場合、制御信号INRが「0」になることにより、割り込み処理が開始される。第1の実施形態と同様にウェイト命令「WAIT Dm」が実行される場合について、図3の場合と異なる点についてのみ説明する。   FIG. 8 is a timing chart showing an example of the operation of the information processing apparatus 300 of FIG. As an example, the control signal INR is assumed to be negative logic. In this case, when the control signal INR becomes “0”, the interrupt process is started. As in the first embodiment, the case where the wait instruction “WAIT Dm” is executed will be described only with respect to differences from the case of FIG.

レジスタDmが格納している値は5であるとし、制御信号INRは「1」であるとする。時刻T4までの動作は、図3の場合と同様である。ただし、論理和回路369は、比較器68から出力される一致信号CMRと、制御信号INRを反転させた結果との論理和を求め、その結果を信号CINとして一致信号CMRに代えて制御回路62に与える。   Assume that the value stored in the register Dm is 5, and the control signal INR is “1”. The operation up to time T4 is the same as in FIG. However, the logical sum circuit 369 calculates the logical sum of the coincidence signal CMR output from the comparator 68 and the result of inverting the control signal INR, and uses the result as the signal CIN instead of the coincidence signal CMR. To give.

時刻T4〜T5において、割り込み要求が発生したとする。このとき、制御信号INRが「0」になる。割り込み制御回路302は、CPU110に割り込みを行う。しかし、CPU110は、ウェイト命令実行中であってパイプラインを停止しているため、割り込みを受け付けない。   Assume that an interrupt request occurs at times T4 to T5. At this time, the control signal INR becomes “0”. The interrupt control circuit 302 interrupts the CPU 110. However, the CPU 110 does not accept an interrupt because the wait instruction is being executed and the pipeline is stopped.

論理和回路369は、制御信号INRが「0」になると、信号CINとして「1」を出力する。制御回路62は、信号CINが「1」になると、第1の実施形態において比較器68が一致と判定したときと同様に、ウェイト命令動作の終了と判断し、制御信号EC3として「0」を出力する。すると、論理和回路127は、制御信号ECPとして「0」を出力する。   The OR circuit 369 outputs “1” as the signal CIN when the control signal INR becomes “0”. When the signal CIN becomes “1”, the control circuit 62 determines the end of the wait instruction operation as in the case where the comparator 68 determines that they match in the first embodiment, and sets “0” as the control signal EC3. Output. Then, the OR circuit 127 outputs “0” as the control signal ECP.

CPU制御回路112は、制御信号ECPが「0」なので、各種制御信号PCNを出力し、時刻T5からCPU110のパイプライン動作を再開させる。すると、割り込み制御回路302から割り込みが行われている状態であるので、CPU110は割り込み処理を開始する。   Since the control signal ECP is “0”, the CPU control circuit 112 outputs various control signals PCN and restarts the pipeline operation of the CPU 110 from time T5. Then, since an interrupt is being performed from the interrupt control circuit 302, the CPU 110 starts interrupt processing.

以上のように、図6の情報処理装置によると、ウェイト命令の実行中であっても、CPU110が割り込み処理を実行することができる。   As described above, according to the information processing apparatus of FIG. 6, even when a wait instruction is being executed, the CPU 110 can execute an interrupt process.

なお、割り込み信号は負論理であるとして説明したが、正論理であってもよい。この場合には、論理和回路369の構成を変えればよい。また、割り込み信号が複数ある場合には、それらの論理和を制御信号発生回路325へ供給するようにすればよい。   Although the interrupt signal has been described as being negative logic, it may be positive logic. In this case, the configuration of the OR circuit 369 may be changed. If there are a plurality of interrupt signals, the logical sum of these signals may be supplied to the control signal generation circuit 325.

(第4の実施形態)
図1の装置によると、CPU110が待機している間にも、CPU110は電力を消費する。そこで本実施形態では、拡張演算器120から出力される制御信号ECPを用いて、待機中にはCPU110へのクロック信号の供給を停止し、無駄な電力消費を抑えるようにする。
(Fourth embodiment)
According to the apparatus of FIG. 1, the CPU 110 consumes power while the CPU 110 is on standby. Therefore, in the present embodiment, the control signal ECP output from the extended arithmetic unit 120 is used to stop the supply of the clock signal to the CPU 110 during standby, thereby suppressing unnecessary power consumption.

図9は、本発明の第4の実施形態に係る情報処理装置の構成を示すブロック図である。図9の情報処理装置400は、クロック制御回路480を更に有する点以外は、図1の情報処理装置100と同様である。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 9 is a block diagram showing the configuration of the information processing apparatus according to the fourth embodiment of the present invention. The information processing apparatus 400 in FIG. 9 is the same as the information processing apparatus 100 in FIG. 1 except that the information processing apparatus 400 further includes a clock control circuit 480. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図10は、図9のクロック制御回路480の構成例を示すブロック図である。クロック制御回路480は、インバータ482と、フリップフロップ(FF)484と、論理積回路486とを有している。   FIG. 10 is a block diagram illustrating a configuration example of the clock control circuit 480 of FIG. The clock control circuit 480 includes an inverter 482, a flip-flop (FF) 484, and an AND circuit 486.

インバータ482は、情報処理装置400の外部から供給されるクロック信号CLKを、その論理を反転させて出力する。FF484は、インバータ482の出力に同期して、拡張演算器120から供給される制御信号ECPの値を保持し、その値を制御信号FECとして出力する。論理積回路486は、制御信号FECを反転した値とクロック信号CLKとの論理積を求め、クロック信号CKPとしてCPU110に出力する。CPU110は、クロック信号CKPに従って動作する。   The inverter 482 outputs the clock signal CLK supplied from the outside of the information processing apparatus 400 with its logic inverted. The FF 484 holds the value of the control signal ECP supplied from the extended arithmetic unit 120 in synchronization with the output of the inverter 482, and outputs the value as the control signal FEC. The logical product circuit 486 obtains a logical product of a value obtained by inverting the control signal FEC and the clock signal CLK, and outputs the logical product to the CPU 110 as the clock signal CKP. The CPU 110 operates according to the clock signal CKP.

図11は、図9の情報処理装置400の動作の例を示すタイミングチャートである。ウェイト命令の実行中ではない場合には、制御信号ECPが「0」であるので、クロック信号CLKとクロック信号CKPとはほぼ同じ波形となる。第1の実施形態と同様にウェイト命令「WAIT Dm」が実行される場合について、図3の場合と異なる点についてのみ説明する。レジスタDmが格納している値は5であるとする。時刻T2までの動作は、図3の場合と同様である。   FIG. 11 is a timing chart showing an example of the operation of the information processing apparatus 400 of FIG. When the wait instruction is not being executed, since the control signal ECP is “0”, the clock signal CLK and the clock signal CKP have substantially the same waveform. As in the first embodiment, the case where the wait instruction “WAIT Dm” is executed will be described only with respect to differences from the case of FIG. It is assumed that the value stored in the register Dm is 5. The operation up to time T2 is the same as in the case of FIG.

時刻T2において制御信号ECPが「1」になるので、時刻T2〜T3において、FF484は、制御信号FECを「1」にする。制御信号FECが「1」なので、論理積回路486は、クロック信号CKPとして「0」を出力する。この状態は、時刻T8の前まで続く。クロック制御回路480から供給されるクロック信号CKPが「0」のままであるので、CPU110は、その全体の動作を停止する。   Since the control signal ECP becomes “1” at time T2, the FF 484 sets the control signal FEC to “1” at times T2 to T3. Since the control signal FEC is “1”, the AND circuit 486 outputs “0” as the clock signal CKP. This state continues until before time T8. Since the clock signal CKP supplied from the clock control circuit 480 remains “0”, the CPU 110 stops the entire operation.

時刻T7において、比較値保持回路64の出力データCMVとカウンタ回路66の出力データCNTとが一致するので、比較器68は一致信号CMRとして「1」を出力する。制御回路62は、一致信号CMRが「1」なので、ウェイト命令動作の終了と判断し、制御信号EC3として「0」を出力する。すると、論理和回路127は、制御信号ECPとして「0」を出力する。   At time T7, since the output data CMV of the comparison value holding circuit 64 and the output data CNT of the counter circuit 66 match, the comparator 68 outputs “1” as the match signal CMR. Since the coincidence signal CMR is “1”, the control circuit 62 determines that the wait instruction operation is finished, and outputs “0” as the control signal EC3. Then, the OR circuit 127 outputs “0” as the control signal ECP.

制御信号ECPが「0」なので、クロック制御回路480のFF484は、制御信号FECとして「0」を出力する。論理積回路486は、クロック信号CKPとしてクロック信号CLKをそのまま出力する。したがって、時刻T8から、CPU110へのクロック信号CKPの供給が再開され、CPU110は通常のパイプライン動作を開始する。   Since the control signal ECP is “0”, the FF 484 of the clock control circuit 480 outputs “0” as the control signal FEC. The AND circuit 486 outputs the clock signal CLK as it is as the clock signal CKP. Accordingly, the supply of the clock signal CKP to the CPU 110 is resumed from time T8, and the CPU 110 starts a normal pipeline operation.

以上のように、図9の情報処理装置はクロック制御回路480を有しているので、ウェイト命令実行中にCPU110に無駄なクロック信号を供給することがなくなり、電力消費を抑えることができる。   As described above, since the information processing apparatus of FIG. 9 includes the clock control circuit 480, it is not necessary to supply a useless clock signal to the CPU 110 during execution of a wait instruction, and power consumption can be suppressed.

なお、演算器123又は124が、拡張命令によって複数サイクルCPU110を待たせて演算処理をする場合にも、同様にCPU110へのクロック信号CKPの供給を制御することができ、拡張演算実行時の電力消費を抑えることができる。   Note that when the arithmetic unit 123 or 124 waits for a plurality of cycles of the CPU 110 according to the extension instruction to perform the arithmetic processing, the supply of the clock signal CKP to the CPU 110 can be similarly controlled, and the power at the time of execution of the extension arithmetic is executed. Consumption can be suppressed.

(第5の実施形態)
本実施形態では、拡張演算器が外部の回路を制御する例について説明する。
(Fifth embodiment)
In this embodiment, an example in which an extended arithmetic unit controls an external circuit will be described.

図12は、本発明の第5の実施形態に係る情報処理装置の構成を示すブロック図である。図12の情報処理装置500は、拡張演算器120に代えて拡張演算器520を有する点以外は、図1の情報処理装置100と同様である。拡張演算器520は、制御信号発生回路125に代えて制御信号発生回路525を有する点以外は、拡張演算器120と同様である。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 12 is a block diagram showing the configuration of the information processing apparatus according to the fifth embodiment of the present invention. The information processing apparatus 500 in FIG. 12 is the same as the information processing apparatus 100 in FIG. 1 except that an extended arithmetic unit 520 is provided instead of the extended arithmetic unit 120. The extended arithmetic unit 520 is the same as the extended arithmetic unit 120 except that it has a control signal generation circuit 525 instead of the control signal generation circuit 125. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図13は、図12の制御信号発生回路525の構成例を示すブロック図である。制御信号発生回路525は、制御回路62に代えて制御回路562を有している点以外は、図2の制御信号発生回路125と同様である。   FIG. 13 is a block diagram illustrating a configuration example of the control signal generation circuit 525 of FIG. The control signal generation circuit 525 is the same as the control signal generation circuit 125 in FIG. 2 except that a control circuit 562 is provided instead of the control circuit 62.

図14は、図12の情報処理装置500の動作の例を示すタイミングチャートである。外部信号出力命令A(信号生成命令)は、拡張演算器520に、CPUが設定した時間の経過後に、情報処理装置500の外部へ制御信号を出力させるための拡張命令である。外部信号出力命令B(信号生成命令)は、拡張演算器520に、CPUが設定した時間の間隔で、情報処理装置500の外部へ制御信号を繰り返し出力させるための拡張命令である。信号生成終了命令は、外部信号出力命令Bのための動作を終了するための拡張命令である。   FIG. 14 is a timing chart showing an example of the operation of the information processing apparatus 500 of FIG. The external signal output command A (signal generation command) is an extended command for causing the extended arithmetic unit 520 to output a control signal to the outside of the information processing apparatus 500 after the time set by the CPU has elapsed. The external signal output command B (signal generation command) is an extended command for causing the extended arithmetic unit 520 to repeatedly output a control signal to the outside of the information processing apparatus 500 at time intervals set by the CPU. The signal generation end instruction is an extension instruction for ending the operation for the external signal output instruction B.

以下では、例として、外部信号出力命令A及び外部信号出力命令Bが出力させる制御信号が、割り込み要求のための制御信号であり、信号生成終了命令として割り込み終了命令を用いる場合について説明する。外部信号出力命令A、外部信号出力命令B及び割り込み終了命令は、それぞれ、例えば「SWIO Dm」、「SWII Dm」、「SWIE」(DmはレジスタD0〜D3のいずれかを示す)と記述される。   Hereinafter, as an example, a case will be described in which the control signal output by the external signal output command A and the external signal output command B is a control signal for an interrupt request, and the interrupt end command is used as the signal generation end command. The external signal output command A, the external signal output command B, and the interrupt end command are described as, for example, “SWIO Dm”, “SWII Dm”, and “SWIE” (Dm indicates one of the registers D0 to D3). .

図14において、各ステージの「IO」は、外部信号出力命令Aの処理中であることを示し、「II」は、外部信号出力命令Bの処理中であることを示し、「IE」は、割り込み終了命令の処理中であることを示す。   In FIG. 14, “IO” of each stage indicates that the external signal output instruction A is being processed, “II” indicates that the external signal output instruction B is being processed, and “IE” Indicates that an interrupt end instruction is being processed.

外部信号出力命令Aが実行される際の情報処理装置500の動作について説明する。ウェイト命令の場合と同様に、CPU110は、ROM130から外部信号出力命令Aを読み出し、デコードを行い、得られたデコード信号CDCを出力する。CPU制御回路112は、デコード信号CDCに基づいて各種制御信号PCNを生成し、CPU110の各回路に出力する。   The operation of the information processing apparatus 500 when the external signal output command A is executed will be described. As in the case of the wait instruction, the CPU 110 reads the external signal output instruction A from the ROM 130, performs decoding, and outputs the obtained decode signal CDC. The CPU control circuit 112 generates various control signals PCN based on the decode signal CDC and outputs them to each circuit of the CPU 110.

拡張演算器520の拡張命令デコーダ121は、外部信号出力命令Aをデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、外部信号出力命令Aが実行されたことをデコード信号EDCから判定し、時刻T1〜T2において制御信号IC3を出力する。   The extension instruction decoder 121 of the extension arithmetic unit 520 decodes the external signal output instruction A and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the external signal output instruction A has been executed, and outputs a control signal IC3 at times T1 to T2.

時刻T2において、CPU110は、外部信号出力命令Aのデコードの結果得られた各種制御信号PCNに従って、汎用レジスタ113のレジスタDmから値を読み出してデータ入力バス143に出力する。制御信号発生回路525の制御回路562は、制御信号IC3に従って外部信号出力命令Aの処理を開始する。制御回路562は、図2の制御回路62と同様に、比較値保持回路64及びカウンタ回路66を制御する。比較器68は、比較値保持回路64の出力データCMVと、カウンタ回路66の出力データCNTとを比較し、両者が一致しないので、一致信号CMRとして「0」を出力する。   At time T2, the CPU 110 reads a value from the register Dm of the general-purpose register 113 and outputs it to the data input bus 143 according to various control signals PCN obtained as a result of decoding the external signal output instruction A. Control circuit 562 of control signal generation circuit 525 starts processing of external signal output command A in accordance with control signal IC3. The control circuit 562 controls the comparison value holding circuit 64 and the counter circuit 66 in the same manner as the control circuit 62 in FIG. The comparator 68 compares the output data CMV of the comparison value holding circuit 64 with the output data CNT of the counter circuit 66 and outputs “0” as the match signal CMR because they do not match.

外部信号出力命令Aを実行中は、制御回路562は、常に制御信号EC3として「0」を出力し、CPU110のパイプライン動作を停止させることはない。また、一致信号CMRが「0」なので、制御回路562は、制御信号INRとして「1」を出力する。外部信号出力命令Aの実行中は、比較値保持回路64は値を保持し、カウンタ回路66はカウントアップを続ける。比較器68は、出力データCMVと出力データCNTとが一致するまで一致信号CMRとして「0」を出力するので、制御回路562は、制御信号INRとして「1」を出力し続ける。   During execution of the external signal output instruction A, the control circuit 562 always outputs “0” as the control signal EC3, and does not stop the pipeline operation of the CPU 110. Since the coincidence signal CMR is “0”, the control circuit 562 outputs “1” as the control signal INR. During execution of the external signal output instruction A, the comparison value holding circuit 64 holds the value, and the counter circuit 66 continues to count up. Since the comparator 68 outputs “0” as the coincidence signal CMR until the output data CMV and the output data CNT coincide with each other, the control circuit 562 continues to output “1” as the control signal INR.

時刻T5において、出力データCMVと出力データCNTとが一致するので、比較器68は、一致信号CMRとして「1」を出力する。制御回路562は、一致信号CMRが「1」なので、制御信号INRとして「0」を出力し、時刻T6において外部信号出力命令Aのための動作を終了する。割り込み制御回路302は、拡張演算器520から供給される制御信号INRが「0」になるので、割り込み信号をCPU110に出力し、CPU110は割り込み処理を開始する。   At time T5, since the output data CMV and the output data CNT match, the comparator 68 outputs “1” as the match signal CMR. Since the match signal CMR is “1”, the control circuit 562 outputs “0” as the control signal INR, and ends the operation for the external signal output command A at time T6. The interrupt control circuit 302 outputs an interrupt signal to the CPU 110 because the control signal INR supplied from the extended arithmetic unit 520 becomes “0”, and the CPU 110 starts interrupt processing.

以上のように、拡張演算器520が、その外部に制御信号INRを出力するので、外部信号出力命令Aを実行することにより、レジスタDmに設定されたサイクル数の経過後に、CPU110に割り込みを行うことができる。   As described above, since the extended arithmetic unit 520 outputs the control signal INR to the outside, the CPU 110 is interrupted after the number of cycles set in the register Dm by executing the external signal output instruction A. be able to.

外部信号出力命令Bが実行される際の情報処理装置500の動作について説明する。時刻T6,T7において、CPU110は、ROM130から外部信号出力命令Bを読み出し、デコードを行う。CPU制御回路112は、CPU110内部の各回路に各種制御信号PCNを出力する。   An operation of the information processing apparatus 500 when the external signal output command B is executed will be described. At times T6 and T7, the CPU 110 reads the external signal output command B from the ROM 130 and decodes it. The CPU control circuit 112 outputs various control signals PCN to each circuit inside the CPU 110.

拡張演算器520の拡張命令デコーダ121は、外部信号出力命令Bをデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、外部信号出力命令Bが実行されたことをデコード信号EDCから判定し、拡張演算器520内の各回路に制御信号を出力する。   The extension instruction decoder 121 of the extension arithmetic unit 520 decodes the external signal output instruction B and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the external signal output instruction B has been executed, and outputs a control signal to each circuit in the extension arithmetic unit 520.

時刻T8において、制御信号発生回路525の制御回路562は、制御信号IC3に従って外部信号出力命令Bの処理を開始する。制御回路562は、図2の制御回路62と同様に、比較値保持回路64及びカウンタ回路66を制御する。また、制御回路562は、外部信号出力命令Bが実行中であるという情報を保持する。   At time T8, the control circuit 562 of the control signal generation circuit 525 starts processing the external signal output command B according to the control signal IC3. The control circuit 562 controls the comparison value holding circuit 64 and the counter circuit 66 in the same manner as the control circuit 62 in FIG. The control circuit 562 holds information that the external signal output command B is being executed.

比較器68は、比較値保持回路64の出力データCMVと、カウンタ回路66の出力データCNTとを比較する。時刻T8〜T10においては、両者が一致しないので、比較器68は、一致信号CMRとして「0」を出力し、制御回路562は、制御信号INRとして「1」を出力する。   The comparator 68 compares the output data CMV of the comparison value holding circuit 64 with the output data CNT of the counter circuit 66. At times T8 to T10, since they do not match, the comparator 68 outputs “0” as the match signal CMR, and the control circuit 562 outputs “1” as the control signal INR.

時刻T10において、出力データCMVと出力データCNTとが一致するので、比較器68は、一致信号CMRとして「1」を出力し、制御回路562は、制御信号INRとして「0」を出力する。制御回路562は、外部信号出力命令Bが実行中であるという情報を保持しているので、一致信号CMRが「1」になっても、カウンタ回路66の出力データCNTの値を「0」にリセットするだけで、動作を終了せず、時刻T11以降も同じ動作を繰り返し実行する。   At time T10, since the output data CMV and the output data CNT match, the comparator 68 outputs “1” as the match signal CMR, and the control circuit 562 outputs “0” as the control signal INR. Since the control circuit 562 holds information that the external signal output command B is being executed, even if the coincidence signal CMR becomes “1”, the value of the output data CNT of the counter circuit 66 is set to “0”. Only resetting does not end the operation, and the same operation is repeated after time T11.

外部信号出力命令Bを実行中に、新たな外部信号出力命令Bを実行した場合には、図14の時刻T19に示すように、比較値保持回路64の出力データCMVが書き換えられるが、外部信号出力命令Bの処理は継続される。この場合には、出力データCMVが書き換えられた時点から、制御回路562は、新たな外部信号出力命令Bに設定されたサイクル数毎に、割り込み要求を繰り返し出力する動作を繰り返す。   When a new external signal output command B is executed while the external signal output command B is being executed, the output data CMV of the comparison value holding circuit 64 is rewritten as shown at time T19 in FIG. Processing of output instruction B is continued. In this case, from the time when the output data CMV is rewritten, the control circuit 562 repeats the operation of repeatedly outputting an interrupt request for each number of cycles set in the new external signal output command B.

また、図14の時刻T26に示すように、割り込み終了命令を実行した時点で、制御信号発生回路525の制御回路562は動作を終了し、カウンタ回路66をリセットする。   Further, as shown at time T26 in FIG. 14, when the interrupt end instruction is executed, the control circuit 562 of the control signal generation circuit 525 ends the operation and resets the counter circuit 66.

このように、外部信号出力命令Bを実行することにより、レジスタDmに設定したサイクル数毎に割り込み要求を出力することができ、割り込み終了命令を実行することにより、外部信号出力命令Bのための動作を終了させることができる。   As described above, by executing the external signal output instruction B, an interrupt request can be output for each number of cycles set in the register Dm, and by executing the interrupt end instruction, The operation can be terminated.

なお、拡張演算器520から出力される制御信号INRは、CPU110への割り込みの制御を行う割り込み制御回路302に与えられているが、情報処理装置500の外部にある回路、例えばプロセッサ、タイマ、A/D変換器等に与えるようにしてもよい。すると、制御信号INRによってこれらの回路を制御することができる。   Note that the control signal INR output from the extended arithmetic unit 520 is given to an interrupt control circuit 302 that controls an interrupt to the CPU 110, but a circuit outside the information processing apparatus 500, such as a processor, a timer, and A You may make it give to / D converter etc. Then, these circuits can be controlled by the control signal INR.

以上のように、拡張演算器520は、制御信号発生回路525の制御信号INRを情報処理装置500の外部の回路に出力しているので、情報処理装置500は、1つの拡張命令を実行することによって、情報処理装置500の外部の回路を直接制御することができる。   As described above, the extension computing unit 520 outputs the control signal INR of the control signal generation circuit 525 to a circuit outside the information processing apparatus 500, so that the information processing apparatus 500 executes one extension instruction. Thus, a circuit outside the information processing apparatus 500 can be directly controlled.

(第6の実施形態)
図12の装置によると外部回路の制御が可能となるが、外部回路の制御には特定の波形を有する制御信号が必要な場合が多い。そこで本実施形態では、拡張演算器120に供給される2つのデータを用いて、制御信号が「0」である期間の長さと、「1」である期間の長さとを設定するようにし、任意の波形の制御信号を出力することができるようにする。
(Sixth embodiment)
Although the external circuit can be controlled with the apparatus shown in FIG. 12, a control signal having a specific waveform is often required to control the external circuit. Therefore, in this embodiment, the length of the period in which the control signal is “0” and the length of the period in which “1” is set are set using two pieces of data supplied to the extended arithmetic unit 120. It is possible to output a control signal having a waveform.

図15は、本発明の第6の実施形態に係る情報処理装置の構成を示すブロック図である。図15の情報処理装置600は、拡張演算器120に代えて拡張演算器620を有する点以外は、図1の情報処理装置100と同様である。拡張演算器620は、制御信号発生回路125に代えて制御信号発生回路625を有する点以外は、拡張演算器120と同様である。A/D変換器602は、情報処理装置600の外部にあり、拡張演算器620の制御信号発生回路625から供給される制御信号CADに従ってA/D変換処理を行う。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 15 is a block diagram showing the configuration of the information processing apparatus according to the sixth embodiment of the present invention. The information processing apparatus 600 in FIG. 15 is the same as the information processing apparatus 100 in FIG. 1 except that an extended arithmetic unit 620 is provided instead of the extended arithmetic unit 120. The extended arithmetic unit 620 is the same as the extended arithmetic unit 120 except that it has a control signal generation circuit 625 instead of the control signal generation circuit 125. The A / D converter 602 is external to the information processing apparatus 600 and performs A / D conversion processing according to the control signal CAD supplied from the control signal generation circuit 625 of the extended arithmetic unit 620. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図16は、図15の制御信号発生回路625の構成例を示すブロック図である。制御信号発生回路625は、制御回路62に代えて制御回路662を有し、比較値保持回路665と、セレクタ667とを更に有している点以外は、図2の制御信号発生回路125と同様である。   FIG. 16 is a block diagram showing a configuration example of the control signal generation circuit 625 of FIG. The control signal generation circuit 625 includes a control circuit 662 instead of the control circuit 62, and is similar to the control signal generation circuit 125 of FIG. 2 except that it further includes a comparison value holding circuit 665 and a selector 667. It is.

図17は、図15の情報処理装置600の動作の例を示すタイミングチャートである。信号生成命令は、CPUが設定したサイクル数を用いて、値が「0」である期間の長さと、値が「1」である期間の長さとが指定された制御信号を生成するための拡張命令である。信号生成命令は、例えば「SWSG Dm,Dn」(Dm,DnはレジスタD0〜D3のいずれかを示す)と記述される。図17において、各ステージの「SG」は、信号生成命令の処理中であることを示す。   FIG. 17 is a timing chart showing an example of the operation of the information processing apparatus 600 of FIG. The signal generation command is an extension for generating a control signal in which the length of a period whose value is “0” and the length of a period whose value is “1” are specified using the number of cycles set by the CPU. It is an instruction. The signal generation instruction is described, for example, as “SWSG Dm, Dn” (Dm, Dn indicates one of the registers D0 to D3). In FIG. 17, “SG” in each stage indicates that a signal generation instruction is being processed.

信号生成命令が実行される際の情報処理装置600の動作について説明する。ウェイト命令の場合と同様に、CPU110は、ROM130から信号生成命令を読み出し、デコードを行い、得られたデコード信号CDCを出力する。CPU制御回路112は、デコード信号CDCに基づいて各種制御信号PCNを生成し、CPU110の各回路に出力する。   An operation of the information processing apparatus 600 when the signal generation instruction is executed will be described. As in the case of the wait instruction, the CPU 110 reads the signal generation instruction from the ROM 130, performs decoding, and outputs the obtained decoded signal CDC. The CPU control circuit 112 generates various control signals PCN based on the decode signal CDC and outputs them to each circuit of the CPU 110.

拡張演算器620の拡張命令デコーダ121は、信号生成命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、信号生成命令が実行されたことをデコード信号EDCから判定し、時刻T1〜T2において制御信号IC3を出力する。   The extension instruction decoder 121 of the extension arithmetic unit 620 decodes the signal generation instruction and outputs the obtained decode signal EDC. The extension instruction control circuit 122 determines from the decode signal EDC that the signal generation instruction has been executed, and outputs a control signal IC3 at times T1 to T2.

時刻T2において、CPU110は、信号生成命令のデコードの結果得られた各種制御信号PCNに従って、汎用レジスタ113のレジスタDmから値を読み出してデータ入力バス143に出力し、汎用レジスタ113のレジスタDnから値を読み出してデータ入力バス144に出力する。制御信号発生回路625内の制御回路662は、制御信号IC3に従って、信号生成命令の処理を開始し、制御信号CH,CC,CSを生成して出力する。   At time T2, the CPU 110 reads a value from the register Dm of the general-purpose register 113 according to various control signals PCN obtained as a result of decoding the signal generation instruction, outputs the value to the data input bus 143, and outputs a value from the register Dn of the general-purpose register 113. Is output to the data input bus 144. The control circuit 662 in the control signal generation circuit 625 starts processing of a signal generation command according to the control signal IC3, and generates and outputs the control signals CH, CC, CS.

比較値保持回路64は、制御信号CHに従って、データ入力バス143の値を保持し、出力データCM1として出力する。比較値保持回路665は、制御信号CHに従って、データ入力バス144の値を保持し、出力データCM2として出力する。セレクタ667は、制御信号CSに従って、出力データCM1を選択して出力する。カウンタ回路66は、制御信号CCに従って、カウントアップを開始し、カウント値を出力データCNTとして出力する。   The comparison value holding circuit 64 holds the value of the data input bus 143 according to the control signal CH, and outputs it as output data CM1. The comparison value holding circuit 665 holds the value of the data input bus 144 in accordance with the control signal CH and outputs it as output data CM2. The selector 667 selects and outputs the output data CM1 according to the control signal CS. The counter circuit 66 starts counting up according to the control signal CC and outputs the count value as output data CNT.

比較器68は、セレクタ667の出力データと出力データCNTとを比較し、両者が一致しないので、一致信号CMRとして「0」を出力する。制御回路662は、信号生成命令を実行中は、常に、制御信号EC3として「0」を出力し、CPU110のパイプライン動作を停止させることはない。また、一致信号CMRが「0」なので、制御回路662は、制御信号CADとして「1」を出力する。   The comparator 68 compares the output data of the selector 667 with the output data CNT and outputs “0” as the match signal CMR because they do not match. While the signal generation instruction is being executed, the control circuit 662 always outputs “0” as the control signal EC3 and does not stop the pipeline operation of the CPU 110. Since the coincidence signal CMR is “0”, the control circuit 662 outputs “1” as the control signal CAD.

信号生成命令の実行中は、比較値保持回路64及び665は値を保持し、カウンタ回路66はカウントアップを続ける。比較器68は、セレクタ667の出力データと出力データCNTとが一致するまで、一致信号CMRとして「0」を出力するので、制御回路662は、制御信号CADとして「1」を出力し続ける。   During the execution of the signal generation instruction, the comparison value holding circuits 64 and 665 hold the value, and the counter circuit 66 continues to count up. Since the comparator 68 outputs “0” as the coincidence signal CMR until the output data of the selector 667 coincides with the output data CNT, the control circuit 662 continues to output “1” as the control signal CAD.

時刻T5において、セレクタ667の出力データと出力データCNTとが一致するので、比較器68は、一致信号CMRとして「1」を出力する。制御回路662は、一致信号CMRが「1」なので、時刻T6において制御信号CADとして「0」を出力し、セレクタ667への制御信号を切り替え、カウンタ回路66をリセットしてカウンタ回路66の保持する値を「0」にする。   At time T5, the output data of the selector 667 matches the output data CNT, so the comparator 68 outputs “1” as the match signal CMR. Since the match signal CMR is “1”, the control circuit 662 outputs “0” as the control signal CAD at time T6, switches the control signal to the selector 667, resets the counter circuit 66, and holds the counter circuit 66. Set the value to “0”.

セレクタ667は、制御回路662からの制御信号に従って、出力データCM2を選択して出力する。カウンタ回路66は、制御回路662からの制御信号に従って、再びカウントアップを開始し、カウント値を出力データCNTとして出力する。比較器68は、セレクタ667の出力データと出力データCNTとを比較し、両者が一致しないので、一致信号CMRとして「0」を出力する。   The selector 667 selects and outputs the output data CM2 according to the control signal from the control circuit 662. The counter circuit 66 starts counting up again in accordance with the control signal from the control circuit 662, and outputs the count value as output data CNT. The comparator 68 compares the output data of the selector 667 with the output data CNT and outputs “0” as the match signal CMR because they do not match.

制御回路662の制御によって、比較値保持回路64,665は値を保持し、カウンタ回路66はカウントアップを続ける。比較器68は、セレクタ667の出力データと出力データCNTとが一致するまで、一致信号CMRとして「0」を出力するので、制御回路662は、制御信号CADとして「1」を出力し続ける。   Under the control of the control circuit 662, the comparison value holding circuits 64 and 665 hold values, and the counter circuit 66 continues to count up. Since the comparator 68 outputs “0” as the coincidence signal CMR until the output data of the selector 667 coincides with the output data CNT, the control circuit 662 continues to output “1” as the control signal CAD.

時刻T8において、セレクタ667の出力データと出力データCNTとが一致するので、比較器68は、一致信号CMRとして「1」を出力する。制御回路662は、一致信号CMRが「1」なので、制御信号CADとして「0」を出力し、時刻T9において信号生成命令のための動作を終了する。A/D変換器602は、拡張演算器620から供給される制御信号CADの波形に基づいて、A/D変換処理を実行する。   At time T8, the output data of the selector 667 matches the output data CNT, so the comparator 68 outputs “1” as the match signal CMR. Since the coincidence signal CMR is “1”, the control circuit 662 outputs “0” as the control signal CAD, and ends the operation for the signal generation instruction at time T9. The A / D converter 602 executes A / D conversion processing based on the waveform of the control signal CAD supplied from the extended arithmetic unit 620.

以上のように、拡張演算器620は、信号生成命令を実行することにより、CPU110の汎用レジスタ113から読み出された2つのデータを用いて、値が「0」である期間の長さと、値が「1」である期間の長さとが指定された制御信号を生成することができる。   As described above, the extended arithmetic unit 620 executes the signal generation instruction, thereby using the two data read from the general-purpose register 113 of the CPU 110, the length of the period in which the value is “0”, the value A control signal in which the length of the period in which “1” is “1” is designated can be generated.

なお、第5の実施形態で説明した外部信号出力命令Bのように、信号生成命令の動作を繰り返し実行する命令を実装することは、制御回路662を用いれば容易に実現できる。また、本実施形態では、レジスタDmが「1」の期間、レジスタDnが「0」の期間のサイクル数を指定する場合について説明したが、逆であってもよい。   Note that it is possible to easily implement an instruction for repeatedly executing the operation of the signal generation instruction, such as the external signal output instruction B described in the fifth embodiment, by using the control circuit 662. In this embodiment, the case has been described in which the number of cycles in the period in which the register Dm is “1” and the period in which the register Dn is “0” is specified.

(第7の実施形態)
以上の実施形態では、拡張命令に関する期間の長さをクロック信号のサイクル数で指定しているが、クロック信号の周波数を変更すると、指定するサイクル数を変更する必要がある。そこで本実施形態では、クロック信号の周波数を変更しても、ソフトウェアプログラムの変更をしなくても済むようにする。
(Seventh embodiment)
In the above embodiment, the length of the period related to the extension instruction is designated by the number of cycles of the clock signal. However, when the frequency of the clock signal is changed, the number of designated cycles needs to be changed. Therefore, in this embodiment, even if the frequency of the clock signal is changed, it is not necessary to change the software program.

図18は、本発明の第7の実施形態に係る情報処理装置の構成を示すブロック図である。図18の情報処理装置700は、拡張演算器120に代えて拡張演算器720を有する点以外は、図1の情報処理装置100と同様である。拡張演算器720は、制御信号発生回路125に代えて制御信号発生回路725を有する点以外は、拡張演算器120と同様である。情報処理装置100の構成要素と同一の構成要素については、同一の参照番号を付してその説明を省略する。   FIG. 18 is a block diagram showing the configuration of the information processing apparatus according to the seventh embodiment of the present invention. The information processing apparatus 700 in FIG. 18 is the same as the information processing apparatus 100 in FIG. 1 except that an extended arithmetic unit 720 is provided instead of the extended arithmetic unit 120. The extended arithmetic unit 720 is the same as the extended arithmetic unit 120 except that it has a control signal generation circuit 725 instead of the control signal generation circuit 125. The same components as those of the information processing apparatus 100 are denoted by the same reference numerals and the description thereof is omitted.

図19は、図18の制御信号発生回路725の構成例を示すブロック図である。制御信号発生回路725は、制御回路62及びカウンタ回路66に代えて制御回路762及びカウンタ回路766を有し、基準サイクル保持回路774と、カウンタ回路776と、比較器778と、論理積回路769とを更に有している点以外は、図2の制御信号発生回路125と同様である。カウンタ回路766は、比較器778から出力される制御信号CMR2が「1」である場合に、クロック信号CLKのパルスのカウントを行う。その他の点は、カウンタ回路66と同様である。   FIG. 19 is a block diagram showing a configuration example of the control signal generation circuit 725 of FIG. The control signal generation circuit 725 includes a control circuit 762 and a counter circuit 766 instead of the control circuit 62 and the counter circuit 66, and includes a reference cycle holding circuit 774, a counter circuit 776, a comparator 778, and an AND circuit 769. 2 is the same as the control signal generation circuit 125 of FIG. The counter circuit 766 counts pulses of the clock signal CLK when the control signal CMR2 output from the comparator 778 is “1”. The other points are the same as those of the counter circuit 66.

図20は、図18の情報処理装置700の動作の例を示すタイミングチャートである。基準サイクル設定命令は、制御信号発生回路725の基準サイクル保持回路774に、CPUが設定したサイクル数を保持させる拡張命令である。基準サイクル設定命令は、例えば「PUTD Dm」(DmはレジスタD0〜D3のいずれかを示す)と記述される。図20において、各ステージの「PD」は、基準サイクル設定命令の処理中であることを示す。   FIG. 20 is a timing chart showing an example of the operation of the information processing apparatus 700 of FIG. The reference cycle setting instruction is an extension instruction that causes the reference cycle holding circuit 774 of the control signal generation circuit 725 to hold the number of cycles set by the CPU. The reference cycle setting instruction is described, for example, as “PUTD Dm” (Dm indicates one of the registers D0 to D3). In FIG. 20, “PD” in each stage indicates that a reference cycle setting instruction is being processed.

基準サイクル設定命令が実行される際の情報処理装置700の動作について説明する。ウェイト命令の場合と同様に、CPU110は、ROM130から基準サイクル設定命令を読み出し、デコードを行い、得られたデコード信号CDCを出力する。CPU制御回路112は、デコード信号CDCに基づいて各種制御信号PCNを生成し、CPU110の各回路に出力する。   An operation of the information processing apparatus 700 when the reference cycle setting instruction is executed will be described. As in the case of the wait instruction, the CPU 110 reads the reference cycle setting instruction from the ROM 130, performs decoding, and outputs the obtained decode signal CDC. The CPU control circuit 112 generates various control signals PCN based on the decode signal CDC and outputs them to each circuit of the CPU 110.

拡張演算器720の拡張命令デコーダ121は、基準サイクル設定命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、基準サイクル設定命令が実行されたことをデコード信号EDCから判定し、時刻T1〜T2において制御信号IC3を出力する。   The extended instruction decoder 121 of the extended arithmetic unit 720 decodes the reference cycle setting instruction and outputs the obtained decode signal EDC. The extended instruction control circuit 122 determines from the decode signal EDC that the reference cycle setting instruction has been executed, and outputs a control signal IC3 at times T1 to T2.

時刻T2で、CPU110は、基準サイクル設定命令で指定された、汎用レジスタ113のレジスタDmから値を読み出し、データ入力バス143に出力する。制御信号発生回路725内の制御回路762は、制御信号IC3に従って制御信号CSHを出力し、基準サイクル設定命令のための動作を終了する。基準サイクル保持回路774は、制御信号CSHに従って、レジスタDmから読み出されたデータ入力バス143の値を基準サイクル数として保持し、これを出力データRCとして出力する。   At time T <b> 2, the CPU 110 reads a value from the register Dm of the general-purpose register 113 specified by the reference cycle setting instruction and outputs it to the data input bus 143. The control circuit 762 in the control signal generation circuit 725 outputs the control signal CSH according to the control signal IC3, and ends the operation for the reference cycle setting command. In accordance with the control signal CSH, the reference cycle holding circuit 774 holds the value of the data input bus 143 read from the register Dm as the reference cycle number, and outputs this as output data RC.

基準サイクル設定命令の場合と同様に、CPU110は、次の命令であるウェイト命令の読み出し、デコードを行い、CPU制御回路112は、各種制御信号PCNを生成する。拡張命令デコーダ121は、ウェイト命令をデコードし、得られたデコード信号EDCを出力する。拡張命令制御回路122は、ウェイト命令が実行されたことをデコード信号EDCから判定し、時刻T2〜T3において制御信号IC3を出力する。   As in the case of the reference cycle setting instruction, the CPU 110 reads and decodes the next wait instruction, and the CPU control circuit 112 generates various control signals PCN. The extension instruction decoder 121 decodes the wait instruction and outputs the obtained decode signal EDC. The extended instruction control circuit 122 determines from the decode signal EDC that the wait instruction has been executed, and outputs a control signal IC3 at times T2 to T3.

時刻T3において、CPU110は、ウェイト命令のデコードの結果得られた各種制御信号PCNに従って、汎用レジスタ113のレジスタDmから値を読み出してデータ入力バス143に出力する。制御回路762は、制御信号IC3に従って、ウェイト命令の処理を開始し、制御信号CH,CC,CSH,CC2を生成して出力する。   At time T3, the CPU 110 reads a value from the register Dm of the general-purpose register 113 and outputs it to the data input bus 143 in accordance with various control signals PCN obtained as a result of decoding the wait instruction. The control circuit 762 starts the wait instruction processing according to the control signal IC3, and generates and outputs the control signals CH, CC, CSH, and CC2.

基準サイクル保持回路774は、制御信号CSHに従って、保持している値を出力データRCとして出力する。カウンタ回路776は、制御信号CC2に従って、クロック信号CLKのパルスのカウントアップ動作を行い、カウント値を出力データCNT2として出力する。比較器778は、出力データRCと出力データCNT2とを比較し、両者が一致しないので、「0」を制御信号CMR2として出力する。   Reference cycle holding circuit 774 outputs the held value as output data RC in accordance with control signal CSH. The counter circuit 776 performs a count-up operation of the pulse of the clock signal CLK according to the control signal CC2, and outputs the count value as output data CNT2. The comparator 778 compares the output data RC and the output data CNT2, and outputs “0” as the control signal CMR2 because they do not match.

比較値保持回路64は、制御信号CHに従って、レジスタDmから読み出されたデータ入力バス143の値をウェイトサイクル数として保持し、これを出力データCMVとして出力する。カウンタ回路766は、制御信号CMR2が「0」なので、カウントアップ動作は行わず、保持している値を出力データCNTとして出力する。比較器68は、出力データCMVと出力データCNTとを比較し、両者が一致しないので、「0」を制御信号CMRとして出力する。   The comparison value holding circuit 64 holds the value of the data input bus 143 read from the register Dm as the number of wait cycles in accordance with the control signal CH, and outputs this as output data CMV. Since the control signal CMR2 is “0”, the counter circuit 766 does not perform the count-up operation and outputs the held value as the output data CNT. The comparator 68 compares the output data CMV and the output data CNT, and outputs “0” as the control signal CMR because they do not match.

論理積回路769は、制御信号CMRと制御信号CMR2との間の論理積を求め、得られた「0」を制御信号CMPとして出力する。制御回路762は、制御信号CMPが「0」なので、制御信号EC3として「1」を出力する。このとき、論理和回路127は、制御信号ECPとして「1」を出力する。CPU制御回路112は、制御信号ECPが「1」なので、各種制御信号PCNを出力し、時刻T3からCPU110のパイプライン動作を停止させる。   The logical product circuit 769 calculates a logical product between the control signal CMR and the control signal CMR2, and outputs the obtained “0” as the control signal CMP. Since the control signal CMP is “0”, the control circuit 762 outputs “1” as the control signal EC3. At this time, the OR circuit 127 outputs “1” as the control signal ECP. Since the control signal ECP is “1”, the CPU control circuit 112 outputs various control signals PCN and stops the pipeline operation of the CPU 110 from time T3.

時刻T4では、制御信号CMR2が「0」なので、カウンタ回路766は、カウントアップ動作は行わず、保持している値を出力データCNTとして出力する。出力データCMVと出力データCNTとは一致しないので、比較器68は制御信号CMRとして「0」を出力する。カウンタ回路776がカウントアップ動作を行うが、出力データRCと出力データCNT2とは一致しないので、制御信号CMR2,CMPは「0」であり、制御回路762から出力される制御信号EC3は変わらない。   At time T4, since the control signal CMR2 is “0”, the counter circuit 766 does not perform the count-up operation and outputs the held value as the output data CNT. Since the output data CMV and the output data CNT do not match, the comparator 68 outputs “0” as the control signal CMR. Although the counter circuit 776 performs a count-up operation, since the output data RC and the output data CNT2 do not match, the control signals CMR2 and CMP are “0”, and the control signal EC3 output from the control circuit 762 does not change.

時刻T5では、制御信号CMR2が「0」なので、カウンタ回路766は、カウントアップ動作は行わず、保持している値を出力データCNTとして出力する。出力データCMVと出力データCNTとは一致しないので、比較器68は制御信号CMRとして「0」を出力する。カウンタ回路776がカウントアップ動作を行い、出力データRCと出力データCNT2とが一致するので、比較器778は、「1」を制御信号CMR2として出力する。論理積回路769は、制御信号CMRと制御信号CMR2との間の論理積を求め、得られた「0」を制御信号CMPとして出力する。このため、制御信号EC3は変わらない。   At time T5, since the control signal CMR2 is “0”, the counter circuit 766 does not perform the count-up operation and outputs the held value as the output data CNT. Since the output data CMV and the output data CNT do not match, the comparator 68 outputs “0” as the control signal CMR. Since the counter circuit 776 performs a count-up operation and the output data RC and the output data CNT2 match, the comparator 778 outputs “1” as the control signal CMR2. The logical product circuit 769 calculates a logical product between the control signal CMR and the control signal CMR2, and outputs the obtained “0” as the control signal CMP. For this reason, the control signal EC3 does not change.

時刻T6では、制御信号CMR2が「1」なので、カウンタ回路766は、カウントアップ動作を行い、カウント値を出力データCNTとして出力する。出力データCMVと出力データCNTとは一致しないので、比較器68は制御信号CMRとして「0」を出力する。カウンタ回路776は、制御信号CMR2によってリセットされ、カウント値が「0」になる。再び出力データRCと出力データCNT2とは一致しなくなるので、比較器778は、制御信号CMR2として「0」を出力する。制御信号CMPは「0」なので、制御信号EC3は変わらない。同様の動作が時刻T14まで繰り返される。   Since the control signal CMR2 is “1” at time T6, the counter circuit 766 performs a count-up operation and outputs the count value as output data CNT. Since the output data CMV and the output data CNT do not match, the comparator 68 outputs “0” as the control signal CMR. The counter circuit 776 is reset by the control signal CMR2, and the count value becomes “0”. Since the output data RC and the output data CNT2 do not coincide again, the comparator 778 outputs “0” as the control signal CMR2. Since the control signal CMP is “0”, the control signal EC3 does not change. A similar operation is repeated until time T14.

時刻T14では、制御信号CMR2が「0」なので、カウンタ回路766は、カウントアップ動作は行わず、保持している値を出力データCNTとして出力する。出力データCMVと出力データCNTとが一致するので、比較器68は制御信号CMRとして「1」を出力する。カウンタ回路776がカウントアップ動作を行い、出力データRCと出力データCNT2とが一致するので、比較器778は、「1」を制御信号CMR2として出力する。論理積回路769は、制御信号CMRと制御信号CMR2との間の論理積を求め、得られた「1」を制御信号CMPとして出力する。   At time T14, since the control signal CMR2 is “0”, the counter circuit 766 does not perform the count-up operation and outputs the held value as the output data CNT. Since the output data CMV and the output data CNT match, the comparator 68 outputs “1” as the control signal CMR. Since the counter circuit 776 performs a count-up operation and the output data RC and the output data CNT2 match, the comparator 778 outputs “1” as the control signal CMR2. The logical product circuit 769 calculates a logical product between the control signal CMR and the control signal CMR2, and outputs the obtained “1” as the control signal CMP.

制御回路762は、制御信号CMPが「1」なので、ウェイト命令動作の終了と判断し、制御信号EC3として「0」を出力する。このとき、論理和回路127は、制御信号ECPとして「0」を出力する。CPU制御回路112は、制御信号ECPが「0」なので、各種制御信号PCNを出力し、時刻T15からCPU110のパイプライン動作を再開させる。   Since the control signal CMP is “1”, the control circuit 762 determines that the wait command operation is finished, and outputs “0” as the control signal EC3. At this time, the OR circuit 127 outputs “0” as the control signal ECP. Since the control signal ECP is “0”, the CPU control circuit 112 outputs various control signals PCN and restarts the pipeline operation of the CPU 110 from time T15.

図20に示されているように、基準サイクル設定命令によってレジスタDmの値を基準サイクル保持回路774に設定した後、ウェイト命令を実行すると、「(基準サイクル数+1)×(ウェイトサイクル数+1)」サイクルの期間、CPU110の処理を待たせることができる。したがって、クロック信号CLKの周波数に応じて基準サイクル数の設定を変更すれば、ウェイトサイクル数の設定を変更しなくても、CPU110の待機時間を一定に保つことができる。したがって、クロック信号CLKの周波数を変更しても、ソフトウェアプログラムを変更する必要がなくなる。   As shown in FIG. 20, when the wait instruction is executed after the value of the register Dm is set in the reference cycle holding circuit 774 by the reference cycle setting instruction, “(reference cycle number + 1) × (wait cycle number + 1)” The processing of the CPU 110 can be made to wait for the period of the cycle. Therefore, if the setting of the reference cycle number is changed according to the frequency of the clock signal CLK, the waiting time of the CPU 110 can be kept constant without changing the setting of the wait cycle number. Therefore, it is not necessary to change the software program even if the frequency of the clock signal CLK is changed.

例えば、クロック信号CLKが10MHzのときには、汎用レジスタ113に9を設定して基準サイクル数が9となるようにし、クロック信号CLKが15MHzのときには、汎用レジスタ113に14を設定して基準サイクル数が14となるようにすればよい。汎用レジスタ113に9を設定してウェイト命令を実行する場合には、いずれの場合にも、CPU110の処理を10マイクロ秒の間待たせることができる。   For example, when the clock signal CLK is 10 MHz, 9 is set in the general-purpose register 113 so that the reference cycle number is 9. When the clock signal CLK is 15 MHz, 14 is set in the general-purpose register 113 and the reference cycle number is 14 may be set. When 9 is set in the general-purpose register 113 and a wait instruction is executed, the processing of the CPU 110 can be kept waiting for 10 microseconds in any case.

以上のように、図18の情報処理装置によると、クロック信号の周波数を変更してCPU110の動作周波数を変更した場合でも、ソフトウェアプログラムの変更をせずに、CPU110を一定時間待たせるようにすることができる。   As described above, according to the information processing apparatus of FIG. 18, even when the operating frequency of the CPU 110 is changed by changing the frequency of the clock signal, the CPU 110 is allowed to wait for a certain time without changing the software program. be able to.

なお、制御信号発生回路725を、第1〜第6の実施形態において用いるようにしてもよい。   The control signal generation circuit 725 may be used in the first to sixth embodiments.

図21は、図19の制御信号発生回路725の変形例を示すブロック図である。図19の制御信号発生回路725に代えて、図21の制御信号発生回路825を用いるようにしてもよい。制御信号発生回路825は、制御回路62、カウンタ回路66及び比較器68に代えて制御回路862、カウンタ回路866及び比較器868を有し、基準サイクル保持回路774を更に有している点以外は、図2の制御信号発生回路125と同様である。   FIG. 21 is a block diagram showing a modification of the control signal generation circuit 725 in FIG. A control signal generation circuit 825 in FIG. 21 may be used instead of the control signal generation circuit 725 in FIG. The control signal generation circuit 825 includes a control circuit 862, a counter circuit 866, and a comparator 868 instead of the control circuit 62, the counter circuit 66, and the comparator 68, and further includes a reference cycle holding circuit 774. This is the same as the control signal generation circuit 125 of FIG.

基準サイクル保持回路774は、制御信号CSHに従って、レジスタDmから読み出されたデータ入力バス143の値を基準サイクル数として保持し、これを出力データRCとして出力する。カウンタ回路866は、制御信号CCに従って、クロック信号CLKのパルス毎に、基準サイクル保持回路774から供給される出力データRCの値を加算し、得られたカウント値を出力データCNTとして出力する。比較器868は、比較値保持回路64の出力データCMVと、カウンタ回路866の出力データCNTとを比較し、出力データCNTの値が出力データCMVの値以上になったときに、「1」を制御信号CMRとして制御回路862に出力する。   In accordance with the control signal CSH, the reference cycle holding circuit 774 holds the value of the data input bus 143 read from the register Dm as the reference cycle number, and outputs this as output data RC. The counter circuit 866 adds the value of the output data RC supplied from the reference cycle holding circuit 774 for each pulse of the clock signal CLK according to the control signal CC, and outputs the obtained count value as output data CNT. The comparator 868 compares the output data CMV of the comparison value holding circuit 64 with the output data CNT of the counter circuit 866. When the value of the output data CNT becomes equal to or greater than the value of the output data CMV, “1” is output. The control signal CMR is output to the control circuit 862.

制御信号発生回路825によると、基準サイクル設定命令によって基準サイクル数を基準サイクル保持回路774に設定した後、ウェイト命令を実行すると、「ウェイトサイクル数÷基準サイクル数」で求められる数のサイクルの期間、CPU110の処理を待たせることができる。   According to the control signal generation circuit 825, when a wait instruction is executed after setting the reference cycle number in the reference cycle holding circuit 774 by a reference cycle setting instruction, the number of cycles obtained by “number of wait cycles / reference cycle number” is obtained. , CPU 110 can be made to wait.

例えば、クロック信号CLKが10MHzの場合には基準サイクル設定命令により基準サイクル数を2に設定し、クロック信号CLKが20MHzの場合には基準サイクル設定命令により基準サイクル数を1に設定すれば、ウェイトサイクル数を100にしてウェイト命令を実行するときに、いずれの場合でもCPU110の処理を5マイクロ秒の間待たせることができる。したがって、クロック信号CLKの周波数を変更しても、ソフトウェアプログラムを変更する必要がなくなる。   For example, when the clock signal CLK is 10 MHz, the reference cycle number is set to 2 by the reference cycle setting command, and when the clock signal CLK is 20 MHz, the reference cycle number is set to 1 by the reference cycle setting command. In any case, when the wait instruction is executed with the number of cycles set to 100, the processing of the CPU 110 can be kept waiting for 5 microseconds. Therefore, it is not necessary to change the software program even if the frequency of the clock signal CLK is changed.

また、制御信号発生回路825を用いた方が、制御信号発生回路725を用いる場合よりも回路規模を小さくすることができる。   In addition, the circuit scale can be reduced by using the control signal generation circuit 825 than when the control signal generation circuit 725 is used.

以上説明したように、本発明は、CPU等の主演算部に処理を待たせる場合に、待たせる時間を正確に制御することができるので、情報処理装置等について有用である。   As described above, the present invention is useful for an information processing apparatus and the like because it can accurately control the waiting time when a main processing unit such as a CPU waits for processing.

本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 1st Embodiment of this invention. 図1の制御信号発生回路の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a control signal generation circuit in FIG. 1. 図1の情報処理装置の動作の例を示すタイミングチャートである。3 is a timing chart illustrating an example of the operation of the information processing apparatus in FIG. 1. 本発明の第2の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 2nd Embodiment of this invention. 図4の演算器224の構成例を示すブロック図である。FIG. 5 is a block diagram illustrating a configuration example of a calculator 224 in FIG. 4. 本発明の第3の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 3rd Embodiment of this invention. 図6の制御信号発生回路の構成例を示すブロック図である。FIG. 7 is a block diagram illustrating a configuration example of a control signal generation circuit in FIG. 6. 図6の情報処理装置の動作の例を示すタイミングチャートである。7 is a timing chart illustrating an example of the operation of the information processing apparatus in FIG. 6. 本発明の第4の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 4th Embodiment of this invention. 図9のクロック制御回路の構成例を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration example of a clock control circuit in FIG. 9. 図9の情報処理装置の動作の例を示すタイミングチャートである。10 is a timing chart showing an example of the operation of the information processing apparatus of FIG. 9. 本発明の第5の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 5th Embodiment of this invention. 図12の制御信号発生回路の構成例を示すブロック図である。FIG. 13 is a block diagram illustrating a configuration example of a control signal generation circuit in FIG. 12. 図12の情報処理装置の動作の例を示すタイミングチャートである。13 is a timing chart showing an example of the operation of the information processing apparatus of FIG. 本発明の第6の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 6th Embodiment of this invention. 図15の情報処理装置の動作の例を示すタイミングチャートである。16 is a timing chart showing an example of the operation of the information processing apparatus of FIG. 図15の情報処理装置の動作の例を示すタイミングチャートである。16 is a timing chart showing an example of the operation of the information processing apparatus of FIG. 本発明の第7の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 7th Embodiment of this invention. 図18の制御信号発生回路の構成例を示すブロック図である。FIG. 19 is a block diagram illustrating a configuration example of a control signal generation circuit in FIG. 18. 図18の情報処理装置の動作の例を示すタイミングチャートである。19 is a timing chart illustrating an example of the operation of the information processing apparatus in FIG. 18. 図19の制御信号発生回路の変形例を示すブロック図である。FIG. 20 is a block diagram illustrating a modification of the control signal generation circuit of FIG. 19.

符号の説明Explanation of symbols

62,262,562,662,762,862 制御回路
64 比較値保持回路
66,766,776,866 カウンタ回路
68,778,868 比較器
110 CPU(主演算部)
120,220,320,520,620,720 拡張演算器(拡張演算部)
113 汎用レジスタ
125,325,525,625,725,825 制御信号発生回路(信号生成回路)
224 演算器(信号生成回路)
480 クロック制御回路
762 基準サイクル保持回路
62, 262, 562, 662, 762, 862 Control circuit 64 Comparison value holding circuit 66, 766, 776, 866 Counter circuit 68, 778, 868 Comparator 110 CPU (main arithmetic unit)
120, 220, 320, 520, 620, 720 extended arithmetic unit (extended arithmetic unit)
113 General-purpose registers 125, 325, 525, 625, 725, 825 Control signal generation circuit (signal generation circuit)
224 arithmetic unit (signal generation circuit)
480 Clock control circuit 762 Reference cycle holding circuit

Claims (15)

メモリから読み出された命令に従って処理を行う主演算部と、
前記メモリから読み出された命令のうちの所定の命令に従って処理を行う拡張演算部とを備え、
前記拡張演算部は、
クロック信号のパルスをカウントし、前記メモリから読み出された命令が前記主演算部を待機させる待機命令である場合には、待機すべきであることを示す信号を、前記待機命令において指定された待機カウント数に相当するカウントが完了するまで出力する信号生成回路を有し、
前記主演算部は、
前記待機すべきであることを示す信号が出力されている間は、処理を停止する
ことを特徴とする情報処理装置。
A main arithmetic unit that performs processing in accordance with an instruction read from the memory;
An extended arithmetic unit that performs processing according to a predetermined instruction among the instructions read from the memory,
The extended arithmetic unit is:
When the instruction read from the memory is a standby instruction that waits for the main arithmetic unit to count pulses of the clock signal, a signal indicating that the instruction should be waited is designated in the standby instruction. It has a signal generation circuit that outputs until the count corresponding to the standby count is completed,
The main arithmetic unit is
The information processing apparatus is characterized in that the processing is stopped while the signal indicating that the standby should be performed.
請求項1に記載の情報処理装置において、
前記主演算部は、
値を格納するレジスタを有し、
前記信号生成回路は、
前記待機命令において前記レジスタが指定されている場合には、前記レジスタに格納されている値を前記待機カウント数として用いる
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The main arithmetic unit is
Has a register to store the value,
The signal generation circuit includes:
When the register is specified in the standby instruction, the information stored in the register is used as the standby count number.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記待機命令において記述されている値を前記待機カウント数として用いる
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
An information processing apparatus using a value described in the standby instruction as the standby count number.
請求項1に記載の情報処理装置において、
前記拡張演算部は、
値を格納するレジスタを有し、
前記信号生成回路は、
前記待機命令において前記レジスタが指定されている場合には、前記レジスタに格納されている値を前記待機カウント数として用いる
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The extended arithmetic unit is:
Has a register to store the value,
The signal generation circuit includes:
When the register is specified in the standby instruction, the information stored in the register is used as the standby count number.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記待機カウント数を保持する比較値保持回路と、
前記クロック信号のパルスをカウントするカウンタと、
前記カウンタのカウント値と前記比較値保持回路に保持された前記待機カウント数とを比較し、比較結果を出力する比較器と、
前記待機すべきであることを示す信号を、一致するという結果を前記比較結果が示すまで出力する制御回路とを有する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
A comparison value holding circuit for holding the standby count number;
A counter for counting pulses of the clock signal;
A comparator that compares the count value of the counter with the standby count number held in the comparison value holding circuit and outputs a comparison result;
An information processing apparatus comprising: a control circuit that outputs a signal indicating that the standby should be performed until the comparison result indicates a match result.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記メモリから読み出された命令が演算命令である場合には、前記演算命令で指示された演算を行い、
前記メモリから読み出された命令が前記待機命令である場合には、前記クロック信号のパルスをカウントし、前記待機すべきであることを示す信号を、前記待機命令において指定された待機カウント数に相当するカウントが完了するまで出力する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
If the instruction read from the memory is an operation instruction, perform the operation indicated by the operation instruction,
When the instruction read from the memory is the standby instruction, the clock signal pulses are counted, and a signal indicating that the instruction should be waited is set to the standby count number specified in the standby instruction. An information processing apparatus that outputs until a corresponding count is completed.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記所定の演算を行う演算回路を有し、前記メモリから読み出された命令が前記待機命令である場合には、前記待機命令において指定された待機カウント数に相当するカウントを前記演算回路を用いて行う
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
When the arithmetic circuit that performs the predetermined arithmetic operation and the instruction read from the memory is the standby instruction, the arithmetic circuit uses a count corresponding to the standby count number specified in the standby instruction. An information processing apparatus characterized by being performed.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記主演算部に対して割り込み要求信号が与えられた場合には、前記待機すべきであることを示す信号の出力を終了する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
When an interrupt request signal is given to the main arithmetic unit, the information processing apparatus ends output of a signal indicating that it should wait.
請求項1に記載の情報処理装置において、
前記主演算部に前記クロック信号を供給するクロック制御回路を更に備え、
前記クロック制御回路は、
前記信号生成回路から前記待機すべきであることを示す信号が出力されると、前記主演算部への前記クロック信号の供給を停止する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
A clock control circuit for supplying the clock signal to the main arithmetic unit;
The clock control circuit includes:
An information processing apparatus that stops supply of the clock signal to the main arithmetic unit when a signal indicating that the standby should be performed is output from the signal generation circuit.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記メモリから読み出された命令が制御信号を生成する第1の信号生成命令である場合には、前記第1の信号生成命令において指定されたカウント数に相当するカウントが完了すると、
前記制御信号を当該情報処理装置の外部に出力する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
When the instruction read from the memory is a first signal generation instruction for generating a control signal, when the count corresponding to the count number specified in the first signal generation instruction is completed,
An information processing apparatus that outputs the control signal to the outside of the information processing apparatus.
請求項10に記載の情報処理装置において、
前記信号生成回路は、
前記メモリから読み出された命令が前記制御信号を繰り返し生成する第2の信号生成命令である場合には、前記第2の信号生成命令において指定されたカウント数に相当するカウントを行う毎に、
前記制御信号を当該情報処理装置の外部に出力し、
前記メモリから読み出された命令が前記制御信号の生成を終了する信号生成終了命令である場合には、前記制御信号の出力を終了する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 10,
The signal generation circuit includes:
When the instruction read from the memory is a second signal generation instruction that repeatedly generates the control signal, every time a count corresponding to the count number specified in the second signal generation instruction is performed,
Outputting the control signal to the outside of the information processing apparatus;
The information processing apparatus, wherein the output of the control signal is ended when the instruction read from the memory is a signal generation end instruction for ending generation of the control signal.
請求項10に記載の情報処理装置において、
前記信号生成回路は、
前記第1の信号生成命令が割り込み命令である場合には、前記主演算部に対して割り込みを行うための割り込み要求信号を前記制御信号として出力する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 10,
The signal generation circuit includes:
When the first signal generation instruction is an interrupt instruction, the information processing apparatus outputs an interrupt request signal for interrupting the main arithmetic unit as the control signal.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記メモリから読み出された命令が制御信号を生成する信号生成命令である場合には、
前記信号生成命令において指定された第1のカウント数に相当するカウントが完了するまでは、
前記制御信号として第1の値を当該情報処理装置の外部に出力し、
前記信号生成命令において指定された第2のカウント数に相当するカウントが完了するまでは、
前記制御信号として第2の値を当該情報処理装置の外部に出力する
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
When the instruction read from the memory is a signal generation instruction for generating a control signal,
Until the count corresponding to the first count number specified in the signal generation instruction is completed,
Outputting a first value as the control signal to the outside of the information processing apparatus;
Until the count corresponding to the second count number specified in the signal generation instruction is completed,
An information processing apparatus that outputs a second value as the control signal to the outside of the information processing apparatus.
請求項1に記載の情報処理装置において、
前記信号生成回路は、
前記クロック信号の設定された基準サイクル数毎に、前記クロック信号のパルスをカウントする
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 1,
The signal generation circuit includes:
An information processing apparatus that counts pulses of the clock signal for each set reference cycle number of the clock signal.
請求項14に記載の情報処理装置において、
前記信号生成回路は、
前記待機カウント数を保持する比較値保持回路と、
前記クロック信号のパルスをカウントする第1のカウンタと、
前記第1のカウンタのカウント値と前記比較値保持回路に保持された前記待機カウント数とを比較し、その結果を第1の比較結果として出力する第1の比較器と、
前記基準サイクル数を保持する基準サイクル保持回路と、
前記クロック信号のパルスをカウントし、第2の比較結果に従ってリセットされる第2のカウンタと、
前記第2のカウンタのカウント値と前記基準サイクル保持回路に保持された前記基準サイクル数とを比較し、その結果を前記第2の比較結果として出力する第2の比較器と、
前記待機すべきであることを示す信号を、前記第2のカウンタのカウント値が前記基準サイクル数以上になったことを前記第1の比較結果が示すまで出力する制御回路とを有し、
前記第1のカウンタは、一致するという結果を前記第2の比較結果が示す場合にのみカウントを行う
ことを特徴とする情報処理装置。
The information processing apparatus according to claim 14,
The signal generation circuit includes:
A comparison value holding circuit for holding the standby count number;
A first counter for counting pulses of the clock signal;
A first comparator that compares the count value of the first counter with the standby count number held in the comparison value holding circuit and outputs the result as a first comparison result;
A reference cycle holding circuit for holding the reference cycle number;
A second counter that counts pulses of the clock signal and is reset according to a second comparison result;
A second comparator that compares the count value of the second counter with the reference cycle number held in the reference cycle holding circuit and outputs the result as the second comparison result;
A control circuit that outputs a signal indicating that the standby should be performed until the first comparison result indicates that the count value of the second counter is equal to or greater than the reference cycle number;
The information processing apparatus according to claim 1, wherein the first counter counts only when the second comparison result indicates a match result.
JP2007340051A 2007-12-28 2007-12-28 Information processor Pending JP2009163338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007340051A JP2009163338A (en) 2007-12-28 2007-12-28 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007340051A JP2009163338A (en) 2007-12-28 2007-12-28 Information processor

Publications (1)

Publication Number Publication Date
JP2009163338A true JP2009163338A (en) 2009-07-23

Family

ID=40965919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007340051A Pending JP2009163338A (en) 2007-12-28 2007-12-28 Information processor

Country Status (1)

Country Link
JP (1) JP2009163338A (en)

Similar Documents

Publication Publication Date Title
JP5411587B2 (en) Multi-thread execution device and multi-thread execution method
US8341436B2 (en) Method and system for power-state transition controllers
JP2009104675A (en) Method and apparatus for affecting subsequent instruction processing in data processor
JP5231800B2 (en) Semiconductor integrated circuit device and clock control method for semiconductor integrated circuit device
US10936005B2 (en) Event controlled clock switching
JP2000112585A (en) System lsi and power management method
CN105988400B (en) Microcontroller unit
JP2013025590A (en) Arithmetic processing unit and microcomputer
US10983551B2 (en) Clock management unit, integrated circuit including the clock management unit, system on chip, and method of operating the system on chip
JP2009163338A (en) Information processor
CN111158758A (en) Method and device for waking up central processing unit
JP5414323B2 (en) Semiconductor integrated circuit device
JP2005100017A (en) Processor simulator, interruption delay count program and simulation method of processor
JPH09231195A (en) Micro computer
US10338665B2 (en) Microcontroller power reduction system and method
JP6260394B2 (en) Processing system
US20120173775A1 (en) Port control apparatus and associated methods
JP2009199424A (en) Microcomputer
JP2968749B2 (en) Microprogram speed control circuit
JP2010140398A (en) Apparatus and method for data process
JP2011150636A (en) Microprocessor and control method thereof
WO2007004323A1 (en) Information processing device
JP2014123267A (en) Microcomputer and sd card
JPH1165838A (en) Arithmetic and logic unit and setting method for wait time of the same
JPH0713763A (en) Microcomputer