JP2004152321A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2004152321A
JP2004152321A JP2003424357A JP2003424357A JP2004152321A JP 2004152321 A JP2004152321 A JP 2004152321A JP 2003424357 A JP2003424357 A JP 2003424357A JP 2003424357 A JP2003424357 A JP 2003424357A JP 2004152321 A JP2004152321 A JP 2004152321A
Authority
JP
Japan
Prior art keywords
circuit
instruction
stop
processing unit
central processing
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
JP2003424357A
Other languages
Japanese (ja)
Inventor
Takeshi Kataoka
健 片岡
Fumio Tsuchiya
文男 土屋
Satoshi Tanaka
敏 田中
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2003424357A priority Critical patent/JP2004152321A/en
Publication of JP2004152321A publication Critical patent/JP2004152321A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Microcomputers (AREA)
  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data processor capable of dynamically terminating operation stop of a built-in circuit of which the operation is stopped by a selective operation stopping function, and of executing fine low power consumption control. <P>SOLUTION: This data processor includes: a central processor (2) for executing instructions; first circuits (3 and 4) connected to the central processor via internal buses (13 and 14); and a stop control circuit (12C) for selectively stopping the operation of the circuits. The central processor has an instruction control means (2C) used for, when an instruction using the first circuits is decoded by inputting stop control signals SFPU and SMLT outputted from the stop control circuit, starting the execution operation of the instruction after terminating the operation stop state of the first circuits by the stop control circuit in the case where the stop control signals order the stop. <P>COPYRIGHT: (C)2004,JPO

Description

本発明は、低消費電力化のために内蔵回路を選択的に動作停止させることができるデータ処理装置に係り、詳しくは動作停止状態の内蔵回路に対する命令が不当に若しくは誤って実行された時の誤動作を防止する技術、更には低消費電力制御を行なうための技術に関し、例えば、シングルチップマイクロコンピュータやシングルチップマイクロコントローラなどの半導体集積回路化されたデータ処理装置に適用して有効な技術に関するものである。   The present invention relates to a data processing device capable of selectively stopping operation of a built-in circuit in order to reduce power consumption, and more particularly to a data processing device in which an instruction to a built-in circuit in a stopped state is executed improperly or erroneously. A technology for preventing malfunctions, and a technology for performing low power consumption control, for example, a technology effective when applied to a semiconductor integrated circuit data processing device such as a single-chip microcomputer or a single-chip microcontroller. It is.

データ処理装置の低消費電力化のために内蔵回路モジュールを選択的に動作停止させる技術が知られている。例えば、データ処理装置の内部動作クロック信号を形成するクロック信号発生回路に、コントロールレジスタが設けられ、このコントロールレジスタには内蔵回路モジュール毎に制御ビットが割り当てられ、制御ビットの論理値に従って、対応される内蔵回路モジュールに対するクロック信号の供給を選択的に停止させることができる。このような技術は、例えば特許文献1に記載がある。   There is known a technique for selectively stopping the operation of a built-in circuit module in order to reduce the power consumption of a data processing device. For example, a control register is provided in a clock signal generation circuit that forms an internal operation clock signal of the data processing device. Control bits are assigned to each of the built-in circuit modules in the control register, and the control bits are assigned according to the logical value of the control bits. Supply of the clock signal to the built-in circuit module can be selectively stopped. Such a technique is described in Patent Document 1, for example.

特開平7−287699号公報JP-A-7-287699

しかしながら、低消費電力化のために内蔵回路モジュールを選択的に動作停止させたとき、当該内蔵モジュールに対する処理を行なう命令が不当に若しくは誤って実行されると、不当なメモリアクセス又はレジスタアクセスによって、データが破壊されたり誤動作を生じたりする虞の有ることが本発明者によって明らかにされた。   However, when the operation of the built-in circuit module is selectively stopped for low power consumption, if an instruction for processing the built-in module is executed illegally or erroneously, an illegal memory access or register access may cause The present inventor has found that data may be destroyed or malfunction may occur.

例えば、中央処理装置と共に浮動小数点演算装置やタイマなどが内蔵されたマイクロコンピュータにおいて、浮動小数点演算装置やタイマなどに対して個々に動作クロック信号の供給を選択的に停止できるようにされているとする。浮動小数点演算装置はデータレジスタを有し、このデータレジスタにメモリから演算データがロードされ、演算データはレジスタからメモリにストアされる。このとき、メモリとデータレジスタとの間のロード及びストア処理のためのアドレッシング動作を中央処理装置が行なうようにすることが、回路規模の増大を抑える上で優れている。中央処理装置と同様のアドレシングモードを浮動小数点演算装置が重ねて持つ必要はないからである。しかしながら、浮動小数点演算装置へのクロック信号の供給が停止されているとき、中央処理装置が不当に若しくは誤って浮動小数点命令を実行すると、浮動小数点演算装置のデータレジスタからメモリへのストア動作が不所望に行なわれる虞が有る。そうであれば、実際に浮動小数点演算装置は動作されないにも拘わらず、中央処理装置が実行するアドレシング動作によって、ストア先のメモリのデータが不所望に破壊されてしまう。また、特定の周辺回路へのクロック信号の供給が停止されているとき、中央処理装置が不当に若しくは誤って当該周辺回路のデータレジスタをソースとするストア命令を実行すると、周辺回路のデータレジスタからメモリへのストア動作が不所望に行なわれる。そうであれば、実際に周辺回路は動作されないにも拘わらず、中央処理装置が実行するアドレシング動作によって、ストア先のメモリのデータが不所望に破壊されてしまう。   For example, in a microcomputer having a built-in floating point arithmetic unit and timer together with a central processing unit, the supply of an operation clock signal to the floating point arithmetic unit and timer can be selectively stopped individually. I do. The floating-point arithmetic unit has a data register, and the data register is loaded with operation data from a memory, and the operation data is stored in the memory from the register. At this time, performing the addressing operation for load and store processing between the memory and the data register by the central processing unit is excellent in suppressing an increase in circuit scale. This is because it is not necessary for the floating point arithmetic unit to have the same addressing mode as that of the central processing unit. However, when the supply of the clock signal to the floating-point arithmetic unit is stopped, if the central processing unit incorrectly or erroneously executes the floating-point instruction, the store operation from the data register of the floating-point arithmetic unit to the memory is not performed. It may be performed as desired. If this is the case, the data in the memory at the storage destination is undesirably destroyed by the addressing operation performed by the central processing unit even though the floating-point arithmetic unit is not actually operated. Further, when the supply of the clock signal to a specific peripheral circuit is stopped, if the central processing unit incorrectly or erroneously executes a store instruction using the data register of the peripheral circuit as a source, the data register of the peripheral circuit The store operation to the memory is performed undesirably. If so, the data in the memory at the storage destination is undesirably destroyed by the addressing operation performed by the central processing unit, even though the peripheral circuit is not actually operated.

また、本発明者は、マイクロコンピュータにおいて、選択的な動作停止機能によって動作停止された内蔵回路の動作停止を解除することについて検討した。従来技術では、動作を再開したいときは、予めコントロールレジスタの設定を変更しなければ、動作停止に係る内蔵回路を用いた命令を実行することはできない。したがって、必要な時、即座に、動作停止に係る内蔵回路の動作を再開する事ができない。   In addition, the present inventor has studied the release of the operation stop of the built-in circuit whose operation has been stopped by the selective operation stop function in the microcomputer. In the related art, when the operation is desired to be resumed, it is not possible to execute an instruction using the built-in circuit relating to the operation stop unless the setting of the control register is changed in advance. Therefore, when necessary, the operation of the built-in circuit related to the operation stop cannot be immediately restarted.

本発明の目的は、選択的な動作停止機能によって動作停止された回路が誤って動作されることによって生ずる不当なメモリアクセスを防止できるデータ処理装置を提供することにある。   SUMMARY OF THE INVENTION It is an object of the present invention to provide a data processing device capable of preventing an illegal memory access caused by erroneously operating a circuit stopped by a selective operation stop function.

本発明の別の目的は、選択的な動作停止機能によって動作停止された内蔵回路の動作停止を動的に解除することができ、細かな低消費電力制御が可能なデータ処理装置を提供することにある。   Another object of the present invention is to provide a data processing device capable of dynamically releasing the suspension of operation of a built-in circuit that has been suspended by a selective suspension function and capable of finely controlling power consumption. It is in.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The outline of a representative invention among the inventions disclosed in the present application will be briefly described as follows.

〔1〕本発明の第1の観点によるデータ処理装置(1)は、命令を実行する中央処理装置(2)と、内部バス(13,14)を介して前記中央処理装置に結合された第1の回路(3,4)と、前記第1の回路の動作を選択的に停止させる停止制御回路(12)とを含み、前記中央処理装置は、前記停止制御回路から出力される停止制御信号(SFPU,SMLT)を入力し、前記第1の回路を用いる命令を解読するとき、前記停止制御信号が停止を指示していることを条件に、前記第1の回路を用いる命令を不当命令又は無効命令として処理する命令制御手段(2B)を有する。これにより、内蔵回路の動作停止機能によって動作停止が選択された第1回路が誤って動作されることになるような命令は、不当命令又は無効命令として処理される結果、不当なメモリアクセスの発生を防止できる。無効命令化された時、中央処理装置は次の命令を実行する。不当命令化された時、中央処理装置は例外処理に分岐し、ユーザなどによって定義された例外処理ルーチンを実行することになる。   [1] A data processing device (1) according to a first aspect of the present invention includes a central processing unit (2) for executing instructions and a data processing device coupled to the central processing unit via internal buses (13, 14). And a stop control circuit (12) for selectively stopping the operation of the first circuit, wherein the central processing unit outputs a stop control signal output from the stop control circuit. When inputting (SFPU, SMLT) and decoding the command using the first circuit, the command using the first circuit is invalid or the condition that the stop control signal indicates a stop. An instruction control means (2B) for processing as an invalid instruction is provided. As a result, an instruction in which the first circuit whose operation is selected to be stopped by the operation stop function of the built-in circuit is erroneously operated is processed as an invalid instruction or an invalid instruction. Can be prevented. When invalidated, the central processing unit executes the next instruction. When the instruction is invalidated, the central processing unit branches to exception processing and executes an exception processing routine defined by a user or the like.

〔2〕本発明の第2の観点によるデータ処理装置(1C)は、命令を実行する中央処理装置(2)と、内部バス(13,14)を介して前記中央処理装置に結合された第1の回路(3,4)と、前記第1の回路の動作を選択的に停止させる停止制御回路(12C)とを含み、前記中央処理装置は、前記停止制御回路から出力される停止制御信号(SFPU,SMLT)を入力し、前記第1の回路を用いる命令を解読するとき、前記停止制御信号が停止を指示している場合には前記停止制御回路による前記第1の回路の動作停止状態を解除してから当該命令の実行動作を開始させる命令制御手段(2C)を有する。これにより、内蔵回路の動作停止機能によって動作停止が選択された第1回路が動作されることになるような命令が実行されると、第1回路の動作停止状態が解除される。この結果、内蔵回路の動作停止を動的に解除することができ、細かな低消費電力制御が可能になる。   [2] A data processing device (1C) according to a second aspect of the present invention includes a central processing unit (2) for executing an instruction and a central processing unit coupled to the central processing unit via internal buses (13, 14). And a stop control circuit (12C) for selectively stopping the operation of the first circuit, wherein the central processing unit outputs a stop control signal output from the stop control circuit. When inputting (SFPU, SMLT) and decoding the instruction using the first circuit, if the stop control signal indicates stop, the stop control circuit stops the operation of the first circuit. And an instruction control means (2C) for starting the execution of the instruction after canceling the instruction. Thus, when an instruction is executed such that the first circuit whose operation has been selected to be stopped by the operation stop function of the internal circuit is executed, the operation stop state of the first circuit is released. As a result, the suspension of the operation of the built-in circuit can be dynamically released, and fine low power consumption control can be performed.

〔3〕上記第1及び第2の観点において、前記第1の回路は、例えば、前記中央処理装置が浮動小数点処理命令を実行することによって制御されると共に前記中央処理装置によってアドレッシング制御を受ける浮動小数点演算装置(3)とする事ができる。また、前記第1の回路は、前記中央処理装置が積和演算処理命令を実行することによって制御されると共に前記中央処理装置によるアドレッシング制御を受けて動作される積和演算装置(4)とすることができる。   [3] In the first and second aspects, the first circuit may be, for example, a floating unit which is controlled by the central processing unit executing a floating-point processing instruction and is subjected to addressing control by the central processing unit. A decimal point arithmetic unit (3) can be used. Further, the first circuit is a product-sum operation device (4) that is controlled by the central processing unit executing a product-sum operation processing instruction and that is operated under addressing control by the central processing unit. be able to.

〔4〕本発明の第3の観点によるデータ処理装置(1)は、命令を実行する中央処理装置(2)と、内部バス(13,14)を介して前記中央処理装置にインタフェースされ該中央処理装置のアドレシング制御及び演算制御を受ける演算装置(3,4)と、前記内部バスに結合されたバスステートコントローラ(6)を介して前記中央処理装置とインタフェースされ該中央処理装置のアクセス制御を受ける周辺回路(9,10,11)と、前記バスステートコントローラを外部に接続する外部バスインタフェース回路(8)と、前記演算装置と周辺回路の動作を夫々選択的に停止可能な停止制御回路(12)とを含み、前記バスステートコントローラは前記停止制御回路から出力される前記周辺回路のための第1の停止制御信号(SSCI,STMR,SADC)を入力し、第1の停止制御信号によって動作停止が指示されている周辺回路に対するアクセスを検出したときバスエラー信号(24)を中央処理装置による例外処理要求信号として出力する。これにより、内蔵周辺回路の動作停止機能によって動作停止が選択された周辺回路が誤って動作されることになるような命令が実行された時はバスエラーとされ、それに対する例外処理が行なわれる。したがって、不当なメモリアクセスの発生を防止できる。   [4] A data processing device (1) according to a third aspect of the present invention comprises a central processing unit (2) for executing an instruction and an interface with the central processing unit via an internal bus (13, 14). An arithmetic unit (3, 4) which receives addressing control and arithmetic control of the processing unit; and a bus state controller (6) coupled to the internal bus, which interfaces with the central processing unit to control access of the central processing unit. Receiving peripheral circuits (9, 10, 11), an external bus interface circuit (8) for externally connecting the bus state controller, and a stop control circuit (27) capable of selectively stopping operations of the arithmetic unit and the peripheral circuits. 12), the bus state controller outputs a first stop control signal (SSCI, TMR, enter the SADC), and outputs a bus error signal when it detects the access to the peripheral circuit operation stopped by the first stop control signal is indicated (24) as an exception process request signal by the central processing unit. Thus, when an instruction that causes the peripheral circuit whose operation stop is selected by the operation stop function of the built-in peripheral circuit to be erroneously operated is executed, a bus error is generated, and exception processing is performed for the bus error. Therefore, the occurrence of an illegal memory access can be prevented.

〔5〕前記〔4〕において、前記中央処理装置は、前記停止制御回路から出力される前記演算装置のための第2の停止制御信号(SFPU,SMLT)を入力し、前記演算装置を用いる命令を解読するとき、前記第2の停止制御信号が停止を指示していることを条件に、前記演算装置を用いる命令を不当命令又は無効命令として処理する命令制御手段(2B)を有することができる。これにより、内蔵回路の動作停止機能によって動作停止が選択された演算装置が誤って動作されることになるような命令は、不当命令又は無効命令として処理される結果、不当なメモリアクセスなどの発生を防止できる。   [5] In the above [4], the central processing unit inputs a second stop control signal (SFPU, SMLT) for the arithmetic unit output from the stop control circuit, and issues an instruction to use the arithmetic unit. When decoding the instruction, the instruction control means (2B) for processing an instruction using the arithmetic unit as an illegal instruction or an invalid instruction on condition that the second stop control signal indicates stop. . As a result, an instruction in which the operation device selected to stop the operation by the operation stop function of the built-in circuit is erroneously operated is processed as an invalid instruction or an invalid instruction, and as a result, an illegal memory access occurs. Can be prevented.

〔6〕本発明の第4の観点によるデータ処理装置(1C)は、命令を実行する中央処理装置(2)と、内部バス(13,14)を介して前記中央処理装置にインタフェースされ該中央処理装置のアドレシング制御及び演算制御を受ける演算装置(3,4)と、前記内部バスに結合されたバスステートコントローラ(6C)を介して前記中央処理装置とインタフェースされ該中央処理装置のアクセス制御を受ける周辺回路(9,10,11)と、前記バスステートコントローラを外部に接続する外部バスインタフェース回路(8)と、前記演算装置と周辺回路の動作を夫々選択的に停止可能な停止制御回路(12C)とを含み、前記バスステートコントローラ(6C)は前記停止制御回路から出力される前記周辺回路のための第1の停止制御信号(SSCI,STMR,SADC)を入力し、第1の停止制御信号によって動作停止が指示されている周辺回路に対するアクセスを検出したとき当該周辺回路の動作停止状態を解除してから該周辺回路のためのバスサイクルを起動する。これにより、内蔵周辺回路の動作停止機能によって動作停止が選択された周辺回路が動作されるとき、当該周辺回路の動作停止状態が解除される。この結果、内蔵周辺回路の動作停止を動的に解除することができ、細かな低消費電力制御が可能になる。   [6] A data processing device (1C) according to a fourth aspect of the present invention includes a central processing unit (2) for executing an instruction and an interface with the central processing unit via an internal bus (13, 14). An arithmetic unit (3, 4) that receives addressing control and arithmetic control of the processing unit; and a bus state controller (6C) coupled to the internal bus to interface with the central processing unit to control access to the central processing unit. Receiving peripheral circuits (9, 10, 11), an external bus interface circuit (8) for externally connecting the bus state controller, and a stop control circuit (27) capable of selectively stopping operations of the arithmetic unit and the peripheral circuits. 12C), wherein the bus state controller (6C) outputs a first stop control signal for the peripheral circuit output from the stop control circuit. (SSCI, STMR, SADC), and when detecting an access to a peripheral circuit whose operation is instructed by the first stop control signal, release the operation stop state of the peripheral circuit, and Activate the bus cycle. With this, when the peripheral circuit whose operation stop is selected by the operation stop function of the built-in peripheral circuit is operated, the operation stop state of the peripheral circuit is released. As a result, the suspension of the operation of the built-in peripheral circuit can be dynamically released, and fine low power consumption control can be performed.

〔7〕上記〔6〕において、前記中央処理装置は、前記停止制御回路から出力される前記演算装置のための第2の停止制御信号(SFPU,SMLT)を入力し、前記演算装置を用いる命令を解読するとき、前記第2の停止制御信号が停止を指示している場合には前記停止制御回路による当該演算装置の動作停止状態を解除してから当該命令の実行動作を開始させる命令制御手段(2C)を有することができる。これにより、内蔵回路の動作停止機能によって動作停止が選択された演算装置が動作されるとき、演算装置の動作停止状態が解除される。この結果、内蔵回路の動作停止を動的に解除することができ、細かな低消費電力制御が可能になる。上記〔6〕において、前記中央処理装置は、前記停止制御回路から出力される前記演算装置のための第2の停止制御信号を入力し、前記演算装置を用いる命令を解読するとき、前記第2の停止制御信号が停止を指示していることを条件に、前記演算装置を用いる命令を不当命令又は無効命令として処理する命令制御手段を有することができる。これにより、動作停止が選択された演算装置を動作させる命令に対しては、これを不当命令又は無効命令として処理する事によって、不当なメモリアクセスなどの発生を防止し、内蔵周辺回路に対しては動作停止を動的に解除することができる。   [7] In the above [6], the central processing unit inputs a second stop control signal (SFPU, SMLT) for the arithmetic unit output from the stop control circuit, and issues an instruction using the arithmetic unit. When the second stop control signal indicates stop, an instruction control means for releasing the operation stop state of the arithmetic unit by the stop control circuit and then starting the execution of the instruction (2C). Thus, when the operation device whose operation stop is selected by the operation stop function of the built-in circuit is operated, the operation stop state of the operation device is released. As a result, the suspension of the operation of the built-in circuit can be dynamically released, and fine low power consumption control can be performed. In the above [6], the central processing unit inputs a second stop control signal for the arithmetic unit output from the stop control circuit, and decodes a command using the arithmetic unit when the second stop control signal is input. Command control means for processing a command using the arithmetic device as an illegal command or an invalid command on condition that the stop control signal indicates stop. As a result, an instruction to operate the arithmetic unit whose operation is selected to be stopped is processed as an illegal instruction or an invalid instruction, thereby preventing occurrence of an illegal memory access and the like, and preventing the built-in peripheral circuit from being executed. Can dynamically release the suspension of operation.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The following is a brief description of an effect obtained by a representative one of the inventions disclosed in the present application.

すなわち、データ処理装置において選択的な動作停止機能によって動作停止された回路が誤って動作されることによって生ずる不当なメモリアクセスを防止できる。また、データ処理装置において選択的な動作停止機能によって動作停止された内蔵回路の動作停止を動的に解除することができ、細かな低消費電力制御を行なうことができる。   That is, it is possible to prevent an illegal memory access caused by erroneously operating a circuit that has been stopped by the selective operation stop function in the data processing device. In addition, the operation stop of the built-in circuit whose operation has been stopped by the selective operation stop function in the data processing device can be dynamically released, and fine low power consumption control can be performed.

《無効命令化(不当命令化)、バスエラー化によるメモリ保護》
図1には本発明に係るデータ処理装置の第1の例としてシングルチップマイクロコンピュータ(マイクロコンピュータと称する)1が示される。同図に示されるマイクロコンピュータ1は、特に制限されないが、公知の半導体集積回路製造技術によって単結晶シリコンのような1個の半導体基板(半導体チップ)に形成される。このマイクロコンピュータ1は、特に制限されないが、整数演算を行なう中央処理装置(CPU)2と共に、浮動小数点演算を行なう浮動小数点演算装置(FPU)3を有する。更に、ディジタル信号処理で多用される積和演算に特化した積和演算装置4を有する。
<< Invalid instruction (illegal instruction), memory protection by bus error >>
FIG. 1 shows a single-chip microcomputer (called a microcomputer) 1 as a first example of a data processing device according to the present invention. Although not particularly limited, the microcomputer 1 shown in FIG. 1 is formed on one semiconductor substrate (semiconductor chip) such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique. The microcomputer 1 includes, but is not limited to, a central processing unit (CPU) 2 for performing an integer operation and a floating-point operation unit (FPU) 3 for performing a floating-point operation. Further, it has a product-sum operation device 4 specialized for the product-sum operation frequently used in digital signal processing.

中央処理装置2は内部アドレスバス14及び内部データバス13に結合される。中央処理装置2は、特に制限されないが、汎用レジスタや算術論理演算器で代表される演算部2Aと、プログラムカウンタなどの制御用レジスタ群、そして命令のフェッチや解読並びに命令実行手順を制御したり演算制御を行う命令制御部2Bなどを有する。中央処理装置2は、外部バス17,18に接続された図示を省略する外部メモリもしくは内部バス13,14に接続された図示を省略する内部メモリから命令をフェッチし、その命令を解読し、解読結果に応ずる制御信号を生成することにより、当該命令に応じたデータ処理を行う。   Central processing unit 2 is coupled to internal address bus 14 and internal data bus 13. Although not particularly limited, the central processing unit 2 controls an operation unit 2A represented by a general-purpose register or an arithmetic and logic unit, a control register group such as a program counter, and fetching and decoding instructions and an instruction execution procedure. It has an instruction control unit 2B for performing arithmetic control. The central processing unit 2 fetches an instruction from an unillustrated external memory connected to the external buses 17 and 18 or an unillustrated internal memory connected to the internal buses 13 and 14, decodes the instruction, and decodes the instruction. By generating a control signal corresponding to the result, data processing according to the command is performed.

浮動小数点演算装置(FPU)3及び積和演算装置4は内部データバス13に結合される。浮動小数点演算装置(FPU)3及び積和演算装置4は図示を省略する演算回路と共にデータレジスタを有し、このデータレジスタにメモリから演算データがロードされ、演算結果データは、そのレジスタからメモリにストアされる。前記ロード、ストアなどのためのアドレッシング動作はCPU2が行なう。したがって、FPU3及び積和演算装置4はメモリアクセスのためのメモリアドレシング能力を備える必要はない。これは、FPU3及び積和演算装置4によるメモリアドレシング回路の必要性を取り除いてチップ面積を節約するためである。   The floating point arithmetic unit (FPU) 3 and the product-sum arithmetic unit 4 are coupled to the internal data bus 13. The floating-point arithmetic unit (FPU) 3 and the product-sum arithmetic unit 4 have a data register together with an arithmetic circuit (not shown). The data register is loaded with arithmetic data from a memory, and the arithmetic result data is loaded from the register to the memory. Stored. The CPU 2 performs the addressing operation for the load, store, and the like. Therefore, the FPU 3 and the product-sum operation device 4 do not need to have a memory addressing capability for memory access. This is to save the chip area by eliminating the need for the memory addressing circuit by the FPU 3 and the product-sum operation unit 4.

内部データバス13及び内部アドレスバス14はバスステートコントローラ6に結合される。マイクロコンピュータ1による外部アクセスは、前記バスステートコントローラ6に接続された外部バスインタフェース回路8で行う。外部バスインタフェース回路8は外部データバス18及び外部アドレスバス17に接続される。また、前記バスステートコントローラ6には、周辺データバス16及び周辺アドレスバス15を介して、例えば、クロック発生回路7、システムコントローラ12、シリアルコミュニケーションインタフェースコントローラ(SCI)9、タイマ10及びA/Dコンバータ11が結合される。それら周辺回路はデータレジスタや制御レジスタを有し、斯かるレジスタは前記バスステートコントローラ6を介してCPU2によってアクセスされる。   Internal data bus 13 and internal address bus 14 are coupled to bus state controller 6. External access by the microcomputer 1 is performed by an external bus interface circuit 8 connected to the bus state controller 6. The external bus interface circuit 8 is connected to the external data bus 18 and the external address bus 17. The bus state controller 6 is connected to the clock generation circuit 7, the system controller 12, the serial communication interface controller (SCI) 9, the timer 10, and the A / D converter via the peripheral data bus 16 and the peripheral address bus 15, for example. 11 are combined. These peripheral circuits have a data register and a control register, and these registers are accessed by the CPU 2 via the bus state controller 6.

CPU2が管理する内部メモリ空間、外部メモリ空間、前記SCI9,タイマ10,A/Dコンバータ11などの周辺回路に対するアドレスエリアの割り当ては予め決定されている。前記バスステートコントローラ6は、アクセスエリア毎にアクセスサイクル数やバス幅などがCPU2によって設定される図示を省略するバスコントロールレジスタを有し、CPU2からのアクセスアドレスで指定されるメモリエリアに対するバス幅やアクセスサイクル数などのバス制御を行なって、バスサイクルを起動する。CPU2からのアクセスの指示はバスコマンド23としてバスステートコントローラ6に与えられる。バスコマンド23にはアクセスサイズの指定や、リード、ライト、メモリアクセス等のストローブ信号が含まれる。   The assignment of address areas to the internal memory space and the external memory space managed by the CPU 2 and peripheral circuits such as the SCI 9, timer 10, and A / D converter 11 is determined in advance. The bus state controller 6 has a bus control register (not shown) in which the number of access cycles, bus width, and the like are set by the CPU 2 for each access area. Bus control such as the number of access cycles is performed to activate a bus cycle. An access instruction from the CPU 2 is given to the bus state controller 6 as a bus command 23. The bus command 23 includes designation of an access size and strobe signals such as read, write, and memory access.

割込みコントローラ5は複数の割込み要求に対する優先制御やマスク制御などを行なって割込み信号25をCPU2に与える。割込み要求は、バスステートコントローラ6からのバスエラー信号24のほか、SCI9、タイマ10、A/Dコンバータ11そして外部からの図示を省略する割込み要求信号によって与えられる。   The interrupt controller 5 performs priority control, mask control, and the like on a plurality of interrupt requests, and supplies an interrupt signal 25 to the CPU 2. The interrupt request is given by a bus error signal 24 from the bus state controller 6, an SCI 9, a timer 10, the A / D converter 11, and an external interrupt request signal (not shown).

前記マイクロコンピュータ1は、特に制限されないが、クロック発生回路7から出力されるクロック信号CLK0〜CLK2に同期動作される。クロック信号CLK0は、CPU2、積和演算装置4,図示を省略する内部メモリ、FPU3の夫々に含まれる図示を省略するクロックドライバに供給され、それらCPU2、積和演算装置4,FPU3、図示を省略する内部メモリの動作基準クロック信号とされる。クロック信号CLK1は外部アクセスのための同期クロック信号とされ、外部バスインタフェース回路8の図示を省略するクロックドライバに供給される。クロック信号CLK2はSCI9、タイマ10、A/D11の図示を省略するクロックドライバに供給され、それらSCI9、タイマ10、A/D11の同期クロック信号とされる。バスステートコントローラ6は、内部バス13,14に対する入出力動作を前記クロック信号CLK0に同期させ、周辺バス15,16に対する入出力動作を前記クロック信号CLK3に同期させ、外部バスインタフェース回路8を介する入出力動作を前記クロック信号CLK2に同期させる。尚、そのほかの回路にも図示を省略する動作クロック信号が供給されることはいうまでもない。   Although not particularly limited, the microcomputer 1 is operated in synchronization with clock signals CLK0 to CLK2 output from the clock generation circuit 7. The clock signal CLK0 is supplied to a clock driver (not shown) included in each of the CPU 2, the product-sum operation device 4, an internal memory (not shown), and the FPU 3, and the CPU 2, the product-sum operation device 4, FPU 3, and the illustration are omitted. The operation reference clock signal of the internal memory to be used. The clock signal CLK1 is a synchronous clock signal for external access, and is supplied to a clock driver (not shown) of the external bus interface circuit 8. The clock signal CLK2 is supplied to a clock driver (not shown) for the SCI 9, the timer 10, and the A / D 11, and is used as a synchronous clock signal for the SCI 9, the timer 10, and the A / D 11. The bus state controller 6 synchronizes input / output operations on the internal buses 13 and 14 with the clock signal CLK0, synchronizes input / output operations on the peripheral buses 15 and 16 with the clock signal CLK3, and inputs / outputs via the external bus interface circuit 8. The output operation is synchronized with the clock signal CLK2. Needless to say, an operation clock signal (not shown) is supplied to other circuits.

前記システムコントローラ12はマイクロコンピュータ1の内蔵モジュールに対する動作停止を制御する。すなわち、システムコントローラ12は、CPU2によってアクセスされるクロック停止制御レジスタ12Rを有し、同レジスタ12Rにはクロック制御ビットSFPU,SMLT,SSCI,STMR,SADCが割り当てられる。クロック制御ビットSFPU,SMLT,SSCI,STMR,SADCは、前記FPU3,積和演算装置4,SCI9,タイマ10,A/Dコンバータ11に内蔵された図示を省略するクロックドライバの制御端子に供給され、それがセット状態(論理値“1”)にされることにより、対応する内蔵モジュールのクロックドライバの出力を一定レベルに固定し、その内蔵モジュールの動作を停止させる。リセット状態(論理値“0”)では対応するクロックドライバのクロック出力動作を可能にし、対応する内蔵モジュールを動作可能にする。   The system controller 12 controls the operation stop of the built-in module of the microcomputer 1. That is, the system controller 12 has a clock stop control register 12R accessed by the CPU 2, and clock control bits SFPU, SMLT, SSCI, STMR, and SADC are assigned to the register 12R. The clock control bits SFPU, SMLT, SSCI, STMR, and SADC are supplied to control terminals of the FPU 3, the product-sum operation device 4, the SCI 9, the timer 10, and the clock driver (not shown) built in the A / D converter 11, When it is set to the set state (logical value “1”), the output of the clock driver of the corresponding built-in module is fixed at a fixed level, and the operation of the built-in module is stopped. In the reset state (logic value “0”), the clock output operation of the corresponding clock driver is enabled, and the corresponding built-in module is enabled.

図2には無効命令化(不当命令化)によるメモリ保護のための構成を抜粋してある。無効命令化(不当命令化)によるメモリ保護のために、前記クロック制御ビットSFPU,SMLTは前記CPU2にも供給されている。それによってCPU2の命令制御部2Bは、FPU3を用いる命令を解読する時、クロック制御ビットSFPUがセット状態であることを条件に、当該命令を不当命令又は無効命令として処理する。同様にCPU2の命令制御部2Bは、積和演算装置4を用いる命令を解読する時、クロック制御ビットSMLTがセット状態であることを条件に、当該命令を不当命令又は無効命令として処理する。前記無効命令は所謂NOP(ノンオペレーション)であり、次の命令が実行されることになる。不当命令は所謂未定義命令であり、現在処理中の命令実行が中断され、ユーザが定義した例外処理ルーチンで規定される処理に分岐される。何れの場合においても、そのとき、上記FPU3、積和演算装置4を用いる命令の実行は中止される。したがって、FPU3や積和演算装置4の動作が停止されている時、それらを用いる命令が誤って若しくは不当に実行される結果、不当にメモリアクセスが行なわれてデータ破壊を生ずる虞を未然に防止する事ができる。   FIG. 2 shows a configuration for memory protection by invalid instruction (illegal instruction). The clock control bits SFPU and SMLT are also supplied to the CPU 2 for memory protection by invalidating instructions (invalid instructions). Accordingly, when decoding the instruction using the FPU 3, the instruction control unit 2B of the CPU 2 processes the instruction as an illegal instruction or an invalid instruction on condition that the clock control bit SFPU is set. Similarly, when the instruction control unit 2B of the CPU 2 decodes an instruction using the product-sum operation unit 4, the instruction control unit 2B processes the instruction as an illegal instruction or an invalid instruction on condition that the clock control bit SMLT is set. The invalid instruction is a so-called NOP (non-operation), and the next instruction is executed. The illegal instruction is a so-called undefined instruction, the execution of the instruction currently being processed is interrupted, and the process branches to a process defined by an exception handling routine defined by the user. In any case, the execution of the instruction using the FPU 3 and the product-sum operation unit 4 is stopped at that time. Therefore, when the operation of the FPU 3 or the multiply-accumulate operation unit 4 is stopped, it is possible to prevent a possibility that an instruction using them is erroneously or improperly executed, resulting in improper memory access and data corruption. You can do it.

図3にはバスエラーを発生させてメモリ保護を行なうための構成を抜粋してある。バスエラーを発生させてメモリ保護を行なうために、クロック制御ビットSSCI,STMR,SADCは前記バスステートコントローラ6にも供給されている。それによってバスステートコントローラ6は、クロック制御ビットSSCI,STMR,SADCによって動作停止が指示されている周辺回路に対するアクセスを検出したときバスエラー信号24を割込みコントローラ5に出力する。これに従って割込みコントローラ5は割込み信号25をCPU2にアサートし、CPU2はその例外要因(バスエラー)に従った例外処理を行なう。ここで、例外処理は、実行中の処理を中断し、例外処理を行なった後中断した処理に復帰しない第1の例外処理と、実行中の処理を中断し、例外処理を行なった後、中断した処理に復帰する第2の例外処理とがあるが、バスエラーに対する例外処理は第1の例外処理の範疇に属する。これにより、SCI9などの周辺回路の動作が停止されている時、それらを用いる命令が誤って若しくは不当に実行される結果、不当にメモリアクセスが行なわれてデータ破壊を生ずる虞を未然に防止する事ができる。   FIG. 3 shows a configuration for performing memory protection by generating a bus error. Clock control bits SSCI, STMR, and SADC are also supplied to the bus state controller 6 to generate a bus error and protect the memory. As a result, the bus state controller 6 outputs a bus error signal 24 to the interrupt controller 5 when detecting an access to a peripheral circuit whose operation is instructed by the clock control bits SSCI, STMR, and SADC. In accordance with this, the interrupt controller 5 asserts the interrupt signal 25 to the CPU 2, and the CPU 2 performs exception processing according to the exception factor (bus error). Here, the exception process is a first exception process in which the process being executed is interrupted and the process is not returned to the interrupted process after the exception process is performed. The exception process is interrupted after the process in progress is interrupted and the exception process is performed. There is a second exception process that returns to the completed process, but the exception process for the bus error belongs to the category of the first exception process. Thereby, when the operation of the peripheral circuits such as the SCI 9 is stopped, the possibility that the instructions using them are erroneously or incorrectly executed, resulting in improper memory access and data corruption is prevented. Can do things.

前記CPU2による不当命令化又は無効命令化によるメモリ保護のための具体的な構成を更に説明する。CPU2の命令は、特に制限されないが、16ビット固定長命令とされ、その特定のフィールド、例えば最上位側から4ビットは命令の種類を大別するコードとされる。その種類値は、例えば、論理演算命令、シフト命令、分岐命令、システム制御命令、浮動小数点命令、積和演算命令などである。ちなみに浮動小数点命令の前記最上位側4ビットは“1111”にされる。積和演算命令の前記最上位側4ビットは“0011”にされる。尚、斯かる最上位側4ビットはその他の所定フィールドの命令コードと共にオペレーションコードを構成する。また、命令がオペランドの指定フィールドを有するとき、それは、アドレシングモードに従ってレジスタアクセス或いは命令アクセス対象とされるアドレス領域を指定する。   A specific configuration for protecting the memory by invalidating or invalidating instructions by the CPU 2 will be further described. Although the instruction of the CPU 2 is not particularly limited, the instruction is a 16-bit fixed-length instruction, and a specific field, for example, 4 bits from the most significant side is a code for roughly classifying the instruction type. The kind value is, for example, a logical operation instruction, a shift instruction, a branch instruction, a system control instruction, a floating-point instruction, a product-sum operation instruction, and the like. Incidentally, the four most significant bits of the floating point instruction are set to "1111". The four most significant bits of the product-sum operation instruction are set to “0011”. The four most significant bits constitute an operation code together with the instruction codes of other predetermined fields. When an instruction has an operand designation field, it designates an address area to be accessed by a register or an instruction according to an addressing mode.

図4には前記命令制御部2Bの概略的な構成が示される。命令制御部2Bはプリデコーダ200とハードワイヤードロジック201を有する。ハードワイヤードロジック201は、論理演算制御論理、分岐処理制御論理、浮動小数点演算制御論理、積和演算制御論理、不当命令制御論理、無効命令(NOP)制御論理等を有し、命令に応じた処理を実現するための制御信号を出力するための論理構成を備える。プリデコーダ200には、命令コード及び前記クロック制御ビットSFPU,SMLT,SSCI,STMR,SADCなどが供給される。プリデコーダ200は命令コードを解読し、解読結果に応ずるエントリ指定データをハードワイヤードロジック201に出力する。ハードワイヤードロジック201はそのエントリ指定データで指定される論理を選択して、各種制御信号を出力する。20、21,22で示される制御信号は、積和演算装置4、FPU3、CPU2の演算部2Aへ供給される制御信号を代表的に示したものである。   FIG. 4 shows a schematic configuration of the instruction control unit 2B. The instruction control unit 2B has a predecoder 200 and a hard wired logic 201. The hard wired logic 201 has logical operation control logic, branch processing control logic, floating point operation control logic, product-sum operation control logic, illegal instruction control logic, invalid instruction (NOP) control logic, and the like, and performs processing according to the instruction. Is provided for outputting a control signal for realizing the above. The predecoder 200 is supplied with an instruction code and the clock control bits SFPU, SMLT, SSCI, STMR, SADC, and the like. The predecoder 200 decodes the instruction code and outputs entry designation data corresponding to the decoding result to the hard wired logic 201. The hard-wired logic 201 selects a logic specified by the entry specification data and outputs various control signals. The control signals indicated by 20, 21, 22 are representatively representative of the control signals supplied to the product-sum operation unit 4, the FPU 3, and the operation unit 2A of the CPU 2.

このとき、プリデコーダ200は前記クロック制御ビットSFPU,SMLT,SSCI,STMR,SADCを参照し、前記不当命令化又は無効命令化の処理を行なう。   At this time, the pre-decoder 200 refers to the clock control bits SFPU, SMLT, SSCI, STMR, and SADC to perform the invalid instruction or invalid instruction processing.

図5には前記無効命令化の処理を行なうための論理構成の一例が示される。プリデコーダ200は命令コードの最上位側4ビットをデコーダ210でデコードする。デコーダ210は入力される4ビットが“1111”である時(浮動小数点命令である)、FPU命令検出信号211をハイレベルにアサートし、“0011”である時(積和演算命令である)、積和演算命令検出信号212をハイレベルにアサートする。信号211,212は夫々前記クロック制御ビットSFPU,SMLTと論理積(AND)が採られ、双方の論理積信号213,214は論理和(OR)が採られる。論理和信号215はセレクタ216の選択信号とされる。セレクタ216は無効命令(NOP)の命令コードを固定値として発生する回路217から出力される無効命令コード218又はCPU2がフェッチして実行すべき命令コード219を選択する。論理和信号215がハイレベルの時、即ち、クロック制御ビットSFPU,SMLTによってFPU3,積和演算装置4のクロック信号が停止されているとき、FPU命令,MLT命令を実行しようとすると、セレクタ216は無効命令コード218を選択する。セレクタ216で選択された命令コードはプリデコード論理220でデコードされる。これによって、FPU3,積和演算装置4のクロック停止状態ではFPU命令,MLT命令が無効命令化される。尚、不当命令として処理するときは、回路217の代わりに不当命令コードを発生する回路を採用すればよい。   FIG. 5 shows an example of a logical configuration for performing the invalid instruction conversion process. The predecoder 200 decodes the four most significant bits of the instruction code by the decoder 210. The decoder 210 asserts the FPU instruction detection signal 211 to a high level when the input 4 bits are “1111” (a floating point instruction), and when the input 4 bits are “0011” (a product-sum operation instruction), Assert the product-sum operation instruction detection signal 212 to a high level. The signals 211 and 212 take a logical product (AND) with the clock control bits SFPU and SMLT, respectively, and the logical product signals 213 and 214 take a logical sum (OR). The OR signal 215 is used as a selection signal of the selector 216. The selector 216 selects an invalid instruction code 218 output from a circuit 217 that generates an instruction code of an invalid instruction (NOP) as a fixed value or an instruction code 219 to be fetched and executed by the CPU 2. When the OR signal 215 is at a high level, that is, when the clock signals of the FPU 3 and the product-sum operation unit 4 are stopped by the clock control bits SFPU and SMLT, when the FPU instruction and the MLT instruction are executed, the selector 216 The invalid instruction code 218 is selected. The instruction code selected by the selector 216 is decoded by the predecode logic 220. Thus, the FPU instruction and the MLT instruction are invalidated when the clocks of the FPU 3 and the product-sum operation unit 4 are stopped. When processing as an illegal instruction, a circuit for generating an illegal instruction code may be employed instead of the circuit 217.

図6にはバスステートコントローラ6がメモリ保護のためにバスエラーを発生されるための信号生成論理が例示されている。バスコントローラ6は、CPU2から供給されるアドレス信号をデコードして周辺回路SCI9,タイマ10,A/Dコンバータ11に対するアクセスを検出可能なアドレスデコーダ600を有する。このアドレスデコーダ600のデコード論理は前記周辺回路のマッピングアドレスに従って決定されている。信号601はSCI9に対するアクセス検出信号、602はタイマ602に対するアクセス検出信号、603はA/Dコンバータ11に対するアクセス検出信号であり、アクセスが検出される事によってハイレベルにされる。夫々のアクセス検出信号601,602,603はクロック制御ビットSSCI,STMR,SADCと論理積が採られ、夫々の論理積信号に対する論理和信号が前記バスエラー信号24とされる。したがって、バスエラー信号24は、クロック制御ビットSSCI,STMR,SADCによってSCI9,タイマ10,A/Dコンバータ11のクロック信号が停止されているとき、クロック停止されている周辺回路をアクセスする命令が実行されると、バスエラー信号24がアサートされる。これによって、当該周辺回路をアクセスする命令実行が中断され、例外処理に分岐される。その結果として、メモリのデータ破壊が防止される。   FIG. 6 illustrates signal generation logic for causing the bus state controller 6 to generate a bus error for memory protection. The bus controller 6 has an address decoder 600 capable of decoding an address signal supplied from the CPU 2 and detecting an access to the peripheral circuit SCI9, the timer 10, and the A / D converter 11. The decoding logic of the address decoder 600 is determined according to the mapping address of the peripheral circuit. A signal 601 is an access detection signal for the SCI 9, a reference numeral 602 is an access detection signal for the timer 602, and a reference numeral 603 is an access detection signal for the A / D converter 11, which is set to a high level when an access is detected. Each of the access detection signals 601, 602, and 603 is ANDed with the clock control bits SSCI, STMR, and SADC, and the OR signal for each AND signal is used as the bus error signal 24. Therefore, when the clock signals of the SCI 9, the timer 10, and the A / D converter 11 are stopped by the clock control bits SSCI, STMR, and SADC, the bus error signal 24 is executed by an instruction for accessing the peripheral circuit whose clock is stopped. Then, the bus error signal 24 is asserted. As a result, the instruction execution for accessing the peripheral circuit is interrupted, and the process branches to exception processing. As a result, data corruption in the memory is prevented.

《クロック停止の動的解除》
図7には本発明に係るデータ処理装置の第2の例としてシングルチップマイクロコンピュータ(マイクロコンピュータと称する)1Cが示される。同図に示されるマイクロコンピュータ1Cは、特に制限されないが、公知の半導体集積回路製造技術によって単結晶シリコンのような1個の半導体基板(半導体チップ)に形成される。同図に示されるマイクロコンピュータ1Cは、クロック信号の停止されている回路モジュールを操作する命令を実行するとき、若しくはそのようなモジュールに対するアクセスが発生するとき、それに応じて当該回路モジュールのクロック停止状態を動的に解除可能にしたものである。
《Dynamic release of clock stop》
FIG. 7 shows a single-chip microcomputer (referred to as a microcomputer) 1C as a second example of the data processing apparatus according to the present invention. Although not particularly limited, the microcomputer 1C shown in FIG. 1 is formed on one semiconductor substrate (semiconductor chip) such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique. When the microcomputer 1C shown in FIG. 1 executes an instruction for operating a circuit module whose clock signal is stopped, or when an access to such a module occurs, the clock stop state of the circuit module is accordingly set. Can be dynamically released.

図7に示されるマイクロコンピュータ1Cは、図1に示されるマイクロコンピュータ1に対して、命令制御部2C、バスステートコントローラ6C、及びシステムコントローラ12Cの構成が相違される。その他の構成は図1と同じである。   The microcomputer 1C shown in FIG. 7 is different from the microcomputer 1 shown in FIG. 1 in the configuration of an instruction control unit 2C, a bus state controller 6C, and a system controller 12C. Other configurations are the same as those in FIG.

システムコントローラ12Cのクロック制御ビットSFPU,SMLT,SSCI,STMR,SADCは、CPU2によるバスアクセス以外に、クリア信号CLR0〜CLR4でリセット可能にされる。クリア信号CLR0〜CLR4はクロック制御ビットSFPU,SMLT,SSCI,STMR,SADCに対応され、そのハイレベルがリセットを指示する。クリア信号CLR0,CLR1は命令制御部2Cが生成し、クリア信号CLR2〜CLR4はバスコントローラ6Cが生成する。   The clock control bits SFPU, SMLT, SSCI, STMR, and SADC of the system controller 12C can be reset by clear signals CLR0 to CLR4 in addition to the bus access by the CPU 2. The clear signals CLR0 to CLR4 correspond to the clock control bits SFPU, SMLT, SSCI, STMR, and SADC, and their high level indicates reset. The clear signals CLR0 and CLR1 are generated by the instruction control unit 2C, and the clear signals CLR2 to CLR4 are generated by the bus controller 6C.

図8にはクロック停止状態をCPU2の制御で動的に解除するための構成を抜粋してある。クロック停止状態の動的解除のために、前記クロック制御ビットSFPU,SMLTは前記CPU2にも供給されている。それによってCPU2の命令制御部2Cは、FPU命令を解読する時、クロック制御ビットSFPUがセット状態である場合にはクリア信号CLR0でクロック制御ビットSFPUをリセット状態にしてFPU3を動作可能とし、その後で、当該命令の実行動作を開始させる。同様にCPU2の命令制御部2Cは、積和演算命令を解読する時、クロック制御ビットSMLTがセット状態である場合にはクリア信号CLR1でクロック制御ビットSMLTをリセット状態にして積和演算装置4を動作可能とし、その後で、当該命令の実行動作を開始させる。   FIG. 8 shows a configuration for dynamically releasing the clock stop state under the control of the CPU 2. The clock control bits SFPU and SMLT are also supplied to the CPU 2 for dynamically releasing the clock stop state. Accordingly, when decoding the FPU instruction, the instruction control unit 2C of the CPU 2 sets the clock control bit SFPU to the reset state with the clear signal CLR0 if the clock control bit SFPU is in the set state, and enables the FPU 3 to operate. , To start the execution of the instruction. Similarly, when decoding the multiply-accumulate operation instruction, the instruction control unit 2C of the CPU 2 sets the clock control bit SMLT to the reset state by the clear signal CLR1 to reset the multiply-accumulate operation device 4 when the clock control bit SMLT is in the set state. The operation is enabled, and thereafter, the execution operation of the instruction is started.

図9にはCPU2がクロック停止状態を動的に解除するための論理構成の一例が示される。プリデコーダ200Cは命令コードの最上位側4ビットをデコーダ210でデコードする。デコーダ210は入力される4ビットが“1111”である時(浮動小数点命令)FPU命令検出信号211をハイレベルにアサートし、“0011”である時(積和演算命令)MLT命令検出信号212をハイレベルにアサートする。信号211,212は夫々前記クロック制御ビットSFPU,SMLTと論理積(AND)が採られ、論理積信号がクリア信号CLR0,CLR1としてシステムコントローラ12Cに供給される。ハードワイヤードロジック201Cは、クリア信号CLR0,CLR1に対応するクロック制御ビットSFPU、SMLTがリセット状態にされるのを待って、制御信号の出力動作を開始する。これにより、クロック制御ビットSFPU,SMLTによってFPU3,積和演算装置4のクロック信号が停止されているとき、FPU命令,MLT命令を実行しようとすると、これに連動してFPU3,積和演算装置4のクロック信号の停止状態が解除され、解除後に、FPU命令,MLT命令が実行される。   FIG. 9 shows an example of a logical configuration for the CPU 2 to dynamically release the clock stop state. The predecoder 200C uses the decoder 210 to decode the four most significant bits of the instruction code. The decoder 210 asserts the FPU instruction detection signal 211 to high level when the input 4 bits are “1111” (floating point instruction), and outputs the MLT instruction detection signal 212 when it is “0011” (product-sum operation instruction). Assert high. The signals 211 and 212 are ANDed with the clock control bits SFPU and SMLT, respectively, and the AND signals are supplied to the system controller 12C as clear signals CLR0 and CLR1. The hard wired logic 201C starts the output operation of the control signal after the clock control bits SFPU and SMLT corresponding to the clear signals CLR0 and CLR1 are reset. Thus, when the clock signals of the FPU 3 and the product-sum operation unit 4 are stopped by the clock control bits SFPU and SMLT, when the FPU instruction and the MLT instruction are executed, the FPU 3 and the product-sum operation unit 4 Are released, and after the release, the FPU instruction and the MLT instruction are executed.

図10にはクロック停止状態をバスステートコントローラ6Cの制御で動的に解除するための構成を抜粋してある。バスステートコントローラ6Cがクロック停止状態を動的に解除するために、クロック制御ビットSSCI,STMR,SADCは前記バスステートコントローラ6Cにも供給されている。それによってバスステートコントローラ6Cは、クロック制御ビットSSCI,STMR,SADCによって動作停止が指示されている周辺回路に対するアクセスを検出したとき、当該周辺回路の動作停止状態をクリア信号CLR2,CLR3,CLR4で解除してから該周辺回路のアクセスを開始する。   FIG. 10 shows a configuration for dynamically releasing the clock stop state under the control of the bus state controller 6C. Clock control bits SSCI, STMR, and SADC are also supplied to the bus state controller 6C so that the bus state controller 6C dynamically releases the clock stop state. When the bus state controller 6C detects an access to a peripheral circuit whose operation is instructed by the clock control bits SSCI, STMR, and SADC, the bus state controller 6C releases the operation stop state of the peripheral circuit with the clear signals CLR2, CLR3, and CLR4. Then, access to the peripheral circuit is started.

