JPH0749827A - Generating device for response signal of cpu - Google Patents

Generating device for response signal of cpu

Info

Publication number
JPH0749827A
JPH0749827A JP19648993A JP19648993A JPH0749827A JP H0749827 A JPH0749827 A JP H0749827A JP 19648993 A JP19648993 A JP 19648993A JP 19648993 A JP19648993 A JP 19648993A JP H0749827 A JPH0749827 A JP H0749827A
Authority
JP
Japan
Prior art keywords
circuit
cpu
signal
bus
peripheral
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.)
Granted
Application number
JP19648993A
Other languages
Japanese (ja)
Other versions
JP3052682B2 (en
Inventor
Hisaki Ubukawa
寿樹 生川
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP5196489A priority Critical patent/JP3052682B2/en
Publication of JPH0749827A publication Critical patent/JPH0749827A/en
Application granted granted Critical
Publication of JP3052682B2 publication Critical patent/JP3052682B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To minimize the circuit scale when many peripheral circuits are connected to the CPU and to generates the response signal which shows the width of a bus used between the CPU and a peripheral circuit and is used to detect the end of data transfer operation on the peripheral circuit side without any circuit alteration according to the access time and bus width of the peripheral circuit. CONSTITUTION:When the CPU accesses one of the peripheral circuits A-D, respective decoders read the bus width of an accessed peripheral circuit out of 8-circuit D flip-flops and a bus width setting circuit 20 outputs signals BS0 and BS1 showing the bus width. Simultaneously, the respective decoders and a wait quantity setting circuit 16 reads the wait quantity of the accessed peripheral circuit out of the 8-circuit D flip-flops and an ACK signal generating circuit 22 outputs the signals BS0 and BS1 as attack signals ACK0 and ACK1 to the CPU after a time corresponding to the read wait quantity lapses.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、CPUによりアクセス
された周辺回路のアクセスタイムに応じて、CPUと周
辺回路との間で使用するバス幅を表わすと共にCPUが
周辺回路側におけるデータ転送動作の終了を検出するた
めの応答信号を生成するCPUの応答信号生成装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention represents the bus width used between a CPU and a peripheral circuit according to the access time of the peripheral circuit accessed by the CPU, and the CPU controls the data transfer operation on the peripheral circuit side. The present invention relates to a response signal generation device for a CPU that generates a response signal for detecting the end.

【0002】[0002]

【従来の技術】従来より、ROMやRAM等の周辺回路
との間で、所謂、非同期式のデータ転送を行う代表的な
CPUとして、例えばモトローラ社製68000シリー
ズのCPUがある。
2. Description of the Related Art Conventionally, as a typical CPU that performs so-called asynchronous data transfer with peripheral circuits such as ROM and RAM, for example, there is a Motorola 68000 series CPU.

【0003】ここで、この非同期式のデータ転送の概要
について、図9を用いて説明する。尚、前提として、C
PUは、データ転送の際、システムクロックCLKの1
/2周期を1単位とした8つの動作(以下、ステートと
いう)S0〜S7を実行する。
Here, the outline of this asynchronous data transfer will be described with reference to FIG. As a premise, C
PU transfers 1 of system clock CLK when transferring data.
Eight operations (hereinafter, referred to as states) S0 to S7 are executed with the / 2 cycle as one unit.

【0004】まず、周辺回路からCPUへのデータ転送
(以下、リードサイクルという)では、図9(A)に示
すように、まず、CPUが、ステートS1で、アクセス
する周辺回路に対応したアドレスを出力し、続くステー
トS2にて、アドレスバス上に有効なアドレスが存在す
ることを示すアドレスストローブ信号(図示せず)、及
びデータバス上のデータが有効であることを示すデータ
ストローブ信号DSを、夫々アクティブなLow レベルで
出力する。またこのとき、CPU2は、データバスの転
送方向を示すリード・ライト信号R/Wをリードサイク
ルであることを示すHighレベルで出力する。
First, in data transfer from a peripheral circuit to a CPU (hereinafter referred to as a read cycle), as shown in FIG. 9A, first, in a state S1, the CPU sends an address corresponding to the peripheral circuit to be accessed. In the subsequent state S2, an address strobe signal (not shown) indicating that a valid address is present on the address bus and a data strobe signal DS indicating that the data on the data bus is valid are output. Output at active low level respectively. At this time, the CPU 2 also outputs the read / write signal R / W indicating the transfer direction of the data bus at a high level indicating a read cycle.

【0005】すると、周辺回路は、アドレスバス上のア
ドレスにより自分がアクセスされたことを認識してデー
タバス上にデータを出力する。尚、周辺回路がアクセス
されてからデータの出力を終了するまでの時間は、各周
辺回路に固有のアクセスタイム(自己のアドレスが指定
されてからデータの転送動作を終了するまでに要する時
間)により様々である。
Then, the peripheral circuit recognizes that it is accessed by the address on the address bus and outputs the data on the data bus. The time from the access of the peripheral circuit to the end of the data output depends on the access time peculiar to each peripheral circuit (the time required from the designation of its own address to the end of the data transfer operation). There are various.

【0006】そして、CPUは、ステートS3,S4で
は新しい信号を出力せず、ステートS4の直後(システ
ムクロックCLKの立ち下がり時)に、外部から入力さ
れている応答信号(以下、アック信号ともいう)ACK
のレベルを検出する。そしてこのとき、アック信号AC
KがLow レベルであれば、周辺回路側でのデータ転送動
作が終了したと認識して、何ら新しい信号を出力しない
ステートS5,S6の直後にデータバス上のデータを読
み込み、続くステートS7にて、アドレスストローブ信
号及びデータストローブ信号DSをHighレベルに戻し、
リードサイクルの1サイクルを終了する。
Then, the CPU does not output a new signal in the states S3 and S4, and immediately after the state S4 (at the falling edge of the system clock CLK), a response signal (hereinafter also referred to as an ACK signal) input from the outside. ) ACK
Detect the level of. At this time, the AC signal AC
If K is at the low level, it is recognized that the data transfer operation on the peripheral circuit side has ended, and the data on the data bus is read immediately after states S5 and S6 in which no new signal is output, and in the subsequent state S7. , The address strobe signal and the data strobe signal DS are returned to the high level,
One read cycle is completed.

【0007】一方、図9(B)に示すように、CPU
が、ステートS4の直後に、アック信号ACKがHighレ
ベルであると検出したときには、CPUは、ステートS
3,S4を繰り返し、アック信号ACKがLow レベルに
なったことを検出するまで、ステートS5以降のリード
サイクルの終了動作を行わないようになっている。
On the other hand, as shown in FIG.
However, when the ACK signal ACK is detected to be at the high level immediately after the state S4, the CPU determines that the state S
Until the ACK signal ACK becomes low level by repeating 3 and S4, the end operation of the read cycle after the state S5 is not performed.

【0008】次に、CPUから周辺回路からへのデータ
転送(以下、ライトサイクルという)では、図9(C)
に示すように、まず、CPUが、ステートS1で、アク
セスする周辺回路に対応するアドレスを出力し、続くス
テートS2にて、図示しないアドレスストローブ信号を
Low レベルで出力する共に、リード・ライト信号R/W
をライトサイクルであることを示すLow レベルで出力す
る。そして、続くステートS3にて、データバス上にデ
ータを出力し、ステートS4にて、データストローブ信
号DSをLow レベルで出力する。
Next, in data transfer from the CPU to the peripheral circuits (hereinafter referred to as a write cycle), FIG.
As shown in, the CPU first outputs the address corresponding to the peripheral circuit to be accessed in the state S1, and outputs the address strobe signal (not shown) in the subsequent state S2.
Output at low level and read / write signal R / W
Is output at a low level that indicates a write cycle. Then, in the subsequent state S3, the data is output onto the data bus, and in the state S4, the data strobe signal DS is output at a low level.

【0009】すると、周辺回路は、アドレスバス上のア
ドレスにより自分がアクセスされたことを認識してデー
タバス上のデータを読み込む。尚、周辺回路がアクセス
されてからデータの読み込みを終了するまでの時間も、
各周辺回路のアクセスタイムにより様々である。
Then, the peripheral circuit recognizes that it is accessed by the address on the address bus and reads the data on the data bus. In addition, the time from the access of the peripheral circuit to the end of the data reading is also
It varies depending on the access time of each peripheral circuit.

【0010】そして、CPUは、ステートS4の直後
で、外部から入力されているアック信号ACKのレベル
を検出し、アック信号ACKがLow レベルであれば、周
辺回路側でのデータ転送動作が終了したと認識して、何
ら新しい信号を出力しないステートS5,S6の後、続
くステートS7にて、アドレスストローブ信号及びデー
タストローブ信号DSをHighレベルに戻し、ライトサイ
クルの1サイクルを終了する。尚、CPUが、ステート
S4の直後、言い換えるならばステートS5の直前で、
アック信号ACKがHighレベルであると検出したときに
は、ステートS5,S6を繰り返し、リードサイクルの
場合と同様に、アック信号ACKがLow レベルになった
ことを検出するまで、ステートS7のライトサイクルの
終了動作を行わないようになっている。
Immediately after the state S4, the CPU detects the level of the ACK signal ACK input from the outside, and if the ACK signal ACK is at the Low level, the data transfer operation on the peripheral circuit side is completed. Then, after the states S5 and S6 in which no new signal is output, in the subsequent state S7, the address strobe signal and the data strobe signal DS are returned to the high level, and one write cycle is completed. The CPU immediately after the state S4, in other words, immediately before the state S5,
When it is detected that the ACK signal ACK is at the high level, the states S5 and S6 are repeated, and the write cycle of the state S7 is ended until it is detected that the ACK signal ACK is at the low level as in the read cycle. It does not operate.

【0011】このように、非同期式のデータ転送を行う
CPUは、外部から入力されるアック信号ACKがLow
レベルであることを検出するまではデータ転送の終了動
作を開始しないようになっており、それに応じてデータ
転送の1サイクルがシステムクロックCLKの1周期単
位で延長されるのである。尚、以下、データ転送の1サ
イクルをデータ転送サイクルといい、また、データ転送
サイクルが延長されるシステムクロックの周期数をウエ
イト数という。
As described above, in the CPU which performs asynchronous data transfer, the ACK signal ACK input from the outside is Low.
The end operation of the data transfer is not started until the level is detected, and accordingly one cycle of the data transfer is extended by one cycle unit of the system clock CLK. In the following, one cycle of data transfer is referred to as a data transfer cycle, and the number of system clock cycles by which the data transfer cycle is extended is referred to as the number of waits.

【0012】そして更に最近では、このような非同期式
のデータ転送を行うCPUの中で、例えば、モトローラ
社製68020,68030のように、CPUと周辺回
路との間で使用するバス幅(データバスのビット数)を
表わす2ビット信号をアック信号として使用するCPU
がある。
More recently, among CPUs that perform such asynchronous data transfer, the bus width (data bus) used between the CPU and peripheral circuits, such as the Motorola 68020 and 68030, is used. CPU that uses a 2-bit signal representing the bit number of
There is.

【0013】つまり、この種のCPUは、例えば2本の
アック信号入力端子を備えており、周辺回路をアクセス
してから2本のアック信号入力端子のうち少なくとも何
れか一方がLow レベルになると、データ転送の終了動作
を開始するようにされており、且つ、この時アック信号
入力端子から入力される2ビットデータに基づき、その
周辺回路との間で使用するバス幅を、例えば、データが
「10」ならば8ビットバス、データが「01」ならば
16ビットバス、データが「00」ならば32ビットバ
ス、といった具合いに認識するようにされている。
That is, this type of CPU is provided with, for example, two ACK signal input terminals, and when at least one of the two ACK signal input terminals becomes low level after the peripheral circuit is accessed, The operation of ending the data transfer is started, and the bus width used for the peripheral circuit is based on the 2-bit data input from the ACK signal input terminal at this time. If the data is "10", the 8-bit bus is used, if the data is "01", the 16-bit bus is used, and if the data is "00", the 32-bit bus is used.

【0014】従って、このようなバス幅を表わす信号を
アック信号として使用するCPUにアクセスタイムやバ
ス幅が夫々異なる周辺回路を接続してマイクロコンピュ
ータを構成する場合には、各周辺回路がCPUによりア
クセスされたことを検出し、その検出時から各周辺回路
のアクセスタイムに応じた所定時間(以下、ウエイト時
間という)を計時した後、その周辺回路に対応するバス
幅を表わす信号をアック信号としてCPUへ出力してや
る必要があり、これにより、CPUと各周辺回路との間
でデータ転送が確実に行われるようにすることができる
のである。そして、この目的のために設けられるのが応
答信号生成装置である。
Therefore, when a microcomputer is constructed by connecting peripheral circuits having different access times and different bus widths to a CPU which uses such a signal representing the bus width as an ACK signal, each peripheral circuit is controlled by the CPU. After the access is detected, a predetermined time (hereinafter referred to as wait time) corresponding to the access time of each peripheral circuit is counted from the time of detection, and then the signal representing the bus width corresponding to the peripheral circuit is used as an ACK signal. It is necessary to output the data to the CPU, which makes it possible to ensure the data transfer between the CPU and each peripheral circuit. A response signal generation device is provided for this purpose.

【0015】そこで従来より、この種の応答信号生成装
置は、周辺回路に対応するアドレスバス上の所定ビット
が全てアクティブになったことを検出する否定論理積回
路(ナンドゲート)と、このナンドゲートから検出信号
が出力されると所定のウエイト時間を計時するマルチバ
イブレータやシフトレジスタ等の計時回路と、計時回路
により計時が終了するとアクセスされた周辺回路のバス
幅を表わす「11」以外の2ビットデータ出力する論理
回路と、から構成されており、これらの各回路を各周辺
回路毎に設け、バス幅を表わす2ビットデータを出力す
る各論理回路の各ビット出力を、夫々、ワイヤードオア
形式でCPUの各アック信号入力端子に入力するように
していた。
Therefore, conventionally, the response signal generating apparatus of this type detects from a NAND circuit (nand gate) for detecting that all the predetermined bits on the address bus corresponding to the peripheral circuit are activated, and the NAND gate. 2-bit data output other than "11" that represents the bus width of the timing circuit such as a multivibrator or shift register that counts a predetermined wait time when a signal is output, and the peripheral circuit accessed when the timing circuit completes the timing Each of these circuits is provided for each peripheral circuit, and each bit output of each logic circuit that outputs 2-bit data representing the bus width is output in the wired OR format from the CPU. It was designed to be input to each ACK signal input terminal.

【0016】[0016]

【発明が解決しようとする課題】しかしながら、上記従
来の装置では、CPUに接続する周辺回路の数だけウエ
イト時間を計時するための計時回路やバス幅を表わす2
ビットデータを出力するための論理回路を設ける必要が
あり、マイクロコンピュータの回路規模が大きくなって
しまうという問題があった。
However, in the above-mentioned conventional device, a clock circuit and a bus width for counting the wait time by the number of peripheral circuits connected to the CPU are represented.
It is necessary to provide a logic circuit for outputting bit data, which causes a problem that the circuit scale of the microcomputer becomes large.

【0017】また、CPUに接続する周辺回路をアクセ
スタイムやバス幅が異なるものに変更する場合には、そ
の都度、計時回路や論理回路の回路構成を変更しなけれ
ばならないという問題もあった。本発明は、このような
問題に鑑みなされたものであり、CPUに多数の周辺回
路を接続した場合に回路規模を最小限に抑えることがで
き、且つ、回路変更を行うことなく周辺回路のアクセス
タイム及びバス幅に応じて、CPUが周辺回路との間で
使用するバス幅を表わすと共に周辺回路側でのデータ転
送動作の終了を検出するための応答信号を生成すること
ができる、CPUの応答信号生成装置を提供することを
目的としている。
In addition, when the peripheral circuits connected to the CPU are changed to those having different access times or bus widths, there is a problem that the circuit configuration of the clock circuit and the logic circuit must be changed each time. The present invention has been made in view of such a problem, and when a large number of peripheral circuits are connected to a CPU, the circuit scale can be minimized, and the peripheral circuits can be accessed without changing the circuit. The response of the CPU, which represents the bus width used by the CPU with the peripheral circuit and can generate a response signal for detecting the end of the data transfer operation on the peripheral circuit side according to the time and the bus width. An object is to provide a signal generation device.

【0018】[0018]

【課題を解決するための手段】即ち、上記目的を達成す
るためになされた本発明は、複数の周辺回路に接続さ
れ、任意の周辺回路にアクセスして該周辺回路との間で
データ転送を行う際に、外部から入力される該周辺回路
との間で使用するバス幅を表わす応答信号により該周辺
回路側のデータ転送動作の終了を検出してデータ転送の
終了動作を開始するCPUに用いられ、当該CPUが何
れかの周辺回路をアクセスしたことを検出し、該アクセ
スされた周辺回路のアクセスタイムに応じて上記応答信
号を生成するCPUの応答信号生成装置であって、上記
各周辺回路のアクセスタイムに夫々対応したウエイト時
間を記憶するウエイト時間記憶手段と、上記各周辺回路
に夫々対応したバス幅を記憶するバス幅記憶手段と、上
記各周辺回路が上記CPUによりアクセスされたことを
検出する検出手段と、該検出手段により何れかの周辺回
路がアクセスされたことが検出されると、該アクセスさ
れた周辺回路に対応するバス幅を上記バス幅記憶手段か
ら読み出し、該バス幅を表わす応答信号を出力するバス
幅読み出し手段と、所定のウエイト時間が設定されると
当該ウエイト時間を計時して該ウエイト時間経過後に、
上記バス幅読み出し手段により出力されている応答信号
を上記CPUに対して出力する応答信号生成手段と、上
記検出手段により何れかの周辺回路がアクセスされたこ
とが検出されると、該アクセスされた周辺回路に対応す
るウエイト時間を上記ウエイト時間記憶手段から読み出
し、該ウエイト時間を上記応答信号生成手段に設定する
ウエイト時間設定手段と、を備えたことを特徴とするC
PUの応答信号生成装置を要旨としている。
SUMMARY OF THE INVENTION That is, the present invention, which has been made to achieve the above object, is connected to a plurality of peripheral circuits, accesses arbitrary peripheral circuits, and transfers data to and from the peripheral circuits. At the time of execution, it is used for the CPU which detects the end of the data transfer operation on the peripheral circuit side by the response signal representing the bus width used with the peripheral circuit input from the outside and starts the end operation of the data transfer. A response signal generation device for a CPU, which detects that the CPU has accessed any of the peripheral circuits, and generates the response signal according to the access time of the accessed peripheral circuit. Wait time storage means for storing the wait time corresponding to each access time, bus width storage means for storing the bus width corresponding to each of the peripheral circuits, and each of the peripheral circuits described above. A detecting unit that detects access by the PU and, when the detecting unit detects that one of the peripheral circuits is accessed, the bus width corresponding to the accessed peripheral circuit is set to the bus width storage unit. And a bus width reading means for outputting a response signal indicating the bus width, and when the predetermined wait time is set, the wait time is measured and after the wait time elapses,
When the response signal generating means for outputting the response signal output by the bus width reading means to the CPU and the access means detect any of the peripheral circuits, the access is made. Wait time setting means for reading the wait time corresponding to the peripheral circuit from the wait time storage means and setting the wait time in the response signal generating means.
The gist is the response signal generator of the PU.

【0019】[0019]

【作用及び発明の効果】以上のように構成された本発明
のCPUの応答信号生成装置においては、ウエイト時間
記憶手段に、CPUに接続された各周辺回路のアクセス
タイムに夫々対応したウエイト時間が記憶され、バス幅
記憶手段に、各周辺回路に夫々対応したバス幅が記憶さ
れている。そして、検出手段が、CPUにより各周辺回
路がアクセスされたことを検出する。
In the response signal generating device for a CPU of the present invention having the above-described structure, the wait time storage means has a wait time corresponding to the access time of each peripheral circuit connected to the CPU. The bus width is stored and the bus width corresponding to each peripheral circuit is stored in the bus width storage means. Then, the detecting means detects that the CPU has accessed each peripheral circuit.

【0020】ここで、検出手段により何れかの周辺回路
がアクセスされたことが検出されると、バス幅読み出し
手段が、そのアクセスされた周辺回路に対応するバス幅
をバス幅記憶手段から読み出し、そのバス幅を表わす応
答信号を出力する。また、これと同時に、ウエイト時間
設定手段が、アクセスされた周辺回路に対応するウエイ
ト時間をウエイト時間記憶手段から読み出し、その読み
出したウエイト時間を応答信号生成手段に設定する。
When the detecting means detects that any of the peripheral circuits is accessed, the bus width reading means reads the bus width corresponding to the accessed peripheral circuit from the bus width storing means, A response signal representing the bus width is output. At the same time, the wait time setting means reads the wait time corresponding to the accessed peripheral circuit from the wait time storage means and sets the read wait time in the response signal generating means.

【0021】すると、この応答信号生成手段が、ウエイ
ト時間設定手段により設定されたウエイト時間を計時し
て、そのウエイト時間経過後に、バス幅読み出し手段に
より出力されている応答信号をCPUに対して出力す
る。つまり、本発明のCPUの応答信号生成装置におい
ては、何れかの周辺回路がCPUによりアクセスされる
と、バス幅記憶手段からその周辺回路に対応したバス幅
を読み出すと共に、ウエイト時間記憶手段からその周辺
回路のアクセスタイムに対応したウエイト時間を読み出
し、そのウエイト時間を応答信号生成手段により共通に
計時した後、バス幅記憶手段から読み出したバス幅を表
わす応答信号をCPUに出力するのである。
Then, the response signal generating means measures the wait time set by the wait time setting means, and after the wait time has elapsed, outputs the response signal output by the bus width reading means to the CPU. To do. That is, in the response signal generating device for a CPU of the present invention, when any of the peripheral circuits is accessed by the CPU, the bus width corresponding to the peripheral circuit is read from the bus width storage means and the wait time storage means stores the bus width. After the wait time corresponding to the access time of the peripheral circuit is read and the wait time is commonly measured by the response signal generation means, the response signal representing the bus width read from the bus width storage means is output to the CPU.

