JP3991999B2 - Central processing unit and processor control method - Google Patents

Central processing unit and processor control method Download PDF

Info

Publication number
JP3991999B2
JP3991999B2 JP2004036747A JP2004036747A JP3991999B2 JP 3991999 B2 JP3991999 B2 JP 3991999B2 JP 2004036747 A JP2004036747 A JP 2004036747A JP 2004036747 A JP2004036747 A JP 2004036747A JP 3991999 B2 JP3991999 B2 JP 3991999B2
Authority
JP
Japan
Prior art keywords
processor
unit
processing
interrupt processing
interrupt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004036747A
Other languages
Japanese (ja)
Other versions
JP2005228103A (en
Inventor
彰治 保科
晃成 轟
政一 礒村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2004036747A priority Critical patent/JP3991999B2/en
Priority to US10/968,876 priority patent/US20050149771A1/en
Publication of JP2005228103A publication Critical patent/JP2005228103A/en
Application granted granted Critical
Publication of JP3991999B2 publication Critical patent/JP3991999B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Description

本発明は、プロセッサを介さない所定処理の実行中に、プロセッサの動作状態を制御する中央処理ユニット及びプロセッサ制御方法に関する。   The present invention relates to a central processing unit and a processor control method for controlling an operation state of a processor during execution of a predetermined process not via a processor.

従来、例えば、DMA(Direct Memory Access)処理の実行中に、プロセッサへのクロック信号の供給を停止し、プロセッサによる消費電力を小さくするコンピュータシステムがある(例えば、特許文献1参照。)。このようなコンピュータシステムにあっては、例えば、プロセッサの処理効率が向上するように、DMA処理の実行中に、プロセッサからDMAコントローラの動作状態の問い合わせがあったときにだけ、プロセッサへのクロック信号の供給を停止し、プロセッサによる命令の実行を中断することも考えられる。   2. Description of the Related Art Conventionally, for example, there is a computer system that stops supply of a clock signal to a processor during execution of DMA (Direct Memory Access) processing and reduces power consumption by the processor (see, for example, Patent Document 1). In such a computer system, for example, in order to improve the processing efficiency of the processor, the clock signal to the processor is only sent to the processor when there is an inquiry about the operating state of the DMA controller during the DMA processing. It is also conceivable to stop the execution of instructions by the processor.

また、例えば、プロセッサに実行させる処理の命令コードのアドレスを記憶するプログラムカウンタと、割り込み処理の開始要求が発生したときに、プログラムカウンタに記憶されていたアドレスを退避させる割り込み処理用プログラムカウンタとを備えたプロセッサもある。このようなプロセッサにあっては、一般に、割り込み処理が終了すると、割り込み処理用プログラムカウンタに退避させていたアドレスをプログラムカウンタに記憶させ(戻し)、その戻されたアドレスの命令コードから順番に実行するようになっている。   In addition, for example, a program counter that stores an address of an instruction code of processing to be executed by the processor, and an interrupt processing program counter that saves the address stored in the program counter when an interrupt processing start request is generated. There is also a processor equipped. Generally, in such a processor, when interrupt processing is completed, the address saved in the interrupt processing program counter is stored (returned) in the program counter and executed in order from the instruction code of the returned address. It is supposed to be.

ところで、上記従来の技術を組み合わせたものにあっては、例えば、DMA処理の実行中に、RAMへのアクセス要求を生じ、プロセッサがDMA処理の実行状態を問い合わせると、プロセッサへのクロック信号の供給が停止され、プロセッサによる命令の実行が中断される。また、クロック信号の供給が停止されているときに、割り込み処理が開始されると、プログラムカウンタに格納されていたアドレス(RAMへのアクセス要求に続く命令コードのアドレス)が割り込み処理用プログラムカウンタに退避され、割り込み処理が実行される。そのため、割り込み処理が終了し、割り込み処理用プログラムカウンタに退避されていたアドレスがプログラムカウンタに戻されると、DMA処理の実行中であるにも関わらず、RAMへのアクセス要求に続く命令コードが実行されてしまう恐れがあった。   By the way, in the combination of the above conventional techniques, for example, when an access request to the RAM is generated during execution of the DMA processing, and the processor inquires about the execution state of the DMA processing, the clock signal is supplied to the processor. Is stopped and the execution of the instruction by the processor is interrupted. When interrupt processing is started when the supply of the clock signal is stopped, the address stored in the program counter (the address of the instruction code following the access request to the RAM) is stored in the interrupt processing program counter. Saved and interrupt processing is executed. Therefore, when interrupt processing ends and the address saved in the interrupt processing program counter is returned to the program counter, the instruction code following the access request to the RAM is executed even though DMA processing is being executed. There was a fear of being done.

また、DMA処理の終了に伴い、アクセス要求に続く命令コードが実行されてしまうことが防止されるように、クロック信号の供給が停止されているときに割り込み処理が開始されることを禁止すると、割り込み処理の開始要求が発生してから割り込み処理が開始されるまでの間の時間、つまり、割り込み応答時間が大きくなってしまう恐れがあった。
本発明は、上記従来の技術の未解決の課題を解決することを目的とするものであって、割り込み処理の終了に伴い、中断されていた命令に続く命令コードが実行されてしまうことを防止することができる中央処理ユニット及びプロセッサ制御方法を提供することを課題とする。
In order to prevent the instruction code following the access request from being executed upon completion of the DMA processing, prohibiting the start of the interrupt processing when the supply of the clock signal is stopped. There is a possibility that the time from when the interrupt processing start request is generated until the interrupt processing is started, that is, the interrupt response time is increased.
An object of the present invention is to solve the above-mentioned unsolved problems of the prior art, and prevents an instruction code following an interrupted instruction from being executed at the end of interrupt processing. It is an object of the present invention to provide a central processing unit and a processor control method that can be performed.

上記課題を解決するために、本発明の中央処理ユニットは、プロセッサを介さずに所定処理を実行可能な機能部と、前記所定処理の実行中に、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサに動作を停止させる動作停止部と、前記所定処理が終了すると前記プロセッサに動作を再開させる動作再開部と、前記動作停止部によって前記プロセッサの動作が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサに前記割り込み処理を実行させる割り込み処理実行部と、前記割り込み処理が終了すると、前記プロセッサに前記所定処理の実行状態の問い合わせを行わせる問い合わせ部とを備えたことを特徴とする。   In order to solve the above-described problem, the central processing unit of the present invention includes a functional unit capable of executing a predetermined process without using a processor, and the processor inquires about an execution state of the predetermined process during the execution of the predetermined process. An operation stop unit for stopping the operation of the processor, an operation restart unit for restarting the processor when the predetermined processing is completed, and an interrupt when the operation of the processor is stopped by the operation stop unit. An interrupt processing execution unit that causes the processor to execute the interrupt processing when a processing start request occurs, and an inquiry unit that causes the processor to inquire about the execution state of the predetermined processing when the interrupt processing ends. It is characterized by that.

また、前記プロセッサに実行させる命令コードのアドレスを記憶するプログラムカウンタと、前記プロセッサに前記割り込み処理を実行させるときに、前記プログラムカウンタに記憶されているアドレスから1命令分のアドレス値を減じたアドレスを記憶する割り込み処理用プログラムカウンタとを備え、前記問い合わせ部は、前記割り込み処理が終了すると、前記割り込み処理用プログラムカウンタに記憶されているアドレスを前記プログラムカウンタに記憶させるようにしてもよい。   A program counter for storing an address of an instruction code to be executed by the processor; and an address obtained by subtracting an address value for one instruction from the address stored in the program counter when the interrupt processing is executed by the processor. The inquiry unit may store the address stored in the interrupt processing program counter in the program counter when the interrupt processing ends.

さらに、前記動作停止部は、前記所定処理の実行中に、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサへのクロック信号の供給を停止させ、前記動作再開部は、前記所定処理が終了すると前記プロセッサへのクロック信号の供給を再開させ、前記割り込み処理実行部は、前記動作停止部によって前記プロセッサへのクロック信号の供給が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサへのクロック信号の供給を再開して当該プロセッサに前記割り込み処理を実行させるようにしてもよい。
また、前記機能部は、プロセッサを介さずにメモリアクセス可能なDMAコントローラであってもよい。
一方、本発明のプロセッサ制御方法は、プロセッサを介さずに所定処理を実行可能な機能部が当該所定処理を実行しているときに、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサの動作を停止可能な動作停止部が前記プロセッサに動作を停止させ、前記所定処理が終了すると、前記プロセッサの動作を再開可能な動作再開部が前記プロセッサに動作を再開させるプロセッサ制御方法であって、前記所定処理の実行状態の問い合わせによって前記プロセッサの動作が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサによる割り込み制御を実行可能な割り込み処理実行部が前記プロセッサに前記割り込み処理を実行させ、前記割り込み処理が終了すると、前記プロセッサによる前記所定処理の実行状態の問い合わせを実行可能な問い合わせ部が前記プロセッサに前記所定処理の実行状態の問い合わせを行わせることを特徴とする。
このような構成によれば、プロセッサの動作が停止されているときに、割り込み処理の開始要求が発生すると、プロセッサの動作が一時的に再開され、割り込み処理が実行される。そして、その割り込み処理が終了すると、所定処理の実行状態の問い合わせが行われ、プロセッサの動作が再び停止される。そのため、所定処理が実行されているにも関わらず、割り込み処理の終了に伴い、中断されていた命令に続く命令コードが実行されてしまうことを防止することができる。
Further, when the processor inquires about the execution state of the predetermined process during the execution of the predetermined process, the operation stop unit stops the supply of the clock signal to the processor, and the operation resuming unit When the processing is finished, the supply of the clock signal to the processor is resumed, and the interrupt processing execution unit generates an interrupt processing start request when the supply of the clock signal to the processor is stopped by the operation stop unit. Then, the supply of the clock signal to the processor may be resumed to cause the processor to execute the interrupt process.
Further, the functional unit may be a DMA controller capable of accessing a memory without using a processor.
On the other hand, the processor control method according to the present invention enables the processor to inquire about the execution state of the predetermined process when a functional unit capable of executing the predetermined process without executing the processor executes the predetermined process. An operation stop unit capable of stopping the operation of the processor causes the processor to stop the operation, and when the predetermined processing is completed, an operation restart unit capable of restarting the operation of the processor causes the processor to restart the operation. When an interrupt processing start request is generated when the operation of the processor is stopped due to an inquiry about the execution state of the predetermined processing, an interrupt processing execution unit capable of executing interrupt control by the processor interrupts the processor When processing is executed and the interrupt processing is completed, the processor performs the above processing. Inquiry unit capable of executing the query execution state of the process is characterized in that to perform the query execution status of the predetermined processing to the processor.
According to such a configuration, when an interrupt processing start request is generated while the operation of the processor is stopped, the operation of the processor is temporarily resumed and the interrupt processing is executed. When the interrupt process is completed, an inquiry about the execution state of the predetermined process is made, and the operation of the processor is stopped again. Therefore, it is possible to prevent the instruction code following the interrupted instruction from being executed with the end of the interrupt process even though the predetermined process is being executed.

以下、本発明の中央処理ユニットの実施形態を図面に基づいて説明する。
図1は、本発明の中央処理ユニットの実施形態の概略構成を示すブロック図である。この図1に示すように、中央処理ユニット1は、プログラムカウンタ(PC:program counter)3及び割り込み処理用プログラムカウンタ(EPC:Exception program counter)4を備えたプロセッサ2、RAM(Random Access Memory)5、状態通知レジスタ7を備えたDMAコントローラ6、及びクロック制御部8を含んで構成され、クロック制御部8を除く各部は、データ制御部9で互いにデータ授受可能に接続されている。
Hereinafter, an embodiment of a central processing unit of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of a central processing unit of the present invention. As shown in FIG. 1, a central processing unit 1 includes a processor 2 having a program counter (PC) 3 and an interrupt processing program counter (EPC) 4, and a RAM (Random Access Memory) 5. The DMA controller 6 including the status notification register 7 and the clock control unit 8 are configured to be connected to the data control unit 9 so that data can be exchanged between them.

これらのうち、プロセッサ2は、プロセッサ2で実行する処理の命令コードのアドレスを記憶するプログラムカウンタ3と、プロセッサ2へのクロック信号の供給が停止され且つ割り込み処理の開始要求信号が発生したときに、プログラムカウンタ3に記憶されていたアドレスから1命令分のアドレス値(例えば、プロセッサ2が32ビット処理を行うものである場合には「4」)を減じたアドレスを退避させる割り込み処理用プログラムカウンタ4とを備えている。また、プロセッサ2は、プログラムカウンタ3に記憶されているアドレスに対応する命令コードをRAM5から読み出し、その読み出された命令コードに従って、各種処理を実行する。また、プロセッサ2は、割り込み処理が終了したときに、割り込み処理用プログラムカウンタ4に退避させておいたアドレスをプログラムカウンタ3に記憶させる。   Among these, the processor 2 has a program counter 3 for storing the address of an instruction code of processing executed by the processor 2, and when supply of a clock signal to the processor 2 is stopped and an interrupt processing start request signal is generated. An interrupt processing program counter that saves an address obtained by subtracting an address value for one instruction from the address stored in the program counter 3 (for example, “4” when the processor 2 performs 32-bit processing). 4 is provided. Further, the processor 2 reads out an instruction code corresponding to the address stored in the program counter 3 from the RAM 5, and executes various processes according to the read instruction code. Further, the processor 2 stores the address saved in the interrupt processing program counter 4 in the program counter 3 when the interrupt processing ends.

また、プロセッサ2は、RAM5へのアクセス要求が発生すると、DMA処理の実行状態を示すフラグをDMAコントローラ6内の状態通知レジスタ7から読み出すための信号(以下、「レジスタ読出信号」とも呼ぶ。)をDMAコントローラ6に出力する。そして、プロセッサ2は、DMAコントローラ6からDMA処理を実行中でないことを示すフラグ(以下、「非実行中フラグ」とも呼ぶ。)が読み出されると、RAM5へのアクセスを開始する。   Further, when an access request to the RAM 5 is generated, the processor 2 reads a flag indicating the execution state of the DMA processing from the status notification register 7 in the DMA controller 6 (hereinafter also referred to as “register read signal”). Is output to the DMA controller 6. Then, when the flag indicating that the DMA processing is not being executed (hereinafter also referred to as “non-execution flag”) is read from the DMA controller 6, the processor 2 starts accessing the RAM 5.

また、RAM5は、図示しない記憶装置から読み出した命令コードやデータを展開するためのワークエリアを形成すると共に、プロセッサ2によって実行された各種処理に係るデータやDMA処理によって転送されるデータを記憶するためのメモリ領域を形成する。なお、プロセッサ2によるRAM5へのアクセス要求とDMA処理によるRAM5へのアクセス要求との調停は、図示しないメモリインターフェースによって行われる。   The RAM 5 forms a work area for expanding instruction codes and data read from a storage device (not shown), and stores data related to various processes executed by the processor 2 and data transferred by DMA processing. A memory area is formed. The arbitration between the access request to the RAM 5 by the processor 2 and the access request to the RAM 5 by the DMA processing is performed by a memory interface (not shown).

さらに、DMAコントローラ6は、DMA処理の開始要求信号を取得すると、DMA処理を開始させる。また、DMAコントローラ6は、プロセッサ2からレジスタ読出信号が出力されると、プロセッサ2がアクセスしようとしているRAM5のアドレスに対してDMA処理を実行中であるか否かを判定し、DMA処理を実行中でない場合には状態通知レジスタ7に格納されている非実行中フラグをプロセッサ2に読み出させ、実行中である場合にはWAIT信号をプロセッサ2とクロック制御部8とに出力する。さらに、DMAコントローラ6は、WAIT信号の出力中に、割り込み処理の開始要求の信号が出力されると、WAIT信号の出力を一旦停止する。   Furthermore, when the DMA controller 6 obtains the DMA processing start request signal, the DMA controller 6 starts the DMA processing. When the register read signal is output from the processor 2, the DMA controller 6 determines whether or not the DMA processing is being executed for the address of the RAM 5 that the processor 2 is trying to access, and executes the DMA processing. If not, the processor 2 is made to read the non-execution flag stored in the status notification register 7. If it is being executed, the WAIT signal is output to the processor 2 and the clock controller 8. Further, when the interrupt processing start request signal is output during the output of the WAIT signal, the DMA controller 6 temporarily stops the output of the WAIT signal.

さらに、クロック制御部8は、DMAコントローラ6からWAIT信号が出力されているか否かを判定し、WAIT信号が出力されていない場合にはプロセッサ2にクロック信号を供給し、WAIT信号が出力されている場合にはクロック信号の供給を停止する。
次に、本実施形態の中央処理ユニット1の動作を詳細に説明する。
まず、図2(c)の時刻t1に示すように、プロセッサ2によって処理Aが実行されているときに、DMA処理の開始要求信号が生じたとする。すると、図2(a)、(c)の時刻t1〜t2に示すように、プロセッサ2によって、処理Aの実行が継続されつつ、DMAコントローラ6によって、DMA処理が開始される。そして、プロセッサ2によって、処理対象となるデータや命令コードがRAM5の所定アドレスから読み出されたり、DMA処理によって、所定のデータがRAM5の所定アドレスに転送されたりする。
Further, the clock control unit 8 determines whether or not the WAIT signal is output from the DMA controller 6. When the WAIT signal is not output, the clock control unit 8 supplies the clock signal to the processor 2 and the WAIT signal is output. If so, the supply of the clock signal is stopped.
Next, the operation of the central processing unit 1 of this embodiment will be described in detail.
First, as shown at time t1 in FIG. 2C, it is assumed that a DMA processing start request signal is generated when the processor 2 is executing the processing A. Then, as shown at times t1 to t2 in FIGS. 2A and 2C, the DMA processing is started by the DMA controller 6 while the execution of the processing A is continued by the processor 2. Then, the processor 2 reads data or instruction code to be processed from a predetermined address in the RAM 5 or transfers predetermined data to a predetermined address in the RAM 5 by DMA processing.

また、プロセッサ2によって処理Aが実行されるうちに(時刻t2)、DMA処理を実行中のRAM5のアドレスに対してプロセッサ2の処理Aによってアクセス要求が発生し、プロセッサ2がレジスタ読出信号をDMAコントローラ6に出力したとする。つまり、DMA処理が終了するまで、プロセッサ2が処理対象となるデータをRAM5から読み出すことができない状態になったとする。すると、DMAコントローラ6によって、プロセッサ2とクロック制御部8とにWAIT信号が出力され、クロック制御部8によって、プロセッサ2へのクロック信号の供給が停止される。そして、図2(a)(b)の時刻t2〜t3に示すように、プロセッサ2が停止状態とされ、DMA処理だけが継続される。   While the process A is executed by the processor 2 (time t2), an access request is generated by the process A of the processor 2 for the address of the RAM 5 that is executing the DMA process, and the processor 2 sends a register read signal to the DMA. Assume that the data is output to the controller 6. That is, it is assumed that the processor 2 cannot read data to be processed from the RAM 5 until the DMA processing is completed. Then, the DMA controller 6 outputs a WAIT signal to the processor 2 and the clock control unit 8, and the clock control unit 8 stops supplying the clock signal to the processor 2. Then, as shown at times t2 to t3 in FIGS. 2A and 2B, the processor 2 is stopped and only the DMA processing is continued.

さらに、図2(b)の時刻t3に示すように、プロセッサ2が停止状態とされているときに、割り込み処理の開始要求信号が発生したとする。すると、DMAコントローラ6によって、WAIT信号の出力が一旦停止され、クロック制御部8によって、プロセッサ2へのクロック信号の供給が一時的に再開され、図2(b)の時刻t3に示すように、プロセッサ2が動作状態とされる。そして、プロセッサ2によって、プログラムカウンタ3に記憶されていたアドレスから1命令分のアドレス値を減じたアドレス、つまり、RAM5へのアクセス要求を発生させた命令のアドレスが割り込み処理用プログラムカウンタ4に退避された後、図2(d)の時刻t3に示すように、割り込み処理が開始される。   Further, as shown at time t3 in FIG. 2B, it is assumed that an interrupt processing start request signal is generated when the processor 2 is in a stopped state. Then, the output of the WAIT signal is temporarily stopped by the DMA controller 6, and the supply of the clock signal to the processor 2 is temporarily resumed by the clock control unit 8, and as shown at time t3 in FIG. The processor 2 is put into an operating state. Then, the address obtained by subtracting the address value for one instruction from the address stored in the program counter 3 by the processor 2, that is, the address of the instruction that generated the access request to the RAM 5 is saved in the interrupt processing program counter 4. Then, interrupt processing is started as shown at time t3 in FIG.

また、割り込み処理が実行されるうちに、割り込み処理が終了したとする(時刻t4)。すると、プロセッサ2によって、割り込み処理用プログラムカウンタ4に退避させておいたアドレスがプログラムカウンタ3に記憶される(戻される)。また、プロセッサ2によって、プログラムカウンタ3に記憶された(戻された)アドレスに対応する命令コードがRAM5から読み出され、その読み出された命令コードに従って、図2(c)の時刻t4に示すように、RAM5へのアクセス要求を発生させた命令が再び実行される。そして、プロセッサ2によって、レジスタ読出信号がDMAコントローラ6に出力され、DMAコントローラ6によって、プロセッサ2とクロック制御部8とにWAIT信号が出力され、クロック制御部8によって、プロセッサ2へのクロック信号の供給が再び停止され、図2(b)の時刻t5に示すように、プロセッサ2が再び停止状態とされる。   Further, it is assumed that the interrupt process is completed while the interrupt process is executed (time t4). Then, the processor 2 stores (returns) the address saved in the interrupt processing program counter 4 in the program counter 3. Further, the processor 2 reads out the instruction code corresponding to the address stored (returned) in the program counter 3 from the RAM 5, and shows the instruction code at time t4 in FIG. 2C according to the read instruction code. Thus, the instruction that generated the access request to the RAM 5 is executed again. The processor 2 outputs a register read signal to the DMA controller 6, the DMA controller 6 outputs a WAIT signal to the processor 2 and the clock controller 8, and the clock controller 8 outputs a clock signal to the processor 2. The supply is stopped again, and the processor 2 is again stopped as shown at time t5 in FIG.

このように、本実施形態の中央処理ユニット1にあっては、プロセッサ2の動作が停止されているときに、割り込み処理の開始要求信号が発生すると、プロセッサ2の動作が一時的に再開され、割り込み処理が実行される。そして、その割り込み処理が終了すると、DMAコントローラ6にレジスタ読出信号が出力され、プロセッサ2の動作が再び停止される。そのため、DMA処理が実行されているにも関わらず、割り込み処理の終了に伴い、RAM5へのアクセス要求に続く命令コードが実行されてしまうことを防止できる。   As described above, in the central processing unit 1 of the present embodiment, when the interrupt processing start request signal is generated when the operation of the processor 2 is stopped, the operation of the processor 2 is temporarily resumed. Interrupt processing is executed. When the interrupt process ends, a register read signal is output to the DMA controller 6 and the operation of the processor 2 is stopped again. For this reason, it is possible to prevent the instruction code following the access request to the RAM 5 from being executed when the interrupt process is ended, even though the DMA process is being executed.

さらに、プロセッサ2が再び停止状態とされているときに(時刻t6)、DMA処理が終了したとする。すると、DMAコントローラ6によって、WAIT信号の出力が停止され、クロック制御部8によって、プロセッサ2へのクロック信号の供給が完全に再開され、図2(b)に示すように、プロセッサ2が動作状態とされる。そして、プロセッサ2によって、プログラムカウンタ3に記憶されているアドレスに対応する命令コードがRAM5から読み出され、その読み出された命令コードに従って、RAM5へのアクセスが開始され、図2(c)に示すように、処理Aの実行が再開される。   Furthermore, it is assumed that the DMA processing is completed when the processor 2 is again stopped (time t6). Then, the output of the WAIT signal is stopped by the DMA controller 6, and the supply of the clock signal to the processor 2 is completely restarted by the clock control unit 8, and the processor 2 is in the operating state as shown in FIG. It is said. Then, the processor 2 reads an instruction code corresponding to the address stored in the program counter 3 from the RAM 5, and starts accessing the RAM 5 according to the read instruction code, as shown in FIG. As shown, execution of process A is resumed.

なお、上記実施形態では、図1のDMAコントローラ6が機能部を構成し、以下同様に、図1のDMAコントローラ6及びクロック制御部8が動作停止部及び動作再開部を構成し、図1のプロセッサ2、DMAコントローラ6及びクロック制御部8が割り込み処理実行部を構成し、図1のプロセッサ2が問い合わせ部を構成する。
また、上記実施形態は、本発明に係る中央処理ユニット及びプロセッサ制御方法の一例を示したものであり、その構成等を限定するものではない。
In the above embodiment, the DMA controller 6 in FIG. 1 constitutes a functional unit, and similarly, the DMA controller 6 and the clock control unit 8 in FIG. 1 constitute an operation stop unit and an operation resuming unit. The processor 2, the DMA controller 6, and the clock control unit 8 constitute an interrupt processing execution unit, and the processor 2 in FIG.
Moreover, the said embodiment shows an example of the central processing unit which concerns on this invention, and a processor control method, The structure etc. are not limited.

例えば、上記実施形態では、図2に示すように、DMA処理中に、1つの割り込み処理が発生する例を示したが、これに限られるものではない。例えば、図3に示すように、2つの割り込み処理(第1及び第2の割り込み処理)が連続して発生するようにしてもよい。また、DMA処理中に、特定処理を実行させる割り込み処理が発生するようにしてもよく、そのようにすれば、特定処理の終了に伴い、中断されていた処理の続きの命令コードが実行されてしまうことを防止することができる。   For example, in the above embodiment, as shown in FIG. 2, an example in which one interrupt process occurs during the DMA process is shown, but the present invention is not limited to this. For example, as shown in FIG. 3, two interrupt processes (first and second interrupt processes) may occur in succession. In addition, an interrupt process for executing the specific process may be generated during the DMA process. In this case, the instruction code following the interrupted process is executed at the end of the specific process. Can be prevented.

また、例えば、プロセッサ2がアクセスしようとしているRAM5のアドレスに対してDMA処理を実行中であるときに、プロセッサ2の動作を停止させる例を示したが、これに限られるものではない。例えば、プロセッサ2がアクセスしようとしているRAM5のアドレスと関係なく、単に、DMA処理の実行中に、RAM5へのアクセス要求がプロセッサ2に発生したときに、プロセッサ2の動作を停止させるようにしてもよい。   Further, for example, an example is shown in which the operation of the processor 2 is stopped when the DMA processing is being executed for the address of the RAM 5 that the processor 2 is trying to access. However, the present invention is not limited to this. For example, regardless of the address of the RAM 5 that the processor 2 is trying to access, the operation of the processor 2 is simply stopped when an access request to the RAM 5 is generated during the DMA processing. Good.

本発明の中央処理ユニットの実施形態を示す概略構成図である。It is a schematic block diagram which shows embodiment of the central processing unit of this invention. 図1の中央処理ユニットの動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the central processing unit of FIG. 図1の中央処理ユニットの動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the central processing unit of FIG.

符号の説明Explanation of symbols

1は中央処理ユニット、2はプロセッサ、3プログラムコントローラ、4は割り込み処理用プログラムコントローラ、5はRAM、6はDMAコントローラ、7は状態通知レジスタ、8はクロック制御部、9はデータバス 1 is a central processing unit, 2 is a processor, 3 is a program controller, 4 is an interrupt processing program controller, 5 is RAM, 6 is a DMA controller, 7 is a status notification register, 8 is a clock controller, and 9 is a data bus

Claims (5)

プロセッサを介さずに所定処理を実行可能な機能部と、前記所定処理の実行中に、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサに動作を停止させる動作停止部と、前記所定処理が終了すると前記プロセッサに動作を再開させる動作再開部と、前記動作停止部によって前記プロセッサの動作が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサに前記割り込み処理を実行させる割り込み処理実行部と、前記割り込み処理が終了すると、前記プロセッサに前記所定処理の実行状態の問い合わせを行わせる問い合わせ部と、を備えたことを特徴とする中央処理ユニット。   A functional unit capable of executing a predetermined process without using a processor; an operation stop unit for stopping the operation of the processor when the processor inquires about an execution state of the predetermined process during the execution of the predetermined process; When the processing is completed, an operation resuming unit that causes the processor to resume the operation, and when the operation of the processor is stopped by the operation stopping unit, when the interrupt processing start request is generated, the processor executes the interrupt processing. A central processing unit comprising: an interrupt processing execution unit for causing the processor to inquire about an execution state of the predetermined processing when the interrupt processing is completed. 前記プロセッサに実行させる命令コードのアドレスを記憶するプログラムカウンタと、前記プロセッサに前記割り込み処理を実行させるときに、前記プログラムカウンタに記憶されているアドレスから1命令分のアドレス値を減じたアドレスを記憶する割り込み処理用プログラムカウンタとを備え、
前記問い合わせ部は、前記割り込み処理が終了すると、前記割り込み処理用プログラムカウンタに記憶されているアドレスを前記プログラムカウンタに記憶させることを特徴とする請求項1に記載の中央処理ユニット。
A program counter for storing an address of an instruction code to be executed by the processor, and an address obtained by subtracting an address value for one instruction from the address stored in the program counter when the processor executes the interrupt processing. A program counter for interrupt processing,
2. The central processing unit according to claim 1, wherein the inquiry unit stores the address stored in the interrupt processing program counter in the program counter when the interrupt processing ends. 3.
前記動作停止部は、前記所定処理の実行中に、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサへのクロック信号の供給を停止させ、
前記動作再開部は、前記所定処理が終了すると前記プロセッサへのクロック信号の供給を再開させ、
前記割り込み処理実行部は、前記動作停止部によって前記プロセッサへのクロック信号の供給が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサへのクロック信号の供給を再開して当該プロセッサに前記割り込み処理を実行させることを特徴とする請求項1又は2に記載の中央処理ユニット。
The operation stopping unit stops the supply of the clock signal to the processor when the processor inquires about the execution state of the predetermined process during the execution of the predetermined process.
The operation restarting unit restarts the supply of the clock signal to the processor when the predetermined processing is completed,
The interrupt processing execution unit resumes the supply of the clock signal to the processor when a request to start interrupt processing occurs when the supply of the clock signal to the processor is stopped by the operation stop unit. The central processing unit according to claim 1, wherein the interrupt processing is executed by a processor.
前記機能部は、プロセッサを介さずにメモリアクセス可能なDMAコントローラであることを特徴とする請求項1から3のいずれか1項に記載の中央処理ユニット。   The central processing unit according to claim 1, wherein the functional unit is a DMA controller capable of accessing a memory without using a processor. プロセッサを介さずに所定処理を実行可能な機能部が当該所定処理を実行しているときに、前記プロセッサが前記所定処理の実行状態を問い合わせると、前記プロセッサの動作を停止可能な動作停止部が前記プロセッサに動作を停止させ、前記所定処理が終了すると、前記プロセッサの動作を再開可能な動作再開部が前記プロセッサに動作を再開させるプロセッサ制御方法であって、
前記所定処理の実行状態の問い合わせによって前記プロセッサの動作が停止されているときに、割り込み処理の開始要求が発生すると、前記プロセッサによる割り込み制御を実行可能な割り込み処理実行部が前記プロセッサに前記割り込み処理を実行させ、前記割り込み処理が終了すると、前記プロセッサによる前記所定処理の実行状態の問い合わせを実行可能な問い合わせ部が前記プロセッサに前記所定処理の実行状態の問い合わせを行わせることを特徴とするプロセッサ制御方法。
When a function unit capable of executing a predetermined process without using a processor is executing the predetermined process, when the processor inquires about an execution state of the predetermined process, an operation stop unit capable of stopping the operation of the processor is provided. An operation resumption unit capable of resuming the operation of the processor by causing the processor to stop the operation and, when the predetermined processing is completed, causes the processor to resume the operation,
When an interrupt processing start request is generated when the operation of the processor is stopped due to an inquiry about the execution state of the predetermined processing, an interrupt processing execution unit capable of executing interrupt control by the processor sends the interrupt processing to the processor. When the interrupt process is completed, an inquiry unit that can execute an inquiry about the execution state of the predetermined process by the processor causes the processor to make an inquiry about the execution state of the predetermined process. Method.
JP2004036747A 2003-11-07 2004-02-13 Central processing unit and processor control method Expired - Fee Related JP3991999B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004036747A JP3991999B2 (en) 2004-02-13 2004-02-13 Central processing unit and processor control method
US10/968,876 US20050149771A1 (en) 2003-11-07 2004-10-21 Processor control circuit, information processing apparatus, and central processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004036747A JP3991999B2 (en) 2004-02-13 2004-02-13 Central processing unit and processor control method

Publications (2)

Publication Number Publication Date
JP2005228103A JP2005228103A (en) 2005-08-25
JP3991999B2 true JP3991999B2 (en) 2007-10-17

Family

ID=35002770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004036747A Expired - Fee Related JP3991999B2 (en) 2003-11-07 2004-02-13 Central processing unit and processor control method

Country Status (1)

Country Link
JP (1) JP3991999B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3870970B2 (en) 2005-03-15 2007-01-24 セイコーエプソン株式会社 Processor control unit
JP5284142B2 (en) * 2009-02-27 2013-09-11 ローム株式会社 Data processing device

Also Published As

Publication number Publication date
JP2005228103A (en) 2005-08-25

Similar Documents

Publication Publication Date Title
JP3507822B2 (en) Computer device and power saving control method thereof
JP6180450B2 (en) Control device, control method and program for control device
EP3306470A1 (en) Method and apparatus for executing non-maskable interrupt
TWI485623B (en) Method for fast resuming computer system and computer system
JP3866749B2 (en) Microprocessor
JP3991999B2 (en) Central processing unit and processor control method
US20050149771A1 (en) Processor control circuit, information processing apparatus, and central processing unit
JP4359646B1 (en) Information processing device, external storage device, and control method
JP5086117B2 (en) Storage medium access device and storage medium access method
JP2010102567A (en) Periodical task execution device, periodical task execution method, and program
JP4107278B2 (en) Processor control circuit and information processing apparatus
JPS60218152A (en) Microprocessor
JP2001147821A (en) Processor
JP2701752B2 (en) Microprocessor clock supply control circuit
JP2000347772A (en) Power consumption reduction control method for processor to be used for portable information equipment
JPH0883133A (en) Computer system and clock control method for the same
JP2006261996A (en) Information processor
JP3190779B2 (en) Programmable controller
JP5194360B2 (en) Information processing apparatus and control method thereof
JP6406106B2 (en) Electronic control unit
KR100731706B1 (en) A method and apparatus of processing time reduction for CPU using reset
JP2013196112A (en) Memory system and method for controlling power saving of the same
JPH06105439B2 (en) Program management method
JP2002207596A (en) Processor and command execution method thereof
JPS61255440A (en) Program interruption control system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061114

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070416

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070703

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070716

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100803

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110803

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120803

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130803

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees