JP2001155006A - Bus control circuit and microcomputer system using the same - Google Patents

Bus control circuit and microcomputer system using the same

Info

Publication number
JP2001155006A
JP2001155006A JP33944099A JP33944099A JP2001155006A JP 2001155006 A JP2001155006 A JP 2001155006A JP 33944099 A JP33944099 A JP 33944099A JP 33944099 A JP33944099 A JP 33944099A JP 2001155006 A JP2001155006 A JP 2001155006A
Authority
JP
Japan
Prior art keywords
bus
memory
cpu
control circuit
cpus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP33944099A
Other languages
Japanese (ja)
Inventor
Hiroshi Shimoyamada
博 下山田
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP33944099A priority Critical patent/JP2001155006A/en
Publication of JP2001155006A publication Critical patent/JP2001155006A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Bus Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To miniaturize a system by reducing the number of ROM and RAM by enabling plural CPU to read a program from a single ROM and to operate a single RAM as a work RAM. SOLUTION: This system is composed of plural CPU 1 and 2 respectively having buses and memory control signal lines, bus control circuit 3 for collecting the buses and the memory control signal lines from the CPU 1 and 2 into one system and generating a wait signal at suitable timing to each of CPU, program ROM and work RAM connected to the common bus and memory control signal line collected by the bus control circuit 3. While one CPU 1 uses the common bus and memory control signal line, in order to avoid the collision of memory access between the respective CPU 1 and 2, the bus control circuit 3 outputs the wait signal to the other CPU 2 and the wait signal is applied by the time when the memory access of the CUP 1 is finished.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、メモリ共有方式の
バス制御回路及び該バス制御回路を用いたマイコンシス
テムに関し、より詳しくは、複数のCPUを単一のメモ
リによって動作させることを可能にするバス制御回路及
びマイコンシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bus control circuit of a memory sharing system and a microcomputer system using the bus control circuit, and more particularly, to enabling a plurality of CPUs to operate with a single memory. The present invention relates to a bus control circuit and a microcomputer system.

【0002】[0002]

【従来の技術】CPUは独自のアドレス空間を持つた
め、プログラムROMやワークRAMを必要とするCP
Uが1つのシステム内に複数存在するときは、図11の
ようにROM及びRAMはそれぞれのCPUに対して別
個に必要となり、CPUのアドレスバス、データバスも
それぞれのCPUに対して別々に存在する。携帯電話、
PHS等のように装置の小型化が要求される分野で複数
CPUを搭載したシステムを構築する際には、このよう
にそれぞれのCPU毎に必要とされるROM,RAM,
データバス,アドレスバスが、部品数の増加、基板の配
線面積の増大等をもたらし、また消費電流やコストの面
からも好ましくない。近年、ROMとRAMを1パッケ
ージにしたメモリが開発され、システム部品数削減、小
型化に貢献しているが、このような複合メモリを使用し
た場合でも、1CPUにつき1メモリが必要という制約
に変わりはない。
2. Description of the Related Art Since a CPU has its own address space, a CP which requires a program ROM and a work RAM is required.
When a plurality of U are present in one system, a ROM and a RAM are separately required for each CPU as shown in FIG. 11, and an address bus and a data bus of the CPU are also separately provided for each CPU. I do. mobile phone,
When constructing a system equipped with a plurality of CPUs in a field such as a PHS in which the size of the device is required to be reduced, a ROM, a RAM,
Data buses and address buses cause an increase in the number of components, an increase in the wiring area of the board, and the like. In recent years, a memory in which a ROM and a RAM are packaged in one package has been developed, contributing to a reduction in the number of system components and a reduction in size. There is no.

【0003】[0003]

【発明が解決しようとする課題】過去に別々に開発し
た、関連のある複数のシステムを1つのシステムに統合
する場合に、それぞれのシステムのCPUをそのまま用
いて統合すれば、高性能のCPUを用いて新規にシステ
ムを開発するより、ハードウェア、ソフトウェアの開発
の負担が減り、開発期間は短期で済む。また、1つのシ
ステム内において、機能分担が明確な処理を複数のCP
Uに分散させることで、ソフトウェア開発効率の向上、
CPUの処理能力の有効な活用が期待される。反面、前
述の理由によるメモリ及び配線面積の増大が、システム
の小型化の妨げになる。本発明の目的は、こうした課題
を解決するために、複数のCPUが単一のメモリによっ
て動作することを可能にすることである。
When integrating a plurality of related systems separately developed in the past into one system, a high-performance CPU can be realized by integrating the CPUs of the respective systems as they are. The burden of hardware and software development is reduced and the development period is shorter than developing a new system by using it. Further, within one system, processing with clear function assignment is performed by a plurality of CPs.
U to improve software development efficiency,
Effective utilization of the processing power of the CPU is expected. On the other hand, an increase in the memory and wiring area for the above-mentioned reasons hinders miniaturization of the system. SUMMARY OF THE INVENTION It is an object of the present invention to solve these problems by enabling a plurality of CPUs to operate with a single memory.

【0004】[0004]

【課題を解決するための手段】本発明では、アクセスタ
イムの遅いメモリに対応するためにCPUに備えられた
ウェイトの機能を利用して、複数CPUの単一メモリで
の動作を可能にする。ここでいうウェイト機能とは、外
部からCPUに制御信号を入力し、その信号の論理によ
り、メモリリクエスト信号、リード信号、ライト信号の
アクティブになる時間を変化させ、データバス上に有効
なデータが確定するまで待たせる機能のことである。
According to the present invention, a plurality of CPUs can be operated in a single memory by utilizing a wait function provided in a CPU to cope with a memory having a slow access time. The wait function here means that a control signal is input to the CPU from the outside, and the logic of the signal changes the active time of the memory request signal, the read signal, and the write signal. This is the function that makes the user wait until it is determined.

【0005】本発明は、前記目的を達成するためになさ
れたものであって、第1の技術手段は、バス制御回路に
おいて、並列に接続された複数のCPUのアドレスバ
ス、データバス及び、メモリリクエスト信号、リード信
号、ライト信号等のメモリ制御信号線を1系統の共通の
バス及びメモリ制御信号線にまとめ、該共通のバス及び
メモリ制御信号線を使用しているCPUを除く他のCP
Uに対してウェイト信号を発生することにより、前記共
通のバス及びメモリ制御信号線上での信号の衝突を回避
し、前記共通のバス及びメモリ制御信号線を時分割で前
記各CPUに使用させることを特徴とする。
The present invention has been made to achieve the above object, and a first technical means is a bus control circuit, comprising: an address bus, a data bus, and a memory of a plurality of CPUs connected in parallel in a bus control circuit. Memory control signal lines for request signals, read signals, write signals, and the like are combined into one common bus and memory control signal line, and other CPs except the CPU using the common bus and memory control signal line are used.
By generating a wait signal for U, collision of signals on the common bus and memory control signal lines is avoided, and the common bus and memory control signal lines are used by the CPUs in a time-division manner. It is characterized by.

【0006】第2の技術手段は、マイコンシステムにお
いて、第1の技術手段のバス制御回路と、該バス制御回
路によりまとめられた共通のバス及びメモリ制御信号線
と接続されたプログラム用のROM及びワークRAM
と、複数のCPUからなり、前記複数のCPUを前記プ
ログラムメモリ及びワークRAMで動作させることを特
徴とする。
A second technical means is a microcomputer system, comprising: a bus control circuit of the first technical means; a program ROM connected to a common bus and memory control signal line integrated by the bus control circuit; Work RAM
And a plurality of CPUs, and the plurality of CPUs are operated by the program memory and the work RAM.

【0007】(作用)バス制御回路は、複数のCPUが
共通バス及び共通メモリ制御信号を使用する際の競合を
ウェイト機能を利用することにより回避し、各CPUが
共通バス及び共通メモリ制御信号を介して時分割で共通
のメモリにアクセスすることを可能にする。このような
バス制御回路を使用することにより、複数のCPUが共
通のメモリで動作するメモリ共有方式が実現できる。
(Operation) The bus control circuit avoids contention when a plurality of CPUs use the common bus and the common memory control signal by using the wait function, and allows each CPU to use the common bus and the common memory control signal. Access to a common memory in a time-sharing manner. By using such a bus control circuit, a memory sharing method in which a plurality of CPUs operate on a common memory can be realized.

【0008】次に、本発明のバス制御回路及び該バス制
御回路を用いたマイコンシステムの実施例を図面を参照
して説明する。 (実施例1)図1は、複数CPUのメモリ共有方式にお
いて、複数のCPUが共通のメモリで動作するシステム
の概念図を示す。本システムは、それぞれ独自のアドレ
スバス(ADDRBUS)、データバス(DATABU
S)、メモリリクエスト信号(MREQ−)、リード信
号(RD−)、ライト信号(WR−)等のメモリ制御信
号線を持つ複数のCPU1,2と、これらのCPU1,
2からのバス、メモリ制御信号を1系統にまとめ、各C
PU1,2に対し、適当なタイミングでウェイト信号
(WAIT−)を発生するバス制御回路3と、バス制御
回路3によりまとめられた共通のバス、メモリ制御信号
線に接続されるプログラムROM4,ワークRAM5か
ら構成される。プログラムROM4とワークRAM5
は、場合によりいずれか一方のみが搭載される場合や、
それぞれが複数搭載される場合がある。また共通バスに
はメモリ以外にも、I/Oデバイスが接続される場合も
ある。
Next, an embodiment of a bus control circuit of the present invention and a microcomputer system using the bus control circuit will be described with reference to the drawings. (Embodiment 1) FIG. 1 is a conceptual diagram of a system in which a plurality of CPUs operate on a common memory in a memory sharing method of a plurality of CPUs. This system has its own address bus (ADDRBUS) and data bus (DATABU).
S), a plurality of CPUs 1 and 2 having memory control signal lines such as a memory request signal (MREQ-), a read signal (RD-), and a write signal (WR-);
2 and the bus and memory control signals are combined into one system, and each C
A bus control circuit 3 for generating a wait signal (WAIT-) at appropriate timing for the PUs 1 and 2, a program ROM 4 connected to a common bus and memory control signal lines integrated by the bus control circuit 3, and a work RAM 5; Consists of Program ROM 4 and work RAM 5
May be used if only one of them is installed,
Each of them may be mounted in plurals. In addition, an I / O device other than a memory may be connected to the common bus.

【0009】後述するバス制御回路3は、各CPU1,
2のメモリアクセスの衝突を回避するため、一方のCP
U1が共通のアドレスバス(XADDRBUS)、共通
のデータバス(XDATABUS)を使用しているとき
は、他方のCPU2に対しウェイト信号を出力し、CP
U1のメモリアクセスが終了するまでウェイトをかけ
る。このように双方のCPU1,2に交互に共通バスの
使用権を与えることにより、メモリの共有を可能にす
る。プログラムROM4と、ワークRAM5について
は、図2のように、あらかじめCPU1、CPU2がア
クセスするアドレス領域を決めておき、バス制御回路3
によりオフセットを加えたアドレスが共通のアドレスバ
スに出力される。このような構成をとることで、各CP
U1,2は、それぞれ別のアドレスバス、データバスを
有しているのと同じように動作することが可能となる。
A bus control circuit 3, which will be described later,
2 to avoid a memory access conflict
When U1 uses the common address bus (XADDRBUS) and the common data bus (XDATABUS), it outputs a wait signal to the other CPU 2 and
Wait is applied until the memory access of U1 is completed. In this way, by alternately granting the CPUs 1 and 2 the right to use the common bus, the memory can be shared. For the program ROM 4 and the work RAM 5, address areas to be accessed by the CPUs 1 and 2 are determined in advance as shown in FIG.
Thus, the address to which the offset is added is output to the common address bus. With this configuration, each CP
U1 and U2 can operate in the same manner as having separate address buses and data buses.

【0010】図3は、マイコンシステムの主要な要素で
あるバス制御回路3の構成を示すブロック図である。バ
ス制御回路3は、ウェイト及び内部チップセレクト生成
部6,リードライトタイミング生成部7,データバスマ
ルチプレクス部8,アドレス生成部9,チップセレクト
生成部10の5つの要素から構成される。以下、この回
路の動作をそれぞれの要素について説明する。
FIG. 3 is a block diagram showing a configuration of the bus control circuit 3 which is a main element of the microcomputer system. The bus control circuit 3 includes five elements: a wait and internal chip select generator 6, a read / write timing generator 7, a data bus multiplex unit 8, an address generator 9, and a chip select generator 10. Hereinafter, the operation of this circuit will be described for each element.

【0011】ウェイト及び内部チップセレクト生成部6
は、それぞれのCPU1,2が出力するメモリリクエス
ト信号(MREQ1−,MREQ2−)を入力とし、C
PU1,2に対するウェイト信号(WAIT1−,WA
IT2−)と、内部チップセレクト信号(CS1−,C
S2−)を出力とする。図5のバス競合制御タイミング
チャートに示すように、このブロックはMREQ1−と
MREQ2−が競合しない図4(A)の場合は、WAI
T1−,WAIT2−はインアクティブで、CS1−,
CS2−はともにMREQ1−とMREQ2−のタイミ
ングで出力する。図4(B)のようにMREQ1−がア
クティブの期間中にMREQ2−がアクティブになり、
MREQ1−とMREQ2−が競合したときは、MRE
Q2−がアクティブになるのと同時に、WAIT2−を
アクティブにし、CPUのメモリアクセスにウェイトを
かける。CS1−はMREQ1−のタイミングで変化す
る。MREQ1−がインアクティブになると、CS2−
がアクティブになり、WAIT2−はインアクティブに
なる。WAIT2−のインアクティブを受けて、MRE
Q2−はインアクティブになり、これによりCS2−も
インアクティブになる。このような原理で、どちらのC
PUが共通バスを使用するかを決定する信号である内部
チップセレクト信号(CS1−,CS2−)のタイミン
グが決定される。CS1−,CS2−が同時にアクティ
ブとなることはない。なお、これらの詳細なタイミング
は、このブロックに入力される基準クロックによって管
理される。また、競合のないときもメモリにウェイトを
かける必要のある場合には、このブロックで必要なウェ
イトタイミングを生成する。
Weight and internal chip select generator 6
Receives memory request signals (MREQ1-, MREQ2-) output from the respective CPUs 1 and 2,
Wait signals (WAIT1-, WAIT) for PUs 1 and 2
IT2-) and internal chip select signals (CS1-, C
Let S2-) be the output. As shown in the bus contention control timing chart of FIG. 5, in this block, in the case of FIG.
T1-, WAIT2- are inactive and CS1-, WAIT2-
CS2- outputs at the timing of MREQ1- and MREQ2-. As shown in FIG. 4B, during the period when MREQ1- is active, MREQ2- becomes active,
When MREQ1- and MREQ2- conflict, MREQ1-
At the same time that Q2- becomes active, WAIT2- is activated, and the memory access of the CPU is given a wait. CS1- changes at the timing of MREQ1-. When MREQ1- becomes inactive, CS2-
Becomes active, and WAIT2- becomes inactive. In response to WAIT2- inactivity, MRE
Q2- becomes inactive, causing CS2- to become inactive. With this principle, which C
The timing of the internal chip select signals (CS1-, CS2-), which are signals for determining whether the PU uses the common bus, is determined. CS1- and CS2- do not become active at the same time. These detailed timings are managed by a reference clock input to this block. If it is necessary to weight the memory even when there is no contention, the necessary wait timing is generated in this block.

【0012】リードライトタイミング生成部7は、上記
ウェイト及び内部チップセレクト生成部6により生成さ
れたCS1−,CS2−と、各CPU1,2からのRD
1−,WR1−、RD2−,WR2−を入力とし、共通
バスのリード信号(XRD−)ライト信号(XWR−)
を出力する。このブロックは、CS1−,CS2−の論
理を判断して、内部チップセレクトがアクティブとなっ
ているCPUのRD−若しくはWR−を共通のリード/
ライト信号として出力する。
The read / write timing generator 7 includes the CS1 and CS2 generated by the wait and internal chip select generator 6 and the RD from the CPUs 1 and 2.
1-, WR1-, RD2-, and WR2- as inputs, and a common bus read signal (XRD-) and a write signal (XWR-)
Is output. This block determines the logic of CS1- and CS2-, and reads the RD- or WR- of the CPU for which the internal chip select is active to a common read / write.
Output as a write signal.

【0013】データバスマルチプレクス部8は、CPU
1のデータバス(DATABUS1)とCPU2のデー
タバス(DATABUS2)を一つのデータバス(XD
ATABUS)にまとめる。図3に示すようにこのブロ
ックには3つの方向制御があり、DATABUS1の方
向制御はMREQ1−、RD1−、WR1−により制御
され、DATABUS2の方向制御はMREQ2−、R
D2−、WR2−により制御される。またXDATAB
USの方向制御はCS1−、CS2−、XRD−、XW
R−により制御される。また、DATABUS1とDA
TABUS2のメモリライト時の切替はCS1−、CS
2−で制御される。データリードの際には、使用するC
PUのリードタイミングによっては、共通データバス上
のデータを一度ラッチしてから各々のデータバスに分配
する必要がある。このブロックにより、複数のデータバ
スを共通化することが可能となる。
The data bus multiplex unit 8 includes a CPU
One data bus (DATABUS1) and the data bus (DATABUS2) of CPU2 are connected to one data bus (XD
ATABUS). As shown in FIG. 3, this block has three direction controls. The direction control of DATABUS1 is controlled by MREQ1-, RD1-, and WR1-, and the direction control of DATABUS2 is MREQ2-, R
It is controlled by D2- and WR2-. Also XDATAB
US direction control is CS1-, CS2-, XRD-, XW
Controlled by R-. DATABUS1 and DABUS1
Switching at TABUS2 memory write is CS1-, CS
Controlled by 2-. When reading data, use C
Depending on the PU read timing, it is necessary to latch the data on the common data bus once and then distribute it to each data bus. With this block, a plurality of data buses can be shared.

【0014】アドレス生成部9は、CPU1のアドレス
バス(ADDRBUS1)とCPU2のアドレスバス
(ADDRBUS2)から共通アドレスバス(XADD
RBUS)を生成する。前述のように、各CPU1,2
がアクセスするメモリ上の領域はあらかじめ決めてある
ので、共通バスでアクセスするメモリの種類(ROM4
であるかRAM5であるか)により、それぞれのアドレ
スにオフセットを加えて出力する。この際、どちらのC
PUのアドレスを選択するかは、CS1−、CS2−に
より判断される。
The address generation unit 9 receives a common address bus (XADD) from the address bus (ADDRBUS1) of the CPU1 and the address bus (ADDRBUS2) of the CPU2.
RBUS). As described above, each CPU 1, 2
Since the area on the memory to be accessed is predetermined, the type of memory (ROM 4
Or the RAM 5), an offset is added to each address and the address is output. At this time, which C
Whether to select the PU address is determined by CS1- and CS2-.

【0015】チップセレクト生成部10は、実際にメモ
リに出力されるチップセレクト信号を出力するブロック
である。ADDRBUS1とADDRBUS2から、各
CPUがどのメモリにアクセスしようとしているかを判
断し、ROMへのチップセレクト(XROMCS−)、
またはRAMへのチップセレクト(XRAMCS−)を
生成する。XROMCS−とXRAMCS−はCS1
−、CS2−のいずれかと同じタイミングとなる。ここ
で、アドレスバスから、アクセスするメモリの種類を判
断するのは、各CPUがアドレスにより、アクセスする
メモリ種別を区別していることが前提となる。
The chip select generator 10 is a block for outputting a chip select signal actually output to the memory. From ADDRBUS1 and ADDRBUS2, it is determined which memory each CPU is trying to access, and chip select (XROMCS-) to ROM,
Alternatively, a chip select (XRAMCS-) for the RAM is generated. XROMCS- and XRAMCS- are CS1
-, CS2-. Here, the determination of the type of the memory to be accessed from the address bus is based on the premise that each CPU distinguishes the type of the memory to be accessed based on the address.

【0016】(実施例2)本発明のさらに具体的な実施
例として、図5に示すように代表的な8ビットCPUと
して知られるZ80を2つ使用した複数CPUシステム
の動作について説明する。Z80は、アドレスバス16
ビット、データバス8ビットのCPUで、メモリアクセ
スのときアクティブになるMREQ−信号と、I/Oア
クセスのときアクティブになるIORQ−信号を有して
いる。メモリとI/Oへのリード、ライトは共通のRD
−信号、WR−信号により行われる。図5において、Z
80−A11とZ80−B12は、バス制御回路13を
介して、1つの64KバイトのROM14と1つの64
KバイトのRAM15に接続されている。
(Embodiment 2) As a more specific embodiment of the present invention, the operation of a multiple CPU system using two Z80s known as typical 8-bit CPUs as shown in FIG. 5 will be described. Z80 is the address bus 16
The CPU has a bit and a data bus of 8 bits, and has an MREQ- signal which is activated at the time of memory access and an IORQ- signal which is activated at the time of I / O access. Read and write to memory and I / O are common RD
Signal, WR- signal. In FIG.
The 80-A11 and the Z80-B12 are connected to one 64K byte ROM 14 and one 64K byte via the bus control circuit 13.
It is connected to a K-byte RAM 15.

【0017】このシステムのメモリ構成を図6のように
定義する。Z80のアドレスバスは16ビットなので、
64Kバイトのメモリ空間を持つが、図6(A)のよう
に、この空間を2つに分け、前半をROMエリア、後半
をRAMエリアとする。従って、プログラムは論理アド
レスの0000H〜7FFFHに格納され、8000H
〜FFFFHまでがスタック他のワークRAMエリアと
なる。また、図6(B)、(C)に示すように、ROM
14とRAM15はそれぞれ、0000H〜7FFFH
をZ80−Aの使用エリア、8000H〜FFFFHを
Z80−Bの使用エリアとする。この構成では、Z80
−A11がメモリアクセスする際のオフセット値は00
00Hで、Z80−B12がメモリアクセスする際のオ
フセット値はROM,RAMとも8000Hとなる。ま
た、それぞれのZ80のCPUクロック(CPUCK)
は同じクロックが供給されているとする。
The memory configuration of this system is defined as shown in FIG. Since the address bus of Z80 is 16 bits,
Although having a memory space of 64 Kbytes, this space is divided into two as shown in FIG. 6A, and the first half is a ROM area and the second half is a RAM area. Therefore, the program is stored in the logical addresses 0000H to 7FFFH and 8000H
Up to FFFFH are other work RAM areas in the stack. As shown in FIGS. 6B and 6C, the ROM
14 and RAM 15 are 0000H to 7FFFH, respectively.
Are used areas of Z80-A, and 8000H to FFFFH are used areas of Z80-B. In this configuration, Z80
-The offset value when A11 accesses the memory is 00
At 00H, the offset value when the Z80-B12 accesses the memory is 8000H for both ROM and RAM. The CPU clock (CPUCK) of each Z80
Are supplied with the same clock.

【0018】図7は、このシステムのデータバスの方向
制御を示したものである。図5中に示した3種の双方向
バッファに対して、図7のような方向制御をして、デー
タバスを共通化する。
FIG. 7 shows the direction control of the data bus of this system. The direction control as shown in FIG. 7 is performed on the three types of bidirectional buffers shown in FIG. 5 to share the data bus.

【0019】図5のシステムの基本動作を図8〜図10
のタイミングチャートにより説明する。この例では、デ
ータリードの際に共通バス上のデータをデータ確認時点
でラッチして各CPUのデータバスに出力する。また、
バス制御回路13が生成する、図3に示した内部チップ
セレクト信号CS1−,CS2−に相当する信号ACS
−,BCS−のL区間の長さは固定で、CPUCK2ク
ロック分としている。以下ではZ80−A11のメモリ
リクエスト信号をAMREQ−、リード信号をARD
−、ライト信号をAWR−、ウェイト信号をAWAIT
−、アドレスバスをAADDRBUS、データバスをA
DATABUS、Z80−B12のメモリリクエスト信
号をBMREQ−、リード信号をBRD−、ライト信号
をBWR−、ウェイト信号をBWAIT−、アドレスバ
スをBADDRBUS、データバスをBDATABU
S、共通アドレスバスをXADDRBUS、共通データ
バスをXDATABUS、共通リード信号をXRD−、
共通ライト信号をXWR−、ROMチップセレクト信号
をXROMCS−、RAMチップセレクト信号をXRA
MCS−とする。
The basic operation of the system shown in FIG.
This will be described with reference to the timing chart of FIG. In this example, when reading data, data on the common bus is latched at the time of data confirmation and output to the data bus of each CPU. Also,
A signal ACS generated by the bus control circuit 13 and corresponding to the internal chip select signals CS1- and CS2- shown in FIG.
, BCS- have a fixed L section length, which is equivalent to two CPUCK clocks. In the following, the memory request signal of Z80-A11 is AMREQ- and the read signal is ARD.
-, Write signal AWR-, wait signal AWAIT
-, Address bus AADDRBUS, data bus A
DATABUS, the memory request signal of Z80-B12 is BMREQ-, the read signal is BRD-, the write signal is BWR-, the wait signal is BWAIT-, the address bus is BADDRBUS, and the data bus is BDATABU.
S, XADDRBUS for the common address bus, XDATABUS for the common data bus, XRD- for the common read signal,
The common write signal is XWR-, the ROM chip select signal is XROMCS-, and the RAM chip select signal is XRA
MCS-.

【0020】図8は、メモリアクセスの競合が起こらな
い場合のタイミングチャートで、ROMリードとRAM
ライトのタイミングを表している。競合が起きていない
ので、AWAIT−、BWAIT−ともにHのままであ
る。これは、Z80−B12のI/Oアクセス中に、Z
80−A11のメモリアクセスが発生した場合等に当て
はまる。図8では、Z80−A11はアドレス0000
Hをリードしているので、これはROM14へのリード
となり、XROMCS−がLとなる。Z80−A11の
オフセットは0000Hなので、XADDRBUSには
0000Hが出力される。XRD−はXROMCS−と
同じタイミングでLとなる。ROMからリードされたデ
ータが確定するタイミングでラッチ信号ADLTにより
ラッチされたデータは、ADATABUSに出力されて
リードされる。図の例では55Hをリードしている。ラ
イトのときは、8000HにライトしているのでRAM
15へのライトとなり、XRAMCS−とXWR−がL
となる。オフセットは0000Hなので、Z80−A1
1の論理アドレス8000HをRAM空間の物理アドレ
スに変換した値0000HがそのままXADDRBUS
に出力される。このとき、ADATABUSの値がXD
ATABUSに出力され、図の例では、この値がAAH
なので、RAM15の0000HにAAHがライトされ
る。
FIG. 8 is a timing chart in the case where no memory access conflict occurs.
This shows the write timing. Since no competition has occurred, both AWAIT- and BWAIT- remain H. This is because during the I / O access of Z80-B12,
This applies when a memory access of 80-A11 occurs. In FIG. 8, Z80-A11 has the address 0000.
Since H is being read, this is a read to the ROM 14, and XROMCS- becomes L. Since the offset of Z80-A11 is 0000H, 0000H is output to XADDRBUS. XRD- becomes L at the same timing as XROMCS-. At the timing when the data read from the ROM is determined, the data latched by the latch signal ADLT is output to ADATABUS and read. In the illustrated example, 55H is read. When writing, RAM is written to 8000H, so RAM
XRAMCS- and XWR- are L
Becomes Since the offset is 0000H, Z80-A1
The value 0000H obtained by converting the logical address 8000H of 1 into a physical address in the RAM space is the XADDRBUS as it is.
Is output to At this time, the value of ADATABUS is XD
It is output to ATABUS, and in the example in the figure, this value is AAH
Therefore, AAH is written to 0000H of the RAM 15.