図11にはバスステートコントローラ6Cによりクロック停止状態を動的に解除するための論理構成の一例が示される。バスコントローラ6Cは、CPU2から供給されるアドレス信号をデコードして周辺回路SCI9,タイマ10,A/Dコンバータ11に対するアクセスを検出可能なアドレスデコーダ600を有する。このアドレスデコーダ600のデコード論理は前記周辺回路のマッピングアドレスに従って決定されている。信号601はSCI9に対するアクセス検出信号、602はタイマ602に対するアクセス検出信号、603はA/Dコンバータ11に対するアクセス検出信号であり、アクセスが検出される事によってハイレベルにされる。夫々のアクセス検出信号601,602,603はクロック制御ビットSSCI,STMR,SADCと論理積が採られ、夫々の論理積信号がクリア信号CLR2、CLR3,CLR4とされる。したがって、クロック制御ビットSSCI,STMR,SADCによってSCI9,タイマ10,A/Dコンバータ11のクロック信号が停止されているとき、クロック停止されている周辺回路をアクセスする命令が実行されると、クリア信号CLR2、CLR3,CLR4がアサートされる。バスステートコントローラ6Cは、アサートされたクリア信号に対応するクロック制御ビットがリセット状態に反転されるのを待ってバスサイクルを起動する。   FIG. 11 shows an example of a logical configuration for dynamically releasing the clock stop state by the bus state controller 6C. The bus controller 6C has an address decoder 600 that can decode an address signal supplied from the CPU 2 and detect an access to the peripheral circuit SCI9, the timer 10, and the A / D converter 11. The decoding logic of the address decoder 600 is determined according to the mapping address of the peripheral circuit. A signal 601 is an access detection signal for the SCI 9, a reference numeral 602 is an access detection signal for the timer 602, and a reference numeral 603 is an access detection signal for the A / D converter 11, which is set to a high level when an access is detected. Each of the access detection signals 601, 602, and 603 is ANDed with the clock control bits SSCI, STMR, and SADC, and the respective AND signals are used as the clear signals CLR2, CLR3, and CLR4. Therefore, when the clock signals of the SCI 9, the timer 10, and the A / D converter 11 are stopped by the clock control bits SSCI, STMR, and SADC, a clear signal is issued when an instruction to access the peripheral circuit whose clock is stopped is executed. CLR2, CLR3, and CLR4 are asserted. The bus state controller 6C starts a bus cycle after the clock control bit corresponding to the asserted clear signal is inverted to the reset state.

第2の例のマイクロコンピュータ1Cによれば、クロック信号が停止された回路モジュールを操作する命令の実行若しくはそのようなモジュールに対するアクセスが発生した時、それに応じて当該回路モジュールのクロック停止状態を動的に解除でき、木目細かく低消費電力制御を行なうことができる。   According to the microcomputer 1C of the second example, when execution of an instruction for operating a circuit module whose clock signal has been stopped or access to such a module has occurred, the clock stop state of the circuit module is activated accordingly. , And low power consumption control can be performed finely.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the inventor has been specifically described based on the embodiment, the present invention is not limited to the embodiment, and it is needless to say that various changes can be made without departing from the gist of the invention.

例えば、FPUと積和演算装置に関して無効命令化(不当命令化)の構成を採用し、周辺回路に関してクロック停止状態の動的解除の構成を採用する事も可能である。また、演算装置はFPUと積和演算装置に限定されず、CPUによってアクセス制御される回路であればよい。   For example, it is also possible to adopt a configuration of invalidating instructions (invalidating instructions) for the FPU and the product-sum operation device, and a dynamic release of the clock stop state for peripheral circuits. Further, the arithmetic unit is not limited to the FPU and the product-sum arithmetic unit, and may be any circuit that is access-controlled by the CPU.

また、データ処理装置に内蔵される周辺回路はSCIやタイマなどに限定されず適宜変更可能である。また、データ処理装置はメモリマネージメントユニットやキャッシュメモリを内蔵するものであってもよい。また、命令制御手段はハードワイヤードロジックに限定されず、マイクロ命令、更にナノ命令を用いる制御記憶形式であってもよい。   Further, the peripheral circuit built in the data processing device is not limited to the SCI or the timer, and can be changed as appropriate. Further, the data processing device may have a built-in memory management unit or cache memory. Further, the instruction control means is not limited to hard-wired logic, but may be a control storage format using micro instructions and further nano instructions.

以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるシングルチップマイクロコンピュータに適用した場合について説明したが、本発明はそれに限定されるものではなく、マルチチップ構成のデータ処理装置にも適用することができる。   In the above description, the case where the invention made by the present inventor is mainly applied to a single-chip microcomputer, which is the field of use as the background, has been described. However, the present invention is not limited to this, and the present invention is not limited to this. The present invention can also be applied to a data processing device.

無効命令化(不当命令化)及びバスエラー化によってメモリ保護を実現する本発明の第1の例に係るマイクロコンピュータのブロック図である。FIG. 1 is a block diagram of a microcomputer according to a first example of the present invention that implements memory protection by invalidating instructions (illegal instructions) and making bus errors. 図1のマイクロコンピュータにおいて無効命令化(不当命令化)によるメモリ保護のための構成を抜粋したブロック図である。FIG. 2 is a block diagram showing an extracted configuration for memory protection by invalidating instructions (improper instructions) in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおいてバスエラーを発生させてメモリ保護を行なうための構成を抜粋したブロック図である。FIG. 2 is a block diagram showing an extracted configuration for performing memory protection by generating a bus error in the microcomputer of FIG. 1. 図1のマイクロコンピュータにおける命令制御部の概略的な構成を示すブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of an instruction control unit in the microcomputer of FIG. 1. 無効命令化の処理を行なうための論理構成の一例を示すブロック図である。FIG. 4 is a block diagram illustrating an example of a logical configuration for performing invalid instruction conversion processing. バスステートコントローラがメモリ保護のためにバスエラーを発生されるための信号生成論理の一例を示すブロック図である。FIG. 3 is a block diagram showing an example of signal generation logic for causing a bus state controller to generate a bus error for memory protection. クロック停止の動的解除を行なう本発明の第2の例に係るマイクロコンピュータのブロック図である。FIG. 10 is a block diagram of a microcomputer according to a second example of the present invention that performs dynamic cancellation of clock stop. 図7のマイクロコンピュータにおいてCPUの制御によるクロック停止状態の動的解除のための構成を抜粋したブロック図である。FIG. 8 is a block diagram illustrating a configuration for dynamically releasing a clock stop state under control of a CPU in the microcomputer of FIG. 7. 図7のマイクロコンピュータにおいてクロック停止状態の動的解除を行なうためのCPUの論理構成の一例を示すブロック図である。FIG. 8 is a block diagram showing an example of a logical configuration of a CPU for dynamically releasing a clock stop state in the microcomputer of FIG. 7; 図7のマイクロコンピュータにおいてバスステートコントローラの制御によるクロック停止状態の動的解除のための構成を抜粋したブロック図である。FIG. 8 is a block diagram illustrating a configuration for dynamically releasing a clock stop state under control of a bus state controller in the microcomputer of FIG. 7. 図7のマイクロコンピュータにおいてクロック停止状態の動的解除を行なうためのバスステートコントローラの論理構成の一例を示すブロック図である。FIG. 8 is a block diagram showing an example of a logical configuration of a bus state controller for dynamically releasing a clock stop state in the microcomputer of FIG. 7;

符号の説明Explanation of reference numerals

1,1C マイクロコンピュータ
2 CPU
2A 演算部
2B,2C 命令制御部
3 FPU
4 積和演算装置
5 割込みコントローラ
6,6C バスステートコントローラ
7 クロック発生回路
CLK0〜CLK4 クロック信号
9 SCI
10 タイマ
11 A/Dコンバータ
12,12C システムコントローラ
12R クロック停止制御レジスタ
13 内部データバス
14 内部アドレスバス
15 周辺アドレスバス
16 周辺データバス
17 外部アドレスバス
18 外部データバス
SFPU,SMLT,SSCI,STMR,SADC クロック制御ビット
20 積和演算装置制御信号
21 FPU制御信号
22 CPU演算部制御信号
23 バスコマンド
24 バスエラー信号
25 例外処理信号
200,200C プリデコーダ
201,201C ハードワイヤードロジック
CLR0〜CLR4 クリア信号
210 デコーダ
211 FPU命令検出信号
212 積和演算命令検出信号
213 SFPUとFPU命令検出信号の論理積信号
214 SMLTと積和演算命令検出信号の論理積信号
215 213と214の論理和信号
216 セレクタ
217 無効命令コード発生回路
218 無効命令コード
219 フェッチされた命令コード
220 プリデコード論理
600 アドレスデコーダ
601 SCIアクセス検出信号
602 タイマーアクセス検出信号
603 A/Dコンバータアクセス検出信号
1,1C microcomputer 2 CPU
2A operation unit 2B, 2C instruction control unit 3 FPU
4 Product-sum operation unit 5 Interrupt controller 6, 6C bus state controller 7 Clock generation circuit CLK0-CLK4 Clock signal 9 SCI
10 timer 11 A / D converter 12, 12C system controller 12R clock stop control register 13 internal data bus 14 internal address bus 15 peripheral address bus 16 peripheral data bus 17 external address bus 18 external data bus SFPU, SMLT, SSCI, STMR, SADC Clock control bit 20 Product-sum operation device control signal 21 FPU control signal 22 CPU operation unit control signal 23 Bus command 24 Bus error signal 25 Exception processing signal 200, 200C Predecoder 201, 201C Hardwired logic CLR0 to CLR4 Clear signal 210 Decoder 211 FPU instruction detection signal 212 Product-sum operation instruction detection signal 213 Logical product signal of SFPU and FPU instruction detection signal 214 Theory of SMLT and product-sum operation instruction detection signal Logical sum signal 215 213 and 214 OR signal 216 selector 217 invalid instruction code generation circuit 218 invalid instruction code 219 fetched instruction code 220 predecode logic 600 address decoder 601 SCI access detection signal 602 timer access detection signal 603 A / D Converter access detection signal

Claims (5)

命令を実行する中央処理装置と、内部バスを介して前記中央処理装置に結合された第1の回路と、前記第1の回路の動作を選択的に停止させる停止制御回路とを含み、前記停止制御回路は、前記中央処理装置によってアクセスされるクロック制御レジスタの値を停止制御信号として出力し、前記中央処理装置は、前記停止制御回路から出力される停止制御信号を入力し、前記第1の回路を用いる命令を解読するとき、前記停止制御信号が停止を指示している場合には前記停止制御回路による前記第1の回路の動作停止状態を解除してから当該命令の実行動作を開始させる命令制御手段を有して成るものであることを特徴とするデータ処理装置。 A central processing unit for executing instructions, a first circuit coupled to the central processing unit via an internal bus, and a stop control circuit for selectively stopping operation of the first circuit; The control circuit outputs a value of a clock control register accessed by the central processing unit as a stop control signal, and the central processing unit receives a stop control signal output from the stop control circuit, When decoding a command using a circuit, if the stop control signal indicates stop, the stop control circuit releases the operation stop state of the first circuit and then starts the execution operation of the command. A data processing device comprising command control means. 前記第1の回路は、前記中央処理装置が浮動小数点処理命令を実行することによって制御されると共に、前記中央処理装置によってアドレッシング制御を受ける浮動小数点演算装置であることを特徴とする請求項1記載のデータ処理装置。 2. The floating-point arithmetic unit according to claim 1, wherein the first circuit is controlled by the central processing unit executing a floating-point processing instruction, and is subjected to addressing control by the central processing unit. Data processing equipment. 前記第1の回路は、前記中央処理装置が積和演算処理命令を実行することによって制御されると共に、前記中央処理装置によってアドレッシング制御を受ける積和演算装置であることを特徴とする請求項1記載のデータ処理装置。 2. The product-sum operation device according to claim 1, wherein the first circuit is controlled by the central processing unit executing a product-sum operation instruction, and is subjected to addressing control by the central processing unit. The data processing device according to claim 1. 命令を実行する中央処理装置と、内部バスを介して前記中央処理装置にインタフェースされ該中央処理装置のアドレシング制御及び演算制御を受ける演算装置と、前記内部バスに結合されたバスステートコントローラを介して前記中央処理装置とインタフェースされ該中央処理装置のアクセス制御を受ける周辺回路と、前記バスステートコントローラを外部に接続する外部バスインタフェース回路と、前記演算装置と周辺回路の動作を夫々選択的に停止可能な停止制御回路とを含み、前記停止制御回路は、前記中央処理装置によってアクセスされるクロック制御レジスタの値を停止制御信号として出力し、前記バスステートコントローラは前記停止制御回路から出力される前記停止制御信号のうち前記周辺回路のための第1の停止制御信号を入力し、第1の停止制御信号によって動作停止が指示されている周辺回路に対するアクセスを検出したとき当該周辺回路の動作停止状態を解除してから該周辺回路のためのバスサイクルを起動するものであることを特徴とするデータ処理装置。 A central processing unit that executes instructions, a processing unit that is interfaced to the central processing unit via an internal bus and receives addressing control and operation control of the central processing unit, and a bus state controller coupled to the internal bus A peripheral circuit which is interfaced with the central processing unit and receives access control of the central processing unit; an external bus interface circuit which connects the bus state controller to the outside; and an operation of the arithmetic unit and the peripheral circuit can be selectively stopped. A stop control circuit, the stop control circuit outputs a value of a clock control register accessed by the central processing unit as a stop control signal, and the bus state controller outputs the stop output from the stop control circuit. A first stop control signal for the peripheral circuit among the control signals; When detecting access to a peripheral circuit for which operation stop is instructed by the first stop control signal, the operation stop state of the peripheral circuit is released and a bus cycle for the peripheral circuit is started. A data processing device, comprising: 前記中央処理装置は、前記停止制御回路から出力される前記停止制御信号のうち、前記演算装置のための第2の停止制御信号を入力し、前記演算装置を用いる命令を解読するとき、前記第2の停止制御信号が停止を指示している場合には前記停止制御回路による当該演算装置の動作停止状態を解除してから当該命令の実行動作を開始させる命令制御手段を有して成るものであることを特徴とする請求項4記載のデータ処理装置。
The central processing unit receives a second stop control signal for the arithmetic unit among the stop control signals output from the stop control circuit, and decodes a command using the arithmetic unit. When the stop control signal indicates stop, the instruction control means for canceling the operation stop state of the arithmetic unit by the stop control circuit and then starting the execution of the instruction is provided. 5. The data processing apparatus according to claim 4, wherein the data processing apparatus is provided.
JP2003424357A 2003-12-22 2003-12-22 Data processor Pending JP2004152321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003424357A JP2004152321A (en) 2003-12-22 2003-12-22 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003424357A JP2004152321A (en) 2003-12-22 2003-12-22 Data processor

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP35596997A Division JP3523475B2 (en) 1997-12-25 1997-12-25 Data processing device

Publications (1)

Publication Number Publication Date
JP2004152321A true JP2004152321A (en) 2004-05-27

Family

ID=32464062

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003424357A Pending JP2004152321A (en) 2003-12-22 2003-12-22 Data processor

Country Status (1)

Country Link
JP (1) JP2004152321A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008123410A (en) * 2006-11-15 2008-05-29 Yamaha Corp Digital signal processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008123410A (en) * 2006-11-15 2008-05-29 Yamaha Corp Digital signal processing device

Similar Documents

Publication Publication Date Title
US6959367B2 (en) System having read-modify-write unit
EP2171576B1 (en) Scheduling threads in a processor
JP3781419B2 (en) Exception handling in pipelined processors
US10901492B1 (en) Power reduction in processor pipeline by detecting zeros
US20070162640A1 (en) Method and system for efficient context swapping
JP2009032257A (en) Processor architecture selectively using finite-state-machine for control code
JPH08328860A (en) Reset circuit for pipelined signal processor
US20060200692A1 (en) Microprocessor
JP2006171952A (en) Semiconductor integrated circuit device
US5734927A (en) System having registers for receiving data, registers for transmitting data, both at a different clock rate, and control circuitry for shifting the different clock rates
JP2004005603A (en) Method and device for performing repeated block instruction by zero cycle overhead along nested loop
JP5322567B2 (en) Data processing system and semiconductor integrated circuit
JP2004005747A (en) Microprocessor and method of operating microprocessor
JP2001092661A (en) Data processor
JP2004152321A (en) Data processor
WO2007057831A1 (en) Data processing method and apparatus
JPH11296372A (en) Information processor
EP1177499B1 (en) Processor and method of executing instructions from several instruction sources
US20080222336A1 (en) Data processing system
US6425047B1 (en) Process containing address decoders suited to improvements in clock speed
JPH11184693A (en) Data processor
JP3562215B2 (en) Microcomputer and electronic equipment
JP2000235489A (en) Processor
JP5012562B2 (en) Microcomputer
KR100681427B1 (en) Apparatus for resetting multiple processor system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060418

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060822