JP4448917B2 - Semiconductor integrated circuit device, data processing device, and microcomputer - Google Patents

Semiconductor integrated circuit device, data processing device, and microcomputer Download PDF

Info

Publication number
JP4448917B2
JP4448917B2 JP2008211461A JP2008211461A JP4448917B2 JP 4448917 B2 JP4448917 B2 JP 4448917B2 JP 2008211461 A JP2008211461 A JP 2008211461A JP 2008211461 A JP2008211461 A JP 2008211461A JP 4448917 B2 JP4448917 B2 JP 4448917B2
Authority
JP
Japan
Prior art keywords
bus
signal
address
data
clock
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
JP2008211461A
Other languages
Japanese (ja)
Other versions
JP2009020900A (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.)
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 JP2008211461A priority Critical patent/JP4448917B2/en
Publication of JP2009020900A publication Critical patent/JP2009020900A/en
Application granted granted Critical
Publication of JP4448917B2 publication Critical patent/JP4448917B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Description

この発明は、半導体集積回路装置、データ処理装置及びマイクロコンピュータに関し、特に高性能、高機能で家庭用ゲーム機や携帯型情報通信端末機器等に好適なものに利用して有効な技術に関するものである。   The present invention relates to a semiconductor integrated circuit device, a data processing device, and a microcomputer, and particularly to a technology that is effective when used for a high-performance, high-functionality device suitable for a home game machine or a portable information communication terminal device. is there.

中央処理装置と直接メモリアクセス制御装置(DMAC)や各種タイマ等のような周辺回路を1つの半導体集積回路装置に構成したシングルチップマイクロコンピュータがある。このようなシングルチップマイクロコンピュータの例としては、例えば(株)日立製作所、平成5年3月発行『日立シングルチップRISCマイコン SH7032、SH7034 ハードウェアマニュアル』がある。
(株)日立製作所、平成5年3月発行『日立シングルチップRISCマイコン SH7032、SH7034 ハードウェアマニュアル』
There is a single-chip microcomputer in which a central processing unit and peripheral circuits such as a direct memory access control device (DMAC) and various timers are configured in one semiconductor integrated circuit device. As an example of such a single chip microcomputer, there is, for example, “Hitachi Single Chip RISC Microcomputer SH7032, SH7034 Hardware Manual” issued by Hitachi, Ltd. in March 1993.
Hitachi, Ltd., published in March 1993 “Hitachi Single-Chip RISC Microcomputer SH7032, SH7034 Hardware Manual”

半導体技術の進展により多数の半導体素子を1つの半導体基板上に形成することができる。これにより、上記中央処理装置を中心にしてその周辺回路を1つの半導体基板上に形成して、高性能及び多機能化を図ることができる。しかしながら、高性能及び多機能化のために単純に多くの周辺回路を内蔵させると、動作速度や消費電力等の観点から却って不都合の生じることが判明した。また、これからのマイクロコンピュータには3次元画像処理機能の強化が避けられない。   With the progress of semiconductor technology, a large number of semiconductor elements can be formed on one semiconductor substrate. As a result, the peripheral circuit is formed on one semiconductor substrate with the central processing unit as a center, and high performance and multiple functions can be achieved. However, it has been found that if a large number of peripheral circuits are simply built in for high performance and multi-functionality, inconvenience occurs from the viewpoint of operation speed, power consumption, and the like. Further, enhancement of the three-dimensional image processing function is inevitable for future microcomputers.

この発明の1つの目的は、高性能と高機能化を実現した半導体集積回路装置、データ処理装置及びマイクロコンピュータを提供することにある。   One object of the present invention is to provide a semiconductor integrated circuit device, a data processing device, and a microcomputer that realize high performance and high functionality.

この発明の他の目的は、高速化と低消費電力化を実現した半導体集積回路装置、データ処理装置及びマイクロコンピュータを提供することにある。   Another object of the present invention is to provide a semiconductor integrated circuit device, a data processing device, and a microcomputer that realize high speed and low power consumption.

この発明の他の目的は、使い勝手のよい半導体集積回路装置、データ処理装置及びマイクロコンピュータを提供することにある。   Another object of the present invention is to provide a semiconductor integrated circuit device, a data processing device and a microcomputer which are easy to use.

この発明の他の目的は、簡単な構成によりシンクロナスダイナミック型RAMの動作マージンを拡大させてアクセスできる半導体集積回路装置、データ処理装置及びマイクロコンピュータを提供することにある。   Another object of the present invention is to provide a semiconductor integrated circuit device, a data processing device, and a microcomputer that can be accessed by expanding the operation margin of a synchronous dynamic RAM with a simple configuration.

この発明の更に他の目的は、3次元画像処理を高速に行うことができる半導体集積回路装置、データ処理装置及びマイクロコンピュータを提供することにある。   Still another object of the present invention is to provide a semiconductor integrated circuit device, a data processing device, and a microcomputer capable of performing three-dimensional image processing at high speed.

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

本願において開示される発明のうち代表的な1つの概要を簡単に説明すれば、下記の通りである。すなわち、中央処理装置、外部に接続されるメモリのインタフェース機能を有する制御回路、前記中央処理装置に対する第1クロック信号、外部に接続されるシンクロナスDRAM(以下、単にSDRAMと略する場合がある。)に供給するための第2クロック信号を含む複数のクロック信号を形成可能なクロック発生回路、前記シンクロナスDRAMのクロック端子に対し、前記第2クロック信号を供給するための第1端子、前記シンクロナスDRAMに対するクロックイネーブル信号を出力するための第2端子、及び前記シンクロナスDRAMに対し、セレクト信号を出力するための第3端子を有する。前記制御回路は、前記シンクロナスDRAMに対し、前記第2クロック信号に同期して、前記第2端子を介して前記クロックイネーブル信号を出力し、前記第3端子を介して前記セレクト信号を出力する。   A typical outline of the invention disclosed in the present application will be briefly described as follows. That is, a central processing unit, a control circuit having an interface function of an externally connected memory, a first clock signal for the central processing unit, and a synchronous DRAM (hereinafter simply referred to as SDRAM) connected to the outside. A clock generation circuit capable of forming a plurality of clock signals including a second clock signal to be supplied to a first clock terminal of the synchronous DRAM, a first terminal for supplying the second clock signal to the clock terminal of the synchronous DRAM, and the synchronization A second terminal for outputting a clock enable signal for the eggplant DRAM and a third terminal for outputting a select signal for the synchronous DRAM are provided. The control circuit outputs the clock enable signal to the synchronous DRAM via the second terminal and the select signal via the third terminal in synchronization with the second clock signal. .

SDRAMの動作マージンを拡大させて直接にアクセスすることができる。   The SDRAM can be accessed directly by expanding the operation margin.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、内部のバスを3つに分けて、第1のバスには中央処理装置、上記第1のバスには、固定小数点方式の積和演算器を接続し、第2のバスには固定小数点方式の除算器を接続する。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. In other words, the internal bus is divided into three, a central processing unit is connected to the first bus, a fixed-point product-sum calculator is connected to the first bus, and a fixed-point is connected to the second bus. Connect the system divider.

上記した手段によれば、上記第1のバスに固定小数点方式の積和演算器を接続することにより、少ないサイクル数により積和演算処理が高速に行えるとともに、第2のバスには固定小数点方式の除算器を接続するものであり、そこで演算結果を除算処理するのと同時並行して別の積和演算処理を行うことができるので3次元画像処理も高速に行うことができる。   According to the above-described means, the product-sum operation processing can be performed at a high speed with a small number of cycles by connecting a fixed-point product-sum operation unit to the first bus, and the second bus has a fixed-point method. Thus, another product-sum calculation process can be performed in parallel with the division process of the calculation result, so that three-dimensional image processing can also be performed at high speed.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記第3のバスに接続される周辺モジュールとして、フリーランニングタイマ、シリアルコミュニケーションインターフェイス又はウォッチドッグタイマのうち何れか少なくとも1つを設ける。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, at least one of a free running timer, a serial communication interface, or a watchdog timer is provided as a peripheral module connected to the third bus.

上記した手段によれば、上記第3のバスに接続される周辺モジュールとして、フリーランニングタイマ、シリアルコミュニケーションインターフェイス又はウォッチドッグタイマのようなデータ処理の高速化には直接関与しないものとすることにより、周辺モジュールを低速バスサイクルとすることができ、中央処理装置の高速化に追従させることなく、既存の周辺モジュールをそのまま使用できるから設計の効率化と周辺モジュールにおける低消費電力化を図ることができる。   According to the above-described means, as a peripheral module connected to the third bus, it is not directly involved in speeding up data processing such as a free running timer, a serial communication interface or a watchdog timer, Peripheral modules can be made into a low-speed bus cycle, and existing peripheral modules can be used as they are without following the speedup of the central processing unit, so that design efficiency and power consumption in the peripheral modules can be reduced. .

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記の各回路ブロックをフルスタティック型CMOS回路により構成し、各回路ブロック毎にクロックパルスの供給/停止を制御するレジスタを含む動作モードコントローラを設ける。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, each circuit block is configured by a full static CMOS circuit, and an operation mode controller including a register for controlling supply / stop of a clock pulse is provided for each circuit block.

上記した手段によれば、必要な回路ブロックに対してのみクロックを供給することができるから低消費電力化を図ることができる。   According to the above-described means, the clock can be supplied only to the necessary circuit block, so that the power consumption can be reduced.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記外部バスインターフェイスは、シンクロナスダイナミック型RAMのバーストリードモード及びシングルライトモードとダイナミック型RAM及び擬似スタティック型RAMを直接アクセスできるインターフェイス機能を持たせる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, the external bus interface has an interface function that allows direct access to the burst read mode and single write mode of the synchronous dynamic RAM, the dynamic RAM, and the pseudo static RAM.

上記した手段によれば、外部バスインターフェイスにより直接にシンクロナスダイナミック型RAM、ダイナミック型RAM及び擬似スタティック型RAM等を直接接続できるから使い勝手を良くすることができる。   According to the above-described means, since a synchronous dynamic RAM, a dynamic RAM, a pseudo static RAM, and the like can be directly connected by an external bus interface, usability can be improved.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、外部バスインターフェイスとしては、中央処理装置のクロックパルスに対して位相が進められたクロックパルスを形成してシンクロナスダイナミック型RAMのクロック端子に供給させる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, as the external bus interface, a clock pulse whose phase is advanced with respect to the clock pulse of the central processing unit is formed and supplied to the clock terminal of the synchronous dynamic RAM.

上記した手段によれば、中央処理装置のクロックパルスに対して位相が進められたクロックパルスによりシンクロナスダイナミック型RAMをアクセスすることができるからその動作マージンの拡大を図ることができる。   According to the above-described means, the synchronous dynamic RAM can be accessed by the clock pulse whose phase is advanced with respect to the clock pulse of the central processing unit, so that the operation margin can be expanded.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、シンクロナスダイナミック型RAMのバーストモードにより読み出されるデータと上記キャッシュメモリの1ブロックのデータ及び直接メモリアクセス制御装置による単位のデータ転送とには整合性を持たせる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, the data read in the burst mode of the synchronous dynamic RAM, the data of one block of the cache memory, and the unit data transfer by the direct memory access controller are made consistent.

上記した手段によれば、シンクロナスダイナミック型RAMのバーストモードにより読み出されるデータと上記キャッシュメモリの1ブロックのデータ及び直接メモリアクセス制御装置による単位のデータ転送とを同じデータ量とすることにより効率のよいデータ転送が可能になる。   According to the above-described means, the data read in the burst mode of the synchronous dynamic RAM, the data of one block of the cache memory, and the unit data transfer by the direct memory access control device are made the same data amount, thereby improving the efficiency. Good data transfer is possible.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、外部バスインターフェイスにおいて、中央処理装置が特定のアドレス空間をアクセスすることにより起動がかけられて、ロウアドレスストローブ信号、カラムアドレスストローブ信号及びライトイネーブル信号を共にロウレベルにし、アドレス信号の一部を用いてシンクロナスダイナミック型RAMの動作モード設定の設定に必要な制御信号を発生させるメモリ制御信号発生回路を設ける。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, in the external bus interface, the central processing unit is activated by accessing a specific address space, and both the row address strobe signal, the column address strobe signal and the write enable signal are set to the low level, and a part of the address signal is set. A memory control signal generation circuit for generating a control signal necessary for setting the operation mode setting of the synchronous dynamic RAM is provided.

上記した手段によれば、中央処理装置によるシンクロナスダイナミック型RAMのモード設定を簡単に行うことができる。   According to the above-described means, the mode setting of the synchronous dynamic RAM can be easily performed by the central processing unit.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記キャッシュメモリとしては、複数からなるタグメモリ及びそれぞれに対応したデータメモリにより構成し、上記タグメモリ及びデータメモリにはCMOSスタティック型メモリセルを用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路と、かかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, the cache memory is composed of a plurality of tag memories and corresponding data memories, and the tag memory and the data memory use CMOS static memory cells, and a CMOS as a sense amplifier for amplifying the read signal. A CMOS sense amplifier composed of a latch circuit and a power switch MOSFET composed of a P-channel MOSFET and an N-channel MOSFET for supplying an operating current to the CMOS latch circuit is used.

上記した手段によれば、CMOSラッチ回路を利用してセンスアンプを構成することより、信号増幅を行った後には直流電流が流れなくできるから低消費電力化を図ることができる。   According to the above-described means, by configuring the sense amplifier using the CMOS latch circuit, it is possible to reduce the power consumption because the direct current does not flow after the signal amplification.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記複数からなるデータメモリは、タグメモリからのヒット信号に対応したもののみを活性化させるようにする。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, only the data memory corresponding to the hit signal from the tag memory is activated.

上記した手段によれば、タグメモリからのヒット信号に対応したデータメモリのみを活性化させるものであるから低消費電力化を図ることができる。   According to the above-described means, only the data memory corresponding to the hit signal from the tag memory is activated, so that the power consumption can be reduced.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記複数からなるデータメモリは、キャッシュコントローラによって全部又は一部についてタグメモリからのヒット信号の伝達を無効にして中央処理装置による直接アクセスを可能にする。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, the plurality of data memories can be directly accessed by the central processing unit by disabling the transmission of hit signals from the tag memory for all or a part by the cache controller.

上記した手段によれば、キャッシュメモリの複数からなるデータメモリの全部又は一部を内蔵RAMとして使用できるのでユーザーの多様な要求に応じた使い方に適合できる。   According to the above-described means, all or a part of the plurality of data memories of the cache memory can be used as the built-in RAM, so that it can be adapted to usage according to various requests of users.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、中央処理装置とキャシュメモリとを含むシングルチップのマイクロコンピュータにおいて、キャッシュメモリとしてCMOSスタティック型メモリセルを記憶素子として用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路及びかかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, in a single-chip microcomputer including a central processing unit and a cache memory, a CMOS static memory cell is used as a memory element as a cache memory, and a CMOS latch circuit and such a CMOS latch circuit are used as a sense amplifier for amplifying the read signal. A CMOS sense amplifier including a power switch MOSFET including a P-channel MOSFET and an N-channel MOSFET for supplying an operating current is used.

上記した手段によれば、中央処理装置とキャシュメモリとを含むシングルチップのマイクロコンピュータにおいて、キャッシュメモリのセンスアンプの増幅部にCMOSラッチ回路を用いることにより、センスアンプでの信号増幅を行った後には直流電流が流れないから低消費電力化を図ることができる。   According to the above means, in a single-chip microcomputer including a central processing unit and a cache memory, after performing signal amplification with the sense amplifier by using a CMOS latch circuit in the amplification section of the sense amplifier of the cache memory, Since no direct current flows, power consumption can be reduced.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、上記複数からなるデータメモリは、タグメモリからのヒット信号に対応したもののみを活性化させる。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, only the data memory corresponding to the hit signal from the tag memory is activated.

上記した手段によれば、キャッシュメモリ内蔵のシングルチップのマイクロコンピュータにおいて、ヒット信号に対応したデータメモリのみを活性化させることにより低消費電力化を図ることができる。   According to the above-described means, in a single-chip microcomputer with a built-in cache memory, it is possible to reduce power consumption by activating only the data memory corresponding to the hit signal.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、バス使用権制御信号に従ってスレーブモードに設定されたときには第1の端子をバスリクエスト信号に、第2の端子をバスアクノリッジ信号にそれぞれ使用し、マスターモードにされるとき上記第1の端子をバスグラント信号に、上記第2の端子をバスレリーズ信号にそれぞれ切り換えて使用する。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. That is, when the slave mode is set according to the bus use right control signal, the first terminal is used for the bus request signal, the second terminal is used for the bus acknowledge signal, and when the master mode is set, the first terminal is used. For the bus grant signal, the second terminal is used by switching to the bus release signal.

上記した手段によれば、1つのシングルチップマイクロコンピュータがバス使用権制御信号に従ってスレーブモード又はマスターモードとして使用でき、しかも同じ端子を切り換えて使用するものであるから、外部端子数が減るとともに接続が簡単となって使い勝手が良くなる。   According to the above means, one single-chip microcomputer can be used as a slave mode or a master mode according to a bus use right control signal, and the same terminal is switched and used. It becomes simple and easy to use.

本願において開示される発明のうち代表的な他の1つの概要を簡単に説明すれば、下記の通りである。すなわち、3次元画像処理のうちの遠近処理されたクリッピング処理及び積和演算器と協同して特定の物体固有の座標点を指定された視点を原点とする座標に変換する座標変換処理を中央処理装置により行い、それと同時並行して除算器により座標変換処理が終わった座標についての遠近処理を行うようにする。   The outline of another representative one of the inventions disclosed in the present application will be briefly described as follows. In other words, the central processing is a coordinate processing that converts a specific object-specific coordinate point to a coordinate with the specified viewpoint as the origin in cooperation with the perspective processing clipping processing and the product-sum calculator in the three-dimensional image processing This is performed by the apparatus, and at the same time, the perspective processing is performed on the coordinates after the coordinate conversion processing is completed by the divider.

上記した手段によれば、中央処理装置及び積和演算器により3次元画像処理のうちのクリッピング処理と座標変換処理を行っている間に、それと同時並行的に比較的長い時間を費やす遠近処理を除算器により行う結果、高速な3次元画像処理が実現できる。   According to the above-described means, while performing the clipping process and the coordinate conversion process of the three-dimensional image process by the central processing unit and the product-sum calculator, the perspective process that spends a relatively long time in parallel with the clipping process and the coordinate conversion process is performed. As a result of using the divider, high-speed three-dimensional image processing can be realized.

図1には、この発明に係るシングルチップマイクロコンピュータの一実施例のブロック図が示されている。同図の各回路ブロックは、公知のCMOS(相補型MOS)半導体集積回路の製造技術によって、単結晶シリコンのような1個の基板上において形成される。   FIG. 1 is a block diagram showing an embodiment of a single chip microcomputer according to the present invention. Each circuit block shown in the figure is formed on a single substrate such as single crystal silicon by a known CMOS (complementary MOS) semiconductor integrated circuit manufacturing technique.

この実施例におけるシングルチップマイクロコンピュータは、特に制限されないが、RISC(Reduced instruction set computer)タイプの中央処理装置CPUにより、高性能な演算処理を実現し、システム構成に必要な周辺機器を集積すると同時に、携帯機器応用に不可欠な低消費電力化を実現した、いわば新世代に向けられたシングルチップマイクロコンピュータである。   The single-chip microcomputer in this embodiment is not particularly limited, but realizes high-performance arithmetic processing by a RISC (Reduced instruction set computer) type central processing unit CPU and simultaneously integrates peripheral devices necessary for the system configuration. It is a single-chip microcomputer for the new generation that has achieved low power consumption, which is essential for mobile device applications.

中央処理装置CPUは、RISCタイプの命令セットを持っており、基本命令はパイプライン処理を行って1命令1ステート(1システムクロックサイクル)で動作するので、命令実行速度が飛躍的に向上させることができる。そして、乗算器MULTを内蔵しており、後述するような3次元演算処理には不可欠な積和演算処理を高速に行うようにしている。   The central processing unit CPU has a RISC type instruction set, and the basic instruction performs pipeline processing and operates in one instruction and one state (one system clock cycle), so that the instruction execution speed is dramatically improved. Can do. A multiplier MULT is incorporated so that product-sum operation processing indispensable for three-dimensional operation processing as will be described later is performed at high speed.

最少部品点数によりユーザーシステムを構成できるように内蔵周辺モジュールとして、割り込みコントローラINTC、直接メモリアクセス制御装置DMAC、除算器DIVU、タイマFRT,WDT、シリアルコミュニケーションインターフェイスSCIを内蔵している。さらに、キャッシュメモリ内蔵の外部メモリアクセスサポート機能により、グルーロジックなしにダイナミック型RAM(ラチンダム・アクセス・メモリ)、シンクロナスダイナミック型RAM、擬似スタティック型RAMと直接接続できるようにしている。   An interrupt controller INTC, a direct memory access controller DMAC, a divider DIVU, timers FRT and WDT, and a serial communication interface SCI are incorporated as built-in peripheral modules so that a user system can be configured with the minimum number of parts. Furthermore, an external memory access support function with a built-in cache memory enables direct connection to a dynamic RAM (Latin Dam Access Memory), synchronous dynamic RAM, and pseudo-static RAM without glue logic.

上記のような高速な中央処理装置CPUを中心にし、その性能を十分に発揮し、しかも低消費電力化を図りつつ、高性能、高機能又は多機能のために設けられた周辺モジュールを効率よく動作させるようにするため、内部バスは3つに分けられている。   Centering on the high-speed central processing unit CPU as described above, the peripheral modules provided for high performance, high function, or multi-function can be efficiently used while fully demonstrating its performance and reducing power consumption. In order to operate, the internal bus is divided into three.

第1のバスは、アドレスバスAB1とデータバスDB1から構成され、中央処理装置CPU、乗算器(積和演算器)MULT及びキャッシュメモリが接続される。上記乗算器MULTは、上記第1のバスのうちデータバスDB1にのみ接続され、中央処理装置CPUと一体的に動作して乗算と加算を行うようにされる。それ故、第1バス(AB1,DB1)は、主に中央処理装置CPUとキャッシュメモリとの間でのデータ転送に利用されるからキャッシュアドレスバスとキャッシュデータバスと呼ぶことができる。キャッシュメモリは、タグメモリTAGとデータメモリCDM及びキャッシュコントローラから構成される。   The first bus is composed of an address bus AB1 and a data bus DB1, and is connected to a central processing unit CPU, a multiplier (multiply and accumulate arithmetic unit) MULT, and a cache memory. The multiplier MULT is connected only to the data bus DB1 of the first bus, and operates integrally with the central processing unit CPU to perform multiplication and addition. Therefore, since the first bus (AB1, DB1) is mainly used for data transfer between the central processing unit CPU and the cache memory, it can be called a cache address bus and a cache data bus. The cache memory includes a tag memory TAG, a data memory CDM, and a cache controller.