【0022】従って、本発明のCPUの応答信号生成装
置によれば、従来装置のように、CPUに接続する周辺
回路毎にウエイト時間を計時するための計時回路やバス
幅を表わすデータを出力するための論理回路を設ける必
要がなく、周辺回路の増加に伴う回路規模の増加を最小
限に抑えることができる。
Therefore, according to the response signal generating device of the CPU of the present invention, as in the conventional device, the clock circuit for measuring the wait time for each peripheral circuit connected to the CPU and the data representing the bus width are output. It is not necessary to provide a logic circuit for this purpose, and it is possible to minimize an increase in circuit scale due to an increase in peripheral circuits.

【0023】そして更に、CPUに接続する周辺回路を
アクセスタイムや使用するバス幅が異なるものに取り替
える場合には、ウエイト時間記憶手段及びバス幅記憶手
段の記憶内容を変更するだけで、取り替え後の周辺回路
に応じたウエイト時間とバス幅が設定できるため、従来
装置のように回路変更を行う必要がない。
Furthermore, when the peripheral circuit connected to the CPU is replaced with one having a different access time or a different bus width to be used, the contents stored in the wait time storage means and the bus width storage means are simply changed. Since the wait time and the bus width can be set according to the peripheral circuit, it is not necessary to change the circuit unlike the conventional device.

【0024】[0024]

【実施例】以下、本発明の実施例を図面と共に説明す
る。図1は本発明が適用された実施例のマイクロコンピ
ュータの構成を表わすブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a microcomputer of an embodiment to which the present invention is applied.

【0025】図1に示すように、本実施例のマイクロコ
ンピュータは、「従来技術」の項で説明したようにバス
幅を表わす2ビット信号をアック信号とする非同期式の
データ転送を行うCPU2と、CPU2にA0〜A31
の32ビットのアドレスバス4及びD0〜D31の32
ビットのデータバス6を介して接続された複数(本実施
例においては、説明の便宜上4つ)の周辺回路A〜D
と、CPU2が何れかの周辺回路A〜Dをアクセスした
ことを検出し、その周辺回路のバス幅を表わす2ビット
のアック信号ACK0,ACK1をCPU2に対して出
力するサイクル制御部8と、を備えている。尚、周辺回
路A〜Dの内訳は、例えば、周辺回路Aがプログラム及
びデータを書き換え可能なEPROM(以下、単にRO
Mという)、周辺回路BがRAM、周辺回路C,Dはそ
の他のI/O装置である。
As shown in FIG. 1, the microcomputer of this embodiment includes a CPU 2 for performing asynchronous data transfer using a 2-bit signal representing a bus width as an ACK signal, as described in the section "Prior Art". , CPU2 A0-A31
32-bit address bus 4 and 32 of D0 to D31
A plurality of (four in this embodiment, four for convenience of explanation) peripheral circuits A to D connected via a bit data bus 6
And a cycle control unit 8 which detects that the CPU 2 has accessed any of the peripheral circuits A to D and outputs 2-bit ACK signals ACK0 and ACK1 representing the bus width of the peripheral circuit to the CPU 2. I have it. Incidentally, the breakdown of the peripheral circuits A to D is, for example, an EPROM (hereinafter, simply referred to as ROROM) in which the peripheral circuit A can rewrite programs and data.
Peripheral circuit B is a RAM, and peripheral circuits C and D are other I / O devices.

【0026】そして、CPU2から各周辺回路A〜Dへ
は、データバス6の転送方向を示すリード・ライト信号
R/W、アドレスバス4上に有効なアドレスが存在する
ことを示すアドレスストローブ信号AS、及びデータバ
ス6上のデータが有効であることを示すデータストロー
ブ信号DS等、データ転送に必要な各種信号線が伸びて
いる。また、サイクル制御部8には、アドレスバス4及
びデータバス6が接続されると共に、CPU2からのシ
ステムクロックCLKと、アドレスストローブ信号AS
及びデータストローブ信号DSと、後述するライトプロ
テクト信号WP及びレジスタコントロール信号RCとが
入力されている。
A read / write signal R / W indicating the transfer direction of the data bus 6 and an address strobe signal AS indicating that a valid address is present on the address bus 4 are sent from the CPU 2 to the peripheral circuits A to D. , And various signal lines required for data transfer such as a data strobe signal DS indicating that the data on the data bus 6 is valid. The address bus 4 and the data bus 6 are connected to the cycle controller 8, and the system clock CLK from the CPU 2 and the address strobe signal AS are connected.
Also, a data strobe signal DS, a write protect signal WP and a register control signal RC, which will be described later, are input.

【0027】ここで、周辺回路A(ROM)には、予
め、各周辺回路A〜Dのアクセスタイムに夫々対応した
ウエイト数を表わす8ビットデータと各周辺回路A〜D
に夫々対応したバス幅を表わす8ビットデータとからな
る計16ビットのデータが格納されており、電源立ち上
げ時及びリセットスタート時に、その16ビットのデー
タをデータバス6のD0〜D15のデータライン上に出
力するようになっている。
Here, in the peripheral circuit A (ROM), 8-bit data representing the number of weights corresponding to the access times of the peripheral circuits A to D and the peripheral circuits A to D are stored in advance.
A total of 16-bit data consisting of 8-bit data representing the corresponding bus width and are stored in the data lines of D0 to D15 of the data bus 6 at power-on and reset start. It is designed to output above.

【0028】この16ビットデータは、最下位ビットか
ら8ビット目まで(D0〜D7)の各2ビット毎のデー
タ値が、夫々直接に各周辺回路A〜Dに対応するウエイ
ト数を表しており、9ビット目から16ビット目まで
(D8〜D15)の各2ビット毎のデータ値が、0なら
ば8ビットバス、1ならば16ビットバス、2ならば3
2ビットバスというように、夫々間接的に各周辺回路A
〜Dに対応するバス幅を表している。例えば、16ビッ
トデータが上位ビットから順に「00010010,0
0011001」であれば、周辺回路A〜Dに対応する
ウエイト数は、夫々、1,2,1,0となり、周辺回路
A〜Dに対応するバス幅は、夫々、32ビット,8ビッ
ト,16ビット,8ビットとなる。尚、本実施例におい
ては、2よりも大きいウエイト数及び32ビットよりも
大きいバス幅は設定されないものとする。
In this 16-bit data, the data value of every 2 bits from the least significant bit to the 8th bit (D0 to D7) directly represents the number of weights corresponding to the peripheral circuits A to D, respectively. , If the data value for each 2 bits from the 9th bit to the 16th bit (D8 to D15) is 0, it is an 8-bit bus, if it is 1, it is a 16-bit bus, and if it is 2,
Each peripheral circuit A, such as a 2-bit bus, is indirectly
The bus widths corresponding to D are shown. For example, the 16-bit data is "00010010,0
0011001 ”, the number of weights corresponding to the peripheral circuits A to D is 1, 2, 1, 0, respectively, and the bus widths corresponding to the peripheral circuits A to D are 32 bits, 8 bits, 16 respectively. 8 bits. In this embodiment, the number of weights larger than 2 and the bus width larger than 32 bits are not set.

【0029】また、電源立ち上げ時及びリセットスター
ト時に、CPU2は、サイクル制御部8に対して、ライ
トプロテクト信号WPをHighレベルで出力し、その後レ
ジスタコントロール信号RCをLow レベルからHighレベ
ルに変化させる。そして、本実施例のマイクロコンピュ
ータにおいて、CPU2は、「従来技術」の項で詳述し
たように、アドレスバス4上に何れかの周辺回路に対応
したアドレスデータを出力すると共に、リード・ライト
信号R/Wをリードサイクル或はライトサイクルに応じ
て出力し、アドレスストローブ信号AS及びデータスト
ローブ信号DSをLow レベルにすることにより、所望の
周辺回路との間でデータ転送を開始し、後述するように
サイクル制御部8から出力されるアック信号ACK0,
ACK1の少なくとも何れか一方がLow レベルになった
ことを検出すると、アクセスした周辺回路側でのデータ
転送動作が終了したことを認識して、データ転送の終了
動作を開始する。
When the power is turned on and the reset is started, the CPU 2 outputs the write protect signal WP to the cycle control unit 8 at the high level and then changes the register control signal RC from the low level to the high level. . Then, in the microcomputer of this embodiment, the CPU 2 outputs the address data corresponding to any of the peripheral circuits onto the address bus 4 as well as the read / write signal, as described in detail in the section "Prior Art". By outputting R / W in response to a read cycle or a write cycle and setting the address strobe signal AS and the data strobe signal DS to the low level, data transfer with a desired peripheral circuit is started, which will be described later. To the ACK signal ACK0 output from the cycle control unit 8,
When it is detected that at least one of ACK1 is at the Low level, it recognizes that the data transfer operation on the accessed peripheral circuit side is completed and starts the data transfer end operation.

【0030】次に、本願に関わる主要部であるサイクル
制御部8は、図1に示すように、CPU2が何れかの周
辺回路A〜Dをアクセスしたことを検出し、アクセスさ
れた周辺回路を示す検出信号EXA〜EXDを出力す
る、検出手段としてのアクセス検出部10と、このアク
セス検出部10からの検出信号EXA〜EXDに基づき
アック信号ACK0,ACK1を生成してCPU2に出
力するACK信号生成部12とから構成されている。
Next, as shown in FIG. 1, the cycle control unit 8 which is a main part relating to the present application detects that the CPU 2 has accessed any of the peripheral circuits A to D, and determines the accessed peripheral circuit. Access detection section 10 as detection means for outputting detection signals EXA-EXD shown, and ACK signal generation for generating ACK signals ACK0, ACK1 based on detection signals EXA-EXD from this access detection section 10 and outputting them to CPU2 And a part 12.

【0031】図2に示すように、アクセス検出部10
は、4つのナンドゲートNAND1〜4と、CPU2か
らのアドレスストローブ信号AS及びデータストローブ
信号DSの否定論理和をとるノアゲートNORと、から
構成されており、各ナンドゲートNAND1〜4には、
ノアゲートNORの出力信号が共通に入力されると共
に、ナンドゲートNAND1には周辺回路Aに対応した
アドレスバス4上のアドレス信号が入力され、ナンドゲ
ートNAND2には周辺回路Bに対応したアドレス信号
が入力されるといった具合いに、各周辺回路A〜Dに対
応したアドレス信号が夫々入力されている。
As shown in FIG. 2, the access detection unit 10
Is composed of four NAND gates NAND1 to NAND4, and a NOR gate NOR that takes the NOR of the address strobe signal AS and the data strobe signal DS from the CPU2.
The output signal of the NOR gate NOR is commonly input, the address signal on the address bus 4 corresponding to the peripheral circuit A is input to the NAND gate NAND1, and the address signal corresponding to the peripheral circuit B is input to the NAND gate NAND2. As described above, the address signals corresponding to the peripheral circuits A to D are respectively input.

【0032】このように構成されたアクセス検出部10
においては、CPU2が何れかの周辺回路A〜Dをアク
セスすると、その周辺回路に対応するアドレスバス4上
のアドレス信号が全てHighレベルになると共に、アドレ
スストローブ信号AS及びデータストローブ信号DSが
Low レベルとなるため、各ナンドゲートNAND1〜4
の出力信号のうち、アクセスされた周辺回路に対応する
信号だけがLow レベルとなる。そして、各ナンドゲート
NAND1〜4の出力信号が、CPU2によりアクセス
された周辺回路A〜Dを表わす検出信号EXA〜EXD
として、ACK信号生成部12へ出力される。
The access detection unit 10 thus configured
In the above, when the CPU 2 accesses any of the peripheral circuits A to D, all the address signals on the address bus 4 corresponding to the peripheral circuit become High level, and the address strobe signal AS and the data strobe signal DS become
Each NAND gate NAND1 to 4 becomes low level.
Of the output signals of, only the signal corresponding to the accessed peripheral circuit becomes low level. The output signals of the NAND gates NAND1 to NAND4 represent the detection signals EXA to EXD representing the peripheral circuits A to D accessed by the CPU2.
Is output to the ACK signal generator 12.

【0033】そして、ACK信号生成部12は、図3に
示すように、電源立ち上げ時及びリセットスタート時に
周辺回路A(ROM)からデータバス6を介して入力さ
れるD0〜D15の16ビットデータのうちD0〜D7
の8ビットデータに基づき、各周辺回路A〜Dに夫々対
応するウエイト数を記憶すると共に、アクセス検出部1
0からの検出信号EXA〜EXDに基づきCPU2から
アクセスされた周辺回路A〜Dに対応するウエイト数を
検索して、検索信号AWT0,AWT1,AWT2〜D
WT0,DWT1,DWT2を出力するウエイト数検索
回路14と、ウエイト数検索回路14からの検索信号A
WT0,AWT1,AWT2〜DWT0,DWT1,D
WT2に基づき、CPU2からアクセスされた周辺回路
に対応するウエイト数を表わす設定信号WT0,WT
1,WT2を出力する、ウエイト時間設定手段としての
ウエイト数設定回路16と、電源立ち上げ時及びリセッ
トスタート時に周辺回路A(ROM)からデータバス6
を介して入力されるD0〜D15の16ビットデータの
うちD8〜D15の8ビットデータに基づき、各周辺回
路A〜Dに夫々対応するバス幅を記憶すると共に、アク
セス検出部10からの検出信号EXA〜EXDに基づき
CPU2からアクセスされた周辺回路A〜Dに対応する
バス幅を検索して、検索信号ABS0,ABS1,AB
S2〜DBS0,DBS1,DBS2を出力するバス幅
検索回路18と、バス幅検索回路18からの検索信号A
BS0,ABS1,ABS2〜DBS0,DBS1,D
BS2に基づき、CPU2からアクセスされた周辺回路
に対応するバス幅を表わす2ビット信号BS0,BS1
を出力する、バス幅読み出し手段としてのバス幅設定回
路20と、アクセス検出部10により何れかの周辺回路
がアクセスされたことが検出されると、ウエイト数設定
回路16からの設定信号WT0,WT1,WT2が表わ
すウエイト数に応じた時間を計時して、CPU2へバス
幅設定回路20から出力されている2ビット信号BS
0,BS1をアック信号ACK0,ACK1として出力
する、応答信号生成手段としてのACK信号生成回路2
2と、から構成されている。
Then, as shown in FIG. 3, the ACK signal generator 12 receives 16-bit data D0 to D15 input from the peripheral circuit A (ROM) via the data bus 6 at the time of power-on and reset start. Out of D0 to D7
The number of weights corresponding to each of the peripheral circuits A to D is stored based on the 8-bit data of
Based on the detection signals EXA to EXD from 0, the number of weights corresponding to the peripheral circuits A to D accessed from the CPU 2 is searched, and the search signals AWT0, AWT1, AWT2 to D are searched.
A weight number search circuit 14 for outputting WT0, DWT1, DWT2, and a search signal A from the weight number search circuit 14.
WT0, AWT1, AWT2-DWT0, DWT1, D
Based on WT2, setting signals WT0 and WT representing the number of weights corresponding to the peripheral circuits accessed from CPU2
1 and WT2, a wait number setting circuit 16 as a wait time setting means, and a peripheral circuit A (ROM) to the data bus 6 at power-on and reset start.
Based on the 8-bit data of D8 to D15 among the 16-bit data of D0 to D15 input via the, the corresponding bus width is stored in each of the peripheral circuits A to D, and the detection signal from the access detection unit 10 is stored. The bus width corresponding to the peripheral circuits A to D accessed from the CPU 2 is searched based on the EXA to EXD, and the search signals ABS0, ABS1, and AB are searched.
A bus width search circuit 18 that outputs S2 to DBS0, DBS1, and DBS2, and a search signal A from the bus width search circuit 18
BS0, ABS1, ABS2-DBS0, DBS1, D
2-bit signals BS0 and BS1 representing the bus width corresponding to the peripheral circuit accessed from CPU2 based on BS2
When the access width is detected by the bus width setting circuit 20 as a bus width reading unit and the access detection unit 10 detects that one of the peripheral circuits is accessed, the setting signals WT0 and WT1 from the weight number setting circuit 16 are output. , WT2, the time corresponding to the number of waits is counted, and the 2-bit signal BS output from the bus width setting circuit 20 to the CPU 2 is output.
0, BS1 as ACK signals ACK0, ACK1 and ACK signal generation circuit 2 as response signal generation means
2 and.

【0034】まず、ウエイト数検索回路14は、図4に
示すように、オアゲートOR1と、ウエイト時間記憶手
段としての8回路Dフリップフロップ24と、ウエイト
時間設定手段としての4個のデコーダ26,28,3
0,32と、から構成されている。
First, as shown in FIG. 4, the number-of-waits search circuit 14 is an OR gate OR1, an eight-circuit D flip-flop 24 as a wait time storage means, and four decoders 26, 28 as wait time setting means. , 3
It is composed of 0 and 32.

【0035】8回路Dフリップフロップ24は、クロッ
ク端子CKからの信号を共通クロックとする8個のDフ
リップフロップを内臓した周知の回路であり、クロック
端子CKから入力される信号の立ち上がりタイミング
で、入力端子1D〜8Dからの入力信号をラッチして夫
々出力端子1Q〜8Qから出力する。
The eight-circuit D flip-flop 24 is a well-known circuit incorporating eight D flip-flops that use the signal from the clock terminal CK as a common clock, and the rising timing of the signal input from the clock terminal CK The input signals from the input terminals 1D to 8D are latched and output from the output terminals 1Q to 8Q, respectively.

【0036】また、デコーダ26,28,30,32
は、2本の入力端子IS0,IS1と、3本の出力端子
Y0,Y1,Y2と、イネーブル端子Eとを備えた周知
のラインデコーダであり、イネーブル端子Eからの入力
信号がLow レベルのときに、入力端子IS0,IS1か
らの入力信号が共にLow レベルならば出力端子Y0のみ
からLow レベルの信号を出力し、入力端子IS0からの
入力信号がHighレベルであり入力端子IS1からの入力
信号がLow レベルならば出力端子Y1のみからLow レベ
ルの信号を出力し、入力端子IS0からの入力信号がLo
w レベルであり入力端子IS1からの入力信号がHighレ
ベルならば出力端子Y2のみからLow レベルの信号を出
力する。また、イネーブル端子Eの入力信号がHighレベ
ルのときには、入力端子IS1,IS0からの入力信号
に関わらず、全ての出力端子Y0,Y1,Y2からHigh
レベルの信号を出力する。
The decoders 26, 28, 30, 32 are also provided.
Is a well-known line decoder having two input terminals IS0 and IS1, three output terminals Y0, Y1 and Y2, and an enable terminal E. When the input signal from the enable terminal E is at a low level If the input signals from the input terminals IS0 and IS1 are both at the low level, a low level signal is output only from the output terminal Y0, the input signal from the input terminal IS0 is at the high level, and the input signal from the input terminal IS1 is If it is low level, a low level signal is output only from the output terminal Y1 and the input signal from the input terminal IS0 is low.
If it is at the w level and the input signal from the input terminal IS1 is at the high level, the low level signal is output only from the output terminal Y2. Further, when the input signal of the enable terminal E is High level, all the output terminals Y0, Y1, Y2 are High regardless of the input signals from the input terminals IS1, IS0.
Output level signal.

【0037】そして、図4に示すように、8回路Dフリ
ップフロップ24の各入力端子1D〜8Dには、データ
バス6上の8ビットデータD0〜D7が夫々入力されて
おり、各出力端子1Q〜8Qは、2本単位で、各デコー
ダ26,28,30,32の入力端子IS0,IS1に
夫々接続されている。また、オアゲートOR1には、C
PU2からのライトプロテクト信号WPとレジスタコン
トロール信号RCとが入力されており、このオアゲート
OR1の出力信号は、8回路Dフリップフロップのクロ
ック端子CKに入力されている。また更に、各デコーダ
26,28,30,32のイネーブル端子Eには、アク
セス検出部10からの検出信号EXA〜EXDが夫々入
力されている。
As shown in FIG. 4, 8-bit data D0 to D7 on the data bus 6 are input to the input terminals 1D to 8D of the 8-circuit D flip-flop 24, respectively, and the output terminals 1Q are output. 8Q are connected to the input terminals IS0 and IS1 of the decoders 26, 28, 30, and 32 in units of two, respectively. Further, the OR gate OR1 has a C
The write protect signal WP and the register control signal RC from PU2 are input, and the output signal of the OR gate OR1 is input to the clock terminal CK of the 8-circuit D flip-flop. Furthermore, the detection signals EXA to EXD from the access detection unit 10 are input to the enable terminals E of the decoders 26, 28, 30, and 32, respectively.

【0038】このように構成されたウエイト数検索回路
14においては、電源立ち上げ時及びリセットスタート
時に、CPU2からのライトプロテクト信号WPとレジ
スタコントロール信号RCとが共にHighレベルになる
と、オアゲートOR1から立ち上がりエッジが出力さ
れ、8回路Dフリップフロップ24が、そのとき周辺回
路A(ROM)がデータバス6に出力している各データ
D0〜D7をラッチして、その各データを夫々出力端子
1Q〜8Qから出力する。つまり、このときに、周辺回
路A(ROM)に格納されていたウエイト数を表わす8
ビットデータが8回路Dフリップフロップ24に記憶さ
れるのである。
In the weight number search circuit 14 thus constructed, when the write protect signal WP from the CPU 2 and the register control signal RC are both at the high level at power-on and reset start, the OR gate OR1 rises. An edge is output, and the 8-circuit D flip-flop 24 latches each data D0 to D7 which the peripheral circuit A (ROM) is outputting to the data bus 6 at that time, and outputs each data to the output terminals 1Q to 8Q, respectively. Output from. That is, at this time, the number of weights stored in the peripheral circuit A (ROM) is represented by 8
The bit data is stored in the 8-circuit D flip-flop 24.

