[go: up one dir, main page]

JP2000278117A - Count circuit - Google Patents

Count circuit

Info

Publication number
JP2000278117A
JP2000278117A JP11084039A JP8403999A JP2000278117A JP 2000278117 A JP2000278117 A JP 2000278117A JP 11084039 A JP11084039 A JP 11084039A JP 8403999 A JP8403999 A JP 8403999A JP 2000278117 A JP2000278117 A JP 2000278117A
Authority
JP
Japan
Prior art keywords
signal
output
flip
level
circuit
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.)
Withdrawn
Application number
JP11084039A
Other languages
Japanese (ja)
Inventor
Masayuki Odakawa
真之 小田川
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP11084039A priority Critical patent/JP2000278117A/en
Publication of JP2000278117A publication Critical patent/JP2000278117A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Logic Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the power consumption of a count circuit without impairing its substantial function. SOLUTION: This count circuit 111 is provided with a circuit 20 that detects whether or not initial data R3, R4 of prescribed high-order bits among initial data stored in a register 10 are all '1B' and with a clock supply control circuit 30 that inhibits supply of a clock signal CLK to flip-flop circuits 101-3, 101-4 that conduct count processing for the prescribed high-order bits when the initial data R3, R4 of prescribed high-order bits are all '1B'.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はカウント回路に関
し、特に、複数のフリップフロップから構成され、各フ
リップフロップにクロック信号が供給されてカウント動
作を行う同期式のカウント回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a counting circuit, and more particularly, to a synchronous counting circuit comprising a plurality of flip-flops, wherein a clock signal is supplied to each flip-flop to perform a counting operation.

【0002】[0002]

【従来の技術】半導体集積回路にて構成されるマイクロ
コンピュータ等の機器は様々な装置において、システム
の制御に代表されるような種々の制御等を行うために利
用されている。マイクロコンピュータがこれらの制御を
実現するためには、出力される信号のタイミングや入力
された信号の内部での処理タイミングを正確する必要が
ある。このように出力や動作のタイミングを正確にする
ため、マイクロコンピュータあるいはマイクロコンピュ
ータを構成する半導体集積回路にはカウント回路が内蔵
されている。
2. Description of the Related Art Devices such as microcomputers composed of semiconductor integrated circuits are used in various devices to perform various controls, such as system control. In order for the microcomputer to realize these controls, it is necessary to accurately adjust the timing of the output signal and the processing timing within the input signal. As described above, in order to make the output and operation timing accurate, a microcomputer or a semiconductor integrated circuit constituting the microcomputer has a built-in counting circuit.

【0003】カウント回路には、同期式カウント回路と
呼ばれるものがある。同期式カウント回路とは、例え
ば、複数のフリップフロップから構成され、各フリップ
フロップにはそれぞれクロック信号が供給される。各フ
リップフロップが各々クロック信号に応じて動作を行
う。つまり、同期式クロック回路は、各フリップフロッ
プがクロック信号に同期して動作を行うものである。
[0003] As a counting circuit, there is a so-called synchronous counting circuit. The synchronous counting circuit includes, for example, a plurality of flip-flops, and a clock signal is supplied to each flip-flop. Each flip-flop operates according to the clock signal. That is, in the synchronous clock circuit, each flip-flop operates in synchronization with the clock signal.

【0004】同期式カウント回路は、初段のフリップフ
ロップを除く、複数のフリップフロップそれぞれが前段
のフリップフロップの出力信号の変化に応じて動作する
非同期式カウント回路に比べて、動作速度が速いもので
ある。このため、高速な動作を要求されるような半導体
集積回路等には同期式カウント回路が用いられることが
多い。
[0004] The synchronous counting circuit has a higher operating speed than an asynchronous counting circuit in which each of a plurality of flip-flops except the first-stage flip-flop operates in response to a change in the output signal of the preceding flip-flop. is there. For this reason, a synchronous counting circuit is often used for a semiconductor integrated circuit or the like that requires a high-speed operation.

【0005】[0005]

【発明が解決しようとする課題】上述したように、同期
式カウント回路を構成するフリップフロップそれぞれは
クロック信号の供給に応じて動作するため、各フリップ
フロップにて消費電流が生ずることとなる。このため、
従来の同期式カウント回路は、近年における半導体集積
回路において要求される高速動作及び低消費電力化を必
ずしも満足するものではない。
As described above, since each flip-flop constituting the synchronous counting circuit operates in response to the supply of the clock signal, a current consumption occurs in each flip-flop. For this reason,
Conventional synchronous counting circuits do not always satisfy the high-speed operation and low power consumption required in recent semiconductor integrated circuits.

【0006】特に、同期式カウント回路に対してカウン
トを開始する初期値を設定可能な場合、その初期値がど
のような値であっても同期式カウント回路を構成する全
てのフリップフロップがクロック信号の供給に応じて動
作することとなる。このため、初期値によっては、動作
の必要のないフリップフロップも無用な動作することと
なる。
In particular, when an initial value at which counting is started can be set in the synchronous counting circuit, all flip-flops constituting the synchronous counting circuit receive a clock signal regardless of the initial value. It operates according to the supply of. For this reason, depending on the initial value, a flip-flop that does not need to operate may also operate unnecessarily.

【0007】例えば、4ビットの同期式カウント回路に
おいて、初期値が1110Bであるとする。なお、数値
列の後に文字Bを付したものは数値列の各数値が2進数
表示であることを意味し、数値列の最左端を最上位ビッ
ト、数値列の最右端を最下位ビットとする。
For example, it is assumed that an initial value is 1110B in a 4-bit synchronous counting circuit. The letter B added to the end of the numerical sequence means that each numerical value in the numerical sequence is represented by a binary number. The leftmost end of the numerical sequence is the most significant bit, and the rightmost end of the numerical sequence is the least significant bit. .

【0008】一般的に、同期式カウント回路はカウント
値の各ビットが全て1Bとなった時(4ビットの同期式
カウント回路であれば、カウント値が1111Bとなっ
た時)にキャリ信号を出力するものである。
Generally, a synchronous counting circuit outputs a carry signal when all the bits of the count value become 1B (when the count value becomes 1111B in the case of a 4-bit synchronous counting circuit). Is what you do.

【0009】上述のような初期値の場合には、最下位ビ
ットを1カウントすればキャリ信号を出力することな
る。この場合、最下位ビットに対するカウントを行うフ
リップフロップのみ動作させればよい。しかしながら、
従来の同期式カウント回路は、どのような初期値であっ
ても全てのフリップフロップが動作している。よって、
同期式クロック回路の消費電力が無用に増加することと
なる。
In the case of the above initial value, a carry signal is output if the least significant bit is counted by one. In this case, only the flip-flop that counts the least significant bit needs to operate. However,
In the conventional synchronous counting circuit, all flip-flops operate regardless of the initial value. Therefore,
The power consumption of the synchronous clock circuit is unnecessarily increased.

【0010】本発明は、上記のような課題を鑑みて、本
来の機能を損なうことなく、消費電力を低減することを
可能としたカウント回路を提供することを目的とする。
An object of the present invention is to provide a counting circuit capable of reducing power consumption without impairing the original function in view of the above problems.

【0011】[0011]

【課題を解決するための手段】上記目的を実現するた
め、本発明は、それぞれ初期データを格納可能なn個
(ただし、nは2以上の正の整数)のフリップフロップ
から構成され、各フリップフロップはクロック信号が供
給されることにより動作するnビットのカウント回路に
おいて、カウント回路のフリップフロップそれぞれに対
する初期データのうち、所定の上位kビット(ただし、
kはn>kの正の整数)それぞれに対する初期データが
1か否かを検出する検出回路と、検出回路の検出結果に
応じて、所定の上位ビットに対応するフリップフロップ
へのクロック信号の供給を制御するクロック供給制御回
路と、を有するものとする。
In order to achieve the above object, the present invention comprises n (where n is a positive integer of 2 or more) flip-flops each capable of storing initial data. The flip-flop operates in response to the supply of a clock signal. In the n-bit count circuit, predetermined high-order k bits (however,
k is a positive integer of n> k) a detection circuit for detecting whether or not the initial data is 1 and supply of a clock signal to a flip-flop corresponding to a predetermined upper bit in accordance with a detection result of the detection circuit And a clock supply control circuit for controlling

【0012】また、上記目的を実現するため、本発明
は、それぞれ初期データを格納可能なn個(ただし、n
は2以上の正の整数)のフリップフロップから構成さ
れ、各フリップフロップはクロック信号が供給されるこ
とにより動作するnビットのカウント回路において、カ
ウント回路のフリップフロップそれぞれに対する初期デ
ータのうち、最下位ビットに対する初期データが0か否
かを検出する検出回路と、検出回路の検出結果に応じ
て、フリップフロップそれぞれに供給するm番目(ただ
し、mはn≧mの正の整数)のフリップフロップに対す
る初期データを(mー1)番目のフロップフロップの初
期データとして供給するか否かを制御する初期データ制
御回路と、検出回路の検出結果に応じて、第1の周期で
クロックパルスを発生する第1の信号と、第1の周期の
2倍の周期でクロックパルスを発生する第2の信号との
いずれか一方をクロック信号として出力するクロック選
択回路と、を有するものとする。
Further, in order to achieve the above object, the present invention provides a method for storing n data (where n
Is a positive integer of 2 or more), and each flip-flop is an n-bit count circuit that operates when a clock signal is supplied. A detection circuit for detecting whether the initial data for the bit is 0 or not, and an m-th (where m is a positive integer of n ≧ m) flip-flop supplied to each flip-flop according to the detection result of the detection circuit. An initial data control circuit for controlling whether or not to supply the initial data as the initial data of the (m-1) -th flop, and a second circuit for generating a clock pulse in a first cycle according to a detection result of the detection circuit. 1 and a second signal that generates a clock pulse with a cycle twice as long as the first cycle. It shall have a clock selection circuit for outputting a signal.

【0013】[0013]

【発明の実施の形態】本発明のカウント回路についてを
図面を用いて以下に詳細に説明する。図1は、本発明の
第1の実施の形態におけるカウント回路の回路図であ
る。なお、図1のカウント回路は4ビットカウント回路
(10進法で16カウントするものに相当)を例に説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The counting circuit of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a circuit diagram of the count circuit according to the first embodiment of the present invention. Note that the count circuit in FIG. 1 will be described by taking a 4-bit count circuit (corresponding to one that counts 16 in decimal notation) as an example.

【0014】図1において、カウント回路111は、カ
ウント動作を行う計数部100と、検出回路20と、格
納回路としてのレジスタ10と、クロック供給制御回路
30とから構成されている。なお、レジスタ10、検出
回路20、クロック供給制御回路30それぞれはカウン
ト回路111の周辺に設けられる周辺回路としてもよい
が、ここでは、レジスタ10と検出回路20とクロック
供給制御回路30と計数部100とを、カウント回路1
11を構成する回路として説明する。
In FIG. 1, the counting circuit 111 includes a counting section 100 for performing a counting operation, a detection circuit 20, a register 10 as a storage circuit, and a clock supply control circuit 30. Note that each of the register 10, the detection circuit 20, and the clock supply control circuit 30 may be a peripheral circuit provided around the count circuit 111. However, here, the register 10, the detection circuit 20, the clock supply control circuit 30, and the counter 100 And the counting circuit 1
11 will be described.

【0015】レジスタ10は例えば、シフトレジスタあ
るいは複数の個別なフリップフロップから構成されるも
のである。このため、一時格納手段として、4つの一時
格納回路10ー1〜10ー4を有するものである。この
一時格納回路10ー1〜10ー4それぞれが、例えばフ
リップフロップからなるものである。
The register 10 is, for example, a shift register or a plurality of individual flip-flops. Therefore, it has four temporary storage circuits 10-1 to 10-4 as temporary storage means. Each of the temporary storage circuits 10-1 to 10-4 is formed of, for example, a flip-flop.

【0016】レジスタ10は、カウント回路111がカ
ウント動作を開始する初期値を格納し、出力するもので
ある。つまり、一時格納回路10ー1には初期値の最下
位ビットを初期データとして格納する。一時格納回路1
0ー2には初期値の2ビット目を初期データとして格納
する。一時格納回路10ー3には初期値の3ビット目を
初期データとして格納する。一時格納回路10ー4には
初期値の最上位ビットを初期データとして格納する。一
時格納回路10ー1〜10ー4に格納された初期データ
は、それぞれ信号R1〜R4として出力される。
The register 10 stores and outputs an initial value at which the count circuit 111 starts a count operation. That is, the least significant bit of the initial value is stored in the temporary storage circuit 10-1 as the initial data. Temporary storage circuit 1
In 0-2, the second bit of the initial value is stored as initial data. The temporary storage circuit 10-3 stores the third bit of the initial value as initial data. The temporary storage circuit 10-4 stores the most significant bit of the initial value as initial data. The initial data stored in the temporary storage circuits 10-1 to 10-4 are output as signals R1 to R4, respectively.

【0017】検出回路20は、例えば、図1に示すよう
に2入力1出力のANDゲート21から構成されてい
る。ANDゲート21には信号R3及び信号R4が入力
される。このため、信号R3及び信号R4の電位レベル
がともに電源電位レベル(以下、Hレベルと称するか、
データとして表現する場合は1Bと称する)の時には、
ANDゲート21はHレベルの信号N1を出力する。ま
た、信号R3と信号R4のいずれか一方あるいは両方の
電位レベルが接地電位レベル(以下、Lレべルと称する
か、データとして表現する場合は0Bと称する)の時に
は、ANDゲート21はLレベルの信号N1を出力す
る。このように、ANDゲート21から構成される検出
回路20は、レジスタ10に格納された初期値のうち、
上位ビットに相当する初期データのそれぞれが全て1B
であるか否かを検出するものである。
The detection circuit 20 comprises, for example, a two-input one-output AND gate 21 as shown in FIG. The signals R3 and R4 are input to the AND gate 21. Therefore, the potential levels of signal R3 and signal R4 are both the power supply potential level (hereinafter, referred to as H level,
When expressed as data, it is called 1B).
AND gate 21 outputs H-level signal N1. When one or both of the signal R3 and the signal R4 are at the ground potential level (hereinafter referred to as the L level or referred to as 0B when expressed as data), the AND gate 21 is at the L level. Is output. As described above, the detection circuit 20 including the AND gate 21 outputs the initial value stored in the register 10
All of the initial data corresponding to the upper bits are all 1B
Is detected.

【0018】クロック供給制御回路30は、2入力1出
力のANDゲート31とインバータ32とで構成されて
いる。インバータ32には信号N1が入力される。AN
Dゲート31にはクロック信号CLKとインバータ32
の出力信号が入力される。このため、インバータ32の
出力信号がHレベル、つまり、検出回路が出力する信号
N1がLレベルの時には、ANDゲート31はクロック
信号CLKの電位レベルに応答した電位レベルの信号を
出力する。また、インバータ32の出力信号がLレベ
ル、つまり、検出回路が出力する信号N1がHレベルの
時には、ANDゲート31はLレベルの信号を出力し、
それを維持する。ANDゲート31が出力する信号は、
後述する計数部100を構成する複数のフリップフロッ
プのうち、上位ビットに対応するカウントの実行に用い
られるいくつかのフリップフロップに供給される。
The clock supply control circuit 30 comprises an AND gate 31 having two inputs and one output and an inverter 32. Signal N1 is input to inverter 32. AN
A clock signal CLK and an inverter 32
Is output. Therefore, when the output signal of inverter 32 is at the H level, that is, when signal N1 output from the detection circuit is at the L level, AND gate 31 outputs a signal of a potential level in response to the potential level of clock signal CLK. When the output signal of the inverter 32 is at L level, that is, when the signal N1 output from the detection circuit is at H level, the AND gate 31 outputs a signal at L level.
Keep it. The signal output from the AND gate 31 is
It is supplied to some flip-flops used for executing the count corresponding to the higher-order bit among a plurality of flip-flops constituting the counting unit 100 described later.

【0019】このように、クロック供給制御回路30
は、検出回路20の検出結果である、信号N1の電位レ
ベルに応じて、計数部100を構成するフリップフロッ
プのうち、上位ビットに対応するカウントの実行に用い
られるいくつかのフリップフロップへのクロック信号C
LKの供給を制御するものである。
As described above, the clock supply control circuit 30
Are clocks to some of the flip-flops included in the counting unit 100 that are used to execute the count corresponding to the upper bit, in accordance with the potential level of the signal N1 as the detection result of the detection circuit 20. Signal C
It controls the supply of LK.

【0020】計数部100は、4つのJKフリップフロ
ップ(以下、単にフリップフロップと称する)101ー
1〜101ー4と、9つの2入力1出力の選択回路10
3ー1〜103ー4、104ー1〜104ー4、110
と、4つの2入力1出力のANDゲート105、10
7、109、113とから構成されている。
The counting section 100 comprises four JK flip-flops (hereinafter simply referred to as flip-flops) 101-1 to 101-4 and nine 2-input / 1-output selection circuits 10
3-1 to 103-4, 104-1 to 104-4, 110
And four two-input one-output AND gates 105, 10
7, 109, and 113.

【0021】選択回路103ー1の一方の入力端子(以
下、0側入力端子と称する)には、データとして1Bが
入力され、他方の入力端子(以下、1側入力端子と称す
る)には、信号R1が入力されている。選択回路104
ー1の0側入力端子には、データとして1Bが入力さ
れ、1側入力端子には、データとして0Bが入力されて
いる。選択回路103ー1及び104ー1はともに制御
信号であるセット信号SETの電位レベルに応じて2つ
の入力端子のいずれか一方に入力される信号(あるいは
データ)を選択し、出力するものである。
One input terminal (hereinafter, referred to as a 0-side input terminal) of the selection circuit 103-1 receives 1B as data, and the other input terminal (hereinafter, referred to as a 1-side input terminal) receives data. The signal R1 is input. Selection circuit 104
-1 is input to the 0-side input terminal as data and 1B is input to the 1-side input terminal as data. Each of the selection circuits 103-1 and 104-1 selects and outputs a signal (or data) input to one of the two input terminals according to the potential level of the set signal SET which is a control signal. .

【0022】図1においては、選択回路103ー1〜1
03ー4、104ー1〜104ー4のいずれにおいて
も、セット信号SETがLレベルの時には、0側入力端
子が選択され、セット信号SETがHレベルの時には、
1側入力端子が選択されるものとしている。このため、
セット信号SETがLレベルの時には、選択回路103
ー1及び選択回路104ー1はともにデータとして1B
に相当する信号を出力する。セット信号SETがHレベ
ルの時には、選択回路103ー1は信号R1に応じた電
位レベルの信号を出力し、選択回路104ー1はデータ
として0Bに相当する信号を出力する。
In FIG. 1, selection circuits 103-1 to 103-1
03-4, 104-1 to 104-4, when the set signal SET is at the L level, the 0-side input terminal is selected, and when the set signal SET is at the H level,
It is assumed that the first input terminal is selected. For this reason,
When the set signal SET is at the L level, the selection circuit 103
-1 and the selection circuit 104-1 are both 1B as data.
Is output. When the set signal SET is at the H level, the selection circuit 103-1 outputs a signal of a potential level corresponding to the signal R1, and the selection circuit 104-1 outputs a signal corresponding to 0B as data.

【0023】フリップフロップ101ー1のJ側入力端
子には選択回路103ー1から出力される信号が入力さ
れ、K側入力端子には選択回路104ー1から出力され
る信号が入力される。また、フリップフロップ101ー
1にはクロック端子にクロック信号CLKが入力されて
いる。フリップフロップ101ー1は、クロック信号C
LKの立ち上がりエッジあるいは立ち下がりエッジのい
ずれか一方に応じて動作するものであるが、ここでは、
クロック信号CLKの立ち上がりエッジに応じて動作す
るものとして説明する。なお、後述する他のフリップフ
ロップ101ー2〜101ー4も、クロック信号CLK
の立ち上がりエッジあるいは立ち下がりエッジのいずれ
か一方に応じて動作するものであるが、ここでは、クロ
ック信号CLKの立ち上がりエッジに応じて動作するも
のとして説明する。
The signal output from the selection circuit 103-1 is input to the J-side input terminal of the flip-flop 101-1 and the signal output from the selection circuit 104-1 is input to the K-side input terminal. The clock signal CLK is input to the clock terminal of the flip-flop 101-1. The flip-flop 101-1 receives the clock signal C
It operates according to either the rising edge or the falling edge of LK, but here,
Description will be made assuming that the operation is performed in response to the rising edge of the clock signal CLK. The other flip-flops 101-2 to 101-4, which will be described later, also receive the clock signal CLK.
Operates in response to either the rising edge or the falling edge of the clock signal CLK. However, here, the description will be made assuming that the operation is performed in response to the rising edge of the clock signal CLK.

【0024】ここで、JKフリップフロップは、良く知
られているように、J側入力端子に入力される信号(あ
るいはデータ)の電位レベル(あるいはデータの値)と
K側入力端子に入力される信号(あるいはデータ)の電
位レベル(あるいはデータの値)とが異なる場合には、
クロック信号CLKの立ち上がりエッジに応じて、J側
入力端子に入力される信号(あるいはデータ)に応じた
電位レベル(あるいはデータの値)の信号を出力端子Q
から出力するものである。また、J側入力端子とK側入
力端子にともにLレベルの信号(あるいはデータとして
0Bに相当)が入力される場合には、クロック信号CL
Kの立ち上がりエッジに応じて、フリップフロップ10
1ー1自身の出力端子Qから出力されていた信号OUT
1の電位レベルを維持した電位レベルの信号を新たに信
号OUT1として出力端子Qから出力するものである。
また、J側入力端子とK側入力端子にともにHレベルの
信号(あるいはデータとして1Bに相当)が入力される
場合には、クロック信号CLKの立ち上がりエッジに応
じて、フリップフロップ101ー1自身の出力端子Qか
ら出力されていた信号OUT1の電位レベルを反転した
電位レベルの信号を新たに信号OUT1として出力端子
Qから出力するものである。
Here, as is well known, the JK flip-flop is connected to the potential level (or data value) of the signal (or data) input to the J-side input terminal and to the K-side input terminal. If the potential level (or data value) of the signal (or data) is different,
In response to a rising edge of the clock signal CLK, a signal having a potential level (or data value) corresponding to a signal (or data) input to the J-side input terminal is output to the output terminal Q.
Output from. When an L-level signal (or 0B as data) is input to both the J-side input terminal and the K-side input terminal, the clock signal CL
In response to the rising edge of K, flip-flop 10
The signal OUT output from the output terminal Q of 1-1 itself.
The signal of the potential level maintaining the potential level of 1 is newly output from the output terminal Q as the signal OUT1.
When an H-level signal (or equivalent to 1B as data) is input to both the J-side input terminal and the K-side input terminal, the flip-flop 101-1 itself operates in response to the rising edge of the clock signal CLK. A signal having a potential level obtained by inverting the potential level of the signal OUT1 output from the output terminal Q is newly output from the output terminal Q as a signal OUT1.

【0025】このため、セット信号SETがLレベルの
時には、J側入力端子及びK側入力端子にはともにデー
タとして1Bが入力されるので、フリップフロップ10
1ー1は、クロック信号CLKの立ち上がり毎に、フリ
ップフロップ101ー1自身の出力端子Qから出力され
ていた信号の電位レベルを反転した信号を信号OUT1
として出力端子Qから出力することとなる。また、セッ
ト信号SETがHレベルの時には、J側入力端子には信
号R1が実質的に入力され、K側入力端子にはデータと
して0Bが入力されるので、フリップフロップ101ー
1は、クロック信号CLKの立ち上がりに応じて、信号
R1の電位レベル(あるいはデータの値)に応じた信号
を信号OUT1として出力端子Qから出力することとな
る。
For this reason, when the set signal SET is at the L level, 1B is input as data to both the J-side input terminal and the K-side input terminal.
A signal OUT1 is a signal OUT1 obtained by inverting the potential level of the signal output from the output terminal Q of the flip-flop 101-1 itself every time the clock signal CLK rises.
From the output terminal Q. When the set signal SET is at the H level, the signal R1 is substantially input to the J-side input terminal, and 0B is input to the K-side input terminal as data. In response to the rise of CLK, a signal corresponding to the potential level (or data value) of signal R1 is output from output terminal Q as signal OUT1.

【0026】選択回路103ー2の0側入力端子には、
信号OUT1が入力され、1側入力端子には、信号R2
が入力されている。選択回路104ー1の0側入力端子
には、信号OUT1が入力され、1側入力端子には、デ
ータとして0Bが入力されている。このため、セット信
号SETがLレベルの時には、選択回路103ー2及び
選択回路104ー2はともに信号OUT1に相当する信
号を出力する。セット信号SETがHレベルの時には、
選択回路103ー2は信号R2に応じた電位レベルの信
号を出力し、選択回路104ー2はデータとして0Bに
相当する信号を出力する。
The 0-side input terminal of the selection circuit 103-2 has
The signal OUT1 is input, and the signal R2 is input to the first input terminal.
Is entered. The signal OUT1 is input to the 0-side input terminal of the selection circuit 104-1, and 0B is input to the 1-side input terminal as data. Therefore, when the set signal SET is at the L level, both the selection circuit 103-2 and the selection circuit 104-2 output a signal corresponding to the signal OUT1. When the set signal SET is at the H level,
The selection circuit 103-2 outputs a signal of a potential level corresponding to the signal R2, and the selection circuit 104-2 outputs a signal corresponding to 0B as data.

【0027】フリップフロップ101ー2のJ側入力端
子には選択回路103ー2から出力される信号が入力さ
れ、K側入力端子には選択回路104ー2から出力され
る信号が入力される。また、フリップフロップ101ー
2にはクロック端子にクロック信号CLKが入力されて
いる。
The signal output from the selection circuit 102-2 is input to the J-side input terminal of the flip-flop 101-2, and the signal output from the selection circuit 104-2 is input to the K-side input terminal. The clock signal CLK is input to the clock terminal of the flip-flop 101-2.

【0028】このため、セット信号SETがLレベルの
時には、J側入力端子及びK側入力端子にはともに信号
OUT1に相当する信号が入力される。つまり、信号O
UT1がLレベルであれば、フリップフロップ101ー
2は、クロック信号CLKの立ち上がり毎に、フリップ
フロップ101ー2自身の出力端子Qから出力されてい
た信号OUT2の電位レベルを維持した電位レベルの信
号を新たに信号OUT2として出力端子Qから出力する
ものである。信号OUT1がHレベルであれば、フリッ
プフロップ101ー2は、クロック信号CLKの立ち上
がり毎に、フリップフロップ101ー2自身の出力端子
Qから出力されていた信号OUT2の電位レベルを反転
した信号を新たに信号OUT2として出力端子Qから出
力することとなる。また、セット信号SETがHレベル
の時には、J側入力端子には信号R2が実質的に入力さ
れ、K側入力端子にはデータとして0Bが入力されるの
で、フリップフロップ101ー2は、クロック信号CL
Kの立ち上がりに応じて、信号R2の電位レベル(ある
いはデータの値)に応じた信号を信号OUT2として出
力端子Qから出力することとなる。
Therefore, when the set signal SET is at the L level, a signal corresponding to the signal OUT1 is input to both the J-side input terminal and the K-side input terminal. That is, the signal O
When the UT1 is at the L level, the flip-flop 101-2 maintains the potential level of the signal OUT2 output from the output terminal Q of the flip-flop 101-2 itself at every rising of the clock signal CLK. Is newly output from the output terminal Q as a signal OUT2. When the signal OUT1 is at the H level, the flip-flop 101-2 renews a signal obtained by inverting the potential level of the signal OUT2 output from the output terminal Q of the flip-flop 101-2 itself at every rise of the clock signal CLK. At the output terminal Q as a signal OUT2. When the set signal SET is at the H level, the signal R2 is substantially input to the J-side input terminal and 0B is input to the K-side input terminal as data. CL
In response to the rise of K, a signal corresponding to the potential level (or data value) of signal R2 is output from output terminal Q as signal OUT2.

【0029】ANDゲート105には、信号OUT1、
OUT2がそれぞれ入力されている。このため、信号O
UT1、OUT2がともにHレベルの時に、ANDゲー
ト105はHレベルの信号N2を出力する。また、信号
OUT1、OUT2のいずれか一方あるいは両方がLレ
ベルの時に、ANDゲート105はLレベルの信号N2
を出力する。
The AND gate 105 has a signal OUT 1,
OUT2 is input. Therefore, the signal O
When both UT1 and OUT2 are at H level, AND gate 105 outputs signal N2 at H level. When one or both of the signals OUT1 and OUT2 are at L level, the AND gate 105 outputs the signal N2 at L level.
Is output.

【0030】選択回路103ー3の0側入力端子には、
信号N2が入力され、1側入力端子には、信号R3が入
力されている。選択回路104ー3の0側入力端子に
は、信号N2が入力され、1側入力端子には、データと
して0Bが入力されている。このため、セット信号SE
TがLレベルの時には、選択回路103ー3及び選択回
路104ー3はともに信号N2に相当する信号を出力す
る。セット信号SETがHレベルの時には、選択回路1
03ー3は信号R3に応じた電位レベルの信号を出力
し、選択回路104ー3はデータとして0Bに相当する
信号を出力する。
The 0-side input terminal of the selection circuit 103-3 includes:
The signal N2 is input, and the signal R3 is input to the first input terminal. The signal N2 is input to the 0-side input terminal of the selection circuit 104-3, and 0B is input to the 1-side input terminal as data. Therefore, the set signal SE
When T is at the L level, both the selection circuit 103-3 and the selection circuit 104-3 output a signal corresponding to the signal N2. When the set signal SET is at the H level, the selection circuit 1
03-3 outputs a signal of a potential level corresponding to the signal R3, and the selection circuit 104-3 outputs a signal corresponding to 0B as data.

【0031】フリップフロップ101ー3のJ側入力端
子には選択回路103ー3から出力される信号が入力さ
れ、K側入力端子には選択回路104ー3から出力され
る信号が入力される。また、フリップフロップ101ー
3にはクロック端子にクロック供給制御回路30の出力
信号であるANDゲート31の出力信号が入力されてい
る。
The signal output from the selection circuit 103-3 is input to the J-side input terminal of the flip-flop 101-3, and the signal output from the selection circuit 104-3 is input to the K-side input terminal. The output signal of the AND gate 31, which is the output signal of the clock supply control circuit 30, is input to the clock terminal of the flip-flop 101-3.

【0032】フリップフロップ101ー3は、ANDゲ
ート31の出力信号がクロック信号に応じたものであれ
ば、通常の動作を行い、ANDゲート31の出力信号が
Lレベルを維持しているものであれば、動作が禁止され
ることになる。ここでは、フリップフロップ101ー3
が通常の動作を行う場合についてを説明する。
The flip-flop 101-3 performs a normal operation if the output signal of the AND gate 31 is in response to the clock signal, and the flip-flop 101-3 maintains the L level of the output signal of the AND gate 31. In this case, the operation is prohibited. Here, the flip-flop 101-3
Performs a normal operation.

【0033】セット信号SETがLレベルの時には、J
側入力端子及びK側入力端子にはともに信号N2に相当
する信号が入力される。つまり、信号N2がLレベルで
あれば、フリップフロップ101ー3は、クロック信号
CLKの立ち上がり毎に、フリップフロップ101ー3
自身の出力端子Qから出力されていた信号OUT3の電
位レベルを維持した電位レベルの信号を新たに信号OU
T3として出力端子Qから出力するものである。信号N
2がHレベルであれば、フリップフロップ101ー3
は、クロック信号CLKの立ち上がり毎に、フリップフ
ロップ101ー3自身の出力端子Qから出力されていた
信号OUT3の電位レベルを反転した信号を新たに信号
OUT3として出力端子Qから出力することとなる。ま
た、セット信号SETがHレベルの時には、J側入力端
子には信号R3が実質的に入力され、K側入力端子には
データとして0Bが入力されるので、フリップフロップ
101ー3は、クロック信号CLKの立ち上がりに応じ
て、信号R3の電位レベル(あるいはデータの値)に応
じた信号を信号OUT3として出力端子Qから出力する
こととなる。
When the set signal SET is at L level, J
A signal corresponding to the signal N2 is input to both the side input terminal and the K side input terminal. That is, when the signal N2 is at the L level, the flip-flop 101-3 is turned on every time the clock signal CLK rises.
A signal having a potential level that maintains the potential level of the signal OUT3 output from its own output terminal Q is newly added to the signal OU.
The signal is output from the output terminal Q as T3. Signal N
2 is at H level, flip-flop 101-3
Means that a signal obtained by inverting the potential level of the signal OUT3 output from the output terminal Q of the flip-flop 101-3 itself is output as a new signal OUT3 from the output terminal Q every time the clock signal CLK rises. When the set signal SET is at the H level, the signal R3 is substantially input to the J-side input terminal, and 0B is input to the K-side input terminal as data. In response to the rise of CLK, a signal corresponding to the potential level (or data value) of the signal R3 is output from the output terminal Q as the signal OUT3.

【0034】ANDゲート113には、信号OUT3及
び信号N2がそれぞれ入力されている。このため、信号
OUT3及び信号N2がともにHレベルの時に、AND
ゲート113はHレベルの信号を出力する。また、信号
OUT3及び信号N2のいずれか一方あるいは両方がL
レベルの時に、ANDゲート113はLレベルの信号を
出力する。
The signal OUT3 and the signal N2 are input to the AND gate 113, respectively. Therefore, when both the signal OUT3 and the signal N2 are at H level, AND
Gate 113 outputs an H-level signal. In addition, one or both of the signal OUT3 and the signal N2 are at L
At the time of the level, the AND gate 113 outputs an L level signal.

【0035】選択回路103ー4の0側入力端子には、
ANDゲート113から出力される信号が入力され、1
側入力端子には、信号R4が入力されている。選択回路
104ー4の0側入力端子には、ANDゲート113か
ら出力される信号が入力され、1側入力端子には、デー
タとして0Bが入力されている。このため、セット信号
SETがLレベルの時には、選択回路103ー4及び選
択回路104ー4はともにANDゲート113から出力
される信号に相当する信号を出力する。セット信号SE
TがHレベルの時には、選択回路103ー4は信号R4
に応じた電位レベルの信号を出力し、選択回路104ー
4はデータとして0Bに相当する信号を出力する。
The 0-side input terminal of the selection circuit 103-4 has
A signal output from the AND gate 113 is input, and 1
The signal R4 is input to the side input terminal. The signal output from the AND gate 113 is input to the 0-side input terminal of the selection circuit 104-4, and 0B is input to the 1-side input terminal as data. Therefore, when the set signal SET is at the L level, both the selection circuit 103-4 and the selection circuit 104-4 output a signal corresponding to the signal output from the AND gate 113. Set signal SE
When T is at the H level, the selection circuit 103-4 outputs the signal R4
, And the selection circuit 1044 outputs a signal corresponding to 0B as data.

【0036】フリップフロップ101ー4のJ側入力端
子には選択回路103ー4から出力される信号が入力さ
れ、K側入力端子には選択回路104ー4から出力され
る信号が入力される。また、フリップフロップ101ー
3にはクロック端子にクロック供給制御回路30の出力
信号であるANDゲート31の出力信号が入力されてい
る。
The signal output from the selector 103-4 is input to the J-side input terminal of the flip-flop 101-4, and the signal output from the selector 104-4 is input to the K-side input terminal. The output signal of the AND gate 31, which is the output signal of the clock supply control circuit 30, is input to the clock terminal of the flip-flop 101-3.

【0037】フリップフロップ101ー4は、ANDゲ
ート31の出力信号がクロック信号に応じたものであれ
ば、通常の動作を行い、ANDゲート31の出力信号が
Lレベルを維持しているものであれば、動作が禁止され
ることになる。ここでは、フリップフロップ101ー4
が通常の動作を行う場合についてを説明する。
The flip-flop 101-4 performs a normal operation if the output signal of the AND gate 31 is in accordance with the clock signal, and the flip-flop 101-4 maintains the L level of the output signal of the AND gate 31. In this case, the operation is prohibited. Here, the flip-flop 101-4
Performs a normal operation.

【0038】セット信号SETがLレベルの時には、J
側入力端子及びK側入力端子にはともにANDゲート1
13の出力信号に相当する信号が入力される。つまり、
ANDゲート113の出力信号がLレベルであれば、フ
リップフロップ101ー4は、クロック信号CLKの立
ち上がり毎に、フリップフロップ101ー4自身の出力
端子Qから出力されていた信号OUT4の電位レベルを
維持した電位レベルの信号を新たに信号OUT4として
出力端子Qから出力するものである。ANDゲート11
3の出力信号がHレベルであれば、フリップフロップ1
01ー4は、クロック信号CLKの立ち上がり毎に、フ
リップフロップ101ー4自身の出力端子Qから出力さ
れていた信号OUT4の電位レベルを反転した信号を新
たに信号OUT4として出力端子Qから出力することと
なる。また、セット信号SETがHレベルの時には、J
側入力端子には信号R4が実質的に入力され、K側入力
端子にはデータとして0Bが入力されるので、フリップ
フロップ101ー4は、クロック信号CLKの立ち上が
りに応じて、信号R4の電位レベル(あるいはデータの
値)に応じた信号を信号OUT4として出力端子Qから
出力することとなる。
When the set signal SET is at L level, J
AND gate 1 is connected to both the input terminal on the K side and the input terminal on the K side.
A signal corresponding to the 13 output signals is input. That is,
When the output signal of the AND gate 113 is at the L level, the flip-flop 101-4 maintains the potential level of the signal OUT4 output from the output terminal Q of the flip-flop 101-4 at every rise of the clock signal CLK. The signal of the potential level is newly output from the output terminal Q as the signal OUT4. AND gate 11
3 is at the H level, the flip-flop 1
01-4 is to output a signal obtained by inverting the potential level of the signal OUT4 output from the output terminal Q of the flip-flop 101-4 itself as a new signal OUT4 from the output terminal Q every time the clock signal CLK rises. Becomes When the set signal SET is at the H level, J
Since the signal R4 is substantially input to the input terminal on the side and 0B is input as data to the input terminal on the K side, the flip-flop 101-4 sets the potential level of the signal R4 in response to the rise of the clock signal CLK. A signal corresponding to (or the value of the data) is output from the output terminal Q as the signal OUT4.

【0039】このように、選択回路103ー1〜103
ー4、104ー1〜104ー4、フリップフロップ10
1ー1〜101ー4、ANDゲート105、113によ
り4ビット分のカウントを行うものである。より詳細に
は、セット信号SETがHレベルの時に、各フリップフ
ロップ101ー1〜101ー4はそれぞれ信号R1〜R
4の電位レベルに応じた信号を格納し、出力することが
できる。これにより、初期値が計数部100に格納され
たこととなる。この後、セット信号SETをLレベルと
して、クロック信号CLKの立ち上がりエッジに応じ
て、各フリップフロップ101ー1〜101ー4が動作
してカウント動作を実現する。なお、上位ビットの初期
データに対応する信号R3、R4がともにデータとして
1Bに相当するものであった場合には、クロック信号C
LKが供給されないフリップロップ101ー3、101
ー4それぞれの動作が禁止される。
As described above, the selection circuits 103-1 to 103-1
-4, 104-1 to 104-4, flip-flop 10
Counting of 4 bits is performed by 1-1 to 101-4 and AND gates 105 and 113. More specifically, when the set signal SET is at the H level, the flip-flops 101-1 to 101-4 output the signals R1 to R4, respectively.
4 can be stored and output according to the potential level. As a result, the initial value is stored in the counting unit 100. After that, the set signal SET is set to the L level, and the flip-flops 101-1 to 101-4 operate according to the rising edge of the clock signal CLK to realize the count operation. When the signals R3 and R4 corresponding to the initial data of the upper bits both correspond to 1B as data, the clock signal C
Flip flops 101-3, 101 not supplied with LK
-4 Each operation is prohibited.

【0040】ANDゲート107には、信号OUT3、
OUT4がそれぞれ入力されている。このため、信号O
UT3、OUT4がともにHレベルの時に、ANDゲー
ト107はHレベルの信号を出力する。また、信号OU
T3、OUT4のいずれか一方あるいは両方がLレベル
の時に、ANDゲート107はLレベルの信号を出力す
る。
The AND gate 107 has a signal OUT3,
OUT4 is input. Therefore, the signal O
When both UT3 and OUT4 are at H level, AND gate 107 outputs a signal at H level. Also, the signal OU
When one or both of T3 and OUT4 are at L level, AND gate 107 outputs an L level signal.

【0041】ANDゲート109には、信号N2及びA
NDゲート107から出力される信号が入力されてい
る。このため、信号N2及びANDゲート107から出
力される信号がともにHレベルの時に、ANDゲート1
09はHレベルの信号N3を出力する。また、信号N2
及びANDゲート107から出力される信号のいずれか
一方あるいは両方がLレベルの時に、ANDゲート10
9はLレベルの信号N3を出力する。
The AND gate 109 has the signals N2 and A
The signal output from the ND gate 107 is input. Therefore, when both the signal N2 and the signal output from the AND gate 107 are at the H level, the AND gate 1
09 outputs an H level signal N3. Also, the signal N2
And either one or both of the signals output from the AND gate 107 are at the L level.
9 outputs an L level signal N3.

【0042】選択回路110には、信号N2と信号N3
がそれぞれ入力されている。また、選択を制御する信号
として、信号N1が入力されている。このため、選択回
路110は、例えば、図1においては、信号N1がLレ
ベル、つまり、信号R3と信号R4のいずれか一方ある
いは両方の初期データが0Bに相当するものである時に
は、信号N3に応じた信号をキャリ信号CARRYとし
て出力する。また、信号N1がHレベル、つまり、信号
R3と信号R4の初期データがともに1Bに相当するも
のである時には、信号N2に応じた信号をキャリ信号C
ARRYとして出力する。
The selection circuit 110 has a signal N2 and a signal N3.
Are entered. Further, a signal N1 is input as a signal for controlling selection. Therefore, for example, in FIG. 1, when the signal N1 is at the L level, that is, when the initial data of one or both of the signals R3 and R4 is equivalent to 0B, the selection circuit 110 outputs the signal N3. The corresponding signal is output as carry signal CARRY. When the signal N1 is at the H level, that is, when the initial data of the signals R3 and R4 both correspond to 1B, the signal corresponding to the signal N2 is changed to the carry signal C.
Output as ARRY.

【0043】ANDゲート107、109、選択回路1
10の構成全体として見れば、上位ビットに対する初期
データが全て1Bに相当するものである場合(信号N1
がHレベルの場合に相当)には、フリップフロップ10
1ー1及び101ー2それぞれが出力するデータがとも
に1Bの時にHレベルのキャリ信号CARRYを出力す
る。また、上位ビットに対する初期データに0Bに相当
するものがある場合(信号N1がLレベルの場合に相
当)には、フリップフロップ101ー1〜101ー4そ
れぞれが出力するデータが全て1Bの時にHレベルのキ
ャリ信号CARRYを出力する。
AND gates 107 and 109, selection circuit 1
In the overall configuration of No. 10, the case where the initial data for the upper bits are all equivalent to 1B (signal N1
Is H level), the flip-flop 10
When the data output by each of 1-1 and 101-2 is 1B, the carry signal CARRY of the H level is output. In addition, when there is data corresponding to 0B in the initial data corresponding to the upper bits (corresponding to the case where the signal N1 is at the L level), when the data output from each of the flip-flops 101-1 to 101-4 is 1B, H A level carry signal CARRY is output.

【0044】以上のように構成されたカウント回路11
1の動作についてを以下に詳細に説明する。図2は第1
の実施の形態におけるカウント回路111の動作を説明
するタイミングチャートである。なお、図2は、カウン
ト回路111に設定される初期値が0000Bの場合の
動作例である。図2において、CLKはクロック信号C
LKを、SETはセット信号SETを、R1〜R4はそ
れぞれレジスタ10の出力信号である信号R1〜R4
を、N1は検出回路20の出力である信号N1を、OU
T1〜OUT4はフリップフロップ101ー1〜101
ー4の出力である信号OUT1〜OUT4を、N2はA
NDゲート105の出力である信号N2を、N3はAN
Dゲート109の出力である信号N3を、CARRYは
キャリ信号CARRYをそれぞれ示している。
The counting circuit 11 configured as described above
Operation 1 will be described in detail below. FIG. 2 shows the first
9 is a timing chart illustrating an operation of the count circuit 111 according to the embodiment. FIG. 2 is an operation example when the initial value set in the count circuit 111 is 0000B. In FIG. 2, CLK is a clock signal C
LK, SET is a set signal SET, and R1 to R4 are signals R1 to R4 which are output signals of the register 10, respectively.
N1 is a signal N1 output from the detection circuit 20,
T1 to OUT4 are flip-flops 101-1 to 101
-4 are the outputs OUT1 to OUT4, and N2 is A
The signal N2 output from the ND gate 105 and the signal N3
The signal N3, which is the output of the D gate 109, and CARRY indicate the carry signal CARRY.

【0045】まず、時刻t0の前に、セット信号SET
がHレベルとなる。このため、選択回路103ー1〜1
03ー4、104ー1〜104ー4それぞれは1側入力
端子から入力されている信号を出力として選択する。な
お、時刻t0の前においてのフリップフロップ101ー
1〜101ー4それぞれ出力信号OUT1〜OUT4は
Lレベルであるとする。
First, before time t0, the set signal SET
Becomes H level. Therefore, the selection circuits 103-1 to 103-1
Each of 03-4 and 104-1 to 104-4 selects a signal input from the 1-side input terminal as an output. Note that the output signals OUT1 to OUT4 of the flip-flops 101-1 to 101-4 before the time t0 are at the L level.

【0046】時刻t0におけるクロック信号CLKの立
ち上がりエッジに応じて、フリップフロップ101ー1
〜101ー4には、それぞれカウントの初期値を設定す
るための初期データとして信号R1〜R4に応じた信号
を格納し、信号OUT1〜OUT4として出力する。な
お、初期値は0000Bであるため、信号R1〜R4は
全てLレベルである。よって、フリップフロップ101
ー1〜101ー4の出力信号OUT1〜OUT4はそれ
ぞれLレベルのままである。
In response to the rising edge of clock signal CLK at time t0, flip-flop 101-1
Signals corresponding to the signals R1 to R4 are stored as initial data for setting initial values of the counts in the signals 101 to 104, respectively, and are output as the signals OUT1 to OUT4. Since the initial value is 0000B, the signals R1 to R4 are all at L level. Therefore, the flip-flop 101
The output signals OUT1 to OUT4 of -1 to 101-4 remain at the L level, respectively.

【0047】時刻t1の前にセット信号SETはLレベ
ルとなる。このため、選択回路103ー1〜103ー
4、104ー1〜104ー4それぞれは0側入力端子か
ら入力されている信号を出力として選択する。
Before time t1, set signal SET goes low. Therefore, each of the selection circuits 103-1 to 103-4 and 104-1 to 104-4 selects a signal input from the 0-side input terminal as an output.

【0048】時刻t1におけるクロック信号CLKの立
ち上がりエッジに応じて、各フリップフロップ101ー
1〜101ー4はそれぞれJ側入力端子及びK側入力端
子に入力される信号の電位レベルに応じた電位レベルを
有する信号を信号OUT1〜OUT4として出力する。
なお、上述したように、初期値が0000Bなので、検
出回路20の出力である信号N1はLレベルとなるた
め、クロック供給制御回路30の出力信号はクロック信
号CLKに応じたものとなる。このため、フリップフロ
ップ101ー3、101ー4はともに通常の動作を行う
こととなる。また、選択回路110も0側入力端子に入
力された信号N3を出力として選択する。
In response to the rising edge of the clock signal CLK at the time t1, the flip-flops 101-1 to 101-4 each have a potential level corresponding to the potential level of the signal input to the J-side input terminal and the K-side input terminal. Are output as signals OUT1 to OUT4.
As described above, since the initial value is 0000B, the signal N1 which is the output of the detection circuit 20 is at the L level, so that the output signal of the clock supply control circuit 30 corresponds to the clock signal CLK. For this reason, the flip-flops 101-3 and 101-4 both perform normal operations. The selection circuit 110 also selects the signal N3 input to the 0-side input terminal as an output.

【0049】時刻t2において、カウント数が10Bと
なり、時刻t3におけるクロック信号CLKの立ち上が
りエッジに応じて、フリップフロップ101ー1からの
出力信号OUT1がHレベルとなり、カウント数が11
Bとなる。このため、ANDゲート105の出力信号N
2はHレベルとなる。しかしながら、フリップフロップ
101ー3、101ー4の出力信号OUT3、OUT4
はともにLレベルであるため、ANDゲート107の出
力信号はLレベルである。よって、ANDゲート109
の出力信号N3はLレベルのままであるため、キャリ信
号CARRYはLレベルが維持される。
At time t2, the count becomes 10B, and in response to the rising edge of clock signal CLK at time t3, output signal OUT1 from flip-flop 101-1 becomes H level, and the count becomes 11
B. Therefore, the output signal N of the AND gate 105
2 becomes H level. However, the output signals OUT3, OUT4 of the flip-flops 101-3, 101-4
Are both at L level, and the output signal of AND gate 107 is at L level. Therefore, the AND gate 109
Carry signal CARRY is maintained at the L level.

【0050】この後、時刻t4〜t6にてカウント数が
それぞれ、100B、101B、110Bとなる。時刻
t7におけるクロック信号CLKの立ち上がりエッジに
応じて、フリップフロップ101ー1からの出力信号O
UT1がHレベルとなり、カウント数が111Bとな
る。このため、ANDゲート105の出力信号N2はH
レベルとなる。しかしながら、フリップフロップ101
ー4の出力信号OUT4はLレベルであるため、AND
ゲート107の出力信号はLレベルである。よって、A
NDゲート109の出力信号N3はLレベルのままであ
るため、キャリ信号CARRYはLレベルが維持され
る。
Thereafter, from time t4 to t6, the counts become 100B, 101B, and 110B, respectively. In response to the rising edge of clock signal CLK at time t7, output signal O from flip-flop 101-1 is output.
UT1 becomes H level, and the count number becomes 111B. Therefore, the output signal N2 of the AND gate 105 becomes H
Level. However, flip-flop 101
−4 output signal OUT4 is at L level,
The output signal of gate 107 is at L level. Therefore, A
Since output signal N3 of ND gate 109 remains at L level, carry signal CARRY is maintained at L level.

【0051】この後、時刻t8〜t10にてカウント数
がそれぞれ、1000B、1001B、1010Bとな
る。時刻t11におけるクロック信号CLKの立ち上が
りエッジに応じて、フリップフロップ101ー1からの
出力信号OUT1がHレベルとなり、カウント数が10
11Bとなる。このため、ANDゲート105の出力信
号N2はHレベルとなる。しかしながら、フリップフロ
ップ101ー3の出力信号OUT3はLレベルであるた
め、ANDゲート107の出力信号はLレベルである。
よって、ANDゲート109の出力信号N3はLレベル
のままであるため、キャリ信号CARRYはLレベルが
維持される。
Thereafter, from time t8 to t10, the counts become 1000B, 1001B and 1010B, respectively. In response to the rising edge of the clock signal CLK at the time t11, the output signal OUT1 from the flip-flop 101-1 becomes H level, and the count number becomes 10
11B. Therefore, the output signal N2 of the AND gate 105 becomes H level. However, since the output signal OUT3 of the flip-flop 101-3 is at the L level, the output signal of the AND gate 107 is at the L level.
Therefore, output signal N3 of AND gate 109 remains at L level, and carry signal CARRY is maintained at L level.

【0052】この後、時刻t12〜t14にてカウント
数がそれぞれ、1100B、1101B、1110Bと
なる。時刻t15におけるクロック信号CLKの立ち上
がりエッジに応じて、フリップフロップ101ー1から
の出力信号OUT1がHレベルとなり、カウント数が1
111Bとなる。このため、ANDゲート105の出力
信号N2はHレベルとなる。また、フリップフロップ1
01ー3、104ー4の出力信号OUT3、OUT4も
ともにHレベルであるため、ANDゲート107の出力
信号はHレベルとなる。よって、ANDゲート109の
出力信号N3はHレベルとなり、キャリ信号CARRY
はHレベルになる。
Thereafter, from time t12 to t14, the counts become 1100B, 1101B, and 1110B, respectively. In response to the rising edge of the clock signal CLK at the time t15, the output signal OUT1 from the flip-flop 101-1 becomes H level, and the count number becomes 1
111B. Therefore, the output signal N2 of the AND gate 105 becomes H level. Also, flip-flop 1
Since the output signals OUT3 and OUT4 of 01-3 and 104-4 are both at H level, the output signal of the AND gate 107 is at H level. Therefore, output signal N3 of AND gate 109 attains H level, and carry signal CARRY
Becomes H level.

【0053】次に、時刻t16におけるクロック信号C
LKの立ち上がりエッジに応じて、各フリップフロップ
101ー1〜101ー4の出力信号OUT1〜OUT4
はそれぞれLレベルとなり、カウント数が0000Bに
戻ることとなる。このため、キャリ信号CARRYもL
レベルとなる。時刻t17以降は、時刻t1以降と同様
な動作が行われる。
Next, the clock signal C at time t16
Output signals OUT1 to OUT4 of the flip-flops 101-1 to 101-4 according to the rising edge of LK.
Become L level, and the count number returns to 0000B. Therefore, carry signal CARRY is also L
Level. After time t17, the same operation as after time t1 is performed.

【0054】このように、初期値が0000Bのよう
に、初期値における所定の上位ビットに対する初期デー
タが全て1Bではない時には、通常の4ビットカウンタ
と同様に動作することができる。
As described above, when the initial data for the predetermined upper bits in the initial value is not all 1B, such as when the initial value is 0000B, the operation can be performed in the same manner as a normal 4-bit counter.

【0055】次に、所定の上位ビットに対する初期デー
タが全て1Bの場合の例についてを説明する。図3は第
1の実施の形態におけるカウント回路111の動作を説
明するタイミングチャートである。なお、図3は、カウ
ント回路111に設定される初期値が1100Bの場合
の動作例である。
Next, an example in which the initial data for the predetermined upper bits are all 1B will be described. FIG. 3 is a timing chart for explaining the operation of the count circuit 111 according to the first embodiment. FIG. 3 is an operation example when the initial value set in the count circuit 111 is 1100B.

【0056】まず、時刻t0の前に、セット信号SET
がHレベルとなる。このため、選択回路103ー1〜1
03ー4、104ー1〜104ー4それぞれは1側入力
端子から入力されている信号を出力として選択する。な
お、時刻t0の前においてのフリップフロップ101ー
1〜101ー4それぞれ出力信号OUT1〜OUT4は
Lレベルであるとする。
First, before time t0, the set signal SET
Becomes H level. Therefore, the selection circuits 103-1 to 103-1
Each of 03-4 and 104-1 to 104-4 selects a signal input from the 1-side input terminal as an output. Note that the output signals OUT1 to OUT4 of the flip-flops 101-1 to 101-4 before the time t0 are at the L level.

【0057】時刻t0におけるクロック信号CLKの立
ち上がりエッジに応じて、フリップフロップ101ー1
及び101ー2には、それぞれカウントの初期値を設定
するための初期データとして信号R1、R2に応じた信
号を格納し、信号OUT1、OUT2として出力する。
なお、初期値は1100Bであるため、フリップフロッ
プ101ー3、101ー4は動作しない。よって、フリ
ップフロップ101ー3、101ー4の出力信号OUT
3、OUT4はそれぞれLレベルのままである。
In response to the rising edge of clock signal CLK at time t0, flip-flop 101-1
And 101-2 store signals corresponding to the signals R1 and R2 as initial data for setting the initial value of the count, respectively, and output them as signals OUT1 and OUT2.
Since the initial value is 1100B, the flip-flops 101-3 and 101-4 do not operate. Therefore, the output signal OUT of the flip-flops 101-3 and 101-4
3, OUT4 remains at the L level.

【0058】時刻t1の前にセット信号SETはLレベ
ルとなる。このため、選択回路103ー1〜103ー
4、104ー1〜104ー4それぞれは0側入力端子か
ら入力されている信号を出力として選択する。
Before time t1, set signal SET goes low. Therefore, each of the selection circuits 103-1 to 103-4 and 104-1 to 104-4 selects a signal input from the 0-side input terminal as an output.

【0059】時刻t1におけるクロック信号CLKの立
ち上がりエッジに応じて、各フリップフロップ101ー
1〜101ー4はそれぞれJ側入力端子及びK側入力端
子に入力される信号の電位レベルに応じた電位レベルを
有する信号を信号OUT1〜OUT4として出力する。
なお、上述したように、初期値が1100Bなので、検
出回路20の出力である信号N1はHレベルとなるた
め、クロック供給制御回路30の出力信号はLレベルに
維持される。このため、フリップフロップ101ー3、
101ー4はともにクロック信号CLKが供給されない
ため、通常の動作が禁止されているため、出力信号OU
T3、OUT4はLレベルを維持する。つまり、時刻t
1から、フリップフロップ101ー1、101ー2にて
初期値1100からのカウント動作が開始される。言い
換えると、2つのフリップフロップにて初期値00Bか
らのカウント動作を開始するのと同等である。また、選
択回路110は1側入力端子に入力された信号N2を出
力として選択する。
In response to the rising edge of the clock signal CLK at the time t1, the flip-flops 101-1 to 101-4 each have a potential level corresponding to the potential level of the signal input to the J-side input terminal and the K-side input terminal. Are output as signals OUT1 to OUT4.
As described above, since the initial value is 1100B, the signal N1 which is the output of the detection circuit 20 becomes H level, so that the output signal of the clock supply control circuit 30 is maintained at L level. Therefore, the flip-flop 101-3,
Since the clock 101 is not supplied with the clock signal CLK and the normal operation is prohibited, the output signal OU is not output.
T3 and OUT4 maintain the L level. That is, the time t
From 1, the counting operation from the initial value 1100 is started in the flip-flops 101-1 and 101-2. In other words, this is equivalent to starting the counting operation from the initial value 00B with two flip-flops. The selection circuit 110 selects the signal N2 input to the first input terminal as an output.

【0060】時刻t2において、カウント数が10Bと
なり、時刻t3におけるクロック信号CLKの立ち上が
りエッジに応じて、フリップフロップ101ー1からの
出力信号OUT1がHレベルとなり、カウント数が11
Bとなる。このため、ANDゲート105の出力信号N
2はHレベルとなる。よって、キャリ信号CARRYは
Hレベルとなる。
At time t2, the count number becomes 10B, and in response to the rising edge of clock signal CLK at time t3, output signal OUT1 from flip-flop 101-1 becomes H level, and the count number becomes 11
B. Therefore, the output signal N of the AND gate 105
2 becomes H level. Therefore, carry signal CARRY attains H level.

【0061】この後、レジスタ10に格納されている初
期値が1100Bのままであれば、フリップフロップ1
01ー3、101ー4の動作は禁止されたままとなる。
このため、時刻t4〜t7に示すように、計数部100
は、時刻t0〜t3と同様にフリップフロップ101ー
1、101ー2から構成される2ビットカウンタと同様
に動作することができる。
Thereafter, if the initial value stored in the register 10 remains at 1100B, the flip-flop 1
The operations of 01-3 and 101-4 remain prohibited.
Therefore, as shown from time t4 to time t7, the counting unit 100
Can operate in the same manner as the two-bit counter composed of the flip-flops 101-1 and 101-2, similarly to the time t0 to t3.

【0062】この後、時刻t8と時刻t9の間において
に、レジスタ10に格納されている初期値が1100B
から0000Bに変更されたとする。このため、検出回
路20の出力である信号N1はLレベルとなるため、ク
ロック供給制御回路30の出力信号はクロック信号CL
Kに応じた信号となる。このため、フリップフロップ1
01ー3、101ー4はともに通常の動作が可能とな
る。
Thereafter, between time t8 and time t9, the initial value stored in register 10 is 1100B.
Is changed to 0000B. For this reason, the signal N1 output from the detection circuit 20 becomes L level, and the output signal of the clock supply control circuit 30 becomes the clock signal CL.
A signal corresponding to K is obtained. Therefore, the flip-flop 1
Both 01-3 and 101-4 can perform normal operations.

【0063】なお、図3においては、レジスタ10に新
たに格納された初期値が0000Bであり、フリップフ
ロップ101ー3、101ー4それぞれからの出力信号
OUT3、OUT4はともにLレベルであるため、新た
に初期値を格納する必要がないものとしている。レジス
タ10に新たに格納された初期値が0100Bのよう
に、各フリップフロップ101ー1〜101ー4に対し
て新たに初期値を格納する必要がある場合には、時刻t
9の前にセット信号SETをHレベルとして、時刻t9
にてレジスタ10に新たに格納された初期値を各フリッ
プフロップ101ー1〜101ー4に格納するようにし
てもよい。
In FIG. 3, the initial value newly stored in the register 10 is 0000B, and the output signals OUT3 and OUT4 from the flip-flops 101-3 and 101-4 are both at the L level. It is assumed that there is no need to store a new initial value. When the initial value newly stored in the register 10 needs to be newly stored in each of the flip-flops 101-1 to 101-4 such as 0100B, the time t
Before the time t9, the set signal SET is set to the H level, and at time t9
The initial value newly stored in the register 10 may be stored in each of the flip-flops 101-1 to 101-4.

【0064】図3において、時刻t9以降は、フリップ
フロップ101ー1〜101ー4にて4ビットカウンタ
として動作するため、図2における時刻t1以降と同様
な動作が実行されることとなる。
In FIG. 3, after time t9, the flip-flops 101-1 to 101-4 operate as 4-bit counters, so that the same operations as those after time t1 in FIG. 2 are executed.

【0065】このように、初期値における所定の上位ビ
ットが全て1Bの場合には、動作する動作する必要のな
い所定の上位ビットに対するカウントを実行するフリッ
プフロップへのクロック信号CLKの供給を禁止して、
動作の必要なフリップフロップのみでカウント動作を実
行するようにしている。このようにしても、計数部10
0を構成する全てのフリップフロップを動作させた場合
と同じカウント数にてキャリ信号CARRYをHレベル
にすることができる。
As described above, when all of the predetermined upper bits in the initial value are 1B, the supply of the clock signal CLK to the flip-flop that counts the predetermined higher bits that do not need to operate does not operate. hand,
The count operation is performed only by flip-flops that need to operate. Even in this case, the counting unit 10
Carry signal CARRY can be set to H level at the same count number as when all flip-flops constituting 0 are operated.

【0066】以上のように、第1の実施の形態のカウン
ト回路111により、カウンタとしての機能性を損なう
ことなく、消費電力を低減することがが実現される。
As described above, the count circuit 111 of the first embodiment realizes a reduction in power consumption without impairing the functionality as a counter.

【0067】なお、第1の実施の形態においては、4ビ
ットのカウンタを例にして説明したが、これに限定され
ずnビット(ただし、nは2以上の正の整数)のカウン
タであってもよい。また、第1の実施の形態において
は、検出回路20にて検出対象としている所定の上位ビ
ットを最上位ビットっを含む最上位ビットから上位の2
ビットとしているが、これに限定されず最上位ビットを
含む最上位ビットから上位のkビット(ただし、kはn
>kの正の整数)を検出対象としてもよい。効率よく本
発明の機能を利用し、消費電力の低減を行うことを考慮
すると、k≦n/2が好ましい。何故ならば、k>n/
2とすると、本発明の機能が利用される初期値が与えら
れるケースが少ないためである。
In the first embodiment, a 4-bit counter has been described as an example. However, the present invention is not limited to this, and is an n-bit counter (where n is a positive integer of 2 or more). Is also good. Further, in the first embodiment, the predetermined upper bits to be detected by the detection circuit 20 are set to the upper two bits from the most significant bit including the most significant bit.
However, the present invention is not limited to this, and the uppermost k bits including the most significant bit and the upper k bits (where k is n
> K positive integer). In consideration of efficient use of the functions of the present invention and reduction of power consumption, k ≦ n / 2 is preferable. Because k> n /
This is because, in the case of 2, there are few cases where an initial value for using the function of the present invention is given.

【0068】次に、本発明の第2の実施の形態における
カウント回路についてを図面を用いて以下に説明する。
図4は、本発明の第1の実施の形態におけるカウント回
路の回路図である。なお、図4のカウント回路は第1の
実施の形態と同様に、4ビットカウント回路(10進法
で16カウントするものに相当)を例に説明する。な
お、図4において、図1と同様な構成要素については図
1と同様な符号を付して、ここでの説明を省略し、説明
の重複を避けることとしている。
Next, a count circuit according to a second embodiment of the present invention will be described below with reference to the drawings.
FIG. 4 is a circuit diagram of the count circuit according to the first embodiment of the present invention. The count circuit shown in FIG. 4 will be described by taking a 4-bit count circuit (corresponding to one that counts 16 in decimal system) as an example, as in the first embodiment. In FIG. 4, the same components as those in FIG. 1 are denoted by the same reference numerals as those in FIG. 1, and the description thereof will be omitted, and the description will not be repeated.

【0069】図4において、カウント回路222は、カ
ウント動作を行う計数部200と、検出回路230と、
格納回路としての図1と同様なレジスタ10と、計数部
200に供給される初期値を制御する初期データ制御回
路250と、クロック選択回路としての選択回路271
とから構成されている。なお、レジスタ10、検出回路
230、初期データ制御回路250、選択回路271そ
れぞれはカウント回路222の周辺に設けられる周辺回
路としてもよいが、ここでは、レジスタ10と、計数部
200と、検出回路230と、初期データ制御回路25
0と、選択回路271とを、カウント回路222を構成
する回路として説明する。
In FIG. 4, a counting circuit 222 includes a counting section 200 for performing a counting operation, a detection circuit 230,
1 as a storage circuit, an initial data control circuit 250 for controlling an initial value supplied to the counting unit 200, and a selection circuit 271 as a clock selection circuit
It is composed of Note that each of the register 10, the detection circuit 230, the initial data control circuit 250, and the selection circuit 271 may be a peripheral circuit provided around the count circuit 222, but here, the register 10, the counting section 200, and the detection circuit 230 And the initial data control circuit 25
0 and the selection circuit 271 will be described as circuits constituting the count circuit 222.

【0070】検出回路230は、例えば、インバータ2
31から構成されている。インバータ231には信号R
1が入力されている。つまり、インバータ231は、レ
ジスタ10に格納されている初期値の最下位ビットが0
Bの時にはHレベルの信号を出力し、初期値の最下位ビ
ットが1Bの時にはLレベルの信号を出力する。
The detection circuit 230 includes, for example, the inverter 2
31. Inverter 231 has signal R
1 has been entered. That is, the inverter 231 sets the least significant bit of the initial value stored in the register 10 to 0.
At the time of B, an H-level signal is output, and when the least significant bit of the initial value is 1B, an L-level signal is output.

【0071】初期データ制御回路250は、例えば、4
つの選択回路251〜254から構成されている。選択
回路251の0側入力端子には信号R1が入力され、1
側入力端子には信号R2が入力されている。選択回路2
52の0側入力端子には信号R2が入力され、1側入力
端子には信号R3が入力されている。選択回路253の
0側入力端子には信号R3が入力され、1側入力端子に
は信号R4が入力されている。選択回路254の0側入
力端子には信号R4が入力され、1側入力端子にはレジ
スタ273からの出力信号が入力されている。なお、レ
ジスタ273からはデータとして1Bに相当する信号
(Hレベルの信号)が格納され、データとして1Bに相
当する信号が常時出力されるものとする。
The initial data control circuit 250 includes, for example, 4
It is composed of two selection circuits 251 to 254. The signal R1 is input to the 0-side input terminal of the selection circuit 251 and 1
The signal R2 is input to the side input terminal. Selection circuit 2
The signal R2 is input to the 0-side input terminal and the signal R3 is input to the 1-side input terminal. The signal R3 is input to the 0-side input terminal of the selection circuit 253, and the signal R4 is input to the 1-side input terminal. The signal R4 is input to the 0-side input terminal of the selection circuit 254, and the output signal from the register 273 is input to the 1-side input terminal. Note that a signal corresponding to 1B (H level signal) is stored as data from the register 273, and a signal corresponding to 1B is constantly output as data.

【0072】選択回路251〜254の出力信号を選択
制御する信号としてインバータ231の出力信号JVが
各選択回路251〜254に入力されている。このた
め、信号JVがLレベルの時には、選択回路251〜2
54それぞれは0側入力端子に入力されている信号を出
力信号として出力する。また、信号JVがHレベルの時
には、選択回路251〜254それぞれは1側入力端子
に入力されている信号を出力信号として出力する。
The output signal JV of the inverter 231 is input to each of the selection circuits 251 to 254 as a signal for selectively controlling the output signals of the selection circuits 251 to 254. Therefore, when the signal JV is at the L level, the selection circuits 251-2
Each outputs a signal input to the 0-side input terminal as an output signal. When the signal JV is at the H level, each of the selection circuits 251 to 254 outputs a signal input to the first input terminal as an output signal.

【0073】つまり、レジスタ10に格納されている初
期値の最下位ビットが0Bの時には、初期データ制御回
路250は最上位ビットに対する初期データを1Bとす
るとともに、後述する計数部200を構成するフリップ
フロップのうち、X番目(ただし、Xは4≧X≧2の正
の整数)のフリップフロップに対する初期データを(X
ー1)番目のフリップフロップに対する初期データとし
て出力するものである。レジスタ10に格納されている
初期値の最下位ビットが1Bの時には、初期データ制御
回路250は信号R1〜R4をそのまま出力するもので
ある。
That is, when the least significant bit of the initial value stored in the register 10 is 0B, the initial data control circuit 250 sets the initial data for the most significant bit to 1B, and sets a flip-flop constituting the counting unit 200 described later. The initial data for the X-th flip-flop (where X is a positive integer of 4 ≧ X ≧ 2) is (X
-1) Output as initial data for the flip-flop. When the least significant bit of the initial value stored in the register 10 is 1B, the initial data control circuit 250 outputs the signals R1 to R4 as they are.

【0074】クロック選択回路を構成する選択回路27
1の0側入力端子には所定の周期でHレベルとLレベル
とを繰り返す第1のクロック信号CLKが入力され、1
側入力端子には第1のクロック信号CLKを分周し、第
1のクロック信号CLKの2倍の周期でHレベルとLレ
ベルとを繰り返す第2のクロック信号CLK/2が入力
されている。
Selection circuit 27 constituting clock selection circuit
A first clock signal CLK that repeats an H level and an L level at a predetermined cycle is input to the 0-side input terminal of 1 and 1
The second input clock signal CLK / 2, which divides the first clock signal CLK and repeats the H level and the L level at twice the cycle of the first clock signal CLK, is input to the side input terminal.

【0075】選択回路271の出力信号を選択制御する
信号として信号JVが入力されている。このため、信号
JVがLレベルの時には、選択回路271は0側入力端
子に入力されている信号を出力信号SECLKとして出
力する。また、信号JVがHレベルの時には、選択回路
271は1側入力端子に入力されている信号を出力信号
SECLKとして出力する。
The signal JV is input as a signal for selectively controlling the output signal of the selection circuit 271. Therefore, when the signal JV is at the L level, the selection circuit 271 outputs the signal input to the 0-side input terminal as the output signal SECLK. When the signal JV is at the H level, the selection circuit 271 outputs the signal input to the first input terminal as the output signal SECLK.

【0076】つまり、レジスタ10に格納されている初
期値の最下位ビットが0Bの時には、信号SECLKは
第2のクロック信号CLK/2に相当する信号となる。
また、レジスタ10に格納されている初期値の最下位ビ
ットが1Bの時には、信号SECLKは第1のクロック
信号CLKに相当する信号となる。
That is, when the least significant bit of the initial value stored in the register 10 is 0B, the signal SECLK is a signal corresponding to the second clock signal CLK / 2.
When the least significant bit of the initial value stored in the register 10 is 1B, the signal SECLK is a signal corresponding to the first clock signal CLK.

【0077】計数部200は、4つのJKフリップフロ
ップ201ー1〜201ー4、8つの選択回路203ー
1〜203ー4、204ー1〜204ー4、3つのAN
Dゲート205、207、209とから構成されてい
る。
The counting section 200 includes four JK flip-flops 201-1 to 201-4, eight selection circuits 203-1 to 203-4, 204-1 to 204-4, and three ANs.
D gates 205, 207, and 209 are provided.

【0078】選択回路203ー1の0側入力端子には、
データとして1Bが入力され、1側入力端子には、選択
回路251の出力信号が入力されている。選択回路20
4ー1の0側入力端子には、データとして1Bが入力さ
れ、1側入力端子には、データとして0Bが入力されて
いる。選択回路203ー1及び204ー1はともに制御
信号であるセット信号SETの電位レベルに応じて2つ
の入力端子のいずれか一方に入力される信号(あるいは
データ)を選択し、出力するものである。
The 0-side input terminal of the selection circuit 203-1 has:
1B is input as data, and the output signal of the selection circuit 251 is input to the first input terminal. Selection circuit 20
In the 4-1 0-side input terminal, 1B is input as data, and in the 1-side input terminal, 0B is input as data. The selection circuits 203-1 and 204-1 both select and output a signal (or data) input to one of the two input terminals in accordance with the potential level of the set signal SET which is a control signal. .

【0079】図4においては、図1と同様に、選択回路
203ー1〜203ー4、204ー1〜204ー4のい
ずれにおいても、セット信号SETがLレベルの時に
は、0側入力端子が選択され、セット信号SETがHレ
ベルの時には、1側入力端子が選択されるものとしてい
る。このため、セット信号SETがLレベルの時には、
選択回路203ー1及び選択回路204ー1はともにデ
ータとして1Bに相当する信号を出力する。セット信号
SETがHレベルの時には、選択回路203ー1は選択
回路251の出力信号に応じた電位レベルの信号を出力
し、選択回路204ー1はデータとして0Bに相当する
信号を出力する。
In FIG. 4, similarly to FIG. 1, in any of the selection circuits 203-1 to 203-4 and 204-1 to 204-4, when the set signal SET is at the L level, the 0 side input terminal is When the set signal SET is at the H level, the 1-side input terminal is selected. Therefore, when the set signal SET is at the L level,
Both the selection circuit 203-1 and the selection circuit 204-1 output a signal corresponding to 1B as data. When the set signal SET is at the H level, the selection circuit 203-1 outputs a signal of a potential level corresponding to the output signal of the selection circuit 251, and the selection circuit 204-1 outputs a signal corresponding to 0B as data.

【0080】フリップフロップ201ー1のJ側入力端
子には選択回路203ー1から出力される信号が入力さ
れ、K側入力端子には選択回路204ー1から出力され
る信号が入力される。また、フリップフロップ201ー
1のクロック端子には信号SECLKが入力されてい
る。フリップフロップ201ー1は、信号SECLKの
立ち上がりエッジあるいは立ち下がりエッジのいずれか
一方に応じて動作するものであるが、ここでは、信号S
ECLKの立ち上がりエッジに応じて動作するものとし
て説明する。なお、後述する他のフリップフロップ20
1ー2〜201ー4も、信号SECLKの立ち上がりエ
ッジあるいは立ち下がりエッジのいずれか一方に応じて
動作するものであるが、ここでは、信号SECLKの立
ち上がりエッジに応じて動作するものとして説明する。
The signal output from the selection circuit 203-1 is input to the J-side input terminal of the flip-flop 201-1 and the signal output from the selection circuit 204-1 is input to the K-side input terminal. The signal SECLK is input to a clock terminal of the flip-flop 201-1. The flip-flop 201-1 operates in response to either the rising edge or the falling edge of the signal SECLK.
The description will be made assuming that the operation is performed according to the rising edge of ECLK. Note that another flip-flop 20 described later is used.
Although 1-2 to 201-4 also operate in response to either the rising edge or the falling edge of the signal SECLK, here, it is assumed that they operate in response to the rising edge of the signal SECLK.

【0081】セット信号SETがLレベルの時には、J
側入力端子及びK側入力端子にはともにデータとして1
Bが入力されるので、フリップフロップ201ー1は、
信号SECLKの立ち上がり毎に、フリップフロップ2
01ー1自身の出力端子Qから出力されていた信号の電
位レベルを反転した信号を信号OUT1として出力端子
Qから出力することとなる。また、セット信号SETが
Hレベルの時には、J側入力端子には選択回路251か
らの出力信号が実質的に入力され、K側入力端子にはデ
ータとして0Bが入力されるので、フリップフロップ2
01ー1は、信号SECLKの立ち上がりに応じて、選
択回路251の出力信号である信号R1あるいは信号R
2の電位レベル(あるいはデータの値)に応じた信号を
信号OUT1として出力端子Qから出力することとな
る。
When the set signal SET is at the L level, J
1 is used as data for both the
Since B is input, the flip-flop 201-1 becomes
Each time the signal SECLK rises, the flip-flop 2
A signal obtained by inverting the potential level of the signal output from its own output terminal Q is output from the output terminal Q as a signal OUT1. When the set signal SET is at the H level, the output signal from the selection circuit 251 is substantially input to the J-side input terminal, and 0B is input to the K-side input terminal as data.
01-1 is a signal R1 or a signal R1 which is an output signal of the selection circuit 251 in response to the rise of the signal SECLK.
A signal corresponding to the potential level of 2 (or the value of the data) is output from the output terminal Q as the signal OUT1.

【0082】選択回路203ー2の0側入力端子には、
信号OUT1が入力され、1側入力端子には、選択回路
252の出力信号が入力されている。選択回路204ー
1の0側入力端子には、信号OUT1が入力され、1側
入力端子には、データとして0Bが入力されている。こ
のため、セット信号SETがLレベルの時には、選択回
路203ー2及び選択回路204ー2はともに信号OU
T1に相当する信号を出力する。セット信号SETがH
レベルの時には、選択回路203ー2は選択回路252
の出力信号に応じた電位レベルの信号を出力し、選択回
路204ー2はデータとして0Bに相当する信号を出力
する。
The 0-side input terminal of the selection circuit 203-2 has
The signal OUT1 is input, and an output signal of the selection circuit 252 is input to a first input terminal. The signal OUT1 is input to the 0-side input terminal of the selection circuit 204-1, and 0B is input to the 1-side input terminal as data. For this reason, when the set signal SET is at the L level, both the selection circuits 203-2 and 204-2 output the signal OU.
A signal corresponding to T1 is output. Set signal SET is H
At the time of the level, the selection circuit 203-2 is connected to the selection circuit 252.
, And the selection circuit 204-2 outputs a signal corresponding to 0B as data.

【0083】フリップフロップ201ー2のJ側入力端
子には選択回路203ー2から出力される信号が入力さ
れ、K側入力端子には選択回路204ー2から出力され
る信号が入力される。また、フリップフロップ201ー
2のクロック端子に信号SECLKが入力されている。
The signal output from the selection circuit 202-2 is input to the J-side input terminal of the flip-flop 201-2, and the signal output from the selection circuit 204-2 is input to the K-side input terminal. The signal SECLK is input to a clock terminal of the flip-flop 201-2.

【0084】このため、セット信号SETがLレベルの
時には、J側入力端子及びK側入力端子にはともに信号
OUT1に相当する信号が入力される。つまり、信号O
UT1がLレベルであれば、フリップフロップ201ー
2は、信号SECLKの立ち上がり毎に、フリップフロ
ップ201ー2自身の出力端子Qから出力されていた信
号OUT2の電位レベルを維持した電位レベルの信号を
新たに信号OUT2として出力端子Qから出力するもの
である。信号OUT1がHレベルであれば、フリップフ
ロップ201ー2は、信号SECLKの立ち上がり毎
に、フリップフロップ201ー2自身の出力端子Qから
出力されていた信号OUT2の電位レベルを反転した信
号を新たに信号OUT2として出力端子Qから出力する
こととなる。また、セット信号SETがHレベルの時に
は、J側入力端子には選択回路252の出力信号が実質
的に入力され、K側入力端子にはデータとして0Bが入
力されるので、フリップフロップ201ー2は、信号S
ECLKの立ち上がりに応じて、信号R2あるいは信号
R3の電位レベル(あるいはデータの値)に応じた信号
を信号OUT2として出力端子Qから出力することとな
る。
Therefore, when the set signal SET is at the L level, a signal corresponding to the signal OUT1 is input to both the J-side input terminal and the K-side input terminal. That is, the signal O
When the UT1 is at the L level, the flip-flop 201-2 outputs a signal of a potential level that maintains the potential level of the signal OUT2 output from the output terminal Q of the flip-flop 201-2 at every rise of the signal SECLK. The signal is newly output from the output terminal Q as the signal OUT2. If the signal OUT1 is at the H level, the flip-flop 201-2 renews a signal obtained by inverting the potential level of the signal OUT2 output from the output terminal Q of the flip-flop 201-2 at every rise of the signal SECLK. The signal OUT2 is output from the output terminal Q. When the set signal SET is at the H level, the output signal of the selection circuit 252 is substantially input to the J-side input terminal, and 0B is input to the K-side input terminal as data. Is the signal S
In response to the rising edge of ECLK, a signal corresponding to the potential level (or data value) of signal R2 or signal R3 is output from output terminal Q as signal OUT2.

【0085】ANDゲート205には、信号OUT1、
OUT2が入力されている。このため、信号OUT1、
OUT2がともにHレベルの時に、ANDゲート205
はHレベルの信号を出力する。また、信号OUT1、O
UT2のいずれか一方あるいは両方がLレベルの時に、
ANDゲート205はLレベルの信号を出力する。
The AND gate 205 has a signal OUT 1,
OUT2 is input. Therefore, the signal OUT1,
When both OUT2 are at H level, AND gate 205
Outputs an H level signal. Also, the signals OUT1, O
When one or both of UT2 are at L level,
AND gate 205 outputs an L-level signal.

【0086】選択回路203ー3の0側入力端子には、
ANDゲート205の出力信号が入力され、1側入力端
子には、選択回路253の出力信号が入力されている。
選択回路204ー3の0側入力端子には、ANDゲート
205の出力信号が入力され、1側入力端子には、デー
タとして0Bが入力されている。このため、セット信号
SETがLレベルの時には、選択回路203ー3及び選
択回路204ー3はともにANDゲート205の出力信
号に相当する信号を出力する。セット信号SETがHレ
ベルの時には、選択回路203ー3は選択回路253の
出力信号として信号R3あるいは信号R4に応じた電位
レベルの信号を出力し、選択回路204ー3はデータと
して0Bに相当する信号を出力する。
The 0-side input terminal of the selection circuit 203-3 has
An output signal of the AND gate 205 is input, and an output signal of the selection circuit 253 is input to a first input terminal.
The output signal of the AND gate 205 is input to the 0-side input terminal of the selection circuit 204-3, and 0B is input to the 1-side input terminal as data. Therefore, when the set signal SET is at the L level, both the selection circuits 203-1 and 204-2 output a signal corresponding to the output signal of the AND gate 205. When the set signal SET is at the H level, the selection circuit 203-1 outputs a signal of a potential level corresponding to the signal R3 or the signal R4 as an output signal of the selection circuit 253, and the selection circuit 204-2 corresponds to 0B as data. Output a signal.

【0087】フリップフロップ201ー3のJ側入力端
子には選択回路203ー3から出力される信号が入力さ
れ、K側入力端子には選択回路204ー3から出力され
る信号が入力される。また、フリップフロップ201ー
3のクロック端子に信号SECLKが入力されている。
The signal output from the selection circuit 203-1 is input to the J-side input terminal of the flip-flop 201-3, and the signal output from the selection circuit 204-3 is input to the K-side input terminal. The signal SECLK is input to a clock terminal of the flip-flop 201-3.

【0088】セット信号SETがLレベルの時には、J
側入力端子及びK側入力端子にはともにANDゲート2
05の出力信号に相当する信号が入力される。つまり、
ANDゲート205の出力信号がLレベルであれば、フ
リップフロップ201ー3は、信号SECLKの立ち上
がり毎に、フリップフロップ201ー3自身の出力端子
Qから出力されていた信号OUT3の電位レベルを維持
した電位レベルの信号を新たに信号OUT3として出力
端子Qから出力するものである。ANDゲート205の
出力信号がHレベルであれば、フリップフロップ201
ー3は、信号SECLKの立ち上がり毎に、フリップフ
ロップ201ー3自身の出力端子Qから出力されていた
信号OUT3の電位レベルを反転した信号を新たに信号
OUT3として出力端子Qから出力することとなる。ま
た、セット信号SETがHレベルの時には、J側入力端
子には選択回路253の出力信号が実質的に入力され、
K側入力端子にはデータとして0Bが入力されるので、
フリップフロップ201ー3は、信号SECLKの立ち
上がりに応じて、選択回路253から出力される信号R
3あるいは信号R4の電位レベル(あるいはデータの
値)に応じた信号を信号OUT3として出力端子Qから
出力することとなる。
When the set signal SET is at L level, J
An AND gate 2 is connected to both input terminals
A signal corresponding to the output signal 05 is input. That is,
If the output signal of the AND gate 205 is at the L level, the flip-flop 201-3 maintains the potential level of the signal OUT3 output from the output terminal Q of the flip-flop 201-3 at every rise of the signal SECLK. The signal of the potential level is newly output from the output terminal Q as the signal OUT3. If the output signal of AND gate 205 is at H level, flip-flop 201
-3 outputs a signal obtained by inverting the potential level of the signal OUT3 output from the output terminal Q of the flip-flop 201-3 itself as a new signal OUT3 from the output terminal Q every time the signal SECLK rises. . When the set signal SET is at the H level, the output signal of the selection circuit 253 is substantially input to the J-side input terminal,
Since 0B is input as data to the K-side input terminal,
The flip-flop 201-3 outputs the signal R output from the selection circuit 253 in response to the rise of the signal SECLK.
3 or a signal corresponding to the potential level (or data value) of the signal R4 is output from the output terminal Q as the signal OUT3.

【0089】ANDゲート207には、信号OUT3及
びANDゲート205の出力信号がそれぞれ入力されて
いる。このため、信号OUT3及びANDゲート205
の出力信号がともにHレベルの時に、ANDゲート20
7はHレベルの信号NXを出力する。また、信号OUT
3及びANDゲート205の出力信号のいずれか一方あ
るいは両方がLレベルの時に、ANDゲート207はL
レベルの信号NXを出力する。
The signal OUT 3 and the output signal of the AND gate 205 are input to the AND gate 207. Therefore, the signal OUT3 and the AND gate 205
Are both at the H level, the AND gate 20
7 outputs an H level signal NX. Also, the signal OUT
3 and one or both of the output signals of the AND gate 205 are at the L level, the AND gate 207 becomes the L level.
The level signal NX is output.

【0090】選択回路203ー4の0側入力端子には、
信号NXが入力され、1側入力端子には、選択回路25
4の出力信号が入力されている。選択回路204ー4の
0側入力端子には、信号NXが入力され、1側入力端子
には、データとして0Bが入力されている。このため、
セット信号SETがLレベルの時には、選択回路203
ー4及び選択回路204ー4はともに信号NXに相当す
る信号を出力する。セット信号SETがHレベルの時に
は、選択回路203ー4は選択回路254の出力信号と
して信号R4に応じた電位レベルの信号あるいはレジス
タ273に格納されたデータとして1Bを出力し、選択
回路204ー4はデータとして0Bに相当する信号を出
力する。
The 0-side input terminal of the selection circuit 203-4 has
The signal NX is input, and the selection circuit 25 is
4 is input. The signal NX is input to the 0-side input terminal of the selection circuit 204-4, and 0B is input to the 1-side input terminal as data. For this reason,
When the set signal SET is at the L level, the selection circuit 203
-4 and the selection circuit 204-4 both output a signal corresponding to the signal NX. When the set signal SET is at the H level, the selection circuit 203-4 outputs 1B as a signal of a potential level corresponding to the signal R4 or 1B as data stored in the register 273 as an output signal of the selection circuit 254. Outputs a signal corresponding to 0B as data.

【0091】フリップフロップ201ー4のJ側入力端
子には選択回路203ー4から出力される信号が入力さ
れ、K側入力端子には選択回路204ー4から出力され
る信号が入力される。また、フリップフロップ201ー
4のクロック端子には信号SECLKが入力されてい
る。
The signal output from the selection circuit 203-4 is input to the J-side input terminal of the flip-flop 201-4, and the signal output from the selection circuit 204-4 is input to the K-side input terminal. The signal SECLK is input to the clock terminal of the flip-flop 201-4.

【0092】セット信号SETがLレベルの時には、J
側入力端子及びK側入力端子にはともに信号NXに相当
する信号が入力される。つまり、信号NXがLレベルで
あれば、フリップフロップ201ー4は、信号SECL
Kの立ち上がり毎に、フリップフロップ201ー4自身
の出力端子Qから出力されていた信号OUT4の電位レ
ベルを維持した電位レベルの信号を新たに信号OUT4
として出力端子Qから出力するものである。信号NXが
Hレベルであれば、フリップフロップ201ー4は、信
号SECLKの立ち上がり毎に、フリップフロップ20
1ー4自身の出力端子Qから出力されていた信号OUT
4の電位レベルを反転した信号を新たに信号OUT4と
して出力端子Qから出力することとなる。また、セット
信号SETがHレベルの時には、J側入力端子には選択
回路254の出力信号が実質的に入力され、K側入力端
子にはデータとして0Bが入力されるので、フリップフ
ロップ201ー4は、信号SECLKの立ち上がりに応
じて、選択回路254から出力される信号R4の電位レ
ベル(あるいはデータの値)に応じた信号あるいはデー
タとして1Bに相当する信号を出力端子Qから出力する
こととなる。
When the set signal SET is at the L level, J
A signal corresponding to the signal NX is input to both the side input terminal and the K side input terminal. That is, when the signal NX is at the L level, the flip-flop 201-4 outputs the signal SECL.
Each time K rises, a signal of a potential level that maintains the potential level of the signal OUT4 output from the output terminal Q of the flip-flop 201-4 itself is newly added to the signal OUT4.
Is output from the output terminal Q. When the signal NX is at the H level, the flip-flop 201-4 causes the flip-flop 20-4 to rise every time the signal SECLK rises.
The signal OUT output from the output terminal Q of 1-4 itself.
4 is output from the output terminal Q as a new signal OUT4. When the set signal SET is at the H level, the output signal of the selection circuit 254 is substantially input to the J-side input terminal, and 0B is input to the K-side input terminal as data. Outputs a signal corresponding to the potential level (or data value) of the signal R4 output from the selection circuit 254 or a signal corresponding to 1B as data from the output terminal Q in response to the rise of the signal SECLK. .

【0093】ANDゲート209には、信号OUT4及
び信号NXがそれぞれ入力されている。このため、信号
OUT4及び信号NXがともにHレベルの時に、AND
ゲート209はHレベルの信号を出力する。また、信号
OUT4及び信号NXのいずれか一方あるいは両方がL
レベルの時に、ANDゲート209はLレベルの信号を
出力する。このANDゲート209の出力信号がカウン
ト回路222のキャリ信号CARRYとなる。
The signal OUT4 and the signal NX are input to the AND gate 209. Therefore, when both the signal OUT4 and the signal NX are at the H level, AND
Gate 209 outputs an H level signal. Further, one or both of the signal OUT4 and the signal NX are at L level.
At the time of the level, the AND gate 209 outputs an L level signal. The output signal of the AND gate 209 becomes the carry signal CARRY of the count circuit 222.

【0094】このように、選択回路203ー1〜203
ー4、204ー1〜204ー4、フリップフロップ20
1ー1〜201ー4、ANDゲート205、207によ
り4ビット分のカウントを行うものである。より詳細に
は、セット信号SETがHレベルの時に、各フリップフ
ロップ201ー1〜201ー4はそれぞれ選択回路25
1〜254から出力される信号の電位レベルに応じた信
号を格納し、出力することができる。これにより、初期
値が計数部200に格納されたこととなる。
As described above, the selection circuits 203-1 to 203-3
-4, 204-1 to 204-4, flip-flop 20
4-bit counts are performed by 1-1 to 201-4 and AND gates 205 and 207. More specifically, when the set signal SET is at the H level, each of the flip-flops 201-1 to 201-4 is connected to the selection circuit 25.
Signals corresponding to the potential levels of the signals output from 1 to 254 can be stored and output. Thus, the initial value is stored in the counting unit 200.

【0095】なお、計数部200に格納される初期値
は、レジスタ10に格納された初期値の最下位ビットの
値によって異なるものとなる。
The initial value stored in the counting section 200 depends on the value of the least significant bit of the initial value stored in the register 10.

【0096】詳細には、初期値の最下位ビットがデータ
として1Bに相当する場合には、検出回路230の出力
信号JVがLレベルとなるので、レジスタ10から信号
R1〜R4として出力されている初期データがそれぞれ
初期データ制御回路250からそのまま出力されること
となる。このため、レジスタ10から信号R1〜R4と
して出力されている初期データがそれぞれフリップフロ
ップ201ー1〜201ー4に格納されることとなる。
例えば、レジスタ10に格納された初期値が0001B
であったとすれば、フリップフロップ201ー1には初
期データとして1Bが、フリップフロップ201ー2〜
201ー4には初期データとしてそれぞれ0Bが格納さ
れる。初期値の最下位ビットがデータとして1Bに相当
する場合、選択回路271の出力信号SECLKは第1
のクロック信号CLKに応じたものとなる。
More specifically, when the least significant bit of the initial value corresponds to 1B as data, the output signal JV of the detection circuit 230 goes low, so that it is output from the register 10 as signals R1 to R4. The initial data is output directly from the initial data control circuit 250. Therefore, the initial data output from the register 10 as the signals R1 to R4 are stored in the flip-flops 201-1 to 201-4, respectively.
For example, if the initial value stored in the register 10 is 0001B
, The flip-flop 201-1 has 1B as initial data, and the flip-flops 201-2 to 201-2.
0B is stored in 201-4 as initial data. When the least significant bit of the initial value corresponds to 1B as data, the output signal SECLK of the selection circuit 271 becomes the first signal.
In response to the clock signal CLK.

【0097】初期値の最下位ビットがデータとして0B
に相当する場合には、検出回路230の出力信号JVが
Hレベルとなるので、レジスタ10から信号R1〜R4
として出力されている初期データは、信号R2〜R4、
及びレジスタ273に格納されたデータが初期データ制
御回路250から出力されることとなる。このため、信
号R2〜R4として出力されている初期データ及びレジ
スタ273に格納されたデータがそれぞれフリップフロ
ップ201ー1〜201ー4に格納されることとなる。
例えば、レジスタ10に格納された初期値が0010B
であったとすれば、フリップフロップ201ー1には初
期データとして1Bが、フリップフロップ201ー2、
201ー3には初期データとしてそれぞれ0Bが、フリ
ップフロップ201ー4には初期データとしてレジスタ
273からの出力データの1Bが格納される。初期値の
最下位ビットがデータとして0Bに相当する場合、選択
回路271の出力信号SECLKは第2のクロック信号
CLK/2に応じたものとなる。
The least significant bit of the initial value is 0B as data.
, The output signal JV of the detection circuit 230 goes to the H level.
Are output as signals R2 to R4,
And the data stored in the register 273 are output from the initial data control circuit 250. Therefore, the initial data output as the signals R2 to R4 and the data stored in the register 273 are stored in the flip-flops 201-1 to 201-4, respectively.
For example, if the initial value stored in the register 10 is 0010B
, The flip-flop 201-1 has 1B as initial data, the flip-flop 201-2,
0B is stored as initial data in 201-3, and 1B of output data from the register 273 is stored in flip-flop 201-4 as initial data. When the least significant bit of the initial value corresponds to 0B as data, the output signal SECLK of the selection circuit 271 corresponds to the second clock signal CLK / 2.

【0098】この後、セット信号SETをLレベルとし
て、カウント回路222は、信号SECLKの立ち上が
りエッジに応じて、各フリップフロップ201ー1〜2
01ー4が動作してカウント動作を実現する。
After that, the set signal SET is set to the L level, and the count circuit 222 responds to the rising edge of the signal SECLK by using the flip-flops 201-1 to 201-2.
01-4 operates to implement the counting operation.

【0099】ANDゲート205、207、209の構
成全体として見れば、フリップフロップ201ー1〜2
01ー4それぞれが出力するデータが全て1Bの時に、
ANDゲート209からHレベルのキャリ信号CARR
Yを出力する。
In terms of the entire configuration of the AND gates 205, 207, and 209, the flip-flops 201-1 to 201-2
When all the data output from 01-4 are 1B,
AND-level carry signal CARR from AND gate 209
Outputs Y.

【0100】以上のように構成されたカウント回路22
2の動作についてを以下に詳細に説明する。図5は第2
の実施の形態におけるカウント回路222の動作を説明
するタイミングチャートである。なお、図5は、カウン
ト回路222に設定される初期値が0001Bの場合の
動作例である。図5において、CLKは第1のクロック
信号CLKを、CLK/2は第2のクロック信号CLK
/2を、SECLKは選択回路271の出力信号SEC
LKを、SETはセット信号SETを、R1〜R4はそ
れぞれレジスタ10の出力信号である信号R1〜R4
を、JVは検出回路230の出力である信号JVを、O
UT1〜OUT4はフリップフロップ201ー1〜20
1ー4の出力である信号OUT1〜OUT4を、NXは
ANDゲート207の出力である信号NXを、CARR
Yはキャリ信号CARRYをそれぞれ示している。
The counting circuit 22 configured as described above
Operation 2 will be described in detail below. FIG. 5 shows the second
9 is a timing chart illustrating an operation of the count circuit 222 according to the embodiment. FIG. 5 is an operation example when the initial value set in the count circuit 222 is 0001B. In FIG. 5, CLK represents the first clock signal CLK, and CLK / 2 represents the second clock signal CLK.
/ 2, SECLK is the output signal SEC of the selection circuit 271
LK, SET is a set signal SET, and R1 to R4 are signals R1 to R4 which are output signals of the register 10, respectively.
And JV is the signal JV output from the detection circuit 230,
UT1 to OUT4 are flip-flops 201-1 to 20-1
Signals OUT1 to OUT4, which are outputs of 1-4, and signal NX, which is an output of AND gate 207, is output from CARR.
Y indicates the carry signal CARRY.

【0101】まず、時刻t0の前に、セット信号SET
がHレベルとなる。このため、選択回路203ー1〜2
03ー4、204ー1〜204ー4それぞれは1側入力
端子から入力されている信号を出力として選択する。な
お、時刻t0の前においてのフリップフロップ201ー
1〜201ー4それぞれ出力信号OUT1〜OUT4は
Lレベルであるとする。また、初期値が0001Bなの
で、選択回路271の出力信号SECLKは第1のクロ
ック信号CLKに応じたものとなる。
First, before time t0, set signal SET
Becomes H level. Therefore, the selection circuits 203-1 to 203-2
Each of 03-4 and 204-1 to 204-4 selects a signal input from the first input terminal as an output. Note that the output signals OUT1 to OUT4 of the flip-flops 201-1 to 201-4 before the time t0 are at the L level. In addition, since the initial value is 0001B, the output signal SECLK of the selection circuit 271 corresponds to the first clock signal CLK.

【0102】時刻t0における信号SECLKの立ち上
がりエッジに応じて、フリップフロップ201ー1〜2
01ー4には、それぞれカウントの初期値を設定するた
めの初期データとして初期データ制御回路250からの
出力信号に応じたデータを格納する。図5の場合は、検
出回路230の出力信号JVがLレベルであるため、フ
リップフロップ201ー1〜201ー4には、それぞれ
信号R1〜R4に応じた信号を格納し、信号OUT1〜
OUT4として出力する。なお、初期値は0001Bで
あるため、フリップフロップ201ー1の出力信号OU
T1はHレベルになり、フリップフロップ201ー2〜
201ー4の出力信号OUT2〜OUT4はそれぞれL
レベルのままである。
In response to the rising edge of signal SECLK at time t0, flip-flops 201-1 to 201-2
01-4 stores data corresponding to the output signal from the initial data control circuit 250 as initial data for setting an initial value of the count. In the case of FIG. 5, since the output signal JV of the detection circuit 230 is at the L level, signals corresponding to the signals R1 to R4 are stored in the flip-flops 201-1 to 201-4, respectively, and the signals OUT1 to OUT4 are stored.
Output as OUT4. Since the initial value is 0001B, the output signal OU of the flip-flop 201-1 is output.
T1 becomes H level and flip-flops 201-2 to 201-2
The output signals OUT2 to OUT4 of 201-4 are L
Remains at the level.

【0103】時刻t1の前にセット信号SETはLレベ
ルとなる。このため、選択回路203ー1〜203ー
4、204ー1〜204ー4それぞれは0側入力端子か
ら入力されている信号を出力として選択する。
Before time t1, set signal SET attains an L level. Therefore, each of the selection circuits 203-1 to 203-4 and 204-1 to 204-4 selects a signal input from the 0-side input terminal as an output.

【0104】時刻t1における信号SECLKの立ち上
がりエッジに応じて、各フリップフロップ201ー1〜
201ー4はそれぞれJ側入力端子及びK側入力端子に
入力される信号の電位レベルに応じた電位レベルを有す
る信号を信号OUT1〜OUT4として出力する。な
お、上述したように、選択回路271の出力信号SEC
LKは第1のクロック信号CLKに応じたものであるた
め、各フリップフロップ201ー1〜201ー4は実質
的に第1のクロック信号CLKの立ち上がりエッジに応
じて通常の動作を行うこととなる。
In response to the rising edge of signal SECLK at time t1, each of flip-flops 201-1 to 201-1
201-4 outputs signals having potential levels corresponding to the potential levels of the signals input to the J-side input terminal and the K-side input terminal, respectively, as signals OUT1 to OUT4. Note that, as described above, the output signal SEC of the selection circuit 271 is output.
Since LK is in response to the first clock signal CLK, each of the flip-flops 201-1 to 201-4 performs a normal operation substantially in response to the rising edge of the first clock signal CLK. .

【0105】時刻t2における信号SECLKの立ち上
がりエッジに応じて、フリップフロップ201ー1から
の出力信号OUT1がHレベルとなり、カウント数が1
1Bとなる。このため、ANDゲート205の出力信号
はHレベルとなる。しかしながら、フリップフロップ2
01ー3、201ー4の出力信号OUT3、OUT4は
ともにLレベルであるため、ANDゲート207の出力
信号NX及びANDゲート209の出力であるキャリ信
号CARRYはLレベルが維持される。
In response to the rising edge of signal SECLK at time t2, output signal OUT1 from flip-flop 201-1 attains an H level, and the count number becomes one.
1B. Therefore, the output signal of the AND gate 205 becomes H level. However, flip-flop 2
Since the output signals OUT3 and OUT4 of 01-3 and 201-4 are both at the L level, the output signal NX of the AND gate 207 and the carry signal CARRY output from the AND gate 209 are maintained at the L level.

【0106】この後、時刻t3〜t5にてカウント数が
それぞれ、100B、101B、110Bとなる。時刻
t6における信号SECLKの立ち上がりエッジに応じ
て、フリップフロップ201ー1からの出力信号OUT
1がHレベルとなり、カウント数が111Bとなる。こ
のため、ANDゲート207の出力信号NXはHレベル
となる。しかしながら、フリップフロップ201ー4の
出力信号OUT4はLレベルである。よって、ANDゲ
ート209の出力であるキャリ信号CARRYはLレベ
ルが維持される。
Thereafter, from time t3 to time t5, the counts become 100B, 101B, and 110B, respectively. In response to the rising edge of signal SECLK at time t6, output signal OUT from flip-flop 201-1
1 becomes H level, and the count number becomes 111B. Therefore, the output signal NX of the AND gate 207 becomes H level. However, the output signal OUT4 of the flip-flop 201-4 is at the L level. Therefore, carry signal CARRY output from AND gate 209 is maintained at the L level.

【0107】この後、時刻t7〜t9にてカウント数が
それぞれ、1000B、1001B、1010Bとな
る。時刻t10における信号SECLKの立ち上がりエ
ッジに応じて、フリップフロップ201ー1からの出力
信号OUT1がHレベルとなり、カウント数が1011
Bとなる。このため、ANDゲート105の出力信号は
Hレベルとなる。しかしながら、フリップフロップ10
1ー3の出力信号OUT3はLレベルであるため、AN
Dゲート207の出力信号NXはLレベルである。よっ
て、ANDゲート209の出力であるキャリ信号CAR
RYはLレベルが維持される。
Thereafter, from time t7 to t9, the counts become 1000B, 1001B, and 1010B, respectively. In response to the rising edge of the signal SECLK at the time t10, the output signal OUT1 from the flip-flop 201-1 becomes H level, and the count number becomes 1011.
B. Therefore, the output signal of the AND gate 105 becomes H level. However, flip-flop 10
Since the output signal OUT3 of 1-3 is at L level,
Output signal NX of D gate 207 is at L level. Therefore, carry signal CAR output from AND gate 209 is output.
RY is maintained at the L level.

【0108】この後、時刻t11〜t13にてカウント
数がそれぞれ、1100B、1101B、1110Bと
なる。時刻t14における信号SECLKの立ち上がり
エッジに応じて、フリップフロップ201ー1からの出
力信号OUT1がHレベルとなり、カウント数が111
1Bとなる。このため、ANDゲート205の出力信号
はHレベルとなる。このとき、フリップフロップ101
ー3、104ー4の出力信号OUT3、OUT4もとも
にHレベルであるため、ANDゲート207の出力信号
NXはHレベルとなり、ANDゲート209の出力であ
るキャリ信号CARRYはHレベルになる。
Thereafter, at times t11 to t13, the counts become 1100B, 1101B, and 1110B, respectively. In response to the rising edge of the signal SECLK at time t14, the output signal OUT1 from the flip-flop 201-1 becomes H level, and the count number becomes 111.
1B. Therefore, the output signal of the AND gate 205 becomes H level. At this time, the flip-flop 101
Since the output signals OUT3 and OUT4 of -3 and 104-4 are both at the H level, the output signal NX of the AND gate 207 is at the H level, and the carry signal CARRY output from the AND gate 209 is at the H level.

【0109】次に、時刻t15における信号SECLK
の立ち上がりエッジに応じて、各フリップフロップ20
1ー1〜201ー4の出力信号OUT1〜OUT4はそ
れぞれLレベルとなり、カウント数が0000Bに戻る
こととなる。このため、キャリ信号CARRYもLレベ
ルとなる。
Next, signal SECLK at time t15
Of each flip-flop 20 in response to the rising edge of
The output signals OUT1 to OUT4 1-1 to 201-4 become L level, respectively, and the count number returns to 0000B. Therefore, carry signal CARRY is also at L level.

【0110】時刻t16における信号SECLKの立ち
上がりエッジに応じて、フリップフロップ201ー1か
らの出力信号OUT1がHレベルとなり、カウント数が
1Bとなる。時刻t17以降は、時刻t1以降と同様な
動作が行われる。
In response to the rising edge of signal SECLK at time t16, output signal OUT1 from flip-flop 201-1 goes high, and the count number becomes 1B. After time t17, the same operation as after time t1 is performed.

【0111】このように、初期値が0001Bのよう
に、初期値における最下位ビットに対する初期データが
1Bの時には、第1のクロック信号CLKに応じた4ビ
ットカウンタとして動作することができる。
As described above, when the initial data for the least significant bit in the initial value is 1B, such as when the initial value is 0001B, it can operate as a 4-bit counter corresponding to the first clock signal CLK.

【0112】次に、最下位ビットに対する初期データが
0Bの場合の例についてを説明する。図6は第2の実施
の形態におけるカウント回路222の動作を説明するタ
イミングチャートである。なお、図6は、カウント回路
222に設定される初期値が1010Bの場合の動作例
である。なお、レジスタ273には予めデータとして1
Bが格納されているものとする。
Next, an example in which the initial data for the least significant bit is 0B will be described. FIG. 6 is a timing chart for explaining the operation of the count circuit 222 according to the second embodiment. FIG. 6 is an operation example when the initial value set in the count circuit 222 is 1010B. The register 273 stores 1 as data in advance.
B is assumed to be stored.

【0113】まず、時刻t0の前に、セット信号SET
がHレベルとなる。このため、選択回路203ー1〜2
03ー4、204ー1〜204ー4それぞれは1側入力
端子から入力されている信号を出力として選択する。な
お、時刻t0の前においてのフリップフロップ201ー
1〜201ー4それぞれ出力信号OUT1〜OUT4は
Lレベルであるとする。また、初期値が1010Bなの
で、選択回路271の出力信号SECLKは第2のクロ
ック信号CLK/2に応じたものとなる。このため、各
フリップフロップ201ー1〜201ー4は実質的に第
2のクロック信号CLK/2の立ち上がりエッジに応じ
て通常の動作を行うこととなる。
First, before time t0, set signal SET
Becomes H level. Therefore, the selection circuits 203-1 to 203-2
Each of 03-4 and 204-1 to 204-4 selects a signal input from the first input terminal as an output. Note that the output signals OUT1 to OUT4 of the flip-flops 201-1 to 201-4 before the time t0 are at the L level. In addition, since the initial value is 1010B, the output signal SECLK of the selection circuit 271 corresponds to the second clock signal CLK / 2. Therefore, each of the flip-flops 201-1 to 201-4 performs a normal operation substantially according to the rising edge of the second clock signal CLK / 2.

【0114】時刻t0における信号SECLKの立ち上
がりエッジに応じて、フリップフロップ201ー1〜2
01ー4には、それぞれカウントの初期値を設定するた
めの初期データとして初期データ制御回路250からの
出力信号に応じたデータを格納する。図6の場合は、検
出回路230の出力信号JVがHレベルであるため、フ
リップフロップ201ー1〜201ー4には、それぞれ
信号R2〜R4に応じた信号及びレジスタ273に格納
されたデータを格納し、信号OUT1〜OUT4として
出力する。なお、初期値は1010Bであるため、フリ
ップフロップ201ー1、201ー3、201ー4の出
力信号OUT1、OUT3,OUT4はいずれもHレベ
ルになり、フリップフロップ201ー2の出力信号OU
T2はLレベルとなる。言い換えると、初期値1010
Bの代わりに初期値1101Bがフリップフロップ20
1ー1〜201ー4に格納されることとなる。
In response to the rising edge of signal SECLK at time t0, flip-flops 201-1 to 201-2
01-4 stores data corresponding to the output signal from the initial data control circuit 250 as initial data for setting an initial value of the count. In the case of FIG. 6, since the output signal JV of the detection circuit 230 is at the H level, the flip-flops 201-1 to 201-4 store the signals corresponding to the signals R2 to R4 and the data stored in the register 273, respectively. It is stored and output as signals OUT1 to OUT4. Since the initial value is 1010B, the output signals OUT1, OUT3, and OUT4 of the flip-flops 201-1, 201-3, and 201-4 all become H level, and the output signal OU of the flip-flop 201-2 is output.
T2 is at the L level. In other words, the initial value 1010
The initial value 1101B is replaced by the flip-flop 20 instead of B.
1-1 to 201-4.

【0115】時刻t1の前にセット信号SETはLレベ
ルとなる。このため、選択回路203ー1〜203ー
4、204ー1〜204ー4それぞれは0側入力端子か
ら入力されている信号を出力として選択する。
Before time t1, set signal SET attains an L level. Therefore, each of the selection circuits 203-1 to 203-4 and 204-1 to 204-4 selects a signal input from the 0-side input terminal as an output.

【0116】時刻t2における信号SECLKの立ち上
がりエッジに応じて、各フリップフロップ201ー1〜
201ー4はそれぞれJ側入力端子及びK側入力端子に
入力される信号の電位レベルに応じた電位レベルを有す
る信号を信号OUT1〜OUT4として出力する。な
お、上述したように、選択回路271の出力信号SEC
LKは第2のクロック信号CLKに応じたものであるた
め、各フリップフロップ201ー1〜201ー4は実質
的に第2のクロック信号CLKの立ち上がりエッジに応
じて通常の動作を行うこととなる。時刻t2におけるカ
ウント数は1110Bとなる。
In response to the rising edge of signal SECLK at time t2, each of flip-flops 201-1 to 201-1
201-4 outputs signals having potential levels corresponding to the potential levels of the signals input to the J-side input terminal and the K-side input terminal, respectively, as signals OUT1 to OUT4. Note that, as described above, the output signal SEC of the selection circuit 271 is output.
Since LK is in response to the second clock signal CLK, each of the flip-flops 201-1 to 201-4 performs a normal operation substantially in response to the rising edge of the second clock signal CLK. . The count number at time t2 is 1110B.

【0117】時刻t4における信号SECLKの立ち上
がりエッジに応じて、フリップフロップ201ー1から
の出力信号OUT1がHレベルとなり、カウント数が1
111Bとなる。このため、ANDゲート205の出力
信号はHレベルとなる。このとき、フリップフロップ1
01ー3、104ー4の出力信号OUT3、OUT4も
ともにHレベルであるため、ANDゲート207の出力
信号NXはHレベルとなり、ANDゲート209の出力
であるキャリ信号CARRYはHレベルになる。
In response to the rising edge of signal SECLK at time t4, output signal OUT1 from flip-flop 201-1 attains an H level, and the count number becomes one.
111B. Therefore, the output signal of the AND gate 205 becomes H level. At this time, flip-flop 1
Since the output signals OUT3 and OUT4 of 01-3 and 104-4 are both at H level, the output signal NX of the AND gate 207 becomes H level, and the carry signal CARRY output from the AND gate 209 becomes H level.

【0118】つまり、初期値を格納した時刻t0の後、
時刻t2、時刻t4において各フリップフロップ201
ー1〜201ー4をそれぞれ2回動作させることで、キ
ャリ信号CARRYがHレベルとなる。キャリ信号CA
RRYは時刻t6までHレベルを維持する。
That is, after time t0 when the initial value is stored,
At time t2 and time t4, each flip-flop 201
By operating each of -1 to 201-4 twice, the carry signal CARRY becomes H level. Carry signal CA
RRY maintains the H level until time t6.

【0119】ここで、初期値である1010Bを、その
まま時刻t0にて計数部200に格納し、第1のクロッ
ク信号CLKにてカウント動作を行った場合を考慮して
みる。この場合、カウント数は、時刻t1で1011
B、時刻t2で1100B、時刻t3で1101B、時
刻t4で1110B、時刻t5で1111Bとなる。こ
のため、時刻t5においてキャリ信号CARRYがHレ
ベルとなる。
Here, consider the case where the initial value 1010B is stored in the counting section 200 at time t0 as it is, and the count operation is performed with the first clock signal CLK. In this case, the count number is 1011 at time t1.
B, 1100B at time t2, 1101B at time t3, 1110B at time t4, and 1111B at time t5. Therefore, carry signal CARRY attains H level at time t5.

【0120】このように、第2の実施の形態におけるカ
ウント回路222によれば、初期値の最下位ビットが0
Bの時には、計数部200を構成するフリップフロップ
201ー1〜201ー4の動作回数を減らしても必要な
タイミング(上述の例では時刻t5)でキャリ信号CA
RRYをHレベルにしておくことができる。
As described above, according to the count circuit 222 in the second embodiment, the least significant bit of the initial value is 0.
In the case of B, even if the number of operations of the flip-flops 201-1 to 201-4 constituting the counting unit 200 is reduced, the carry signal CA is required at a necessary timing (time t5 in the above example).
RRY can be kept at the H level.

【0121】なお、図6においては、時刻t4にてキャ
リ信号CARRYがLレベルからHレベルになっている
が、時刻t5にてキャリ信号CARRYをLレベルから
Hレベルにしたい場合には、例えば、次のようにすれば
よい。
In FIG. 6, carry signal CARRY changes from the L level to the H level at time t4. However, when it is desired to change carry signal CARRY from the L level to the H level at time t5, for example, You can do as follows.

【0122】図7に示すように、Dフリップフロップ2
91とインバータ293と2入力1出力の選択回路29
5を図4におけるキャリ信号CARRYの出力側に設け
る。フリップフロップ291の入力端子Dにはキャリ信
号CARRYが入力されている。フリップフロップ29
1のクロック端子には第1のクロック信号CLKが入力
されている。フリップフロップ291のリセット端子R
にはキャリ信号CARRYがインバータ293を介して
入力されている。
As shown in FIG. 7, D flip-flop 2
91, an inverter 293 and a 2-input / 1-output selection circuit 29
5 is provided on the output side of the carry signal CARRY in FIG. Carry signal CARRY is input to input terminal D of flip-flop 291. Flip-flop 29
The first clock signal CLK is input to one clock terminal. Reset terminal R of flip-flop 291
, A carry signal CARRY is input via an inverter 293.

【0123】選択回路295の1側入力端子にはフリッ
プフロップ291の出力信号が入力され、0側入力端子
にはキャリ信号CARRYが入力されている。選択回路
295の出力を選択制御する信号として、検出回路23
0の出力信号JVが入力されている。
The output signal of the flip-flop 291 is input to the 1-side input terminal of the selection circuit 295, and the carry signal CARRY is input to the 0-side input terminal. As a signal for selectively controlling the output of the selection circuit 295, the detection circuit 23
An output signal JV of 0 is input.

【0124】図7の回路を設けることで次のような出力
が可能となる。まず、図5のように、初期値の最下位ビ
ットが1Bの場合には、信号JVはLレベルとなるの
で、選択回路295は実質的にキャリ信号CARRYが
出力信号SECARRYとして出力されることとなる。
このため、信号SECARRYをカウント回路222の
キャリ信号として扱えば、カウント回路222は、図5
に示すタイミングチャートの動作をそのまま実現でき
る。
By providing the circuit of FIG. 7, the following output is possible. First, as shown in FIG. 5, when the least significant bit of the initial value is 1B, the signal JV is at the L level, so that the selection circuit 295 substantially outputs the carry signal CARRY as the output signal SECARRY. Become.
Therefore, if the signal SECARRY is handled as a carry signal of the count circuit 222, the count circuit 222
The operation of the timing chart shown in FIG.

【0125】また、図6のように、初期値の最下位ビッ
トが0Bの場合には、信号JVはHレベルとなるので、
選択回路295はフリップフロップ291の出力信号に
応じた信号を出力信号SECARRYとして出力するこ
ととなる。
Also, as shown in FIG. 6, when the least significant bit of the initial value is 0B, the signal JV goes to H level.
The selection circuit 295 outputs a signal corresponding to the output signal of the flip-flop 291 as the output signal SECARRY.

【0126】ここで、図6に示す時刻t0〜t3におい
ては、キャリ信号CARRYはLレベルであるため、フ
リップフロップ291のリセット端子RにはHレベルの
信号が入力された状態となる。このため、フリップフロ
ップ291はリセットされた状態が維持され、第1のク
ロック信号CLKの立ち上がりエッジに対しても動作す
ることがない。よって、フリップフロップ291の出力
信号はLレベルが維持される。
Here, from time t0 to time t3 shown in FIG. 6, since carry signal CARRY is at L level, flip-flop 291 is in a state where a signal at H level is inputted to reset terminal R. Therefore, the flip-flop 291 is maintained in the reset state, and does not operate even with the rising edge of the first clock signal CLK. Therefore, the output signal of the flip-flop 291 is maintained at the L level.

【0127】図6に示す時刻t4において、キャリ信号
CARRYがHレベルとなるので、フリップフロップ2
91のリセット端子RにはLレベルの信号が入力され、
リセット状態が解除される。ここで、第1のクロック信
号CLKの立ち上がりは、第2のクロック信号CLK/
2の電位レベルの変化に同期しており、Hレベルのキャ
リ信号CARRYがフリップフロップ291に伝達され
るまでには、計数部200におけるカウント動作分の遅
延があるため、時刻t4における第1のクロック信号C
LKの立ち上がりエッジに対してはフリップフロップ2
91は動作しない。
At time t4 shown in FIG. 6, carry signal CARRY attains H level, so that flip-flop 2
An L-level signal is input to the reset terminal R of 91,
The reset state is released. Here, the rising of the first clock signal CLK corresponds to the second clock signal CLK /
2 is synchronized with the change in the potential level of the second clock signal, and there is a delay corresponding to the counting operation in the counting unit 200 before the carry signal CARRY of the H level is transmitted to the flip-flop 291. Signal C
Flip-flop 2 for rising edge of LK
91 does not work.

【0128】図6における時刻t5において、キャリ信
号CARRYがHレベルのままであるため、第1のクロ
ック信号CLKの立ち上がりエッジに応じて、フリップ
フロップ291の出力信号はHレベルとなる。このた
め、選択回路295の出力信号SECARRYをHレベ
ルとすることができる。この信号SECARRYをカウ
ント回路222のキャリ信号として扱うようにする。
At time t5 in FIG. 6, carry signal CARRY remains at H level, so that the output signal of flip-flop 291 goes to H level in response to the rising edge of first clock signal CLK. Therefore, the output signal SECARRY of the selection circuit 295 can be set to the H level. This signal SECARRY is handled as a carry signal of the count circuit 222.

【0129】この後、時刻t6において、キャリ信号C
ARRYがLレベルとなれば、フリップフロップ291
は再びリセット状態となるので、フリップフロップ29
1の出力信号はLレベルとなる。よって、選択回路29
5の出力信号SECARRYはLレベルとすることがで
きる。
Thereafter, at time t6, carry signal C
When ARRY goes low, flip-flop 291
Is reset again, so that the flip-flop 29
1 is at the L level. Therefore, the selection circuit 29
5 can be set to the L level.

【0130】このように、図7の回路を設けることで、
キャリ信号CARRYをHレべルにするタイミング及び
その期間を、初期値の最下位ビットが0Bのものを、第
1のクロック信号CLKの立ち上がりエッジでカウント
動作した場合のキャリ信号CARRYと同様なタイミン
グ及び期間にHレベルとすることができる。なお、図7
の回路は、キャリ信号はHレベルの時以外はリセット状
態を維持して動作が禁止されるので、消費電力はほとん
ど増加することない。よって、本発明の効果を損なうこ
ともない。
Thus, by providing the circuit of FIG. 7,
The timing and the period when the carry signal CARRY is set to the H level are the same as the timing of the carry signal CARRY when the least significant bit of the initial value is 0B and the counting operation is performed at the rising edge of the first clock signal CLK. And H level during the period. FIG.
Since the operation of the circuit (1) is inhibited while maintaining the reset state except when the carry signal is at the H level, power consumption hardly increases. Therefore, the effect of the present invention is not impaired.

【0131】ここで、図6に戻り、時刻t6以降の動作
についてを説明する。時刻t6における信号SECLK
の立ち上がりエッジに応じて、各フリップフロップ20
1ー1〜201ー4の出力信号OUT1〜OUT4はそ
れぞれLレベルとなり、カウント数が0000Bに戻る
こととなる。このため、キャリ信号CARRYもLレベ
ルとなる。
Here, returning to FIG. 6, the operation after time t6 will be described. Signal SECLK at time t6
Of each flip-flop 20 in response to the rising edge of
The output signals OUT1 to OUT4 1-1 to 201-4 become L level, respectively, and the count number returns to 0000B. Therefore, carry signal CARRY is also at L level.

【0132】次に、時刻t7に初期値が0000Bにな
ったとする。このため、信号R1〜R4はそれぞれLレ
ベルとなる。この後、時刻t8の前に、セット信号SE
TもHレベルにしておく。
Next, it is assumed that the initial value becomes 0000B at time t7. Therefore, the signals R1 to R4 are at the L level. Thereafter, before time t8, set signal SE
T is also set to H level.

【0133】時刻t8における信号SECLKの立ち上
がりエッジに応じて、フリップフロップ201ー1〜2
01ー4には、それぞれカウントの初期値を設定するた
めの新たな初期データとして初期データ制御回路250
からの出力信号に応じたデータを格納する。レジスタ1
0に格納された新たな初期値は0000Bであるため、
フリップフロップ201ー1〜201ー3の出力信号O
UT1〜OUT3はいずれもLレベルになり、フリップ
フロップ201ー4の出力信号OUT4はHレベルとな
る。言い換えると、初期値0000Bの代わりに初期値
1000Bが計数部200に格納されることとなる。
In accordance with the rising edge of signal SECLK at time t8, flip-flops 201-1 to 201-2 are set.
01-4, an initial data control circuit 250 as new initial data for setting an initial value of the count.
Stores data corresponding to the output signal from. Register 1
Since the new initial value stored in 0 is 0000B,
Output signal O of flip-flops 201-1 to 201-3
The UT1 to OUT3 all go to L level, and the output signal OUT4 of the flip-flop 201-4 goes to H level. In other words, the initial value 1000B is stored in the counting unit 200 instead of the initial value 0000B.

【0134】ここで、初期値として新たに0000Bを
レジスタ10に格納するようにしているのは次の理由か
らである。時刻t8において、レジスタ10に新たに初
期値を格納しないと、計数部200は0Bから1111
Bまでのカウント処理を第2のクロック信号CLK/2
の立ち上がりエッジに応じて動作することとなる。この
場合、計数部200が0Bから1111Bまでのカウン
ト処理を第1のクロック信号CLKの立ち上がりエッジ
に応じて動作する場合にHレベルのキャリ信号CARR
Yを発生するタイミングと同じタイミングにおいて、キ
ャリ信号CARRYをHレベルにすることができなくな
ってしまうからである。なお、時刻t8の前において、
初期値として0001Bをレジスタ10に格納して第1
のクロック信号CLKの立ち上がりエッジに応じて計数
部のカウント処理を行うよう切り換えて対応することも
できるが、図6のように、新たに0000Bを計数部2
00に格納するようにした方が、計数部200を第2の
クロック信号CLK/2の立ち上がりエッジに応じて動
作さえることができるので、消費電力の低減にはより有
効である。
The reason why 0000B is newly stored in the register 10 as an initial value is as follows. At time t8, unless a new initial value is stored in the register 10, the counting unit 200 changes from 0B to 1111.
B is counted up to the second clock signal CLK / 2.
Operates in response to the rising edge of. In this case, when the counting unit 200 operates the count process from 0B to 1111B in response to the rising edge of the first clock signal CLK, the carry signal CARR at the H level is used.
This is because the carry signal CARRY cannot be set to the H level at the same timing as the timing when Y is generated. Before time t8,
0001B is stored in the register 10 as an initial value and the first
In response to the rising edge of the clock signal CLK, the counting unit can be switched to perform the counting process, but as shown in FIG.
The value stored in 00 is more effective in reducing power consumption because the counting section 200 can be operated according to the rising edge of the second clock signal CLK / 2.

【0135】この後、時刻t10、時刻t12、時刻t
14、時刻t16、時刻t18、時刻t20においてカ
ウント数がそれぞれ、1001B、1010B、101
1B、1100B、1101B、1110Bとなる。時
刻t22においては、再びカウント数が1111Bとな
り、キャリ信号CARRYがHレベルとなる。このキャ
リ信号CARRYは図示されていない時刻t24(時刻
t22後における第2のクロック信号CLK/2の立ち
上がりエッジが発生するタイミングに相当)までHレベ
ルを維持する。
Thereafter, at time t10, time t12, and time t
14, the counts at time t16, time t18, and time t20 are 1001B, 1010B, and 101, respectively.
1B, 1100B, 1101B, and 1110B. At time t22, the count number becomes 1111B again, and carry signal CARRY attains H level. Carry signal CARRY maintains the H level until time t24 (not shown) (corresponding to the timing at which the rising edge of second clock signal CLK / 2 occurs after time t22).

【0136】ここで、初期値である0000Bを、その
まま時刻t8にて計数部200に格納し、第1のクロッ
ク信号CLKにてカウント動作を行った場合を考慮して
みる。この場合、カウント数は、時刻t9で1Bとな
り、以降、時刻t10〜時刻t22でそれぞれ10B〜
1110Bとなる。このため、時刻t23(図6には示
されていないが、時刻22と時刻24の間に相当)にお
いてカウント数は1111Bとなりキャリ信号CARR
YがHレベルとなる。
Here, consider the case where 0000B, which is the initial value, is stored in the counting section 200 at time t8 as it is, and the count operation is performed with the first clock signal CLK. In this case, the count number becomes 1B at the time t9, and thereafter, the count number becomes 10B at the time t10 to the time t22.
1110B. Therefore, at time t23 (not shown in FIG. 6, but corresponding to between time 22 and time 24), the count number becomes 1111B and carry signal CARR.
Y becomes H level.

【0137】よって、時刻t0〜t6の場合と同様に、
計数部200を構成するフリップフロップ201ー1〜
201ー4の動作回数を減らしても必要なタイミング
(上述の例では図示されていないが時刻t23)でキャ
リ信号CARRYをHレベルにしておくことができる。
Therefore, as in the case of times t0 to t6,
Flip-flops 201-1 to 201-1 constituting counting section 200
Even if the number of operations of 201-4 is reduced, carry signal CARRY can be kept at the H level at a necessary timing (not shown in the above example, but at time t23).

【0138】このように、初期値における最下位ビット
が0Bの場合には、各フリップフロップへ格納する初期
データを変更して、各フリップフロップを第1のクロッ
ク信号CLKを分周した第2のクロック信号CLK/2
に応じてカウント動作を実行するようにしている。この
ようにしても、計数部200を構成する各フリップフロ
ップを第1のクロック信号CLKに応じて動作させた場
合と同じタイミングにおいてキャリ信号CARRYをH
レベルにすることができる。
As described above, when the least significant bit in the initial value is 0B, the initial data stored in each flip-flop is changed, and each flip-flop is changed to the second clock signal CLK obtained by dividing the first clock signal CLK. Clock signal CLK / 2
The counting operation is executed in accordance with. Even in this case, the carry signal CARRY is set to H at the same timing as when each flip-flop constituting the counting section 200 is operated according to the first clock signal CLK.
Level.

【0139】以上のように、第2の実施の形態のカウン
ト回路222により、カウンタとしての機能性を損なう
ことなく、消費電力を低減することがが実現される。
As described above, the count circuit 222 of the second embodiment realizes a reduction in power consumption without impairing the functionality as a counter.

【0140】なお、第2の実施の形態においては、4ビ
ットのカウンタを例にして説明したが、これに限定され
ずnビット(ただし、nは2以上の正の整数)のカウン
タであってもよい。この場合、nビットの初期値におけ
るmビット目(mはn≧mの正の整数)の初期データ、
つまり、m番目のフリップフロップに対する初期データ
を(mー1)番目のフリップフロップの初期データとし
て供給するようにすればよい。
In the second embodiment, a 4-bit counter has been described as an example. However, the present invention is not limited to this, and is an n-bit counter (where n is a positive integer of 2 or more). Is also good. In this case, the initial data of the m-th bit (m is a positive integer of n ≧ m) in the initial value of n bits,
That is, the initial data for the m-th flip-flop may be supplied as the initial data for the (m-1) -th flip-flop.

【0141】また、レジスタ273を設けずに、選択回
路254の1側入力端子にデータとして1Bに相当する
信号が供給されるものであればよい。また、選択回路2
71にて第1のクロック信号CLKが選択されている時
には、検出回路230の出力信号に応じて、第2のクロ
ック信号CLK/2を発生する回路の動作を停止するよ
うにしてもよい。この場合、更なる消費電力の低減が期
待できる。
It is sufficient that the register 273 is not provided and a signal corresponding to 1B is supplied as data to the one-side input terminal of the selection circuit 254. Also, the selection circuit 2
When the first clock signal CLK is selected at 71, the operation of the circuit that generates the second clock signal CLK / 2 may be stopped according to the output signal of the detection circuit 230. In this case, further reduction in power consumption can be expected.

【0142】なお、本発明のカウンタ回路は図1あるい
は図4に示す構成に限定されるものではなく、種々の変
更が可能である。
Note that the counter circuit of the present invention is not limited to the configuration shown in FIG. 1 or FIG. 4, but can be variously modified.

【0143】例えば、データとして0Bが入力されてい
る部分は接地電位源に接続し、データとして1Bが入力
されている部分は電源電位源に接続されるようにしても
よい。また、計数部を構成するフリップフロップもJK
フリップフロップに限定されず、同期式のカウント回路
を実現するものであればDフリップフロップ等であって
もよい。
For example, a portion where 0B is input as data may be connected to a ground potential source, and a portion where 1B is input as data may be connected to a power supply potential source. Also, the flip-flop constituting the counting unit is JK
The present invention is not limited to the flip-flop, but may be a D flip-flop as long as it realizes a synchronous counting circuit.

【0144】また、検出回路20、クロック供給制御回
路30、検出回路230は図1や図4に示す回路に限定
されず、他の構成としてもよい。特に、図4において、
初期データ制御回路250を構成する各選択回路251
〜254及び選択回路271の0側入力端子に入力され
る信号と1側入力端子に入力される信号とを逆にすれ
ば、検出回路230を構成するインバータ231を削除
することも可能である。この場合、検出回路230の機
能は初期データ制御回路250と選択回路271がそれ
ぞれ有することとなる。
The detection circuit 20, the clock supply control circuit 30, and the detection circuit 230 are not limited to the circuits shown in FIGS. 1 and 4, but may have other configurations. In particular, in FIG.
Each selection circuit 251 constituting the initial data control circuit 250
If the signal input to the 0-side input terminal of the selection circuit 271 and the signal input to the 1-side input terminal of the selection circuit 271 are reversed, the inverter 231 included in the detection circuit 230 can be omitted. In this case, the function of the detection circuit 230 is included in the initial data control circuit 250 and the selection circuit 271.

【0145】また、上記実施の形態においては、カウン
トアップ動作するカウント回路として説明したが、カウ
ントダウン動作するカウント回路に対しても本発明を適
用することができる。
Further, in the above-described embodiment, the description has been given of a count circuit that performs a count-up operation. However, the present invention can be applied to a count circuit that performs a count-down operation.

【0146】[0146]

【発明の効果】以上のように、本発明によれば、本来の
機能を損なうことなく、消費電力を低減することを可能
としたカウント回路を提供することができる。
As described above, according to the present invention, it is possible to provide a count circuit capable of reducing power consumption without impairing its original function.

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

【図1】本発明の第1の実施の形態におけるカウント回
路の回路図である。
FIG. 1 is a circuit diagram of a count circuit according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態におけるカウント回
路の動作を説明する、初期値が0000Bの場合のタイ
ミングチャートである。
FIG. 2 is a timing chart for explaining the operation of the count circuit according to the first embodiment of the present invention when the initial value is 0000B.

【図3】本発明の第1の実施の形態におけるカウント回
路の動作を説明する、初期値が1100Bの場合のタイ
ミングチャートである。
FIG. 3 is a timing chart for explaining the operation of the count circuit according to the first embodiment of the present invention when the initial value is 1100B.

【図4】本発明の第2の実施の形態におけるカウント回
路の回路図である。
FIG. 4 is a circuit diagram of a count circuit according to a second embodiment of the present invention.

【図5】本発明の第2の実施の形態におけるカウント回
路の動作を説明する、初期値が0001Bの場合のタイ
ミングチャートである。
FIG. 5 is a timing chart for explaining the operation of the count circuit according to the second embodiment of the present invention when the initial value is 0001B.

【図6】本発明の第2の実施の形態におけるカウント回
路の動作を説明する、初期値が1010Bの場合のタイ
ミングチャートである。
FIG. 6 is a timing chart for explaining the operation of the count circuit according to the second embodiment of the present invention when the initial value is 1010B.

【図7】本発明の第2の実施の形態におけるカウント回
路の改良例における改良部分を示す回路図である。
FIG. 7 is a circuit diagram showing an improved part in an improved example of the count circuit according to the second embodiment of the present invention.

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

10 レジスタ 20 検出回路 30 クロック供給制御回路 100、200 計数部 101ー1〜101ー4、201ー1〜201ー4
フリップフロップ 103ー1〜103ー4、104ー1〜104ー4、2
03ー1〜203ー4、204ー1〜204ー4、27
1 選択回路 111、222 カウント回路 230 検出回路 250 初期データ制御回路
Reference Signs List 10 register 20 detection circuit 30 clock supply control circuit 100, 200 counting section 101-1 to 101-4, 201-1 to 201-4
Flip-flops 103-1 to 103-4, 104-1 to 104-4, 2
03-1 to 203-4, 204-1 to 204-4, 27
1 selection circuit 111, 222 count circuit 230 detection circuit 250 initial data control circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 それぞれ初期データを格納可能なn個
(ただし、nは2以上の正の整数)のフリップフロップ
から構成され、各フリップフロップはクロック信号が供
給されることにより動作するnビットのカウント回路に
おいて、 前記カウント回路の前記フリップフロップそれぞれに対
する初期データのうち、所定の上位kビット(ただし、
kはn>kの正の整数)それぞれに対する初期データが
1か否かを検出する検出回路と、 前記検出回路の検出結果に応じて、前記所定の上位ビッ
トに対応する前記フリップフロップへの前記クロック信
号の供給を制御するクロック供給制御回路と、を有する
ことを特徴とするカウント回路。
1. An n-bit (where n is a positive integer of 2 or more) flip-flops each capable of storing initial data, and each flip-flop is an n-bit flip-flop that operates when a clock signal is supplied. In the counting circuit, of the initial data for each of the flip-flops of the counting circuit, a predetermined upper k bits (however,
k is a positive integer of n> k) and a detection circuit for detecting whether the initial data is 1 or not; and, in accordance with a detection result of the detection circuit, the detection circuit outputs the data to the flip-flop corresponding to the predetermined upper bit. A clock circuit, comprising: a clock supply control circuit that controls supply of a clock signal.
【請求項2】 前記カウント回路は、前記検出回路の検
出結果に応じて、前記所定の上位kビットに対応する前
記フリップフロップを除く(nーk)個のフリップフロ
ップの出力、あるいは前記カウント回路を構成するn個
のフリップフロップの出力のいずれかに基づくキャリ信
号を出力することを特徴とする請求項1記載のカウント
回路。
2. The count circuit according to a detection result of the detection circuit, outputs (nk) flip-flops other than the flip-flop corresponding to the predetermined upper k bits, or the count circuit. 2. The count circuit according to claim 1, wherein a carry signal is output based on any one of the outputs of the n flip-flops that constitute the count circuit.
【請求項3】 それぞれ初期データを格納可能なn個
(ただし、nは2以上の正の整数)のフリップフロップ
から構成され、各フリップフロップはクロック信号が供
給されることにより動作するnビットのカウント回路に
おいて、 前記カウント回路の前記フリップフロップそれぞれに対
する初期データのうち、最下位ビットに対する初期デー
タが0か否かを検出する検出回路と、 前記検出回路の検出結果に応じて、前記フリップフロッ
プそれぞれに供給するm番目(ただし、mはn≧mの正
の整数)のフリップフロップに対する初期データを(m
ー1)番目のフロップフロップの初期データとして供給
するか否かを制御する初期データ制御回路と、 前記検出回路の検出結果に応じて、第1の周期でクロッ
クパルスを発生する第1の信号と、前記第1の周期の2
倍の周期でクロックパルスを発生する第2の信号とのい
ずれか一方を前記クロック信号として出力するクロック
選択回路と、を有することを特徴とするカウント回路。
3. An n-bit (where n is a positive integer of 2 or more) flip-flops each capable of storing initial data, and each flip-flop is an n-bit flip-flop that operates when a clock signal is supplied. In the count circuit, a detection circuit for detecting whether or not initial data for the least significant bit of the initial data for each of the flip-flops of the count circuit is 0, and each of the flip-flops according to a detection result of the detection circuit To the m-th (where m is a positive integer of n ≧ m) flip-flop supplied to the (m)
-1) an initial data control circuit for controlling whether or not to supply the data as initial data of a flop flop; and a first signal for generating a clock pulse at a first cycle in accordance with a detection result of the detection circuit. , 2 of the first cycle
A clock selection circuit that outputs one of a second signal that generates a clock pulse at a double cycle as the clock signal.
JP11084039A 1999-03-26 1999-03-26 Count circuit Withdrawn JP2000278117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11084039A JP2000278117A (en) 1999-03-26 1999-03-26 Count circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11084039A JP2000278117A (en) 1999-03-26 1999-03-26 Count circuit

Publications (1)

Publication Number Publication Date
JP2000278117A true JP2000278117A (en) 2000-10-06

Family

ID=13819387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11084039A Withdrawn JP2000278117A (en) 1999-03-26 1999-03-26 Count circuit

Country Status (1)

Country Link
JP (1) JP2000278117A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191530A (en) * 2004-12-30 2006-07-20 Hynix Semiconductor Inc Counter circuit for controlling off-chip driver, and output current value changing method for the off-chip driver using the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191530A (en) * 2004-12-30 2006-07-20 Hynix Semiconductor Inc Counter circuit for controlling off-chip driver, and output current value changing method for the off-chip driver using the same

Similar Documents

Publication Publication Date Title
JP4322548B2 (en) Data format conversion circuit
US5459855A (en) Frequency ratio detector for determining fixed frequency ratios in a computer system
JPH08329696A (en) Integrated circuit
JP2868955B2 (en) Pulse generation circuit
JP2576366B2 (en) Variable delay buffer circuit
JP2006319966A (en) Phase interpolation circuit and phase interpolation signal generation method
JPH06216762A (en) Asynchronous counter
US8339175B2 (en) Phase generating apparatus and method thereof
JP2011097138A (en) Noise reduction circuit and semiconductor device provided with noise reduction circuit
US6839783B2 (en) Programmable state machine interface
JP6775640B2 (en) Gray code counter
US6445760B1 (en) Partially-synchronous high-speed counter circuits
JP2000278117A (en) Count circuit
US20060004980A1 (en) Address creator and arithmetic circuit
US7259634B2 (en) Arrangement and method for digital delay line
US6229369B1 (en) Clock control circuit
JP3789448B2 (en) Microcontroller with system resource prescaler
JP4468564B2 (en) Pulse width modulation circuit
JP3338294B2 (en) Counter circuit
JP4666462B2 (en) Counter circuit and semiconductor device including the same
JP3601884B2 (en) Timing control circuit
JP2794950B2 (en) Integrator circuit
JPH10107619A (en) Synchronous counter
US7519090B2 (en) Very high speed arbitrary number of multiple signal multiplexer
JP2757714B2 (en) Frame pulse generation circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606