【0021】図9は、Z80−A11のROMリード中
にZ80−B12のROMリードが起きた場合のタイミ
ングチャートを示す。この場合BMREQ−の立ち下が
りのタイミングでAMREQ−がLなので、競合が起き
たことを判断でき、BWAIT−がLになる。Z80−
A11にはウェイトが入らないので、AMREQ−は図
に示すタイミングでHに遷移する。内部チップセレクト
信号ACS−は、AMREQ−と同じタイミングでLと
なる。ACS−がHになるとBWAIT−がHに遷移
し、Z80−B12に対するウェイトを解除する。この
BWAIT−によって、BMREQ−、BRD−はZ8
0−A11の共通バスの使用終了を待って、図のような
タイミングで立ち上がる。このとき内部チップセレクト
信号BCS−は、ACS−がHになるのと同時にLとな
り、2CPUCK後にHとなる。Z80−A11、Z8
0−B12は共に0000HをリードしているのでRO
M14へのリードとなり、XROMCS−にはACS−
とBCS−のORが出力される。ACS−がLのとき、
ROMアクセスなのでXADDRBUSにはAADDR
BUSの値がそのまま出力され、BCS−がLのとき、
XADDRBUSにはBADDRBUS0000Hにオ
フセット値8000Hを加えた値が出力される。XRD
−はXROMCS−と同じタイミングでLとなり、この
ときROM14からデータがリードされる。図の例では
XADDRBUSが0000Hのとき55Hがリードさ
れ、8000HのときAAHがリードされている。リー
ドデータ55Hは図に示したACS−により生成される
ラッチタイミングADLTによりラッチされてADAT
ABUSに出力される。リードデータAAHはBCS−
により生成されるラッチタイミングBDLTによりラッ
チされてBDATABUSに出力される。以上のような
動作で図9のような競合が起きたときのZ80−A11
とZ80−B12のROMリードが行われる。
FIG. 9 shows a timing chart when the Z80-B12 ROM read occurs during the Z80-A11 ROM read. In this case, since AMREQ- is L at the falling timing of BMREQ-, it can be determined that a conflict has occurred, and BWAIT- becomes L. Z80-
Since A11 has no wait, AMREQ- transits to H at the timing shown in the figure. The internal chip select signal ACS- becomes L at the same timing as AMREQ-. When ACS- becomes H, BWAIT- transits to H, and the wait for Z80-B12 is released. By this BWAIT-, BMREQ- and BRD- become Z8.
It waits for the end of use of the common bus 0-A11 and starts up at the timing shown in the figure. At this time, the internal chip select signal BCS- goes low at the same time as ACS- goes high, and goes high after two CPUCKs. Z80-A11, Z8
Since both 0-B12 lead 0000H, RO
MROM leads to XROMCS- with ACS-
And BCS- are ORed. When ACS- is L,
AADDR in XADDRBUS because of ROM access
When the value of BUS is output as it is and BCS- is L,
A value obtained by adding an offset value 8000H to BADDRBUS0000H is output to XADDRBUS. XRD
-Becomes L at the same timing as XROMCS-, and data is read from the ROM 14 at this time. In the example of the figure, when XADDRBUS is 0000H, 55H is read, and when 8000H, AAH is read. The read data 55H is latched by the latch timing ADLT generated by the ACS- shown in FIG.
Output to ABUS. Read data AAH is BCS-
Are latched by the latch timing BDLT generated by the above and output to BDATABUS. Z80-A11 when a conflict as shown in FIG. 9 occurs in the above operation.
And Z80-B12 ROM read.

【0022】図10は、Z80−B12のRAMライト
中にZ80−A11のROMリードが起きた場合のタイ
ミングチャートを示す。この場合AMREQ−の立ち下
がりのタイミングでBMREQ−がLなので、競合が起
きたことを判断でき、AWAIT−がLになる。Z80
−B11にはウェイトが入らないので、BMREQ−は
図に示すタイミングでHに遷移する。内部チップセレク
ト信号ACS−は、BMREQ−と同じタイミングでL
となる。BCS−がHになるとAWAIT−がHに遷移
し、Z80−A12に対するウェイトを解除する。この
AWAIT−によって、AMREQ−、ARD−はZ8
0−B11の共通バスの使用終了を待って、図のような
タイミングで立ち上がる。このとき内部チップセレクト
信号ACS−は、BCS−がHになるのと同時にLとな
り、2CPUCK後にHとなる。Z80−B12はFF
FFHにライトしているのでRAM15へのライトとな
り、BCS−と同じタイミングでXRAMCS−がLと
なる。このときBWR−がLとなっているので、XWR
−がLとなる。Z80−A11は3FFFHをリードし
ているので、ROM14へのリードとなり、XROMC
S−と、XRD−はACS−と同じタイミングでLとな
る。BCS−がLのとき、XADDBUSには、BAD
DRBUS FFFFHをRAM上の物理アドレス7F
FFHに変換した値にオフセット値8000Hを加えた
値、即ちFFFFHが出力される。ACS−がLのと
き、ROMでのアクセスなので、XADDBUSには、
AADDRBUSの値がそのまま出力される。図の例で
はXADDBUSがFFFFHのとき、Z80B12の
ライトデータ55HがXDATABUS上に出力され、
XADDBUSが3FFFHのときAAHがリードされ
ている。リードデータAAHは図10に示したACS−
より生成されるラッチタイミングADLTによりラッチ
されてADATABUSに出力される。以上のような動
作で図10のような競合が起きたときのZ80−B12
のRAMライトとZ80−A11ROMリードが行われ
る。
FIG. 10 is a timing chart in the case where the Z80-A11 ROM read occurs during the Z80-B12 RAM write. In this case, since BMREQ- is L at the falling timing of AMREQ-, it can be determined that a conflict has occurred, and AWAIT- becomes L. Z80
Since -B11 has no wait, BMREQ- transitions to H at the timing shown in the figure. The internal chip select signal ACS- goes low at the same timing as BMREQ-.
Becomes When BCS- becomes H, AWAIT- transits to H, and the wait for Z80-A12 is released. With this AWAIT-, AMREQ- and ARD- become Z8.
It waits for the end of use of the common bus 0-B11 and starts up at the timing shown in the figure. At this time, the internal chip select signal ACS- goes low at the same time as the BCS- goes high, and goes high after two CPUCKs. Z80-B12 is FF
Since writing to FFH is performed, writing to RAM 15 is performed, and XRAMCS- becomes L at the same timing as BCS-. At this time, since BWR- is L, XWR
-Becomes L. Since Z80-A11 is reading 3FFFFH, it is read to ROM 14 and XROMC
S− and XRD− become L at the same timing as ACS−. When BCS- is L, XADDBUS contains BAD
DRBUS FFFFH to physical address 7F on RAM
A value obtained by adding the offset value 8000H to the value converted to FFH, that is, FFFFH is output. When ACS- is L, access is by ROM, so XADDBUS contains
The value of AADDRBUS is output as it is. In the example of the figure, when XADDBUS is FFFFH, the write data 55H of Z80B12 is output on XDATABUS,
AAH is read when XADDBUS is 3FFFFH. The read data AAH corresponds to the ACS-
It is latched by the latch timing ADLT generated by the above and output to ADATABUS. Z80-B12 when a conflict as shown in FIG. 10 occurs in the above operation.
RAM write and Z80-A11 ROM read.

