JPH05258082A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH05258082A
JPH05258082A JP4014933A JP1493392A JPH05258082A JP H05258082 A JPH05258082 A JP H05258082A JP 4014933 A JP4014933 A JP 4014933A JP 1493392 A JP1493392 A JP 1493392A JP H05258082 A JPH05258082 A JP H05258082A
Authority
JP
Japan
Prior art keywords
clock
refresh
output
input
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4014933A
Other languages
Japanese (ja)
Inventor
Akita Hara
明大 原
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 JP4014933A priority Critical patent/JPH05258082A/en
Publication of JPH05258082A publication Critical patent/JPH05258082A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To provide a computer in which one kind of clock is used for both a CPU and a refresh counter, and a refresh cycle is not affected even at the time of changing only a CPU clock. CONSTITUTION:A clock 101 is frequency-divided by a clock frequency-divider 12, and frequency-division clocks 102-104 are outputted and inputted to a three- input selector 13. The output 106 of a clock selection register 15 is inputted to the selector 13, one of the frequency-division clocks 102-104 is selected, and inputted to a clock driver 14 and a CPU 11. The writing of the output 109 of the CPU 11 is operated to a refresh interval setting register 16, and the output 110 of the register 16 is inputted and loaded to a refresh counter 17. A clock 108 is divided by the counter 17, refresh output signals 112-114 are outputted, one of them is selected by a three-input selector 18 after a clock selection register output signal 111 is received, and a refresh signal 115 is outputted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマイクロコンピュータに
関し、特に、リフレッシュ周期を計時するリフレッシュ
インターバルタイマを備えたマイクロコンピュータに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a microcomputer provided with a refresh interval timer for measuring a refresh cycle.

【0002】[0002]

【従来の技術】従来の、この種のマイクロコンピュータ
においては、外部より入力されるクロックを分周するク
ロックジェネレータが設けられており、唯一系統のクロ
ックをCPUクロックおよびリフレッシュカウンタ用ク
ロックとして使用しているのが一般である。
2. Description of the Related Art In a conventional microcomputer of this type, a clock generator for dividing a clock input from the outside is provided, and only one system clock is used as a CPU clock and a refresh counter clock. It is common to have

【0003】図3に示されるのは従来のマイクロコンピ
ュータのブロック図であり、CPU31、クロック分周
器32、3入力セレクタ33、クロックドライバ34、
クロック選択レジスタ35、リフレッシュインターバル
設定レジスタ36およびリフレッシュカウンタ37等を
備えて構成されており、外部より入力されるクロック3
01は、クロック分周器32において分周され、分周ク
ロック302、303および304として3入力セレク
タ33に入力される。3入力セレクタ33に対しては、
CPU出力305を介してクロック選択レジスタ35よ
り出力されるクロック選択信号306が入力されてお
り、このクロック選択信号306を介して、分周クロッ
ク302、303および304の内の一つの分周クロッ
クが選択されて、クロックドライバ34を介してCPU
31に入力される。また、クロックドライバ34より出
力されるクロック308はリフレッシュカウンタ37に
も入力されており、このリフレッシュカウンタ37より
は、所定のリフレッシュ信号318が出力される。
FIG. 3 is a block diagram of a conventional microcomputer, which includes a CPU 31, a clock frequency divider 32, a 3-input selector 33, a clock driver 34,
A clock selection register 35, a refresh interval setting register 36, a refresh counter 37, etc.
01 is frequency-divided in the clock frequency divider 32 and is input to the 3-input selector 33 as frequency-divided clocks 302, 303 and 304. For the 3-input selector 33,
The clock selection signal 306 output from the clock selection register 35 is input via the CPU output 305, and one of the divided clocks 302, 303, and 304 is supplied via this clock selection signal 306. Selected, CPU via clock driver 34
31 is input. The clock 308 output from the clock driver 34 is also input to the refresh counter 37, and the refresh counter 37 outputs a predetermined refresh signal 318.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のマイク
ロコンピュータにおいては、例えば、図3に示されるよ
うな構成がとられる場合には、CPUに対する入力クロ
ック自体を変更した場合には、リフレッシュインターバ
ルをも変更することになるために、同時にリフレシュイ
ンターバル設定レジスタの値も変更することが必要とな
り、プログラム設計上不要なレジスタコールを行うこと
となって極めて非効率的であり、且つまた、プログラム
ミスを誘発し易いという欠点がある。
In the conventional microcomputer described above, for example, when the configuration shown in FIG. 3 is adopted, the refresh interval is set when the input clock itself to the CPU is changed. Therefore, it is necessary to change the value of the refresh interval setting register at the same time, which makes register calls unnecessary for program design, which is extremely inefficient. It has the drawback of being easy to induce.

【0005】[0005]

【課題を解決するための手段】本発明のマイクロコンピ
ュータは、CPUに入力されるクロックの分周比を選択
するクロック選択レジスタと、前記クロック選択レジス
タにより指定される分周比により前記クロックの分周を
行う分周器と、ダイナミックメモリをリフレッシュする
ために、リフレッシュインターバルを設定するリフレッ
シュインターバル設定レジスタと、前記リフレッシュイ
ンターバル設定レジスタの指定により、リフレッシュイ
ンターバルを、前記分周器から出力されるクロックをカ
ウントクロックして計時するリフレッシュカウンタと、
前記クロック選択レジスタの指定に応じて、前記リフレ
ッシュカウンタの分周出力を選択して出力するセレクタ
とを備えて構成される。
A microcomputer according to the present invention is a clock selection register for selecting a division ratio of a clock input to a CPU, and a division ratio of the clock according to a division ratio specified by the clock selection register. The frequency divider that performs frequency division, the refresh interval setting register that sets the refresh interval to refresh the dynamic memory, and the refresh interval that is specified by the refresh interval setting register, and the clock output from the frequency divider. A refresh counter that counts with a count clock,
And a selector for selecting and outputting the divided output of the refresh counter according to the designation of the clock selection register.

【0006】[0006]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0007】図1は本発明の第1の実施例を示すブロッ
ク図である。図1に示されるように、本実施例は、CP
U11と、クロック分周器12と、3入力セレクタ13
および18と、クロックドライバ14と、クロック選択
レジスタ15と、リフレッシュインターバル設定レジス
タ16と、リフレッシュカウンタ17とを備えて構成さ
れる。
FIG. 1 is a block diagram showing a first embodiment of the present invention. As shown in FIG. 1, this embodiment uses CP
U11, clock divider 12, and 3-input selector 13
And 18, a clock driver 14, a clock selection register 15, a refresh interval setting register 16, and a refresh counter 17.

【0008】図1において、外部より入力されるクロッ
ク101は、クロック分周器12に入力されて分周さ
れ、分周クロック102、103および104が出力さ
れて3入力セレクタ13に入力される。3入力セレクタ
13に対しては、CPU出力105を介してクロック選
択レジスタ15より出力されるクロック選択信号106
が入力されており、このクロック選択信号106を介し
て、分周クロック102、103および104の内の一
つの分周クロックが選択されて、クロックドライバ14
を介してCPU11に入力される。また、クロックドラ
イバ14より出力されるクロック108はリフレッシュ
カウンタ17にも入力されている。
In FIG. 1, an externally input clock 101 is input to a clock frequency divider 12 for frequency division, and frequency-divided clocks 102, 103 and 104 are output and input to a 3-input selector 13. For the 3-input selector 13, the clock selection signal 106 output from the clock selection register 15 via the CPU output 105.
Is input, and one of the divided clocks 102, 103, and 104 is selected via the clock selection signal 106, and the clock driver 14 is selected.
Is input to the CPU 11 via. The clock 108 output from the clock driver 14 is also input to the refresh counter 17.

【0009】また、リフレッシュインターバル設定レジ
スタ16に対しては、CPU出力109の書込みが行わ
れるが、このリフレッシュインターバル設定レジスタ1
6の出力110は、8段のリフレッシュカウンタ17に
入力されて、その内容がロードされる。このリフレッシ
ュカウンタ17においては、クロック108が最大25
6分割されて、所定のリフレッシュカウンタ出力信号1
12(256分周出力)、113(128分周出力)お
よび114(64分周出力)として出力され、それぞれ
3入力セレクタ18に入力される。3入力セレクタ18
においては、クロック選択レジスタ15のクロック選択
レジスタ出力信号111を受けて、上記の三つのリフレ
ッシュカウンタ出力信号112、113および114の
内の一つの信号が選択され、リフレッシュ信号115と
して出力される。その際において、分周クロック10
2、103および104と、リフレッシュカウンタ出力
信号112、113および114との関係については、
分周クロック102とリフレッシュカウンタ出力信号1
14、分周クロック103とリフレッシュカウンタ出力
信号113、分周クロック104とリフレッシュカウン
タ出力信号112というペアの形で選択されるように、
クロック選択レジスタ出力信号111がクロック選択レ
ジスタ15より出力される。
Further, the CPU output 109 is written to the refresh interval setting register 16, but this refresh interval setting register 1
The output 110 of 6 is input to the 8-stage refresh counter 17 and the content thereof is loaded. In the refresh counter 17, the clock 108 is 25 at maximum.
Predetermined refresh counter output signal 1 divided into 6
12 (256 frequency division output), 113 (128 frequency division output) and 114 (64 frequency division output) are output and input to the 3-input selector 18, respectively. 3-input selector 18
In response to the clock selection register output signal 111 of the clock selection register 15, one of the three refresh counter output signals 112, 113 and 114 is selected and output as the refresh signal 115. At that time, the divided clock 10
2, 103 and 104 and the refresh counter output signals 112, 113 and 114,
Divided clock 102 and refresh counter output signal 1
14, divided clock 103 and refresh counter output signal 113, divided clock 104 and refresh counter output signal 112 are selected in the form of pairs,
The clock selection register output signal 111 is output from the clock selection register 15.

【0010】このような構成がとられる場合に、例え
ば、CPU11に対して1/2倍のクロックが選択され
て入力され、リフレッシュインターバル設定レジスタ1
6に対して0が設定されている時に、CPU11に対す
るクロックを1/8倍に変更する場合の動作について以
下に説明する。
When such a configuration is adopted, for example, 1/2 times the clock is selected and input to the CPU 11, and the refresh interval setting register 1
The operation when the clock for the CPU 11 is changed to 1/8 times when 0 is set for 6 will be described below.

【0011】CPU11よりクロック選択レジスタ15
に対する書込みが行われると、3入力セレクタ13にお
いては、分周クロック103が選択されて、クロック1
07としてクロックドライバ14に入力される。このク
ロック107はクロックドライバ14を介してCPU1
1に入力されるとともに、リフレッシュカウンタ17に
も入力される。一方、クロック選択レジスタ15の出力
111は、3入力セレクタ18に入力されており、これ
により、クロック選択レジスタ15においては、リフレ
ッシュ信号114が選択されて、リフレッシュ信号11
5として出力されるが、このリフレッシュ信号115
は、CPU11に対するクロック分周数変更前と同一に
保持されている。また逆に、クロック分周数を1/8か
ら1/2に変更する場合には、3入力セレクタ18にお
いては、リフレッシュ信号112を選択することによ
り、やはりリフレッシュ信号115の出力は、クロック
分周数変更前と同一に保持されている。
Clock selection register 15 from CPU 11
When the write is performed on the divided clock 103, the divided clock 103 is selected in the 3-input selector 13, and the clock 1
It is input to the clock driver 14 as 07. This clock 107 is sent to the CPU 1 via the clock driver 14.
In addition to being input to 1, the refresh counter 17 is also input. On the other hand, the output 111 of the clock selection register 15 is input to the 3-input selector 18, whereby the refresh signal 114 is selected in the clock selection register 15 and the refresh signal 11 is selected.
5, the refresh signal 115 is output.
Are held the same as before the change of the clock division number for the CPU 11. On the contrary, when the clock division number is changed from ⅛ to ½, in the 3-input selector 18, the refresh signal 112 is selected so that the output of the refresh signal 115 is also the clock division number. It is kept the same as before the number change.

【0012】次に、図2は本発明の第2の実施例を示す
ブロック図である。図2に示されるように、本実施例
は、CPU21と、クロック分周器22と、3入力セレ
クタ23および28と、クロックドライバ24と、クロ
ック選択レジスタ25と、リフレッシュインターバル設
定レジスタ26と、リフレッシュカウンタ27と、クロ
ックマスタレジスタ29とを備えて構成される。
Next, FIG. 2 is a block diagram showing a second embodiment of the present invention. As shown in FIG. 2, in this embodiment, the CPU 21, the clock divider 22, the 3-input selectors 23 and 28, the clock driver 24, the clock selection register 25, the refresh interval setting register 26, and the refresh It comprises a counter 27 and a clock master register 29.

【0013】図2および図1の対比により明らかなよう
に、本実施例の第1の実施例との相違点は、クロックマ
スクレジスタ29が付加されたことである。このクロッ
クマスクレジスタ29の機能と直接に関わりのない構成
要素の動作については、前述の第1の実施例の場合と同
様である。
As is clear from the comparison between FIGS. 2 and 1, the difference between this embodiment and the first embodiment is that the clock mask register 29 is added. The operation of the constituent elements not directly related to the function of the clock mask register 29 is the same as in the case of the first embodiment described above.

【0014】図2において、外部より入力されるクロッ
ク201は、クロック分周器22に入力されて分周さ
れ、分周クロック202、203および204が出力さ
れて3入力セレクタ23に入力される。3入力セレクタ
23に対しては、CPU出力205を介してクロック選
択レジスタ25より出力されるクロック選択信号206
が入力されており、このクロック選択信号206を介し
て、分周クロック202、203および204の内の一
つの分周クロックが選択されて、クロックドライバ24
を介してCPU21に入力される。また、クロックドラ
イバ24より出力されるクロック208はリフレッシュ
カウンタ27にも入力されている。
In FIG. 2, an externally input clock 201 is input to a clock frequency divider 22 for frequency division, frequency-divided clocks 202, 203 and 204 are output and input to a 3-input selector 23. For the 3-input selector 23, the clock selection signal 206 output from the clock selection register 25 via the CPU output 205.
Is input, and one of the divided clocks 202, 203, and 204 is selected via the clock selection signal 206, and the clock driver 24
Is input to the CPU 21 via. The clock 208 output from the clock driver 24 is also input to the refresh counter 27.

【0015】また、リフレッシュインターバル設定レジ
スタ26に対しては、CPU出力209の書込みが行わ
れるが、このリフレッシュインターバル設定レジスタ2
6の出力210は、8段のリフレッシュカウンタ27に
入力されて、その内容がロードされる。このリフレッシ
ュカウンタ27においては、クロック108が最大25
6分割されて、所定のリフレッシュカウンタ出力信号2
12(256分周出力)、213(128分周出力)お
よび214(64分周出力)として出力され、それぞれ
3入力セレクタ28に入力される。
The CPU output 209 is written to the refresh interval setting register 26. The refresh interval setting register 2
The output 210 of 6 is input to the eight-stage refresh counter 27 and the contents thereof are loaded. In the refresh counter 27, the clock 108 is 25 at maximum.
It is divided into 6 and a predetermined refresh counter output signal 2
12 (256 frequency division output), 213 (128 frequency division output) and 214 (64 frequency division output) are output and input to the 3-input selector 28, respectively.

【0016】一方、クロックマスタレジスタ29におい
ては、CPU21からの出力217が書込まれると、ク
ロック選択レジスタ25の出力信号216の入力はマス
クされ、クロックマスクレジスタ29より出力される信
号218を介して、3入力セレクタ28において、上記
のリフレッシュカウンタ出力信号212、213および
214の内の一つの信号が選択され、リフレッシュ信号
215として出力される。この場合、クロックマスクレ
ジスタが設定されている状態においては、CPU21の
動作と、リフレッシュカウンタ27に入力されるクロッ
クとは同一となるように作用する。
On the other hand, in the clock master register 29, when the output 217 from the CPU 21 is written, the input of the output signal 216 of the clock selection register 25 is masked and the signal 218 output from the clock mask register 29 is masked. In the 3-input selector 28, one of the refresh counter output signals 212, 213 and 214 is selected and output as the refresh signal 215. In this case, when the clock mask register is set, the operation of the CPU 21 and the clock input to the refresh counter 27 work in the same manner.

【0017】なお、このクロックマスクレジスタ29に
より作用以外の動作については、全て、第1の実施例の
場合と同様である。
The operation other than the operation by the clock mask register 29 is the same as that of the first embodiment.

【0018】[0018]

【発明の効果】以上説明したように、本発明は、CPU
と内部のリフレッシュカウンタのカウントクロックに同
一クロックを使用しつつ、CPUのみに異なる周波数で
動作させる指定を一度の入出力命令により実行すること
が可能となり、プログラム設計を効率化することが可能
になるという効果ととともに、設定ミスによるダイナミ
ックメモリの内容の破壊を、未然に防止することができ
るという副次的効果がある。
As described above, the present invention provides a CPU
While using the same clock as the count clock of the internal refresh counter, it is possible to execute the instruction to operate only at the CPU at different frequencies with one input / output instruction, which makes it possible to improve the efficiency of program design. In addition to the above effect, there is a secondary effect that it is possible to prevent destruction of the contents of the dynamic memory due to a setting mistake.

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

【図1】本発明の第1の実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】本発明の第2の実施例を示すブロック図であ
る。
FIG. 2 is a block diagram showing a second embodiment of the present invention.

【図3】従来例を示すブロック図である。FIG. 3 is a block diagram showing a conventional example.

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

11、21、22 CPU 12、22、23 クロック分周器 13、18、23、28、33 3入力セレクタ 14、24、34 クロックドライバ 15、25、35 クロック選択レジスタ 16、26、36 リフレッシュインターバル設定レ
ジスタ 17、27、37 リフレッシュカウンタ 29 クロックマスタレジスタ
11, 21, 22 CPU 12, 22, 23 Clock divider 13, 18, 23, 28, 33 3 Input selector 14, 24, 34 Clock driver 15, 25, 35 Clock selection register 16, 26, 36 Refresh interval setting Registers 17, 27, 37 Refresh counter 29 Clock master register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 CPUに入力されるクロックの分周比を
選択するクロック選択レジスタと、 前記クロック選択レジスタにより指定される分周比によ
り前記クロックの分周を行う分周器と、 ダイナミックメモリをリフレッシュするために、リフレ
ッシュインターバルを設定するリフレッシュインターバ
ル設定レジスタと、 前記リフレッシュインターバル設定レジスタの指定によ
り、リフレッシュインターバルを、前記分周器から出力
されるクロックをカウントクロックして計時するリフレ
ッシュカウンタと、 前記クロック選択レジスタの指定に応じて、前記リフレ
ッシュカウンタの分周出力を選択して出力するセレクタ
と、 を備えることを特徴とするマイクロコンピュータ。
1. A clock selection register for selecting a division ratio of a clock input to a CPU, a divider for dividing the clock according to a division ratio specified by the clock selection register, and a dynamic memory. A refresh interval setting register for setting a refresh interval for refreshing; and a refresh counter for counting the refresh interval by counting the clock output from the frequency divider by the designation of the refresh interval setting register, A microcomputer, comprising: a selector that selects and outputs a frequency-divided output of the refresh counter according to a designation of a clock selection register.
JP4014933A 1992-01-30 1992-01-30 Microcomputer Pending JPH05258082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4014933A JPH05258082A (en) 1992-01-30 1992-01-30 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4014933A JPH05258082A (en) 1992-01-30 1992-01-30 Microcomputer

Publications (1)

Publication Number Publication Date
JPH05258082A true JPH05258082A (en) 1993-10-08

Family

ID=11874773

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4014933A Pending JPH05258082A (en) 1992-01-30 1992-01-30 Microcomputer

Country Status (1)

Country Link
JP (1) JPH05258082A (en)

Similar Documents

Publication Publication Date Title
US4095268A (en) System for stopping and restarting the operation of a data processor
JPH0589261A (en) Microcomputer
JPH07281782A (en) Clock control circuit
JPH05258082A (en) Microcomputer
US5706480A (en) Memory device and method for processing digital video signal
JPH06236291A (en) Peripheral apparatuses at inside and at outside and microcomputer capable of being operated in emulation mode
JP3309186B2 (en) Channel control device
JPH0580089A (en) Timer device
KR100256230B1 (en) Timer unit with system watchdog function
JPH0619840A (en) Data processor
JP3455356B2 (en) Multi-channel timer
JPS602708B2 (en) Single-chip computer addressing scheme
JPS61136115A (en) Basic clock generating circuit of microcomputer system
JPH07129462A (en) Memory controller
JPS6260195A (en) Refresh control circuit
JPS59165145A (en) Pointer
JPH1069460A (en) Bus controller
JPH06131291A (en) Data transfer device
JPH06187065A (en) Clock switching circuit
JPH06176567A (en) Refreshing control circuit
JPH0652044A (en) Microprocessor
JPS6235137B2 (en)
JPH07219671A (en) Processor chip for parallel computer
JPH03268141A (en) Data processor
JPS62224112A (en) Multi-function timer

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000118