【0039】尚、このように、ライトプロテクト信号W
Pとレジスタコントロール信号RCとが共にHighレベル
となったときにのみ、8回路Dフリップフロップ24に
データが記憶されるようにしているのは、CPU2が、
何らかの原因で、データバス6上に適当なデータが出力
されていないときにレジスタコントロール信号RCをHi
ghレベルに変化させても、ライトプロテクト信号WPが
Low レベルである限り、8回路Dフリップフロップ24
の記憶内容が変更されないようにするためである。
As described above, the write protect signal W
The CPU 2 stores the data in the 8-circuit D flip-flop 24 only when both P and the register control signal RC become High level.
For some reason, when proper data is not output on the data bus 6, the register control signal RC is set to Hi.
Even if it is changed to gh level, the write protect signal WP
8 circuit D flip-flop 24
This is to prevent the stored contents of the item from being changed.

【0040】そして、アクセス検出部10からの検出信
号EXA〜EXDのうち何れかがLow レベルになると、
その検出信号が入力されたデコーダ26〜32が、8回
路Dフリップフロップ24からの各2ビットデータを上
述のようにデコードし、そのデコードした出力信号を、
検索信号AWT0,AWT1,AWT2〜DWT0,D
WT1,DWT2としてウエイト数設定回路16へ出力
する。
When any of the detection signals EXA to EXD from the access detection unit 10 becomes low level,
The decoders 26 to 32, to which the detection signal is input, decode the 2-bit data from the 8-circuit D flip-flop 24 as described above, and output the decoded output signal.
Search signals AWT0, AWT1, AWT2 to DWT0, D
It is output to the weight number setting circuit 16 as WT1 and DWT2.

【0041】例えば、8回路Dフリップフロップ24の
出力端子から8Q〜1Qの順で、周辺回路A〜Dのウエ
イト数が夫々1,2,1,0であることを示す「000
11001」が出力されているときに、CPU2により
周辺回路Bがアクセスされて検出信号EXBがLow レベ
ルになると、検索信号AWT0,AWT1,AWT2〜
DWT0,DWT1,DWT2のうちBWT2だけがLo
w レベルとなり、また、周辺回路Dがアクセスされて検
出信号EXDがLow レベルになると、DWT0だけがLo
w レベルとなる。
For example, "000" indicating that the number of weights of the peripheral circuits A to D is 1, 2, 1, 0 in the order of 8Q to 1Q from the output terminal of the 8-circuit D flip-flop 24, respectively.
When the peripheral circuit B is accessed by the CPU 2 and the detection signal EXB becomes Low level while "11001" is output, the search signals AWT0, AWT1, AWT2 to
Of DWT0, DWT1, DWT2, only BWT2 is Lo
If the peripheral circuit D is accessed and the detection signal EXD becomes Low level, only DWT0 becomes Low level.
w level.

【0042】つまり、検索信号AWT0,AWT1,A
WT2〜DWT0,DWT1,DWT2の先頭のアルフ
ァベットと末尾の数字とは、夫々、周辺回路とそのウエ
イト数に対応しており、CPU2により何れかの周辺回
路がアクセスされると、そのアクセスされた周辺回路の
ウエイト数に対応した検索信号のみがLow レベルで出力
されるのである。
That is, the search signals AWT0, AWT1, A
The leading alphabet and the ending numeral of WT2 to DWT0, DWT1, and DWT2 correspond to the peripheral circuit and the number of weights thereof, respectively, and when any peripheral circuit is accessed by the CPU 2, the accessed peripheral Only the search signal corresponding to the number of circuit weights is output at Low level.

【0043】次に、ウエイト数設定回路16は、図5に
示すように、3つのアンドゲートAND1〜3により構
成されており、各アンドゲートAND1〜3には、ウエ
イト数検索回路14から出力された検索信号AWT0,
AWT1,AWT2〜DWT0,DWT1,DWT2
が、各ウエイト数に対応する信号別に入力されている。
そして、各ナンドゲートNAND1〜3の出力信号が、
夫々、設定信号WT0,WT1,WT2としてACK信
号生成回路22に出力される。
Next, the weight number setting circuit 16 is composed of three AND gates AND1 to AND3, as shown in FIG. 5, and the weight number search circuit 14 outputs to each AND gate AND1 to AND3. Search signal AWT0,
AWT1, AWT2-DWT0, DWT1, DWT2
Are input for each signal corresponding to each weight number.
The output signals of the NAND gates NAND1 to NAND3 are
It is output to the ACK signal generation circuit 22 as setting signals WT0, WT1, and WT2, respectively.

【0044】つまり、設定信号WT0,WT1,WT2
の末尾の数字は、CPU2によりアクセスされた周辺回
路のウエイト数に対応しており、この設定信号WT0,
WT1,WT2のうち、アクセスされた周辺回路のウエ
イト数に対応した信号だけがLow レベルで出力されるの
である。
That is, the setting signals WT0, WT1, WT2
The number at the end of the number corresponds to the number of weights of the peripheral circuit accessed by the CPU 2, and the setting signal WT0,
Of WT1 and WT2, only the signal corresponding to the number of waits of the accessed peripheral circuit is output at the Low level.

【0045】一方、バス幅検索回路18は、図6に示す
ように、ウエイト数検索回路14と全く同様に構成され
ており、CPU2からのライトプロテクト信号WPとレ
ジスタコントロール信号RCとが入力されたオアゲート
OR2と、オアゲートOR2の出力信号をクロック信号
として入力する、バス幅記憶手段としての8回路Dフリ
ップフロップ34と、8回路Dフリップフロップ34か
らの出力信号を夫々2個単位でデコードする、バス幅読
み出し手段としての4個のデコーダ36,38,40,
42と、を備えている。そして、このバス幅検索回路1
8と上述のウエイト数検索回路14とは、8回路Dフリ
ップフロップ34の各入力端子1D〜8Dに、データバ
ス6上の8ビットデータD8〜D15が夫々入力されて
いる点のみ異なっている。
On the other hand, the bus width search circuit 18, as shown in FIG. 6, is constructed in exactly the same way as the wait number search circuit 14, and receives the write protect signal WP and the register control signal RC from the CPU 2. A bus for decoding an OR gate OR2 and an output signal of the OR gate OR2 as a clock signal from an 8-circuit D flip-flop 34 serving as a bus width storage unit and an output signal from the 8-circuit D flip-flop 34 in units of two. Four decoders 36, 38, 40 as width reading means,
And 42. And this bus width search circuit 1
8 and the above-described weight number search circuit 14 are different only in that 8-bit data D8 to D15 on the data bus 6 are input to the respective input terminals 1D to 8D of the 8-circuit D flip-flop 34.

【0046】このように構成されたバス幅検索回路18
においては、電源立ち上げ時及びリセットスタート時
に、CPU2からのライトプロテクト信号WPとレジス
タコントロール信号RCとが共にHighレベルになると、
8回路Dフリップフロップ34が、そのとき周辺回路A
(ROM)がデータバス6に出力している各データD8
〜D15をラッチして、その各データを夫々出力端子1
Q〜8Qから出力する。つまり、このときに、周辺回路
A(ROM)に格納されていたバス幅を表わす8ビット
データが8回路Dフリップフロップ34に記憶される。
The bus width search circuit 18 thus configured
In the above, when the write protect signal WP and the register control signal RC from the CPU 2 are both at the high level at power-on and reset start,
The 8-circuit D flip-flop 34 is then operated by the peripheral circuit A.
Each data D8 output from the (ROM) to the data bus 6
~ D15 is latched and each data is output terminal 1
Output from Q to 8Q. That is, at this time, the 8-bit data representing the bus width stored in the peripheral circuit A (ROM) is stored in the 8-circuit D flip-flop 34.

【0047】尚、このバス幅検索回路18においても、
ライトプロテクト信号WPとレジスタコントロール信号
RCとが共にHighレベルとなったときにのみ、8回路D
フリップフロップ34にデータが記憶されるようにし
て、データバス6上に適当なデータが出力されていない
ときに8回路Dフリップフロップ34の記憶内容が変更
されないようにしている。
In the bus width search circuit 18, too,
8 circuits D only when both the write protect signal WP and the register control signal RC are at high level
Data is stored in the flip-flop 34 so that the stored contents of the 8-circuit D flip-flop 34 are not changed when appropriate data is not output on the data bus 6.

【0048】そして、CPU2により何れかの周辺回路
A〜Dがアクセスされてアクセス検出部10からの検出
信号EXA〜EXDのうち何れかがLow レベルになる
と、その検出信号が入力されたデコーダ36〜42が、
8回路Dフリップフロップ34からの各2ビットデータ
をウエイト数検索回路14の場合と全く同様にデコード
し、そのデコードした出力信号を、検索信号ABS0,
ABS1,ABS2〜DBS0,DBS1,DBS2と
してバス幅設定回路20へ出力する。
When any of the peripheral circuits A to D is accessed by the CPU 2 and any one of the detection signals EXA to EXD from the access detecting section 10 becomes low level, the decoder 36 to which the detection signal is input is input. 42
Each 2-bit data from the 8-circuit D flip-flop 34 is decoded exactly as in the case of the weight number search circuit 14, and the decoded output signal is used as the search signal ABS0,
It is output to the bus width setting circuit 20 as ABS1, ABS2 to DBS0, DBS1 and DBS2.

【0049】例えば、8回路Dフリップフロップ34の
出力端子から8Q〜1Qの順で、周辺回路A〜Dのバス
幅が夫々32ビット,8ビット,16ビット,8ビット
であることを示す「00010010」が出力されてい
るときに、CPU2により周辺回路Bがアクセスされて
検出信号EXBがLow レベルになると、検索信号ABS
0,ABS1,ABS2〜DBS0,DBS1,DBS
2のうちBBS0だけがLow レベルとなり、また、周辺
回路Cがアクセスされて検出信号EXCがLowレベルに
なると、CBS1だけがLow レベルとなる。
For example, "00010010" indicating that the bus widths of the peripheral circuits A to D are 32 bits, 8 bits, 16 bits, and 8 bits in the order of 8Q to 1Q from the output terminal of the 8-circuit D flip-flop 34, respectively. When the peripheral circuit B is accessed by the CPU 2 and the detection signal EXB becomes low level while "" is output, the search signal ABS
0, ABS1, ABS2-DBS0, DBS1, DBS
Of B2, only BBS0 becomes low level, and when the peripheral circuit C is accessed and the detection signal EXC becomes low level, only CBS1 becomes low level.

【0050】つまり、検索信号ABS0,ABS1,A
BS2〜DBS0,DBS1,DBS2の先頭のアルフ
ァベットと末尾の数字とは、夫々、周辺回路とそのバス
幅を間接的に表わすデータ値とに対応しており、CPU
2により何れかの周辺回路がアクセスされると、そのア
クセスされた周辺回路のバス幅を表わす検索信号のみが
Low レベルで出力されるのである。
That is, the search signals ABS0, ABS1, A
The first alphabet and the last numeral of BS2 to DBS0, DBS1, and DBS2 correspond to the peripheral circuit and the data value that indirectly indicates the bus width, respectively.
When any peripheral circuit is accessed by 2, only the search signal indicating the bus width of the accessed peripheral circuit is returned.
It is output at Low level.

【0051】そして、バス幅設定回路20は、図7に示
すように、5つのアンドゲートAND4〜8により構成
されており、アンドゲートAND4〜6には、バス幅検
索回路18から出力された検索信号ABS0,ABS
1,ABS2〜DBS0,DBS1,DBS2が、各バ
ス幅に対応する信号別に入力されている。そして、ナン
ドゲートNAND4,6の各出力信号がナンドゲートN
AND7に入力され、ナンドゲートNAND5,6の各
出力信号がナンドゲートNAND8に入力されており、
このナンドゲートNAND7,8の各出力信号が、夫
々、2ビット信号BS0,BS1としてACK信号生成
回路22に出力される。
The bus width setting circuit 20 is composed of five AND gates AND4 to AND8 as shown in FIG. 7, and the AND gates AND4 to AND6 are provided with the search output from the bus width search circuit 18. Signal ABS0, ABS
1, ABS2 to DBS0, DBS1, and DBS2 are input for each signal corresponding to each bus width. Then, the output signals of the NAND gates NAND4 and NAND6 become NAND gate N.
AND7, each output signal of NAND gate NAND5,6 is input into NAND gate NAND8,
The output signals of the NAND gates NAND7 and NAND8 are output to the ACK signal generation circuit 22 as 2-bit signals BS0 and BS1, respectively.

【0052】従って、バス幅検索回路18からの検索信
号ABS0,ABS1,ABS2〜DBS0,DBS
1,DBS2のうち、アクセスされた周辺回路のバス幅
が8ビットであることを示す末尾の数字が”0”の検索
信号がLow レベルであるときには、2ビット信号BS
0,BS1のうちBS0のみがLow レベルとなり、バス
幅が16ビットであることを示す末尾の数字が”1”の
検索信号がLow レベルであるときには、BS1のみがLo
w レベルとなり、バス幅が32ビットであることを示す
末尾の数字が”2”の検索信号がLow レベルであるとき
には、BS0,BS1が共にLow レベルとなる。つま
り、この2つの2ビット信号BS0,BS1が、「従来
技術」の項で説明したバス幅を表わす2ビット信号に対
応している。
Therefore, the search signals ABS0, ABS1, ABS2 to DBS0, DBS from the bus width search circuit 18 are obtained.
1 or DBS2, a 2-bit signal BS is output when a search signal whose number at the end is "0", which indicates that the bus width of the accessed peripheral circuit is 8 bits, is low level.
Of BS0 and BS1, only BS0 goes low, and when the search signal with the last digit "1" indicating that the bus width is 16 bits is low, only BS1 goes low.
When the search signal having the w level and the number at the end indicating that the bus width is 32 bits is "2" is at the Low level, both BS0 and BS1 are at the Low level. In other words, these two 2-bit signals BS0 and BS1 correspond to the 2-bit signal representing the bus width described in the "Prior Art" section.

【0053】そして、ACK信号生成回路22は、図8
に示すように、検出信号EXA〜EXDの論理積をとる
アンドゲートAND9と、アンドゲートAND9の出力
信号をデータとして入力すると共に、システムクロック
CLKをクロック信号として入力するDフリップフロッ
プDFF1,DFF2,DFF3からなるシフトレジス
タ44と、ウエイト数設定回路16からの設定信号WT
0とDフリップフロップDFF1の出力信号とが入力さ
れたオアゲートOR3と、設定信号WT1とDフリップ
フロップDFF2の出力信号とが入力されたオアゲート
OR4と、設定信号WT2とDフリップフロップDFF
3の出力信号とが入力されたオアゲートOR5と、オア
ゲートOR3〜5の出力信号の論理積をとるアンドゲー
トAND10と、バス幅設定回路20からの2ビット信
号BS0,BS1が夫々入力されると共に、アンドゲー
トAND10の出力信号が共通に入力されたオアゲート
OR6,7と、から構成されている。
Then, the ACK signal generating circuit 22 has the same structure as that shown in FIG.
As shown in FIG. 3, an AND gate AND9 that takes the logical product of the detection signals EXA to EXD, and the D flip-flops DFF1, DFF2, DFF3 that inputs the output signal of the AND gate AND9 as data and the system clock CLK as the clock signal Shift register 44 consisting of the following, and a setting signal WT from the weight number setting circuit 16
0 and the output signal of the D flip-flop DFF1 are input to the OR gate OR3, the setting signal WT1 and the output signal of the D flip-flop DFF2 are input to the OR gate OR4, the setting signal WT2 and the D flip-flop DFF
The OR gate OR5 to which the output signal of 3 is input, the AND gate AND10 that takes the logical product of the output signals of the OR gates OR3 to 5, and the 2-bit signals BS0 and BS1 from the bus width setting circuit 20 are input, respectively. It is composed of OR gates OR6 and 7 to which the output signal of the AND gate AND10 is commonly input.

【0054】このように構成されたACK信号生成回路
22においては、全ての周辺回路A〜Dがアクセスされ
ておらず検出信号EXA〜EXDが全てHighレベルであ
るときには、アンドゲートAND9の出力信号がHighレ
ベルとなるため、DフリップフロップDFF1〜3の出
力信号は全てHighレベルとなって、各オアゲートOR
6,7からCPU2へ、共にHighレベルのアック信号A
CK0,ACK1が出力される。
In the ACK signal generating circuit 22 thus constructed, when all the peripheral circuits A to D are not accessed and the detection signals EXA to EXD are all at the high level, the output signal of the AND gate AND9 is output. Since it becomes the High level, all the output signals of the D flip-flops DFF1 to 3 become the High level, and each OR gate OR
Ac signal A of high level from 6, 7 to CPU 2
CK0 and ACK1 are output.

【0055】そして、何れかの周辺回路がアクセスされ
て検出信号EXA〜EXDのうち何れか1つがLow レベ
ルになると、アンドゲートAND9の出力信号がLow レ
ベルとなってシフトレジスタ44にLow レベルのデータ
が入力されるため、そのときLow レベルとなっている設
定信号WT0,WT1,WT2に応じたシステムクロッ
クCLKの所定周期後に、オアゲートOR3〜5の何れ
かからLow レベルの信号が出力される。すると、アンド
ゲートAND10の出力信号がLow レベルになるため、
オアゲートOR6,7からCPU2へ、バス幅設定回路
20からのバス幅を表わす2ビット信号BS0,BS1
がアック信号ACK0,ACK1として出力されること
となる。
When any of the peripheral circuits is accessed and any one of the detection signals EXA to EXD becomes low level, the output signal of the AND gate AND9 becomes low level and the shift register 44 receives low level data. Is input, a Low level signal is output from any of the OR gates OR3 to OR5 after a predetermined period of the system clock CLK corresponding to the setting signals WT0, WT1, and WT2 that are at Low level at that time. Then, since the output signal of the AND gate AND10 becomes Low level,
2-bit signals BS0 and BS1 representing the bus width from the bus width setting circuit 20 from the OR gates OR6 and 7 to the CPU2.
Will be output as ACK signals ACK0 and ACK1.

【0056】例えば、何れかの周辺回路がアクセスされ
て、ウエイト数設定回路16からの設定信号WT0,W
T1,WT2のうち、ウエイト数が1であることを示す
設定信号WT1がLow レベルになると、オアゲートOR
3〜5のうちオアゲートOR4だけが出力変化を許可さ
れ、その後このACK信号生成回路22にシステムクロ
ックCLKの立ち上がりエッジが2回入力されると、シ
フトレジスタ44を構成するDフリップフロップDFF
2の出力信号がLow レベルとなって、オアゲートOR4
の出力信号がLow レベルに変化し、オアゲートOR6,
7からCPU2へ2ビット信号BS0,BS1がアック
信号ACK0,ACK1として出力される。また、ウエ
イト数が2であることを示す設定信号WT2がLow レベ
ルになった場合には、オアゲートOR5だけが出力変化
を許可されるため、その後このACK信号生成回路22
にシステムクロックCLKの立ち上がりエッジが3回入
力されると、オアゲートOR6,7からCPU2へ2ビ
ット信号BS0,BS1がアック信号ACK0,ACK
1として出力されることとなる。
For example, one of the peripheral circuits is accessed and the setting signals WT0 and W from the weight number setting circuit 16 are accessed.
Of the T1 and WT2, when the setting signal WT1 indicating that the number of weights is 1, becomes low level, the OR gate OR
If only the OR gate OR4 of 3 to 5 is allowed to change its output and then the rising edge of the system clock CLK is input to the ACK signal generating circuit 22 twice, the D flip-flop DFF forming the shift register 44 is formed.
The output signal of 2 becomes low level, and OR gate OR4
Output signal changes to Low level and OR gate OR6
2-bit signals BS0 and BS1 are output from the CPU 7 to the CPU 2 as ACK signals ACK0 and ACK1. Further, when the setting signal WT2 indicating that the number of weights is 2 becomes Low level, only the OR gate OR5 is allowed to change its output, and thereafter, the ACK signal generating circuit 22
When three rising edges of the system clock CLK are input to the CPU 2, the OR gates OR6 and 7 send the 2-bit signals BS0 and BS1 to the CPU 2 to acknowledge the signals ACK0 and ACK.
It will be output as 1.

【0057】即ち、このACK信号生成回路22におい
ては、ウエイト数設定回路16からLow レベルで出力さ
れた設定信号WT0,WT1,WT2に応じてシフトレ
ジスタ44の段数を変化させることにより、何れかの周
辺回路がアクセスされてから2ビット信号BS0,BS
1をアック信号ACK0,ACK1として出力するまで
の時間を切り換えるようにしているのである。
That is, in the ACK signal generating circuit 22, by changing the number of stages of the shift register 44 in accordance with the setting signals WT0, WT1, WT2 output from the weight number setting circuit 16 at the Low level, either 2-bit signals BS0 and BS after the peripheral circuits are accessed
The time until 1 is output as the ACK signals ACK0 and ACK1 is switched.

【0058】ここで、このようなサイクル制御部8を備
えた本実施例のマイクロコンピュータで行われるデータ
転送の一連の動作について、周辺回路BからCPU2へ
のデータ転送(リードサイクル)の場合を例に挙げ、図
9(B)を併用して説明する。
Here, regarding a series of data transfer operations performed by the microcomputer of this embodiment having such a cycle control unit 8, a case of data transfer from the peripheral circuit B to the CPU 2 (read cycle) is taken as an example. The description will be made with reference to FIG.

【0059】尚、以下の説明において、図9(B)に示
すアック信号ACKは、本実施例のサイクル制御部8か
ら出力される2ビットのアック信号ACK0,ACK1
の論理積を表わしているものとする。また、ウエイト数
検索回路14内の8回路Dフリップフロップ24には、
各周辺回路A〜Dのウエイト数が、夫々、2,1,2,
0であることを表わす8ビットデータ「0010011
0」が格納されており、バス幅検索回路18内の8回路
Dフリップフロップ34には、各周辺回路A〜Dのバス
幅が、夫々、32ビット,8ビット,16ビット,8ビ
ットであることを表わす8ビットデータ「000100
10」が格納されているものとする。
In the following description, the ACK signal ACK shown in FIG. 9B is the 2-bit ACK signal ACK0, ACK1 output from the cycle controller 8 of this embodiment.
It represents the logical product of In addition, the eight-circuit D flip-flop 24 in the weight number search circuit 14
The weight numbers of the peripheral circuits A to D are 2, 1, 2, respectively.
8-bit data "0010011" indicating that it is 0
0 ”is stored, and the bus widths of the peripheral circuits A to D are 32 bits, 8 bits, 16 bits, and 8 bits in the 8-circuit D flip-flop 34 in the bus width search circuit 18, respectively. 8-bit data "000100"
10 ”is stored.

【0060】まず、図9(B)に示すように、CPU2
は、ステートS1で、周辺回路Bのアドレスを出力する
と共に、ステートS2で、アドレスストローブ信号AS
及びデータストローブ信号DSをLow レベルで出力す
る。またこのとき、CPU2は、リード・ライト信号R
/Wをリードサイクルであることを示すHighレベルで出
力する。
First, as shown in FIG. 9B, the CPU 2
Outputs the address of the peripheral circuit B in the state S1 and outputs the address strobe signal AS in the state S2.
Also, the data strobe signal DS is output at a low level. Further, at this time, the CPU 2 causes the read / write signal R
/ W is output at a high level indicating a read cycle.

【0061】すると、周辺回路Bは、アドレスバス4上
のアドレスにより自分がアクセスされたことを認識し
て、データバス6上にデータを出力する準備を開始す
る。そして、これと同時に、サイクル制御部8におい
て、アクセス検出部10からは検出信号EXBだけがLo
w レベルで出力され、ウエイト数検索回路14からは検
索信号BWT1だけがLow レベルで出力されると共に、
バス幅検索回路18からは検索信号BBS0だけがLow
レベルで出力される。すると、バス幅設定回路20から
出力される2ビット信号BS0,BS1のうちBS0だ
けがLow レベルになると共に、ウエイト数設定回路16
から出力される設定信号WT0,WT1,WT2のうち
ウエイト数が1であることを示す設定信号WT1だけが
Low レベルになって、ACK信号生成回路22内のオア
ゲートOR3〜5のうちオアゲートOR4だけが出力変
化を許可される。しかし、その後システムクロックCL
Kが2回立ち上がるまでは、2ビット信号BS0,BS
1に関わらずCPU2へ出力されるアック信号ACK
0,ACK1は共にHighレベルのままである。
Then, peripheral circuit B recognizes that it has been accessed by the address on address bus 4 and starts preparing to output data on data bus 6. At the same time, in the cycle control unit 8, only the detection signal EXB from the access detection unit 10 becomes Lo.
It is output at w level, and only the search signal BWT1 is output at low level from the weight number search circuit 14, and
Only the search signal BBS0 is low from the bus width search circuit 18.
Output at the level. Then, of the 2-bit signals BS0 and BS1 output from the bus width setting circuit 20, only BS0 becomes low level and the wait number setting circuit 16
Of the setting signals WT0, WT1, WT2 output from, only the setting signal WT1 indicating that the number of weights is 1
When it becomes Low level, only the OR gate OR4 of the OR gates OR3 to 5 in the ACK signal generation circuit 22 is allowed to change the output. However, after that, the system clock CL
2-bit signals BS0, BS until K rises twice
Ac signal ACK output to CPU2 regardless of 1
Both 0 and ACK1 remain at High level.

【0062】従って、CPU2は、図9(B)に示すよ
うに、最初のステートS3,S4の動作を終了した時点
では、アック信号ACK0,ACK1が共にHighレベル
のままであるため、もう一度ステートS3,S4の動作
を繰り返すこととなる。そして、CPU2が、2回目の
ステートS3を終了した直後、即ち、ステートS2を終
了してからシステムクロックCLKが2回目に立ち上が
った時に、ACK信号生成回路22からCPU2へ、2
ビット信号BS0,BS1がアック信号ACK0,AC
K1として出力され、これとほぼ同時に、周辺回路Bが
ようやくデータバス6上にデータを出力する。
Therefore, as shown in FIG. 9 (B), the CPU 2 has both the ACK signals ACK0 and ACK1 at the high level at the end of the operations of the first states S3 and S4, so that the state S3 is executed again. , S4 is repeated. Immediately after the CPU 2 finishes the second state S3, that is, when the system clock CLK rises for the second time after the state S2 is finished, the ACK signal generation circuit 22 sends the CPU 2 to the CPU 2.
Bit signals BS0 and BS1 are ACK signals ACK0 and AC
It is output as K1, and almost simultaneously with this, the peripheral circuit B finally outputs the data onto the data bus 6.

【0063】すると、CPU2は、2回目のステートS
4の直後にアック信号ACK0,ACK1のうち少なく
とも何れか一方がLow レベルであることを検出すると共
に、ACK0=Low ,ACK1=Highであることから周
辺回路Bのバス幅が8ビットであることを認識して、ス
テートS5,S6の動作を開始し、データバス6上の8
ビットデータを読み込んだ後、アドレスストローブ信号
AS及びデータストローブ信号DSをHighレベルに戻し
て、リードサイクルの1サイクルを終了する。
Then, the CPU 2 causes the second state S
Immediately after 4, it is detected that at least one of the ACK signals ACK0 and ACK1 is at Low level, and since ACK0 = Low and ACK1 = High, the bus width of the peripheral circuit B is 8 bits. Recognize and starts the operation of states S5 and S6,
After reading the bit data, the address strobe signal AS and the data strobe signal DS are returned to the high level, and one read cycle is completed.

【0064】このように、本実施例のマイクロコンピュ
ータにおいては、サイクル制御部8により、周辺回路の
バス幅を表わすアック信号ACK0,ACK1をCPU
2に出力するタイミングを制御して、各周辺回路A〜D
とCPU2とのデータ転送が確実に行われるようにして
いるのである。
As described above, in the microcomputer of this embodiment, the cycle control unit 8 sends the ACK signals ACK0 and ACK1 representing the bus width of the peripheral circuit to the CPU.
2 to control each peripheral circuit A to D
The data transfer between the CPU 2 and the CPU 2 is ensured.

【0065】以上説明したように、本実施例のマイクロ
コンピュータでは、CPU2が何れかの周辺回路A〜D
をアクセスすると、サイクル制御部8において、バス幅
検索回路18内の各デコーダ36〜42が8回路Dフリ
ップフロップ34からCPU2によりアクセスされた周
辺回路のバス幅を読み出し、バス幅設定回路20がその
バス幅を表わす2ビット信号BS0,BS1を出力す
る。そしてこれと同時に、ウエイト数検索回路14内の
各デコーダ26〜32及びウエイト数設定回路16が、
8回路Dフリップフロップ24からCPU2によりアク
セスされた周辺回路のウエイト数を読み出し、ACK信
号生成回路22が、その読み出されたウエイト数に応じ
たウエイト時間を計時して、そのウエイト時間経過後
に、バス幅設定回路20から出力されている2ビット信
号BS0,BS1をアック信号ACK0,ACK1とし
てCPU2に出力する。
As described above, in the microcomputer of this embodiment, the CPU 2 uses any of the peripheral circuits A to D.
Of the peripheral circuit accessed by the CPU 2 from the 8-circuit D flip-flop 34, the decoders 36 to 42 in the bus width search circuit 18 read the bus width of the peripheral circuit in the cycle control unit 8, and the bus width setting circuit 20 2-bit signals BS0 and BS1 representing the bus width are output. At the same time, each of the decoders 26 to 32 and the weight number setting circuit 16 in the weight number search circuit 14
The 8-circuit D flip-flop 24 reads the number of waits of the peripheral circuit accessed by the CPU 2, the ACK signal generation circuit 22 measures the wait time according to the read number of waits, and after the wait time elapses, The 2-bit signals BS0 and BS1 output from the bus width setting circuit 20 are output to the CPU 2 as acknowledge signals ACK0 and ACK1.

【0066】従って、本実施例のサイクル制御部8によ
れば、各周辺回路A〜Dのバス幅を表わす2ビット信号
BS0,BS1をバス幅設定回路20が共通に出力する
と共に、各周辺回路A〜Dのウエイト時間をACK信号
生成回路22が共通に計時するため、従来装置のように
各周辺回路毎にシフトレジスタ等の計時回路やバス幅を
表わすデータを出力するための論理回路を設ける必要が
なく、多数の周辺回路をCPU2に接続した場合でも、
マイクロコンピュータの回路規模を最小限に抑えること
ができる。
Therefore, according to the cycle control unit 8 of the present embodiment, the bus width setting circuit 20 commonly outputs the 2-bit signals BS0 and BS1 representing the bus widths of the peripheral circuits A to D, and the peripheral circuits. Since the ACK signal generation circuit 22 commonly measures the wait times A to D, a timer circuit such as a shift register and a logic circuit for outputting data representing the bus width are provided for each peripheral circuit as in the conventional device. Even if many peripheral circuits are connected to the CPU 2 without needing,
The circuit scale of the microcomputer can be minimized.

【0067】また、本実施例のサイクル制御部8におい
ては、周辺回路のバス幅を表わす2ビット信号BS0,
BS1をバス幅検索回路18及びバス幅設定回路20に
より別途生成しておき、その周辺回路に対応したウエイ
ト時間をACK信号生成回路22内のシフトレジスタ4
4により計時した後、その2ビット信号BS0,BS1
をアック信号ACK0,ACK1としてCPU2へ出力
するというように、2ビット信号BS0,BS1を生成
する回路部分と、その2ビット信号BS0,BS1をC
PU2へ出力するタイミングを決定する回路部分とを、
別々に設けるようにしているため、個々の回路構成を簡
素化することができ、そして、各回路内での信号の伝搬
遅延を最小限に抑えることができるため、システムクロ
ックの周波数がより高いCPU及びアクセスタイムがよ
り小さい周辺回路を備えたマイクロコンピュータに適用
することができる。
Further, in the cycle controller 8 of the present embodiment, the 2-bit signal BS0, which represents the bus width of the peripheral circuit,
BS1 is separately generated by the bus width search circuit 18 and the bus width setting circuit 20, and the wait time corresponding to the peripheral circuits is generated in the shift register 4 in the ACK signal generation circuit 22.
After counting by 4, the 2-bit signals BS0, BS1
Is output to the CPU2 as ACK signals ACK0 and ACK1, and a circuit portion for generating the 2-bit signals BS0 and BS1 and the 2-bit signals BS0 and BS1 are C
A circuit portion that determines the timing of output to PU2,
Since they are provided separately, the individual circuit configuration can be simplified, and the propagation delay of the signal in each circuit can be minimized, so that the CPU with a higher system clock frequency can be used. Also, it can be applied to a microcomputer provided with a peripheral circuit having a shorter access time.

【0068】また更に、本実施例のサイクル制御部8に
よれば、周辺回路A(ROM)に格納しておくデータを
書き換えて、8回路Dフリップフロップ24,34の記
憶データを変更するだけで、各周辺回路A〜Dのウエイ
ト数及びバス幅を変更することができるため、CPU2
に接続する周辺回路をアクセスタイムやバス幅が異なる
ものに取り替えることが非常に簡単になるのである。
Furthermore, according to the cycle control unit 8 of the present embodiment, the data stored in the peripheral circuit A (ROM) is rewritten and the stored data in the 8-circuit D flip-flops 24 and 34 are changed. Since the number of weights of each peripheral circuit A to D and the bus width can be changed, the CPU 2
This makes it very easy to replace the peripheral circuit connected to the one with a different access time or bus width.

【0069】尚、上記実施例のマイクロコンピュータ
は、CPU2に4つの周辺回路A〜Dを接続したもので
あったが、当然、本発明は、周辺回路の数に関わらず適
用することができる。例えば、上記実施例においてCP
U2に8つの周辺回路を接続する場合には、図2に示し
たアクセス検出部10内のナンドゲートを周辺回路の数
に応じて4つ追加すると共に、図4に示したウエイト数
検索回路14内の8回路Dフリップフロップ24及び図
6に示したバス幅検索回路18内の8回路Dフリップフ
ロップ34を夫々もう1つ追加し、それに応じてウエイ
ト数検索回路14及びバス幅検索回路18内のデコーダ
を追加すればよい。
Although the microcomputer of the above-described embodiment is one in which four peripheral circuits A to D are connected to the CPU 2, the present invention can of course be applied regardless of the number of peripheral circuits. For example, in the above embodiment, CP
When eight peripheral circuits are connected to U2, four NAND gates in the access detector 10 shown in FIG. 2 are added according to the number of peripheral circuits, and the weight number search circuit 14 shown in FIG. 8 circuit D flip-flop 24 and another 8 circuit D flip-flop 34 in the bus width search circuit 18 shown in FIG. 6 are added respectively, and accordingly, the weight number search circuit 14 and the bus width search circuit 18 are added. Just add a decoder.

【図面の簡単な説明】[Brief description of drawings]

【図1】 実施例のマイクロコンピュータの構成を表わ
すブロック図である。
FIG. 1 is a block diagram showing a configuration of a microcomputer according to an embodiment.

【図2】 アクセス検出部の回路構成を表わす回路図で
ある。
FIG. 2 is a circuit diagram showing a circuit configuration of an access detection unit.

【図3】 ACK信号生成部の構成を表わすブロック図
である。
FIG. 3 is a block diagram showing a configuration of an ACK signal generation unit.

【図4】 ウエイト数検索回路の回路構成を表わす回路
図である。
FIG. 4 is a circuit diagram showing a circuit configuration of a weight number search circuit.

【図5】 ウエイト数設定回路の回路構成を表わす回路
図である。
FIG. 5 is a circuit diagram showing a circuit configuration of a weight number setting circuit.

【図6】 バス幅検索回路の回路構成を表わす回路図で
ある。
FIG. 6 is a circuit diagram showing a circuit configuration of a bus width search circuit.

【図7】 バス幅設定回路の回路構成を表わす回路図で
ある。
FIG. 7 is a circuit diagram showing a circuit configuration of a bus width setting circuit.

【図8】 ACK信号生成回路の回路構成を表わす回路
図である。
FIG. 8 is a circuit diagram showing a circuit configuration of an ACK signal generation circuit.

【図9】 非同期式のデータ転送の概要を説明する説明
図である。
FIG. 9 is an explanatory diagram illustrating an outline of asynchronous data transfer.

【符号の説明】[Explanation of symbols]

2…CPU A,B,C,D…周辺回路 4
…アドレスバス 6…データバス 8…サイクル制御部 10
…アクセス検出部 12…ACK信号生成部 14
…ウエイト数検索回路 16…ウエイト数設定回路 18
…バス幅検索回路 20…バス幅設定回路 22
…ACK信号生成回路 24,34…8回路Dフリップフロップ 26,28,30,32,36,38,40,42…デ
コーダ DFF1〜DFF3…Dフリップフロップ 44
…シフトレジスタ
2 ... CPU A, B, C, D ... Peripheral circuit 4
... address bus 6 ... data bus 8 ... cycle control unit 10
... access detection unit 12 ... ACK signal generation unit 14
… Weight number search circuit 16… Weight number setting circuit 18
… Bus width search circuit 20… Bus width setting circuit 22
ACK signal generation circuit 24, 34 ... Eight circuit D flip-flop 26, 28, 30, 32, 36, 38, 40, 42 ... Decoder DFF1 to DFF3 ... D flip-flop 44
… Shift registers

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の周辺回路に接続され、任意の周辺
回路にアクセスして該周辺回路との間でデータ転送を行
う際に、外部から入力される該周辺回路との間で使用す
るバス幅を表わす応答信号により該周辺回路側のデータ
転送動作の終了を検出してデータ転送の終了動作を開始
するCPUに用いられ、当該CPUが何れかの周辺回路
をアクセスしたことを検出し、該アクセスされた周辺回
路のアクセスタイムに応じて上記応答信号を生成するC
PUの応答信号生成装置であって、 上記各周辺回路のアクセスタイムに夫々対応したウエイ
ト時間を記憶するウエイト時間記憶手段と、 上記各周辺回路に夫々対応したバス幅を記憶するバス幅
記憶手段と、 上記各周辺回路が上記CPUによりアクセスされたこと
を検出する検出手段と、 該検出手段により何れかの周辺回路がアクセスされたこ
とが検出されると、該アクセスされた周辺回路に対応す
るバス幅を上記バス幅記憶手段から読み出し、該バス幅
を表わす応答信号を出力するバス幅読み出し手段と、 所定のウエイト時間が設定されると当該ウエイト時間を
計時して該ウエイト時間経過後に、上記バス幅読み出し
手段により出力されている応答信号を上記CPUに対し
て出力する応答信号生成手段と、 上記検出手段により何れかの周辺回路がアクセスされた
ことが検出されると、該アクセスされた周辺回路に対応
するウエイト時間を上記ウエイト時間記憶手段から読み
出し、該ウエイト時間を上記応答信号生成手段に設定す
るウエイト時間設定手段と、 を備えたことを特徴とするCPUの応答信号生成装置。
1. A bus which is connected to a plurality of peripheral circuits and which is used between the peripheral circuits input from the outside when accessing any peripheral circuit and transferring data to and from the peripheral circuit. It is used for a CPU that detects the end of the data transfer operation on the peripheral circuit side by a response signal indicating the width and starts the end operation of the data transfer, detects that the CPU has accessed any peripheral circuit, C for generating the response signal according to the access time of the accessed peripheral circuit
A response signal generation device for a PU, comprising wait time storage means for storing wait times respectively corresponding to access times of the peripheral circuits, and bus width storage means for storing bus widths respectively corresponding to the peripheral circuits. Detecting means for detecting that each of the peripheral circuits has been accessed by the CPU; and, when detecting that one of the peripheral circuits has been accessed by the detecting means, a bus corresponding to the accessed peripheral circuit. A bus width reading means for reading a width from the bus width storage means and outputting a response signal representing the bus width; and when a predetermined wait time is set, the wait time is clocked and after the wait time elapses, the bus The response signal generating means for outputting the response signal outputted by the width reading means to the CPU, and the one of the cycles by the detecting means. When it is detected that the circuit is accessed, the wait time corresponding to the accessed peripheral circuit is read from the wait time storage means, and the wait time setting means for setting the wait time in the response signal generating means, A response signal generation device for a CPU, comprising:
JP5196489A 1993-08-06 1993-08-06 Response signal generator for CPU Expired - Fee Related JP3052682B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5196489A JP3052682B2 (en) 1993-08-06 1993-08-06 Response signal generator for CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5196489A JP3052682B2 (en) 1993-08-06 1993-08-06 Response signal generator for CPU

Publications (2)

Publication Number Publication Date
JPH0749827A true JPH0749827A (en) 1995-02-21
JP3052682B2 JP3052682B2 (en) 2000-06-19

Family

ID=16358633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5196489A Expired - Fee Related JP3052682B2 (en) 1993-08-06 1993-08-06 Response signal generator for CPU

Country Status (1)

Country Link
JP (1) JP3052682B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100451170B1 (en) * 2000-09-20 2004-10-02 엘지전자 주식회사 Release-guard signal generation circuit for read/write for processor
US8208077B2 (en) 2009-03-06 2012-06-26 Funai Electric Co., Ltd. Tuner unit apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100451170B1 (en) * 2000-09-20 2004-10-02 엘지전자 주식회사 Release-guard signal generation circuit for read/write for processor
US8208077B2 (en) 2009-03-06 2012-06-26 Funai Electric Co., Ltd. Tuner unit apparatus

Also Published As

Publication number Publication date
JP3052682B2 (en) 2000-06-19

Similar Documents

Publication Publication Date Title
US5339395A (en) Interface circuit for interfacing a peripheral device with a microprocessor operating in either a synchronous or an asynchronous mode
US6493803B1 (en) Direct memory access controller with channel width configurability support
KR900004006B1 (en) Micro processor system
JP3955305B2 (en) Reduced instruction set computer microprocessor structure
US6356987B1 (en) Microprocessing device having programmable wait states
US4710866A (en) Method and apparatus for validating prefetched instruction
US4583163A (en) Data prefetch apparatus
JPS62171062A (en) Preference logic unit for determining preference order of accessing memory in data processor
JPS6053899B2 (en) data processing system
US4757445A (en) Method and apparatus for validating prefetched instruction
US5813041A (en) Method for accessing memory by activating a programmable chip select signal
JP3052682B2 (en) Response signal generator for CPU
US6006288A (en) Method and apparatus for adaptable burst chip select in a data processing system
US5555559A (en) Microprocessor capable of ensuring flexible recovery time for I/O device by inserting idle states
KR100534613B1 (en) apparatus and method for booting system using flash memory
EP0811921A2 (en) Method for accessing memory
JPH0749828A (en) Device for generating response signal of cpu
EP0232797B1 (en) Pseudo-microprogramming in microprocessor with compressed control rom and with strip layout of busses, alu and registers
US5875482A (en) Method and apparatus for programmable chip select negation in a data processing system
JPH0212387A (en) Vlsi microcontroller
CN116361233A (en) Micro controller
JP3091382B2 (en) Keyboard input reading method
JP2715524B2 (en) Timer circuit
JPH02230454A (en) Data transfer system between cpu and output device
JPS63271551A (en) Memory control circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20080407

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

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20090407

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

Free format text: PAYMENT UNTIL: 20090407

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100407

Year of fee payment: 10

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20110407

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

Free format text: PAYMENT UNTIL: 20120407

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120407

Year of fee payment: 12

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

Year of fee payment: 13

Free format text: PAYMENT UNTIL: 20130407

LAPS Cancellation because of no payment of annual fees