中央処理装置CPUの概略構成は次の通りである。内部は32ビット構成とされる。汎用レジスタマシンは、16本からなる32ビットの汎用レジスタと、3本からなる32ビットのコントロールレジスタと、4本からなる32ビットのシステムレジスタから構成される。RISCタイプの命令セットは、16ビット固定長命令によりコード効率化を図っている。無条件/条件分岐命令を遅延分岐方式とすることにより、分岐時のパイプラインの乱れを軽減している。命令実行は、1命令/1ステートとされ、28.7MHz動作時においては、35ns/命令のように高速とされる。中央処理装置CPUの性能は動作周波数と、1命令実行あたりのクロック数(CPI:Cycles Per Instru ction )で決まる。このうち動作周波数は、ゲーム機に組み込んだ際にテレビ用のビデオ信号処理系とクロックを共用するために、上記のように28.7MHzに設定にすることが便利である。ちなみに、NTSC方式のカラー・テレビで画像データをノンインタレース表示する場合には通常、ビデオ信号回路に色副搬送波(カラー・サブキャリヤ)周波数(約3.58Mzの8倍のクロック(28.6MHz)を使っている。   The schematic configuration of the central processing unit CPU is as follows. The internal structure is 32 bits. The general-purpose register machine includes 16 32-bit general-purpose registers, three 32-bit control registers, and four 32-bit system registers. The RISC type instruction set uses a 16-bit fixed length instruction to improve code efficiency. By using a delayed branch method for unconditional / conditional branch instructions, pipeline disturbance during branching is reduced. Instruction execution is 1 instruction / 1 state, and at 28.7 MHz operation, it is as fast as 35 ns / instruction. The performance of the central processing unit CPU is determined by the operating frequency and the number of clocks per instruction execution (CPI: Cycles Per Instrument). Of these, it is convenient to set the operating frequency to 28.7 MHz as described above in order to share the clock with the video signal processing system for television when incorporated in a game machine. By the way, when non-interlaced image data is displayed on an NTSC color television, the video signal circuit usually has a color subcarrier frequency (8 times the clock of about 3.58 Mz (28.6 MHz). ).

この実施例では、キャッシュメモリ(TAG,CAC,CDM)及び乗算器MULTしか接続されない第1バス(AB1とDB1)に中央処理装置CPUを接続するものであるので、バスの負荷容量が大幅に低減でき、上記のような高速動作を行う中央処理装置CPUのバス駆動回路の簡素化と、低消費電力化を図ることができる。   In this embodiment, since the central processing unit CPU is connected to the first bus (AB1 and DB1) to which only the cache memory (TAG, CAC, CDM) and the multiplier MULT are connected, the load capacity of the bus is greatly reduced. In addition, it is possible to simplify the bus drive circuit of the central processing unit CPU that performs high-speed operation as described above and to reduce power consumption.

第2のバスは、アドレスバスAB2とデータバスDB2から構成され、除算器DIVU、直接メモリアクセス制御装置DMAC、外部バスインターフェイスOBIFが接続される。上記キャッシュメモリでのミスヒットのときに、中央処理装置CPUは、外部メモリをアクセスしてデータを取り込む必要がある。このため、第1のバスのアドレス信号を第2のバスに伝える機能が必要とされる。また、上記のように第1と第2のバスを分離すると、プログラムミス等によって直接メモリアクセス制御装置DMACがキャッシュメモリのデータメモリCDMの内容を勝手に書き換えてしまうという問題が生じる。   The second bus includes an address bus AB2 and a data bus DB2, and is connected to a divider DIVU, a direct memory access control device DMAC, and an external bus interface OBIF. At the time of a miss hit in the cache memory, the central processing unit CPU needs to access the external memory to capture data. Therefore, a function for transmitting the address signal of the first bus to the second bus is required. Further, if the first and second buses are separated as described above, there arises a problem that the memory access control device DMAC directly rewrites the contents of the data memory CDM of the cache memory due to a program mistake or the like.

この実施例では、上記のようなキャッシュメモリでのミスヒットやキャッシュメモリのデータ破壊といった問題を解決するために、ブレークコントローラUBCが利用される。ブレークコントローラUBCは、本来プログラムデバッグ等に用いられるのであるが、上記第1バス及び第2バスに接続される必要があることを利用し、それにトランシーバ回路を設けて上記キャッシュメモリでのミスヒットのときに第1バスのアドレス信号を第2のバスのアドレスバスAB2に伝えて、外部メモリのアクセスを行うようにするものである。また、第2のバスでのアドレス信号を監視し、直接メモリアセクセス制御装置DMACによるデータメモリCDMへ書き換えを監視させる。   In this embodiment, the break controller UBC is used to solve the problems such as the miss hit in the cache memory and the data destruction of the cache memory. The break controller UBC is originally used for program debugging or the like. However, utilizing the fact that it is necessary to be connected to the first bus and the second bus, the break controller UBC is provided with a transceiver circuit to prevent a miss hit in the cache memory. Sometimes, the address signal of the first bus is transmitted to the address bus AB2 of the second bus so as to access the external memory. In addition, the address signal on the second bus is monitored, and rewriting is directly monitored on the data memory CDM by the memory access control device DMAC.

第3のバスは、アドレスバスAB3とデータバスDB3から構成され、特に制限されないが、フリーランニングタイマFRT、シリアルコミュニケーションインターフェイスSCI、ウォッチドッグタイマWDTと動作モードコントローラMCが接続される。   The third bus includes an address bus AB3 and a data bus DB3, and is not particularly limited, but is connected to a free running timer FRT, a serial communication interface SCI, a watchdog timer WDT, and an operation mode controller MC.

上記第3のバスは、上記第1や第2のバスに比べてバスサイクルが遅くされる。すなわち、これらの各周辺モジュールは、その動作速度を速くしても実質的な性能や機能が向上するものではないことに着目し、約10MHz程度で動作する既存のシングルチップマイクロコンピュータに搭載されているものを実質的にそのまま利用するものである。このようにすることにより、設計効率の向上を図ることができるとともに、動作周波数が低くされることによって低消費電力化とすることができる。   The third bus is delayed in the bus cycle compared to the first and second buses. That is, paying attention to the fact that each of these peripheral modules does not improve the substantial performance and function even if the operation speed is increased, it is mounted on an existing single-chip microcomputer that operates at about 10 MHz. The one that is actually used is used as it is. By doing so, the design efficiency can be improved and the power consumption can be reduced by lowering the operating frequency.

しかしながら、このようにすると中央処理装置CPU等とのデータの授受がそのままできなくなるので、バスステートコントローラBSCが設けられる。このバスステートコントローラBSCは、第3のバスから第2のバスに信号(データ信号)を転送するときには、そのまま信号の伝達を行う。これは、パルス発生回路CPGにおいて第1や第2のバスサイクルを決定するシステムクロックを分周して第3のバスサイクルに使用するクロックパルスを形成しているので、上記第3のバスの信号をそのまま第2のバスに伝えることができる。これに対して、バスステートコントローラBSCは第2のバスの信号を第3のバスに伝えるときに、必要に応じて信号を遅延させて第3のクロックパルスに同期化させて伝達するものである。   However, if this is done, data cannot be exchanged with the central processing unit CPU or the like as it is, so a bus state controller BSC is provided. When transferring a signal (data signal) from the third bus to the second bus, the bus state controller BSC transmits the signal as it is. This is because the clock signal used for the third bus cycle is formed by dividing the system clock for determining the first and second bus cycles in the pulse generation circuit CPG. Can be transmitted to the second bus as it is. On the other hand, when the bus state controller BSC transmits the signal of the second bus to the third bus, the signal is delayed and transmitted in synchronization with the third clock pulse as necessary. .

割り込みコントローラINTCの概略は、次の通りである。外部割り込みに関しては、後述するようなNMI、/IRL0〜/IRL3からなる5本の外部割り込み端子を持っている。/IRL0〜/IRL3端子による15外部割り込みレベル設定が可能にされる。この明細書及び一部の図面において、アルファベットの記号に付した/(スラッシュ)は、ロウレベルがアクティブレベルであるバー信号を表している。なお、図面では従来の記述方法により、バー信号はアルファベットによる信号名又は端子名の上に線が付されている。   The outline of the interrupt controller INTC is as follows. The external interrupt has five external interrupt terminals consisting of NMI and / IRL0 to / IRL3 as described later. The 15 external interrupt levels can be set by the / IRL0 to / IRL3 terminals. In this specification and some drawings, / (slash) attached to an alphabetic symbol represents a bar signal whose low level is an active level. In the drawing, according to the conventional description method, the bar signal is provided with a line on the alphabetical signal name or terminal name.

内部割り込み要因は、直接メモリアクセス制御装置により2つ、除算器DIVUにより1つ、フリーランニングタイマFRTにより3つ、ウォッチドッグタイマWDTにより1つ、シリアルコミュニケーションインターフェイスSCIにより4つからなる11要因とされる。内部割り込み要因ごとにベクタ番号設定可能とされる。   There are 11 internal interrupt factors: 2 by the direct memory access controller, 1 by the divider DIVU, 3 by the free running timer FRT, 1 by the watchdog timer WDT, and 4 by the serial communication interface SCI. The A vector number can be set for each internal interrupt factor.

以上のようなバスの分割方式を採ることにより、それぞれのバスの長さが短くされたり、あるいはそれに接続される素子を減らすことができるからバスの負荷容量が大幅に低減し、中央処理装置CPUの高速化と相俟って低消費電力で高速なデータ処理が可能になる。また、ユーザーブレークコントローラに直接メモリアクセス制御装置をDMACを設けた場合には、上記のようなバスの分離によって直接メモリアクセス制御装置DMACによる誤ったキャッシュデータの書き換えを検出する機能が設けられているので、信頼性を損なうことがない。   By adopting the bus division method as described above, the length of each bus can be shortened or the number of elements connected thereto can be reduced, so that the load capacity of the bus is greatly reduced, and the central processing unit CPU High-speed data processing becomes possible with low power consumption. Further, when the DMAC is provided as the direct memory access control device in the user break controller, a function of detecting erroneous cache data rewrite by the direct memory access control device DMAC by the above-described bus separation is provided. So reliability is not compromised.

さらに、中央処理装置CPUやキャッシュメモリ及び直接メモリアクセス制御装置DMACのように、そのバスサイクルが直ちに性能や機能に影響を及ぼすものは、上記のような高速なバスサイクルのバスに接続し、フリーランニングタイマFRT、シリアルコミュニケーションインターフェイスSCI又はウォッチドッグタイマWDTのように、そのバスサイクルがデータ処理に直接影響を及ぼさないものは、低速のバスサイクルの第3のバスに接続するようにするものである。これにより、中央処理装置CPUの高速化に追従して、高速タイプの周辺モジュールを開発設計する必要がなく、既存のものをそのまま流用して用いることができるから、設計の効率化を図ることができるとともに、そこでの動作クロックを低くできるので低消費電力化を図ることができる。   In addition, if the bus cycle immediately affects the performance or function, such as the central processing unit CPU, cache memory, and direct memory access control device DMAC, it is connected to the bus of the high-speed bus cycle as described above and free. Those whose bus cycle does not directly affect data processing, such as the running timer FRT, serial communication interface SCI or watchdog timer WDT, are intended to be connected to the third bus of the slow bus cycle. . Accordingly, it is not necessary to develop and design a high-speed type peripheral module following the increase in the speed of the central processing unit CPU, and the existing one can be used as it is, so that the design efficiency can be improved. In addition, since the operation clock can be lowered, the power consumption can be reduced.

図2と図3には、この発明に係るシングルチップマイクロコンピュータのピン配置図が示されている。図2には左半分が示され、図3には右半分が示されている。そして、両者の関連を明らかにするために、中央部分は図2と図3において重複するように示されている。この実施例では、144ピンからなるプラスチックQFPパッケージを用いている。   2 and 3 show pin arrangement diagrams of a single-chip microcomputer according to the present invention. FIG. 2 shows the left half, and FIG. 3 shows the right half. In order to clarify the relationship between them, the central portion is shown to overlap in FIGS. 2 and 3. In this embodiment, a plastic QFP package having 144 pins is used.

代表的な端子機能は、次の通りである。図2と図3において1つの端子に複数の意味を持たせ動作モードに応じて切り換えて使用するものを/(スラッシュ)により分けているが、この明細書では前記のようにバー信号の意味で用いているので、図2と図3の/は*に置き換えて説明するものである。   Typical terminal functions are as follows. In FIG. 2 and FIG. 3, one terminal has a plurality of meanings and is switched according to the operation mode, and is divided by / (slash). In this specification, the meaning of the bar signal is used as described above. Therefore, the symbol “/” in FIGS. 2 and 3 is replaced with “*”.

電源系としてVccは電源、Vssはグランド(接地電位)である。動作モード制御用として、MD0〜MD2はクロック選択、MD3とMD4はCS0空間のバスサイズ、MD5は後述するスレーブ/マスタモードの指定を行う。アドレスバス用として、A0〜A26はアドレス端子、データバス用として、D0〜D31は入出力データ端子である。   As a power supply system, Vcc is a power supply and Vss is a ground (ground potential). For operation mode control, MD0 to MD2 are used to select a clock, MD3 and MD4 are used to specify the bus size of the CS0 space, and MD5 is used to specify a slave / master mode which will be described later. For the address bus, A0 to A26 are address terminals, for the data bus, D0 to D31 are input / output data terminals.

バス制御用として、/CS0〜/CS3はチップセレクト出力信号である。/BSはバススタート信号である。RD*/WRはリード*ライト信号である。/RAS*/CEは、ダイナミック型RAMとシンクロナスダイナミック型RAMを使用時のロウアドレスストローブ信号と擬似スタティック型RAM使用時チップネーブル信号である。/CAS*/OEは、シンクロナスダイナミック型RAM使用時のカラムアドレスストローブ信号と擬似スタティック型RAM使用時の出力イネーブル信号及びリフレッシュ制御信号である。   For bus control, / CS0 to / CS3 are chip select output signals. / BS is a bus start signal. RD * / WR is a read * write signal. / RAS * / CE is a row address strobe signal when a dynamic RAM and a synchronous dynamic RAM are used, and a chip enable signal when a pseudo static RAM is used. / CAS * / OE is a column address strobe signal when the synchronous dynamic RAM is used, an output enable signal and a refresh control signal when the pseudo static RAM is used.

/WE0は基本インターフェイスのとき最下位バイト書き込み、/WE1は基本インターフェイスのとき3バイト目書き込み、/WE2は基本インターフェイスのとき2バイト目書き込み、/WE3は基本インターフェイスのとき最上位バイト書き込みを表し、この他にダイナミック型RAM使用時の各バイトの選択のCASとシンクロナスダイナミック型RAMを使用時の各バイトのマクスとしても使用される。/RDはリードパルス信号であり、デバイスのOE端子に接続される。/WAITは、ハードウエアウエイト入力である。/BENは外部データバッファイネーブル信号であり、データバッファの方向制御にはRD*/WRを用いる。   / WE0 represents the least significant byte write for the basic interface, / WE1 represents the third byte write for the basic interface, / WE2 represents the second byte write for the basic interface, / WE3 represents the most significant byte write for the basic interface, In addition, it is also used as a CAS for selecting each byte when using a dynamic RAM and as a maximum for each byte when using a synchronous dynamic RAM. / RD is a read pulse signal and is connected to the OE terminal of the device. / WAIT is a hardware wait input. / BEN is an external data buffer enable signal, and RD * / WR is used to control the direction of the data buffer.

/BACK*/BRLSは、端子MD5によりスレーブモードにされたときにはバス使用許可入力(バスアクノリッジ信号)、マスターモードにされたときにはバス開放要求入力(バスレリーズ信号)として選択的に使用される。/BREQ*/BGRは端子MD5によりスレーブモードにされたときにはバス使用権要求出力(バスリクエスト信号)、マスターモードにされたときにはバス使用許可出力(バスグラント信号)として選択的に使用される。CKEはシンクロナスダイナミック型RAMのクロックイネーブル信号である。   / BACK * / BRLS is selectively used as a bus use permission input (bus acknowledge signal) when the slave mode is set by the terminal MD5, and as a bus release request input (bus release signal) when the master mode is set. / BREQ * / BGR is selectively used as a bus use right request output (bus request signal) when the slave mode is set by the terminal MD5, and as a bus use permission output (bus grant signal) when set in the master mode. CKE is a clock enable signal of the synchronous dynamic RAM.

割り込み用として、/RESETはリセット端子である。/IRL0〜/IRL3は割り込みレベル入力信号である。NMIはノンマスカブル割り込み入力であり、IVECFは割り込みベクタフェッチ出力である。   For resetting, / RESET is a reset terminal. / IRL0 to / IRL3 are interrupt level input signals. NMI is a non-maskable interrupt input, and IVECF is an interrupt vector fetch output.

クロック用として、EXTALはクリスタル入力端子である。XTALはクリスタル入力端子*倍周用クロック入力である。CKPACKはクロックポーズアクノリッジ出力である。CKPREQはクロックポーズリクエスト入力である。CKIOはクロック入出力である。CAP1とCAP2はPLL用容量接続端子である。Vss(PLL)とVcc(PLL)は、PLLの電源端子である。   For the clock, EXTAL is a crystal input terminal. XTAL is a crystal input terminal * multiplication clock input. CKPACK is a clock pause acknowledge output. CKPREQ is a clock pause request input. CKIO is a clock input / output. CAP1 and CAP2 are PLL capacitor connection terminals. Vss (PLL) and Vcc (PLL) are power supply terminals of the PLL.

DMAC用として、/DREQ0,/DREQ1はDMA転送要求入力であり、チャンネル1とチャンネル2に対応している。/DACK0,/DACK1はDMA転送受け付け出力であり、チャンネル1とチャンネル2に対応している。SCI用として、TXD0は送信データ出力であり、RXD0は受信データ入力であり、SCK0はシリアルクロック入出力である。FRT用として、FTOAはアウトプットコンペアA出力であり、FTOBはアウトプットコンペアB出力である。FTCIはカウンタクロック入力であり、FTIはイップットキャプチャ入力である。そして、WDT用として、/WDTOVFはウォッチドッグタイマオーバーフロー出力である。   For DMAC, / DREQ0 and / DREQ1 are DMA transfer request inputs and correspond to channel 1 and channel 2. / DACK0 and / DACK1 are DMA transfer acceptance outputs and correspond to channel 1 and channel 2. For SCI, TXD0 is a transmission data output, RXD0 is a reception data input, and SCK0 is a serial clock input / output. For FRT, FTOA is an output compare A output and FTOB is an output compare B output. FTCI is a counter clock input, and FTTI is an input capture input. For WDT, / WDTOVF is a watchdog timer overflow output.

図4には、動作モードコントローラMCの一実施例のブロック図が示されている。モードコントロール部には、スタンバイコントロールレジスタとバス幅設定レジスタ及び周波数変更レジスタが設けられる。バス幅設定レジスタの出力は、組み合わせ論理回路により解読されて8ビット、16ビット又は32ビットのバス幅設定信号を形成し、バスステートコントローラBSCに対してバス幅の設定を行う。   FIG. 4 shows a block diagram of an embodiment of the operation mode controller MC. The mode control unit is provided with a standby control register, a bus width setting register, and a frequency change register. The output of the bus width setting register is decoded by a combinational logic circuit to form an 8-bit, 16-bit, or 32-bit bus width setting signal, and the bus width is set to the bus state controller BSC.

周波数変更レジスタは、その出力信号を組み合わせ論理回路により解読されて、周波数fに対して×1、×2及び×4の3通りの制御信号を形成して発振回路に供給される。モード設定端子MD0〜2から入力された信号は、組み合わせ論理回路により解読されて、7通りのモード設定信号とされ、発振回路に供給される。   The frequency change register decodes the output signal by a combinational logic circuit, forms three control signals of x1, x2, and x4 with respect to the frequency f, and supplies the control signal to the oscillation circuit. Signals input from the mode setting terminals MD0 to MD2 are decoded by a combinational logic circuit to form seven mode setting signals, which are supplied to the oscillation circuit.

このようなクロック動作モードは、内蔵発振モジュール又は倍周回路を使用する/使用しない、クロック出力をする/出力をしないの選択、PLLによる同期化をする/同期化をしないの選択、CPUのクロックと外部に出力させる又は外部から入力されるクロックとの位相を90°変更する/変更しないの選択が組み合わされて上記7通りのモードが設定できる。上記位相の90°変更をする動作モードについては、後に説明する。   Such clock operation modes include the use / non-use of the built-in oscillation module or the frequency multiplier, selection of clock output / no output, selection of synchronization / non-synchronization by PLL, CPU clock The above seven modes can be set by combining the selection of whether or not to change the phase of the output and the clock input from the outside by 90 °. The operation mode for changing the phase by 90 ° will be described later.

この実施例の各回路ブロックは、一部を除いてフルスタティック型CMOS回路により構成されている。それ故、動作を行う必要のない回路においては、クロックの供給を停止させてもその状態を維持しているので、基本的には初期設定や必要なデータを退避させておいてそれをもとに戻す等の処理を行うことなく、クロックの再入力により停止前の状態から引き続いて動作させることができる。ダイナミック型CMOS回路によって構成されているキャッシュメモリは、クロック供給開始によってプリチャージから動作が開始されるようにクロックの位相を合わせているので停止解除後に直ちにアクセスを行うことができる。   Each circuit block of this embodiment is composed of a full static CMOS circuit except for a part. Therefore, in a circuit that does not need to operate, the state is maintained even if the clock supply is stopped, so basically the initial settings and necessary data are saved and It is possible to continue the operation from the state before the stop by re-inputting the clock without performing a process such as returning to the state. Since the cache memory constituted by the dynamic CMOS circuit has the clock phase adjusted so that the operation is started from the precharge when the clock supply is started, the cache memory can be accessed immediately after the stop is released.

スタンバイコントロールレジスタは、上記のような動作を行う必要のない回路ブロックを指定することにより、例示的に示されているDMAC、DIVU、MULT及び1つのブロックSYSCとして示されている上記FRT、WDT及びSCIのような周辺モジュールに対するクロックの入力を停止させる制御信号STBY、DRTSTP、SCISTP及びMULTSTP、DIVUSTP、DMACSTP等のような制御信号によって対応する回路ブロックのクロック入力を停止させる。   The standby control register designates a circuit block that does not need to perform the above-described operation, so that the FRT, WDT, and the DMAC, DIVU, and MULT shown as examples and the one block SYSC are shown. Control circuit STBY, DRTSTP, SCISTP, and MULTTSTP, DIVUSTP, DMACSTP, etc. control signals for stopping the clock input to peripheral modules such as SCI stop the clock input of the corresponding circuit block.

(表1)
┌─────┬───┬───┬──────┬───────┬────────┐
│ モード │CPG│CPU│CPU レジスタ│周辺モジュール│ 端 子 │
├─────┼───┼───┼──────┼───────┼────────┤
│スリープ │動作 │停止 │ 保持 │ 動作 │ 保持 │
├─────┼───┼───┼──────┼───────┼────────┤
│スタンバイ│停止 │停止 │ 保持 │ 停止 │ 保持又はHiZ│
├─────┼───┼───┼──────┼───────┼────────┤
│モジュール│動作 │動作 │ 保持 │ 指定された │FRT,WDT,│
│ストップ │ │ │ │ ものが停止 │SCIはHiZ │
└─────┴───┴───┴──────┴───────┴────────┘
(Table 1)
┌─────┬───┬───┬──────┬───────┬───────┐
│ Mode │ CPG │ CPU │ CPU register │ Peripheral module │ Terminal │
├─────┼───┼───┼──────┼───────┼───────┤
│ Sleep │ Operate │ Stop │ Hold │ Operate │ Hold │
├─────┼───┼───┼──────┼───────┼───────┤
│Standby│Stop │Stop │ Hold │ Stop │ Hold or HiZ│
├─────┼───┼───┼──────┼───────┼───────┤
│Module│Action │Action │ Hold │ Specified │FRT, WDT, │
│Stop │ │ │ │ Things stop │SCI is HiZ │
└─────┴───┴───┴──────┴───────┴───────┘

表1には、上記スタンバイコントロールレジスタによる動作モードの一覧表が示されている。表1においてHiZはハイインピーダンス状態を意味している。モジュールストップモードが指定されると、上記のような制御信号STBY、DRTSTP、SCISTP及びMULTSTP、DIVUSTP、DMACSTP等による回路ブロックのクロック入力が停止される。   Table 1 shows a list of operation modes by the standby control register. In Table 1, HiZ means a high impedance state. When the module stop mode is designated, the clock input of the circuit block by the control signals STBY, DRTSTP, SCISTP, MULTTSTP, DIVUSTP, DMACSTP and the like is stopped.

中央処理装置CPUが動作を停止しているスリープモードの解除方法は、割り込み、DMAアドレスエラー、パワーオンリセット、マニアルリセットにより行われる。クロック発生回路CPGの動作停止により必然的に中央処理装置CPU及び周辺モジュールも動作が停止しているスタンバイモードの解除方法は、NMI割り込み、パワーオンリセット、マニュアルリセットにより行われる。これに対してモジュールストップモードは、上記スタンバイコントロールレジスタの所定ビットを0にリセットすることにより行われる。   A method of canceling the sleep mode in which the central processing unit CPU stops operating is performed by an interrupt, a DMA address error, a power-on reset, and a manual reset. The standby mode canceling method in which the operation of the central processing unit CPU and peripheral modules inevitably stops due to the operation stop of the clock generation circuit CPG is performed by an NMI interrupt, a power-on reset, and a manual reset. On the other hand, the module stop mode is performed by resetting a predetermined bit of the standby control register to 0.

上記のような各モードを設けることにより、シングルチップマイクロコンピュータの内部で、クロック発生回路の動作そのものも含めてクロックの供給が必要な回路のみ供給されるから、クロックパルスが伝えられる配線経路での負荷容量をチャージアップ/ディスチャージさせることにより生じる無駄な電流消費を削減することができる。これにより、電池駆動される携帯機器に搭載されるシングルチップマイクロコンピュータとしては特に必要とされる低消費電力化を図ることができる。   By providing each mode as described above, only the circuit that needs to supply the clock including the operation of the clock generation circuit itself is supplied inside the single chip microcomputer. It is possible to reduce wasteful current consumption caused by charging / discharging the load capacitance. Thereby, it is possible to achieve low power consumption particularly required for a single-chip microcomputer mounted on a battery-driven portable device.

図5には、上記ブレークコントローラUBCの基本的な一実施例のブロック図が示されている。ブレークコントローラUBCは、中央処理装置CPU又は直接メモリアクセス制御装置DMACが発生するバスサイクルの内容に応じて中央処理装置CPUにユーザブレーク割り込みを要求する。この機能を活用することによりセルフデバッガが構築でき、ユーザーのプログラムデバッグを容易にする。このブレークコントローラUBCは、チャンネルAとチャンネルBの2チャンネルあり、チャンネルBはデータを指定してブレークさせることができる。   FIG. 5 shows a block diagram of a basic embodiment of the break controller UBC. The break controller UBC requests a user break interrupt from the central processing unit CPU according to the contents of the bus cycle generated by the central processing unit CPU or the direct memory access control unit DMAC. By utilizing this function, a self-debugger can be constructed, which facilitates user program debugging. This break controller UBC has two channels, channel A and channel B. Channel B can be broken by designating data.

BARAHとBARAL及びBARBHとBARBLは、Aチャンネル及びBチャンネル用のブレークアドレスレジスタである。BAMRAHとBAMRAL及びBAMRBHとBAMRBLは、Aチャンネル及びBチャンネル用のブレークアドレスマスクレジスタである。これにより、Aチャンネル及びBチャンネルにおいてブレークをかけるアドレスの指定と各ビットごとのマクスが可能にされる。   BARAH and BARAL and BARBH and BARBL are break address registers for the A channel and the B channel. BAMRAH and BAMRAL and BAMRBH and BAMRBL are break address mask registers for the A channel and the B channel. As a result, it is possible to specify an address at which a break is made in the A channel and the B channel and to make a maximum for each bit.

BDRBHとBDRBLは、Bチャンネル用のブレークデータレジスタである。BDMRBHとBDMRBLは、Bチャンネル用のブレークデータマスクレジスタである。これにより、Bチャンネルにおいてブレークをかけるデータの指定の指定と各ビットごとのマクスが可能にされる。   BDRBH and BDRBL are break data registers for the B channel. BDMRBH and BDMRBL are break data mask registers for the B channel. As a result, it is possible to specify the data to be broken in the B channel and to set the maximum for each bit.

BBRAはAチャンネル用のブレークバスサイクルレジスタAであり、BBRBはBチャンネル用のブレークバスサイクルレジスタBである。BRCRは、ブレークコントロールレジスタである。これらにより、上記アドレス又はデータの条件の他に、(1)CPUサイクルか周辺サイクルの一方又は両方、及びバスリリース時のチップ外部のバスサイクルを周辺サイクルに含めるかどうか、(2)命令フェッチかデータアクセスの一方又は両方、(3)読み出しか書き込みの一方又は両方、(4)オペランドサイズ(ロングワード、ワード、バイトアクセス)のような条件が組み合わせれてブレークをかけることができる。   BBRA is a break bus cycle register A for the A channel, and BBRB is a break bus cycle register B for the B channel. BRCR is a break control register. As a result, in addition to the above address or data conditions, (1) one or both of the CPU cycle and peripheral cycle, and whether to include the bus cycle outside the chip at the time of bus release, or (2) instruction fetch Breaks can be made by combining conditions such as one or both of data access, (3) one or both of read or write, and (4) operand size (longword, word, byte access).

図6には、上記ブレークコントローラUBCの一実施例の詳細なブロック図が示されている。この実施例では、ブレークコントローラUBCに次のような機能が付加される。前記図1の実施例のようにバス分離によって中央処理装置CPUと直接メモリアクセス制御装置DMAC及び外部バスインターフェイスOBIFとは分離されている。そのため、キャッシュメモリにミスヒットが発生した場合には、外部メモリをアクセスしてデータを取り込む必要がある。   FIG. 6 shows a detailed block diagram of an embodiment of the break controller UBC. In this embodiment, the following functions are added to the break controller UBC. As in the embodiment of FIG. 1, the central processing unit CPU, the direct memory access control unit DMAC, and the external bus interface OBIF are separated by bus separation. For this reason, when a miss hit occurs in the cache memory, it is necessary to access the external memory and take in the data.

バストランシーバは、制御信号C1により第1のアドレスバスAB1のアドレス信号を第2のアドレスバスAB2に伝達する。すなわち、キャッシュメモリにおいてミスヒットが生じると、制御信号C1により上記アドレスバスAB1のアドレス信号をアドレスバスAB2に伝え、外部バスインターフェイスOBIFを介して外部メモリをアクセスすることができる。このときの外部メモリから読み出されたデータは、キャッシュのデータメモリCDMを介して中央処理装置CPUに伝えられる。   The bus transceiver transmits the address signal of the first address bus AB1 to the second address bus AB2 by the control signal C1. That is, when a miss hit occurs in the cache memory, the address signal of the address bus AB1 is transmitted to the address bus AB2 by the control signal C1, and the external memory can be accessed via the external bus interface OBIF. The data read from the external memory at this time is transmitted to the central processing unit CPU via the cache data memory CDM.

同図では、レジスタBARAは、前記レジスタBARAHとBARALの2本のレジスタを合わせたものである。他のレジスタBARB、BDRBとそれぞれに対応したマスクレジスタBAMRA、BAMRB及びBDMRBもそれぞれ同様に図5の2本のレジスタを合わせたものである。   In the figure, the register BARA is a combination of the two registers BARAH and BARAL. Similarly, the other registers BARB and BDRB and the mask registers BAMRA, BAMRB and BDMRB respectively corresponding to the registers BARB and BDRB are obtained by combining the two registers of FIG.

この実施例では、シンクロナスダイナミック型RAM,ダイナミック型RAM,擬似スタティック型RAMのアクセスを高速にするために、Rowアドレスコンパレータが設けられる。Rowアドレスレジスタに上記各RAMのロウアドレスをセットしておいて、同じロウアドレスを指定したときに、上記コンパレータからヒット信号Hitを発生させてバスステートコントローラBSCを介して上記各RAMのワード線を選択状態にしたままアクセスすることにより高速動作を行うようにするものである。   In this embodiment, a Row address comparator is provided to speed up access to the synchronous dynamic RAM, dynamic RAM, and pseudo-static RAM. When the row address of each RAM is set in the Row address register and the same row address is designated, a hit signal Hit is generated from the comparator and the word line of each RAM is connected via the bus state controller BSC. The high-speed operation is performed by accessing in the selected state.

ブレークコントローラUBCは、上記のように第1バス及び第2バスに接続されてレジスタに設定されたアドレスとの比較動作を行っている。そこで、第2のバスに接続されるコンパレータとアドレスレジスタを利用し、キャッシュメモリに格納されているデータのアドレスをセットしておく。このようにしておけば、直接メモリアクセス制御装置DMACが誤ってキャッシュメモリに格納されているアドレスに対して書き込みを行うことによるデータを破壊を監視することができる。つまり、内部バスを分割して、内部回路の高速化や低消費電力化を図るだけで、この実施例のような手当を行わない場合には、キャッシュメモリのデータが破壊されてしまっても中央処理装置CPUが検知できなく、システムとして重大な欠陥を持つものとなってしまう。   As described above, the break controller UBC is connected to the first bus and the second bus, and performs a comparison operation with the address set in the register. Therefore, the address of data stored in the cache memory is set using a comparator and an address register connected to the second bus. In this way, it is possible to monitor the destruction of data caused by the direct memory access controller DMAC erroneously writing to the address stored in the cache memory. In other words, if the internal bus is divided to increase the speed and power consumption of the internal circuit and no allowance is provided as in this embodiment, the cache memory data is destroyed even if the cache memory is destroyed. The processing device CPU cannot be detected, and the system has a serious defect.

図7には、上記バスステートコントローラBSCの一実施例のブロック図が示されている。上記バスステートコントローラBSCは、アドレス空間を管理し、8つの空間で最適なアクセスができるよう必要に応じて外部バスインターフェイスOBIFを通して制御信号を出力する。これにより、ダイナミック型RAM、シンクロナスダイナミック型RAM、擬似スタティック型RAMなどの各種メモリ及び周辺LSIと直結できる。   FIG. 7 shows a block diagram of an embodiment of the bus state controller BSC. The bus state controller BSC manages the address space and outputs a control signal through the external bus interface OBIF as necessary so that optimum access is possible in the eight spaces. Thereby, it is possible to directly connect various memories such as a dynamic RAM, a synchronous dynamic RAM, and a pseudo static RAM, and a peripheral LSI.

上記エリア制御部は、アドレス空間を4つに分割して管理を行う。つまり、アドレス空間は、アーキテクチャ上は4Gバイトあるが、メモリ空間としては256Mバイトあり、これを2つに分割して一方をキャッシュメモリを介してアクセスを行う空間、他方をキャッシュメモリを介さずにアクセスする空間とするが、物理的には同一の128Mバイトの空間に対するアクセスとなる。128Mバイトの物理空間を4個の部分空間(CS0空間からSC3空間)に分割して使用し、各空間は最大リニア32Mバイトとされる。上記CS0〜CS3の空間毎に、ダイナミック型RAM、シンクロナスダイナミック型RAM、擬似スタティック型RAM及びバーストROMなどのメモリの種類の指定を設定できる。CS0は通常空間とバーストROMに、CS1は通常空間に、CS2は通常空間とシンクロナスダイナミック型RAMに、CS3は通常空間とシンクロナスダイナミック型RAM、ダイナミック型RAM、擬似スタティック型RAMにそれぞれ指定して使用できる。   The area control unit performs management by dividing the address space into four. In other words, the address space is 4 Gbytes on the architecture, but the memory space is 256 Mbytes. This space is divided into two and one is accessed via the cache memory, and the other is not via the cache memory. The space to be accessed is physically accessed to the same 128 Mbyte space. A 128-Mbyte physical space is divided into four partial spaces (CS0 space to SC3 space), and each space has a maximum linear 32 Mbytes. For each of the spaces CS0 to CS3, designation of a memory type such as a dynamic RAM, a synchronous dynamic RAM, a pseudo static RAM, and a burst ROM can be set. CS0 is designated as normal space and burst ROM, CS1 is designated as normal space, CS2 is designated as normal space and synchronous dynamic RAM, and CS3 is designated as normal space and synchronous dynamic RAM, dynamic RAM and pseudo-static RAM. Can be used.

キャッシュ制御の空間としては、キャッシュパージのための前記物理空間に対応した連想パージ空間(128Mバイト)、アドレスアレイ(タグアドレス)を読み書きするためのアドレスアレイリード/ライト空間(128Mバイト)、データアレイを強制的に読み書きするためのキャッシュ強制リード/ライト空間が設けられている。   The cache control space includes an associative purge space (128 Mbytes) corresponding to the physical space for the cache purge, an address array read / write space (128 Mbytes) for reading and writing the address array (tag address), and a data array. A cache forced read / write space for forcibly reading and writing is provided.

この他、空間ごとにバス幅(8ビット、16ビット、または32ビット)を選択可能にされる。空間に対応した制御信号出力ができる。ウェイト制御部では、空間ごとにウェイトステートの挿入を制御できる。また、高速の内部バス(第2のバス)と低速の周辺バス(第3のバス)とではバスサイクルがことなるので、内部バスの信号を周辺バスに転送するとき及び周辺バスの信号を内部バスに転送するときには、ウェイトを挿入して同期化を図るものである。   In addition, the bus width (8 bits, 16 bits, or 32 bits) can be selected for each space. A control signal corresponding to the space can be output. The weight control unit can control insertion of wait states for each space. Also, since the bus cycle differs between the high-speed internal bus (second bus) and the low-speed peripheral bus (third bus), the internal bus signals are transferred when the internal bus signals are transferred to the peripheral bus. When transferring to the bus, a wait is inserted for synchronization.

メモリ制御部では、リフレッシュ機能が設けられ、CASビフォワーRASリフレッシュとセルフリフレッシュが用意されている。リフレッシュ用カウンタのクロックセレクトによりリフレッシュ間隔を設定できるようにされる。   In the memory control unit, a refresh function is provided, and CAS before RAS refresh and self refresh are provided. The refresh interval can be set by clock selection of the refresh counter.

ダイナミック型RAMを直結できるインターフェイスを備えている。つまり、ロウアドレス/カラムアドレスのマルチプレクス出力と、リード時のバースト転送、連続アクセスに対する高速ページモード、連続しない同一ロウアドレスアクセスに対するRASダウンモード、及びRASプリチャージタイム確保用TPサイクル発生が可能とされる。また、シンクロナスダイナミック型RAMを直結できるインターフェイスを備えている。ロウアドレス/カラムアドレスのマルチプレクス出力と、バーストリード、シングルライトによるメモリアクセスと、バンクアクティブモードによるカラム連続アクセスが可能にされる。   It has an interface that can be directly connected to a dynamic RAM. That is, row address / column address multiplex output, burst transfer at the time of reading, high-speed page mode for continuous access, RAS down mode for non-continuous same row address access, and generation of TP cycle for securing RAS precharge time are possible. Is done. It also has an interface that can be directly connected to a synchronous dynamic RAM. Multiplex output of row address / column address, memory access by burst read and single write, and continuous column access by bank active mode are enabled.

上記ダイナミック型RAMやシンクロナスダイナミック型RAMの制御のために必要なアドレスストローブ信号/RAS、/CASやシンクロナスダイナミック型RAMやダイナミック型RAMに対するモード設定のための制御信号の発生は、メモリ制御信号発生回路MCTGにより行われる。つまり、エリア制御部において、ダイナミック型RAM又はシンクロナスダイナミック型RAMが割り当てられた空間に対するアクセスであることを検知すると、それに応じで上記制御信号が発生される。また、シンクロナスダイナミック型RAMに対するモード設定は、後に説明するようにCPUが特定のアドレスをアクセスすると、それをエリア制御部で検知し、メモリ制御信号発生回路に起動をかけてモード設定の制御信号を発生せさる。   Generation of a control signal for mode setting for the address strobe signals / RAS, / CAS, synchronous dynamic RAM and dynamic RAM necessary for controlling the dynamic RAM and synchronous dynamic RAM is a memory control signal. This is performed by the generation circuit MCTG. That is, when the area control unit detects that the access is to the space to which the dynamic RAM or the synchronous dynamic RAM is allocated, the control signal is generated accordingly. As described later, when the CPU accesses a specific address, the mode setting for the synchronous dynamic RAM is detected by the area control unit, and the memory control signal generation circuit is activated to control the mode setting control signal. Is generated.

バス使用権コントローラでは、前記端子MD5によるハイレベル/ロウレベルの入力により、マタタ/スレーブモードの切り換えが行われる。マスタモードのときには、/BRLSと/BGRにより外部からのバス解放要求を受け、バス使用許可信号を出力する。スレーブモードのときには、上記同じ端子を/BACKと/BREQとして用いる。つまり、バス使用権要求信号を出力し、バス使用許可信号を受けてマスタ側のバスをアクセスする。   In the bus usage right controller, the matata / slave mode is switched by the high level / low level input from the terminal MD5. In the master mode, an external bus release request is received by / BRLS and / BGR, and a bus use permission signal is output. In the slave mode, the same terminal is used as / BACK and / BREQ. In other words, a bus use right request signal is output, and the master side bus is accessed in response to the bus use permission signal.

図7において、エリア制御部に対応して設けられたBCR1とBCR2は、バスコントロールレジスタである。ウェイト制御部に対応して設けられたWCRは、ウェイトステートコントロールレジスタである。メモリ制御部に対応して設けられたMCRは、個別メモリコントロールレジスタである。RTCSRは、リフレッシュコントロール/ステータスレジスタである。RTCNTは、リフレッシュタイマカウンタである。RTCORは、リフレッシュタイムコンスタントレジスタである。BCR1の1ビットを読み出すことにより前記端子MD5の入力値を読み出すことができ、ソフトウェアがマスターモードかスレーブモードかの識別を行うことができる。   In FIG. 7, BCR1 and BCR2 provided corresponding to the area control unit are bus control registers. WCR provided corresponding to the wait control unit is a wait state control register. MCR provided corresponding to the memory control unit is an individual memory control register. RTCSR is a refresh control / status register. RTCNT is a refresh timer counter. RTCOR is a refresh time constant register. By reading 1 bit of BCR1, the input value of the terminal MD5 can be read, and the software can be identified as the master mode or the slave mode.

図8には、バスステートコントローラBSCと外部バスインターフェイスOBIFによるシンクロナスダイナミック型RAM(以下、SDRAMという)との接続例を説明するためのブロック図が示されている。同図には、基本的なメモリとしてスタティック型RAM(以下、SRAMという)の接続例も合わせて示されている。   FIG. 8 is a block diagram for explaining an example of connection between a bus state controller BSC and a synchronous dynamic RAM (hereinafter referred to as SDRAM) by an external bus interface OBIF. The figure also shows a connection example of a static RAM (hereinafter referred to as SRAM) as a basic memory.

図9には、上記SDRAMのバーストリード動作を説明するためのバスサイクル波形図が示されている。なお、同図では省略されているが、クロックイネーブル信号CKEはハイレベルにされて、SDRAMにはクロックCKIOが入力されている。このクロックCKIOに対して、中央処理装置CPUのクロックφは、位相が90°遅れるようにされている。言い換えるならば、中央処理装置CPU側からみれば、SDRAMのクロックは位相が90°進められている。このような位相関係のクロックを形成するために、前記クロック発生回路では、倍周回路によりクロックφの4倍の周波数の基本クロックを形成しておいて、それを1/4分周してシステムクロックφを形成するとともに、上記90°位相がずれたSDRAM用のクロックCKIOを形成している。/BSはバスサイクルをモニタするためのストローブ信号でありSDRAMには接続されない。   FIG. 9 is a bus cycle waveform diagram for explaining the burst read operation of the SDRAM. Although omitted in the figure, the clock enable signal CKE is set to the high level, and the clock CKIO is input to the SDRAM. The phase of the clock φ of the central processing unit CPU is delayed by 90 ° with respect to this clock CKIO. In other words, when viewed from the central processing unit CPU side, the phase of the SDRAM clock is advanced by 90 °. In order to form a clock having such a phase relationship, in the clock generation circuit, a basic clock having a frequency four times the clock φ is formed by a frequency dividing circuit, and the frequency is divided by ¼. The clock φ is formed, and the SDRAM clock CKIO having a 90 ° phase shift is formed. / BS is a strobe signal for monitoring the bus cycle and is not connected to the SDRAM.

最初のサイクルTrでは、SDRAMが割り当てられた空間に対応した信号/CSnがロウレベルにされ、ロウアドレスストローブ信号/RASがロウレベルにされてロウアドレスが取り込まれる。次のサイクルTc1では、カラムアドレスストローブ信号/CASがロウレベルにされてカラムアドレスが取り込まれる。これと同期して/BSもロウレベルにされる。このように中央処理装置CPU側からクロックφの立ち上がりエッジに同期して出力される信号/CSn、/RASや/CAS及びアドレスに対して、SDRAMにおいてクロックCKIOの立ち上がりエッジに同期して上記各信号を取り込むものであり、上記90°の位相のずれによって十分な動作マージンを確保することができる。つまり、SDRAMにおいては、十分なセットアップ時間とホールド時間とを持って外部からの信号を取り込みことができる。   In the first cycle Tr, the signal / CSn corresponding to the space to which the SDRAM is allocated is set to the low level, the row address strobe signal / RAS is set to the low level, and the row address is captured. In the next cycle Tc1, the column address strobe signal / CAS is set to the low level to fetch the column address. In synchronization with this, / BS is also set to the low level. As described above, in response to the signals / CSn, / RAS, / CAS and the address which are output from the central processing unit CPU side in synchronization with the rising edge of the clock φ, each of the above signals is synchronized with the rising edge of the clock CKIO in the SDRAM. A sufficient operation margin can be ensured by the 90 ° phase shift. That is, the SDRAM can take in an external signal with sufficient setup time and hold time.

3番目のサイクルTc2では、/CASと/BSがハイレベルにリセットされる。そして、4番目以降Td1〜Td4の4サイクルにわたってSDRAMからデータD31〜D0が連続して読み出される。このようなバーストリードによって、4×4=16バイトのデータを読み出すことができる。   In the third cycle Tc2, / CAS and / BS are reset to high level. Then, data D31 to D0 are continuously read from the SDRAM over the fourth and subsequent cycles of Td1 to Td4. With such burst read, 4 × 4 = 16 bytes of data can be read.

図10には、上記SDRAMのシングルライト動作を説明するためのバスサイクル波形図が示されている。最初のサイクルTrでは、SDRAMが割り当てられた空間に対応した信号/CSnがロウレベルにされ、ロウアドレスストローブ信号/RASがロウレベルにされてロウアドレスが取り込まれる。また、書き込み動作を指示する信号RD*/WRがロウレベルにされる。次のサイクルTc1では、カラムアドレスストローブ信号/CASがロウレベルにされてカラムアドレスが取り込まれる。これと同期して/BSもロウレベルにされ、データD31〜D0が取り込まれ、選択されたメモリセルに書き込みが行われる。このように2サイクルで4バイトの書き込みが行われる。   FIG. 10 is a bus cycle waveform diagram for explaining the single write operation of the SDRAM. In the first cycle Tr, the signal / CSn corresponding to the space to which the SDRAM is allocated is set to the low level, the row address strobe signal / RAS is set to the low level, and the row address is captured. Further, the signal RD * / WR instructing the write operation is set to the low level. In the next cycle Tc1, the column address strobe signal / CAS is set to the low level to fetch the column address. In synchronization with this, / BS is also set to the low level, the data D31 to D0 are taken in, and the selected memory cell is written. Thus, 4 bytes are written in two cycles.

図11には、基本バスサイクルを説明するための波形図が示されている。この基本バスサイクルにより、例えば上記SRAMやROM等のメモリアクセスが行われる。基本バスサイクルでは、T1とT2のような2ステートにより行われる。同図では、/RDによるリード動作の場合と/WEnによるライト動作の場合が合わせて示されている。   FIG. 11 is a waveform diagram for explaining the basic bus cycle. By this basic bus cycle, memory access such as the SRAM and ROM is performed. In the basic bus cycle, it is performed by two states such as T1 and T2. In the figure, the case of a read operation by / RD and the case of a write operation by / WEn are shown together.

図12には、バスステートコントローラBSCと外部バスインターフェイスOBIFによるダイナミック型RAM(以下、DRAMという)との接続例を説明するためのブロック図が示されている。同図のDRAMは、×16ビット構成のものであり、CAS2本方式(/UCAS*/LCAS)による上側と下側バイトアクセスが可能にされる。   FIG. 12 is a block diagram for explaining an example of connection between the bus state controller BSC and a dynamic RAM (hereinafter referred to as DRAM) by the external bus interface OBIF. The DRAM shown in the figure has a × 16 bit configuration, and upper and lower byte accesses can be made by a two-CAS method (/ UCAS * / LCAS).

図13には、上記DRAMの高速ページモードを説明するためのバスサイクル波形図が示されている。高速ページモードでは、ロウアドレスを固定しておいて、言い換えるならば、ワード線を選択状態にしておいて、カラムアドレスストローブ信号/CASに同期してカラムアドレスを順次に入力してデータの読み出し又は書き込みを連続的に行うものである。この場合、前記ブレイクコントローラUBCに設けられたRowアドレスコンパレータからのヒット信号Hitにより、ロウ系のリセット動作を省略して自動的に高速ページモードにすることができる。同様な動作をSDRAMにおいても行うようにすることができる。   FIG. 13 is a bus cycle waveform diagram for explaining the high-speed page mode of the DRAM. In the high-speed page mode, the row address is fixed, in other words, the word line is selected and the column address is sequentially input in synchronization with the column address strobe signal / CAS to read data or Writing is performed continuously. In this case, the row page reset operation can be omitted and the high-speed page mode can be automatically set by the hit signal Hit from the Row address comparator provided in the break controller UBC. A similar operation can be performed in the SDRAM.

図14には、バスステートコントローラBSCと外部バスインターフェイスOBIFによる擬似スタティック型RAM(以下、PSRAMという)との接続例を説明するためのブロック図が示されている。シングルチップマイクロコンピュータMCU側の出力/RAS*/CEをPSRAMのチップイネーブル端子/CEに接続し、MPU側の出力/CAS*/OEをPSRAMの出力イネーブル*リフレッシュ制御端子/OE*/RFSHに接続する。PSRAMライトイネーブル端子/WEはSRAMと同様にMCUの端子/WEjに接続される。そして、SRAMのチップセレクト端子/CSにはMCUの端子/CSnが供給される。すなわち、PSRAMは前記の空間分割によりCS3空間に割り当てられ、このときのSRAMはそれ以外の空間に割り当てられる。   FIG. 14 is a block diagram for explaining an example of connection between a bus state controller BSC and a pseudo static RAM (hereinafter referred to as PSRAM) using an external bus interface OBIF. Single chip microcomputer MCU side output / RAS * / CE is connected to PSRAM chip enable terminal / CE, MPU side output / CAS * / OE is connected to PSRAM output enable * refresh control terminal / OE * / RFSH To do. The PSRAM write enable terminal / WE is connected to the MCU terminal / WEj in the same manner as the SRAM. Then, the MCU terminal / CSn is supplied to the SRAM chip select terminal / CS. That is, the PSRAM is allocated to the CS3 space by the above-described space division, and the SRAM at this time is allocated to the other space.

図15には、この発明に係るシングルチップマイクロコンピュータを用いてマルチプロセッサ接続した場合の一実施例のブロック図が示されている。この実施例のシングルチップマイクロコンピュータMCUは、モード設定端子MD5にロウレベル/又はハイレベルを入力することにより、マスタモードとスレーブモードに設定することができる。この機能を利用し、同じ2つのシングルチップマイクロコンピュータの一方をマスタモードにし、他方をスレーブモードにしてマルチプロセッサシステムを構成することができる。   FIG. 15 is a block diagram showing an embodiment in which a multiprocessor connection is made using a single chip microcomputer according to the present invention. The single-chip microcomputer MCU of this embodiment can be set to the master mode and the slave mode by inputting a low level / high level to the mode setting terminal MD5. By utilizing this function, one of the same two single-chip microcomputers can be set to the master mode and the other can be set to the slave mode to constitute a multiprocessor system.

端子MD5にハイレベル(“1”)が入力されたものはスレーブモードのシングルチップマイクロコンピュータS−MCUとされる。端子MD5にロウレベル(“0”)が入力されたものはマスタモードのシングルチップマイクロコンピュータM−MCUとされる。マスタ側M−MCUは、メインバスを介してメインメモリ等の周辺LSIが接続される。   A device in which a high level (“1”) is input to the terminal MD5 is a single-chip microcomputer S-MCU in the slave mode. A device in which a low level (“0”) is input to the terminal MD5 is a master mode single chip microcomputer M-MCU. The master M-MCU is connected to a peripheral LSI such as a main memory via a main bus.

すなわち、通常のマイクロコンピュータシステムではシステム内に構築されたメインバスには、主記憶メモリや拡張メモリなど高速メモリをアクセスするメモリ制御ユニット、主記憶メモリとしてのDRAMやSDRAM,基本制御プログラムが格納されたROM、先端にキーボードが接続されたキーボードコントローラ等によって構成される。さらに、表示アダプタが上記メインバスに接続され、その先端にはCRT又はLCD等のディスプレイが接続されている。そして、上記メインバスにはパラレルポート,マウス等のシリアルポート、フレキシブルディスクドライブ、上記メインバスよりハードディスクインターフェイスに変換するバッファコントローラが接続される。また、上記メモリ制御ユニットからのバスと接続されて拡張RAM及び主記憶メモリ等が接続される。同図では、これらを簡略化してメインメモリとしてSDRAMのみが設けられる例が示されている。   That is, in a normal microcomputer system, a main bus constructed in the system stores a memory control unit for accessing a high-speed memory such as a main memory or an expansion memory, a DRAM or SDRAM as a main memory, and a basic control program. ROM, a keyboard controller with a keyboard connected to the tip, and the like. Further, a display adapter is connected to the main bus, and a display such as a CRT or LCD is connected to the tip of the display adapter. The main bus is connected to a parallel port, a serial port such as a mouse, a flexible disk drive, and a buffer controller for converting the main bus into a hard disk interface. The expansion RAM and the main memory are connected to the bus from the memory control unit. In the figure, an example in which these are simplified and only SDRAM is provided as the main memory is shown.

スレーブ側とされたS−MCUは、特に制限されないが、ローカルバスが設けられ、そこにローカルメモリ等のローカル周辺LSIが必要に応じて設けられる。このローカル周辺LSI等は省略できる。そして、バスバッファを介してS−MCU側のアドレス、データ及び制御信号はメインバス側の対応する信号線に接続される。そして、上記のようなモード設定に対応してS−MCU側の/BREQとして用いられる端子がM−MCUの/BRLSとして用いられる端子に接続され、M−MCU側の/BGRとして用いられる端子がS−MCUの/BACKとして用いられる端子に接続される。   The S-MCU on the slave side is not particularly limited, but a local bus is provided, and a local peripheral LSI such as a local memory is provided as necessary. This local peripheral LSI can be omitted. The address, data, and control signal on the S-MCU side are connected to corresponding signal lines on the main bus side via the bus buffer. Corresponding to the mode setting as described above, a terminal used as / BREQ on the S-MCU side is connected to a terminal used as / BRLS on the M-MCU, and a terminal used as / BGR on the M-MCU side Connected to terminal used as / BACK of S-MCU.

上記M−MCUから出力される信号/BGRが上記バスバッファの出力イネーブル端子/OE及びゲート端子/Gにも入力される。これにより、S−MCUがメインバスの使用許可を受けると上記バスバッファが活性化されてスレーブ側S−MCUのアドレス信号をメインバス側に供給して、メインバス上の周辺LSI等のアクセスが可能にされる。   The signal / BGR output from the M-MCU is also input to the output enable terminal / OE and the gate terminal / G of the bus buffer. As a result, when the S-MCU receives permission to use the main bus, the bus buffer is activated and the address signal of the slave S-MCU is supplied to the main bus side, so that peripheral LSIs on the main bus can be accessed. Made possible.

このとき、M−MCUから出力され、S−MCUに入力されるクロックCKIOは、前記のSDRAMをアクセスしたときのようにS−MCUの内部クロックφに対して位相が90°進められたものとすることにより、上記バスバッファを通してメインバス側に供給する信号伝達の動作マージンを拡大させることができる。つまり、上記のような位相差の設定により、SDRAMをアクセスするときと同様に、ラッチ付バスバッファを通して伝達される信号のセットアップ時間及びホールド時間を十分に確保することができる。   At this time, the clock CKIO output from the M-MCU and input to the S-MCU has a phase advanced by 90 ° with respect to the internal clock φ of the S-MCU as in the case of accessing the SDRAM. As a result, the operation margin of signal transmission supplied to the main bus through the bus buffer can be increased. That is, by setting the phase difference as described above, the setup time and hold time of the signal transmitted through the latched bus buffer can be sufficiently secured as in the case of accessing the SDRAM.

この実施例では、1つのシングルチップマイクロコンピュータがモード設定によりマスタモード又はスレーブモードとして選択的に使用でき、しかも同じ端子をマスタ用とスレーブ用に切り換えて使用するために、端子数が減らすことができる。   In this embodiment, one single-chip microcomputer can be selectively used as a master mode or a slave mode by mode setting, and the same terminal is used by switching between a master and a slave, so that the number of terminals can be reduced. it can.

図16には、S−MCUからメインバス上のSDRAMをアクセスする場合のタイミング図が示されている。スレーブ側から/BREQを出力し、メイン側からバス使用許可信号により/BACKがロウレベルにされると、前記SDRAMをアクセスする場合のようにロウアドレス(ROW)とカラムアドレス(COLUMN)を出力する。マスタ側では、ラッチ付バスバッファを通して出力される分(1クロック分)だけ遅れてアドレスとコマンドが伝えられ、読み出されたデータもラッチ付バスバッファを通した分だけ遅れてスレーブ側に伝えられる。   FIG. 16 shows a timing chart when the SDRAM on the main bus is accessed from the S-MCU. When / BREQ is output from the slave side and / BACK is set to low level by the bus use permission signal from the main side, the row address (ROW) and the column address (COLUMN) are output as in the case of accessing the SDRAM. On the master side, the address and command are transmitted with a delay (one clock) output through the latched bus buffer, and the read data is transmitted to the slave side with a delay through the latched bus buffer. .

図17には、この発明に係るシングルチップマイクロコンピュータに内蔵されるキャッシュメモリの一実施例のブロック図が示されている。同図は、中央処理装置CPU及びバスステートコントローラも合わせて示されている。この実施例のキャッシュメモリは、アドレス入力から該当するデータの出力を1.5サイクルにより実行する。データのリプレースアルゴリズムはLRU(Least Recently Used)法を用いる。   FIG. 17 is a block diagram showing one embodiment of a cache memory built in a single chip microcomputer according to the present invention. The figure also shows the central processing unit CPU and the bus state controller. The cache memory of this embodiment executes the output of the corresponding data from the address input in 1.5 cycles. The data replacement algorithm uses an LRU (Least Recently Used) method.

キャッシュメモリの回路構成は、大きくわけてキャッシュタグ(アドレスアレイ)とキャッシュデータ(データアレイ)及びキャッシュコントローラから構成される。キャッシュタグはアドレスタグと呼ばれるアドレスの一部を格納しており、キャッシュデータはキャッシュタグに格納されているアドレスタグに対応するデータが格納されている。これにより、上記キャッシュタグに格納されているアドレスの一部が中央処理装置CPUからのそれに対応するアドレスとが一致すると、キャッシュタグからヒット信号が出力されて、並行して選択されているキャッシュデータから読み出されているデータが中央処理装置CPUに取り込まれる。もしも、ミスヒットなら、前記ブレークコントロールUBC及び外部バスインターフェイスを通して外部のメインメモリをアクセスすることとなる。   The circuit configuration of the cache memory is roughly composed of a cache tag (address array), cache data (data array), and a cache controller. The cache tag stores a part of an address called an address tag, and the cache data stores data corresponding to the address tag stored in the cache tag. As a result, when a part of the address stored in the cache tag matches the corresponding address from the central processing unit CPU, a hit signal is output from the cache tag and the cache data selected in parallel is output. The data read from the CPU is taken into the central processing unit CPU. If there is a miss hit, an external main memory is accessed through the break control UBC and the external bus interface.

図17において、キャッシュコントロールレジスタCCRは、キャッシュイネーブル、命令フィル禁止、データフィル禁止、2ウェイモード、ウェイ指定等の制御ビットを持っており、動作モードの設定に使用される。   In FIG. 17, the cache control register CCR has control bits such as cache enable, instruction fill prohibition, data fill prohibition, two-way mode, and way designation, and is used for setting the operation mode.

図20には、この発明に係るキャッシュメモリの動作概念図が示されている。アドレス信号はA31〜A0の32ビットから構成される。アドレスA3〜A0の4ビットに対応した16バイトが1ラインとされる。ラインは1つの連想アドレスに関連づけられたデータの塊である。アドレス信号A9〜A4の6ビットにより64エントリを持つようにされる。そして、アドレス信号A28〜A10までの19ビットのアドレス信号がタグアドレスとしてキャッシュタグに書き込まれている。アドレス信号A31〜A29までの3ビットは、アクセス空間指定に用いられる。   FIG. 20 is a conceptual diagram showing the operation of the cache memory according to the present invention. The address signal is composed of 32 bits A31 to A0. 16 bytes corresponding to 4 bits of the addresses A3 to A0 are taken as one line. A line is a chunk of data associated with one associative address. 64 entries are provided by 6 bits of the address signals A9 to A4. Then, 19-bit address signals A28 to A10 are written in the cache tag as tag addresses. Three bits from the address signals A31 to A29 are used for designating an access space.

0〜63からなる64エントリに対応してLRU情報が設けられる。LRU情報は、6ビットから構成される。LRUリプレースの判定に使用する過去のアクセスに関する情報は6ビットにより表される。6ビットで表される組み合わせは、64通りあるが、初期値を0として24通りの組み合わせが使用される。そして、最下位ビットが2ウェイとして使用するときに利用されるよう組み合わされている。つまり、4ウェイのうちの2ウェイを内蔵RAMとして使用したときには、ミスヒットによるリプレースに使用されるのは最下位ビットが0ならばウェイ3を、1ならばウェイ2を使用するようにされる。このことを満足するような24通りの組み合わせにより、4ウェイモードのときのLRU情報の書き換えが行われる。   LRU information is provided corresponding to 64 entries of 0 to 63. The LRU information is composed of 6 bits. Information relating to past accesses used for determination of LRU replacement is represented by 6 bits. There are 64 combinations represented by 6 bits, but 24 combinations are used with an initial value of 0. And it is combined so that the least significant bit is used when used as 2 ways. That is, when 2 of the 4 ways are used as the built-in RAM, the way 3 is used for replacement due to a miss hit if the least significant bit is 0, and the way 2 is used if it is 1. . The LRU information in the 4-way mode is rewritten by 24 combinations that satisfy this condition.

上記キャッシュタグから読み出されたタグアドレスと中央処理装置CPUから出力されるA28〜A10からなる19ビットのアドレス信号とが一致し、バリッドビットVが1であるときには、ヒット信号が出力されてキャッシュデータから16バイトのデータが読み出される。この16バイトの中の4バイト(32ビット)が2ビットのアドレスA3とA2により指定されて中央処理装置CPUに読み出される。   When the tag address read from the cache tag matches the 19-bit address signal consisting of A28 to A10 output from the central processing unit CPU and the valid bit V is 1, a hit signal is output and the cache 16-byte data is read from the data. Of the 16 bytes, 4 bytes (32 bits) are designated by 2-bit addresses A3 and A2 and read to the central processing unit CPU.

図18には、この発明に係るキャッシュメモリの一実施例のブロック図が示されている。上記キャッシュタグは、デコーダ、アドレスアレイ及びコンパレータから構成される。アドレスアレイは、4ウェイに対応して4つからなり、A9−A4のアドレスが入力されて、64通りのエントリの1つが選ばれる。各エントリは、アドレスタグに対応した19ビットとアドレス信号と、1ビットのバッリドビットを記憶するようにされる。それ故、1つのウェイに対応したアドレスアレイは、(19+1)×64のようにされる。4つのウェイに対応して6×64のLRU情報の記憶部が共通に設けられる。   FIG. 18 is a block diagram showing one embodiment of the cache memory according to the present invention. The cache tag includes a decoder, an address array, and a comparator. The address array is composed of four corresponding to the four ways, and the address A9-A4 is inputted, and one of 64 entries is selected. Each entry stores 19 bits corresponding to the address tag, an address signal, and one valid bit. Therefore, the address array corresponding to one way is (19 + 1) × 64. A 6 × 64 LRU information storage unit is commonly provided corresponding to the four ways.

パルスφ1によりアドレス信号を保持するラッチ回路は、中央処理装置CPUがパイプライン動作によりアドレス信号を出力するので、ミスヒットしたときのアドレスを記憶しておくために利用される。アドレスアレイから読み出されたアドレスタグと、アドレス入力の対応する19ビットのアドレス信号A28−A10は、コンパレータに入力される。   The latch circuit that holds the address signal by the pulse φ1 is used for storing an address when a miss-hit occurs because the central processing unit CPU outputs the address signal by a pipeline operation. The address tag read from the address array and the 19-bit address signal A28-A10 corresponding to the address input are input to the comparator.

4つのウェイに対応して設けられた4つのコンパレータのヒット信号は、キャッシュコントローラに供給される。また、上記64のエントリのうち選択されたものに対応したLRU情報は、キャッシュコントローラに供給される。もしも、4つのウェイからヒット信号が出力されないときのリプレースに使用される1つのウェイが上記LRU情報により決められる。上記アドレスアレイから読み出されたアドレスタグは、セレクタにより診断用データとして出力される。   The hit signals of the four comparators provided corresponding to the four ways are supplied to the cache controller. The LRU information corresponding to the selected entry among the 64 entries is supplied to the cache controller. If a hit signal is not output from the four ways, one way used for replacement is determined by the LRU information. The address tag read from the address array is output as diagnostic data by the selector.

上記アドレス入力のうちのアドレス信号A9−A3からなる7ビットのアドレス信号は、データアレイのデコーダに入力される。データアレイは、32ビット×2×128からなる。アドレス信号A9−A4が前記64エントリに対応しており、アドレス信号A3は、1ライン(32×4)中の上位32×2ビットのデータ又は下位の32×2ビットのデータを選択するようにされる。このようにデータアレイの構成を縦長にすることにより、後述するような相補データ線の数を減らして32ビットからなる単位のデータの出力を簡単にする。   A 7-bit address signal consisting of the address signals A9 to A3 among the address inputs is input to the decoder of the data array. The data array consists of 32 bits × 2 × 128. Address signal A9-A4 corresponds to the 64 entries, and address signal A3 selects upper 32 × 2 bit data or lower 32 × 2 bit data in one line (32 × 4). Is done. Thus, by making the configuration of the data array vertically long, the number of complementary data lines as will be described later is reduced, and the output of data in units of 32 bits is simplified.

この実施例では、特に制限されないが、キャッシュコントローラからヒット信号が上記データアレイのデコーダに入力される。これにより、デコーダにおいて4つのウェイの中のヒット信号に対応したウェイに対してのみワード線の選択動作を行うようにして低消費電力化を図るものである。さらに、上記ヒット信号に対応したデータアレイのセンスアンプのみを動作させる。センスアンプにおける消費電流が比較的大きいから、上記ヒット信号をセンスアンプの制御にのみ使用してもよい。すなわち、データアレイのデコーダは、高速読み出しのために4つのウェイのワード線を選択状態にして、メモリセルからの読み出し動作を先行させ、ヒット信号を待ってセンスアンプを動作させるようにして、データアレイからの読み出しを高速にするものであってもよい。上記ヒット信号に対応したウェイから読み出された32×2ビットのデータは、キャッシュコントローラを通して出力されたアドレス信号A2により選択されるセレクタを通して32ビットのデータが出力される。   In this embodiment, although not particularly limited, a hit signal is input from the cache controller to the decoder of the data array. As a result, the power consumption can be reduced by selecting the word line only for the way corresponding to the hit signal in the four ways in the decoder. Further, only the sense amplifier of the data array corresponding to the hit signal is operated. Since the current consumption in the sense amplifier is relatively large, the hit signal may be used only for controlling the sense amplifier. That is, the decoder of the data array sets the word lines of the four ways for high-speed reading, precedes the read operation from the memory cell, waits for the hit signal, and operates the sense amplifier. Reading from the array may be performed at high speed. The 32 × 2 bit data read from the way corresponding to the hit signal is output as 32 bit data through a selector selected by the address signal A2 output through the cache controller.

上記アドレスタグのコンパレータは、タイミング信号φ1により動作し、これに対してデータアレイの出力セレクタは、上記タイミング信号φに対して半サイクル遅れたタイミング信号φ2により動作するようにされる。それ故、上記ヒット信号よるデータアレイのワード線選択やセンスアンプの制御を行うようにしても問題ない。出力部に設けられたアライナは、出力データ幅に対応して8ビット、16ビットの単位でデータを出力するときに使用される。   The comparator of the address tag is operated by the timing signal φ1, while the output selector of the data array is operated by the timing signal φ2 delayed by a half cycle with respect to the timing signal φ. Therefore, there is no problem even if the data array word line is selected or the sense amplifier is controlled by the hit signal. The aligner provided in the output unit is used when outputting data in units of 8 bits and 16 bits corresponding to the output data width.

上記4ウェイのうち、ウェイ0と1を内蔵RAMとして使用することができる。このモードでは、ウェイ0と1に対応したアドレスタグのヒット信号が無効にされる。このモードでのウェイ0と1のアクセスは、データアレイの強制リード・ライト機能により行われる。すなわち、強制リード・ライト機能では、キャッシュコントローラによって、ヒット信号に変わる選択信号によりウェイを選択し、データのリード・ライトを行うようにするものである。   Of the four ways, ways 0 and 1 can be used as the built-in RAM. In this mode, hit signals of address tags corresponding to ways 0 and 1 are invalidated. Access to ways 0 and 1 in this mode is performed by the forced read / write function of the data array. That is, in the forced read / write function, the cache controller selects a way by a selection signal that changes to a hit signal, and reads / writes data.

上記のように2つのウェイ1と2を内蔵RAMとして使用したときには、6ビットからなるLRU情報の書き込みは、4ウェイと同じようにするが、リプレースウェイの選択は、そのうちの最下位1ビットのみを参照して、0ならばウェイ3を選択し、1ならばウェイ2を選択する。このように2ウェイモードと4ウェイモードとで、LRU情報の特定ビットを共通にすることにより、リプレースアルゴリズムの簡素化を図ることができる。   When the two ways 1 and 2 are used as the internal RAM as described above, the 6-bit LRU information is written in the same way as the 4-way, but the replacement way is selected only for the lowest 1 bit. Referring to FIG. 4, if it is 0, way 3 is selected, and if it is 1, way 2 is selected. Thus, the replacement algorithm can be simplified by sharing the specific bit of the LRU information in the 2-way mode and the 4-way mode.

図19には、データアレイの一実施例の回路図が示されている。同図には、2対の相補データ線、2本のワード線とそれらの交点に設けられる4つのメモリセル及びその出力選択とセンスアンプが代表として例示的に示されている。同図において、Pチャンネル型MOSFETは、そのチャンネル部分に矢印が付加されることによって、Nチャンネル型MOSFETと区別される。   FIG. 19 shows a circuit diagram of an embodiment of the data array. In the figure, two pairs of complementary data lines, two word lines, four memory cells provided at the intersection thereof, output selection thereof, and a sense amplifier are exemplarily shown as representatives. In the figure, a P-channel MOSFET is distinguished from an N-channel MOSFET by adding an arrow to the channel portion.

代表として例示的に素子に回路記号が付されているように、Pチャンネル型MOSFETQ1,Q2とNチャンネル型MOSFETQ3,Q4からなる2つのCMOSインバータ回路の入力と出力とが互いに交差接続されてラッチ回路とされる。上記ラッチ回路の一対の入出力ノードと相補データ線DL0,/DL0との間には、Nチャンネル型の伝送ゲートMOSFETQ5,Q6が設けられる。これらの伝送ゲートMOSFETQ5,Q6のゲートは、ワード線W0に接続される。他のメモリセルも前記同様なCMOSスタティック型メモリセルにより構成される。   As representatively, as an example, a circuit symbol is attached to the element, the input and output of the two CMOS inverter circuits composed of the P-channel MOSFETs Q1 and Q2 and the N-channel MOSFETs Q3 and Q4 are cross-connected to each other to latch the circuit. It is said. N-channel transmission gate MOSFETs Q5 and Q6 are provided between the pair of input / output nodes of the latch circuit and the complementary data lines DL0 and / DL0. The gates of these transmission gate MOSFETs Q5 and Q6 are connected to the word line W0. Other memory cells are also constituted by the same CMOS static memory cells as described above.

相補データ線DL0,/DL0には、Nチャンネル型のプリチャージMOSFETQ7,Q8が設けられる。これらのMOSFETQ7,Q8のゲートにはプリチャージ信号PCが供給される。また、相補データ線DL0,/DL0の間には、イコライズ用のCMOSスイッチが設けられる。CMOSスイッチは、並列形態に接続されたNチャンネル型MOSFETQ9とPチャンネル型MOSFETQ10からなり、Nチャンネル型MOSFETQ9のゲートにはデータ線イコライズ信号DEQが供給され、Pチャンネル型MOSFETQ10のゲートには上記信号DEQがインバータ回路N1により反転されて供給される。上記イコライズMOSFETは、Nチャンネル型MOSFET又はPチャンネル型MOSFETのみから構成してもよい。   The complementary data lines DL0, / DL0 are provided with N-channel type precharge MOSFETs Q7, Q8. A precharge signal PC is supplied to the gates of these MOSFETs Q7 and Q8. An equalizing CMOS switch is provided between the complementary data lines DL0 and / DL0. The CMOS switch includes an N-channel MOSFET Q9 and a P-channel MOSFET Q10 connected in parallel. A data line equalize signal DEQ is supplied to the gate of the N-channel MOSFET Q9, and the signal DEQ is supplied to the gate of the P-channel MOSFET Q10. Is inverted and supplied by the inverter circuit N1. The equalize MOSFET may be composed of only an N channel type MOSFET or a P channel type MOSFET.

上記2対の相補データ線DL0,/DL0とDL1,/DL1は、CMOSスイッチを通して1つのセンスアンプに接続される。すなわち、データ線DL0は並列形態に接続されたNチャンネル型MOSFETQ11とPチャンネル型MOSFETQ13を介し、データ線DL1は同様に並列形態に接続されたNチャンネル型MOSFETQ16とPチャンネル型MOSFETQ18を介してそれぞれ共通データ線CDL0に接続される。データ線/DL0は並列形態に接続されたNチャンネル型MOSFETQ12とPチャンネル型MOSFETQ14を介し、データ線/DL1は同様に並列形態に接続されたNチャンネル型MOSFETQ17とPチャンネル型MOSFETQ19を介してそれぞれ共通データ線/CDL0に接続される。これらのCMOSスイッチには、選択信号SELが交差的に供給されることにより、相補データ線DL0,/DL0又はDL1,/DL1のいずれか一方が選択される。上記信号SELは、例えば前記アドレス信号A2により形成される。   The two pairs of complementary data lines DL0, / DL0 and DL1, / DL1 are connected to one sense amplifier through a CMOS switch. That is, the data line DL0 is common through the N-channel MOSFET Q11 and the P-channel MOSFET Q13 connected in parallel, and the data line DL1 is also common through the N-channel MOSFET Q16 and the P-channel MOSFET Q18 connected in parallel. Connected to data line CDL0. The data line / DL0 is common via an N-channel MOSFET Q12 and a P-channel MOSFET Q14 connected in parallel, and the data line / DL1 is similarly shared via an N-channel MOSFET Q17 and a P-channel MOSFET Q19 connected in parallel. Connected to data line / CDL0. These CMOS switches are supplied with a selection signal SEL in an intersecting manner, whereby either one of the complementary data lines DL0, / DL0 or DL1, / DL1 is selected. The signal SEL is formed by the address signal A2, for example.

共通データ線CDL0,/CDL0には、CMOSラッチ回路からなるセンスアンプの入力に接続される。センスアンプは、Pチャンネル型MOSFETQ22とQ23とNチャンネル型MOSFETQ24とQ25からなる2つのCMOSインバータ回路の入力と出力とが交差接続されてラッチ回路にされる。そして、上記Pチャンネル型MOSFETQ22とQ23のソースには、Pチャンネル型のスイッチMOSFETQ26を介して動作電圧VCCが与えられ、上記Nチャンネル型MOSFETQ24とQ25のソースには、Nチャンネル型のスイッチMOSFETQ27を介して回路の接地電位が与えられる。上記Pチャンネル型MOSFETQ26のゲートには、センスアンプ動作信号/SACが供給され、Nチャンネル型MOSFETQ27のゲートには、センスアンプ動作信号SACが供給される。   The common data lines CDL0, / CDL0 are connected to the input of a sense amplifier composed of a CMOS latch circuit. The sense amplifier is formed into a latch circuit by cross-connecting the inputs and outputs of two CMOS inverter circuits composed of P-channel MOSFETs Q22 and Q23 and N-channel MOSFETs Q24 and Q25. An operating voltage VCC is applied to the sources of the P-channel MOSFETs Q22 and Q23 via a P-channel switch MOSFET Q26, and the sources of the N-channel MOSFETs Q24 and Q25 are connected to an N-channel switch MOSFET Q27. Circuit ground potential. A sense amplifier operation signal / SAC is supplied to the gate of the P-channel MOSFET Q26, and a sense amplifier operation signal SAC is supplied to the gate of the N-channel MOSFET Q27.

上記センスアンプの入力である共通データ線CDL0,/CDL0には、イコライズ用のNチャンネル型MOSFETQ20とPチャンネル型MOSFETQ21が並列形態に設けられる。上記Nチャンネル型MOSFETQ20のゲートには、センスアンプイコライズ信号SEQが供給され、Pチャンネル型MOSFETQ21のゲートには、上記信号SEQがインバータ回路N3により反転されて供給される。この実施例のセンスアンプは、高感度で正帰還ループを持つラッチ回路により構成されているので、上記信号/SACとSACにより動作開始前に上記イコライズMOSFETQ20とQ21により入力レベルを一致させておいて、共通データ線CDL0と/CDL0の電位差が選択されたメモリセルからの記憶情報に従った所定電位を持つようにされると、上記信号信号/SACとSACによりそれを増幅して共通データ線CDL0と/CDL0をハイレベル/ロウレベルに増幅する。これらの信号は、図示しない読み出し経路を通して出力される。なお、上記イコイズ用MOSFETは、Nチャンネル型MOSFET又はPチャンネル型MOSFETのみにより構成してもよい。   An equalizing N-channel MOSFET Q20 and a P-channel MOSFET Q21 are provided in parallel on the common data lines CDL0 and / CDL0 which are the inputs of the sense amplifier. A sense amplifier equalize signal SEQ is supplied to the gate of the N-channel MOSFET Q20, and the signal SEQ is inverted and supplied by the inverter circuit N3 to the gate of the P-channel MOSFET Q21. Since the sense amplifier of this embodiment is constituted by a latch circuit having a high sensitivity and a positive feedback loop, the input levels are matched by the equalize MOSFETs Q20 and Q21 before the operation is started by the signals / SAC and SAC. When the potential difference between the common data lines CDL0 and / CDL0 has a predetermined potential according to the stored information from the selected memory cell, it is amplified by the signal signals / SAC and SAC, and the common data line CDL0 is amplified. And / CDL0 is amplified to high level / low level. These signals are output through a read path (not shown). The equalizing MOSFET may be composed of only an N channel type MOSFET or a P channel type MOSFET.

上記のようなCMOSラッチ形態のセンスアンプを用いた場合には、上記増幅動作によって共通データ線CDL0と/CDL0の電位がハイレベル/ロウレベルになると、CMOSラッチ回路において定常的な直流電流が流れなくなるので、低消費電力化を図ることができる。そして、前記のようにヒット信号により上記センスアンプ動作信号SACと/SACを発生させるようにすれば、4つのウェイのうち1つのウェイに対応したセンスアンプのみが動作することとなって、消費電流をほぼ1/4のように大幅に低減できる。   When the CMOS latch type sense amplifier as described above is used, when the potentials of the common data lines CDL0 and / CDL0 become high level / low level by the amplification operation, a steady DC current does not flow in the CMOS latch circuit. Therefore, low power consumption can be achieved. If the sense amplifier operation signals SAC and / SAC are generated by the hit signal as described above, only the sense amplifier corresponding to one of the four ways operates, and the current consumption Can be greatly reduced to about 1/4.

上記共通データ線CDL0と/CDL0は、書き込み選択信号WSによりスイッチ制御されるNチャンネル型MOSFETQ28とQ29を介してライトアンプに接続される。ライトアンプは、インバータ回路N4〜N7からなり、入力データD0を受けるCMOSインバータ回路N4の出力信号が駆動用インバータ回路N7と、反転インバータ回路N5及び駆動インバータ回路N6を通して相補の書き込み信号とされる。この相補の書き込み信号は、上記スイッチMOSFETQ28とQ29を通して共通データ線CDL0,/CDL0に伝えられる。   The common data lines CDL0 and / CDL0 are connected to a write amplifier via N-channel MOSFETs Q28 and Q29 that are switch-controlled by a write selection signal WS. The write amplifier is composed of inverter circuits N4 to N7, and an output signal of the CMOS inverter circuit N4 receiving the input data D0 is made a complementary write signal through the driving inverter circuit N7, the inverting inverter circuit N5, and the driving inverter circuit N6. This complementary write signal is transmitted to the common data lines CDL0 and / CDL0 through the switch MOSFETs Q28 and Q29.

以上のように1つのウェイのデータアレイは、上記のような2対の相補データ線に対して1つのセンスアンプ、1つのライトアンブが32組設けられる。これにより、メモリアレイ部では、32×2の相補データ線と128本のワード線により構成され、32ビットのデータの入出力が行われる。   As described above, the data array of one way is provided with 32 sets of one sense amplifier and one write amp for the two pairs of complementary data lines as described above. As a result, the memory array section is composed of 32 × 2 complementary data lines and 128 word lines, and 32-bit data is input / output.

図21には、この発明に係るシングルチップマイクロコンピュータに内蔵される上記直接メモリアクセス制御装置DMACの一実施例のブロック図が示されている。この実施例では、CH0とCH1の2つのチャンネルを持つようにされる。上記チャンネルCH0とCH1に対応して、それぞれ2つの回路ブロックが設けられる。各回路ブロックの記号に付された数字0と1は、上記チャンネルCH0とCH1に対応した回路である。   FIG. 21 is a block diagram showing one embodiment of the direct memory access control device DMAC incorporated in the single chip microcomputer according to the present invention. In this embodiment, two channels, CH0 and CH1, are provided. Two circuit blocks are provided corresponding to the channels CH0 and CH1, respectively. Numbers 0 and 1 attached to the symbols of the circuit blocks are circuits corresponding to the channels CH0 and CH1.

上記のような2つのチャンネルCH0とCH1に対応して設けられる回路は、以下の通りである。SAR0,1は、ソース・アドレス・レジスタである。これらのSAR0と1は、それぞれが32ビットからなり、DMA転送元のスタート・アドレスが設定される。これらのSAR0,1は、動作中若しくは転送終了後に別途設定されたアドレス計算条件に従って、常に次の転送アドレス値を保持するようにされる。   The circuits provided corresponding to the two channels CH0 and CH1 as described above are as follows. SAR0,1 are source address registers. Each of these SAR0 and 1 consists of 32 bits, and the start address of the DMA transfer source is set. These SARs 0 and 1 always hold the next transfer address value in accordance with an address calculation condition set separately during operation or after the end of transfer.

DAR0,1は、デステイネーション・アドレス・レジスタであり、これらのDAR0,1は、それぞれが32ビットからなり、DMA転送先のスタート・アドレスが設定される。これらのDAR0,1は、動作中若しくは転送終了後に別途設定されたアドレス計算条件に従って、常に次の転送アドレス値を保持するようにされる。   DARs 0 and 1 are destination address registers. Each of these DARs 0 and 1 is made up of 32 bits, and a DMA transfer destination start address is set. These DARs 0 and 1 always hold the next transfer address value in accordance with an address calculation condition set separately during operation or after completion of transfer.

TCR0,1は、トランスファー・カウント・レジスタであり、これらのTCR0,1は、それぞれが32ビットからなり、DMA転送回数が設定され、動作中若しくは転送終了後は、残りの転送回数を保持するようにされる。オールゼロ(all"0")設定時は、2の24乗回(最大転送回数)になる。VCR0,1及びVCR2,3は、チャンネルCH0と1に2本ずつが対応されたベクタレジスタである。各VCR0〜VCR3は、それぞれが8ビットから構成され、DMACの割り込みベクタアドレスが設定される。設定は中央処理装置CPUから行われ、割り込み発生時に中央処理装置CPUがベクタフェッチする。   TCR0,1 are transfer count registers, each of which is made up of 32 bits, and the DMA transfer count is set, and the remaining transfer count is held during operation or after the transfer is completed. To be. When all zeros (all "0") are set, it is 2 24 times (maximum transfer count). VCRs 0 and 1 and VCRs 2 and 3 are vector registers each corresponding to two channels CH0 and 1. Each of the VCR0 to VCR3 is composed of 8 bits, and an interrupt vector address of the DMAC is set. Setting is performed from the central processing unit CPU, and the central processing unit CPU performs vector fetch when an interrupt occurs.

上記チャンネルCH0とCH1共通の回路ブロックとしては、次のものがある。DMAORは、DMA・オペレーション・レジスタであり、CHCR0と1は、上記DMAORに対応して設けられたチャンネル・コントロール・レジスタである。AUは、アドレス演算器であり、DECはオールゼロ検出器付のデクリメンタである。そして、MDB0〜3は、128ビット転送用4段データバッファである。このデータバッファMDB0〜4により、キャッシュメモリの1ラインに対応したデータ転送が行われ、SDRAMに対してバーストリードによって4サイクル×32ビットのデータ転送が行われる。上記以外に、DMA要求/選択レジスタ0,1や転送シーケンス制御回路、ホストインターフェイス、及び優先権制御回路等が設けられる。   The following circuit blocks are common to the channels CH0 and CH1. DMAOR is a DMA operation register, and CHCR0 and CHCR0 are channel control registers provided corresponding to the DMAOR. AU is an address calculator, and DEC is a decrementer with an all-zero detector. MDB0 to MDB3 are 4-stage data buffers for 128-bit transfer. Data transfer corresponding to one line of the cache memory is performed by the data buffers MDB0 to MDB4, and data transfer of 4 cycles × 32 bits is performed to the SDRAM by burst read. In addition to the above, DMA request / select registers 0 and 1, a transfer sequence control circuit, a host interface, a priority control circuit, and the like are provided.

上記のようにキャッシュメモリの単位データ数、SDRAMのバーストリードによる読み出しデータ数及びDMACのデータバッファとの間で整合性を採ることにより、DMACによるSDRAMと他のメモリ又は周辺LSIとの間でのデータ転送を効率よく行うことができる。   As described above, the consistency between the number of unit data of the cache memory, the number of read data by the burst read of the SDRAM, and the data buffer of the DMAC makes it possible to connect between the SDRAM by the DMAC and another memory or peripheral LSI. Data transfer can be performed efficiently.

図22には、この発明に係るDMACとその周辺部の一実施例の概略ブロック図が示されている。この発明に係るシングルチップマイクロコンピュータの内部バスB2に接続される。このバスB2には、同図では省略されているが、前記のようなインターフェイスOBIFを介して外部バスB4に接続される外部メモリ等とキャッシュメモリや内部に設けられる周辺モジュールとの間でのデータ転送を行う。   FIG. 22 is a schematic block diagram showing one embodiment of the DMAC and its peripheral part according to the present invention. It is connected to the internal bus B2 of the single chip microcomputer according to the present invention. Although not shown in the figure, the data between the external memory connected to the external bus B4 via the interface OBIF and the cache memory and the peripheral modules provided in the bus B2 is omitted. Perform the transfer.

アドレスモードは、デュアルアドレスモードとシングルアドレスモードとがある。デュアルアドレスモードでは転送元と転送先のアクセスを2回のバスサイクルに分け、それぞれに対してアドレスを出力する。シングルアドレスモードでは、外部メモリに対してアドレッシングすると同時に外部I/Oデバイスを/DACK信号によりアクセスし、DMA転送を1バスサイクル間で行う。   The address mode includes a dual address mode and a single address mode. In the dual address mode, the access of the transfer source and the transfer destination is divided into two bus cycles, and an address is output for each of them. In the single address mode, the external memory is addressed and the external I / O device is accessed by the / DACK signal and DMA transfer is performed in one bus cycle.

バスモードには、サイクルスチールモードとバーストモードがある。サイクルスチールモードでは、1語のDMA転送終了後、バス権を解放し、他のバスマスタにバス権を渡す。バーストモードでは、バス権を獲得すると、転送終了条件が満たされるまで連続して転送を続ける。ただし、外部リクエストモードのときに、/DREQ端子をレベルでサンプリングする場合には、端子に応じて転送を行う。   The bus mode includes a cycle steal mode and a burst mode. In the cycle steal mode, the bus right is released after the completion of one word DMA transfer, and the bus right is transferred to another bus master. In the burst mode, when the bus right is acquired, the transfer continues continuously until the transfer end condition is satisfied. However, when the / DREQ terminal is sampled at a level in the external request mode, transfer is performed according to the terminal.

転送要求は、外部要求、内蔵周辺モジュールからの要求、オートリクエストがある。外部要求は、/DREQ0端子によりチャンネルCH0を、/DREQ1によりチャンネルCH1を起動することができる。/DEQ0,1端子のサンプリングは立ち下がりエッジとレベルとを選択することができる。内蔵周辺モジュールからの要求には、内蔵SCI0の受信データフルと、内蔵SCIの送信データ線エンプティとがある。これらの要求は、DMA転送サイクルを起動することにより、自動的にクリアされる。オートリクエストは、DMACのチャンネルコントロールレジスタCHCRn(0,1)のDEビットをセットすることにより転送動作を開始するものである。   Transfer requests include external requests, requests from built-in peripheral modules, and auto requests. An external request can activate channel CH0 with the / DREQ0 terminal and channel CH1 with / DREQ1. The sampling of the / DEQ0,1 terminal can select the falling edge and the level. The request from the built-in peripheral module includes the built-in SCI0 reception data full and the built-in SCI transmission data line empty. These requests are automatically cleared by initiating a DMA transfer cycle. The auto request starts a transfer operation by setting the DE bit of the channel control register CHCRn (0, 1) of the DMAC.

DMACに同時に複数のチャンネルの転送要求がある場合、優先順位に従って転送チャンネルが決定される。優先順位には、優先順位固定モード、交代モードがある。優先順位固定モードでは、各チャンネル間の優先順位は変化しない。1又は0の2通りのチャンネルを固定的に優先順位にすることができる。交代モードでは、チャンネルCH0とCH1のチャンネル間で優先順位を交代するモードであり、優先順位を変更するタイミングは、ラウンドロビン方式でチャンネルCH0又はチャンネルCH1の転送が1転送単位(バイトあるいはワード)終了したときとされる。   When the DMAC has a transfer request for a plurality of channels simultaneously, the transfer channel is determined according to the priority order. The priority includes a fixed priority mode and a change mode. In the priority order fixed mode, the priority order between the channels does not change. Two channels, 1 or 0, can be fixedly prioritized. In the alternate mode, the priority order is changed between the channels CH0 and CH1, and the timing of changing the priority order is the end of one transfer unit (byte or word) in the transfer of the channel CH0 or the channel CH1 in the round robin method. It is said that when you did.

図23には、除算器DIVUの一実施例のブロック図が示されている。この実施例の除算器DIVUは、符号付64ビット÷32ビット又は32ビット÷32ビットの除算を行い、32ビットの商と32ビットの余りを求めることができる。演算でオーバーフロー又はアンダフローが発生したときには、指定により中央処理装置CPUに対して割り込みを発生させることができる。   FIG. 23 shows a block diagram of an embodiment of the divider DIVU. The divider DIVU of this embodiment can perform a signed 64-bit / 32-bit or 32-bit / 32-bit division to obtain a 32-bit quotient and a 32-bit remainder. When an overflow or underflow occurs in the operation, an interrupt can be generated for the central processing unit CPU as specified.

同図において、JRは除数レジスタであり、HRL32は32ビット用被除数レジスタLであり、HRHは被乗数レジスタH、HRLは被除数レジスタLであり、2つ合わせて64ビットの被乗数を入力することがきる。BARは余りレジスタ、BSRは商レジスタである。CONTはコントロールレジスタであり、VCTは割り込みベクタレジスタである。この実施例の乗算器DIVUは、中央処理装置CPUから上記被除数と除数が設定されると、除算を開始しておよそ37サイクルにBSRに商を、BARに余りをセットして自動的に演算を終了する。もしも、オーバーフロー又はアンダフローが生じると、指定により内部割り込み信号が発生される。   In the figure, JR is a divisor register, HRL 32 is a 32-bit dividend register L, HRH is a multiplicand register H, and HRL is a dividend register L, and a 64-bit multiplicand can be input together. . BAR is a remainder register and BSR is a quotient register. CONT is a control register, and VCT is an interrupt vector register. When the dividend and divisor are set from the central processing unit CPU, the multiplier DIVU of this embodiment starts division and automatically calculates the quotient in BSR and the remainder in BAR in approximately 37 cycles. finish. If an overflow or underflow occurs, an internal interrupt signal is generated as specified.

上記乗算器DIVUは、内部バスB2から切り離された状態で約38サイクルにわたって除算を行うものである。それ故、中央処理装置CPU等は、内部バスを使用したデータ処理等を並行して行うことができる。   The multiplier DIVU performs division for about 38 cycles while being disconnected from the internal bus B2. Therefore, the central processing unit CPU or the like can perform data processing using the internal bus in parallel.

図24には、3次元物体を2次元からなる表示画面上に遠近法により表示するための3次元画像処理の概念を説明するための説明図が示されている。同図には、古代ギリシャ風の神殿を2次元画面上に表示させる例が示されている。   FIG. 24 is an explanatory diagram for explaining the concept of 3D image processing for displaying a 3D object on a 2D display screen by perspective. The figure shows an example of displaying an ancient Greek-style temple on a two-dimensional screen.

神殿を特定する点p1,p2等は、神殿の持つ原点に対してx1,y1及びz1やx2,y2,z2の座標を持っている。最初に行われるデータ処理は、上記各神殿を特定する点p1,p2等の固有の座標を、それを見る視点Pを原点とする新たな方向X’,Y’及びZ’軸に対応した座標に変化する。これが座標変換処理である。つまり、神殿をどの位置でどの角度から見るのかに対応して神殿を特定する各点の座標が相対的座標に置き換えられる。   Points p1, p2, etc. that specify the temple have coordinates of x1, y1 and z1, x2, y2, z2 with respect to the origin of the temple. First, the data processing is performed by using the coordinates corresponding to the new directions X ′, Y ′, and Z ′ axes with the unique coordinates of the points p1, p2, etc. specifying each temple as the origin. To change. This is the coordinate conversion process. In other words, the coordinates of each point that identifies the temple are replaced with relative coordinates corresponding to the position at which the temple is viewed from which angle.

(式1)
┌─T00 T01 T02 T03 ─┐
│ T10 T11 T12 T13 │
[x1',y1',z1',1]=[x1,y1,z1,1]│ │
│ T20 T21 T22 T23 │
└─T30 T31 T32 T33 ─┘
(Formula 1)
┌─T00 T01 T02 T03 ─┐
│ T10 T11 T12 T13 │
[x1 ', y1', z1 ', 1] = [x1, y1, z1,1] │ │
│ T20 T21 T22 T23 │
└─T30 T31 T32 T33 ─┘

上記式1において、 x1',y1',z1'は、神殿の点p1の変換された座標であり、x1,y1,z1は、神殿の持つ固有の原点に対応した座標である。上記式1の行列式から、x1'=x1・T00 +y1・T10 +z1・T20 + 1・T30 のような積和演算により求めることができる。同様に、y1'=x1・T01 +y1・T11 +z1・T21 + 1・T31 のよう求められ、z1'=x1・T02 +y1・T12 +z1・T22 + 1・T32 のように求められる。   In the above formula 1, x1 ′, y1 ′, z1 ′ are the transformed coordinates of the temple point p1, and x1, y1, z1 are the coordinates corresponding to the unique origin of the temple. From the determinant of the above equation 1, it can be obtained by a product-sum operation such as x1 ′ = x1 · T00 + y1 · T10 + z1 · T20 + 1 · T30. Similarly, y1 ′ = x1 · T01 + y1 · T11 + z1 · T21 + 1 · T31 is obtained, and z1 ′ = x1 · T02 + y1 · T12 + z1 · T22 + 1 · T32 is obtained.

上記のように座標変換点p1はp1’のように座標変換された後に、点Pと上記各座標p1’を結ぶ直線と表示画面Sと交わる交点の座標座標x1”,y1”が表示画面S上の点とされる。このため、座標x1”,y1”は、原点Pに対する2次元画面Sと上記神殿の相対座標p1’との距離の割合により求められる。それ故、表示画面上の座標を求めるという遠近処理は、除算処理により行われることとなる。   As described above, the coordinate transformation point p1 is transformed as p1 ′, and then the coordinate coordinates x1 ″ and y1 ″ of the intersection point where the straight line connecting the point P and each coordinate p1 ′ intersects the display screen S are displayed on the display screen S. The top point. For this reason, the coordinates x1 ″ and y1 ″ are obtained from the ratio of the distance between the two-dimensional screen S with respect to the origin P and the relative coordinates p1 ′ of the temple. Therefore, the perspective processing for obtaining the coordinates on the display screen is performed by division processing.

上記のようにして求められた各2次元画面上の座標は、画面S内にあるかその外にあるかの判定が行われ、2つの点が画面S内にあればそれを結ぶ直線となり、1つの点又は両方とも画面から外れたときには、画面Sを中心にして上下左右の4画面、斜め上下の4画面のいずれかに点が存在するかにより、画面Sを通過する線となるのか否かの判定が行われて、画面からはずれた点に対応した直線が引かれる。このような処理はクリップ(クリッピング)処理と呼ばれる。クリッピングでは、上記画面Sを中心とした上下左右、斜め上下の合計8画に点が存在するか否かの処理であるで、除算により求められた点x1”,y1”等と上記面を区切るXとYの境界アドレスと大小比較を繰り返すことにより実行される。   The coordinates on each two-dimensional screen obtained as described above are determined whether the coordinates are inside or outside the screen S, and if two points are inside the screen S, they become a straight line connecting them, When one point or both are off the screen, whether or not the line passes through the screen S depending on whether there are points on the upper, lower, left, and right four screens or the diagonally upper and lower four screens centering on the screen S A straight line corresponding to the point deviating from the screen is drawn. Such a process is called a clipping process. Clipping is a process for determining whether or not there are points in a total of eight screens in the vertical and horizontal directions and diagonally up and down with the screen S as the center. The plane is separated from the points x1 ″, y1 ″ and the like obtained by division. This is executed by repeating the comparison between the X and Y boundary addresses.

ディジタル回路により行われる除算は、引算の繰り返しにより実施される。それ故、除算動作時間は必然的に長くなってしまう。すなわち、前記変換処理、遠近処理及びクリップ処理を従来のように順次に行うようにすると、1秒間に60枚からなる動画を描こうとすると、従来のマイクロコンピュータでは精々アニメーション程度の動画しか描くことができない。立体的な映像を描く場合には、曲面を三角形の組み合わせにより表現するととなり、上記1/60秒間に描くことができる三角形の数に比例して表現できる映像信号の緻密度が決まることとなる。28.7MHzのような高い周波数のクロックで動作する、従来の高速なマイクロコンピュータにおいては、上記クリッピング処理を省略した場合、1/60に描くことのできる三角形の数は500〜900程度である。上記三角形の数が500程度でアニメーション程度の平面的な動画を描くことができるとされている。   The division performed by the digital circuit is performed by repeating the subtraction. Therefore, the division operation time is inevitably long. That is, if the conversion process, the perspective process, and the clip process are sequentially performed as in the conventional case, when a moving image consisting of 60 images per second is drawn, only a moving image that is about an animation can be drawn with a conventional microcomputer. Can not. When drawing a stereoscopic image, the curved surface is expressed by a combination of triangles, and the density of the video signal that can be expressed in proportion to the number of triangles that can be drawn in 1/60 second is determined. In a conventional high-speed microcomputer that operates with a high-frequency clock such as 28.7 MHz, when the clipping process is omitted, the number of triangles that can be drawn at 1/60 is about 500 to 900. It is said that the number of triangles is about 500, and a planar moving image about animation can be drawn.

図25には、この発明に係るシングルチップマイクロコンピュータを用いた3次元画像処理方法を説明するための信号処理図が示されている。同図では、3次元画像処理を座標変換処理、遠近処理、及びクリップ処理に分け、それを処理する各回路ブロックとの関係を時系列的に示している。   FIG. 25 is a signal processing diagram for explaining the three-dimensional image processing method using the single chip microcomputer according to the present invention. In the figure, the three-dimensional image processing is divided into coordinate conversion processing, perspective processing, and clip processing, and the relationship with each circuit block that processes them is shown in time series.

この実施例では、上記画像処理において最も時間を費やすことととなる遠近処理と、座標変換処理及びクリップ処理とを並列的に行うようにするものである。ただし、処理の順序としては、前記のように1つの点に着目すると、並列的な処理が行われ無いので、クリップ処理を次のように1つ遅らせて行うようにするものである。   In this embodiment, the perspective processing that takes the most time in the image processing, the coordinate conversion processing, and the clipping processing are performed in parallel. However, as for the order of processing, focusing on one point as described above, since parallel processing is not performed, the clip processing is performed with a delay of one as follows.

中央処理装置CPUと乗算器MULTは、積和演算コマンドにより座標変換処理を行う。中央処理装置CPUが積和コマンドを取り込み、デコードするとそれが乗算器MULTに伝えられ演算を実行して乗算器MULTのレジスタには、前のデータに乗算されたデータが加算されて保持される。これにより、前記座標変換のための行列式の積和演算処理が行われる。上記中央処理装置CPUと乗算器MULTによりn番目の点について座標変換を行っている間、除算器DIVUにおいては、1つ前に処理された座標n−1の遠近処理を同時に並行して行うようにされる。   The central processing unit CPU and the multiplier MULT perform coordinate conversion processing using a product-sum operation command. When the central processing unit CPU fetches and decodes the product-sum command, it is transmitted to the multiplier MULT to execute the operation, and the data multiplied by the previous data is added and held in the register of the multiplier MULT. Thereby, a determinant product-sum operation process for the coordinate conversion is performed. While the coordinate conversion is performed on the n-th point by the central processing unit CPU and the multiplier MULT, the divider DIVU performs the perspective processing of the previously processed coordinate n-1 in parallel at the same time. To be.

中央処理装置CPUは、n番目の座標変換処理が終わると、除算器DIVUをアクセスして、その結果を取り込むとともに、上記変換が終了したn番目の座標について遠近処理を指示する。これにより、除算器DIVUは、上記n番目の座標データを受け取って除算動作を開始する。除算器DIVUによるn番目の点に対する遠近処理と同時並行して、中央処理装置CPUは、上記遠近処理が終了したn−1番目の点について、クリップ処理を行う。このクリップ処理は、前記のようにデータの大小比較からなるものであるので、中央処理装置CPUに内蔵された比較機能によって前記のようなクリップ処理を行う。   When the n-th coordinate conversion process is completed, the central processing unit CPU accesses the divider DIVU, fetches the result, and instructs the perspective process for the n-th coordinate after the conversion. As a result, the divider DIVU receives the nth coordinate data and starts the division operation. In parallel with the perspective processing for the n-th point by the divider DIVU, the central processing unit CPU performs the clipping process for the (n−1) -th point for which the perspective processing has been completed. Since this clipping process consists of data size comparison as described above, the above clipping process is performed by the comparison function built in the central processing unit CPU.

このn−1番目の点についてクリップ処理が終わると、中央処理装置CPUと乗算器MULTとは、n+1番目の点について座標変換動作を行う。以下、同様な動作の繰り返しにより、中央処理装置CPUと乗算器MULTによる座標変換及び中央処理装置CPUによるクリップ処理に対して、除算器DIVUによる遠近処理とが同時並行して行うことができ、等価的に最も時間のかかる遠近処理を無くすことができる。この実施例のシングルチップマイクロコンピュータに設けられる除算器DIVUは、1回の除算に約38サイクルも費やすこととなる。これに対して、上記座標変換では、x,y,zの各点について、それぞれ4回の積和を行い、それぞれがパンプライン的に演算されるものである。また、クリップ処理は、8回の大小比較を行うものであるので、ほぼ上記除算処理と時間的に一致する。   When the clip process is finished for the (n-1) th point, the central processing unit CPU and the multiplier MULT perform a coordinate conversion operation for the (n + 1) th point. Hereinafter, by repeating the same operation, the coordinate processing by the central processing unit CPU and the multiplier MULT and the clipping processing by the central processing unit CPU can be performed simultaneously and in parallel with the perspective processing by the divider DIVU. The most time-consuming perspective processing can be eliminated. The divider DIVU provided in the single-chip microcomputer of this embodiment spends about 38 cycles for one division. On the other hand, in the coordinate transformation described above, the sum of products is performed four times for each point of x, y, and z, and each is calculated in a pumpline manner. Further, since the clip process is a comparison of the magnitudes of 8 times, it almost coincides with the above division process in terms of time.

この実施例では、固定小数点による積和演算を行う。これに対応して除算動作も固定小数点方式による除算を行うものである。このように固定小数点方式を採る場合には、精度の補償はない反面浮動小数点方式に必要な正規化処理が省略できるので、上記乗算や除算の速度を速くできる。精度に関しては、ソフトウェアにより手当てを行うようにすることができる。つまり、3次元画像処理における遠近処理以外には、マイクロコンピュータでの除算動作は必要ないといっても過言ではない。それ故、この実施例のシングルチップマイクロコンピュータでは、最も使用頻度の高い3次元画像処理を想定してシステムを構成するものである。   In this embodiment, a product-sum operation with a fixed point is performed. Corresponding to this, the division operation also performs division by the fixed point method. In this way, when the fixed-point method is adopted, there is no accuracy compensation, but the normalization processing necessary for the floating-point method can be omitted, so that the speed of multiplication and division can be increased. With regard to accuracy, treatment can be performed by software. That is, it is not an exaggeration to say that a division operation in the microcomputer is not necessary other than the perspective processing in the three-dimensional image processing. Therefore, in the single chip microcomputer of this embodiment, the system is configured on the assumption of the most frequently used three-dimensional image processing.

この実施例のシングルチップマイクロコンピュータを前記のような28.7MHzにより動作させ、しかも3次元画像処理を上記のように座標変換とクリップ処理に対して遠近処理をそれらと同時並行的に行う方式を採ることにより、1/60秒間に描くことのできる三角形の数は、約2400のように大幅に向上させることができる。この数値は、実写に近い動画を画面上に描くことができる能力を意味している。   A system in which the single chip microcomputer of this embodiment is operated at 28.7 MHz as described above, and three-dimensional image processing is performed in parallel with the coordinate conversion and clip processing as described above in parallel with them. By taking it, the number of triangles that can be drawn in 1/60 second can be greatly improved to about 2400. This value means the ability to draw a moving image close to a live action on the screen.

上記数値(約2400)には、前記同様にクリップ処理が無い場合を示している。この実施例の3次元演算処理方式では、クリップ処理を入れても座標変換処理に比べて遠因処理に時間を費やすこととなるので、その差分の時間にクリップ処理の大半を割り当てることができるからクリップ処理が無い場合に対して若干処理能力が低下するに止まる。これに対して、従来のように座標変換、遠近処理及びクリップ処理の順序に行うものでは、クリップ処理に要する時間だけ確実に処理することのできる三角形の数を減ってしまう。このため、この発明に係る3次元画像処理方式と従来のマイクロコンピュータを用いた3次元画像処理方法とをクリップ処理を含ませて比較すると、その処理能力差はいっそう拡大するものである。   The above numerical value (about 2400) shows the case where there is no clip processing as described above. In the three-dimensional arithmetic processing method of this embodiment, even if clip processing is included, time is spent on far-reaching processing as compared to coordinate conversion processing, so that most of the clipping processing can be assigned to the difference time. The processing capability is only slightly reduced compared to the case where there is no processing. On the other hand, in the conventional method in which the coordinate conversion, the perspective processing, and the clip processing are performed in the order, the number of triangles that can be reliably processed is reduced by the time required for the clip processing. For this reason, when the 3D image processing method according to the present invention is compared with the 3D image processing method using a conventional microcomputer including the clip processing, the difference in processing capability is further increased.

この発明に係る3次元画像処理方式では、前記図1のようなシングルチップマイクロコンピュータにおいて、除算器も乗算器と同じ第1バスに接続されていてもよい。また、バス構成は前記のようにバスを分割するものの他1つのバスにより構成するものであってもよい。あるいは、除算器を外部LSIとして設ける構成としてもよい。このように、上記のような3次元画像処理に用いられるマイクロコンピュータのシステムは、種々の実施形態を採ることができるものである。そして、乗算器や除算器は、浮動小数点方式のものであってもよい。   In the three-dimensional image processing system according to the present invention, in the single chip microcomputer as shown in FIG. 1, the divider may be connected to the same first bus as the multiplier. Further, the bus configuration may be configured by one bus other than the one that divides the bus as described above. Alternatively, the divider may be provided as an external LSI. Thus, the microcomputer system used for the above three-dimensional image processing can take various embodiments. The multiplier and divider may be of a floating point type.

この発明に係るシングルチップマイクロコンピュータを家庭用ゲーム機に使用するとき、グラフィックス処理の高度化などに伴いプログラムの容量が増大し、プログラム容量が数Mバイトに達することも予測される。アクセス頻度の高い命令やデータに限っても、内蔵したROM/RAMや内蔵キャッシュメモリでは容量が足りない。このため、外部メモリ・インターフェイスの速度が性能に大きく影響することになる。   When the single-chip microcomputer according to the present invention is used in a consumer game machine, it is predicted that the program capacity will increase with the advancement of graphics processing and the program capacity will reach several megabytes. Even for instructions and data that are frequently accessed, the built-in ROM / RAM and built-in cache memory do not have sufficient capacity. For this reason, the speed of the external memory interface greatly affects the performance.

そこで、この実施例にかかるシングルチップマイクロコンピュータでは、前記のように、シンクロナスDRAMと容量4Kバイトの4ウエイ・セット・アソシアティブ方式のキャッシュとを組み合わせて平均アクセス時間の短縮を図るようにするものである。そして、内蔵キャッシュメモリは、前述のようにRAMとして機能させることも可能である。   Therefore, in the single chip microcomputer according to this embodiment, as described above, the average access time is shortened by combining the synchronous DRAM and the 4-way set associative cache having a capacity of 4 Kbytes. It is. The built-in cache memory can also function as a RAM as described above.

4ウエイ・セット・アソシアティブとは、あるアドレスのデータに対してキャッシュメモリ内に格納可能なエントリが4カ所存在するキャッシュ・マッピング方式である。直接マッピングはアドレスに対して格納するエントリが一意に決定される。フルアソシアティブは全てのエントリが格納可能となる。そして、セット・アソシアティブはウエイの数だけ格納可能なエントリが存在する。直接マッピング、セット・アソシアティブ、フルアソシアティブとなるに従いキャッシュメモリの置き換えによって、近い将来アクセスされる確率の高いエントリがキャッシュから追い出される確率は低くなる。フルアソシアティブ・キャッシュのアドレス・アレイは連想メモリを用いなければならないのに対し、直接マッピングおよびセット・アソシアティブのアドレス・アレイは、普通のメモリと比較回路の組み合わせで実現できる。   The 4-way set associative is a cache mapping method in which there are four entries that can be stored in the cache memory for data at a certain address. In direct mapping, an entry to be stored for an address is uniquely determined. A full associative can store all entries. In the set associative, there are entries that can be stored in the number of ways. As the direct mapping, set associative, and full associative become, the replacement of the cache memory reduces the probability that an entry with a high probability of being accessed in the near future is evicted from the cache. A fully associative cache address array must use an associative memory, whereas a direct mapping and set associative address array can be implemented with a combination of normal memory and comparison circuitry.

家庭用ゲーム機や携帯型情報通信機器は、パーソナルコンピュータやワークステーションに比べて製品単価が安い。このため、家庭用ゲーム機等に用いられるシングルチップマイクロコンピュータでは、チップそのものの価格はもとより、外付けする周辺回路も安価で済むようにする必要がある。低コストで平均アクセス時間(CPUが所望のデータを得るまでの平均時間)を短縮するために、前記のようにキャッシュメモリが内蔵される。   Consumer game machines and portable information communication devices are cheaper in product unit price than personal computers and workstations. For this reason, in a single-chip microcomputer used for a home game machine or the like, not only the price of the chip itself but also the peripheral circuits to be externally attached need to be inexpensive. In order to reduce the average access time (average time until the CPU obtains desired data) at low cost, the cache memory is incorporated as described above.

上記中央処理装置CPUのクロック周波数を、前記のように28.7MHzにしたとき、1サイクルに要する時間は35nsである。このため、RASアクセス時間が60nsのDRAMの高速ページ・モードでは1サイクルごとの連続アクセスができない。DRAMを2ウエイのインタリーブ構成にして、高速ページ・モードで交互にアクセスすれば、1サイクルを70nsに延ばすことができる。しかし、二つのウエイから交互に読み出すデータの衝突を回避するデータ・バッファのタイミング設計が難しい。また、データ・バッファでの遅延を考慮すると1サイクルごとの連続アクセスは事実上不可能である。   When the clock frequency of the central processing unit CPU is 28.7 MHz as described above, the time required for one cycle is 35 ns. For this reason, continuous access for each cycle is not possible in the DRAM high-speed page mode with a RAS access time of 60 ns. One cycle can be extended to 70 ns if the DRAM has a two-way interleave configuration and is accessed alternately in the high-speed page mode. However, it is difficult to design the timing of the data buffer that avoids the collision of data read alternately from the two ways. In addition, considering the delay in the data buffer, continuous access for each cycle is practically impossible.

そこで、シングルチップマイクロコンピュータにおいて、外部データ・バスの幅を64ビットにすれば、2バンク構成の主記憶と直結できるようになり、データ・バッファが不要になる。その反面、ピン数が増加しパッケージ・コストが高くなる。また、ボンディング・パッドの間隔の制約からチップ面積も増大しかねない。このような理由によって、高速ページ・モードのDRAMを用いて平均アクセス時間を短縮することは大きな弊害がある。SRAMを使えば1サイクルごとの連続アクセスは可能になるが、コストの面で見合わなくなってしまう。低コストで平均アクセス時間を低減するためには、前記実施例のように内蔵キャッシュメモリの採用が最も妥当となるものである。   Therefore, in a single-chip microcomputer, if the width of the external data bus is 64 bits, it can be directly connected to a main memory having a two-bank configuration, and a data buffer becomes unnecessary. On the other hand, the number of pins increases and the package cost increases. In addition, the chip area may increase due to restrictions on the bonding pad spacing. For this reason, reducing the average access time using a fast page mode DRAM has a significant adverse effect. If SRAM is used, continuous access for each cycle is possible, but it is not worth the cost. In order to reduce the average access time at a low cost, it is most appropriate to use a built-in cache memory as in the above embodiment.

キャッシュ・ミス率と平均アクセス時間に関するシミュレーションで内蔵キャッシュメモリの有効性を検討した。この発明に係るシングルチップマイクロコンピュータでは、バスの駆動をなるべく少なくして消費電力の低減を図るために、内蔵キャッシュメモリへのアクセスと主記憶へのアクセスを並行して開始する構造を採らないで、キャッシュ・ミスが判明してから主記憶へのアクセスを始める。内蔵キャッシュメモリへのアクセスと主記憶へのアクセスを同時に始めないので、キャッシュ・ミス時にはキャッシュ検索の時間がオーバヘッドとなる。平均アクセス時間の増加につながる。ミス率が高いと、このオーバヘッドの影響でキャッシュメモリを持たない場合よりも平均アクセス時間が増す危険がある。   The effectiveness of the built-in cache memory was examined through simulations on the cache miss rate and average access time. In the single-chip microcomputer according to the present invention, in order to reduce the power consumption by reducing the bus drive as much as possible, the structure in which the access to the internal cache memory and the access to the main memory are started in parallel is not adopted. Then, access to the main memory is started after a cache miss is found. Since the access to the internal cache memory and the access to the main memory are not started at the same time, the cache search time becomes an overhead when a cache miss occurs. This leads to an increase in average access time. When the miss rate is high, there is a risk that the average access time is increased due to the overhead as compared with the case where the cache memory is not provided.

ミス率に関するデータは、ゲーム用プログラムのトレース・データが無いので次の文献(Smith A. J.,"Line (Block) Size Choice for CPU Cache Memories ," IEEE Trans.on Computers, vol. 36,no.9 、Sep.1987, pp. 1063−1075)の値を参考にした。図26〜図28に命令/データ混在型キャッシュメモリのミス率、容量を変えた場合のライン・サイズとミス率の関係を示す特性図が示されている。   Since there is no game program trace data, the following data (Smith AJ, “Line (Block) Size Choice for CPU Cache Memories,” IEEE Trans. On Computers, vol. 36, no. 9, Sep. 1987, pp. 1063-1075). FIG. 26 to FIG. 28 are characteristic diagrams showing the relationship between the line size and the miss rate when the miss rate and capacity of the instruction / data mixed type cache memory are changed.

ライン・サイズは、キャッシュメモリの中にデータを蓄える単位をいい、ブロック・サイズともいわれる。部分書き込みを可能にするために、ライン内のバイト、ワードまたはロング・ワード単位にバリッド・ビットを設けない場合、ライン全てに有効なデータを格納しなければならない。キャッシュ・ミス時の置き換えは、ライン単位に行なう必要がある。このため、ライン・サイズを増やすと置き換えに要する時間は増加するものとなる。   The line size is a unit for storing data in the cache memory, and is also called a block size. In order to enable partial writing, if no valid bit is provided for each byte, word or long word in the line, valid data must be stored in all lines. Replacement at the time of a cache miss needs to be performed in units of lines. For this reason, if the line size is increased, the time required for replacement increases.

この発明に係るシングルチップマイクロコンピュータでは、前述のように内部キャッシュメモリのアクセスに1サイクル、外部のメモリ・アクセスに2サイクルかかる(キャッシュのライン・サイズが4バイトの場合)。ミス率が50%を越えると平均アクセス時間が2サイクル以上となりかえって遅くなる。   In the single-chip microcomputer according to the present invention, as described above, it takes one cycle for internal cache memory access and two cycles for external memory access (when the cache line size is 4 bytes). If the miss rate exceeds 50%, the average access time becomes 2 cycles or more, which is rather slow.

チップ・サイズの制限から、キャッシュメモリに割り当てることのできる面積は4Kバイト程度である。図26〜図28に示すように、キャッシュの容量が4Kバイトならば、ライン・サイズがかりに4バイトと小さくても、ミス率は33%以下で、キャッシュメモリが効果を発揮することが分かる。   Due to the chip size limitation, the area that can be allocated to the cache memory is about 4 Kbytes. As shown in FIGS. 26 to 28, if the cache capacity is 4K bytes, even if the line size is as small as 4 bytes, the miss rate is 33% or less and the cache memory is effective.

この発明に係るシングルチップマイクロコンピュータのように、16ビット固定長のRISCマイクロコントローラのアーキテクチャは、32ビット固定長RISCプロセッサと比べてコードサイズが小さいことが予想される。コードサイズが小さいと同じ命令数を実行する場合、フェッチしてくるバイト数が減りキャッシュメモリのミス率が低くなる。   Like the single-chip microcomputer according to the present invention, the architecture of a 16-bit fixed length RISC microcontroller is expected to have a smaller code size than a 32-bit fixed length RISC processor. When the same number of instructions are executed when the code size is small, the number of fetched bytes is reduced and the cache memory miss rate is lowered.

実際には32ビットRISCアーキテクチャを16ビットに変えてもコードサイズが1 /2 になるわけではない。イミディエイトデータとして命令中に組み込むことができる値の範囲が小さくなるため値の大きな定数を設定するために複数の命令を使う必要がある。命令コードとしてのビット数が足りなくなるので3オペランドアドレスを2アドレスに変えるため1命令が2命令になる場合がある。また、レジスタの指定ビットが足りなくなるのでレジスタの本数を32から16減らさざるを得ず、レジスタの待避回復を行うための命令が追加されることが考えられる。   Actually, even if the 32-bit RISC architecture is changed to 16 bits, the code size does not become 1/2. Since the range of values that can be incorporated into the instruction as immediate data is reduced, it is necessary to use a plurality of instructions in order to set a constant having a large value. Since the number of bits as the instruction code is insufficient, there is a case where one instruction becomes two instructions in order to change the three operand address to two addresses. In addition, since there are not enough designated bits in the register, the number of registers must be reduced from 32 to 16, and an instruction for saving and restoring the register may be added.

そこで、これらを検証するために、この発明に係るシングルチップマイクロコンピュータ用に生成したコードサイズを調べたところDhrystoneは968バイト、SPECintベンチマークのliは33,042バイト、同じくSPECintベンチマークのeqntottは6,992バイトであった。32ビット固定長RISCプロセッサの場合、それぞれ、1,680バイト、51,440バイト、10,832バイトであり、上記16ビット固定長と比べると55〜74%増しである。   Therefore, in order to verify these, the code size generated for the single-chip microcomputer according to the present invention was examined. As a result, Drystone was 968 bytes, SPECint benchmark li was 33,042 bytes, and SPECint benchmark eqntott was 6, It was 992 bytes. In the case of a 32-bit fixed length RISC processor, they are 1,680 bytes, 51,440 bytes, and 10,832 bytes, respectively, which are 55 to 74% higher than the 16-bit fixed length.

『Bunda J. and Athas W., "16-Bit vs. 32-Bit Instructions for Pipelined Microprocessors," ISCA'20 Proceedings ,May 16−19, 1993, pp. 237−246』によると、32ビットRISCアーキテクチャであるDLXを16ビット化するとコードサイズは2/3に減り、実行命令数は15%増加するものの、命令転送量は35%減少との結果が得られている。また、16ビット化による性能向上は低速のメモリを接続する場合に効果がより顕著であると報告されている。   According to Bunda J. and Athas W., "16-Bit vs. 32-Bit Instructions for Pipelined Microprocessors," ISCA'20 Proceedings, May 16-19, 1993, pp. 237-246 When a certain DLX is converted to 16 bits, the code size is reduced to 2/3 and the number of executed instructions is increased by 15%, but the instruction transfer amount is reduced by 35%. Further, it has been reported that the performance improvement by the 16-bit conversion is more remarkable when a low-speed memory is connected.

この発明に係るシングルチップマイクロコンピュータに内蔵のキャッシュメモリの構成は、前述のように命令/データ混在型の4ウエイ・セット・アソシアティブ方式を採った。ライン・サイズはシンクロナスDRAMとの直結を考慮して16バイトとされる。CPUとキャッシュメモリ間のアクセス経路は一つにし、命令とデータで別のアクセス経路を使うハーバード・アーキテクチャを使用しない。前記実施例のように、アクセス経路を一つにすると、同じクロックで命令フェッチとデータ・アクセスを処理することができないが、データ・アクセスを伴う命令の適切なアドレスに配置して、この問題を回避することかできる。   As described above, the cache memory built in the single-chip microcomputer according to the present invention employs the instruction / data mixed type 4-way set associative system. The line size is 16 bytes considering direct connection with the synchronous DRAM. There is only one access path between the CPU and the cache memory, and a Harvard architecture that uses different access paths for instructions and data is not used. As in the previous embodiment, if one access path is used, instruction fetch and data access cannot be processed with the same clock, but this problem can be solved by placing it at the appropriate address of the instruction with data access. Can be avoided.

すなわち、命令は16ビット固定長なので、32ビット単位でメモリをアクセスする場合に、2命令に1回の命令フェッチで済む。したがって、図29に示すように、メモリからのロード、ストアを伴う命令を偶数ワード・バウンダリ(4n 番地)に置くと、アクセス経路が一つでも命令フェッチとデータ・アクセスは競合しなくなる。このように、アクセス経路を一つにすることで、キャッシュ構成の自由度を増すことができる。すなわち、命令/データ混在型キャッシュ、命令/データ分離型キャッシュ、命令またはデータのみのキャッシュのいずれもが実現可能になる。   That is, since the instruction has a fixed length of 16 bits, when the memory is accessed in units of 32 bits, only one instruction fetch is required for every two instructions. Therefore, as shown in FIG. 29, when an instruction involving loading and storing from the memory is placed at the even word boundary (address 4n), instruction fetch and data access do not compete even if there is only one access path. In this way, by using one access path, the degree of freedom of the cache configuration can be increased. That is, any of an instruction / data mixed type cache, an instruction / data separation type cache, and an instruction or data only cache can be realized.

図29において、命令を格納する番地を適切な値に設定してメモリ・アクセスとの競合を避けるようにする。命令フェッチは32ビット単位にて行う。メモリ・アクセスを伴う命令を4n番地に置けば、4n+6番地の命令フェッチとメモリ・アクセスが重ならない。4n+2番地に置いた場合は重なってしまうので、パイプラインのストールが生じる。4n+4番地以降の命令の実行を1サイクル遅らせなければならない。   In FIG. 29, an address for storing an instruction is set to an appropriate value so as to avoid contention with memory access. Instruction fetch is performed in units of 32 bits. If an instruction with memory access is placed at address 4n, instruction fetch at 4n + 6 and memory access do not overlap. When placed at address 4n + 2, they overlap, causing a pipeline stall. Execution of instructions after address 4n + 4 must be delayed by one cycle.

上記命令/データ混在型と命令/データ分離型について比較すると次の通りである。命令だけのキャッシュとデータだけのキャッシュは命令/データ混在型キャッシュのリプレース論理を変更することで実現できるためである。   A comparison between the instruction / data mixed type and the instruction / data separation type is as follows. This is because the instruction-only cache and the data-only cache can be realized by changing the replacement logic of the instruction / data mixed type cache.

容量4Kバイトの命令/データ混在型キャッシュのミス率はライン・サイズ16バイトの時に、図26に示されているように12%である。命令とデータにそれぞれ2Kバイトのキャッシュを用意した分離型の場合は、図27と図28に示すように、命令のミス率が15%でデータのミス率が12%となる。さらに、命令フェッチは、データ・アクセスに比べて頻度が高く、CPIに及ぼす影響が大きく命令のミス率はできるだけ下げたいので、命令/データ混在型キャッシュメモリとするものである。   As shown in FIG. 26, the miss rate of the instruction / data mixed type cache having the capacity of 4 Kbytes is 12% when the line size is 16 bytes. In the case of a separate type in which a 2 Kbyte cache is prepared for each instruction and data, as shown in FIGS. 27 and 28, the instruction miss rate is 15% and the data miss rate is 12%. Further, instruction fetch is more frequent than data access, has a large effect on CPI, and wants to reduce the instruction miss rate as much as possible. Therefore, an instruction / data mixed type cache memory is used.

4ウエイ・セット・アソシアティブは、ミス率と消費電力、チップ面積のトレード・オフを考慮して決められた。直接マッピング方式はキャッシュ容量が小さい場合、プログラムによってはスラッシングが頻発し、キャッシュ・ミスが連続する可能性が高い。命令とデータを格納するアドレスを調節してスラッシングをさけることは可能であるが、アセンブラ・レベルでのチューニングが必要になる。C言語で個々のプログラムを書き、リンカでまとめ上げる開発方法が主流となりつつある時代のすう勢にそぐわない。また、フルアソシアティブ方式のキャッシュメモリはチップ面積が増大する上に、消費電力が大きいという問題を有するものである。   The 4-way set associative was decided in consideration of the trade-off between error rate, power consumption, and chip area. In the direct mapping method, when the cache capacity is small, thrashing frequently occurs depending on the program, and there is a high possibility that cache misses will continue. Although it is possible to avoid thrashing by adjusting the address where instructions and data are stored, tuning at the assembler level is required. The development method of writing individual programs in C language and collecting them with the linker is not suitable for the times. Further, the full associative cache memory has a problem that the chip area increases and the power consumption is large.

そこで、セット・アソシアティブ方式について検討した結果、次の通りである。キャッシュの容量が4Kバイトの場合、4ウエイまではウエイ数を増やすとミス率が大幅に低減する。これに対し、4ウエイと8ウエイの差は0.2%と小さい。さらにミス率を低くするために、ラインの置き換えアルゴリズムにLRUを使いうことも検討したが、8ウエイではエントリごとに28ビットのLRU情報を用意しなければならない。キャッシュメモリ全体の5%がLRU情報で占められることになってコストに響く。ちなみに、この実施例のように4ウエイの場合はLRU情報は6ビットですむので全体への割合は1%と少なくできる。   Therefore, as a result of examining the set associative method, it is as follows. If the cache capacity is 4 Kbytes, increasing the number of ways up to 4 ways will greatly reduce the miss rate. On the other hand, the difference between 4-way and 8-way is as small as 0.2%. In order to further reduce the miss rate, the use of LRU as a line replacement algorithm was also examined. However, in 8-way, 28-bit LRU information must be prepared for each entry. 5% of the total cache memory is occupied by LRU information, which affects the cost. Incidentally, in the case of 4 ways as in this embodiment, the LRU information only needs 6 bits, so the ratio to the whole can be reduced to 1%.

この発明に係るシングルチップマイクロコンピュータが備えるシンクロナスDRAMとのインターフェイス回路は、キャッシュ・ミス時にラインの置き換えにかかる時間を短縮するためのものである。既存のDRAMで8サイクルかかるラインの置き換えが、シンクロナスDRAMを使った場合は6サイクルになる。   The interface circuit with the synchronous DRAM provided in the single chip microcomputer according to the present invention is for shortening the time required for line replacement at the time of a cache miss. The replacement of a line that takes 8 cycles with an existing DRAM becomes 6 cycles when a synchronous DRAM is used.

図30に示すように、ライン・サイズを大きくとり過ぎると平均アクセス時間の増加につながる。ライン・サイズをある程度大きくすれば、キャッシュメモリのミス率が下がるので平均アクセス時間が短くなる。大きくし過ぎると外部メモリからのデータ転送にかかる時間が長くなり、平均アクセス時間の増加を招く。同図では、CPUの動作周波数は28.7MHz、SRAMのアクセス時間は60ns、DRAMのアクセス時間は70nsである。DRAMの高速ページ・モードのサイクル時間は45ns、シンクロナスDRAMは最高動作周波数66MHzのものを使用した例が示されている。   As shown in FIG. 30, if the line size is too large, the average access time is increased. If the line size is increased to some extent, the miss rate of the cache memory is lowered, so that the average access time is shortened. If the value is too large, the time required for data transfer from the external memory becomes long, and the average access time increases. In the figure, the CPU operating frequency is 28.7 MHz, the SRAM access time is 60 ns, and the DRAM access time is 70 ns. An example is shown in which the cycle time of the DRAM high-speed page mode is 45 ns, and the synchronous DRAM has a maximum operating frequency of 66 MHz.

キャッシュメモリの容量が同じだと、ある程度ライン・サイズを増やした方がキャッシュメモリのミス率が低くなる。キャッシュ・ミス時にライン単位で置き換えを行なうので、キャッシュメモリのプリフェッチと同様の効果が期待できるからである。したがって、ライン・サイズが大きくなり過ぎてエントリ数が不足するまでは、ライン・サイズを増やした方がよい。しかし、ライン・サイズを大きくしてミス率を低くしたからといって、必ずしも平均アクセス時間の短縮に結び付くとは限らない。いったんミスしたときに、ラインの置き換えにかかる時間はライン・サイズが大きいほど長くなるからである。   If the cache memory capacity is the same, the cache memory miss rate will be lower if the line size is increased to some extent. This is because replacement is performed in units of lines at the time of a cache miss, and the same effect as cache memory prefetching can be expected. Therefore, it is better to increase the line size until the line size becomes too large and the number of entries is insufficient. However, just increasing the line size and lowering the miss rate does not necessarily lead to a reduction in average access time. This is because, once a mistake is made, the time required for line replacement increases as the line size increases.

この発明に係るシングルチップマイクロコンピュータは、ラインの置き換えが終わるまで命令の実行を停止する。ラインの置き換えの最中にキャッシュにアクセスするには、複雑な制御が必要なためだからである。CPIを低減するには、できるだけ短時間でラインの置き換えをすませたい。そこで、ライン・サイズに相当するまとまったデータ(ブロック・データ)の転送速度が速いメモリが必要になり、高速ページ・モードのDRAMとシンクロナスDRAM、Rambus 準拠のDRAMについて検討した。   The single-chip microcomputer according to the present invention stops executing instructions until the line replacement is completed. This is because accessing the cache during line replacement requires complex control. In order to reduce CPI, we want to replace the line as quickly as possible. Therefore, a memory having a high transfer rate of data (block data) corresponding to the line size is required, and high-speed page mode DRAM, synchronous DRAM, and Rambus-compliant DRAM were examined.

このうち、シンクロナスDRAMとRambus 準拠のDRAMは、一つの行をまとめてチップ内のバッファに読み出し、後はクロック入力に同期してこれを順次転送するという方式を採る。二つ目以降のデータはメモリの内部動作に拘束されずに転送できる。Rambus 準拠のDRAMは、最高2nsのサイクルでデータ転送が可能である。しかし、Rambus 準拠のDRAMは、既存のCMOSチップとは信号レベルが異なる。ROMや周辺I/Oと信号ピンを直結することができない。この発明に係るシングルチップマイクロコンピュータの入出力インターフェイスの信号レベルをRambus 準拠のDRAMに合わせることもできるが、現状では汎用性がなくなってしまうという問題が生じる。   Among them, the synchronous DRAM and the Rambus-compliant DRAM adopt a method in which one row is collectively read out to a buffer in the chip, and then sequentially transferred in synchronization with a clock input. The second and subsequent data can be transferred without being restricted by the internal operation of the memory. Rambus compliant DRAMs can transfer data in cycles up to 2 ns. However, Rambus-compliant DRAMs have different signal levels from existing CMOS chips. The ROM and peripheral I / O cannot be directly connected to signal pins. Although the signal level of the input / output interface of the single-chip microcomputer according to the present invention can be adjusted to the Rambus-compliant DRAM, there is a problem that the versatility is lost at present.

この発明に係るシングルチップマイクロコンピュータでは、キャッシュメモリのアクセスを32ビット単位で行う。Rambus 準拠のDRAMをCPUの動作周波数より速いクロックで動作させてデータを取り込んでも、直接にキャッシュメモリに書き込むことはできない。そのため、チップ内にバッファが必要となり、コスト増を招いてしまう。高速ページ・モードのDRAMは、ブロック転送速度が、列のアドレスを選択するためのCAS信号のサイクル時間がネックとなって、大きな速度改善が行えない。   In the single chip microcomputer according to the present invention, the cache memory is accessed in units of 32 bits. Even if a Rambus-compliant DRAM is operated with a clock faster than the operating frequency of the CPU to capture data, it cannot be directly written into the cache memory. Therefore, a buffer is required in the chip, resulting in an increase in cost. In the DRAM of the high-speed page mode, the block transfer speed cannot be improved greatly because the cycle time of the CAS signal for selecting the column address becomes a bottleneck.

シンクロナスDRAMは、データ転送速度こそ最高16ns/サイクルだが、信号レベルは電源電圧が+3.3Vのメモリと同じLVTTLである。制御信号以外の信号ピンを周辺回路と直結できる。クロックの立ち上がりエッジだけを使用するためクロックに対する制約が緩い。   The synchronous DRAM has a maximum data transfer speed of 16 ns / cycle, but the signal level is the same LVTTL as that of the memory having a power supply voltage of + 3.3V. Signal pins other than the control signal can be directly connected to the peripheral circuit. Since only the rising edge of the clock is used, there are less restrictions on the clock.

この発明に係るシングルチップマイクロコンピュータでは、以上の検討からシンクロナスDRAMとのインターフェイスを組み込むようにするものである。シンクロナスDRAMは、高速ページモードDRAMのRASアクセスに相当するバンク・アクティブ状態にした場合に、行アドレスのサイクルを省略できる。1回目のアクセス時間を短縮することが可能である。さらに、内部が二つのバンクに分かれており、それぞれ独立の行アドレスに対してバンク・アクティブ状態にしておくことができる。メモリ内の低位側のアドレスに命令、高位側のアドレスにデータといった配置をとった場合、命令とデータのアクセスが混在してもアクセス時間を短縮できる確率は高くなる。これもシンクロナスDRAMインターフェイスを採用した理由の一つである。   In the single chip microcomputer according to the present invention, an interface with a synchronous DRAM is incorporated from the above examination. When the synchronous DRAM is in a bank active state corresponding to the RAS access of the high-speed page mode DRAM, the row address cycle can be omitted. It is possible to shorten the first access time. Further, the inside is divided into two banks, and a bank active state can be set for each independent row address. When an instruction is placed at a lower address in the memory and data is placed at a higher address, there is a high probability that the access time can be shortened even if instructions and data accesses are mixed. This is one of the reasons for adopting the synchronous DRAM interface.

シンクロナスDRAMの使用を考慮した結果、キャッシュメモリのライン・サイズは16バイトとなり、図30から平均アクセス時間は1.72サイクルになった。   As a result of considering the use of the synchronous DRAM, the line size of the cache memory is 16 bytes, and the average access time is 1.72 cycles from FIG.

この発明に係るシングルチップマイクロコンピュータでは、キャッシュメモリの制御を簡単にするために、データの書き込みにはライト・スルー方式を採用するものである。これは、コピー・バック方式はライト・スルー方式よりもミス率が高いといわれているからである。   In the single-chip microcomputer according to the present invention, in order to simplify the control of the cache memory, the write-through method is adopted for data writing. This is because the copy-back method is said to have a higher miss rate than the write-through method.

ところがライト・スルー方式では、主記憶への書き込み時にオーバヘッドを生じる。既存のシンクロナスDRAMは、読み出し時と書き込み時の転送ブロック・サイズが同じためである。1ワード(4バイト)のデータを書き込む場合でも、1ライン(16バイト)分の書き込み操作をしなければならない。書き込みのたびに3サイクルのからサイクルが発生してしまう。シンクロナスDRAMは、ブロック・アクセスの途中で次のアクセスを強制的に始めることもできるが、インターフェイスの回路が複雑になる。   However, with the write-through method, an overhead occurs when writing to the main memory. This is because the existing synchronous DRAM has the same transfer block size at the time of reading and writing. Even when data of one word (4 bytes) is written, a write operation for one line (16 bytes) must be performed. A cycle occurs from 3 cycles for each writing. In the synchronous DRAM, the next access can be forcibly started in the middle of the block access, but the interface circuit becomes complicated.

そこで、この発明に係るシングルチップマイクロコンピュータに接続される図8等に示された前記のようなシンクロナスDRAMでは、読み出しはブロック単位で行なうが、書き込みはワード単位でできる、ブロック・リード/シングル・ライトの機能を持つものである。   Therefore, in the synchronous DRAM as shown in FIG. 8 or the like connected to the single chip microcomputer according to the present invention, reading is performed in units of blocks, but writing can be performed in units of words. -It has a light function.

この発明に係るシングルチップマイクロコンピュータは、家庭用ゲーム機以外に携帯型情報通信機器の用途に向けられている。こうした機器は屋外で持ち歩いて使うため電池駆動が前提なので、マイクロコントローラの消費する電力をできる限り抑える必要がある。低価格のプラスチック・パッケージに納めるためにも発熱を抑えることが必要である。   The single-chip microcomputer according to the present invention is directed to the use of portable information communication equipment in addition to home game machines. Since these devices are carried outdoors and used for battery operation, it is necessary to reduce the power consumed by the microcontroller as much as possible. It is necessary to suppress heat generation in order to fit in a low-priced plastic package.

キャッシュメモリでの低消費電力化のために、図31に示すように、アドレス・アレイとデータ・アレイを1/2サイクルずらして動作させて、アドレス・アレイの比較結果にもとづいて、4ウエイのデータ・アレイのうちヒットしたウエイのセンス・アンプだけを動かす構造とされる。同図は、前記図18と対応されている。   In order to reduce the power consumption in the cache memory, as shown in FIG. 31, the address array and the data array are operated with a ½ cycle shift, and based on the comparison result of the address array, four ways Only the sense amplifier of the hit way in the data array is moved. This figure corresponds to FIG.

図32には、この発明に係るキャッシュメモリの動作タイミングが示されている。チップ全体の消費電力を下げるために、ワード線の制御を工夫して、ビット線の充放電による消費電流の低減を図るようにした。データ線を1/2サイクルの間でプリチャージする。次の1/2サイクルでデータを読み出す。すなわち、アドレスのデコード結果に従ったワード線駆動とメモリ・セルのデータ線への読み出しと、センス・アンプ駆動を同時に行なう。   FIG. 32 shows the operation timing of the cache memory according to the present invention. In order to reduce the power consumption of the entire chip, the word line control is devised to reduce the current consumption by charging and discharging the bit lines. The data line is precharged during 1/2 cycle. Data is read in the next 1/2 cycle. That is, the word line driving according to the address decoding result, the reading to the data line of the memory cell, and the sense amplifier driving are simultaneously performed.

ヒットしないウエイのセンス・アンプを動かさなくても、そのウエイのワード線を立ち上げてしまうとデータ線の充放電を避けられない。そこで、ヒットしたウエイのワード線だけを立ち上げることにした。このためにはワード線駆動のタイミングよりも前にヒットしたウエイが確定する必要がある。シミュレーションによって、ワード線駆動より先にヒットしたウエイの確定ができることが分かっている。このような構成とすることにより、データ線充放電による消費電流を大幅に低減することができる。   Even if the sense amplifier of the way that does not hit is not moved, charging and discharging of the data line cannot be avoided if the word line of the way is started up. Therefore, we decided to launch only the word line of the hit way. For this purpose, it is necessary to determine the way hit before the timing of driving the word line. It is known from simulation that the way hit before the word line drive can be determined. With such a configuration, current consumption due to data line charging / discharging can be significantly reduced.

さらに、前記図19の実施例のように、カレントミラー差動型のセンス・アンプをクロス・カップル型センス・アンプに変えセンス・アンプの貫通電流をなくした。クロス・カップル型のセンス・アンプは駆動タイミングが難しい。データ線間の電位差が有意となった後にセンス動作を開始しないと、誤動作する恐れがあるからである。このため従来はカレントミラー差動型を用いていた。本願発明では、タイミング生成回路系の微調整によって、クロス・カップル型の採用を可能にするものである。   Further, as in the embodiment of FIG. 19, the current mirror differential type sense amplifier is changed to a cross-coupled type sense amplifier to eliminate the through current of the sense amplifier. Cross-coupled sense amplifiers are difficult to drive. This is because if the sensing operation is not started after the potential difference between the data lines becomes significant, malfunction may occur. For this reason, a current mirror differential type has been conventionally used. In the present invention, a cross-couple type can be adopted by fine adjustment of the timing generation circuit system.

キャッシュメモリを内蔵した場合に、インサーキット・エミュレータのトレース機能をどのように実現するかが問題となる。トレースによるデバグの支援は、問題の発生した時点の前後のバス・アクセスを正確に表示することで可能となる。キャッシュメモリを内蔵すると、キャッシュメモリにミスしたメモリ・アクセスだけが外部バスに出力されるので、正しいトレース・データが得られない。   When the cache memory is built in, the problem is how to implement the trace function of the in-circuit emulator. Debugging support by tracing can be achieved by accurately displaying the bus access before and after the time when the problem occurred. If the cache memory is built in, only the memory access that misses the cache memory is output to the external bus, so that correct trace data cannot be obtained.

そこで、この発明に係るシングルチップマイクロコンピュータでは、キャッシュメモリにアクセスしているときのトレースを可能にするために、キャッシュ・ヒット時にそのアドレスとデータを1サイクルだけバスに出力するモードを設けた。単一プロセッサで使う場合は、キャッシュにヒットしたときにはメモリ・アクセスを実行しない。すなわち、トレース時にはアドレスとデータの出力が行われず外部バスが空いている。これを利用して、トレース・データを出力するようにする。   Therefore, the single chip microcomputer according to the present invention is provided with a mode in which the address and data are output to the bus for one cycle when a cache hit occurs in order to enable tracing when the cache memory is accessed. When used with a single processor, no memory access is performed when the cache is hit. In other words, the address and data are not output during tracing, and the external bus is free. Using this, trace data is output.

これに対して、DMAコントローラを用い高いバス使用率でデータの転送を行なう場合や、マルチプロセッサ・システムではトレース・データの出力とDMA転送または他のプロセッサからのメモリ・アクセスが競合する可能性がある。最悪、DMAコントローラがデュアルアドレス転送を行いバスを占有している場合、リードとライトの合間を待ってトレースデータを出力するため、CPU性能はキャッシュの代わりに実際に接続されているメモリより2倍遅いメモリを接続した場合と同等となる。   On the other hand, when transferring data at a high bus usage rate using a DMA controller, or in multiprocessor systems, there is a possibility that the output of trace data and DMA transfer or memory access from other processors may compete. is there. In the worst case, when the DMA controller occupies the bus by performing dual address transfer, the trace performance is output after waiting for the interval between read and write, so the CPU performance is twice that of the memory actually connected instead of the cache. Equivalent to connecting a slow memory.

マイクロコントローラを用いたシステムを開発する際にプログラムデバッグに対するサポートは重要な位置を占める。現在のプログラミングは、アセンブラ言語を離れC言語、さらには一部アプリケーションに関してはオブジェクト指向を取り入れC++などのオブジェクトオリエンテッドなプログラミング言語を採り入れだしている。こうした中で、ステートメント単位のプログラム実行の停止とシンボリックな変数の参照機能はプログラマの作業効率を向上するために不可欠となっている。   Support for program debugging occupies an important position when developing a system using a microcontroller. The current programming leaves the assembler language and adopts an object-oriented programming language such as C ++ by adopting the C language and, for some applications, object-oriented. Under these circumstances, the statement execution stop and the symbolic variable reference function are indispensable for improving the work efficiency of the programmer.

RAM上にOSやアプリケーションプログラムをロードするパーソナルコンピュータやワークステーションと異なり、機器に組み込むマイクロコントローラは最終的なデバッグをROM上で行うことが多い。RAM上のプログラムは、実行停止を行うため指定するアドレスの命令をブレーク命令に置き換えることで正確な停止を容易に実現できる。キャッシュメモリ内蔵でも停止方法は同じである。ROMでは命令の置き換えを行うことができない。   Unlike a personal computer or workstation that loads an OS or application program on the RAM, the microcontroller incorporated in the device often performs final debugging on the ROM. The program on the RAM can be easily stopped accurately by replacing the instruction at the designated address with a break instruction to stop execution. The stopping method is the same for the built-in cache memory. In ROM, instructions cannot be replaced.

この発明に係るシングルチップマイクロコンピュータでは、実行の正確な停止をサポートするため命令フェッチアドレスを検出し指定アドレスの命令の直前でブレーク割り込みを発生させるユーザブレークコントローラが設けられている。ユーザブレークコントローラにはデータアクセスのアドレスおよびデータの値によってブレーク割り込みを発生させる機能も盛り込まれている。チップ内部に組み込むことによってキャッシュにヒットし外部アクセスが行われない場合にも正しくブレーク割り込みを発生できる。   The single chip microcomputer according to the present invention is provided with a user break controller that detects an instruction fetch address and generates a break interrupt immediately before an instruction at a specified address in order to support an accurate stop of execution. The user break controller also includes a function for generating a break interrupt according to the data access address and data value. The break interrupt can be correctly generated even when the cache is hit and no external access is performed by incorporating the chip inside the chip.

チップ内部のアドレス・バスとデータ・バスは、ほとんどすべてのモジュールに配線される。その静電容量は数pFのオーダとなる。アドレス・バス/ データ・バスの各32本を1サイクルごとに逆極性に駆動すると、電荷の充放電による消費電流が60mAを超えてしまうし、静電容量が大きくなると遅延も増えることになる。   The address bus and data bus inside the chip are wired to almost all modules. Its capacitance is on the order of several pF. If each of the 32 address buses / data buses is driven in reverse polarity every cycle, the current consumption due to charge / discharge of electric charge exceeds 60 mA, and the delay increases as the capacitance increases.

そこで、この発明に係るシングルチップマイクロコンピュータでは、前記図1等の実施例のように、内部バスを分割して、バスごとに駆動方法を工夫することで充放電電流の低減を図るものである。チップの内部バスは3種類に分けられるものである。   Therefore, in the single-chip microcomputer according to the present invention, as in the embodiment of FIG. 1 and the like, the internal bus is divided and the drive method is devised for each bus to reduce the charge / discharge current. . The internal bus of the chip can be divided into three types.

図33には、この発明に係るシングルチップマイクロコンピュータにおける各バスサイクルを説明するためのタイミング図が示されている。キャッシュバス(前記図1の第1のバス)と内部バス(前記図1の第2のバス)の各信号は、クロックのハイレベル期間に同期して変化し、チップ外部に接続された外部バス(前記図1の第4のバス)の各信号は、クロックのロウレベル期間に同期して変化する。   FIG. 33 is a timing chart for explaining each bus cycle in the single chip microcomputer according to the present invention. Each signal of the cache bus (first bus in FIG. 1) and the internal bus (second bus in FIG. 1) changes in synchronization with the high level period of the clock and is connected to the outside of the chip. Each signal of the (fourth bus in FIG. 1) changes in synchronization with the low level period of the clock.

CPUがメモリ上のデータ又は命令をアクセスする場合、クロック信号に同期してキャッシュアドレスバスにアドレス信号を出力するとともにアクセスを行うことを表示するためのアクセス信号(図示せず)をハイレベルにする。キャッシュは、これを受けて内部のキャッシュメモリの検索を行う。アクセスがメモリに対するリードでかつアクセスアドレスのデータがキャッシュメモリ内に存在する場合、次のサイクルにクロックに同期してキャッシュデータバスにキャッシュメモリから読み出したデータを出力するとともにレディ信号をハイレベルにし、CPUにデータのアクセスが完了したことを示す。同図では、A番地のアクセスとA+4番地のアクセスがこれに該当する。   When the CPU accesses data or instructions on the memory, the address signal is output to the cache address bus in synchronization with the clock signal and an access signal (not shown) for indicating that the access is performed is set to the high level. . In response to this, the cache searches the internal cache memory. When the access is a read to the memory and the data at the access address exists in the cache memory, the data read from the cache memory is output to the cache data bus in synchronization with the clock in the next cycle and the ready signal is set to the high level. Indicates that data access has been completed to the CPU. In the figure, the access at address A and the access at address A + 4 correspond to this.

キャッシュメモリにデータが存在しない場合、内部バスを介してキャッシュ外部のデータをアクセスする。同図では、C番地に対するアクセスがこれに該当する。すなわち、CPUは、サイクル4にキャッシュアドレスバスにアドレス信号Cをするとともに、図示しないアクセス信号をハイレベルにする。キャッシュメモリ内にデータがないので、キャッシュはサイクル5でレディ信号をロウレベルにして、データが準備できていないことをCPUに知らせるとともに、内部バスのバスアクセス信号をハイレベルにする。   When there is no data in the cache memory, data outside the cache is accessed via the internal bus. In this figure, access to address C corresponds to this. That is, the CPU sends the address signal C to the cache address bus in cycle 4 and sets the access signal (not shown) to the high level. Since there is no data in the cache memory, the cache sets the ready signal to the low level in cycle 5 to notify the CPU that the data is not ready and sets the bus access signal of the internal bus to the high level.

外部アドレスインターフェイスは、上記アクセス信号のハイレベルを受けて内部アドレスバスの値をデコードし、これがチップ内部に対するアクセスか外部に対するアクセスかを判定する。アドレス信号Cの番地は、外部であるので直ちに外部アドレスバスにアドレス信号Cを乗せ、外部バスアクセス信号をハイレベルにする。   The external address interface receives the high level of the access signal, decodes the value of the internal address bus, and determines whether this is an access to the inside of the chip or an access to the outside. Since the address of the address signal C is external, the address signal C is immediately put on the external address bus and the external bus access signal is set to the high level.

次のサイクルでは、データの読み出し準備が完了しないので内部レディ信号をロウレベルにして、キャッシュに対してデータの準備ができないことを通知する。読み出しの完了するサイクル6に外部インターフェイスは読み込んだデータを内部データバスに出力するとともに内部レディ信号をハイレベルとして、キャッシュに読み出し完了を通知する。キャッシュは、内部バスのデータをキャッシュメモリに書くと同時にキャッシュデータバスに出力し、かつキャッシュレディ信号をハイレベルにして、CPUに読み出し完了を通知する。このキャッシュレディ信号がロウレベルの期間(サイクル5とサイクル6)、CPUはアドレスバスの更新を停止する。   In the next cycle, since the data read preparation is not completed, the internal ready signal is set to low level to notify the cache that data preparation is not possible. In cycle 6 of read completion, the external interface outputs the read data to the internal data bus and sets the internal ready signal to the high level to notify the cache of the read completion. The cache writes the data of the internal bus to the cache memory and simultaneously outputs it to the cache data bus, and sets the cache ready signal to high level to notify the CPU of the completion of reading. During the period when the cache ready signal is at the low level (cycle 5 and cycle 6), the CPU stops updating the address bus.

データの書き込み動作では、外部のデータ書き込みの完了を待つ必要がないため、B番地のアクセスに示されているように、キャッシュは前記ブレークコントローラを介して内部アドレスバスにアドレス信号Bを出力し、バスアクセス信号をハイレベルにする際にCPUに接続されるキャッシュレディ信号をハイレベルに保つ。したがって、CPUは、外部バスの書き込み完了を待たずに実行を続ける。   In the data write operation, there is no need to wait for the completion of external data write, so that the cache outputs the address signal B to the internal address bus through the break controller, as shown in the address B address, When the bus access signal is set to the high level, the cache ready signal connected to the CPU is maintained at the high level. Therefore, the CPU continues execution without waiting for completion of writing to the external bus.

周辺バス(図1の第3のバス)に接続される周辺モジュールであるフリーランニングタイマFRT、シリアルコミュニケーションインターフェイスSCI、ウォッチドッグタイマWDTにアクセスする場合、キャッシュアドレスバスからキャッシュを経て内部アドレスバスに出力されるアドレス信号Bが、これら周辺モジュールのアドレス信号Bとなる。アドレス信号Bは、バスステートコントローラBSCを介して周辺アドレスバスに出力される。同時にバスアクセス信号がハイレベルになる。   When accessing the free running timer FRT, serial communication interface SCI, and watchdog timer WDT, which are peripheral modules connected to the peripheral bus (third bus in FIG. 1), output from the cache address bus to the internal address bus via the cache The address signal B to be used becomes the address signal B of these peripheral modules. The address signal B is output to the peripheral address bus via the bus state controller BSC. At the same time, the bus access signal goes high.

周辺モジュールから周辺データバスへのデータ出力、又はデータバス上の値を周辺モジュールへの書き込み完了を待って外部バスインターフェイスが内部バスレディ信号をハイレベルにしてアクセスの完了を知らせる。データ読み出しの場合、このとき同時にバスステートコントローラBSCから周辺データバス上の読み出しデータが内部データバスに出力される。   After the data output from the peripheral module to the peripheral data bus or the writing of the value on the data bus to the peripheral module is completed, the external bus interface sets the internal bus ready signal to the high level to notify the completion of the access. In the case of data reading, at this time, read data on the peripheral data bus is simultaneously output from the bus state controller BSC to the internal data bus.

図34には、シンクロナスDRAMのモード書き込み動作を説明するためのタイミング図が示されている。この発明に係るシングルチップマイクロコンピュータにおいては、特に制限されないが、シンクロナスDRAMに対するモード設定が以下のように実現される。   FIG. 34 is a timing chart for explaining the mode write operation of the synchronous DRAM. In the single chip microcomputer according to the present invention, although not particularly limited, the mode setting for the synchronous DRAM is realized as follows.

内蔵周辺用として割り当てられたFFF8000番地からFFFFFFFF番地のうち、FFFF8000からFFFFB000番地をアクセス(ライト又はリード)するとと、そのアドレスがそのまま外部バスに出力されるとともに、シンクロナスDRAMに接続される/CS3、/RAS、/CAS及び/WEの各制御信号が同時に1クロックサイクルの間、ロウレベルにされる。   Of the addresses FFF8000 to FFFFFFFF allocated for the built-in peripheral, when accessing (writing or reading) FFFF8000 to FFFFB000, the address is output as it is to the external bus and is connected to the synchronous DRAM / CS3 , / RAS, / CAS and / WE are simultaneously driven low for one clock cycle.

シンクロナスDRAMは、これら4本の各制御線の信号がロウレベルのときのクロックの立ち上がりエッジでアドレスバスの値を取り込み、これをそのまま内部モード設定レジスタに書き込む。したがって、上記FFFF8000からFFFB000番地の適当なアドレスをアクセスすることによって、所望のモード設定を簡単に行うことができる。上記のようなタイミングでの制御信号の発生は、前記メモリ制御信号発生回路MCTGにより形成される。すなわち、外部バスインターフェイス回路のエリア制御部等に適当なアドレスデコーダを設け、上記のようなアドレスデコード条件により、前記のような4本のメモリ制御線の信号をロウレベルにするようなシーケンス状態を設けるようにすることによって実現される。   The synchronous DRAM takes in the value of the address bus at the rising edge of the clock when the signals of these four control lines are at the low level, and writes it in the internal mode setting register as it is. Therefore, a desired mode can be easily set by accessing an appropriate address from FFFF8000 to FFFB000. The generation of the control signal at the timing as described above is formed by the memory control signal generation circuit MCTG. That is, an appropriate address decoder is provided in the area control unit of the external bus interface circuit, and a sequence state in which the signals of the four memory control lines are set to the low level according to the address decoding conditions as described above is provided. It is realized by doing so.

図35には、上記シンクロナスDRAM(以下、単にSDRAMという)の一実施例のブロック図が示されている。同図に示されたSDRAMは、特に制限されないが、公知の半導体集積回路の製造技術によって単結晶シリコンのような1つの半導体基板上に形成される。   FIG. 35 is a block diagram showing an embodiment of the synchronous DRAM (hereinafter simply referred to as SDRAM). The SDRAM shown in the figure is not particularly limited, but is formed on a single semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.

この実施例のSDRAMは、メモリバンクA(BANKA)を構成するメモリアレイ200Aと、メモリバンク(BANKB)を構成するメモリアレイ200Bを備える。それぞれのメモリアレイ200Aと200Bは、マトリクス配置されたダイナミック型メモリセルを備え、図に従えば同一列に配置されたメモリセルの選択端子は列毎のワード線(図示せず)に結合され、同一行に配置されたメモリセルのデータ入出力端子は行毎に相補データ線(図示せず)に結合される。   The SDRAM of this embodiment includes a memory array 200A that constitutes a memory bank A (BANKA) and a memory array 200B that constitutes a memory bank (BANKB). Each of the memory arrays 200A and 200B includes dynamic memory cells arranged in a matrix, and according to the figure, the selection terminals of the memory cells arranged in the same column are coupled to word lines (not shown) for each column, Data input / output terminals of memory cells arranged in the same row are coupled to complementary data lines (not shown) for each row.

上記メモリアレイ200Aの図示しないワード線はロウデコーダ201Aによるロウアドレス信号のデコード結果に従って1本が選択レベルに駆動される。メモリアレイ200Aの図示しない相補データ線はセンスアンプ及びカラム選択回路202Aに結合される。センスアンプ及びカラム選択回路202Aにおけるセンスアンプは、メモリセルからのデータ読出しによって夫々の相補データ線に現れる微小電位差を検出して増幅する増幅回路である。それにおけるカラムスイッチ回路は、相補データ線を各別に選択して相補共通データ線204に導通させるためのスイッチ回路である。カラムスイッチ回路はカラムデコーダ203Aによるカラムアドレス信号のデコード結果に従って選択動作される。メモリアレイ200B側にも同様にロウデコーダ201B,センスアンプ及びカラム選択回路202B,カラムデコーダ203Bが設けられる。上記相補共通データ線204は入力バッファ210の出力端子及び出力バッファ211の入力端子に接続される。入力バッファ210の入力端子及び出力バッファ211の出力端子は16ビットのデータ入出力端子I/O0〜I/O15に接続される。   One word line (not shown) of the memory array 200A is driven to a selected level in accordance with the decoding result of the row address signal by the row decoder 201A. Complementary data lines (not shown) of memory array 200A are coupled to sense amplifier and column selection circuit 202A. The sense amplifier in the sense amplifier and column selection circuit 202A is an amplifier circuit that detects and amplifies a minute potential difference that appears on each complementary data line by reading data from the memory cell. In this case, the column switch circuit is a switch circuit for selecting a complementary data line and making it conductive to the complementary common data line 204. The column switch circuit is selectively operated according to the decoding result of the column address signal by the column decoder 203A. Similarly, a row decoder 201B, a sense amplifier and column selection circuit 202B, and a column decoder 203B are also provided on the memory array 200B side. The complementary common data line 204 is connected to the output terminal of the input buffer 210 and the input terminal of the output buffer 211. The input terminal of the input buffer 210 and the output terminal of the output buffer 211 are connected to 16-bit data input / output terminals I / O0 to I / O15.

アドレス入力端子A0〜A9から供給されるロウアドレス信号とカラムアドレス信号はカラムアドレスバッファ205とロウアドレスバッファ206にアドレスマルチプレクス形式で取り込まれる。供給されたアドレス信号はそれぞれのバッファが保持する。ロウアドレスバッファ206はリフレッシュ動作モードにおいてはリフレッシュカウンタ208から出力されるリフレッシュアドレス信号をロウアドレス信号として取り込む。カラムアドレスバッファ205の出力はカラムアドレスカウンタ207のプリセットデータとして供給され、カラムアドレスカウンタ207は後述のコマンドなどで指定される動作モードに応じて、上記プリセットデータとしてのカラムアドレス信号、又はそのカラムアドレス信号を順次インクリメントした値を、カラムデコーダ203A,203Bに向けて出力する。   The row address signal and the column address signal supplied from the address input terminals A0 to A9 are taken into the column address buffer 205 and the row address buffer 206 in an address multiplex format. The supplied address signal is held in each buffer. The row address buffer 206 takes in the refresh address signal output from the refresh counter 208 as a row address signal in the refresh operation mode. The output of the column address buffer 205 is supplied as preset data of the column address counter 207. The column address counter 207 corresponds to the column address signal as the preset data, or its column address, according to the operation mode specified by a command to be described later. A value obtained by sequentially incrementing the signal is output to the column decoders 203A and 203B.

コントローラ212は、特に制限されないが、クロック信号CLK、クロックイネーブル信号CKE、チップセレクト信号/CS、カラムアドレスストローブ信号/CAS(記号/はこれが付された信号がロウイネーブルの信号であることを意味する)、ロウアドレスストローブ信号/RAS、及びライトイネーブル信号/WEなどの外部制御信号と、アドレス入力端子A0〜A9からの制御データとが供給され、それらの信号のレベルの変化やタイミングなどに基づいてSDRAMの動作モード及び上記回路ブロックの動作を制御するための内部タイミング信号を形成するもので、そのためのコントロールロジック(図示せず)とモードレジスタ30を備える。   The controller 212 is not particularly limited, but includes a clock signal CLK, a clock enable signal CKE, a chip select signal / CS, a column address strobe signal / CAS (a symbol / means that a signal to which this is attached is a row enable signal. ), External control signals such as row address strobe signal / RAS and write enable signal / WE, and control data from address input terminals A0 to A9 are supplied, based on the level change and timing of those signals. It forms an internal timing signal for controlling the operation mode of the SDRAM and the operation of the circuit block, and includes a control logic (not shown) and a mode register 30 for that purpose.

クロック信号CLKはSDRAMのマクタクロックとされ、その他の外部入力信号は当該クロック信号CLKの立ち上がりエッジに同期して有意とされる。チップセレクト信号/CSはそのロウレベルによってコマンド入力サイクルの開始を指示する。チップセレクト信号/CSがハイレベルのとき(チップ非選択状態)やその他の入力は意味を持たない。但し、後述するメモリバンクの選択状態やバースト動作などの内部動作はチップ非選択状態への変化によって影響されない。/RAS,/CAS,/WEの各信号は通常のDRAMにおける対応信号とは機能が相違され、後述するコマンドサイクルを定義するときに有意の信号とされる。   The clock signal CLK is the SDRAM's macter clock, and other external input signals are significant in synchronization with the rising edge of the clock signal CLK. The chip select signal / CS instructs the start of the command input cycle according to its low level. When the chip select signal / CS is at a high level (chip non-selected state) or other inputs are meaningless. However, internal operations such as a memory bank selection state and a burst operation, which will be described later, are not affected by the change to the chip non-selection state. Each of the signals / RAS, / CAS, / WE has a function different from that of a corresponding signal in a normal DRAM, and is a significant signal when defining a command cycle to be described later.

クロックイネーブル信号CKEは次のクロック信号の有効性を指示する信号であり、当該信号CKEがハイレベルであれば次のクロック信号CLKの立ち上がりエッジが有効とされ、ロウレベルのときには無効とされる。さらに、図示しないがリードモードにおいて、出力バッファ211に対するアウトプットイネーブルの制御を行う外部制御信号もコントローラ212に供給され、その信号が例えばハイレベルのときには出力バッファ211は高出力インピーダンス状態にされる。   The clock enable signal CKE is a signal that indicates the validity of the next clock signal. The rising edge of the next clock signal CLK is valid if the signal CKE is high level, and invalid when the signal CKE is low level. Further, although not shown, in the read mode, an external control signal for controlling output enable for the output buffer 211 is also supplied to the controller 212. When the signal is at a high level, for example, the output buffer 211 is brought into a high output impedance state.

上記ロウアドレス信号は、クロック信号CLKの立ち上がりエッジに同期する後述のロウアドレスストローブ・バンクアクティブコマンドサイクルにおけるA0〜A8のレベルによって定義される。   The row address signal is defined by the levels of A0 to A8 in a later-described row address strobe / bank active command cycle synchronized with the rising edge of the clock signal CLK.

A9からの入力は、上記ロウアドレスストローブ・バンクアクティブコマンドサイクルにおいてバンク選択信号とみなされる。即ち、A9の入力がロウレベルの時はメモリバンクBANKAが選択され、ハイレベルの時はメモリバンクBANKBが選択される。メモリバンクの選択制御は、特に制限されないが、選択メモリバンク側のロウデコーダのみの活性化、非選択メモリバンク側のカラムスイッチ回路の全非選択、選択メモリバンク側のみの入力バッファ210及び出力バッファ211への接続などの処理によって行うことができる。   The input from A9 is regarded as a bank selection signal in the row address strobe / bank active command cycle. That is, when the input of A9 is low level, the memory bank BANKA is selected, and when it is high level, the memory bank BANKB is selected. The selection control of the memory bank is not particularly limited, but only the row decoder on the selected memory bank side is activated, all the column switch circuits on the non-selected memory bank side are not selected, only the input buffer 210 and the output buffer on the selected memory bank side It can be performed by a process such as connection to 211.

後述のプリチャージコマンドサイクルにおけるA8の入力は相補データ線などに対するプリチャージ動作の態様を指示し、そのハイレベルはプリチャージの対象が双方のメモリバンクであることを指示し、そのロウレベルは、A9で指示されている一方のメモリバンクがプリチャージの対象であることを指示する。   An input of A8 in a precharge command cycle to be described later indicates a precharge operation mode for a complementary data line or the like, and its high level indicates that the objects of precharge are both memory banks, and its low level is A9. It is instructed that one of the memory banks instructed in is a target for precharge.

上記カラムアドレス信号は、クロック信号CLKの立ち上がりエッジに同期するリード又はライトコマンド(後述のカラムアドレス・リードコマンド、カラムアドレス・ライトコマンド)サイクルにおけるA0〜A7のレベルによって定義される。そして、この様にして定義されたカラムアドレスはバーストアクセスのスタートアドレスとされる。   The column address signal is defined by the levels of A0 to A7 in a read or write command (column address / read command, column address / write command described later) cycle synchronized with the rising edge of the clock signal CLK. The column address thus defined is used as a burst access start address.

次に、コマンドによって指示されるSDRAMの主な動作モードを説明する。
(1)モードレジスタセットコマンド(Mo)
上記モードレジスタ30をセットするためのコマンドであり、/CS,/RAS,/CAS,/WE=ロウレベルによって当該コマンド指定され、セットすべきデータ(レジスタセットデータ)はA0〜A9を介して与えられる。レジスタセットデータは、特に制限されないが、バーストレングス、CASレイテンシー、ライトモードなどとされる。特に制限されないが、設定可能なバーストレングスは、1,2,4,8,フルページ(256)とされ、設定可能なCASレイテンシーは1,2,3とされ、設定可能なライトモードは、バーストライトとシングルライトとされる。
Next, main operation modes of the SDRAM indicated by the command will be described.
(1) Mode register set command (Mo)
This is a command for setting the mode register 30, and is designated by / CS, / RAS, / CAS, / WE = low level, and data to be set (register set data) is given via A0 to A9. . The register set data is not particularly limited, but may be burst length, CAS latency, write mode, or the like. Although not particularly limited, the burst length that can be set is 1, 2, 4, 8, and full page (256), the CAS latency that can be set is 1, 2, and 3, and the write mode that can be set is burst. Light and single light.

上記CASレイテンシーは、後述のカラムアドレス・リードコマンドによって指示されるリード動作において/CASの立ち下がりから出力バッファ211の出力動作までにクロック信号CLKの何サイクル分を費やすかを指示するものである。読出しデータが確定するまでにはデータ読出しのための内部動作時間が必要とされ、それをクロック信号CLKの使用周波数に応じて設定するためのものである。換言すれば、周波数の高いクロック信号CLKを用いる場合にはCASレイテンシーを相対的に大きな値に設定し、周波数の低いクロック信号CLKを用いる場合にはCASレイテンシーを相対的に小さな値に設定する。   The CAS latency indicates how many cycles of the clock signal CLK are spent from the fall of / CAS to the output operation of the output buffer 211 in a read operation instructed by a column address / read command described later. An internal operation time for data reading is required until the read data is determined, and is used for setting it according to the frequency of use of the clock signal CLK. In other words, the CAS latency is set to a relatively large value when the clock signal CLK having a high frequency is used, and the CAS latency is set to a relatively small value when the clock signal CLK having a low frequency is used.

(2)ロウアドレスストローブ・バンクアクティブコマンド(Ac)
これは、ロウアドレスストローブの指示とA9によるメモリバンクの選択を有効にするコマンドであり、/CS,/RAS=ロウレベル、/CAS,/WE=ハイレベルによって指示され、このときA0〜A8に供給されるアドレスがロウアドレス信号として、A9に供給される信号がメモリバンクの選択信号として取り込まれる。取り込み動作は上述のようにクロック信号CLKの立ち上がりエッジに同期して行われる。例えば、当該コマンドが指定されると、それによって指定されるメモリバンクにおけるワード線が選択され、当該ワード線に接続されたメモリセルがそれぞれ対応する相補データ線に導通される。
(2) Row address strobe / bank active command (Ac)
This is a command for enabling the instruction of the row address strobe and the selection of the memory bank by A9, which is instructed by / CS, / RAS = low level, / CAS, / WE = high level, and is supplied to A0 to A8 at this time. The address supplied is taken as a row address signal, and the signal supplied to A9 is taken in as a memory bank selection signal. The capturing operation is performed in synchronization with the rising edge of the clock signal CLK as described above. For example, when the command is designated, the word line in the memory bank designated by the command is selected, and the memory cells connected to the word line are respectively conducted to the corresponding complementary data lines.

(3)カラムアドレス・リードコマンド(Re)
このコマンドは、バーストリード動作を開始するために必要なコマンドであると共に、カラムアドレスストローブの指示を与えるコマンドであり、/CS,/CAS=ロウレベル、/RAS,/WE=ハイレベルによって指示され、このときA0〜A7に供給されるカラムアドレスがカラムアドレス信号として取り込まれる。これによって取り込まれたカラムアドレス信号はバーストスタートアドレスとしてカラムアドレスカウンタ207に供給される。これによって指示されたバーストリード動作においては、その前にロウアドレスストローブ・バンクアクティブコマンドサイクルでメモリバンクとそれにおけるワード線の選択が行われており、当該選択ワード線のメモリセルは、クロック信号CLKに同期してカラムアドレスカウンタ207から出力されるアドレス信号に従って順次選択されて連続的に読出される。連続的に読出されるデータ数は上記バーストレングスによって指定された個数とされる。また、出力バッファ211からのデータ読出し開始は上記CASレイテンシーで規定されるクロック信号CLKのサイクル数を待って行われる。
(3) Column address / read command (Re)
This command is a command necessary for starting a burst read operation, and a command for giving an instruction of a column address strobe, which is indicated by / CS, / CAS = low level, / RAS, / WE = high level, At this time, the column address supplied to A0 to A7 is taken in as a column address signal. The column address signal thus fetched is supplied to the column address counter 207 as a burst start address. In the burst read operation instructed thereby, the memory bank and the word line in the row address strobe / bank active command cycle are selected before that, and the memory cell of the selected word line receives the clock signal CLK. Are sequentially selected according to the address signal output from the column address counter 207 and read continuously. The number of data continuously read out is the number specified by the burst length. Data read from the output buffer 211 is started after waiting for the number of cycles of the clock signal CLK defined by the CAS latency.

(4)カラムアドレス・ライトコマンド(Wr)
ライト動作の態様としてモードレジスタ30にバーストライトが設定されているときは当該バーストライト動作を開始するために必要なコマンドとされ、ライト動作の態様としてモードレジスタ30にシングルライトが設定されているときは当該シングルライト動作を開始するために必要なコマンドとされる。更に当該コマンドは、シングルライト及びバーストライトにおけるカラムアドレスストローブの指示を与える。当該コマンドは、/CS,/CAS,/WE=ロウレベル、/RAS=ハイレベルによって指示され、このときA0〜A7に供給されるアドレスがカラムアドレス信号として取り込まれる。これによって取り込まれたカラムアドレス信号はバーストライトにおいてはバーストスタートアドレスとしてカラムアドレスカウンタ207に供給される。これによって指示されたバーストライト動作の手順もバーストリード動作と同様に行われる。但し、ライト動作にはCASレイテンシーはなく、ライトデータの取り込みは当該カラムアドレス・ライトコマンドサイクルから開始される。
(4) Column address / write command (Wr)
When burst write is set in the mode register 30 as a mode of write operation, it is a command necessary to start the burst write operation, and when single write is set in the mode register 30 as a mode of write operation Is a command necessary to start the single write operation. Further, this command gives an instruction for column address strobe in single write and burst write. This command is instructed by / CS, / CAS, / WE = low level, / RAS = high level, and at this time, the address supplied to A0 to A7 is taken in as a column address signal. The column address signal thus fetched is supplied to the column address counter 207 as a burst start address in burst write. The procedure of the burst write operation instructed thereby is performed in the same manner as the burst read operation. However, there is no CAS latency in the write operation, and the capture of the write data is started from the column address / write command cycle.

(5)プリチャージコマンド(Pr)
これは、A8,A9によって選択されたメモリバンクに対するプリチャージ動作の開始コマンドとされ、/CS,/RAS,/WE=ロウレベル、/CAS=ハイレベルによって指示される。
(5) Precharge command (Pr)
This is a command for starting a precharge operation for the memory bank selected by A8, A9, and is designated by / CS, / RAS, / WE = low level, / CAS = high level.

(6)オートリフレッシュコマンド
このコマンドはオートリフレッシュを開始するために必要とされるコマンドであり、/CS,/RAS,/CAS=ロウレベル、/WE,CKE=ハイレベルによって指示される。
(6) Auto-refresh command This command is required to start auto-refresh, and is designated by / CS, / RAS, / CAS = low level, / WE, CKE = high level.

(7)バーストストップ・イン・フルページコマンド
フルページに対するバースト動作を全てのメモリバンクに対して停止させるために必要なコマンドであり、フルページ以外のバースト動作では無視される。このコマンドは、/CS,/WE=ロウレベル、/RAS,/CAS=ハイレベルによって指示される。
(7) Burst stop in full page command This command is required to stop the burst operation for a full page for all memory banks, and is ignored for burst operations other than full page. This command is indicated by / CS, / WE = low level, / RAS, / CAS = high level.

(8)ノーオペレーションコマンド(Nop)
これは実質的な動作を行わないこと指示するコマンドであり、/CS=ロウレベル、/RAS,/CAS,/WEのハイレベルによって指示される。
(8) No operation command (Nop)
This is a command for instructing that no substantial operation is performed, and is designated by / CS = low level, / RAS, / CAS, / WE high level.

SDRAMにおいては、一方のメモリバンクでバースト動作が行われているとき、その途中で別のメモリバンクを指定して、ロウアドレスストローブ・バンクアクティブコマンドが供給されると、当該実行中の一方のメモリバンクでの動作には何ら影響を与えることなく、当該別のメモリバンクにおけるロウアドレス系の動作が可能にされる。例えば、SDRAMは外部から供給されるデータ、アドレス、及び制御信号を内部に保持する手段を有し、その保持内容、特にアドレス及び制御信号は、特に制限されないが、メモリバンク毎に保持されるようになっている。或は、ロウアドレスストローブ・バンクアクティブコマンドサイクルによって選択されたメモリブロックにおけるワード線1本分のデータがカラム系動作の前に予め読み出し動作のために図示しないラッチ回路にラッチされるようになっている。   In the SDRAM, when a burst operation is performed in one memory bank, if another memory bank is specified in the middle of the SDRAM and a row address strobe / bank active command is supplied, one memory bank being executed The row address operation in another memory bank is enabled without affecting the operation in the bank. For example, an SDRAM has means for internally holding data, addresses, and control signals supplied from the outside, and the held contents, particularly addresses and control signals are not particularly limited, but are held for each memory bank. It has become. Alternatively, data for one word line in the memory block selected by the row address strobe / bank active command cycle is latched in advance in a latch circuit (not shown) for a read operation before a column-related operation. Yes.

したがって、データ入出力端子I/O0〜I/O15においてデータが衝突しない限り、処理が終了していないコマンド実行中に、当該実行中のコマンドが処理対象とするメモリバンクとは異なるメモリバンクに対するプリチャージコマンド、ロウアドレスストローブ・バンクアクティブコマンドを発行して、内部動作を予め開始させることが可能である。   Therefore, as long as data does not collide at the data input / output terminals I / O0 to I / O15, during execution of a command that has not been processed, a command for a memory bank different from the memory bank to be processed by the command being executed is stored. It is possible to start the internal operation in advance by issuing a charge command and a row address strobe / bank active command.

SDRAM22は、クロック信号CLKに同期してデータ、アドレス、制御信号を入出力できるため、DRAMと同様の大容量メモリをSRAMに匹敵する高速動作させることが可能であり、また、選択された1本のワード線に対して幾つのデータをアクセスするかをバーストレングスによって指定することによって、内蔵カラムアドレスカウンタ207で順次カラム系の選択状態を切り換えていって複数個のデータを連続的にリード又はライトできることが理解されよう。   Since the SDRAM 22 can input / output data, addresses, and control signals in synchronization with the clock signal CLK, it is possible to operate a large-capacity memory similar to the DRAM at a high speed comparable to that of the SRAM. By specifying the number of data to be accessed for each word line by burst length, the built-in column address counter 207 sequentially switches the column system selection state and reads or writes a plurality of data continuously. It will be understood that it can be done.

図36には、前記3次元画像処理等のための積和演算動作の一例を説明するためのブロック図が示されている。積和演算動作は、CPUと演算器(積和乗算器)及びキャッシュメモリとキャッシュメモリ制御回路とにより次のようにして行われる。   FIG. 36 is a block diagram for explaining an example of the product-sum operation for the three-dimensional image processing or the like. The product-sum operation is performed as follows by the CPU, the arithmetic unit (product-sum multiplier), the cache memory, and the cache memory control circuit.

同図において、CPUはデータバス(キャッシュバス)DB1を介してキャッシュメモリから読み出しされた命令コードを一時的に格納しておく命令レジスタIRと、読み出された命令コードをデコードして命令実行部等の制御信号を生成する制御回路と、演算処理を実行する命令実行部から構成される。命令実行部の内部では、アドレスバッファAB、ALU(演算論理ユニット)、内部レジスタ及びデータの入出力バッファDB等が内部Aバス、Bバス及びCバスに接続されて構成される。   In the figure, a CPU decodes an instruction register IR that temporarily stores an instruction code read from a cache memory via a data bus (cache bus) DB1, and an instruction execution unit that decodes the read instruction code. And the like, and a control circuit that generates a control signal and the like, and an instruction execution unit that executes arithmetic processing. Inside the instruction execution unit, an address buffer AB, ALU (arithmetic logic unit), an internal register, a data input / output buffer DB, and the like are connected to the internal A bus, B bus, and C bus.

CPUは、キャッシュメモリに格納されている命令コードをデータバスDB1を介して読み出し、命令レジスタIRに取り込む。取り込まれた命令コードは、制御回路によってデコードされ、CPU内部の制御信号を出力する。この制御信号によって、命令実行部は制御されて所望の演算が実行される。   The CPU reads the instruction code stored in the cache memory via the data bus DB1 and takes it into the instruction register IR. The fetched instruction code is decoded by the control circuit and outputs a control signal inside the CPU. By this control signal, the instruction execution unit is controlled to execute a desired operation.

この実施例では、乗算器がデータバスDB1とコマンド制御線COMDとウェイト制御線WAITとを介してCPUに接続され、この乗算器に内部状態信号CCを介してキャッシュメモリ制御回路が接続される。   In this embodiment, a multiplier is connected to the CPU via a data bus DB1, a command control line COMD, and a wait control line WAIT, and a cache memory control circuit is connected to this multiplier via an internal state signal CC.

乗算器には、CPUの制御回路からのコマンド制御信号が入力され、乗算器の内部状態は状態信号CCによりキャッシュメモリ制御回路に伝えられ、この状態信号CCとコマンド制御信号COMDによって乗算器の演算処理中に次の演算起動指令が発行された場合には、バスサイクルをウェイトさせるウェイト信号WAITが生成される。このウェイト信号WAITは、CPUの制御回路に入力される。   A command control signal from the control circuit of the CPU is input to the multiplier, and the internal state of the multiplier is transmitted to the cache memory control circuit by the state signal CC, and the multiplier operation is performed by the state signal CC and the command control signal COMD. When the next calculation start command is issued during processing, a wait signal WAIT for waiting for the bus cycle is generated. This wait signal WAIT is input to the control circuit of the CPU.

図37には、積和命令(MAC命令)を説明する説明図が示されている。同図には、前記3次元画像処理において、式1の行列式に対応した積和演算が例として示されている。同図において、IF又はifは命令フェッチ、IDはデコード、EXは演算or実行、MAはメモリアクセス、WBはライトバックをそれぞれ意味しており、mmは乗算器が動作している状態を表している。   FIG. 37 is an explanatory diagram for explaining a product-sum instruction (MAC instruction). In the same figure, the product-sum operation corresponding to the determinant of Equation 1 is shown as an example in the three-dimensional image processing. In the figure, IF or if indicates instruction fetch, ID indicates decode, EX indicates operation or execution, MA indicates memory access, WB indicates write back, and mm indicates a state in which the multiplier is operating. Yes.

積和レジスタの内容をクリアするために、CLRMAC命令が実行される。この命令により、演算器の積和出力レジスタの内容がクリアされる。続いて、1回目のMAC(積和命令)が実行される。この積和命令MACは、if−ID−EX−MA−MA−mm−mm−mmの8段で終了する。2番目のMAは、メモリ読み出しとともに乗算器の演算起動も行う。   To clear the contents of the multiply-accumulate register, a CLRMAC instruction is executed. This instruction clears the contents of the product-sum output register of the arithmetic unit. Subsequently, the first MAC (multiply-accumulate instruction) is executed. This sum-of-products instruction MAC ends in eight stages of if-ID-EX-MA-MA-mm-mm-mm. The second MA also starts the multiplier operation as well as reading the memory.

MAC命令の次命令のIDは、1スロット分後にストールされる。それ故、上記2つ目のMAC命令のIDが、1スロット分後にストールされる。この実施例のように、MAC命令が連続してくる場合、MAC命令の2番目のMAが、その前の乗算系命令によって発生したmmと競合した場合には、そのMAのバスサイクルは、mmが終了するまで引き伸ばされて(図ではM────Aのように表している。)、その引き伸ばされたMAは1つのスロットになる。同図において、点線で囲まれた部分は、上記mmとMAとが競合していることを示している。   The ID of the instruction next to the MAC instruction is stalled after one slot. Therefore, the ID of the second MAC instruction is stalled after one slot. As in this embodiment, when the MAC instruction is continuous, if the second MA of the MAC instruction competes with mm generated by the previous multiplication instruction, the bus cycle of the MA is mm. Is extended until it ends (indicated by M -------------------------------------------------------------------------------- In the figure, the portion surrounded by a dotted line indicates that the mm and MA are competing.

CPUの制御回路は、if−ID−EX−MAにより、順に命令フェッチし、上記MAC命令をデコードして、乗算すべきデータのあるキャッシュメモリのアドレスを生成し、このメモリアドレスをアドレスバッファABを通してアドレスバスAB1に出力して、キャッシュメモリからデータバスDB1 にデータを出力させる。データバス上に出力された演算すべきデータは、CPUには取り込まれずに、CPUからの信号COMDにより演算器が取り込んで、3スロットにわたって演算を行い出力レジスタに格納する。   The CPU control circuit sequentially fetches instructions using if-ID-EX-MA, decodes the MAC instruction, generates an address of a cache memory having data to be multiplied, and passes the memory address through an address buffer AB. The data is output to the address bus AB1, and data is output from the cache memory to the data bus DB1. The data to be calculated output on the data bus is not captured by the CPU, but is captured by the calculator based on the signal COMD from the CPU, performs calculations over three slots, and is stored in the output register.

以下、演算器は、連続してくるMAC命令により、前記のような行列式に対応して全部で4回の乗算と前の乗算結果にその乗算結果を加算して格納するという積和演算を行う。そして、最後にSTS命令により、上記演算結果をライトバックして1つの相対座標に対応した座標変換が行われる。   Hereinafter, the arithmetic unit performs a multiply-accumulate operation by adding a total of four multiplications corresponding to the determinant as described above and adding the multiplication result to the previous multiplication result in accordance with successive MAC instructions. Do. Finally, by the STS command, the calculation result is written back and coordinate conversion corresponding to one relative coordinate is performed.

図38には、除算器の一実施例のブロック図が示されている。同図において、JRは除数レジスタであり、除数を格納する32ビット幅のレジスタであり、特別の機能は持たない。HRLは被除数下位及び商保存レジスタであり、被除数の下位32ビットを格納するとともに、演算終了時には商32ビットが格納される。演算中は中間結果を格納するテンポラリレジスタとしても使用される。HRHは被除数の上位32ビットを格納するレジスタであり、32÷32演算の場合には、被除数の符号拡張を行うため、HRLのMSBの値がHRHの全ビットにコピーされる。演算終了時には結果の余が格納される。演算中は中間結果を格納するテンポラリレジスタとしても使用される。   FIG. 38 shows a block diagram of an embodiment of the divider. In the figure, JR is a divisor register, a 32-bit wide register for storing the divisor, and has no special function. HRL is a dividend lower and quotient storage register, which stores the lower 32 bits of the dividend and stores the quotient 32 bits at the end of the operation. It is also used as a temporary register for storing intermediate results during computation. HRH is a register that stores the upper 32 bits of the dividend. In the case of 32 ÷ 32 arithmetic, the sign of the dividend is sign-extended, so that the MSB value of the HRL is copied to all bits of the HRH. When the calculation is completed, the remainder of the result is stored. It is also used as a temporary register for storing intermediate results during computation.

CONTはコントロールレジスタであり、32ビットのうち2ビットから31ビットまではライトできず、0リードのみである。有効なビットはビット1とビット0の下位2ビットである。ビット0はOVF(オーバーフロー)のフラグである。オーバーフロー又はアンダーフローが生じたときには値がセットされる。   CONT is a control register, and 2 bits to 31 bits out of 32 bits cannot be written, and only 0 reading is performed. Valid bits are the lower 2 bits of bit 1 and bit 0. Bit 0 is an OVF (overflow) flag. A value is set when an overflow or underflow occurs.

ビット1はビット0に値がセットされたときに割り込み発生するか禁止するかを決定するフラグである。ビット1と0は、バスマスターからの0ライトによって行われる。オーバーフロー割り込みオフの状態で、オーバーフローが発生した場合はMAX値、アンダーフローが発生した場合MIN値を商にセットする。そして、オーバーフロー割り込みオンの状態で、オーバーフロー又はアンダーフローが発生した場合には、演算結果をそのまま商にセットする。   Bit 1 is a flag that determines whether an interrupt is generated or prohibited when a value is set in bit 0. Bits 1 and 0 are performed by a 0 write from the bus master. In the state where the overflow interrupt is off, the MAX value is set to the quotient when an overflow occurs, and the MIN value is set to a quotient when an underflow occurs. When an overflow or underflow occurs with the overflow interrupt turned on, the calculation result is set as it is in the quotient.

VCTは割り込みベクタであり、CONTのビット1を1にした状態で、オーバーフローが発生したときに出力する割り込みベクタを保存するレジスタである。初期値は上位16ビットが0で、下位16ビットが不定値である。   VCT is an interrupt vector, and is a register that stores an interrupt vector that is output when an overflow occurs with bit 1 of CONT set to 1. In the initial value, the upper 16 bits are 0, and the lower 16 bits are undefined.

RARは、余長期保存レジスタであり、演算終了時点での余を格納する32ビットのレジスタである。HRHとの違いは、演算中に中間結果を格納するテンポラリレジスタとして使用されることがなく、次の演算終了するまで、又はバスマスタからライトされるまで値を保存することが可能である。   RAR is a surplus storage register, and is a 32-bit register that stores the surplus at the end of the operation. The difference from HRH is that it is not used as a temporary register for storing an intermediate result during an operation, and it is possible to save a value until the next operation is completed or until it is written from the bus master.

RSRは、商長期保存レジスタであり、演算終了時点での商を格納する32ビットのレジスタである。HLHとの違いは、演算中に中間結果を格納するテンポラリレジスタとして使用されることがなく、次の演算終了するまで、又はバスマスタからライトされるまで値を保存することが可能である。   RSR is a quotient long-term storage register, and is a 32-bit register that stores the quotient at the end of the operation. The difference from HLH is that it is not used as a temporary register for storing an intermediate result during an operation, and it is possible to save a value until the next operation is completed or until it is written from the bus master.

FA&CLAはフルアダー及びキャリールックアヘッドであり、32ビットの加算器、引算器、キャリーの有無やゼロチェックを行う。AUFA&AUCLAは、1加算器であり、1減算は加算器の前後についているセレクタで値を反転することにより行う。LDMCAは、状態制御回路であり、バスマスタから乗算器内蔵レジスタへのライト制御、除算器演算中の演算サイクル制御及び演算結果のゼロチェックを行う論理回路からなる。LDMCBはオーバーフロー処理回路であり、除算演算でオーバーフローが発生したときの処理を行う制御論理回路である。LDPRMはI/O制御回路であり、除算器と周辺モジュールとのインターフェイスを行う制御論理回路である。   FA & CLA is a full adder and carry look ahead, and performs a 32-bit adder, subtractor, carry presence and zero check. AUFA & AUCLA is a 1 adder, and 1 subtraction is performed by inverting the value with a selector attached before and after the adder. The LDMCA is a state control circuit, and includes a logic circuit that performs write control from the bus master to the multiplier built-in register, operation cycle control during the divider operation, and zero check of the operation result. LDMCB is an overflow processing circuit, and is a control logic circuit that performs processing when an overflow occurs in a division operation. LDPRM is an I / O control circuit, which is a control logic circuit that interfaces a divider and peripheral modules.

図39は、上記除算器の動作を説明するための状態遷移図である。この実施例の除算器では、状態数が全部で42ある。同図の最上部の“000000”がレディ(ready)状態であり、リセット後はこの状態となる。通常の除算処理を行うのは左上の“000001”から、右下の“001100”までの38サイクルである。左列中央より上部、“100110”からの分岐がオーバーフロー発生時の処理で、ここから2サイクルでもとの状態に戻る。この他、レディ状態下の“000010”はライト/リード連続要求時の退避場所である。   FIG. 39 is a state transition diagram for explaining the operation of the divider. In the divider of this embodiment, there are a total of 42 states. “000000” at the top of the figure is in a ready state, and this state is obtained after resetting. Normal division processing is performed in 38 cycles from “000001” at the upper left to “001100” at the lower right. A branch from “100110” above the center of the left column is a process when an overflow occurs, and returns to the original state in two cycles from here. In addition, “000010” in the ready state is a save location at the time of a continuous write / read request.

上記除算器による除算の処理は大きく分けると次の5つに分類することができる。以下それぞれについて説明する。   The division processing by the divider can be roughly classified into the following five. Each will be described below.

(1)レディ状態(“000000”−“000010”)
“000000”は通常のレディ状態であり、“000010”はバスマスタから除算器へのアクセスにおいて、レジスタライト命令直後にレジスタリード命令が出された場合にのみ遷移する状態である。この実施例の除算器の構成では、バスマスタからレジスタライト命令直後にレジスタリード命令を発行されると、正常な値を出力することができない。したがって、バスマスタからレジスタライト命令直後にレジスタリード命令が発行された場合、通常のレディ状態“000000”とは異なり、バスマスタのリードのバスサイクルを延長させて正常なリードデータが準備できる時間を確保するための状態として、“000010”が設けられている。
(1) Ready state (“000000”-“000010”)
“000000” is a normal ready state, and “000010” is a state that transitions only when a register read command is issued immediately after a register write command in accessing the divider from the bus master. In the divider configuration of this embodiment, when a register read instruction is issued immediately after a register write instruction from the bus master, a normal value cannot be output. Therefore, when a register read instruction is issued immediately after the register write instruction from the bus master, unlike the normal ready state “000000”, the bus master read bus cycle is extended to ensure time for normal read data to be prepared. For this purpose, “000010” is provided.

(2)除算前処理(“000001”−“100001”)
非回帰法アルゴリズムに入る前準備期間である。“000001”はバスマスタからライトされたデータを除算器内部のHRLに転送するサイクルであり、“100001”は非回帰法の1サイクル目で使用する、“前回の演算結果のMSB(符号)”を求めるために使用される。
(2) Pre-division processing (“000001” − “100001”)
This is the preparation period before entering the non-regression algorithm. “000001” is a cycle for transferring data written from the bus master to the HRL in the divider, and “100001” is used in the first cycle of the non-regression method, “MSB (sign) of the previous calculation result”. Used to seek.

(3)非回帰法(“100011”−“001110”)
非回帰法の処理を33サイクル行う。ただし、33サイクル目(“001110”)は他と少しだけ異なる。結果の余は32サイクル目に求められるため、このサイクルにはHRHはデータを取り込まない。
(3) Non-regression method (“1000011”-“001110”)
Non-regression processing is performed for 33 cycles. However, the 33rd cycle (“001110”) is slightly different from the others. Since the remainder of the result is obtained at the 32nd cycle, HRH does not capture data in this cycle.

(4)除算後処理(“001110”−“001100”)
非回帰法で必要な事後処理用サイクルである。“001111”では余の足し戻し(引き戻し)と、商が負の場合の1加算を実行し、“001111”と“001101”の2状態で被除数が負で割り切れる場合の商・余補正を行っている。RAR、RSRへのセットは、“001110”,“001100”で行われる。
(4) Post-division processing (“001110”-“001100”)
This is a post-processing cycle necessary for the non-regression method. In “001111”, addition (retraction) of the remainder is performed, and 1 addition is performed when the quotient is negative, and quotient / residue correction is performed when the dividend is divisible by negative in two states “001111” and “001101”. Yes. RAR and RSR are set by “001110” and “001100”.

(5)オーバーフロー処理(“000110”−“000111”)
“000110”状態が点線で示されているのは、オーバーフロー状態への遷移が、普段状態遷移を司っている回路とは別の回路で行われるからである。また、この状態は、表面上1サイクルに見えない(“100110”と“000110”で半サイクルずつ)ので、点線で表している。“000111”ではRAR,RSRのセットを行っている。
(5) Overflow processing (“000110”-“000111”)
The “000110” state is indicated by a dotted line because the transition to the overflow state is performed by a circuit different from the circuit that normally controls the state transition. In addition, this state does not appear on the surface as one cycle (“100110” and “000110” each half cycle), and is represented by a dotted line. In “000111”, RAR and RSR are set.

このように除算器では、1つの除算に上記のように38サイクルもの長時間を費やすものである。このように実際には除算には比較的長い時間を費やすものであるにもかかわらず、前記図1のようなシステムとするとともに、図25のような並列演算処理を行うようにすることにより、上記除算による遠近処理と、積和演算等による座標変換とクリップ処理とを同時並行的に行うようにすることにより、実質的な3次元画像処理を大幅に高速にすることができる。   Thus, the divider spends a long time of 38 cycles for one division as described above. Thus, in spite of the fact that it takes a relatively long time for the division, the system shown in FIG. 1 and the parallel operation processing shown in FIG. 25 are performed. By performing the perspective processing by the division, the coordinate conversion by the product-sum operation, etc., and the clip processing at the same time, the substantial three-dimensional image processing can be significantly speeded up.

図40には、図1のシングルチップマイクロコンピュータの一実施例のレイアウト図が示されている。同図には、図1の各回路ブロックのうち、主要な回路が代表として例示的に示されている。各回路ブロックは、前記のようにバスが3つに分割されることに応じて、各バスが短く、かつ接続関係が容易になるよう配置されている。同図には、上記3に分割されたバスのうち、第1バスが示され、他の第2バス及び第3バスは、それらに対応した回路ブロックに隣接して配置されるものと理解されたい。   FIG. 40 shows a layout diagram of an embodiment of the single chip microcomputer of FIG. In the figure, the main circuits of the circuit blocks in FIG. 1 are exemplarily shown as representatives. Each circuit block is arranged so that each bus is short and the connection relationship is easy according to the fact that the bus is divided into three as described above. The figure shows the first bus among the three divided buses, and it is understood that the other second and third buses are arranged adjacent to the corresponding circuit blocks. I want.

中央処理装置CPUとキャッシュメモリのキャッシュデータ部CACHE−D1,D2は、第1バスを挟んで配置される。キャッシュメモリのキャッシュタグ部CACHE−Aとキャッシュコントロール部CACHE−Cは、乗算器MULTと並んで配置される。上記中央処理装置CPUとキャッシュメモリ及び乗算器MULTがチップの約上半分を占める。   The central processing unit CPU and the cache data portions CACHE-D1 and D2 of the cache memory are arranged across the first bus. The cache tag part CACHE-A and the cache control part CACHE-C of the cache memory are arranged side by side with the multiplier MULT. The central processing unit CPU, cache memory, and multiplier MULT occupy about the upper half of the chip.

バスステートコントローラBSCは、キャッシュデータ部CACHE−D1,D2とにより中央処理装置CPUを挟むように配置される。図示しない第2のバスに接続されるブレークコントローラUBCと除算器DIVUと割り込みコントロール回路INT1,INT2及び直接メモリアクセス制御装置DMACと、そのデータバッファDATA1,DATA2がチップの左下部に集中して配置される。   The bus state controller BSC is arranged so as to sandwich the central processing unit CPU between the cache data parts CACHE-D1 and D2. A break controller UBC, a divider DIVU, an interrupt control circuit INT1, INT2, a direct memory access control device DMAC, and its data buffers DATA1, DATA2 connected to a second bus (not shown) are concentrated in the lower left part of the chip. The

そして、図示しない第3のバスに接続されるタイマFRT,WDT及びシリアルコミニュケーションインターフェイスSCIが並んで配置される。これらの周辺モジュールは、そのバスサイクルが遅くされることにより、出力回路の動作が相対的に遅い、既存の回路をそのまま利用することにより、その占有面積が小さくできる。チップの周辺には、前記のような端子に対応した入力バッファ、出力バッファ及び入出力バッファが配置される。   Then, timers FRT and WDT connected to a third bus (not shown) and a serial communication interface SCI are arranged side by side. These peripheral modules have a relatively slow operation of the output circuit by slowing down the bus cycle. By using the existing circuit as it is, the occupied area can be reduced. Around the chip, an input buffer, an output buffer, and an input / output buffer corresponding to the above terminals are arranged.

図41には、この発明に係るシングルチップマイクロコンピュータの応用例が示されている。同図(A)には、そのブロック図が示され、(B)には外観図が示されている。この実施例では、ペン入力の携帯用マイクロコンピュータに向けられている。   FIG. 41 shows an application example of the single chip microcomputer according to the present invention. FIG. 2A shows a block diagram, and FIG. 2B shows an external view. This embodiment is directed to a pen input portable microcomputer.

この実施例では、(A)のブロック図に示すように、マイクロコンピュータ(microcomputer)が前記図1のようなシングルチップマイクロコンピュータにより構成されるものであり、それと外部メモリ(Memory)及びASIC(特定用途向IC)により構成される周辺LSIから構成される。端末装置としてLCDにペン入力機能を加えた表示装置や、音声入出力回路が設けられる。(B)の外観図に示すように、パームトップ型又はノートブック型のような薄型軽量で、LCD表示部にペン入力部が備えられ、キー入力用のスイッチパネルが設けられる。   In this embodiment, as shown in the block diagram of (A), the microcomputer is constituted by a single chip microcomputer as shown in FIG. 1, and it has an external memory (Memory) and an ASIC (specifically specified). It is composed of peripheral LSIs composed of application-specific ICs). As a terminal device, a display device in which a pen input function is added to an LCD and a voice input / output circuit are provided. As shown in the external view of (B), it is thin and light like a palmtop type or a notebook type, an LCD display unit is provided with a pen input unit, and a key input switch panel is provided.

図42には、図40のペン入力の携帯用マイクロコンピュータの一実施例のブロック図が示されている。シングルチップマイクロコンピュータMCUは、バッテリー(Battery)駆動される。マイクロフォン(Microphone)は、音声入力用に用いられる。スピーカー(Speaker) は音声出力用に用いられる。   FIG. 42 is a block diagram showing an embodiment of the pen-input portable microcomputer shown in FIG. The single chip microcomputer MCU is driven by a battery. The microphone is used for voice input. A speaker is used for audio output.

NCUは、電話回線用の入出力インターフェイスであり、電話器(Telephone) によるデータ入力又は出力を行うようにされる。マイクロコンピュータシステムとしては、外部バスにLCDコントローラを介して表示とペン入力を行うLCDパネルが設けられる。外部メモリとしてSDRAM又はPSRAMが用いられる。これらのメモリは、必要に応じて上記電池電圧によりバッテリーバックアップされる。   The NCU is an input / output interface for a telephone line, and performs data input or output by a telephone. As the microcomputer system, an LCD panel for performing display and pen input via an LCD controller is provided on an external bus. SDRAM or PSRAM is used as the external memory. These memories are backed up by the battery voltage as necessary.

マスクROMは、データ処理のためのプログラムや文字パターンが記憶される。PCMCIAI/Fは、パーソナル コンピュータ メモリカード インターナショナル アソシエイション(Personal Computer Memory Card International Association) インターフェイスである。I/Oは、無線LAN(ローカル・エリア・ネットワーク)等の拡張周辺インターフェイスである。そして、メモリカード(ROM card) と(RAM card) が脱着可能な外部メモリとして使用できるようにされる。   The mask ROM stores programs and character patterns for data processing. PCMCIAI / F is a Personal Computer Memory Card International Association interface. I / O is an extended peripheral interface such as a wireless LAN (local area network). The memory card (ROM card) and (RAM card) can be used as removable external memories.

上記の実施例から得られる作用効果は、下記の通りである。すなわち、
(1) 内部のバスを3つに分けて、第1のバスには中央処理装置及びキャッシュメモリが接続し、第2のバスには直接メモリアクセス制御回路、外部バスインターファイスを接続し、上記第1のバスと第2のバスには、上記第1のアドレスバスと第2のアドレスバスとを選択的にを接続させるバストランシーバ機能を持つブレークコントローラを設け、上記第1及び第2のバスサイクルに対して低速なバスサイクルとされた第3のバスには、周辺モジュールを接続し、上記第2のバスと第3のバスとの間でのデータ転送と同期化を行うバスステートコントローラを設けることにより、信号伝達経路の負荷容量が減少するので信号伝達が高速に行うことができるとともに、動作速度が要求されない周辺モジュールを分離しているため、そこでの電流消費を減らすことができるという効果が得られる。
The effects obtained from the above embodiment are as follows. That is,
(1) The internal bus is divided into three, a central processing unit and a cache memory are connected to the first bus, and a direct memory access control circuit and an external bus interface are connected to the second bus. The first bus and the second bus are provided with break controllers having a bus transceiver function for selectively connecting the first address bus and the second address bus, and the first and second buses are provided. A bus state controller that connects peripheral modules to the third bus, which is a low-speed bus cycle, and performs data transfer and synchronization between the second bus and the third bus. By providing, the load capacity of the signal transmission path is reduced, so that signal transmission can be performed at high speed and peripheral modules that do not require operation speed are separated. The effect that current consumption can be reduced is obtained.

(2) 内部のバスを3つに分けて、第1のバスには中央処理装置、上記第1のバスには、固定小数点方式の積和演算器を接続し、第2のバスには固定小数点方式の除算器を接続することにより、少ないサイクル数により積和演算処理が高速に行えるとともに、第2のバスには固定小数点方式の除算器を接続するものであるので、そこで演算結果をそのまま除算できるので3次元画像処理を高速に行うようにすることができるという効果が得られる。 (2) The internal bus is divided into three, a central processing unit is connected to the first bus, a fixed-point product-sum operation unit is connected to the first bus, and a fixed bus is connected to the second bus. By connecting a decimal-point divider, the product-sum operation can be performed at a high speed with a small number of cycles, and a fixed-point divider is connected to the second bus. Since division can be performed, an effect that three-dimensional image processing can be performed at high speed can be obtained.

(3) 上記第3のバスに接続される周辺モジュールとして、フリーランニングタイマ、シリアルコミュニケーションインターフェイス又はウォッチドッグタイマのうち何れか少なくとも1つを設けることにより、データ処理の高速化には直接関与しない周辺モジュール用の低速バスサイクルを構成することができ、中央処理装置の高速化に追従させることなく、既存の周辺モジュールをそのまま使用できるから設計の効率化と周辺モジュールにおける低消費電力化を図ることができるという効果が得られる。 (3) By providing at least one of a free running timer, a serial communication interface, or a watchdog timer as a peripheral module connected to the third bus, a peripheral that is not directly involved in increasing the speed of data processing A low-speed bus cycle for modules can be configured, and existing peripheral modules can be used as they are without following the increase in the speed of the central processing unit, so that design efficiency and power consumption in the peripheral modules can be reduced. The effect that it can be obtained.

(4) 上記ブレークコントローラは、直接メモリアクセス制御装置によるキャッシュメモリのデータの書き換えを監視する機能を持たせることにより、内部バスの分離による高速化や低消費電力化を図りつつ、直接メモリアクセス制御装置によるキャッシュメモリのデータの書き換えによるキャッシュデータの破壊を監視することができるという効果が得られる。 (4) The above break controller has a function of monitoring the rewriting of data in the cache memory by the direct memory access control device, thereby achieving direct memory access control while achieving high speed and low power consumption by separating the internal bus. It is possible to monitor the destruction of the cache data due to the rewriting of the data in the cache memory by the apparatus.

(5) 上記の各回路ブロックをフルスタティック型CMOS回路により構成し、各回路ブロック毎にクロックパルスの供給/停止を制御するレジスタを含む動作モードコントローラを設けることにより、必要な回路ブロックに対してのみクロックを供給することができるから低消費電力化を図ることができるという効果が得られる。 (5) Each circuit block is configured by a full static CMOS circuit, and an operation mode controller including a register for controlling supply / stop of a clock pulse is provided for each circuit block. Since only the clock can be supplied, the effect of reducing power consumption can be obtained.

(6) 上記外部バスインターフェイスは、シンクロナスダイナミック型RAMのバーストリードモード及びシングルライトモードとダイナミック型RAM及び擬似スタティック型RAMを直接アクセスできるインターフェイス機能を持たせることにより、直接にシンクロナスダイナミック型RAM、ダイナミック型RAM及び擬似スタティック型RAM等を直接接続できるから使い勝手を良くすることができるという効果が得られる。 (6) The external bus interface has an interface function that allows direct access to the burst read mode and single write mode of the synchronous dynamic RAM, the dynamic RAM, and the pseudo static RAM, so that the synchronous dynamic RAM directly Since a dynamic RAM, a pseudo static RAM, and the like can be directly connected, an effect of improving usability can be obtained.

(7) 外部バスインターフェイスのクロックパルスに対して位相を遅らせてクロックパルスを形成して中央処理装置に供給させることにより、シンクロナスダイナミック型RAMのセットアップ/ホールド時間を確保でき動作マージンの拡大を図ることができるという効果が得られる。 (7) By delaying the phase with respect to the clock pulse of the external bus interface and forming the clock pulse and supplying it to the central processing unit, the setup / hold time of the synchronous dynamic RAM can be secured and the operation margin can be expanded. The effect that it can be obtained.

(8) シンクロナスダイナミック型RAMのバーストモードにより読み出されるデータと上記キャッシュメモリの1ブロックのデータ及び直接メモリアクセス制御装置による単位のデータ転送とには整合性を持たせることにより、効率のよいデータ転送が可能になるという効果が得られる。 (8) Efficient data can be obtained by providing consistency between the data read in the burst mode of the synchronous dynamic RAM, the data of one block of the cache memory, and the unit data transfer by the direct memory access control device. The effect that transfer becomes possible is acquired.

(9) 外部バスインターフェイスにおいて、中央処理装置が特定のアドレス空間をアクセスすることにより起動がかけられて、ロウアドレスストローブ信号、カラムアドレスストローブ信号及びライトイネーブル信号を共にロウレベルにし、アドレス信号の一部を用いてシンクロナスダイナミック型RAMの動作モード設定の設定に必要な制御信号を発生させるメモリ制御信号発生回路を設けることにより、中央処理装置によるシンクロナスダイナミック型RAMのモード設定を簡単に行うことができるという効果が得られる。 (9) In the external bus interface, the central processing unit is activated by accessing a specific address space, and both the row address strobe signal, the column address strobe signal and the write enable signal are set to the low level, and a part of the address signal By providing a memory control signal generation circuit for generating a control signal necessary for setting the operation mode setting of the synchronous dynamic RAM using the CPU, the mode setting of the synchronous dynamic RAM can be easily performed by the central processing unit. The effect that it can be obtained.

(10) 上記キャッシュメモリとしては、複数からなるタグメモリ及びそれぞれに対応したデータメモリにより構成し、上記タグメモリ及びデータメモリにはCMOSスタティック型メモリセルを用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路と、かかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いることにより、信号増幅を行った後には直流電流が流れなくできるからキャッシュメモリにおける低消費電力化を図ることができるという効果が得られる。 (10) The cache memory is composed of a plurality of tag memories and corresponding data memories. The tag memory and the data memory use CMOS static memory cells as sense amplifiers that amplify read signals. A DC current flows after signal amplification by using a CMOS sense amplifier comprising a CMOS latch circuit and a power switch MOSFET comprising a P-channel MOSFET and an N-channel MOSFET for supplying an operating current to the CMOS latch circuit. As a result, the power consumption of the cache memory can be reduced.

(11) 上記複数からなるデータメモリに設けられるセンスアンプ又はセンスアンプとワード線の双方を、タグメモリからのヒット信号に対応したもののみを活性化させるようにすることにより、低消費電力化を図ることができるという効果が得られる。 (11) Low power consumption can be achieved by activating both sense amplifiers or sense amplifiers and word lines provided in the plurality of data memories corresponding to the hit signal from the tag memory. The effect that it can plan is acquired.

(12) 上記複数からなるデータメモリは、キャッシュコントローラによって全部又は一部についてタグメモリからのヒット信号の伝達を無効にして中央処理装置による直接アクセスを可能にすることにより、ユーザーの多様な要求に応じた使い方に適合できるという効果が得られる。 (12) The above-mentioned plurality of data memories can be directly accessed by the central processing unit by disabling the transmission of hit signals from the tag memory in whole or in part by the cache controller, thereby satisfying various requests of users. The effect that it can be adapted to the usage.

(13) 中央処理装置とキャシュメモリとを含むシングルチップのマイクロコンピュータにおいて、キャッシュメモリとしてCMOSスタティック型メモリセルを記憶素子として用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路及びかかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いることにより、センスアンプでの信号増幅を行った後には直流電流が流れないから内蔵キャッシュメモリでの低消費電力化を図ることができるという効果が得られる。 (13) In a single-chip microcomputer including a central processing unit and a cache memory, a CMOS static memory cell is used as a memory element as a cache memory, and a CMOS latch circuit and a CMOS latch circuit as a sense amplifier for amplifying the read signal Built-in cache memory because a DC current does not flow after signal amplification with the sense amplifier by using a CMOS sense amplifier comprising a power switch MOSFET comprising a P-channel MOSFET and an N-channel MOSFET for supplying an operating current to The effect that the power consumption can be reduced is obtained.

(14) 上記複数からなるデータメモリは、タグメモリからのヒット信号に対応したもののセンスアンプのみを活性化させることにより、キャッシュメモリ内蔵のシングルチップのマイクロコンピュータの低消費電力化を図ることができるという効果が得られる。 (14) Although the plurality of data memories correspond to the hit signal from the tag memory, only the sense amplifier is activated, so that the power consumption of the single-chip microcomputer incorporating the cache memory can be reduced. The effect is obtained.

(15) バス使用権制御信号に従ってスレーブモードに設定されたときには第1の端子をバスリクエスト信号に、第2の端子をバスアクノリッジ信号にそれぞれ使用し、マスターモードにされるとき上記第1の端子をバスグラント信号に、上記第2の端子をバスレリーズ信号にそれぞれ切り換えて使用することにより、1つのシングルチップマイクロコンピュータがバス使用権制御信号に従ってスレーブモード又はマスターモードとして使用でき、しかも同じ端子を切り換えて使用するものであるから、外部端子数が減るとともに接続が簡単となって使い勝手が良くなるという効果が得られる。 (15) When the slave mode is set according to the bus use right control signal, the first terminal is used for the bus request signal, the second terminal is used for the bus acknowledge signal, and when the master mode is set, the first terminal By switching the second terminal to the bus release signal and using the second terminal as the bus release signal, one single chip microcomputer can be used as the slave mode or the master mode according to the bus use right control signal, and the same terminal can be used. Since they are used by switching, the effects of reducing the number of external terminals and simplifying the connection and improving the usability can be obtained.

(16) 遠近処理されたN−1番目座標に対するクリピング処理を中央処理装置により行い、特定の物体固有のN+1番目座標点を指定された視点を原点とする座標に変換する座標変換処理を中央処理装置と積和演算器により行い、上記クリッピング処理と座標変換処理と時間的に並行して座標変換処理が終わったN番目座標について遠近処理を除算器により行うことにより、中央処理装置又はこれと積和演算器によるクリピング処理と座標変換処理と時間的に同時並行して比較的長い時間を費やす遠近処理を除算器により行うことにより、高速な3次元画像処理が実現できるという効果が得られる。 (16) A central processing unit performs a clipping process on the N−1th coordinate subjected to the perspective processing, and converts the N + 1th coordinate point unique to a specific object into a coordinate having the designated viewpoint as the origin. A central processing unit or a product of the central processing unit or the product thereof by performing a perspective process on the Nth coordinate after the coordinate conversion process is completed in parallel with the clipping process and the coordinate conversion process. An effect that high-speed three-dimensional image processing can be realized can be obtained by performing the perspective processing that consumes a relatively long time in parallel with the clipping processing and the coordinate conversion processing by the sum calculator by the divider.

(17) 上記中央処理装置と積和演算器はキャッシュメモリとともに第1のバスに接続され、上記除算器は直接メモリアクセス制御回路、外部バスインターファイスとともに第2のバスに接続され、上記第1と第2のバスに接続されるとともに、第1のバスのアドレスバスを第2のバスのアドレスバスに選択的に接続させるバストランシーバ機能を持つブレークコントローラが設けられ、上記第1及び第2のバスサイクルに対して低速なバスサイクルを持つ周辺モジュールが接続される第3のバスと、上記第2のバスと第3のバスとの間での信号転送と同期化を行うバスステートコントローラとが設けられるシングルチップのマイクロコンピュータにより上記3次元画像処理を行うことにより、比較的簡単な構成により高速な3次元画像処理を実現することができるという効果が得られる。 (17) The central processing unit and the product-sum operation unit are connected to the first bus together with the cache memory, and the divider is connected to the second bus together with the direct memory access control circuit and the external bus interface. And a break controller having a bus transceiver function for selectively connecting the address bus of the first bus to the address bus of the second bus. A third bus to which peripheral modules having a low-speed bus cycle with respect to the bus cycle are connected, and a bus state controller that performs signal transfer and synchronization between the second bus and the third bus. By performing the above three-dimensional image processing with a single-chip microcomputer provided, high-speed three-dimensional image processing can be achieved with a relatively simple configuration. Effect that can be achieved.

以上本発明者よりなされた発明を実施例に基づき具体的に説明したが、本願発明は前記実施例に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。例えば、図1の実施例において、中央処理装置CPUは、RISC型プロセッサである必要はなく、種々の実施形態を採ることができる。この実施例のシングルチップマイクロコンピュータは、前記のような各回路ブロックを登録しておいて、ユーザーの仕様に応じて必要な回路ブロックを搭載するというASICにより構成するものであってもよい。   The invention made by the inventor has been specifically described based on the embodiments. However, the invention of the present application is not limited to the embodiments, and various modifications can be made without departing from the scope of the invention. Nor. For example, in the embodiment of FIG. 1, the central processing unit CPU does not have to be a RISC type processor, and various embodiments can be adopted. The single-chip microcomputer of this embodiment may be constituted by an ASIC in which each circuit block as described above is registered and necessary circuit blocks are mounted according to user specifications.

本願におけるシングルチップマイクロコンピュータとは、ROMとRAMを内蔵したマイクロコンピュータという狭い意味ではなく、1個の半導体基板上に形成されてなるデータ処理装置といような広い意味で用いている。それ故、本願に係るシングルチッブマイクロコンピュータは、中央処理装置と、積和演算器と、除算器とを有し、少なくとも上記積和演算器と除算器とが並列処理可能とされ、単一の半導体基板上に形成されてなるデータ処理装置というように表現できる。あるいは、連続読み出し可能な外部メモリが接続可能とされ、キャッシュメモリと、上記キャッシュメモリと1ラインのデータ長に等しいデータを外部メモリから連続して読み込み可能な手段とを単一の半導体基板上に備えてなるデータ処理装置ともいうことができる。   The single-chip microcomputer in the present application is not limited to a narrow meaning of a microcomputer incorporating a ROM and a RAM, but is used in a broad sense such as a data processing device formed on one semiconductor substrate. Therefore, the single chip microcomputer according to the present application has a central processing unit, a product-sum calculator, and a divider, and at least the product-sum calculator and the divider can be processed in parallel, It can be expressed as a data processing device formed on a semiconductor substrate. Alternatively, an external memory capable of continuous reading is connectable, and the cache memory and the means capable of continuously reading data equal to the data length of one line from the external memory on the single semiconductor substrate. It can also be referred to as a data processing apparatus provided.

また、モード設定可能な外部メモリが接続可能とされ、上記モード設定をするためのデータバス端子以外の外部端子を介して上記メモリに転送可能な手段を単一の半導体基板上に備えてなるデータ処理装置ということもできる。さらに、クロックに同期して、アドレス、データを入出力する外部メモリが接続可能とされるデータ処理装置であって、上記メモリ及び当該データ処理装置に必要なクロックを形成する手段を単一の半導体基板上に形成してなるデータ処理装置、あるいは32ビット単位でメモリアクセスし、16ビット固定長命令を実行する中央処理装置と、命令/データ混在型のキャッシュメモリとを具備し、メモリからのロード/ストアを行う命令を偶数ワード・バウンダリに置くようにしてなるデータ処理装置ともいうことができる。   Further, the data can be connected to an external memory capable of mode setting, and includes means on a single semiconductor substrate capable of being transferred to the memory via an external terminal other than the data bus terminal for setting the mode. It can also be called a processing device. Further, the data processing apparatus can be connected to an external memory for inputting and outputting addresses and data in synchronization with the clock, and the means for forming the clock necessary for the memory and the data processing apparatus is a single semiconductor. A data processing device formed on a substrate, or a central processing unit that accesses a memory in 32-bit units and executes a 16-bit fixed-length instruction, and an instruction / data mixed type cache memory, and loads from the memory It can also be referred to as a data processing device in which an instruction for storing is placed on an even word boundary.

この発明は、上記のような広い意味でのシングルチップマイクロコンピュータ及びそれを用いた3次元画像処理に適用できるものである。   The present invention can be applied to the single chip microcomputer in the broad sense as described above and three-dimensional image processing using the same.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば、下記の通りである。すなわち、内部のバスを3つに分けて、第1のバスには中央処理装置及びキャッシュメモリが接続し、第2のバスには直接メモリアクセス制御回路、外部バスインターフェイスを接続し、上記第1のバスと第2のバスには、上記第1のアドレスバスと第2のアドレスバスとを選択的にを接続させるバストランシーバ機能を持つブレークコントローラを設け、上記第1及び第2のバスサイクルに対して低速なバスサイクルとされた第3のバスには、周辺モジュールを接続し、上記第2のバスと第3のバスとの間でのデータ転送と同期化を行うバスステートコントローラを設けることにより、信号伝達経路の負荷容量が減少するので信号伝達が高速に行うことができるとともに、動作速度が要求されない周辺モジュールを分離しているため、そこでの電流消費を減らすことができる。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows. That is, the internal bus is divided into three, a central processing unit and a cache memory are connected to the first bus, a direct memory access control circuit and an external bus interface are connected to the second bus, and the first bus The bus and the second bus are provided with a break controller having a bus transceiver function for selectively connecting the first address bus and the second address bus to the first and second bus cycles. On the other hand, the third bus, which is a low-speed bus cycle, is provided with a bus state controller for connecting peripheral modules and performing data transfer and synchronization between the second bus and the third bus. Since the load capacity of the signal transmission path is reduced, signal transmission can be performed at high speed, and peripheral modules that do not require operation speed are separated. It is possible to reduce the current consumption of.

内部のバスを3つに分けておき、第1のバスには中央処理装置、上記第1のバスには、固定小数点方式の積和演算器を接続し、第2のバスには固定小数点方式の除算器を接続することにより、少ないサイクル数により積和演算処理が高速に行えるとともに、第2のバスには固定小数点方式の除算器を接続するものであるので、正規化処理がなくそこで演算結果をそのまま除算できるので3次元画像処理を高速に行うようにすることができる。   The internal bus is divided into three, a central processing unit is connected to the first bus, a fixed-point product-sum calculator is connected to the first bus, and a fixed-point method is connected to the second bus. By connecting this divider, the product-sum operation can be performed at a high speed with a small number of cycles, and a fixed-point divider is connected to the second bus. Since the result can be divided as it is, three-dimensional image processing can be performed at high speed.

上記第3のバスに接続される周辺モジュールとして、フリーランニングタイマ、シリアルコミュニケーションインターフェイス又はウォッチドッグタイマのうち何れか少なくとも1つを設けることにより、データ処理の高速化には直接関与しない周辺モジュール用の低速バスサイクルを構成することができ、中央処理装置の高速化に追従させることなく、既存の周辺モジュールをそのまま使用できるから設計の効率化と周辺モジュールにおける低消費電力化を図ることができる。   By providing at least one of a free-running timer, a serial communication interface, or a watchdog timer as a peripheral module connected to the third bus, it is for a peripheral module that is not directly involved in speeding up data processing. A low-speed bus cycle can be configured, and existing peripheral modules can be used as they are without following the increase in the speed of the central processing unit, so that design efficiency and power consumption in the peripheral modules can be reduced.

上記ブレークコントローラは、直接メモリアクセス制御装置によるキャッシュメモリのデータの書き換えを監視する機能を持たせることにより、内部バスの分離による高速化や低消費電力化を図りつつ、直接メモリアクセス制御装置によるキャッシュメモリのデータの書き換えによるキャッシュデータの破壊を監視することができる。   The break controller has a function of monitoring the rewriting of data in the cache memory by the direct memory access control device, thereby increasing the speed and reducing the power consumption by separating the internal bus, and the cache by the direct memory access control device. It is possible to monitor the destruction of cache data due to rewriting of data in the memory.

上記の各回路ブロックをフルスタティック型CMOS回路により構成し、各回路ブロック毎にクロックパルスの供給/停止を制御するレジスタを含む動作モードコントローラを設けることにより、必要な回路ブロックに対してのみクロックを供給することができるから低消費電力化を図ることができる。   Each circuit block is configured by a full static CMOS circuit, and an operation mode controller including a register for controlling supply / stop of a clock pulse is provided for each circuit block, so that a clock is supplied only to a necessary circuit block. Since it can be supplied, power consumption can be reduced.

上記外部バスインターフェイスは、シンクロナスダイナミック型RAMのバーストリードモード及びシングルライトモードとダイナミック型RAM及び擬似スタティック型RAMを直接アクセスできるインターフェイス機能を持たせることにより、直接にシンクロナスダイナミック型RAM、ダイナミック型RAM及び擬似スタティック型RAM等を直接接続できるから使い勝手を良くすることができる。   The external bus interface has an interface function that allows direct access to the burst read mode and single write mode of the synchronous dynamic RAM, the dynamic RAM, and the pseudo static RAM, so that the synchronous dynamic RAM and the dynamic RAM can be directly used. In addition, since a pseudo static RAM or the like can be directly connected, usability can be improved.

外部バスインターフェイスとしては、中央処理装置のクロックパルスに対して位相が進められたクロックパルスを形成してシンクロナスダイナミック型RAMのクロック端子に供給させることにより、シンクロナスダイナミック型RAMのセットアップ/ホールド時間を確保でき動作マージンの拡大を図ることができる。   As an external bus interface, a synchronous dynamic RAM setup / hold time is formed by forming a clock pulse whose phase is advanced with respect to the clock pulse of the central processing unit and supplying it to the clock terminal of the synchronous dynamic RAM. Can be secured, and the operation margin can be expanded.

シンクロナスダイナミック型RAMのバーストモードにより読み出されるデータと上記キャッシュメモリの1ブロックのデータ及び直接メモリアクセス制御装置による単位のデータ転送とには整合性を持たせることにより、効率のよいデータ転送が可能になる。   Efficient data transfer is possible by providing consistency between the data read in the burst mode of the synchronous dynamic RAM, the data of one block of the cache memory, and the unit data transfer by the direct memory access control device. become.

外部バスインターフェイスにおいて、中央処理装置が特定のアドレス空間をアクセスすることにより起動がかけられて、ロウアドレスストローブ信号、カラムアドレスストローブ信号及びライトイネーブル信号を共にロウレベルにし、アドレス信号の一部を用いてシンクロナスダイナミック型RAMの動作モード設定の設定に必要な制御信号を発生させるメモリ制御信号発生回路を設けることにより、中央処理装置によるシンクロナスダイナミック型RAMのモード設定を簡単に行うことができる。   In the external bus interface, the central processing unit is activated by accessing a specific address space, and the row address strobe signal, the column address strobe signal and the write enable signal are all set to the low level, and a part of the address signal is used. By providing a memory control signal generation circuit for generating a control signal necessary for setting the operation mode setting of the synchronous dynamic RAM, the mode setting of the synchronous dynamic RAM can be easily performed by the central processing unit.

上記キャッシュメモリとしては、複数からなるタグメモリ及びそれぞれに対応したデータメモリにより構成し、上記タグメモリ及びデータメモリにはCMOSスタティック型メモリセルを用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路と、かかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いることにより、信号増幅を行った後には直流電流が流れなくできるからキャッシュメモリにおける低消費電力化を図ることができる。   The cache memory is composed of a plurality of tag memories and corresponding data memories. The tag memory and the data memory use CMOS static memory cells, and a CMOS latch circuit as a sense amplifier that amplifies the read signal. In addition, by using a CMOS sense amplifier composed of a power switch MOSFET composed of a P-channel MOSFET and an N-channel MOSFET for supplying an operating current to the CMOS latch circuit, a direct current can be prevented from flowing after signal amplification. It is possible to reduce power consumption in the cache memory.

上記複数からなるデータメモリに設けられるセンスアンプ又はセンスアンプとワード線を、タグメモリからのヒット信号に対応したもののみを活性化させるようにすることにより、低消費電力化を図ることができる。   By activating only the sense amplifiers or sense amplifiers and word lines provided in the plurality of data memories corresponding to the hit signal from the tag memory, power consumption can be reduced.

上記複数からなるデータメモリは、キャッシュコントローラによって全部又は一部についてタグメモリからのヒット信号の伝達を無効にして中央処理装置による直接アクセスを可能にすることにより、ユーザーの多様な要求に応じた使い方に適合できる。   The above-mentioned plurality of data memories can be directly used by the central processing unit by disabling the transmission of hit signals from the tag memory in whole or in part by the cache controller, so that it can be used according to various requests of users. Can be adapted.

中央処理装置とキャシュメモリとを含むシングルチップのマイクロコンピュータにおいて、キャッシュメモリとしてCMOSスタティック型メモリセルを記憶素子として用い、その読み出し信号を増幅するセンスアンプとしてCMOSラッチ回路及びかかるCMOSラッチ回路に動作電流を供給するPチャンネル型MOSFETとNチャンネル型MOSFETからなるパワースイッチMOSFETからなるCMOSセンスアンプを用いることにより、センスアンプでの信号増幅を行った後には直流電流が流れないから内蔵キャッシュメモリでの低消費電力化を図ることができる。   In a single-chip microcomputer including a central processing unit and a cache memory, a CMOS static memory cell is used as a memory element as a cache memory, and a CMOS latch circuit as a sense amplifier for amplifying the read signal and an operating current in the CMOS latch circuit By using a CMOS sense amplifier composed of a power switch MOSFET composed of a P-channel MOSFET and an N-channel MOSFET for supplying DC, a direct current does not flow after signal amplification with the sense amplifier. Power consumption can be reduced.

上記複数からなるデータメモリは、タグメモリからのヒット信号に対応したもののセンスアンプ又はセンスアンプとワード線のみを活性化させることにより、キャッシュメモリ内蔵のシングルチップのマイクロコンピュータの低消費電力化を図ることができる。   The plurality of data memories correspond to the hit signal from the tag memory, but only the sense amplifier or the sense amplifier and the word line are activated, thereby reducing the power consumption of the single-chip microcomputer incorporating the cache memory. be able to.

バス使用権制御信号に従ってスレーブモードに設定されたときには第1の端子をバスリクエスト信号に、第2の端子をバスアクノリッジ信号にそれぞれ使用し、マスターモードにされるとき上記第1の端子をバスグラント信号に、上記第2の端子をバスレリーズ信号にそれぞれ切り換えて使用することにより、1つのシングルチップマイクロコンピュータがバス使用権制御信号に従ってスレーブモード又はマスターモードとして使用でき、しかも同じ端子を切り換えて使用するものであるから、外部端子数が減るとともに接続が簡単となって使い勝手が良くなる。   When the slave mode is set according to the bus usage right control signal, the first terminal is used as a bus request signal and the second terminal is used as a bus acknowledge signal. When the master mode is set, the first terminal is used as a bus grant. By switching and using the second terminal as a bus release signal for each signal, one single-chip microcomputer can be used as a slave mode or a master mode according to the bus use right control signal, and the same terminal can be switched for use. As a result, the number of external terminals is reduced and the connection is simplified, improving usability.

遠近処理されたN−1番目座標に対するクリピング処理を中央処理装置により行い、特定の物体固有のN+1番目座標点を指定された視点を原点とする座標に変換する座標変換処理を中央処理装置と積和演算器により行い、上記クリッピング処理と座標変換処理と時間的に並行して座標変換処理が終わったN番目座標について遠近処理を除算器により行うことにより、中央処理装置又はこれと積和演算器によるクリピング処理と座標変換処理と時間的に同時並行して比較的長い時間を費やす遠近処理を除算器により行うことにより、高速な3次元画像処理が実現できる。   The central processing unit performs a clipping process on the (N−1) th coordinate subjected to the perspective processing, and performs a coordinate conversion process for converting the N + 1th coordinate point unique to a specific object into a coordinate having the designated viewpoint as the origin. A central processing unit or a product-sum operation unit is obtained by performing a perspective process on the Nth coordinate after the coordinate conversion process is completed in parallel with the clipping process and the coordinate conversion process. High-speed three-dimensional image processing can be realized by performing a perspective process that consumes a relatively long time in parallel with the clipping process and the coordinate conversion process by using a divider.

上記中央処理装置と積和演算器はキャッシュメモリとともに第1のバスに接続され、上記除算器は直接メモリアクセス制御回路、外部バスインターファイスとともに第2のバスに接続され、上記第1と第2のバスに接続されるとともに、第1のバスのアドレスバスを第2のバスのアドレスバスに選択的に接続させるバストランシーバ機能を持つブレークコントローラが設けられ、上記第1及び第2のバスサイクルに対して低速なバスサイクルを持つ周辺モジュールが接続される第3のバスと、上記第2のバスと第3のバスとの間での信号転送と同期化を行うバスステートコントローラとが設けられるシングルチップのマイクロコンピュータにより上記3次元画像処理を行うことにより、比較的簡単な構成により高速な3次元画像処理を実現することができる。   The central processing unit and the product-sum operation unit are connected to the first bus together with the cache memory, and the divider is directly connected to the second bus together with the memory access control circuit and the external bus interface. And a break controller having a bus transceiver function for selectively connecting the address bus of the first bus to the address bus of the second bus, and the first and second bus cycles. A single bus provided with a third bus to which a peripheral module having a low-speed bus cycle is connected, and a bus state controller for performing signal transfer and synchronization between the second bus and the third bus. By performing the above three-dimensional image processing by the chip microcomputer, high-speed three-dimensional image processing is realized with a relatively simple configuration. It is possible.

この発明は、高性能、高機能で家庭用ゲーム機や携帯型情報通信端末機器等に好適な半導体集積回路装置、データ処理装置及びマイクロコンピュータ等に広く利用することができる。   The present invention can be widely used for a semiconductor integrated circuit device, a data processing device, a microcomputer, and the like which are high performance and high function and suitable for a home game machine, a portable information communication terminal device, and the like.

この発明に係るシングルチップマイクロコンピュータの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a single chip microcomputer according to the present invention. FIG. この発明に係るシングルチップマイクロコンピュータの一実施例の左半分を示すピン配置図である。It is a pin arrangement | positioning figure which shows the left half of one Example of the single chip microcomputer based on this invention. この発明に係るシングルチップマイクロコンピュータの一実施例の右半分を示すピン配置図である。It is a pin arrangement | positioning figure which shows the right half of one Example of the single chip microcomputer based on this invention. この発明に係るシングルチップマイクロコンピュータに内蔵される動作モードコントローラMCの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of an operation mode controller MC built in a single chip microcomputer according to the present invention. FIG. この発明に係るシングルチップマイクロコンピュータに内蔵されるブレークコントローラUBCの基本的な一実施例を示すブロック図である。It is a block diagram which shows one basic Example of the break controller UBC built in the single chip microcomputer based on this invention. この発明に係るシングルチップマイクロコンピュータに内蔵されるブレークコントローラUBCの一実施例を示す詳細なブロック図である。It is a detailed block diagram showing an embodiment of a break controller UBC built in a single chip microcomputer according to the present invention. この発明に係るシングルチップマイクロコンピュータに内蔵されるバスステートコントローラBSCの一実施例を示すブロック図である。It is a block diagram showing an embodiment of a bus state controller BSC built in a single chip microcomputer according to the present invention. この発明に係るシングルチップマイクロコンピュータに内蔵されるバスステートコントローラBSCと外部バスインターフェイスOBIFとによるシンクロナスダイナミック型RAMとの接続例を示すブロック図である。It is a block diagram showing a connection example of a synchronous dynamic RAM by a bus state controller BSC and an external bus interface OBIF built in the single chip microcomputer according to the present invention. 図8のSDRAMのバーストリード動作を説明するためのバスサイクル波形図である。FIG. 9 is a bus cycle waveform diagram for describing a burst read operation of the SDRAM of FIG. 8. 図8のSDRAMのシングルライト動作を説明するためのバスサイクル波形図である。FIG. 9 is a bus cycle waveform diagram for describing a single write operation of the SDRAM of FIG. 8. この発明に係るシングルチップマイクロコンピュータにおける基本バスサイクルを説明するための波形図である。It is a wave form diagram for demonstrating the basic bus cycle in the single chip microcomputer based on this invention. この発明に係るシングルチップマイクロコンピュータに内蔵されるバスステートコントローラBSCと外部バスインターフェイスOBIFとによるダイナミック型RAMとの接続例を示すブロック図である。It is a block diagram showing an example of connection between a dynamic RAM using a bus state controller BSC and an external bus interface OBIF built in a single chip microcomputer according to the present invention. 図12のDRAMの高速ページモードを説明するためのバスサイクル波形図である。FIG. 13 is a bus cycle waveform diagram for describing a high-speed page mode of the DRAM of FIG. 12. この発明に係るシングルチップマイクロコンピュータに内蔵されるバスステートコントローラBSCと外部バスインターフェイスOBIFとによる擬似スタティック型RAMとの接続例を示すブロック図である。It is a block diagram showing a connection example of a pseudo-static RAM by a bus state controller BSC and an external bus interface OBIF built in the single chip microcomputer according to the present invention. この発明に係るシングルチップマイクロコンピュータを用いてマルチプロセッサ接続した場合の一実施例を示すブロック図である。It is a block diagram which shows one Example at the time of carrying out multiprocessor connection using the single chip microcomputer which concerns on this invention. 図15のS−MCUからメインバス上のSDRAMをアクセスする場合を説明するためのタイミング図である。FIG. 16 is a timing diagram for explaining a case where the SDRAM on the main bus is accessed from the S-MCU of FIG. 15. この発明に係るシングルチップマイクロコンピュータに内蔵されるキャッシュメモリの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a cache memory built in a single chip microcomputer according to the present invention. FIG. この発明に係るキャッシュメモリの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a cache memory according to the present invention. FIG. この発明に係るシングルチップマイクロコンピュータに内蔵されるキャッシュメモリの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a cache memory built in a single chip microcomputer according to the present invention. FIG. この発明に係るキャッシュメモリを説明するための動作概念図である。It is an operation | movement conceptual diagram for demonstrating the cache memory concerning this invention. この発明に係るシングルチップマイクロコンピュータに内蔵される上記直接メモリアクセス制御装置DMACの一実施例を示すブロック図である。It is a block diagram showing an embodiment of the direct memory access control device DMAC built in the single chip microcomputer according to the present invention. この発明に係るDAMCとその周辺部の一実施例を示す概略ブロック図である。It is a schematic block diagram which shows one Example of DAMC which concerns on this invention, and its peripheral part. この発明に係るシングルチップマイクロコンピュータに内蔵される除算器DIVUの一実施例を示すブロック図である。It is a block diagram which shows one Example of the divider DIVU built in the single chip microcomputer based on this invention. 3次元物体を2次元からなる表示画面上に遠近法により表示するための3次元画像処理の概念を説明するための説明図である。It is explanatory drawing for demonstrating the concept of the three-dimensional image process for displaying a three-dimensional object on the display screen which consists of two dimensions by a perspective method. この発明に係るシングルチップマイクロコンピュータを用いた3次元画像処理方法を説明するための信号処理図である。It is a signal processing diagram for demonstrating the three-dimensional image processing method using the single chip microcomputer based on this invention. 命令/データ混在型キャッシュのミス率とライン・サイズとの関係の一例を説明するための特性図である。FIG. 11 is a characteristic diagram for explaining an example of a relationship between a miss rate and a line size of a mixed instruction / data cache. 命令/データ混在型キャッシュのミス率とライン・サイズとの関係の他の一例を説明するための特性図である。FIG. 10 is a characteristic diagram for explaining another example of the relationship between the miss rate and the line size of the instruction / data mixed type cache. 命令/データ混在型キャッシュのミス率とライン・サイズとの関係の他の一例を説明するための特性図である。FIG. 10 is a characteristic diagram for explaining another example of the relationship between the miss rate and the line size of the instruction / data mixed type cache. キャッシュメモリに対するアクセスの説明図である。It is explanatory drawing of the access with respect to a cache memory. 平均アクセス時間とライン・サイズとの関係を説明するための特性図である。It is a characteristic view for demonstrating the relationship between average access time and line size. この発明に係るキャッシュメモリの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a cache memory according to the present invention. FIG. 図31のキャッシュメモリの動作の説明図である。FIG. 32 is an explanatory diagram of the operation of the cache memory of FIG. 31. この発明に係るシングルチップマイクロコンピュータにおける各バスサイクルを説明するためのタイミング図である。It is a timing diagram for explaining each bus cycle in the single chip microcomputer according to the present invention. SDRAMのモード設定動作を説明するたのタイミング図である。FIG. 10 is a timing chart for explaining a mode setting operation of the SDRAM. SDRAMの一実施例を示すブロック図である。It is a block diagram which shows one Example of SDRAM. 積和演算動作を説明するためのブロック図である。It is a block diagram for demonstrating a product-sum operation. 3次元画像処理の座標変換処理のための積和演算動作の説明図である。It is explanatory drawing of the product-sum operation for the coordinate transformation process of a three-dimensional image process. この発明に係る除算器の一実施例を示すブロック図である。It is a block diagram which shows one Example of the divider concerning this invention. 上記乗算器の動作を説明するための状態遷移図である。It is a state transition diagram for demonstrating operation | movement of the said multiplier. 図1のシングルチップマイクロコンピュータの一実施例を示すレイアウト図である。FIG. 2 is a layout diagram showing an embodiment of the single chip microcomputer of FIG. 1. この発明に係るシングルチップマイクロコンピュータの応用例が示す概略構成図である。It is a schematic block diagram showing an application example of a single chip microcomputer according to the present invention. この発明に係るシングルチップマイクロコンピュータの応用例であるペン入力の携帯用マイクロコンピュータの一実施例を示すブロック図である。1 is a block diagram showing an embodiment of a pen-input portable microcomputer that is an application example of a single-chip microcomputer according to the present invention; FIG.

符号の説明Explanation of symbols

CPU…中央処理装置、MULT…乗算器、INTC…割り込みコントーラ、DMAC…直接メモリアクセス制御装置、DIVU…除算器、FRM…フリーランニングタイマ、WDT…ウォッチドッグタイマ、SCI…シリアルコミュニケーションインターフェイス、AB1〜AB4…アドレスバス、DB1〜DB4…データバス、BSC…バスステートコントローラ、DMAC…直接メモリアクセス制御装置、OBIF…外部バスインターフェイス、MCTG…メモリ制御信号発生回路、UBC…ブレークコントローラ、INTC…割り込みコントローラ、CDM…データメモリ(キャッシュ)TAG…タグメモリ(キャッシュ)、CAC…キャッシュコントローラ、CPG…パルス発生回路。
AB1…第1アドレスバス、DB1…第1データバス、AB2…第2アドレスバス、DB2…第2データバス、AB3…第3アドレスバス、DB3…第3データバス、CB…コントールバス、AB4…外部アドレスバス、DB4…外部データバス、B1…第1バス、B2…第2バス、B3…第3バス、B4…第4バス。 MCU…シングルチップマイクロコンピュータ、DRAM…ダイナミック型RAM、SDRAM…シンクロナスダイナミック型RAM、PSRAM…擬似スタティック型RAM、SRAM…スタティック型RAM。
S−MCU…スレーブ側マイクロコンピュータ、M−MCU…マスタ側マイクロコンピュータ。
Q1〜Q29…MOSFET、N1〜N7…CMOSインバータ回路、W0,W1…ワード線、DL0,/DL0〜DL1,/DL1…相補データ線、CDL0,/CDL0…共通データ線。
IR…命令レジスタ、AB…アドレスバッファ、DB…データバッファ、JR…除数レジスタ、HRL…被除数下位&商保存レジスタ、HRH…被除数上位&余保存レジスタ、CONT…制御レジスタ、VCT…割り込みベクタ、RAR…余長期保存レジスタ、RSR…商長期保存レジスタ、FA&CLA…フルアダー&キャリールックアヘッド、AUDA&AUCLA…1加算器、LDMCA…状態制御回路、LDMCB…オーバーフロー処理回路、LDPRM…I/O制御回路。
22…SDRAM、30…モードレジスタ、200A,200B…メモリアレイ、201A,201B…ロウデコーダ、202A,202B…センスアンプ及びカラム選択回路、203A,203B…カラムデコーダ、205…カラムアドレスバッファ、206…ロウアドレスバッファ、207…カラムアドレスカウンタ、208…リフレッシュカウンタ、210…入力バッファ、211…出力バッファ、212…コントローラ。
CPU: Central processing unit, MULT: Multiplier, INTC: Interrupt controller, DMAC: Direct memory access control device, DIVU: Divider, FRM ... Free running timer, WDT ... Watchdog timer, SCI ... Serial communication interface, AB1 to AB4 ... Address bus, DB1 to DB4 ... Data bus, BSC ... Bus state controller, DMAC ... Direct memory access controller, OBIF ... External bus interface, MCTG ... Memory control signal generation circuit, UBC ... Break controller, INTC ... Interrupt controller, CDM Data memory (cache) TAG Tag memory (cache) CAC Cache controller CPG Pulse generation circuit
AB1 ... first address bus, DB1 ... first data bus, AB2 ... second address bus, DB2 ... second data bus, AB3 ... third address bus, DB3 ... third data bus, CB ... control bus, AB4 ... external Address bus, DB4 ... external data bus, B1 ... first bus, B2 ... second bus, B3 ... third bus, B4 ... fourth bus. MCU: Single chip microcomputer, DRAM: Dynamic RAM, SDRAM: Synchronous dynamic RAM, PSRAM: Pseudo static RAM, SRAM: Static RAM
S-MCU ... Slave side microcomputer, M-MCU ... Master side microcomputer.
Q1-Q29 ... MOSFET, N1-N7 ... CMOS inverter circuit, W0, W1 ... word line, DL0, / DL0-DL1, /DL1...complementary data line, CDL0, /CDL0...common data line.
IR ... Instruction register, AB ... Address buffer, DB ... Data buffer, JR ... Divisor register, HRL ... Dividend lower & quotient storage register, HRH ... Dividend upper & remainder storage register, CONT ... Control register, VCT ... Interrupt vector, RAR ... Long-term storage register, RSR ... Commercial long-term storage register, FA & CLA ... Full adder & carry look ahead, AUDA & AUCLA ... 1 adder, LDMCA ... State control circuit, LDMCB ... Overflow processing circuit, LDPRM ... I / O control circuit.
22 ... SDRAM, 30 ... mode register, 200A, 200B ... memory array, 201A, 201B ... row decoder, 202A, 202B ... sense amplifier and column selection circuit, 203A, 203B ... column decoder, 205 ... column address buffer, 206 ... row Address buffer, 207 ... column address counter, 208 ... refresh counter, 210 ... input buffer, 211 ... output buffer, 212 ... controller.

Claims (12)

中央処理装置と、
外部に接続されるシンクロナスダイナミック型RAMのインタフェース機能を有する制御回路と、 前記中央処理装置に供給する第1クロック信号を含む複数のクロック信号を形成可能なクロック発生回路と、
前記シンクロナスダイナミック型RAMのクロック端子に対し、第2クロック信号を供給するための第1端子と、
前記シンクロナスダイナミック型RAMに対するクロックイネーブル信号を出力するための第2端子と、
前記シンクロナスダイナミック型RAMに対し、セレクト信号を出力するための第3端子と、を有し、
前記中央処理装置が所定のアドレスをアクセスすると、前記シンクロナスダイナミック型RAMのモード設定を行うために前記所定のアドレスの一部の情報が、外部アドレスバスを介して外部へ出力され、
前記所定のアドレスの一部の情報が出力されるとき、前記モード設定を行うために、前記シンクロナスダイナミック型RAMに出力するためのロウアドレス信号、カラムアドレス信号、ライトイネーブル信号、及び前記セレクト信号はイネーブル状態にされ、
前記制御回路は、前記シンクロナスダイナミック型RAMに対し、前記第2クロック信号に同期して、前記第2端子を介して前記クロックイネーブル信号を出力し、前記第3端子を介して前記セレクト信号を出力する、
一つの半導体基板上に形成される半導体集積回路装置。
A central processing unit;
A control circuit having an interface function of a synchronous dynamic RAM connected to the outside; a clock generation circuit capable of forming a plurality of clock signals including a first clock signal supplied to the central processing unit;
A first terminal for supplying a second clock signal to the clock terminal of the synchronous dynamic RAM;
A second terminal for outputting a clock enable signal for the synchronous dynamic RAM;
A third terminal for outputting a select signal to the synchronous dynamic RAM;
When the central processing unit accesses a predetermined address, a part of information of the predetermined address is output to the outside via an external address bus in order to set the mode of the synchronous dynamic RAM.
A row address signal, a column address signal, a write enable signal, and a select signal for outputting to the synchronous dynamic RAM to set the mode when a part of information of the predetermined address is output. Is enabled,
The control circuit outputs the clock enable signal to the synchronous dynamic RAM via the second terminal in synchronization with the second clock signal, and outputs the select signal via the third terminal. Output,
A semiconductor integrated circuit device formed on one semiconductor substrate.
前記中央処理装置による所定のアドレスへのアクセスは、ライトアクセスであり、
前記所定のアドレスは、半導体集積回路装置の内部アドレスに割り当てられている、
請求項1記載の半導体集積回路装置。
Access to the predetermined address by the central processing unit is write access,
The predetermined address is assigned to an internal address of the semiconductor integrated circuit device.
The semiconductor integrated circuit device according to claim 1.
前記クロック発生回路は、PLLを含む請求項2記載の半導体集積回路装置。   The semiconductor integrated circuit device according to claim 2, wherein the clock generation circuit includes a PLL. 前記クロック発生回路は、前記複数のクロック信号を形成するために外部からクロック入力可能である請求項3記載の半導体集積回路装置。   4. The semiconductor integrated circuit device according to claim 3, wherein the clock generation circuit is capable of inputting a clock from the outside in order to form the plurality of clock signals. さらに、PLL用電源端子を有し、
前記PLL用電源端子を介して供給された電源を前記PLLへ供給する請求項4記載の半導体集積回路装置。
Furthermore, it has a power supply terminal for PLL,
5. The semiconductor integrated circuit device according to claim 4, wherein power supplied via the PLL power supply terminal is supplied to the PLL.
前記セレクト信号は、前記シンクロナスダイナミック型RAMに対するコマンド入力サイクルの開始を指定するための信号である請求項1乃至5の何れかに記載の半導体集積回路装置。   6. The semiconductor integrated circuit device according to claim 1, wherein the select signal is a signal for designating a start of a command input cycle for the synchronous dynamic RAM. 外部に接続されたシンクロナスダイナミック型RAMにアクセス可能な中央処理装置と、
前記外部に接続されるシンクロナスダイナミック型RAMを制御する制御回路と、
前記中央処理装置に供給するためのシステムクロックと、前記外部に接続されたシンクロナスダイナミック型RAMの動作クロックとを生成可能なクロック発生回路と、
記動作クロックを出力するための第1端子と、
前記動作クロックの有効性を示すクロックイネーブル信号を出力するための第2端子と、
前記シンクロナスダイナミック型RAMの選択状態を示すチップセレクト信号を出力するための第3端子と、
前記シンクロナスダイナミック型RAMのロウアドレスストローブ信号を出力可能な第4端子と、
前記シンクロナスダイナミック型RAMのカラムアドレスストローブ信号を出力可能な第5端子と、
を有する一つの半導体基板上に形成されたデータ処理装置であって、
前記中央処理装置が前記シンクロナスダイナミック型RAMのモード設定を行うために、前記データ処理装置の内部アドレスに割り当てられた所定のアドレスへアクセスするとき、前記所定のアドレスの一部の情報が外部へ出力され、
前記シンクロナスダイナミック型RAMのモード設定を行うとき、前記第2端子乃至第5端子から出力される信号はイネーブル状態とされ、
前記制御回路は、前記第1端子を介して前記動作クロックを出力するとともに、前記第2端子を介して前記クロックイネーブル信号と、前記第3端子を介して前記チップセレクト信号とを出力し、
前記中央処理装置による前記外部に接続されたシンクロナスダイナミック型RAMに対するライトアクセスのとき、前記クロックイネーブル信号はアクティブ状態とされる、
データ処理装置。
A central processing unit capable of accessing an externally connected synchronous dynamic RAM;
A control circuit for controlling the synchronous dynamic RAM connected to the outside;
A clock generation circuit capable of generating a system clock for supplying to the central processing unit and an operation clock of the synchronous dynamic RAM connected to the outside;
A first terminal for outputting a pre-SL operating clock,
A second terminal for outputting a clock enable signal indicating the validity of the operation clock ;
A third terminal for outputting a chip select signal indicating a selection state of the synchronous dynamic RAM ;
A fourth terminal capable of outputting a row address strobe signal of the synchronous dynamic RAM;
A fifth terminal capable of outputting a column address strobe signal of the synchronous dynamic RAM;
A data processing device formed on a single semiconductor substrate to have a,
When the central processing unit accesses a predetermined address assigned to the internal address of the data processing device in order to set the mode of the synchronous dynamic RAM, a part of information of the predetermined address is externally transmitted. Output,
When the mode of the synchronous dynamic RAM is set, signals output from the second terminal to the fifth terminal are enabled.
The control circuit outputs the operation clock via the first terminal, outputs the clock enable signal via the second terminal, and the chip select signal via the third terminal,
The clock enable signal is activated when the central processing unit performs a write access to the externally connected synchronous dynamic RAM.
Data processing device.
前記外部に接続されたシンクロナスダイナミック型RAMは、前記動作クロックのエッジに同期して前記データ処理装置から供給されるアドレス信号を取り込み可能であり、
前記クロック発生回路は、PLLを含む請求項7記載のデータ処理装置。
The externally connected synchronous dynamic RAM can capture an address signal supplied from the data processing device in synchronization with an edge of the operation clock,
The data processing apparatus according to claim 7, wherein the clock generation circuit includes a PLL.
記制御回路は、前記第4端子を介して前記ロウアドレスストローブ信号をアクティブ状態とするとともに、ロウアドレスを外部に出力し、
前記制御回路は、前記第5端子を介して前記カラムアドレスストローブ信号をアクティブ状態とするとともに、カラムアドレスを外部に出力する請求項7または8記載のデータ処理装置。
Before SL control circuit outputs with the active state of the row address strobe signal through the fourth terminal, a row address to the outside,
9. The data processing apparatus according to claim 7, wherein the control circuit activates the column address strobe signal via the fifth terminal and outputs a column address to the outside.
外部に接続されたシンクロナスダイナミック型RAMにアクセス可能な中央処理装置と、
前記シンクロナスダイナミック型RAMへ制御信号を出力可能な制御回路と、
PLLを含み、前記中央処理装置に供給するためのクロック信号を含む複数のクロック信号を形成可能なパルス発生器と、を有し、
前記中央処理装置が定のアドレスへアクセスを行うとき、前記制御回路を介して前記所定のアドレスの一部が外部へ出力されることで前記シンクロナスダイナミック型RAMのモード設定を行うことが可能とされ、
前記制御回路は、前記シンクロナスダイナミック型RAMに供給するクロック信号を有効とするクロックイネーブル信号と、前記シンクロナスダイナミック型RAMを選択状態とするためのチップセレクト信号とを含む複数の制御信号を外部へ出力可能で、
前記制御回路は、前記シンクロナスダイナミック型RAMに供給するためのクロック信号に同期して、前記クロックイネーブル信号及び前記チップセレクト信号をアクティブ状態とする一つの半導体基板上に形成されたマイクロコンピュータ。
A central processing unit capable of accessing an externally connected synchronous dynamic RAM;
A control circuit capable of outputting a control signal to the synchronous dynamic RAM;
A pulse generator including a PLL and capable of forming a plurality of clock signals including a clock signal for supply to the central processing unit;
When said central processing unit makes access to Jo Tokoro address, a portion of the predetermined address via the control circuit can perform the synchronous mode setting of a dynamic RAM by being outputted to the outside And
The control circuit externally outputs a plurality of control signals including a clock enable signal for validating a clock signal supplied to the synchronous dynamic RAM and a chip select signal for selecting the synchronous dynamic RAM. Output to
The control circuit is a microcomputer formed on one semiconductor substrate that activates the clock enable signal and the chip select signal in synchronization with a clock signal supplied to the synchronous dynamic RAM.
前記マイクロコンピュータは、さらに、PLL用電源端子を有し、
前記PLL用電源端子を介して供給された電源を前記PLLへ供給する請求項10記載のマイクロコンピュータ。
The microcomputer further has a power supply terminal for PLL,
The microcomputer according to claim 10, wherein power supplied via the PLL power supply terminal is supplied to the PLL.
前記所定のアドレスのアクセスはライトアクセスであり、
前記所定のアドレスは、内蔵周辺用に割り当てられたアドレスである請求項10または11記載のマイクロコンピュータ。
The access at the predetermined address is a write access,
12. The microcomputer according to claim 10, wherein the predetermined address is an address assigned for a built-in peripheral.
JP2008211461A 1993-09-17 2008-08-20 Semiconductor integrated circuit device, data processing device, and microcomputer Expired - Fee Related JP4448917B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008211461A JP4448917B2 (en) 1993-09-17 2008-08-20 Semiconductor integrated circuit device, data processing device, and microcomputer

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP25509993 1993-09-17
JP2008211461A JP4448917B2 (en) 1993-09-17 2008-08-20 Semiconductor integrated circuit device, data processing device, and microcomputer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005201069A Division JP2006004445A (en) 1993-09-17 2005-07-11 Single chip data processor and data processing system

Publications (2)

Publication Number Publication Date
JP2009020900A JP2009020900A (en) 2009-01-29
JP4448917B2 true JP4448917B2 (en) 2010-04-14

Family

ID=40360433

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008211461A Expired - Fee Related JP4448917B2 (en) 1993-09-17 2008-08-20 Semiconductor integrated circuit device, data processing device, and microcomputer

Country Status (1)

Country Link
JP (1) JP4448917B2 (en)

Also Published As

Publication number Publication date
JP2009020900A (en) 2009-01-29

Similar Documents

Publication Publication Date Title
JP3904244B2 (en) Single chip data processor
JP3466062B2 (en) Method and circuit for reducing power consumption in a processor
EP0734553B1 (en) Split level cache
US6405271B1 (en) Data flow control mechanism for a bus supporting two-and three-agent transactions
US8806232B2 (en) Systems and method for hardware dynamic cache power management via bridge and power manager
JPH10124335A (en) Method and system for reducing power consumption in electronic circuit
JP2006522385A (en) Apparatus and method for providing multi-threaded computer processing
US20040064599A1 (en) Configurable memory controller for advanced high performance bus system
US6735683B2 (en) Single-chip microcomputer with hierarchical internal bus structure having data and address signal lines coupling CPU with other processing elements
TW409208B (en) Multi-mode cache structure
US11055102B2 (en) Coprocessor memory ordering table
JP2007087416A (en) Single-chip data processor
JP4448917B2 (en) Semiconductor integrated circuit device, data processing device, and microcomputer
JP4176746B2 (en) Single chip data processing apparatus and microcomputer
JP4070141B2 (en) Single chip data processing apparatus and data processing apparatus
US6647450B1 (en) Multiprocessor computer systems with command FIFO buffer at each target device
JP2006004445A (en) Single chip data processor and data processing system
CN110245096B (en) Method for realizing direct connection of processor with expansion calculation module
JP3048979B2 (en) Method and system for reducing power consumption in electronic circuits
JPH10124203A (en) Method and system reducing power consumption in electronic circuit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090812

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090909

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091106

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

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20091125

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091216

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20140205

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees