JPS62221061A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPS62221061A
JPS62221061A JP61064347A JP6434786A JPS62221061A JP S62221061 A JPS62221061 A JP S62221061A JP 61064347 A JP61064347 A JP 61064347A JP 6434786 A JP6434786 A JP 6434786A JP S62221061 A JPS62221061 A JP S62221061A
Authority
JP
Japan
Prior art keywords
cpu
output
signal
peripheral device
timing
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
JP61064347A
Other languages
Japanese (ja)
Other versions
JPH0568750B2 (en
Inventor
Yukihiro Nishiguchi
西口 幸弘
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP61064347A priority Critical patent/JPS62221061A/en
Publication of JPS62221061A publication Critical patent/JPS62221061A/en
Publication of JPH0568750B2 publication Critical patent/JPH0568750B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)
  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To easily control the stop state of a CPU and to simplify the constitution of a control circuit by stopping the clock of the CPU when an access is given to the peripheral device of low speed or a halt mode is attained for a stand-by function. CONSTITUTION:When a halt instruction is executed in the halt mode and in the stop mode of a CPU, the halt signal is outputted from an instruction decoder 22. Thus the output of a latch 50 is set at 1 in the next cycle, therefore CCK is set at 1 and the CPU is stopped. Then a halt mode is secured. When an interruption request signal INT is inputted during the halt mode, an RS flip-flop 58 is reset by the SCKB timing and the output of the flip-flop 58 is st at 0. Then the output of the latch 50 is set to 0 from the SCK timing of the next machine cycle. Thus the CCK, CCKB and CCKS are outputted in a normal way. As a result, the CPU is stopped even in a halt mode by stopping the result, the CPU is stopped even in a halt mode by stopping the clock of the CPU.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は中央処理装置(以下” c p u”という)
の停止制御を行うマイクロコンピュータに関する。
[Detailed Description of the Invention] Industrial Field of Application The present invention relates to a central processing unit (hereinafter referred to as "CPU").
This invention relates to a microcomputer that performs stop control.

従来の技術 一般に、マイクロコンピュータは、CPUと周辺装置と
、によって構成されている。CPUは、周辺装置に対し
、データを書込んだりデータを読出したり(以下このよ
うな動作を“アクセス”という)することにより、周辺
装置を制御する。
2. Description of the Related Art Generally, a microcomputer is composed of a CPU and peripheral devices. The CPU controls the peripheral device by writing data to and reading data from the peripheral device (hereinafter, such operations are referred to as "access").

近年、デバイス技術の進歩によりCPUの動作速度はど
んどん速くなってきている。従ってCPUが、高速デバ
イスで構成される周辺装置とインタフェースする場合は
、CPUは周辺装置をCPUの動作に同期させて動作さ
せることができる。
In recent years, with advances in device technology, the operating speed of CPUs has become faster and faster. Therefore, when a CPU interfaces with a peripheral device made up of high-speed devices, the CPU can operate the peripheral device in synchronization with the operation of the CPU.

しかし低速デバイスを含む周辺装置メモリ等のように固
定速度で動作する周辺装置やCPUのアクセスできるタ
イミングが限定されている構成の周辺装置(以下“低速
周辺装置”という)も存在する。CPUがこのような低
速周辺装置をアクセスする場合にはCPUは低速周辺装
置へのアクセス完了までアクセスを続けなければならな
いため、CPUの動作が低速周辺装置の動作に同期する
ことになる。換言すれば、CPUは周辺装置をアクセス
した状態で停止状態となる。
However, there are peripheral devices including low-speed devices that operate at a fixed speed, such as memory, and peripheral devices that have a configuration in which the timing that the CPU can access is limited (hereinafter referred to as "low-speed peripheral devices"). When the CPU accesses such a low-speed peripheral device, the CPU must continue accessing the low-speed peripheral device until the access to the low-speed peripheral device is completed, so that the operation of the CPU is synchronized with the operation of the low-speed peripheral device. In other words, the CPU is in a stopped state while accessing the peripheral device.

第2図は一般的なCP Ullと周辺装置12とのイン
タフェースを示している。CP Ullからアドレス゛
バスによりアドレスを周辺装置12に与える。リード信
号PRDによりデータバス上に周辺装置12のアドレス
に対応するデータが読出される。またライト信号PWR
によりc P Llllから出力されたデータバス上の
データが周辺装置12に書込まれる。
FIG. 2 shows a typical CP Ull and peripheral device 12 interface. An address is provided from the CP Ull to the peripheral device 12 via the address bus. Data corresponding to the address of peripheral device 12 is read onto the data bus by read signal PRD. Also, the light signal PWR
The data on the data bus output from c P Lll is written to the peripheral device 12 .

しかし、周辺装置12が前述のような低速周辺装置であ
ると、CPLIに対し、停止を要求する信号(以下゛R
DY信号”という)をアクセスが完了するまで出力する
構成をとりインタフェースを行う。
However, if the peripheral device 12 is a low-speed peripheral device as described above, a signal (hereinafter referred to as "R") requesting a stop is sent to the CPLI.
The interface is configured to output a DY signal (referred to as "DY signal") until the access is completed.

従来は、CPUが低速周辺装置をアクセスする場合にC
PUを停止状態にするためには、CPUの動作マシンサ
イクル中にCPUが何も実行しない特別なウェイトサイ
クルMwを挿入している。
Conventionally, when the CPU accesses a low-speed peripheral device, C
In order to bring the PU into a halted state, a special wait cycle Mw in which the CPU does nothing is inserted into the CPU's operating machine cycle.

〔文献:UCOM−87ユーヂーズマニアル(ITM−
6635) 43ページ参照〕 第9図がウェイトサイクルMwの挿入を示している図で
ある。CCKはCPUクロックを示す。
[Reference: UCOM-87 User's Manual (ITM-
6635) See page 43] FIG. 9 is a diagram showing insertion of the wait cycle Mw. CCK indicates the CPU clock.

マシンサイクルMr、で低速周辺装置をアクセスすると
、低速周辺装置からはロウレベル(以下“0”という)
が有効なRDY信号がCPUに入力される。CPUはマ
シンサイクルM、、と次のマシンサイクルMn+l の
間にウェイトサイクルMWを挿入し、CPUを停止状態
にする。RDY信号がハイレベル(以下“1”という)
になるとアクセス完了であり、CPUは次のマシンサイ
クルM n + + に進む。以上のように従来はマシ
ンサイクルの制御によりCPLIの停止状態を実現して
いた。
When a low-speed peripheral device is accessed by machine cycle Mr, the low-speed peripheral device outputs a low level (hereinafter referred to as "0").
A valid RDY signal is input to the CPU. The CPU inserts a wait cycle MW between machine cycles M, . . . and the next machine cycle Mn+l to bring the CPU to a halt state. RDY signal is high level (hereinafter referred to as "1")
When this happens, the access is complete, and the CPU proceeds to the next machine cycle M n + +. As described above, conventionally, the stopped state of the CPLI has been achieved by controlling the machine cycle.

また、近年マイクロコンピュータの高集積化が急速に進
むにつれ、消費電力の増大が問題となっている。そのた
め、低消費電力であるCMOSデバイスが採用される傾
向にある。一般に、CMOSデバイスを用いたマイクロ
コンピュータはCMO3の特性を有効に活かしたスタン
バイモードを必ず備えている。スタンバイモードの一つ
として、CPUが、命令の実行によりCPUの動作クロ
ックを停止させることによりさらに低消費電力にするモ
ードがある(以下このモードを“HALTモードという
)。HALTモードではCPUの動作クロックが停止す
るためCPUは停止状態となる。
Furthermore, as microcomputers have rapidly become more highly integrated in recent years, increased power consumption has become a problem. Therefore, there is a tendency for CMOS devices with low power consumption to be adopted. Generally, a microcomputer using a CMOS device always has a standby mode that effectively utilizes the characteristics of CMO3. One of the standby modes is a mode in which the CPU stops the CPU's operating clock by executing an instruction to further reduce power consumption (hereinafter referred to as "HALT mode"). In HALT mode, the CPU's operating clock stops. , the CPU is in a stopped state.

第10図はHALTモード時のCPLIの動作を示すタ
イミング図である。CPUの命令実行によりHALTモ
ードが設定されるとHALTモードとなると同時にCP
UクロックCCKがハイレベル(以下“1”という)の
まま停止する。外部からの割込みの発生等によりHAL
Tモードが解除されるとCPUクロックCCKが再び動
作するためCPUは次の演算を実行することになる。
FIG. 10 is a timing diagram showing the operation of the CPLI in HALT mode. When HALT mode is set by CPU instruction execution, HALT mode is set and CP
The U clock CCK remains at a high level (hereinafter referred to as "1") and stops. HAL due to occurrence of external interrupt, etc.
When the T mode is released, the CPU clock CCK starts operating again, so the CPU executes the next operation.

発明が解決しようとする問題点 上述したように、CPUの停止状態には2条件考えられ
る。従来はこれら2条件の停止制御はそれぞれ異なる方
法で実現されていた。即ち、従来はウェイトサイクルの
挿入制御が可能なマシンサイクル発生制御とHALTモ
ードの為のクロック制御との2系統のCPUの停止制御
を行う必要があった。従って、CPUの停止制御が複雑
となり回路構成が大きくなるため、マイクロコンピュー
タの価格が高くなるという大きな欠点があった。
Problems to be Solved by the Invention As described above, there are two conditions that can be considered for the halt state of the CPU. Conventionally, stop control under these two conditions has been realized using different methods. That is, conventionally, it has been necessary to perform two systems of CPU stop control: machine cycle generation control capable of inserting wait cycles and clock control for HALT mode. Therefore, the CPU stop control becomes complicated and the circuit configuration becomes large, resulting in a major drawback in that the price of the microcomputer becomes high.

そこで、本発明は、CPUの停止状態が必要な2条件の
制御を同一の制御回路で実現することにより、CPUの
停止制御が容易で安価なマイクロコンピュータを提供す
ることを目的としている。
Therefore, an object of the present invention is to provide an inexpensive microcomputer that can easily control the CPU to stop by implementing control for two conditions that require the CPU to be stopped using the same control circuit.

問題点を解決するための手段 上記問題点を解決するための本発明のマイクロコンピュ
ータは、プログラムまたはデータを記憶するメモリと、
プログラムを実行するCPLIと、該CPLIの周辺装
置と、該CPUが周辺装置をアクセスするマシンサイク
ルの開始を検出し、該CPUの動作を周辺装置の動作に
同期させるレデイ信号を発生するレディ信号発生装置と
、該CPLIがプログラムを実行することにより発生す
るCPU停止信号もしくは前記レディ信号を検出して該
CPUの動作クロックをハイまたはロウのいずれか一方
のレベルに固定するクロック制御装置とを有している。
Means for Solving the Problems The microcomputer of the present invention for solving the above problems includes a memory for storing programs or data;
A CPLI that executes a program, a peripheral device of the CPLI, and a ready signal generation that detects the start of a machine cycle in which the CPU accesses the peripheral device and generates a ready signal that synchronizes the operation of the CPU with the operation of the peripheral device. and a clock control device that detects a CPU stop signal or the ready signal generated when the CPLI executes a program and fixes the operating clock of the CPU to either a high or low level. ing.

実施例 次に本発明について図面を参照して説明する。Example Next, the present invention will be explained with reference to the drawings.

第2図は前述のように、CPUIIと周辺装置12のイ
ンクフェースを示す図である。CPLIIIからアドレ
スバスによりアドレスを周辺装置12に与える。リード
信号PRDによりデータバス上に周辺装置12のアドレ
スに対応するデータが読出される。
FIG. 2 is a diagram showing the ink face of the CPU II and peripheral device 12, as described above. An address is provided from the CPL III to the peripheral device 12 via the address bus. Data corresponding to the address of peripheral device 12 is read onto the data bus by read signal PRD.

またライト信号PWRによりCPLlllから出力され
たデータバス上のデータが周辺装置12に書込まれる。
Further, the data on the data bus output from CPLlll is written to the peripheral device 12 by the write signal PWR.

周辺装置12が低速周辺装置の場合には、停止要求信号
RDYをアクセスが終了するまでCPLlllに対して
出力する。
If the peripheral device 12 is a low-speed peripheral device, a stop request signal RDY is output to CPLll until the access is completed.

第2図はCP Ullのブロック図である。プログラム
が記憶されているR OM21の出力は命令デコーダ2
2に人力される。命令デコーダ22は、プログラムを解
読すると、いろいろな制御信号をそれぞれのタイミング
で出力する。また、ROM21の出力はデータバス34
にも出力される。
FIG. 2 is a block diagram of CP Ull. The output of the ROM21 in which the program is stored is the instruction decoder 2.
2 is done manually. When the instruction decoder 22 decodes the program, it outputs various control signals at respective timings. In addition, the output of the ROM 21 is output from the data bus 34.
is also output.

データが記憶されるR A M23はアドレスバス35
または命令デコーダ22の出力SLA信号によって番地
が指定されて、命令デコーダ22の出力WR倍信号より
データバス34上のデータが書込まれる。
The RAM 23 where data is stored is the address bus 35.
Alternatively, an address is specified by the output SLA signal of the instruction decoder 22, and data on the data bus 34 is written by the output WR signal of the instruction decoder 22.

その番地の内容は、RD倍信号よりデータバス34上に
読出される。
The contents of that address are read onto the data bus 34 by the RD double signal.

命令デコーダ22の出力5LTA、、5LTB信号はそ
れぞれアントゲ−)24.25を介してテンポラリレジ
スタTA26、TA27に送られる。すると、CPUク
ロックCCKBが“1”のタイミング(以下“CCKB
タイミングという)でそれぞれテンポラリレジスタTA
26、TA27にデータバス34上のデータが書込まれ
る。TA26及びTB27はそれぞれA L U28の
A側、B側の人力となっている。
The output signals 5LTA, 5LTB of the instruction decoder 22 are sent to temporary registers TA26 and TA27 via anti-games 24 and 25, respectively. Then, the timing when the CPU clock CCKB is “1” (hereinafter referred to as “CCKB
(referred to as timing), each temporary register TA
26, the data on the data bus 34 is written to TA27. TA26 and TB27 are manpower for A side and B side of ALU28, respectively.

A L U28のタイミング図を第5図に示す。ALL
I28はゲート数を少なくするためダイナミック回路で
構成されている。このA L [28は、CPUクロッ
クCCKが“1”のタイミング(以下“CCKタイミン
グという)にサンプリングされ、命令デコーダ22の出
力へOPにより指定される演算をTA26の内容とTB
27の内容との間で行う。ALU2Bはダイナミック回
路であるためCCKタイミング以外はプリチャージ状態
となっている。ALL32Bの動作は次のステートのC
CKが“1”のタイミングであるためAOP信号を半ス
テート遅らせて演算を指定する。A L U2Bの出力
はテンポラリレジスタTR29にクロックCCKSが“
l”のタイミング(“CCKSタイミングという)で書
込まれる。TR29の出力はそのままアドレスバス35
に出力されると同時に、データバス34へも出力される
A timing diagram of the ALU 28 is shown in FIG. ALL
I28 is composed of a dynamic circuit in order to reduce the number of gates. This A L [28 is sampled at the timing when the CPU clock CCK is "1" (hereinafter referred to as "CCK timing"), and sends the operation specified by OP to the output of the instruction decoder 22 with the contents of TA26 and TB.
This is done between the contents of 27. Since ALU2B is a dynamic circuit, it is in a precharged state except at the CCK timing. The operation of ALL32B is as follows:
Since the timing is when CK is "1", the AOP signal is delayed by half a state to specify the operation. The output of A L U2B is sent to the temporary register TR29 when the clock CCKS is “
1” timing (referred to as “CCKS timing”). The output of TR29 is sent directly to the address bus 35.
At the same time, it is also output to the data bus 34.

クロック制御回路30はCPU周辺装置を動作させるク
ロックを作成する回路である。命令デコーダの出力SL
M信号やRDY信号により制御され、SCK、CCKS
CCKB、CCKSのクロックを作成する。アンドゲー
ト31には、SLM信号、RD倍信号入力され、その出
力PRDは周辺装置のリード信号となる。アンドゲート
32にはSLM信号、WR信号が人力され、その出力P
WRは周辺装置へのライト信号となる。
The clock control circuit 30 is a circuit that creates a clock that operates the CPU peripheral devices. Instruction decoder output SL
Controlled by M signal and RDY signal, SCK, CCKS
Create clocks for CCKB and CCKS. The SLM signal and the RD multiplied signal are input to the AND gate 31, and its output PRD becomes a read signal for the peripheral device. The SLM signal and WR signal are input to the AND gate 32, and the output P
WR becomes a write signal to peripheral devices.

第3図はクロック制御回路30の回路図である。FIG. 3 is a circuit diagram of the clock control circuit 30.

発振器41の出力は分周期42で2分周されシステムク
ロックSCKとなる一方、インバータ43で反転されク
ロック5CKBともなる。SLM信号はラッチ44にS
CKのハイレベル時に書込まれる。ラッチ44の出力は
5CKBのハイレベル時にラッチ45に書込まれる。ラ
ッチ45の出力はインバータ46を介してアンドゲート
47に入力される。またSLM信号はアンドゲート47
.48にも人力されている。
The output of the oscillator 41 is frequency-divided by 2 with a dividing period 42 to become the system clock SCK, and is inverted by the inverter 43 to become the clock 5CKB. The SLM signal is sent to latch 44
Written when CK is at high level. The output of the latch 44 is written to the latch 45 when 5CKB is at high level. The output of latch 45 is input to AND gate 47 via inverter 46. Also, the SLM signal is an AND gate 47
.. 48 is also man-powered.

RDY信号はインバータ56を介してアンドゲート48
に人力されている。アンドゲート47.4Bの出力及び
RSフリップフロップ58の出力はオアゲート49を介
してラッチ50に、SCKが“1″のタイミング(以下
“SCKタイミングという)に書込まれる。ラッチ50
の出力は5CKBが1のタイミング(以下゛5CKBタ
イミングという)にラッチ5Iに書込まれる。ラッチ5
0の出力はオアゲート53、インバータ57に人力され
ている。ラッチ50の出力が“1”となるとCCKは“
′1”、CCKBは“0”に固定される。ラッチ51の
出力はインバータ55を介してアンドゲート54に人力
されているため、ラッチ51の出力が“1”となるとC
CKSは“0”に固定される。しかし、ラッチ50.5
1の内容が“0″のときには、CCK、CCKSはSC
Kと同相のクロックとなる。
The RDY signal is passed through an inverter 56 to an AND gate 48.
is man-powered. The output of the AND gate 47.4B and the output of the RS flip-flop 58 are written to the latch 50 via the OR gate 49 at the timing when SCK is "1" (hereinafter referred to as "SCK timing").Latch 50
The output of is written to the latch 5I at the timing when 5CKB is 1 (hereinafter referred to as "5CKB timing"). latch 5
The output of 0 is manually supplied to an OR gate 53 and an inverter 57. When the output of latch 50 becomes “1”, CCK becomes “
'1', CCKB is fixed at '0'.The output of the latch 51 is input to the AND gate 54 via the inverter 55, so when the output of the latch 51 becomes '1', C
CKS is fixed at "0". But latch 50.5
When the content of 1 is “0”, CCK and CCKS are SC.
The clock is in phase with K.

また、命令デコーダの出力HLTが “1”のとき5C
KBタイミングでRSフリップフロップ58がセットさ
れる。またRSフリップフロップ58は割込み処理装置
(図示しない)からの割込み受付信号INTが“1”の
ときリセットされる。
Also, when the output HLT of the instruction decoder is “1”, 5C
The RS flip-flop 58 is set at KB timing. Further, the RS flip-flop 58 is reset when the interrupt acceptance signal INT from the interrupt processing device (not shown) is "1".

第7図は周辺装置でRDY信号を発生させるための回路
を示している。PRD、PWR信号はオアゲート71を
介して立上がり検出器72に入力される。立上がり検出
器72にはSCKをインバータ73でレベルを反転した
信号(従って5CKBと同じ信号)がクロックとして人
力されている。従って、周辺装置のアクセス開始時にP
WRとPRDが“0”から“1”へ変化した時、立上が
り検出器72は5CKBの1周期間、“1′″のパルス
を出力して、RSフリップフロップ74をリセットする
FIG. 7 shows a circuit for generating the RDY signal in a peripheral device. The PRD and PWR signals are input to a rise detector 72 via an OR gate 71. A signal obtained by inverting the level of SCK by an inverter 73 (therefore, the same signal as 5CKB) is input to the rising edge detector 72 as a clock. Therefore, when the peripheral device starts accessing, P
When WR and PRD change from "0" to "1", the rising edge detector 72 outputs a pulse of "1'" for one cycle of 5 CKB to reset the RS flip-flop 74.

すると、RSフリップフロップ74の出力は“0″′と
なる。周辺装置のアクセス終了時には周辺装置の所定の
タイミングでセット信号が出力される。
Then, the output of the RS flip-flop 74 becomes "0"'. When the access of the peripheral device is completed, a set signal is outputted at a predetermined timing of the peripheral device.

このセット信号は、SCKをインバータ73で反転した
信号とともにアンドゲート75に入力され、その出力が
RSフリップフロップに入力されるために、5CKBタ
イミングでRSフリップフロップ74がセットされる。
This set signal is input to the AND gate 75 together with a signal obtained by inverting SCK by the inverter 73, and the output thereof is input to the RS flip-flop, so that the RS flip-flop 74 is set at the 5CKB timing.

従って、RDY信号は“1″となる。Therefore, the RDY signal becomes "1".

次に周辺装置をCPUがアクセスする場合の各部の動作
を第4図と第6図に示すタイミング図を用いて説明する
。周辺装置をアクセスする命令としては、RAM23の
内部のAレジスタと命令コードに含まれるアドレスで指
定される周辺装置内のPHDTレジスタの内容との加算
を行いその結果をAレジスタに書込む命令(以降“AD
D  A。
Next, the operation of each part when the CPU accesses the peripheral device will be explained using the timing diagrams shown in FIGS. 4 and 6. An instruction to access a peripheral device is an instruction to add the contents of the A register in the RAM 23 and the contents of the PHDT register in the peripheral device specified by the address included in the instruction code, and write the result to the A register (hereinafter). “A.D.
DA.

PHDT命令″′という)を考える。ADD  A。Consider the PHDT instruction (referred to as ``'').ADD A.

PHDT命令はMl、M2、M3、M4、の4マシンサ
イクルから構成される。
The PHDT instruction consists of four machine cycles: M1, M2, M3, and M4.

M1マシンサイクルでは5LASSLTA、RD倍信号
出力される。SLA信号によりRAM23内のAレジス
タが指定される。RD倍信号よりデータがRA M23
より読出される。5LTA信号により読み出されたデー
タがTA26に書込まれる。
In the M1 machine cycle, 5LASSLTA and RD times the signal are output. The A register in RAM 23 is specified by the SLA signal. Data is RAM23 from RD double signal
It is read from. The data read by the 5LTA signal is written to TA26.

M2マシンサイクルでは5LTB信号が出力されて、P
HDTを指定するアドレスであるROM21の出力がT
B27に書込まれる。同時にAOP信号によりTB27
の内容がA L U28を通過する指定が行なわれるた
め、M3マシンサイクルのCCKタイミングでPHDT
のアドレスがアドレスバス35に出力される。
In the M2 machine cycle, the 5LTB signal is output and P
The output of ROM21, which is the address that specifies the HDT, is T.
Written to B27. At the same time, TB27 is activated by AOP signal.
Since the contents of the PHDT are specified to pass through the ALU28, the PHDT is passed at the CCK timing of the M3 machine cycle.
The address is output to the address bus 35.

次にM3マシンサイクルでは周辺装置12のPHDTレ
ジスタのアクセスが行なわれる。PHDTレジスタのア
クセスにはT1〜T6の6サイクルが必要である。M3
マシンサイクルではアドレスバス35の内容によりPH
DTが指定される。また、SLM信号、PRD信号、5
LTB信号が出力され、AOP信号は加算を指定する。
Next, in the M3 machine cycle, the PHDT register of the peripheral device 12 is accessed. Accessing the PHDT register requires six cycles from T1 to T6. M3
In the machine cycle, the PH is determined by the contents of the address bus 35.
DT is specified. In addition, SLM signal, PRD signal, 5
The LTB signal is output, and the AOP signal specifies addition.

すると、クロック制御回路30が第4図に示すようにク
ロック制御を行う。
Then, the clock control circuit 30 performs clock control as shown in FIG.

SLM信号が“0”から“1”に変化するため、アンド
回路47の出力はM3ステートのT1サイクルに“1”
となる。するとラッチ50の出力が“1”となるため、
CCKは“1”、CCKBは“0”となる。またT1サ
イクルの5CKBタイミングでラッチ50の出力が1と
なるため、インバータ55の出力は“0”となる。従っ
′CCCKSはT1サイクルのSCKタイミングで出力
された後゛0”となる。このことによりPHDTのアド
レスがTR29にラッチされ、アドレスバス35に出力
される。
Since the SLM signal changes from "0" to "1", the output of the AND circuit 47 becomes "1" in the T1 cycle of the M3 state.
becomes. Then, the output of the latch 50 becomes “1”, so
CCK becomes "1" and CCKB becomes "0". Further, since the output of the latch 50 becomes 1 at the 5CKB timing of the T1 cycle, the output of the inverter 55 becomes "0". Therefore, 'CCCKS' becomes '0' after being output at the SCK timing of the T1 cycle.As a result, the address of the PHDT is latched in the TR29 and output to the address bus 35.

M3マシンサイクルではPRD信号が“0”から1”に
変化するためRSフリップフロップ74が5CKBタイ
、ミングでリセットされ、RDY信号が“0”となる。
In the M3 machine cycle, the PRD signal changes from "0" to "1", so the RS flip-flop 74 is reset at the 5CKB timing, and the RDY signal becomes "0".

T2サイクルではRDY信号がパ0”のため、ラッチ5
0.51の出力が1”となる。従って、CCKは“1”
、CCKBは“0”、CCKSは“0”となる。この状
態はその後T3、T4サイクルでも同様である。
In the T2 cycle, the RDY signal is 0'', so latch 5
The output of 0.51 becomes “1”. Therefore, CCK is “1”
, CCKB becomes "0", and CCKS becomes "0". This state remains the same in subsequent T3 and T4 cycles.

T5サイクルは、PHDTレジスタのアクセスが完了す
るT6サイクルの1サイクル前である。
The T5 cycle is one cycle before the T6 cycle when access to the PHDT register is completed.

このT5サイクルでは、RSフリップフロップ74のセ
ット信号が周辺装置より出力され、5CKBタイミング
でRDY信号が“1”となる。すると、オアゲート49
の出力は“0”となる。
In this T5 cycle, the set signal of the RS flip-flop 74 is output from the peripheral device, and the RDY signal becomes "1" at the 5CKB timing. Then, or gate 49
The output of is "0".

T6サイクルではPHDTレジスタの内容がPRD信号
により周辺装置からデータバス34に読出される。また
、ラッチ50の出力は “0”となるためCCK、CC
KS、CCKBはSCK。
In the T6 cycle, the contents of the PHDT register are read from the peripheral device onto the data bus 34 by the PRD signal. In addition, since the output of the latch 50 becomes “0”, CCK and CC
KS, CCKB is SCK.

SCK、5CKBと同様の動作となる。その結果、T6
サイクルのCCKBタイミングでデータバス34上のP
HDTレジスタの内容がTB27に書込まれる。
The operation is similar to SCK and 5CKB. As a result, T6
P on the data bus 34 at the CCKB timing of the cycle.
The contents of the HDT register are written to TB27.

M4マシンサイクルではSLA、WR倍信号出力される
。TA26とTB27の内容がΔLU28で加算された
結果がTR29を介してRAM23内のAレジスタに書
込まれる。
In the M4 machine cycle, SLA and WR multiplied signals are output. The contents of TA26 and TB27 are added by ΔLU28 and the result is written to the A register in RAM 23 via TR29.

以上でADD  A、PHDT命令は完了するが、M3
マシンサイクルでCPUはT1〜T5サイクルまでは何
も実行せずに停止していることになる。
This completes the ADD A and PHDT commands, but M3
In the machine cycle, the CPU is stopped without executing anything from T1 to T5 cycles.

すなわちCPUの停止状態をクロックを停止することで
実現している。
In other words, the stopped state of the CPU is realized by stopping the clock.

また、TR29の書込みクロックにはCCKSクロック
を用いている。その理由は以下のようなものである。A
 L [J28はダイナミック回路で構成されていてC
CKタイミングでサンプリングされる。
Furthermore, the CCKS clock is used as the write clock for the TR29. The reason is as follows. A
L [J28 is composed of a dynamic circuit and C
Sampled at CK timing.

従って、CCK、&M3マシンサイクルのT1〜T5サ
イクルのように“′1”で停止するとその間サンプリン
グ状態となってしまう。サンプリング状態が長くなると
ダイナミック回路の出力を保持できなくなってしまい、
ALLIの出力が不定となる。  、もしTR29をC
CKで書込みを行なっておりTRの人力が不定となると
不定人力によりCM OSデバイス特有のいわゆる貫通
電流が流れむだな電力を消費することになる。従って、
TR29の書込み信号としてCPUが停止してCCKが
“l”の間は出力されないCCKSを用いている。
Therefore, if it is stopped at "'1" like cycles T1 to T5 of the CCK, &M3 machine cycles, it will be in the sampling state during that time. When the sampling state becomes long, it becomes impossible to hold the output of the dynamic circuit,
The output of ALLI becomes undefined. , if TR29 is C
When writing is performed using CK and the human power of the TR becomes undefined, a so-called through current peculiar to CMOS devices flows due to the undefined human power, resulting in wasted power consumption. Therefore,
CCKS, which is not output while the CPU is stopped and CCK is "L", is used as the write signal for TR29.

次にHALTモード時のCPUの停止について第8図を
用いて説明する。HALT命令が実行されるとHLT信
号が命令デコーダ22から出力される。すると次のマシ
ンサイクルでラッチ50の出力が“1”となるためCC
Kは“1″となりCPUが停止し、HALTモードとな
る。HALTモード中に割込み要求信号INTが人力さ
れると5CKBタイミングでRSフリップフロップ58
がリセットされ出力が“0”となる。すると次のマシン
サイクルのSCKタイミングからラッチ50の出力が“
0”となりCCK、CCKB、CCKSが正常に出力さ
れるようになる。従ってHALTモード時もCPUのク
ロックを停止することでCPLIを停止状態にする。
Next, stopping the CPU in HALT mode will be explained using FIG. 8. When the HALT command is executed, the HLT signal is output from the command decoder 22. Then, in the next machine cycle, the output of latch 50 becomes “1”, so CC
K becomes "1", the CPU stops, and enters HALT mode. When the interrupt request signal INT is input manually during HALT mode, the RS flip-flop 58 is activated at the 5CKB timing.
is reset and the output becomes "0". Then, from the SCK timing of the next machine cycle, the output of the latch 50 becomes “
0'' and CCK, CCKB, and CCKS are output normally. Therefore, even in the HALT mode, by stopping the CPU clock, the CPLI is brought into a stopped state.

発明の詳細 な説明したように、本発明によれば、低速周辺装置をア
クセスする場合やスタンバイ機能のHΔLTモードを実
現する場合、ともにCPUのクロックを停止させるとい
う同一の方法でCPLIを停止状態にすることができる
。従ってCPUの停止状態制御が容易になり制御回路構
成が簡単となる。その結果マイクロコンピュータの価格
を安くできるという大きな効果がある。
As described in detail, according to the present invention, when accessing a low-speed peripheral device or realizing the standby function HΔLT mode, the CPLI is stopped by the same method of stopping the CPU clock. can do. Therefore, the stop state control of the CPU is facilitated, and the control circuit configuration is simplified. As a result, this has the great effect of reducing the price of microcomputers.

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

第1図は本発明によるマイクロコンピュータのCPUの
詳細図、 第2図はCPUと周辺装置のインターフェース図、 第3図は本発明のクロック制御回路図、第4図は本発明
のクロック制御回路のタイミング図、 第5図はALUのタイミング図、 第6図はADD  A、PHDT命令のタイミング図、 第7図は本発明のRDY信号発生回路図、第8図はHA
LTモードの詳細なタイミング図、第9図は従来の周辺
装置のアクセスタイミング図、 第10図は従来のHALTモードタイミング図である。 (主な参照番号) 11・・CPLJ、   12・・周辺装置、21・・
ROM、   22・・命令デコーダ、23・・RAM
。 24、25.31.32.47.4B、 52.54.
75・・アンドゲート、 26、27.29・・テンポラリレジスタ、28・・A
LU (算術論理ユニット)、30・・クロック制御回
路、 34・・データバス、35・・アドレスバス、41・・
発振器、 42・・分周器、 43、 46.55.56.57.73・・インバータ
、44、45.50.51・・ラッチ、 49、53.71・・オアゲート、 58、74・・RSフリップフロップ、72・・立上が
り検出器
FIG. 1 is a detailed diagram of the CPU of the microcomputer according to the present invention, FIG. 2 is an interface diagram between the CPU and peripheral devices, FIG. 3 is a clock control circuit diagram of the present invention, and FIG. 4 is a diagram of the clock control circuit of the present invention. Timing diagram: Figure 5 is a timing diagram of ALU; Figure 6 is a timing diagram of ADD A and PHDT instructions; Figure 7 is a diagram of the RDY signal generation circuit of the present invention; Figure 8 is a diagram of HA
9 is a detailed timing diagram of the LT mode, FIG. 9 is an access timing diagram of a conventional peripheral device, and FIG. 10 is a conventional HALT mode timing diagram. (Main reference numbers) 11...CPLJ, 12...Peripheral device, 21...
ROM, 22...Instruction decoder, 23...RAM
. 24, 25.31.32.47.4B, 52.54.
75...And gate, 26, 27.29...Temporary register, 28...A
LU (arithmetic logic unit), 30...clock control circuit, 34...data bus, 35...address bus, 41...
Oscillator, 42... Frequency divider, 43, 46.55.56.57.73... Inverter, 44, 45.50.51... Latch, 49, 53.71... OR gate, 58, 74... RS Flip-flop, 72...rise detector

Claims (1)

【特許請求の範囲】[Claims] プログラム及びデータを記憶するメモリと、プログラム
を実行する中央処理装置(CPU)と、該CPUの周辺
装置とから構成されるマイクロコンピュータにおいて、
前記CPUが前記周辺装置にデータを書込むマシンサイ
クルもしくは該周辺装置からデータを読出すマシンサイ
クルの開始を検出し、該CPUの動作を該周辺装置の動
作に同期させるレディ信号を発生するレディ信号発生装
置と、前記レディ信号もしくは前記CPUがプログラム
を実行することにより発生するCPU停止信号を検出し
て該CPUの動作クロックをハイまたはロウのいずれか
一方のレベルに固定するクロック制御装置とをさらに備
えることを特徴とするマイクロコンピュータ。
In a microcomputer consisting of a memory that stores programs and data, a central processing unit (CPU) that executes the programs, and peripheral devices of the CPU,
a ready signal that detects the start of a machine cycle in which the CPU writes data to the peripheral device or a machine cycle in which the CPU reads data from the peripheral device, and generates a ready signal to synchronize the operation of the CPU with the operation of the peripheral device; and a clock control device that detects the ready signal or a CPU stop signal generated by the CPU executing a program and fixes the operating clock of the CPU to either a high or low level. A microcomputer characterized by comprising:
JP61064347A 1986-03-20 1986-03-20 Microcomputer Granted JPS62221061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61064347A JPS62221061A (en) 1986-03-20 1986-03-20 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61064347A JPS62221061A (en) 1986-03-20 1986-03-20 Microcomputer

Publications (2)

Publication Number Publication Date
JPS62221061A true JPS62221061A (en) 1987-09-29
JPH0568750B2 JPH0568750B2 (en) 1993-09-29

Family

ID=13255615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61064347A Granted JPS62221061A (en) 1986-03-20 1986-03-20 Microcomputer

Country Status (1)

Country Link
JP (1) JPS62221061A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02500938A (en) * 1987-08-27 1990-03-29 モトローラ・インコーポレーテツド microcomputer
JPH02127787A (en) * 1988-11-07 1990-05-16 Yaskawa Electric Mfg Co Ltd External ready circuit
US5469561A (en) * 1988-05-27 1995-11-21 Seiko Epson Corporation Apparatus and method for controlling the running of a data processing apparatus
JP2005528664A (en) * 2001-09-19 2005-09-22 フリースケール セミコンダクター インコーポレイテッド CPU power-down method and apparatus therefor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02500938A (en) * 1987-08-27 1990-03-29 モトローラ・インコーポレーテツド microcomputer
US5469561A (en) * 1988-05-27 1995-11-21 Seiko Epson Corporation Apparatus and method for controlling the running of a data processing apparatus
JPH02127787A (en) * 1988-11-07 1990-05-16 Yaskawa Electric Mfg Co Ltd External ready circuit
JP2005528664A (en) * 2001-09-19 2005-09-22 フリースケール セミコンダクター インコーポレイテッド CPU power-down method and apparatus therefor

Also Published As

Publication number Publication date
JPH0568750B2 (en) 1993-09-29

Similar Documents

Publication Publication Date Title
JPS62221061A (en) Microcomputer
US6618790B1 (en) Burst suspend and resume with computer memory
JPH01256093A (en) Register file
US5163135A (en) Computer system and method for setting recovery time upon execution of an I/O command
JPH0143392B2 (en)
JP2784001B2 (en) Instruction processing circuit of programmable controller
JPS59739A (en) Time assurance system in microprogram processor
JPS6049337B2 (en) Pipeline control method
JPH0542525Y2 (en)
JP2960110B2 (en) RISC processor system
JPS6295644A (en) Program debugging device for microprocessor
JPS6258348A (en) Memory control integrated circuit
JP3027765B2 (en) Time mechanism controller
JPS62174832A (en) Information processor
JP2536102B2 (en) Data processing device
JP2001184304A (en) Automatic command packet receiving sequence circuit
JPS61165120A (en) Dynamic control system of clock pulse width
JPH0218746B2 (en)
JPS60151748A (en) Microprogram controller
JPS63228368A (en) Fast floating-point processor
JPH0158528B2 (en)
JPH04191938A (en) Information processing system
JPS61175834A (en) Data processor provided with microprogram debug function
JPH0222414B2 (en)
JPH04140838A (en) Information processor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term