【0023】以上の代表的なタイミングで説明してきた
ように、MREQ−を先にLとしたCPUのメモリアク
セスを優先し、そのメモリアクセス中に他方のメモリア
クセスが発生したときは、後者に対するWAIT−をL
として、前者のCPUのメモリアクセス終了まで待って
から、後者のCPUのメモリアクセスを実行する。図5
に示すマイコンシステムは、このような原理で動作す
る。2つのCPU11,12のメモリアクセスが同時に
発生する場合もあるが、この場合は、あらかじめ2つの
CPUのどちらをマスターとするかを決めておき、マス
ター側に優先的に共通バスの使用権を与え、そのメモリ
アクセス終了までに他方にウェイトをかけるようにす
る。
As described at the above representative timing, the memory access of the CPU whose MREQ- is set to L first is prioritized, and when the other memory access occurs during the memory access, the WAIT for the latter is waited. − To L
After waiting for the memory access of the former CPU to end, the memory access of the latter CPU is executed. FIG.
The microcomputer system shown in FIG. 1 operates on such a principle. In some cases, the memory access of the two CPUs 11 and 12 may occur simultaneously. In this case, which of the two CPUs is to be the master is determined in advance, and the master is preferentially given the right to use the common bus. The other is waited until the end of the memory access.

【0024】図5のシステムでは2つのCPU11,1
2に入力されるCPUCKが同一であると仮定したが、
CPUCKの周波数が異なっていても、同じ原理でメモ
リ共有ができる。もし、図5に示すシステムでZ80−
A11にZ80−B12の1/2の周波数のCPUCK
が供給されているとすると、AMREQ−、ARD−の
L区間の長さは、BMREQ−、BRD−の2倍になる
ので、競合制御のためのZ80−A11に対するウェイ
ト信号(AWAIT−)は必要なくなる。
In the system shown in FIG. 5, two CPUs 11, 1
Assuming that the CPUCK input to 2 is the same,
Even if the frequency of the CPUCK is different, the memory can be shared by the same principle. If the system shown in FIG.
A11 CPUCK of 1/2 frequency of Z80-B12
Is supplied, the length of the L section of AMREQ- and ARD- is twice as long as BMREQ- and BRD-, so a wait signal (AWAIT-) to Z80-A11 for contention control is required. Disappears.

【0025】[0025]

【発明の効果】本発明のバス制御回路は、複数のCPU
のアドレスバス、データバス及びメモリリクエスト信
号、リード信号、ライト信号等のメモリ制御信号線を一
系統にまとめ、まとめられた共通のアドレスバス、デー
タバス及びメモリリクエスト信号、リード信号、ライト
信号等のメモリ制御信号線の使用権を時分割で各CPU
に与えることにより、複数のCPUが、単一のROMか
らプログラムを読み込み、単一のRAMをワークRAM
として動作するメモリ共有方式のマイコンシステムを形
成することが可能となり、マイコンシステムにおけるR
OM、RAMの個数が減少するため、コストの削減、シ
ステムの小型化等に寄与する。また、本発明のバス制御
回路によれば、過去に別々に開発した、関連のある複数
のシステムを1つのシステムに統合する場合に、そのC
PUをそのまま用いて統合できるため、新規のCPUを
用いてシステムを開発するより、ハードウェア、ソフト
ウェア開発の負担が減り、開発期間の短縮化を図ること
が可能となる。
The bus control circuit of the present invention has a plurality of CPUs.
Memory control signal lines such as an address bus, a data bus and a memory request signal, a read signal, a write signal, etc., into one system, and a common address bus, a data bus and a memory request signal, a read signal, a write signal, etc. The right to use the memory control signal line is time-shared by each CPU.
A plurality of CPUs read a program from a single ROM and replace a single RAM with a work RAM.
It is possible to form a memory sharing type microcomputer system that operates as
The reduction in the number of OMs and RAMs contributes to cost reduction, system miniaturization, and the like. Further, according to the bus control circuit of the present invention, when integrating a plurality of related systems separately developed in the past into one system, the C
Since the integration can be performed using the PU as it is, the burden of hardware and software development is reduced as compared with the case where a system is developed using a new CPU, and the development period can be shortened.

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

【図1】本発明のバス制御回路を用いた、複数CPUが
共通のメモリで動作するマイコンシステムの概念図であ
る。
FIG. 1 is a conceptual diagram of a microcomputer system using a bus control circuit of the present invention and in which a plurality of CPUs operate on a common memory.

【図2】本発明におけるメモリの使用例を示す図であ
る。
FIG. 2 is a diagram showing a usage example of a memory according to the present invention.

【図3】本発明のバス制御回路を示すブロック図であ
る。
FIG. 3 is a block diagram showing a bus control circuit of the present invention.

【図4】バス競合制御の基本原理を示すタイミングチャ
ートである。
FIG. 4 is a timing chart showing the basic principle of bus contention control.

【図5】8ビットCPU Z80を2つ使用した複数C
PUシステムの構成を示す概念図である。
FIG. 5 shows a plurality of Cs using two 8-bit CPUs Z80.
FIG. 2 is a conceptual diagram illustrating a configuration of a PU system.

【図6】図5のシステムにおけるメモリ構成例を示す概
念図である。
FIG. 6 is a conceptual diagram showing an example of a memory configuration in the system of FIG. 5;

【図7】図5のシステムのデータバスの方向制御を示す
図である。
FIG. 7 is a diagram showing data bus direction control of the system of FIG. 5;

【図8】メモリアクセスの競合が起こらない場合のメモ
リ共有の原理を示すタイミングチャートである。
FIG. 8 is a timing chart showing the principle of memory sharing when contention for memory access does not occur.

【図9】CPUAのROMリード中にCPUBのROM
リードが発生した場合のメモリ共有の原理を示すタイミ
ングチャートである。
FIG. 9: ROM of CPUB during ROM read of CPUA.
5 is a timing chart showing the principle of memory sharing when a read occurs.

【図10】CPUBのRAMリード中にCPUAのRO
Mリードが発生した場合のメモリ共有の原理を示すタイ
ミングチャートである。
FIG. 10 shows RO of CPUA during RAM read of CPUB.
6 is a timing chart showing the principle of memory sharing when M read occurs.

【図11】従来の複数CPUを用いたマイコンシステム
の概念図である。
FIG. 11 is a conceptual diagram of a conventional microcomputer system using a plurality of CPUs.

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

1,2,11,12…CPU、3,13…バス制御回
路、4,14…メモリ(ROM)、5,15…メモリ
(RAM)、6…ウエイト及び内部チップセレクト生成
部、7…リードライトタイミング生成部、8…データバ
スマルチプレクス部、9…アドレス生成部、10…チッ
プセレクト生成部。
1, 2, 11, 12 CPU, 3, 13 bus control circuit, 4, 14 memory (ROM), 5, 15 memory (RAM), 6 weight and internal chip select generation unit, 7 read / write Timing generation unit, 8: Data bus multiplex unit, 9: Address generation unit, 10: Chip select generation unit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 並列に接続された複数のCPUのアドレ
スバス、データバス及び、メモリリクエスト信号、リー
ド信号、ライト信号等のメモリ制御信号線を1系統の共
通のバス及びメモリ制御信号線にまとめ、該共通のバス
及びメモリ制御信号線を使用しているCPUを除く他の
CPUに対してウェイト信号を発生することにより、前
記共通のバス及びメモリ制御信号線上での信号の衝突を
回避し、前記共通のバス及びメモリ制御信号線を時分割
で前記各CPUに使用させることを特徴とするバス制御
回路。
1. An address bus, a data bus, and a memory control signal line such as a memory request signal, a read signal, and a write signal of a plurality of CPUs connected in parallel are combined into one common bus and a memory control signal line. By generating a wait signal for other CPUs except the CPU using the common bus and the memory control signal line, collision of signals on the common bus and the memory control signal line is avoided, A bus control circuit for causing the CPUs to use the common bus and memory control signal lines in a time-division manner.
【請求項2】 請求項1記載のバス制御回路と、該バス
制御回路によりまとめられた共通のバス及びメモリ制御
信号線と接続されたプログラム用のROM及びワークR
AMと、複数のCPUからなり、前記複数のCPUを前
記プログラムメモリ及びワークRAMで動作させること
を特徴とするマイコンシステム。
2. The bus control circuit according to claim 1, and a program ROM and a work ROM connected to a common bus and memory control signal line integrated by the bus control circuit.
A microcomputer system comprising an AM and a plurality of CPUs, wherein the plurality of CPUs are operated by the program memory and the work RAM.
JP33944099A 1999-11-30 1999-11-30 Bus control circuit and microcomputer system using the same Pending JP2001155006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33944099A JP2001155006A (en) 1999-11-30 1999-11-30 Bus control circuit and microcomputer system using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33944099A JP2001155006A (en) 1999-11-30 1999-11-30 Bus control circuit and microcomputer system using the same

Publications (1)

Publication Number Publication Date
JP2001155006A true JP2001155006A (en) 2001-06-08

Family

ID=18327493

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33944099A Pending JP2001155006A (en) 1999-11-30 1999-11-30 Bus control circuit and microcomputer system using the same

Country Status (1)

Country Link
JP (1) JP2001155006A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134893A (en) * 2006-11-29 2008-06-12 Yamaha Corp Integrated circuit device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134893A (en) * 2006-11-29 2008-06-12 Yamaha Corp Integrated circuit device

Similar Documents

Publication Publication Date Title
KR900004006B1 (en) Micro processor system
JP2762138B2 (en) Memory control unit
JPS61211758A (en) Multiprocessor system
JPS62245461A (en) Allocating method for board slot number
JPH11126182A (en) Device and method for communications between computer buses
US6223196B1 (en) Shared mac (multiply accumulate) system and method
JP3153078B2 (en) Data processing device
JP2001155006A (en) Bus control circuit and microcomputer system using the same
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
JP2618223B2 (en) Single chip microcomputer
JP2004199187A (en) Cpu built-in lsi
US20040034748A1 (en) Memory device containing arbiter performing arbitration for bus access right
JPH0227696B2 (en) JOHOSHORISOCHI
JP2006011926A (en) Serial data transfer system, serial data transfer device, serial data transfer method and image forming apparatus
JP3704927B2 (en) Programmable controller
JPS645341B2 (en)
JPH07271654A (en) Controller
US20020069311A1 (en) Bus control device
JPH07334420A (en) Extended memory control circuit
JP2534321B2 (en) Data transfer control method and apparatus
JP2003091501A (en) Information processing device
SU1683039A1 (en) Device for data processing for multiprocessor system
JPS6014435B2 (en) Storage device
JPS5856885B2 (en) Address control method
JP4642398B2 (en) Shared bus arbitration system