JPH10312308A - Microcomputer and emulation device - Google Patents

Microcomputer and emulation device

Info

Publication number
JPH10312308A
JPH10312308A JP9122660A JP12266097A JPH10312308A JP H10312308 A JPH10312308 A JP H10312308A JP 9122660 A JP9122660 A JP 9122660A JP 12266097 A JP12266097 A JP 12266097A JP H10312308 A JPH10312308 A JP H10312308A
Authority
JP
Japan
Prior art keywords
mode
microcomputer
output
input
external
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
JP9122660A
Other languages
Japanese (ja)
Other versions
JP3371752B2 (en
Inventor
Hideji Azuma
秀治 我妻
Hiroshi Fujii
裕志 藤井
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP12266097A priority Critical patent/JP3371752B2/en
Publication of JPH10312308A publication Critical patent/JPH10312308A/en
Application granted granted Critical
Publication of JP3371752B2 publication Critical patent/JP3371752B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

(57)【要約】 【課題】 エミュレーション時に外付け回路によって回
路規模を増大させることなく、通常動作時と同一機能,
同一動作を容易に実現可能なマイクロコンピュータ(マ
イコン)、及び該マイコンを用いたエミュレーション装
置を提供する。 【解決手段】 マイコン2は、汎用IOポート用の外部
端子TGiの一部からアドレス,データ,制御信号等の
内部バス信号を入出力可能にするバス拡張モードと、バ
ス拡張モードとは異なる外部端子TGiを介して内部バ
ス信号を入出力可能とするIO拡張モードとに設定でき
るよう構成されている。2つのマイコン2a,2bを、
一方はバス拡張モードに他方はIO拡張モードに設定し
て、両マイコン2a,2bが入出力する内部バス信号を
相互に接続することにより、ディスクリート部品等によ
る外付け回路を必要とすることなく、通常モードのマイ
コン2と同一機能を有するエミュレーション装置50を
簡単に構成できる。
(57) [Problem] To provide the same function as in normal operation without increasing the circuit scale by an external circuit during emulation.
Provided are a microcomputer (microcomputer) that can easily realize the same operation, and an emulation device using the microcomputer. A microcomputer (2) includes a bus extension mode for enabling input / output of internal bus signals such as addresses, data, and control signals from a part of an external terminal (TGi) for a general-purpose IO port, and an external terminal different from the bus extension mode. It is configured to be able to set to an IO extension mode in which internal bus signals can be input / output via TGi. The two microcomputers 2a and 2b are
One is set to the bus expansion mode and the other is set to the IO expansion mode, and the internal bus signals input and output by the two microcomputers 2a and 2b are connected to each other, thereby eliminating the need for an external circuit such as discrete components. An emulation device 50 having the same function as the microcomputer 2 in the normal mode can be easily configured.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、アドレス,デー
タ,各種制御信号を伝送する内部バスを介して相互に接
続されたCPU,メモリ,外部端子を介して信号の入出
力を行うポート群を備えたシングルチップのマイクロコ
ンピュータ、及び該マイクロコンピュータによって構成
されるエミュレーション装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention comprises a CPU, a memory, and a port group for inputting and outputting signals via external terminals, which are interconnected via an internal bus for transmitting addresses, data, and various control signals. A single-chip microcomputer and an emulation device configured by the microcomputer.

【0002】[0002]

【従来の技術】従来より、CPU,ROM,RAM,タ
イマ等の周辺回路を内蔵したシングルチップマイクロコ
ンピュータ(以下、マイコンという)では、信号を入出
力する外部端子の数によってパッケージの大きさが決ま
るため、パッケージの小型化のために、データバス,ア
ドレスバス,リード/ライト信号等の制御信号線(以
下、総称して内部バスという)用の外部端子が割り当て
られていないものが知られている。
2. Description of the Related Art Conventionally, in a single-chip microcomputer (hereinafter referred to as a microcomputer) having built-in peripheral circuits such as a CPU, a ROM, a RAM, and a timer, the size of a package is determined by the number of external terminals for inputting and outputting signals. Therefore, in order to reduce the size of the package, an external terminal for a control signal line (hereinafter, collectively referred to as an internal bus) for a data bus, an address bus, a read / write signal or the like is not assigned. .

【0003】ところで、一般的に、CPUを用いて構成
されたシステムでは、例えば特開昭61−127043
号公報に記載されているように、CPUをエミュレーシ
ョンすることにより、ソフトウェアの開発やハードウェ
アのデバッグが行われている。
In general, in a system configured using a CPU, for example, Japanese Patent Application Laid-Open No.
As described in Japanese Patent Application Laid-Open Publication No. H10-207, software development and hardware debugging are performed by emulating a CPU.

【0004】なおCPUのエミュレーションは、周知の
インサーキットエミュレータ(ICE)等により、CP
Uに接続されるデータバス,アドレスバス,各種制御信
号線(即ち、上記マイコンでは内部バス)を用いて行わ
れるため、これらが外部端子に割り当てられていない上
記マイコンでは、任意の用途に使用可能な汎用IOポー
トとして割り当てられた外部端子を、汎用IOポートと
しての信号、又はエミュレーションに必要な内部バスの
信号のいずれでも入出力できるように切換可能に構成
し、エミュレーションを行う時に、この外部端子から内
部バスの信号が入出力されるよう切り換えて使用してい
た。
The emulation of the CPU is performed by a well-known in-circuit emulator (ICE) or the like.
Since this is performed using the data bus, address bus, and various control signal lines (that is, internal buses in the above-mentioned microcomputer) connected to U, these microcomputers, which are not assigned to external terminals, can be used for any purpose. An external terminal assigned as a general purpose IO port is configured to be switchable so as to be able to input and output either a signal as a general purpose IO port or a signal of an internal bus required for emulation, and this external terminal is used when emulation is performed. , So that signals from the internal bus are input and output.

【0005】そして、内部バスの信号を入出力するため
に失われた汎用IOポートと同等の機能を有する外付け
回路をディスクリート部品等によって予め作製してお
き、エミュレーション時には、この外付け回路に、失わ
れた汎用IOポートの代用をさせていた。
An external circuit having a function equivalent to that of a general-purpose IO port lost for inputting / outputting an internal bus signal is prepared in advance by using discrete components or the like. Instead of replacing the lost general purpose IO port.

【0006】[0006]

【発明が解決しようとする課題】しかし、近年では、汎
用IOポートに、エッジ検出機能やデジタルフィルタの
機能等を付加して高機能化することが行われており、こ
のように高機能化された汎用IOポートを、外付けのデ
ィスクリート部品で実現しようとすると、部品点数が多
く回路規模も大きくなり、外付け回路の作製に手間を要
するという問題があった。
However, in recent years, it has been practiced to add a function such as an edge detection function or a digital filter to a general-purpose IO port to enhance the function. If the general-purpose IO port is to be realized by external discrete components, the number of components is large, the circuit scale is large, and there is a problem that it takes time to manufacture the external circuit.

【0007】また、このように手間を費やして外付け回
路を作製しても、半導体チップ上の素子とディスクリー
ト部品とでは、ドライブ能力差があったり、回路構成が
異なっていたりするため、必ずしもマイコンに内蔵され
たものと同一機能,同一動作が実現できるとは限らず、
信頼性の高いエミュレーションを行うことができないと
いう問題があった。
[0007] Even if such an external circuit is manufactured with a great deal of time, there is a difference in drive capability between the elements on the semiconductor chip and the discrete parts and the circuit configuration is different. The same function and the same operation as those built in
There was a problem that emulation with high reliability could not be performed.

【0008】本発明は、上記問題点を解決するために、
エミュレーション時に外付け回路によって回路規模を増
大させることなく、しかも通常動作時と同一機能,同一
動作を容易に実現可能なマイクロコンピュータ、及びこ
のマイクロコンピュータを用いたエミュレーション装置
を提供することを目的とする。
The present invention has been made in order to solve the above problems.
It is an object of the present invention to provide a microcomputer capable of easily realizing the same function and the same operation as during normal operation without increasing the circuit scale by an external circuit during emulation, and an emulation device using the microcomputer. .

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
になされた本発明のマイクロコンピュータによれば、モ
ード設定手段により通常モードを設定すると、マイクロ
コンピュータの本来の機能が総て可能となり、即ち、C
PU,メモリ,ポート群が内部バスに接続され、外部端
子からはポート群の信号が入出力される。
According to the microcomputer of the present invention made to achieve the above object, when the normal mode is set by the mode setting means, all the original functions of the microcomputer become possible. , C
The PU, the memory, and the port group are connected to the internal bus, and signals of the port group are input and output from external terminals.

【0010】またモード設定手段によりバス拡張モード
を設定すると、第1の切換手段が、ポート群の一部であ
る第1ポート群による外部端子を介した信号の入出力を
禁止すると共に、この外部端子から内部バスの信号を入
出力可能にする。即ち、従来のマイクロコンピュータの
エミュレーション時と同様の設定となる。
When the bus setting mode is set by the mode setting means, the first switching means prohibits the input / output of a signal through an external terminal by the first port group which is a part of the port group, and also controls the external port. Enables input / output of internal bus signals from terminals. That is, the setting is the same as that of the conventional microcomputer.

【0011】一方、モード設定手段によりIO拡張モー
ドを設定すると、CPU切離手段及びメモリ切離手段
が、CPU及びメモリを夫々内部バスから切り離し、第
2の切換手段が、第1ポート群とは異なるポート群の一
部である第2ポート群による外部端子を介した信号の入
出力を禁止すると共に、この外部端子から内部バスの信
号を入出力可能にする。なお、この時、第1ポート群
は、第2の切換手段により外部端子を介して入出力され
る内部バスの信号に従って動作する。
On the other hand, when the IO expansion mode is set by the mode setting means, the CPU disconnecting means and the memory disconnecting means disconnect the CPU and the memory from the internal bus, respectively, and the second switching means establishes a connection with the first port group. The input / output of a signal through an external terminal by a second port group, which is a part of a different port group, is prohibited, and a signal of an internal bus can be input / output from the external terminal. At this time, the first port group operates according to the internal bus signal input / output via the external terminal by the second switching means.

【0012】つまり、IO拡張モードでは、バス拡張モ
ードの設定によって外部端子を介した信号の入出力が不
能となった第1ポート群が、外部端子を介して入出力さ
れる内部バスの信号によって制御可能なようにされてい
る。従って、本発明のマイクロコンピュータによれば、
当該マイクロコンピュータを2つ使用して、一方をバス
拡張モードに設定すると共に他方をIO拡張モードに設
定し、しかも第1の切換手段及び第2の切換手段により
外部端子を介して入出力可能にされた内部バスの信号が
これら2つのマイクロコンピュータ間で相互に入出力さ
れるように外部端子間を接続することにより、バス拡張
モードに設定されたマイクロコンピュータが失った第1
ポート群を、IO拡張モードに設定されたマイクロコン
ピュータの第1ポート群にて補うことができ、外付け回
路を作製することなく、通常モードと同一機能,同一動
作を実現するエミュレーション装置を簡単に構成するこ
とができる。
That is, in the IO expansion mode, the first port group, which cannot input / output signals via the external terminals due to the setting of the bus expansion mode, receives signals from the internal bus input / output via the external terminals. It is controllable. Therefore, according to the microcomputer of the present invention,
Using two of the microcomputers, one is set to the bus extension mode and the other is set to the IO extension mode, and the first switching means and the second switching means enable input / output via an external terminal. By connecting the external terminals so that the signals of the internal bus are input / output between the two microcomputers, the microcomputer set to the bus expansion mode loses the first signal.
The port group can be supplemented by the first port group of the microcomputer set to the IO expansion mode, and the emulation device that realizes the same function and the same operation as the normal mode can be easily formed without manufacturing an external circuit. Can be configured.

【0013】ここで、ポート(群)とは、入出力を兼ね
備えたポートの他、入力のみ或は出力のみのポートを含
み、通常時に入力のみ或は出力のみに用いられるポート
では、内部バスの信号を入出力するように切り換えられ
た時に、入出力のいずれもが可能となるように構成され
ていてもよい。
Here, the port (group) includes not only a port having input / output but also a port having only an input or only an output. A port which is normally used only for input or only for output includes an internal bus. When switching to input and output signals, both input and output may be enabled.

【0014】なお、第1の切換手段及び第2の切換手段
により外部端子を介して入出力可能となる内部バスの信
号の一つとして、第1の切換手段は、ポート群に対する
制御の実行時に該ポート群を選択するために用いられる
IO選択信号を出力すると共に、第2の切換手段は該I
O選択信号を入力するようにしてもよい。
As one of the internal bus signals which can be input / output via the external terminal by the first switching means and the second switching means, the first switching means is used when executing control on the port group. Outputs an IO selection signal used to select the port group, and the second switching means
An O selection signal may be input.

【0015】このIO選択信号は、ポート群をメモリや
その他の周辺回路から識別するために上位アドレスをデ
コードして生成されるものであり、IO拡張モードの時
に、外部端子を介してIO選択信号を入力すれば、上位
アドレスを入力する必要がなくなるので、外部端子を介
して入出力する内部バスの信号を削減することができ
る。
The IO selection signal is generated by decoding an upper address in order to identify a port group from a memory or other peripheral circuits. In the IO extension mode, the IO selection signal is output via an external terminal. , There is no need to input the upper address, so that the number of internal bus signals input / output via external terminals can be reduced.

【0016】ところで、エミュレーションを行ってプロ
グラムの開発を行う時には、プログラムの内容が確定し
ておらず頻煩にプログラムの変更が行われるため、プロ
グラムの書換えが面倒なマイクロコンピュータ内蔵の内
部メモリを使用するのではなく、書換えの容易な外部メ
モリを使用できることが望ましい。
By the way, when a program is developed by emulation, the contents of the program are not fixed and the program is frequently changed. Therefore, the internal memory of the microcomputer, which is difficult to rewrite the program, is used. Instead, it is desirable to be able to use an external memory that can be easily rewritten.

【0017】そこで、モード設定手段は、バス拡張モー
ドの設定時に、更にメモリ切離手段も有効にする外部メ
モリモードの設定を可能なように構成してもよい。この
ように構成された本発明のマイクロコンピュータでは、
モード設定手段により外部メモリモードを設定すると、
内部バスに接続されたメモリが切り離されるため、エミ
ュレーション装置を構成する時に、内部バスの信号によ
って制御される外部メモリを設けることが可能となる。
In view of this, the mode setting means may be configured so as to be able to set an external memory mode in which the memory disconnecting means is also enabled when the bus extension mode is set. In the microcomputer of the present invention thus configured,
When the external memory mode is set by the mode setting means,
Since the memory connected to the internal bus is disconnected, an external memory controlled by a signal on the internal bus can be provided when configuring the emulation device.

【0018】また、このように外部メモリモードを設け
た場合、第1の切換手段は、外部端子を介して入出力可
能とする内部バスの信号の一つとして、メモリに対する
制御の実行時に該メモリを選択するために用いられるメ
モリ選択信号を出力するように構成してもよい。
When the external memory mode is provided as described above, the first switching means outputs one of the signals of the internal bus that can be input / output via the external terminal when the control of the memory is executed. May be configured to output a memory selection signal that is used to select.

【0019】この場合、上位アドレスをデコードしてメ
モリ選択信号を作成する必要がなく、信号線を接続する
だけで、外部メモリを使用することが可能となるので、
エミュレーション装置をより簡単に構成できる。
In this case, it is not necessary to create a memory selection signal by decoding the upper address, and the external memory can be used only by connecting the signal lines.
The emulation device can be configured more easily.

【0020】[0020]

【発明の実施の形態】以下に本発明の実施例を図面と共
に説明する。図1は、本実施例のシングルチップマイク
ロコンピュータ(マイコン)の概略的な内部構成を表す
ブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a schematic internal configuration of a single-chip microcomputer (microcomputer) according to the present embodiment.

【0021】図1に示すように、本実施例のマイコン2
は、信号の入出力を行うために、予め特定用途のために
用意された専用ポート用の外部端子TS1〜TSnと、
使用者が任意の用途に使用可能な汎用IOポート用の外
部端子TG1〜TG64と、後述する動作モードを設定
するためのモード設定用の外部端子TM0,TM1とを
備えている。
As shown in FIG. 1, the microcomputer 2 of this embodiment
Are external terminals TS1 to TSn for dedicated ports prepared in advance for specific use in order to input and output signals,
It has external terminals TG1 to TG64 for general-purpose IO ports that can be used by the user for any purpose, and external terminals TM0 and TM1 for setting a mode for setting an operation mode described later.

【0022】そして、マイコン2は、プログラムに従っ
て動作する周知のCPU4と、CPU4を動作させるの
に必要なプログラム及びデータを格納するROM6と、
CPU4の演算結果等を一次的に記憶するためのRAM
8と、タイマやAD変換器等からなり特定の機能を実現
するために設けられ、専用ポート用の外部端子TS1〜
TSnを介して信号の入出力を行う周辺回路10と、汎
用IOポート用の外部端子TG1〜TG64を介して信
号の入出力を行うIO回路12と、これら各部を相互に
接続するアドレスバス14及びデータバス16と、CP
U4が出力するリード信号RD,ライト信号WR、及び
アドレスバス14を介して入力されるアドレス信号A0
〜A15に基づいて、制御対象を特定するための各種選
択信号を生成するデコーダ18と、モード設定用の外部
端子TM0,TM1の設定に応じて後述するモード選択
信号を生成するモード信号生成回路20とを内蔵してい
る。
The microcomputer 2 includes a well-known CPU 4 that operates according to a program, a ROM 6 that stores programs and data necessary for operating the CPU 4,
RAM for temporarily storing the calculation result and the like of CPU 4
8 and a timer, an AD converter, etc., which are provided to realize a specific function, and are provided with external terminals TS1 to TS1 for dedicated ports.
A peripheral circuit 10 for inputting / outputting signals via TSn, an IO circuit 12 for inputting / outputting signals via external terminals TG1 to TG64 for general-purpose IO ports, an address bus 14 for interconnecting these components, Data bus 16 and CP
The read signal RD and the write signal WR output from U4 and the address signal A0 input via the address bus 14
To A15, a decoder 18 for generating various selection signals for specifying a control target, and a mode signal generation circuit 20 for generating a mode selection signal to be described later according to the setting of the mode setting external terminals TM0 and TM1. And built-in.

【0023】なお、CPU4は、信号の通過/不通過を
切換可能なバッファ回路BF1を介してアドレスバス1
4に接続され、またCPU4,ROM6,RAM8,周
辺回路10は、同様にバッファ回路BF2〜BF5を介
してデータバス16に接続されている。
The CPU 4 operates on the address bus 1 via a buffer circuit BF1 which can switch between passing and non-passing of signals.
The CPU 4, the ROM 6, the RAM 8, and the peripheral circuit 10 are similarly connected to the data bus 16 via buffer circuits BF2 to BF5.

【0024】ここで、モード信号生成回路20は、モー
ド設定用の外部端子TM0,TM1の設定に従って、T
M0,TM1がいずれもLow レベルの場合(00)を通
常モード、TM0がLow レベル,TM1がHighレベルの
場合(01)をIO拡張モード、TM0がHighレベルの
場合(1X)をバス拡張モード、バス拡張モードであっ
てしかもTM1がHighレベルの場合(11)を外部バス
モードとして、バス拡張モードの場合にモード選択信号
Mb,IO拡張モードの場合にモード選択信号Mi,I
O拡張モード又は外部バスモードの場合にモード選択信
号Meを生成するように構成されている。
Here, the mode signal generation circuit 20 sets T.sub.0 in accordance with the settings of the mode setting external terminals TM0 and TM1.
When both M0 and TM1 are at the low level (00), the normal mode is set. When TM0 is at the low level, TM1 is at the high level (01), the IO expansion mode is set. When TM0 is at the high level (1X), the bus expansion mode is set. When the bus extension mode and TM1 are at the high level (11) is the external bus mode, the mode selection signal Mb for the bus extension mode and the mode selection signals Mi and I for the IO extension mode.
It is configured to generate the mode selection signal Me in the case of the O extension mode or the external bus mode.

【0025】また、デコーダ18は、制御対象を特定す
るための選択信号として、上位アドレスA5〜A15に
基づいて、ROM6,RAM8,IO回路12等のチッ
プセレクト信号CSROM,CSRAM,CSIO、及
び機能拡張用のチップセレクト信号CSXX,CSY
Y,CSZZを生成する他、これらチップセレクト信号
とリード信号RD,ライト信号WRに基づいて、ROM
6のリード信号RDro、RAM8のリード信号RDr
a,ライト信号WRra、周辺回路10のリード信号R
Dph,ライト信号WRph等を生成する。
The decoder 18 is also provided with chip select signals CSROM, CSRAM, CSIO and the like for ROM 6, RAM 8, IO circuit 12 and the like, based on upper addresses A5 to A15, as a selection signal for specifying a control target. Chip select signals CSXX, CSY
Y, CSZZ, and a ROM based on the chip select signal, the read signal RD, and the write signal WR.
6 read signal RDro, RAM8 read signal RDr
a, write signal WRra, read signal R of peripheral circuit 10
Dph, a write signal WRph, etc. are generated.

【0026】そして、バッファ回路BF1は、モード選
択信号Miを制御入力とするトライステートバッファか
らなり、モード選択信号MiがHighレベル(IO拡張モ
ード)の時に信号の通過を禁止して、CPU4をアドレ
スバス14から切り離すように構成されている。またバ
ッファ回路BF2,BF5は、いずれもモード選択信号
Miを制御入力とし、リード信号RD,RDph、ライ
ト信号WR,WRphに応じて双方向に信号を通過させ
る双方向のトライステートバッファからなり、モード選
択信号MiがHighレベル(IO拡張モード)の時に信号
の通過を禁止して、CPU4及び周辺回路10をデータ
バス16から切り離すように構成されている。
The buffer circuit BF1 is composed of a tri-state buffer having the mode selection signal Mi as a control input. When the mode selection signal Mi is at the high level (IO extension mode), the passage of the signal is inhibited, and the CPU 4 is addressed. It is configured to be disconnected from the bus 14. Each of the buffer circuits BF2 and BF5 includes a bidirectional tri-state buffer that receives a mode selection signal Mi as a control input and allows signals to pass in both directions according to read signals RD and RDph and write signals WR and WRph. When the selection signal Mi is at the high level (IO extension mode), the passage of the signal is prohibited and the CPU 4 and the peripheral circuit 10 are separated from the data bus 16.

【0027】一方、バッファ回路BF3は、モード選択
信号Meを制御入力とし、ROM6のリード信号RDr
oに応じて信号を通過させるトライステートバッファか
らなり、またバッファ回路BF4は、モード選択信号M
eを制御入力とし、RAM8のリード信号RDra,ラ
イト信号WRraに応じて双方向に信号を通過させるト
ライステートバッファからなり、いずれもモード選択信
号MeがHighレベル(IO拡張モード又は外部メモリモ
ード)の時に信号の通過を禁止して、ROM6及びRA
M8をデータバス16から切り離すように構成されてい
る。
On the other hand, the buffer circuit BF3 receives the mode selection signal Me as a control input and reads the read signal RDr of the ROM 6.
o, the buffer circuit BF4 includes a mode selection signal M
e is a control input, and is a tri-state buffer that allows signals to pass in both directions according to the read signal RDra and the write signal WRra of the RAM 8, and in each case, the mode selection signal Me has a high level (IO extension mode or external memory mode). Sometimes the passage of signals is prohibited, and ROM6 and RA
M8 is configured to be disconnected from the data bus 16.

【0028】次に、IO回路12は、外部端子TG1〜
TG64毎に設けられた個別回路Ci(i=1〜64)
と、制御すべき個別回路Ci(特に、汎用IOポート)
を特定するためのポート選択信号CSPiを生成する選
択信号生成部12aとを備えている。
Next, the IO circuit 12 is connected to the external terminals TG1 to TG1.
Individual circuit Ci provided for each TG 64 (i = 1 to 64)
And the individual circuits Ci to be controlled (especially, general-purpose IO ports)
And a selection signal generation unit 12a that generates a port selection signal CSPi for specifying

【0029】このうち、選択信号生成部12aは、図2
に示すように、デコーダ18にて生成されたIO回路1
2を選択するためのチップセレクト信号(以下、IO選
択信号という)CSIO、外部端子TGiを介して入力
されるIO選択信号CSIOin(後述する)のいずれか
を、モード選択信号Miに応じて選択するマルチプレク
サ(MUX)22と、MUX22によって選択された信
号、及び下位アドレス信号A0〜A4に基づいて、個別
回路Ci毎に設けられた汎用IOポートを特定するため
のポート選択信号CSPiを生成するデコーダ24とを
備えている。
Among them, the selection signal generation unit 12a
As shown in the figure, the IO circuit 1 generated by the decoder 18
In accordance with the mode selection signal Mi, one of a chip select signal (hereinafter, referred to as an IO selection signal) CSIO for selecting the signal No. 2 and an IO selection signal CSIOin (described later) input via the external terminal TGi is selected. A multiplexer (MUX) 22 and a decoder 24 that generates a port selection signal CSPi for specifying a general-purpose IO port provided for each individual circuit Ci based on the signal selected by the MUX 22 and the lower address signals A0 to A4. And

【0030】なお、MUX22では、モード選択信号M
iがHighレベル(IO拡張モード)の時に、外部からの
IO選択信号CSIOinが選択され、モード選択信号M
iがLow レベル(IO拡張モード以外)の時に、デコー
ダ18からのIO選択信号CSIOが選択される。ま
た、モード選択信号MiがHighレベルの時には、後述す
るが、アドレスバス14から供給される下位アドレスA
0〜A4も外部端子TGiを介して外部から入力された
信号となっている。
In the MUX 22, the mode selection signal M
When i is at the High level (IO extension mode), an external IO selection signal CSIOin is selected and the mode selection signal M
When i is at the low level (other than the IO extension mode), the IO selection signal CSIO from the decoder 18 is selected. When the mode selection signal Mi is at the high level, the lower address A supplied from the address bus 14 will be described later.
0 to A4 are also signals input from outside via the external terminal TGi.

【0031】一方、個別回路Ciは、外部端子TGiを
汎用IOポートP00〜P63用、又は内部バス信号の入出
力用のいずれかに切換可能に構成されているが、内部バ
ス信号が入出力用,入力専用,出力専用のいずれである
かによって、その構成が少しずつ異なっている。
On the other hand, the individual circuit Ci is configured so that the external terminal TGi can be switched between the general-purpose IO ports P00 to P63 and the input / output of the internal bus signal. , Input-only, or output-only, the configuration is slightly different.

【0032】まず汎用IOポートの代わりに外部端子T
Giを介して入出力される内部バス信号S1が入出力用
である個別回路Ciは、図3に示すように、ゲートにLo
w レベルが印加されるとオンする電界効果トランジスタ
L1,ゲートにHighレベルが印加されるとオンする電界
効果トランジスタL2,NAND回路L3,NOR回路
L4,反転回路L5からなる出力バッファ回路30を備
えている。この出力バッファ回路30では、電界効果ト
ランジスタL1,L2が電源及びグランドの間に直列接
続されると共に両トランジスタL1,L2の接続点が出
力端として外部端子TGiに接続されており、NAND
回路L3に直結されNOR回路L4に反転回路L5を介
して接続された制御線aがHighレベルである時には、N
AND回路L3及びNOR回路L4の双方に直結された
データ線bの信号レベルに応じて両トランジスタL1,
L2のいずれか一方がオンすることにより、データ線b
上の信号が外部端子TGiを介して出力され、信号線a
がLow レベルである時には、両トランジスタL1,L2
がいずれもオフすることにより、外部端子TGiがHigh
インピーダンスに保持されるように構成されている。
First, an external terminal T is used instead of the general-purpose IO port.
As shown in FIG. 3, the individual circuit Ci in which the internal bus signal S1 input / output via Gi is used for input / output,
An output buffer circuit 30 including a field effect transistor L1 that turns on when a w level is applied and a field effect transistor L2 that turns on when a High level is applied to a gate, a NAND circuit L3, a NOR circuit L4, and an inversion circuit L5. I have. In the output buffer circuit 30, the field effect transistors L1 and L2 are connected in series between the power supply and the ground, and the connection point of the two transistors L1 and L2 is connected as an output terminal to the external terminal TGi.
When the control line a directly connected to the circuit L3 and connected to the NOR circuit L4 via the inverting circuit L5 is at the high level, N
According to the signal level of the data line b directly connected to both the AND circuit L3 and the NOR circuit L4, both transistors L1, L2
When one of L2 is turned on, the data line b
The above signal is output via the external terminal TGi and the signal line a
Is low level, both transistors L1, L2
Are turned off, the external terminal TGi goes high.
It is configured to be held at the impedance.

【0033】また、個別回路Ciは、外部端子TGiを
汎用IOポートとして使用する場合に、入力ポート又は
出力ポートのいずれとして使用するかを設定するための
DR設定レジスタ32と、DR設定レジスタ32の出力
及び後述する制御信号S3のいずれかがHighレベルの時
に出力バッファ回路30の制御線aをHighレベルとする
OR回路L6と、外部端子TGiを出力ポートとして使
用する場合に、その出力データを設定するための出力設
定レジスタ34と、制御信号S3がLow レベルの時には
出力設定レジスタ34の出力を、Highレベルの時には内
部バス信号S1を出力バッファ回路30のデータ線bに
出力するMUX36と、外部端子TGiを入力ポートと
して使用する場合に、外部端子TGiからの信号をデー
タバス16に取り込むためのトライステートバッファ3
8と、DR設定レジスタ32の出力がLow レベルの時に
は外部端子TGiの信号を、Highレベルの時には出力設
定レジスタ34の出力をトライステートバッファ38に
供給するMUX40と、後述する制御信号S4がHighレ
ベルの時に外部端子TGiからの信号を内部バス信号S
1の信号線に取り込むためのトライステートバッファ4
2とを備えている。
Further, when the external terminal TGi is used as a general-purpose IO port, the individual circuit Ci includes a DR setting register 32 for setting whether the external terminal TGi is used as an input port or an output port. When an output and a control signal S3 to be described later are at a high level, an OR circuit L6 for setting the control line a of the output buffer circuit 30 to a high level and an output data when the external terminal TGi is used as an output port are set. An output setting register 34 for outputting the internal bus signal S1 to the data line b of the output buffer circuit 30 when the control signal S3 is at the low level, and an MUX 36 for outputting the internal bus signal S1 to the data line b when the control signal S3 is at the high level. When using TGi as an input port, a signal from the external terminal TGi was taken into the data bus 16. Tristate buffer 3
8, an MUX 40 for supplying the signal of the external terminal TGi to the tri-state buffer 38 when the output of the DR setting register 32 is at the low level, and the MUX 40 for supplying the output of the output setting register 34 to the tri-state buffer 38 when the output of the DR setting register 32 is at the high level. The signal from the external terminal TGi at the time of
Tristate buffer 4 for taking in to one signal line
2 is provided.

【0034】なお、DR設定レジスタ32及び出力設定
レジスタ34は、ポート選択信号CSPiとライト信号
WRとを入力するとデータバスの所定ビットの値がラッ
チされ、リセット信号RSTを入力すると設定がクリア
されるように構成されており、また、トライステートバ
ッファ38は、後述する制御信号S2がLow レベルの時
に、ポート選択信号CSPiとリード信号WRとを入力
すると、データバス16の所定ビットにデータが取り込
まれるように構成されている。
The DR setting register 32 and the output setting register 34 latch the value of a predetermined bit of the data bus when the port selection signal CSPi and the write signal WR are input, and are cleared when the reset signal RST is input. The tri-state buffer 38 is configured such that, when the port selection signal CSPi and the read signal WR are input when the control signal S2 to be described later is at the low level, data is fetched into predetermined bits of the data bus 16. It is configured as follows.

【0035】このように構成された個別回路Ciでは、
外部端子TGiを出力ポートとして使用するには、デー
タ信号線bの信号が外部端子TGiに出力されるようD
R設定レジスタ32の出力をHighレベルに設定すると共
に、出力設定レジスタ34の出力がデータ信号線bに出
力されるよう制御信号S3をLow レベルに設定すればよ
い。また、外部端子TGiを入力ポートとして使用する
には、出力バッファ回路30の出力がハイインピーダン
スに保持され、しかも外部端子TGiの信号がMUX4
0を介してトライステートバッファ38に供給されるよ
う、DR設定レジスタ32の出力をLow レベルに設定す
ればよい。なお、このように個別回路Ciを汎用入出力
ポートとして使用する場合は、外部端子TGiの信号が
内部バス信号S1の信号線に取り込まれないように、制
御信号S4をLow レベルに設定する必要がある。また、
外部端子TGiを出力ポートとして使用する際には、出
力設定レジスタ34に設定したデータを、MUX40及
びトライステートバッファ38を介して読み取ることが
可能なようにされている。
In the individual circuit Ci configured as described above,
In order to use the external terminal TGi as an output port, the signal on the data signal line b must be output to the external terminal TGi.
The output of the R setting register 32 may be set to the high level, and the control signal S3 may be set to the low level so that the output of the output setting register 34 is output to the data signal line b. In order to use the external terminal TGi as an input port, the output of the output buffer circuit 30 is held at high impedance, and the signal of the external terminal TGi is
The output of the DR setting register 32 may be set to a low level so that the output is supplied to the tri-state buffer 38 via 0. When the individual circuit Ci is used as a general-purpose input / output port, it is necessary to set the control signal S4 to a low level so that the signal of the external terminal TGi is not taken into the signal line of the internal bus signal S1. is there. Also,
When the external terminal TGi is used as an output port, data set in the output setting register 34 can be read through the MUX 40 and the tri-state buffer 38.

【0036】一方、外部端子TGiを内部バス信号S1
の出力のために使用するには、内部バス信号S1がMU
X36を介してデータ信号線bに出力され、しかもデー
タ信号線bの信号が外部端子TGiに出力されるよう、
制御信号S3をHighレベルに設定すればよい。また、外
部端子TGiを内部バス信号S1の入力のために使用す
るには、出力バッファ回路30の出力がハイインピーダ
ンスに保持されるよう制御信号S3をLow レベルに設定
すると共に、トライステートバッファ42が外部端子T
Giからの信号を内部バス信号S1の信号線に取り込む
よう制御信号S4をHighレベルに設定すればよい。
On the other hand, the external terminal TGi is connected to the internal bus signal S1.
Internal bus signal S1 is used for output of
X36, the signal is output to the data signal line b, and the signal of the data signal line b is output to the external terminal TGi.
What is necessary is just to set the control signal S3 to High level. To use the external terminal TGi for inputting the internal bus signal S1, the control signal S3 is set to a low level so that the output of the output buffer circuit 30 is maintained at a high impedance, and the tri-state buffer 42 is set to a low level. External terminal T
The control signal S4 may be set to the high level so that the signal from Gi is taken into the signal line of the internal bus signal S1.

【0037】次に、汎用IOポートの代わりに外部端子
TGiを介して入出力される内部バス信号S1が出力専
用である個別回路Ciは、図3に示した個別回路Ciに
おいてトライステートバッファ42を省略した以外は、
図3の個別回路Ciと全く同様に構成されており、その
動作も、外部端子TGiを内部バス信号S1の入力のた
めに使用することがないだけで、それ以外の動作は、全
く同様である。
Next, the individual circuit Ci in which the internal bus signal S1 input / output via the external terminal TGi is exclusively used for output instead of the general-purpose IO port is connected to the tri-state buffer 42 in the individual circuit Ci shown in FIG. Unless omitted,
The configuration is exactly the same as that of the individual circuit Ci of FIG. 3, and the operation is the same except that the external terminal TGi is not used for inputting the internal bus signal S1. .

【0038】また次に、汎用IOポートの代わりに外部
端子TGiを介して入出力される内部バス信号S1が入
力専用である個別回路Ciは、図4に示すように、図3
に示した個別回路CiにおいてMUX36を削除して出
力設定レジスタ34の出力をそのままデータ信号線bに
接続している以外は、図3の個別回路Ciと全く同様に
構成されており、その動作も、外部端子TGiを内部バ
ス信号S1の出力のために使用することがないだけで、
それ以外の動作は、全く同様である。
Next, the individual circuit Ci in which the internal bus signal S1 input / output via the external terminal TGi is used exclusively for input instead of the general-purpose IO port, as shown in FIG.
3 except that the MUX 36 is deleted and the output of the output setting register 34 is directly connected to the data signal line b in the individual circuit Ci shown in FIG. , The external terminal TGi is not used for outputting the internal bus signal S1.
Other operations are exactly the same.

【0039】ところで内部バス信号S1及び制御信号S
3〜S4は、表1に示すようなものである。
The internal bus signal S1 and the control signal S
3 to S4 are as shown in Table 1.

【0040】[0040]

【表1】 [Table 1]

【0041】即ち、汎用IOポートP00〜P15,P48〜
P55として使用される外部端子TG1〜TG16,TG
49〜TG56に対しては、図3に示した個別回路Ci
(但し、トライステートバッファ42を除く)が設けら
れており、内部バス信号S1として、アドレスA0〜A
15及び各種制御信号CSIOout ,CSROM,CS
RAM,RDout ,WRout ,CSXX,CSYY,C
SZZが用いられ、また制御信号S2,S3として、バ
ス拡張モードの時にHighレベルとなるモード選択信号M
bが用いられている。
That is, general-purpose IO ports P00-P15, P48-
External terminals TG1 to TG16, TG used as P55
For the circuits 49 to TG56, the individual circuits Ci shown in FIG.
(Excluding the tri-state buffer 42), and the addresses A0 to A are used as the internal bus signal S1.
15 and various control signals CSIOout, CSROM, CS
RAM, RDout, WRout, CSXX, CSYY, C
SZZ is used, and as the control signals S2 and S3, the mode selection signal M which is at the high level in the bus extension mode is used.
b is used.

【0042】また、汎用IOポートP16〜P31として使
用される外部端子TG17〜TG32に対しては、図3
に示した個別回路Ci(但し、トライステートバッファ
42を含む)が設けられており、内部バス信号S1とし
て、入出力用のデータD0〜D15が用いられ、また制
御信号S2として、バス拡張モードの時にHighレベルと
なるモード選択信号Mb、制御信号S3として、モード
選択信号Mb且つ外部出力選択信号CSO、制御信号S
4として、モード選択信号Mb且つ外部入力選択信号C
SIが用いられている。
For external terminals TG17 to TG32 used as general-purpose IO ports P16 to P31, FIG.
, The input / output data D0 to D15 are used as the internal bus signal S1, and the bus expansion mode in the bus extension mode is used as the control signal S2. The mode selection signal Mb, the external output selection signal CSO, and the control signal S
4, the mode selection signal Mb and the external input selection signal C
SI is used.

【0043】ここで、外部出力選択信号CSOとは、マ
イコン2外部の装置にアクセスし、しかもデータを出力
する場合に生成される信号であり、また外部入力選択信
号CSIとは、同様にマイコン2外部の装置にアクセス
し、しかもデータを入力する場合に生成される信号であ
る。なお、マイコン2外部の装置にアクセスする場合と
は、具体的には、IO選択信号CSIOout ,チップセ
レクト信号CSXX,CSYY,CSZZ(外部バスモ
ードに設定されている場合は、更に、CSROM,CS
RAM)のいずれかがアクティブとなった場合のことで
ある。
Here, the external output selection signal CSO is a signal generated when an external device of the microcomputer 2 is accessed and data is output, and the external input selection signal CSI is the same as the external input selection signal CSI. This signal is generated when an external device is accessed and data is input. Note that the case of accessing a device external to the microcomputer 2 includes, specifically, the IO selection signal CSIOout and the chip select signals CSXX, CSYY, and CSZZ (when the external bus mode is set, CSROM, CSROM
RAM) becomes active.

【0044】次に、汎用IOポートP32〜P47として使
用される外部端子TG33〜TG48に対しては、外部
端子TG17〜TG32と同様に、図3に示した個別回
路Ci(但し、トライステートバッファ42を含む)が
設けられており、内部バス信号S1として、データD0
〜D15が用いられ、また制御信号S2として、IO拡
張モードの時にHighレベルとなるモード選択信号Mi、
制御信号S3として、モード選択信号Mi且つ外部出力
選択信号CSO、制御信号S4として、モード選択信号
Mi且つ外部入力選択信号CSIが用いられている。
Next, as for the external terminals TG33 to TG48 used as the general-purpose IO ports P32 to P47, the individual circuits Ci shown in FIG. And the data D0 as the internal bus signal S1.
To D15, and as the control signal S2, the mode selection signals Mi,
The mode selection signal Mi and the external input selection signal CSI are used as the control signal S3, and the mode selection signal Mi and the external input selection signal CSI are used as the control signal S4.

【0045】更に、汎用IOポートP56〜P63として使
用される外部端子TG57〜TG64に対しては、図4
に示した個別回路Ciが設けられており、内部バス信号
S1として、選択信号CSIOin,RDin,WRin,ア
ドレスA0〜A4が用いられ、また制御信号S2,S
3,S4として、IO拡張モードの時にHighレベルとな
るモード選択信号Miが用いられている。
Further, for external terminals TG57 to TG64 used as general-purpose IO ports P56 to P63, FIG.
Are provided, selection signals CSIOin, RDin, WRin, addresses A0 to A4 are used as internal bus signals S1, and control signals S2, S4
As S3 and S4, the mode selection signal Mi which is set to the high level in the IO extension mode is used.

【0046】なお、IO拡張モードの時にトライステー
トバッファ42を介して取り込まれるIO選択信号CS
IOin(図2参照)以外の内部バス信号S1は、マイコ
ン2内では、通常モード或はバス拡張モード時にマイコ
ン2内部で生成される同名の信号と全く同様に扱われ
る。
It should be noted that IO selection signal CS fetched via tristate buffer 42 in the IO extension mode.
The internal bus signal S1 other than IOin (see FIG. 2) is handled in the microcomputer 2 in exactly the same manner as the signal of the same name generated inside the microcomputer 2 in the normal mode or the bus expansion mode.

【0047】以上のように構成された本実施例のマイコ
ン2では、図5に示すように、モード設定用の外部端子
TM0,TM1により動作モードが通常モード(モード
選択信号Mb,MiがいずれもLow レベル)に設定され
ている場合、外部端子TG1〜TG64の全てが汎用I
OポートP00〜P63用となる。また、バス拡張モード
(モード選択信号MbがHighレベル)に設定されている
場合、外部端子TG1〜TG16がアドレス信号A0〜
A15の出力用、外部端子TG17〜TG32がデータ
信号D0〜D15の入出力用、TG49〜TG55が各
種制御信号CSIOout ,RDout ,WRout ,CSR
OM,CSRAM,CSXX,CSYY,CSZZの出
力用、残りの外部端子TG33〜TG48,TG57〜
TG64が汎用IOポートP32〜P47,P56〜P63用と
なる。更に、IO拡張モード(モード選択信号MiがHi
ghレベル)に設定されている場合、外部端子TG33〜
TG48がデータ信号D0〜D15の入出力用、外部端
子TG57〜TG64が各種制御信号CSIOin,RD
in,WRin,及び下位アドレスA0〜A4の入力用、そ
の他の外部端子TG1〜TG32,TG49〜TG56
が汎用IOポートP00〜P31,P48〜P55用となる。
In the microcomputer 2 of the present embodiment configured as described above, as shown in FIG. 5, the operation mode is set to the normal mode by the mode setting external terminals TM0 and TM1 (both the mode selection signals Mb and Mi are both set). (Low level), all of the external terminals TG1 to TG64 are
Used for O ports P00 to P63. When the bus expansion mode (mode selection signal Mb is at the high level) is set, the external terminals TG1 to TG16 are connected to the address signals A0 to A0.
A15 for output, external terminals TG17 to TG32 for input / output of data signals D0 to D15, and TG49 to TG55 for various control signals CSIOout, RDout, WRout, CSR
OM, CSRAM, CSXX, CSYY, CSZZ output, remaining external terminals TG33 to TG48, TG57 to
The TG 64 is used for general-purpose IO ports P32 to P47 and P56 to P63. Further, the IO extension mode (when the mode selection signal Mi is Hi
gh level), the external terminals TG33 to
TG48 is for input / output of data signals D0-D15, and external terminals TG57-TG64 are various control signals CSIOin, RD.
in, WRin, and other external terminals TG1 to TG32, TG49 to TG56 for inputting lower addresses A0 to A4.
Are for general-purpose IO ports P00 to P31 and P48 to P55.

【0048】つまり、バス拡張モードとIO拡張モード
とでは、汎用IOポートの代わりに内部バス信号S1が
入出力される外部端子TGiが、互いに異なるように構
成されている。次に、本実施例のマイコン2を用いて構
成されたシステムにおいて、マイコン2のエミュレーシ
ョンを行う場合に使用するエミュレーション装置50に
ついて説明する。なお、このエミュレーション装置50
は、システムにおいてマイコン2用に設けられたコネク
タに、マイコン2の代わりに接続して使用するものであ
る。
That is, in the bus extension mode and the IO extension mode, the external terminal TGi to which the internal bus signal S1 is input / output instead of the general-purpose IO port is configured to be different from each other. Next, an emulation device 50 used when emulating the microcomputer 2 in a system configured using the microcomputer 2 of the present embodiment will be described. The emulation device 50
Is used by connecting to the connector provided for the microcomputer 2 in the system instead of the microcomputer 2.

【0049】図6に示すように、エミュレーション装置
50は、一方をバス拡張モードに設定し、他方をIO拡
張モードに設定した一対のマイコン2a,2bと、マイ
コン2a,2bの外部に設けられた外付けのROM52
及びRAM54と、上記マイコン2用のコネクタに接続
されるコネクタ56とにより構成されている。
As shown in FIG. 6, the emulation device 50 is provided outside the microcomputers 2a and 2b, with a pair of microcomputers 2a and 2b having one set to the bus expansion mode and the other set to the IO expansion mode. External ROM 52
And a RAM 54 and a connector 56 connected to the connector for the microcomputer 2.

【0050】そして、マイコン2a,2bの間で、デー
タD0〜D15が相互に入出力されるように、マイコン
2aの外部端子TG17〜TG32とマイコン2bの外
部端子TG33〜TG48とが接続され、またマイコン
2aが出力する下位アドレスA0〜A4,及びIO選択
信号CSIO,リード信号RD,ライト信号WRがマイ
コン2bに入力されるように、マイコン2aの外部端子
TG1〜TG5,及びTG49,TG50,TG51と
マイコン2bの外部端子TG60〜TG64,及びTG
57,TG58,TG59とが夫々接続されている。
The external terminals TG17 to TG32 of the microcomputer 2a and the external terminals TG33 to TG48 of the microcomputer 2b are connected so that the data D0 to D15 are mutually input and output between the microcomputers 2a and 2b. The external terminals TG1 to TG5 and TG49, TG50, TG51 of the microcomputer 2a are connected so that the lower addresses A0 to A4 and the IO selection signal CSIO, the read signal RD, and the write signal WR output by the microcomputer 2a are input to the microcomputer 2b. External terminals TG60 to TG64 and TG of the microcomputer 2b
57, TG58 and TG59 are connected respectively.

【0051】また、ROM52に対するデータの読出が
可能なように、マイコン2aの外部端子TG1〜16
(アドレスA0〜A15),TG17〜TG32(デー
タD0〜D15),TG50(リード信号RD),TG
52(ROM選択信号CSROM)がROM52に接続
され、更にRAM54に対するデータの読出/書込が可
能なように、マイコン2aの外部端子TG1〜16(ア
ドレスA0〜A15),TG17〜TG32(データD
0〜D15),TG50(リード信号RD),TG51
(ライト信号WR),TG53(RAM選択信号CSR
AM)がRAM54に接続されている。
The external terminals TG1 to TG16 of the microcomputer 2a are so arranged that data can be read from the ROM 52.
(Addresses A0 to A15), TG17 to TG32 (data D0 to D15), TG50 (read signal RD), TG
52 (ROM selection signal CSROM) is connected to the ROM 52, and external terminals TG1 to 16 (addresses A0 to A15) and TG17 to TG32 (data D) of the microcomputer 2a so that data can be read / written from / to the RAM 54.
0 to D15), TG50 (read signal RD), TG51
(Write signal WR), TG53 (RAM selection signal CSR)
AM) is connected to the RAM 54.

【0052】また更に、汎用IOポートとして使用され
るマイコン2aの外部端子TG33〜TG48,TG5
7〜TG64、及びマイコン2bの外部端子TG1〜T
G32,TG49〜TG56が、コネクタ56に接続さ
れている。なお、コネクタ56には、図示しないが、マ
イコン2aにおける汎用IOポート用の外部端子TG1
〜TG64,及びモード選択用の外部端子TM0,TM
1以外の外部端子(例えば専用ポート用の外部端子TS
1〜TSn)が全て接続されている。
Further, external terminals TG33 to TG48, TG5 of the microcomputer 2a used as general-purpose IO ports
7 to TG64 and the external terminals TG1 to T of the microcomputer 2b.
G32, TG49 to TG56 are connected to the connector 56. Although not shown, the connector 56 has an external terminal TG1 for a general-purpose IO port in the microcomputer 2a.
To TG64 and mode selection external terminals TM0 and TM
External terminals other than 1 (for example, an external terminal TS for a dedicated port)
1 to TSn) are all connected.

【0053】ここで、図7(a)は、通常モードに設定
されたマイコン2の外部端子TG1〜TG64と汎用I
OポートP00〜P63との対応関係を表す説明図であり、
図7(b)は、エミュレーション装置50を構成するバ
ス拡張モード或はIO拡張モードに設定されたマイコン
2a,2bの各外部端子TG1〜TG64と汎用IOポ
ートP00〜P63との対応関係を表す説明図である。
Here, FIG. 7A shows the external terminals TG1 to TG64 of the microcomputer 2 set to the normal mode and the general-purpose I / O.
It is an explanatory view showing a correspondence relationship with O ports P00 to P63,
FIG. 7B illustrates the correspondence between the external terminals TG1 to TG64 of the microcomputers 2a and 2b set in the bus expansion mode or the IO expansion mode configuring the emulation device 50 and the general-purpose IO ports P00 to P63. FIG.

【0054】図7に示すように、エミュレーション装置
50において、バス拡張モードに設定されたマイコン2
aでは、エミュレーションに必要な内部バス信号を出力
するために、汎用IOポートP00〜P31,P48〜P55
(外部端子TG1〜TG32,TG49〜TG56)が
失われるが、IO拡張モードに設定されたマイコン2b
が、この失われた汎用IOポートP00〜P31,P48〜P
55を補っているので、コネクタ56を介して入出力され
る信号を見る限りでは、エミュレーション装置50は、
通常モードに設定されたマイコン2と同一の機能を有し
ているとみなすことができる。
As shown in FIG. 7, in the emulation device 50, the microcomputer 2 set to the bus extension mode
In a, the general-purpose IO ports P00 to P31 and P48 to P55 are used to output internal bus signals necessary for emulation.
(External terminals TG1 to TG32, TG49 to TG56) are lost, but the microcomputer 2b set to the IO extension mode
However, these lost general-purpose IO ports P00-P31, P48-P
55, the emulation device 50 is, as far as the signals input and output via the connector 56 look,
It can be considered that the microcomputer 2 has the same function as the microcomputer 2 set in the normal mode.

【0055】このようにエミュレーション装置50によ
れば、汎用IOポートP00〜P63を一つも失うことな
く、即ち通常モードに設定されたマイコン2と同一機能
を保持したままで、エミュレーションに必要な、アドレ
スA0〜A15,データD0〜D15,リード信号R
D,ライト信号WR等の内部バス信号を得ることがで
き、従って、ICE等を接続してマイコン2のエミュレ
ーションを簡単に行うことができる。
As described above, according to the emulation device 50, the address required for emulation is maintained without losing any of the general-purpose IO ports P00 to P63, that is, while maintaining the same function as the microcomputer 2 set to the normal mode. A0 to A15, data D0 to D15, read signal R
Internal bus signals such as D and write signal WR can be obtained. Therefore, emulation of the microcomputer 2 can be easily performed by connecting an ICE or the like.

【0056】以上説明したように、本実施例のマイコン
2によれば、汎用IOポート用の外部端子TGiの一部
からアドレスやデータ等の内部バス信号を入出力可能に
するバス拡張モードと、バス拡張モードとは異なる外部
端子TGiを介して内部バス信号を入出力可能とし、し
かもバス拡張モードにて失われた汎用IOポート以外の
内蔵回路の動作を禁止するIO拡張モードとに設定でき
るよう構成されているので、同じマイコン2a,2b
を、一方はバス拡張モードに他方はIO拡張モードに設
定して、両マイコン2a,2bが入出力する内部バス信
号を相互に接続することにより、ディスクリート部品等
によって外付け回路を作成することなく、通常モードに
設定されたマイコン2と同一機能を有するエミュレーシ
ョン装置50を簡単に構成できる。
As described above, according to the microcomputer 2 of the present embodiment, the bus extension mode for enabling input / output of internal bus signals such as addresses and data from a part of the external terminal TGi for the general-purpose IO port, The internal bus signal can be input / output via an external terminal TGi different from the bus expansion mode, and the operation can be set to the IO expansion mode in which the operation of internal circuits other than the general-purpose IO ports lost in the bus expansion mode is prohibited. The same microcomputers 2a and 2b
By setting one to the bus extension mode and the other to the IO extension mode and connecting the internal bus signals input and output by the two microcomputers 2a and 2b to each other, it is possible to create an external circuit by discrete components or the like. The emulation device 50 having the same function as the microcomputer 2 set to the normal mode can be easily configured.

【0057】また、IO拡張モードに設定されたマイコ
ン2aは、バス拡張モードに設定されたマイコン2aが
失った汎用IOポートを、これと全く同じ構成の汎用I
Oポートによって補うことになるので、汎用IOポート
がどのように高機能化されたとしても、エミュレーショ
ン時に外付け回路が増大してしまうことがなく、しかも
通常モードに設定されたマイコン2が実際にシステムに
組み込まれた時と全く同じ動作を実現することができ、
信頼性の高いエミュレーションを行うことができる。
The microcomputer 2a set in the IO expansion mode replaces the general-purpose IO port lost by the microcomputer 2a set in the bus expansion mode with a general-purpose I / O port having the same configuration as this.
Because the O port compensates, no matter how sophisticated the general-purpose IO port becomes, the external circuit does not increase at the time of emulation, and the microcomputer 2 set in the normal mode is actually used. You can achieve exactly the same operation as when it is incorporated into the system,
Emulation with high reliability can be performed.

【0058】更に、本実施例では、IO回路12に対す
る制御を実行する際に、このIO回路12を特定するた
めのIO選択信号CSIOを、バス拡張モードの時には
外部端子TGiを介して出力し、IO拡張モードの時に
は外部端子TGiを介して入力するように構成されてい
るので、IO拡張モードに設定されたマイコン2bに入
力すべきアドレスの数を削減(本実施例では下位アドレ
スA0〜A4のみを入力)することができる。
Further, in this embodiment, when executing control on the IO circuit 12, an IO selection signal CSIO for specifying the IO circuit 12 is output via the external terminal TGi in the bus extension mode. In the IO extension mode, input is performed via the external terminal TGi, so that the number of addresses to be input to the microcomputer 2b set in the IO extension mode is reduced (in this embodiment, only lower addresses A0 to A4 are used). Can be entered).

【0059】即ち、IO選択信号CSIOは上位アドレ
スA5〜A15をデコードして作成したものであるた
め、IO選択信号CSIOを入力すれば上位アドレスA
5〜A15を入力する必要がないのである。また、本実
施例では、マイコン2をバス拡張モード且つ外部メモリ
モードに設定すると、マイコン2の内部では、ROM6
及びRAM8がアドレスバス14及びデータバス16か
ら切り離されるようにされているので、外部端子TGi
を介して出力される内部バス信号によって外付けのRO
M52,RAM54の使用が可能となる。従って、プロ
グラムが確定していないプログラム開発の段階におい
て、書換えの容易な外付けのEPROMやFlashメ
モリ等からなる外付けのROM52やRAM54を使用
することができ、エミュレーションによるプログラム開
発やデバッグに費やす時間や費用を削減することができ
る。
That is, since the IO selection signal CSIO is created by decoding the upper addresses A5 to A15, if the IO selection signal CSIO is input, the upper address A
There is no need to input 5-A15. In this embodiment, when the microcomputer 2 is set to the bus expansion mode and the external memory mode, the microcomputer 6
And the RAM 8 is separated from the address bus 14 and the data bus 16, so that the external terminal TGi
External RO by an internal bus signal output through
M52 and RAM 54 can be used. Therefore, at the stage of program development where the program is not determined, the external ROM 52 or RAM 54 composed of an external EPROM or Flash memory which can be easily rewritten can be used, and the time spent for program development and debugging by emulation can be used. And costs can be reduced.

【0060】なお、バス拡張モードに設定されたマイコ
ン2aが出力するチップセレクト信号CSXX,CSY
Y,CSZZは、ROMやRAMを複数個接続する場合
に使用することができる。また、マイコン2に新たな機
能を追加する場合に、その機能をとりあえず外付け回路
にて実現して、チップセレクト信号CSXX,CSY
Y,CSZZを割り当てることによりバス拡張モードに
設定されたマイコン2aからこの外付け回路を制御でき
るように構成し、この外付け回路が付加されたエミュレ
ーション装置50によって、外付け回路の検証を行った
りシステム開発を進め、その間にこの外付け回路のマイ
コン2への内蔵化を図るようなこともでき、効率のよい
システム開発を行うことができる。
The chip select signals CSXX, CSY output from the microcomputer 2a set in the bus extension mode
Y and CSZZ can be used when connecting a plurality of ROMs and RAMs. When a new function is added to the microcomputer 2, the function is realized by an external circuit for the time being, and the chip select signals CSXX and CSY are provided.
The microcomputer 2a set in the bus extension mode can control the external circuit by assigning Y and CSZZ, and the external circuit can be verified by the emulation device 50 to which the external circuit is added. The system development can be advanced, and the external circuit can be incorporated in the microcomputer 2 during that time, so that efficient system development can be performed.

【0061】また、本実施例では、エミュレーション時
に内部バスの信号を入出力するためのポート群として汎
用IOポート用の外部端子TG1〜TG64を用いた
が、これに限らず専用ポート用の外部端子TS1〜TS
n等を用いてもよい。
In this embodiment, the external terminals TG1 to TG64 for general-purpose IO ports are used as a port group for inputting / outputting signals of the internal bus during emulation. However, the present invention is not limited to this. TS1-TS
n or the like may be used.

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

【図1】 実施例のマイクロコンピュータ(マイコン)
2の概略的な内部構成を表すブロック図である。
FIG. 1 shows a microcomputer (microcomputer) of an embodiment.
2 is a block diagram illustrating a schematic internal configuration of FIG.

【図2】 IO回路12を構成する選択信号生成部12
aの回路図である。
FIG. 2 is a diagram illustrating a selection signal generator 12 included in an IO circuit 12.
It is a circuit diagram of a.

【図3】 IO回路12を構成する個別回路Ciの回路
図である。
FIG. 3 is a circuit diagram of an individual circuit Ci included in the IO circuit 12.

【図4】 IO回路12を構成する個別回路Ciの回路
図である
FIG. 4 is a circuit diagram of an individual circuit Ci constituting the IO circuit 12;

【図5】 動作モード毎に外部端子TGiの割当を表す
一覧表である。
FIG. 5 is a list showing assignment of external terminals TGi for each operation mode.

【図6】 実施例のマイコン2を用いて構成したエミュ
レーション装置50を構成を表す回路図である。
FIG. 6 is a circuit diagram illustrating a configuration of an emulation device 50 configured using the microcomputer 2 of the embodiment.

【図7】 通常モードで動作するマイコン2、及びエミ
ュレーション装置50を構成するマイコン2a,2bに
おける外部端子TGiと汎用IOポートP00〜P63との
関係を表す説明図である。
FIG. 7 is an explanatory diagram showing a relationship between the external terminal TGi and the general-purpose IO ports P00 to P63 in the microcomputer 2 operating in the normal mode and the microcomputers 2a and 2b constituting the emulation device 50.

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

2,2a,2b…マイコン 4…CPU
6…ROM 8…RAM 10…周辺回路 12…IO回路
12a…信号選択部 12a…選択信号生成部 14…アドレスバス
16…データバス 18…デコーダ 20…モード信号生成
回路 22,36,40…マルチプレクサ(MUX) 24
…デコーダ 30…出力バッファ回路 32…DR設定レジス
タ 34…出力設定レジスタ 38,42…トライス
テートバッファ 50…エミュレーション装置 52…外付けROM 54…外付けRAM 56…コネクタ L1,L2…電界効果トランジスタ L3…N
AND回路 L4…NOR回路 L5…反転回路 L6…O
R回路 TGi(i=1〜64)…汎用IOポート用外部端子 TM1,TM2…モード設定用外部端子 BF1〜BF5…バッファ回路
2, 2a, 2b: microcomputer 4: CPU
6 ROM 8 RAM 10 Peripheral circuit 12 IO circuit
12a: signal selection unit 12a: selection signal generation unit 14: address bus
16 Data bus 18 Decoder 20 Mode signal generation circuit 22, 36, 40 Multiplexer (MUX) 24
... Decoder 30 ... Output buffer circuit 32 ... DR setting register 34 ... Output setting register 38,42 ... Tristate buffer 50 ... Emulation device 52 ... External ROM 54 ... External RAM 56 ... Connector L1, L2 ... Field effect transistor L3 ... N
AND circuit L4 NOR circuit L5 Inverting circuit L6 O
R circuit TGi (i = 1 to 64): external terminal for general-purpose IO port TM1, TM2: external terminal for mode setting BF1 to BF5: buffer circuit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 アドレス,データ,各種制御信号を伝送
する内部バスを介して相互に接続されたCPU,メモ
リ,及び外部端子を介して信号の入出力を行うポート群
を備えたシングルチップのマイクロコンピュータにおい
て、 上記CPUを上記内部バスから切り離すCPU切離手段
と、 上記メモリを上記内部バスから切り離すメモリ切離手段
と、 上記ポート群の一部である第1ポート群による上記外部
端子を介した信号の入出力を禁止すると共に、該外部端
子から上記内部バスの信号を入出力可能にする第1の切
換手段と、 上記第1ポート群とは異なるポート群の一部である第2
ポート群による上記外部端子を介した信号の入出力を禁
止すると共に、該外部端子から上記内部バスの信号を入
出力可能にする第2の切換手段と、 上記CPU切離手段,メモリ切離手段,第1の切換手
段,第2の切換手段の全てを無効にする通常モード、上
記第1の切換手段のみを有効にするバス拡張モード、及
び上記CPU切離手段,メモリ切離手段,第2の切換手
段のみを有効にするIO拡張モードのいずれかに設定す
るモード設定手段と、 を備え、該モード設定手段によって上記IO拡張モード
に設定されている時には、上記第2の切換手段により上
記外部端子を介して入出力される上記内部バスの信号に
従って上記第1ポート群が動作するように構成したこと
を特徴とするマイクロコンピュータ。
1. A single-chip micro-computer comprising a CPU, a memory, and a port group for inputting and outputting signals via external terminals, the CPU and the memory being interconnected via an internal bus for transmitting addresses, data, and various control signals. In the computer, a CPU disconnecting unit that disconnects the CPU from the internal bus, a memory disconnecting unit that disconnects the memory from the internal bus, and an external terminal via a first port group that is a part of the port group First switching means for inhibiting input / output of signals and enabling input / output of signals of the internal bus from the external terminal; and a second switching means which is a part of a port group different from the first port group.
Second switching means for prohibiting input / output of signals through the external terminals by the port group and enabling input / output of signals of the internal bus from the external terminals; CPU disconnection means and memory disconnection means A normal mode in which all of the first switching means and the second switching means are disabled, a bus extension mode in which only the first switching means is enabled, and a CPU separation means, a memory separation means, and a second mode. Mode setting means for setting any one of the IO extension modes to enable only the switching means. When the mode setting means sets the IO extension mode, the second switching means sets the external mode. A microcomputer configured to operate the first port group in accordance with a signal of the internal bus input / output via a terminal.
【請求項2】 請求項1に記載のマイクロコンピュータ
において、 上記第1の切換手段及び第2の切換手段により上記外部
端子を介して入出力可能となる上記内部バスの信号の一
つとして、上記第1の切換手段は、上記ポート群に対す
る制御の実行時に該ポート群を選択するために用いられ
るIO選択信号を出力し、上記第2の切換手段は、該I
O選択信号を入力することを特徴とするマイクロコンピ
ュータ。
2. The microcomputer according to claim 1, wherein the first switching means and the second switching means enable the input / output via the external terminal via one of the internal bus signals. The first switching means outputs an IO selection signal used for selecting the port group when executing the control on the port group, and the second switching means outputs the IO selection signal.
A microcomputer which inputs an O selection signal.
【請求項3】 請求項1又は請求項2に記載のマイクロ
コンピュータにおいて、 上記モード設定手段を、上記バス拡張モードの設定時
に、更に上記メモリ切離手段を有効にする外部メモリモ
ードの設定が可能なように構成したことを特徴とするマ
イクロコンピュータ。
3. The microcomputer according to claim 1, wherein said mode setting means can be set to an external memory mode for enabling said memory disconnecting means when said bus expansion mode is set. A microcomputer characterized in that:
【請求項4】 請求項3に記載のマイクロコンピュータ
において、 上記第1の切換手段は、上記外部端子を介して入出力可
能とする上記内部バスの信号の一つとして、上記メモリ
に対する制御の実行時に該メモリを選択するために用い
られるメモリ選択信号を出力することを特徴とするマイ
クロコンピュータ。
4. The microcomputer according to claim 3, wherein said first switching means executes control of said memory as one of signals of said internal bus which can be input / output via said external terminal. A microcomputer which outputs a memory selection signal used for selecting the memory at times.
【請求項5】 請求項1又は請求項2に記載のマイクロ
コンピュータを2つ備え、 一方の上記マイクロコンピュータを上記バス拡張モード
に設定すると共に、他方の上記マイクロコンピュータを
上記IO拡張モードに設定し、しかも上記第1の切換手
段及び第2の切換手段により上記外部端子を介して入出
力可能にされた上記内部バスの信号が上記一対のマイク
ロコンピュータ間で相互に入出力されるように上記外部
端子間を接続したことを特徴とするエミュレーション装
置。
5. The microcomputer according to claim 1, wherein one of the microcomputers is set to the bus extension mode, and the other microcomputer is set to the IO extension mode. In addition, the signals of the internal bus, which can be input / output via the external terminals by the first switching means and the second switching means, are mutually input / output between the pair of microcomputers. An emulation device characterized by connecting terminals.
【請求項6】 請求項3又は請求項4に記載のマイクロ
コンピュータを2つ備え、 一方の上記マイクロコンピュータを上記バス拡張モード
に設定すると共に、他方の上記マイクロコンピュータを
上記IO拡張モード且つ上記外部メモリモードに設定
し、しかも上記第1の切換手段及び第2の切換手段によ
り上記外部端子を介して入出力可能にされた上記内部バ
スの信号が相互に入出力されるように上記外部端子間を
接続し、 更に、上記内部バスの信号によって制御される外部メモ
リを設けたことを特徴とするエミュレーション装置。
6. The microcomputer according to claim 3, wherein one of the microcomputers is set to the bus extension mode, and the other microcomputer is set to the IO extension mode and the external microcomputer. A memory mode is set, and signals between the external terminals are input and output via the external terminals by the first switching means and the second switching means. And an external memory controlled by a signal of the internal bus.
JP12266097A 1997-05-13 1997-05-13 Microcomputer and emulation device Expired - Fee Related JP3371752B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12266097A JP3371752B2 (en) 1997-05-13 1997-05-13 Microcomputer and emulation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12266097A JP3371752B2 (en) 1997-05-13 1997-05-13 Microcomputer and emulation device

Publications (2)

Publication Number Publication Date
JPH10312308A true JPH10312308A (en) 1998-11-24
JP3371752B2 JP3371752B2 (en) 2003-01-27

Family

ID=14841487

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12266097A Expired - Fee Related JP3371752B2 (en) 1997-05-13 1997-05-13 Microcomputer and emulation device

Country Status (1)

Country Link
JP (1) JP3371752B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009169829A (en) * 2008-01-18 2009-07-30 Denso Corp Electronic equipment and programs

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009169829A (en) * 2008-01-18 2009-07-30 Denso Corp Electronic equipment and programs

Also Published As

Publication number Publication date
JP3371752B2 (en) 2003-01-27

Similar Documents

Publication Publication Date Title
US5537654A (en) System for PCMCIA peripheral to execute instructions from shared memory where the system reset signal causes switching between modes of operation by alerting the starting address
WO1998048356A1 (en) A single chip microcontroller having down-loadable memory organization supporting 'shadow' personality, optimized for bi-directional data transfers over a communication channel
US4250547A (en) Information processing apparatus capable of effecting parallel processings by using a divided common bus
KR100299149B1 (en) Microcontrollers with N-bit data bus widths with I / O pins of N or less and how
US6754760B1 (en) Programmable interface for a configurable system bus
JP3380827B2 (en) Emulator device
CN108108314B (en) switch system
JP2000194551A (en) Flash memory rewriting circuit
JPH10312308A (en) Microcomputer and emulation device
US11757772B2 (en) Stacking switch unit and method used in stacking switch unit
JP2793540B2 (en) Emulation device
JPH0934748A (en) Microcomputer for emulation
JP3129397B2 (en) Emulation device for microcomputer
JP2643803B2 (en) Microcomputer
KR920003279B1 (en) OS and NOS loading method of data processing device
KR100367345B1 (en) Device for controlling processor in imt-2000 communication board
JP2001188770A (en) One chip microcomputer
CA2392503A1 (en) Computer module and motherboard
JP2000029673A (en) Program control system
JPH08101806A (en) Dma device, microprocessor and microcomputer system
JP2780406B2 (en) Initial setting control method
JP3006487B2 (en) Emulation device
KR930004425B1 (en) Computer system with debugging terminal function and method of performing the same
JPS62221062A (en) Single chip microcomputer
JPS6027017A (en) Setting system for action mode of terminal device

Legal Events

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

Free format text: PAYMENT UNTIL: 20091122

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101122

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131122

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees