JPH04306018A - Counter circuit - Google Patents

Counter circuit

Info

Publication number
JPH04306018A
JPH04306018A JP5228291A JP5228291A JPH04306018A JP H04306018 A JPH04306018 A JP H04306018A JP 5228291 A JP5228291 A JP 5228291A JP 5228291 A JP5228291 A JP 5228291A JP H04306018 A JPH04306018 A JP H04306018A
Authority
JP
Japan
Prior art keywords
data
shift register
clock
input
counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5228291A
Other languages
Japanese (ja)
Inventor
Hiroshi Shirota
博史 城田
Harufusa Kondo
晴房 近藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5228291A priority Critical patent/JPH04306018A/en
Publication of JPH04306018A publication Critical patent/JPH04306018A/en
Pending legal-status Critical Current

Links

Landscapes

  • Shift Register Type Memory (AREA)

Abstract

PURPOSE:To count clocks at a high speed after a data is inputted. CONSTITUTION:A shift register SR is in feedback connection and a data at an 8-th shift register 3H is given to a 5-bit counter 4 as a count object. A data to the shift register SR is shifted by each clock 1 and 3-bit outputs 8A, 8B, 8C of an encoder 20 are changed in response to the clock 1. The data to the shift register SR is shifted and circulated and every time the data is given to the 8-th shift register 3H, the 5-bit counter 4 is incremented and counts 8D, 8F, 8G, 8H in 5 bits of the 5-bit counter 4 are changed in response to the data of the shift register 3H. Then an 8-bit count data is obtained.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、所定信号が入力された
場合にクロックを高速度でカウントするカウンタ回路に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a counter circuit that counts clocks at high speed when a predetermined signal is input.

【0002】0002

【従来の技術】デジタル回路におけるデータ処理は、論
理回路によるデジタル演算又は論理演算によって行われ
る。このようなデータ処理は、デジタル回路中の電圧の
「高」、「低」を、「1」,「0」の2値に対応させて
AND 、OR、NOT 等の論理演算により行われる
。このようなデジタル回路に使用するカウンタ回路には
、データが入力されるとカウント動作を開始して、デー
タ入力後のクロックをカウントするものがある。図3は
この種の従来のカウンタ回路であって、8ビットカウン
タ18を用いて構成されている。8ビットカウンタ18
は、データ2が入力されるデータ入力端子LDと、クロ
ック1が入力されるクロック入力端子CLK と、デー
タ出力端子Q1,Q2,Q3,Q4,Q5,Q6,Q7
とキャリー出力端子Q8と、初期値入力端子LVとを備
えている。そしてデータ出力端子Q1,Q2,Q3,Q
4,Q5,Q6,Q7から8ビットのカウントデータ8
A,8B,8C,8D,8E,8F,8G,8H が出
力され、キャリー出力端子Q8からキャリー信号8Iが
出力されるようになっている。
2. Description of the Related Art Data processing in digital circuits is performed by digital operations or logical operations by logic circuits. Such data processing is performed by logical operations such as AND, OR, and NOT, in which "high" and "low" voltages in the digital circuit correspond to binary values of "1" and "0". Some counter circuits used in such digital circuits start a counting operation when data is input, and count the clock after the data is input. FIG. 3 shows this type of conventional counter circuit, which is constructed using an 8-bit counter 18. 8 bit counter 18
are a data input terminal LD to which data 2 is input, a clock input terminal CLK to which clock 1 is input, and data output terminals Q1, Q2, Q3, Q4, Q5, Q6, Q7.
, a carry output terminal Q8, and an initial value input terminal LV. and data output terminals Q1, Q2, Q3, Q
8-bit count data 8 from 4, Q5, Q6, Q7
A, 8B, 8C, 8D, 8E, 8F, 8G, and 8H are output, and a carry signal 8I is output from the carry output terminal Q8.

【0003】図4は図3に示したカウンタ回路の内部の
構成を示すブロック図である。カウンタ回路は8個の1
ビットカウンタ19A,19B,19C,19D,19
E,19F,19G,19H からなっている。1ビッ
トカウンタ19A,19B …19H の夫々には、ク
ロック入力端子CLKと、データ入力端子LDと、初期
値入力端子LVと、キャリー出力端子Cとを備えている
。また1ビットカウンタ19A,19B …19H の
夫々には、データ出力端子Q0,Q1 …Q7を各別に
備えている。1段目の1ビットカウンタ19A のクロ
ック入力端子CLKにはクロック1が入力され、そのキ
ャリー出力端子Cのキャリー信号は2段目の1ビットカ
ウンタ19B のクロック入力端子CLK に入力され
る。2段目の1ビットカウンタ19B のキャリー出力
端子Cのキャリー信号は、3段目の1ビットカウンタ1
9C のクロック入力端子CLK に入力され、そのキ
ャリー出力端子Cのキャリー信号は4段目の1ビットカ
ウンタ19Dのクロック入力端子CLK に入力される
。4段目の1ビットカウンタ19D のキャリー出力端
子Cのキャリー信号は、5段目の1ビットカウンタ19
E のクロック入力端子CLK に入力され、そのキャ
リー出力端子Cのキャリー信号は6段目の1ビットカウ
ンタ19F のクロック入力端子CLK に入力される
。6段目の1ビットカウンタ19F のキャリー出力端
子Cのキャリー信号は7段目の1ビットカウンタ19G
 のクロック入力端子CLK に入力され、そのキャリ
ー出力端子Cのキャリー信号は、8段目の1ビットカウ
ンタ19H のクロック入力端子CLK に入力される
。8段目の1ビットカウンタ19H のキャリー出力端
子からキャリー信号BIが出力される。1ビットカウン
タ19A,19B …19H 夫々のデータ入力端子L
Dにはデータ2が共通に入力され、夫々の初期値入力端
子LVには接地電位が共通に与えられる。また1ビット
カウンタ19A,19B …19H の各データ出力端
子Q0,Q1 …Q7から、カウントデータ8A,8B
 …8Hが出力される。
FIG. 4 is a block diagram showing the internal configuration of the counter circuit shown in FIG. 3. The counter circuit consists of 8 1
Bit counter 19A, 19B, 19C, 19D, 19
It consists of E, 19F, 19G, and 19H. Each of the 1-bit counters 19A, 19B...19H includes a clock input terminal CLK, a data input terminal LD, an initial value input terminal LV, and a carry output terminal C. Further, each of the 1-bit counters 19A, 19B . . . 19H is provided with a data output terminal Q0, Q1 . Clock 1 is input to the clock input terminal CLK of the first stage 1-bit counter 19A, and the carry signal from the carry output terminal C is input to the clock input terminal CLK of the second stage 1-bit counter 19B. The carry signal of the carry output terminal C of the second stage 1-bit counter 19B is the carry signal of the third stage 1-bit counter 1.
The carry signal from the carry output terminal C is input to the clock input terminal CLK of the fourth stage 1-bit counter 19D. The carry signal of the carry output terminal C of the 1-bit counter 19D in the 4th stage is transmitted to the 1-bit counter 19D in the 5th stage.
The carry signal from the carry output terminal C is input to the clock input terminal CLK of the sixth stage 1-bit counter 19F. The carry signal of the carry output terminal C of the 6th stage 1-bit counter 19F is the carry signal of the 7th stage 1-bit counter 19G.
The carry signal from the carry output terminal C is input to the clock input terminal CLK of the eighth stage 1-bit counter 19H. A carry signal BI is output from the carry output terminal of the 8th stage 1-bit counter 19H. 1-bit counter 19A, 19B...19H each data input terminal L
Data 2 is commonly input to D, and a ground potential is commonly applied to each initial value input terminal LV. In addition, count data 8A, 8B is output from each data output terminal Q0, Q1...Q7 of 1-bit counter 19A, 19B...19H.
...8H is output.

【0004】次にこのカウンタ回路の動作を説明する。 いま、1ビットカウンタ19A,19B …19H の
出力データ8A,8B …8Hを初期化した後に、1段
目の1ビットカウンタ19Aのクロック入力端子CLK
 にクロック1を入力すると、その1クロック目でその
キャリー出力端子Cが「0」になり、2クロック目で「
1」になる。そして1段目の1ビットカウンタ19A 
から2段目の1ビットカウンタ19B のクロック入力
端子CLK にキャリー信号が入力されると、最初のキ
ャリー信号で1ビットカウンタ19B のキャリー出力
端子Cが「0」になり、次のキャリー信号で「1」にな
る。つまり、1段目の1ビットカウンタ19A は、そ
れに入力されるクロックの2クロック毎に、キャリー端
子Cが「1」になり、2段目の1ビットカウンタ19B
 は、クロック1の4クロック毎にそのキャリー端子C
が「1」になる。そのようにして2段目の1ビットカウ
ンタ19Bのキャリー信号が3段目の1ビットカウンタ
19Cに、そのキャリー信号が4段目の1ビットカウン
タ19D に入力され、同様にして1ビットカウンタ1
9E,19F,19G,19H に入力される。
Next, the operation of this counter circuit will be explained. Now, after initializing the output data 8A, 8B...8H of the 1-bit counters 19A, 19B...19H, the clock input terminal CLK of the first stage 1-bit counter 19A is
When clock 1 is input to , its carry output terminal C becomes "0" at the first clock, and "0" at the second clock.
1”. And the first stage 1-bit counter 19A
When a carry signal is input to the clock input terminal CLK of the second-stage 1-bit counter 19B, the first carry signal causes the carry output terminal C of the 1-bit counter 19B to become "0", and the next carry signal causes it to become "0". 1”. In other words, the carry terminal C of the first-stage 1-bit counter 19A becomes "1" every two clocks input thereto, and the second-stage 1-bit counter 19B
is its carry terminal C every 4 clocks of clock 1.
becomes "1". In this way, the carry signal of the second-stage 1-bit counter 19B is input to the third-stage 1-bit counter 19C, and the carry signal is input to the fourth-stage 1-bit counter 19D.
Input to 9E, 19F, 19G, 19H.

【0005】それにより3段目の1ビットカウンタ19
C のキャリー出力端子Cは、クロック1の8クロック
単位に、4段目の1ビットカウンタ19Dのキャリー出
力端子Cはクロック1の16クロック単位に、5段目の
1ビットカウンタ19E のキャリー出力端子Cはクロ
ック1の32クロック単位に、6段目の1ビットカウン
タ19F のキャリー出力端子Cはクロック1の64ク
ロック単位に、7段目の1ビットカウンタ19G のキ
ャリー出力端子Cはクロック1の128 クロック単位
に、8段目の1ビットカウンタ19H のキャリー出力
端子Cはクロック1の256 クロック単位に「1」に
なる。このようにしてクロック1に応じて各1ビットカ
ウンタ19A,19B …19H がカウント動作を行
い、1ビットカウンタ19A,19B …19H の各
データ出力端子Q0,Q1 …Q7から夫々のカウント
データ8A,8B …8Hを出力する。またデータ入力
端子LDにデータ2が入力されると、各1ビットカウン
タ19A,19B …19H のカウントデータは初期
値になる。それにより、データ2が入力された時点から
のクロック1のカウントデータ8A,8B …8Hを出
力するようにしている。
As a result, the third stage 1-bit counter 19
The carry output terminal C of C is output every 8 clocks of clock 1, the carry output terminal C of the 4th stage 1-bit counter 19D is output every 16 clocks of clock 1, and the carry output terminal C of the 5th stage 1-bit counter 19E is output every 16 clocks of clock 1. The carry output terminal C of the 1-bit counter 19F in the 6th stage is carried out in units of 64 clocks of clock 1, and the carry output terminal C of the 1-bit counter 19G in the 7th stage is carried out in units of 128 clocks of clock 1. In clock units, the carry output terminal C of the 8th stage 1-bit counter 19H becomes "1" in units of 256 clocks of clock 1. In this way, each of the 1-bit counters 19A, 19B...19H performs a counting operation in response to clock 1, and the respective count data 8A, 8B are output from the data output terminals Q0, Q1...Q7 of the 1-bit counters 19A, 19B...19H. ...Outputs 8H. Further, when data 2 is input to the data input terminal LD, the count data of each of the 1-bit counters 19A, 19B, . . . , 19H becomes the initial value. As a result, count data 8A, 8B, . . . 8H of clock 1 from the time when data 2 was input is output.

【0006】[0006]

【発明が解決しようとする課題】ところで、従来のカウ
ンタ回路は、カウントデータのビット数と同数の1ビッ
トカウンタを直列接続して構成されている。そのため、
カウントデータのビット数が多いカウンタ回路を構成す
る場合には直列接続される1ビットカウンタの個数が必
然的に増加することになる。しかるに、直列接続されて
いる1ビットカウンタ相互間ではキャリー信号の伝搬が
あって、所定の伝搬時間を必要とするから、直列接続し
た1ビットカウンタの数が多くなる程、カウント動作の
高速化が妨げられるという問題がある。本発明は斯かる
問題に鑑み、ビット数が多いカウントデータを得る場合
でも、カウント動作が高速で行い得るカウンタ回路を提
供することを目的とする。
By the way, a conventional counter circuit is constructed by connecting in series one-bit counters of the same number as the number of bits of count data. Therefore,
When constructing a counter circuit with a large number of bits of count data, the number of 1-bit counters connected in series will inevitably increase. However, since carry signals propagate between serially connected 1-bit counters, and a predetermined propagation time is required, the higher the number of serially connected 1-bit counters, the faster the counting operation becomes. There is a problem with being blocked. In view of this problem, it is an object of the present invention to provide a counter circuit that can perform counting operations at high speed even when obtaining count data with a large number of bits.

【0007】[0007]

【課題を解決するための手段】本発明に係るカウンタ回
路は、所定信号をシフトデータとし、カウントするクロ
ックをシフトクロックとしており、フィードバック接続
された複数段のシフトレジスタと、前記所定信号をリセ
ット信号とし、シフトレジスタの所定段のデータをカウ
ント対象としているカウンタと、特定段を除く各段のシ
フトレジスタのデータをエンコードするエンコーダとを
備えて構成する。
[Means for Solving the Problems] A counter circuit according to the present invention uses a predetermined signal as shift data and a counting clock as a shift clock, and includes a plurality of stages of shift registers connected in feedback, and a reset signal as the predetermined signal. It is configured to include a counter that counts data in a predetermined stage of a shift register, and an encoder that encodes data in each stage of the shift register except for a specific stage.

【0008】[0008]

【作用】所定信号が入力されるとシフトレジスタ及びカ
ウンタをリセットし、特定段のシフトレジスタにのみデ
ータが得られてシフトレジスタが初期状態になる。クロ
ックに応じてデータがシフトされ、特定段を除く各段の
シフトレジスタのデータがエンコーダに入力され、エン
コーダからクロックのカウントデータを出力する。デー
タが所定段のシフトレジスタにシフトされるとカウンタ
がインクリメントして、カウンタからクロックのカウン
トデータを出力する。エンコーダの出力値は、クロック
の計数値の下位ビットとなり、カウンタのカウント値は
クロックの計数値の上位ビットとなる。これによりシフ
トレジスタのトデータをシフトする場合は、キャリー信
号の伝搬時間を必要としないからシフトレジスタとエン
コーダとによりカウントデータを得るようにすると、カ
ウント動作の時間が短くなる。
[Operation] When a predetermined signal is input, the shift register and the counter are reset, data is obtained only in the shift register of a specific stage, and the shift register becomes an initial state. Data is shifted in accordance with the clock, and data in the shift registers of each stage except for a specific stage is input to the encoder, which outputs clock count data. When the data is shifted to a shift register at a predetermined stage, the counter is incremented, and the counter outputs clock count data. The output value of the encoder becomes the lower bits of the clock count value, and the count value of the counter becomes the upper bits of the clock count value. Therefore, when shifting the data of the shift register, the propagation time of the carry signal is not required, so if the count data is obtained by the shift register and the encoder, the time for the counting operation is shortened.

【0009】[0009]

【実施例】以下本発明をその実施例を示す図面により詳
述する。図1は本発明に係るカウンタ回路の構成を示す
ブロック図である。カウンタ回路は5ビットカウンタ4
と、8段のシフトレジスタSRと、エンコーダ20とを
備えている。5ビットカウンタ4のクロック入力端子C
LK にはクロック1が入力され、そのリセット端子R
ST にはデータ2が入力される。データ出力端子Q0
,Q1,Q2,Q3,Q4から5ビットのカウントデー
タ8D,8E,8F,8G,8Hが出力され、またキャ
リー出力端子Q5からキャリー信号8Iが出力される。 シフトレジスタ10の1段目から8段目までの各シフト
レジスタ3A,3B,3C,3D,3E,3F,3G,
3H には、クロック1及びデータ2が入力される。8
段目のシフトレジスタ3Hのデータは1段目のシフトレ
ジスタ3Aに入力され、また前記5ビットカウンタ4の
データ入力端子LDに入力される。このように8段目の
シフトレジスタ8Hのデータを1段目のシフトレジスタ
3Aに入力するようにシフトレジスタSRはフィードバ
ック接続されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be explained in detail below with reference to drawings showing embodiments thereof. FIG. 1 is a block diagram showing the configuration of a counter circuit according to the present invention. The counter circuit is a 5-bit counter 4
, an eight-stage shift register SR, and an encoder 20. Clock input terminal C of 5-bit counter 4
Clock 1 is input to LK, and its reset terminal R
Data 2 is input to ST. Data output terminal Q0
, Q1, Q2, Q3, and Q4 output 5-bit count data 8D, 8E, 8F, 8G, and 8H, and a carry signal 8I is output from the carry output terminal Q5. Each shift register 3A, 3B, 3C, 3D, 3E, 3F, 3G from the 1st stage to the 8th stage of the shift register 10,
Clock 1 and data 2 are input to 3H. 8
The data in the shift register 3H at the first stage is input to the shift register 3A at the first stage, and also to the data input terminal LD of the 5-bit counter 4. In this way, the shift register SR is connected in a feedback manner so that the data of the eighth stage shift register 8H is inputted to the first stage shift register 3A.

【0010】エンコーダ20は夫々が4入力OR回路5
,6,7を備えており、4入力OR回路5には、5段目
から8段目のシフトレジスタ3E,3F,3G,3H 
の各データが入力される。4入力OR回路6には、3段
目、4段目、7段目、8段目のシフトレジスタ3C,3
D,3G,3H の各データが入力される。4入力OR
回路7には2段目、4段目、6段目、8段目のシフトレ
ジスタ3B,3D,3F,3H の各データが入力され
る。4入力OR回路7,6,5から3ビットのカウント
データ8A,8B,8Cが出力される。
Each encoder 20 has a 4-input OR circuit 5.
, 6, and 7, and the 4-input OR circuit 5 includes shift registers 3E, 3F, 3G, and 3H from the fifth stage to the eighth stage.
Each data is input. The 4-input OR circuit 6 includes shift registers 3C, 3 in the 3rd, 4th, 7th, and 8th stages.
D, 3G, and 3H data are input. 4 input OR
The circuit 7 receives data from the second, fourth, sixth, and eighth shift registers 3B, 3D, 3F, and 3H. Three-bit count data 8A, 8B, and 8C are output from four-input OR circuits 7, 6, and 5.

【0011】図2はシフトレジスタSRの構成を示すブ
ロック図であり、図2(a) は1段目のシフトレジス
タ3Aを、図2(b) は2段目から8段目までの夫々
のシフトレジスタ3B,3C,3D,3E,3F,3G
,3Hのブロック図である。1段目のシフトレジスタ3
Aは、1ビットシフトレジスタ11とOR回路10とか
らなり、シフトレジスタ11のクロック入力端子CLK
 には、クロック1が入力され、出力端子Qからラッチ
データ12が出力される。OR回路10にはデータ2及
びシフトレジスタ3Hのラッチデータ9が入力され、O
R回路10の出力はシフトレジスタ11の入力端子Dに
入力される。このシフトレジスタ3Aは、それにデータ
2が入力されると、シフトレジスタ11の値を「1」に
セットするようになっている。
FIG. 2 is a block diagram showing the configuration of the shift register SR. FIG. 2(a) shows the first stage shift register 3A, and FIG. 2(b) shows the respective stages from the second to the eighth stage. Shift register 3B, 3C, 3D, 3E, 3F, 3G
, 3H is a block diagram. 1st stage shift register 3
A consists of a 1-bit shift register 11 and an OR circuit 10, and a clock input terminal CLK of the shift register 11
Clock 1 is input to , and latch data 12 is output from output terminal Q. Data 2 and latch data 9 of the shift register 3H are input to the OR circuit 10, and the
The output of the R circuit 10 is input to the input terminal D of the shift register 11. This shift register 3A is configured to set the value of the shift register 11 to "1" when data 2 is input thereto.

【0012】1段目のシフトレジスタ3A以外のシフト
レジスタ3B,3C …3Hは、1ビットシフトレジス
タ16と、インバータ14とAND 回路15とからな
り、1ビットシフトレジスタ16のクロック入力端子C
LK には、クロック1が入力され、出力端子Qからラ
ッチデータ17が出力される。 インバータ14にはデータ2が入力され、その出力はA
ND 回路15の一入力端子へ入力される。AND 回
路15の他入力端子には、前段のシフトレジスタのラッ
チデータ13が入力され、AND 回路15の出力は1
ビットシフトレジスタ16の入力端子Dに入力される。 このシフトレジスタ16は、それにデータ2が入力され
ると、シフトレジスタ16の値を「0」にセットするよ
うになっている。
The shift registers 3B, 3C, . . . , 3H other than the first stage shift register 3A consist of a 1-bit shift register 16, an inverter 14, and an AND circuit 15, and the clock input terminal C of the 1-bit shift register 16
Clock 1 is input to LK, and latch data 17 is output from output terminal Q. Data 2 is input to the inverter 14, and its output is A
It is input to one input terminal of the ND circuit 15. The latch data 13 of the previous stage shift register is input to the other input terminal of the AND circuit 15, and the output of the AND circuit 15 is 1.
It is input to the input terminal D of the bit shift register 16. This shift register 16 is configured to set the value of the shift register 16 to "0" when data 2 is input thereto.

【0013】次にこのように構成したカウンタ回路の動
作を説明する。いま、データ2 がシフトレジスタSR
及び5ビットカウンタ4に入力されると、シフトレジス
タSR及び5ビットカウンタ4がリセットされてカウン
ト動作を開始する。このとき1段目のシフトレジスタ3
Aの値はデータ2により「1」にセットされ、他のシフ
トレジスタ3B,3C …3Hの値は全て「0」にリセ
ットされたままになる。そして、シフトレジスタ3A,
3B …3Hのうちでシフトレジスタのデータが「1」
になるのは、ただ1つとなりシフトレジスタSRが初期
化される。そして初期化後にクロックが入力される都度
、シフトレジスタ3Aのデータ「1」が、2段目、3段
目…8段目のシフトレジスタ3B,3C …3Hへと順
次シフトしていく。シフトレジスタ3Bのデータが「1
」になると、OR回路7の出力たるカウントデータ8A
が「1」に、またシフトレジスタ3Cのデータが「1」
になると、OR回路6の出力たるカウントデータ8Bが
「1」になる。
Next, the operation of the counter circuit configured as described above will be explained. Now, data 2 is in shift register SR
When the signal is input to the 5-bit counter 4, the shift register SR and the 5-bit counter 4 are reset and start counting. At this time, the first stage shift register 3
The value of A is set to "1" by data 2, and the values of the other shift registers 3B, 3C, . . . , 3H remain reset to "0". And shift register 3A,
3B...The shift register data is "1" among 3H
There is only one shift register SR, and the shift register SR is initialized. Each time a clock is input after initialization, the data "1" in the shift register 3A is sequentially shifted to the second, third,...eighth shift registers 3B, 3C, . . . , 3H. The data in shift register 3B is “1”
”, the count data 8A which is the output of the OR circuit 7
becomes “1” and the data of shift register 3C becomes “1”
Then, the count data 8B, which is the output of the OR circuit 6, becomes "1".

【0014】更にシフトレジスタ3Dのデータが「1」
になると、OR回路7,6の出力たるカウントデータ8
A及び8Bがともに「1」になる。このようにして入力
されたクロック数に応じてカウントデータ8A,8B,
8Cが変化し、入力されたクロックのカウントデータが
シフトレジスタSRとエンコーダ20とによって得られ
る。そして8クロック目のクロックがシフトレジスタS
R及び5ビットカウンタ4に入力されると、シフトレジ
スタ3Gのデータがシフトレジスタ3Hにシフトされて
、そのデータが「1」になり、それが5ビットカウンタ
4のデータ入力端子LDに入力されて5ビットカウンタ
4がインクリメントし、データ出力端子Q0から出力す
るカウントデータ8Dが「1」になる。
Furthermore, the data in the shift register 3D is "1"
Then, the count data 8 which is the output of the OR circuits 7 and 6
Both A and 8B become "1". According to the number of clocks input in this way, count data 8A, 8B,
8C changes, and count data of the input clock is obtained by shift register SR and encoder 20. And the 8th clock is shift register S
When input to R and the 5-bit counter 4, the data in the shift register 3G is shifted to the shift register 3H, and the data becomes "1", which is input to the data input terminal LD of the 5-bit counter 4. The 5-bit counter 4 increments, and the count data 8D output from the data output terminal Q0 becomes "1".

【0015】また9クロック目で8段目のシフトレジス
タ3Hのデータが1段目のシフトレジスタ3Aにシフト
され、シフトレジスタ3Aのデータは再び「1」になり
、その後は前述したと同様にシフトレジスタ3Aの「1
」のデータがクロックに応じて順次3H側へシフトされ
ていく。 このようにしてシフトレジスタSRのデータは8クロッ
クで一巡回し、8クロック目ごとに5ビットカウンタ4
がインクリメントして、5ビットカウンタ4のカウント
データ8D,8E,8F,8G,8Hが変化する。そし
てエンコーダ20の出力値が、クロックの計数値の下位
ビットになり、5ビットカウンタ4のカウント値が、ク
ロックの計数値の上位ビットになる。
Furthermore, at the 9th clock, the data in the 8th stage shift register 3H is shifted to the 1st stage shift register 3A, and the data in the shift register 3A becomes "1" again. After that, the data is shifted in the same manner as described above. “1” of register 3A
" data is sequentially shifted to the 3H side in accordance with the clock. In this way, the data in the shift register SR goes around once every 8 clocks, and every 8th clock, the 5-bit counter 4
is incremented, and the count data 8D, 8E, 8F, 8G, and 8H of the 5-bit counter 4 change. The output value of the encoder 20 becomes the lower bits of the clock count value, and the count value of the 5-bit counter 4 becomes the upper bits of the clock count value.

【0016】このようにして、シフトレジスタSRとエ
ンコーダ20とによりクロック計数値の3ビットからな
る下位ビットのカウントデータが得られ、また5ビット
カウンタ4によりクロック計数値の5ビットからなる上
位ビットのカウントデータが得られて、それらにより8
ビットのカウントデータが得られるカウンタ回路を実現
できる。このようにカウンタによりクロックのカウント
データを得るようにし、シフトレジスタとエンコーダと
によっても、クロックのカウントデータを得るようにす
ると、シフトレジスタはカウンタのようなキャリー信号
の伝搬がないから、シフトレジスタとエンコーダとによ
りクロックを高速でカウントできる。また、出力するカ
ウントデータのビット数が同じであれば、エンコーダか
ら出力されるカウントデータのビット数だけビット数が
少ないカウンタを用いることができるから、カウンタに
よってもクロックを高速でカウントできる。それにより
、データ入力後のクロックのカウント動作を高速化でき
る。そして、出力するカウントデータのビット数が多い
程、カウント動作を高速化できる効果は著しい。
In this way, the shift register SR and the encoder 20 obtain the count data of the lower bits consisting of 3 bits of the clock count value, and the 5-bit counter 4 obtains the count data of the upper bits consisting of 5 bits of the clock count value. Count data is obtained, and from them 8
A counter circuit that can obtain bit count data can be realized. If the clock count data is obtained by the counter in this way, and the clock count data is also obtained by the shift register and encoder, the shift register does not have the propagation of a carry signal like a counter, so it can be used as a shift register. The clock can be counted at high speed using an encoder. Furthermore, if the number of bits of the count data to be output is the same, a counter with a smaller number of bits by the number of bits of the count data output from the encoder can be used, so that the counter can also count the clock at high speed. This makes it possible to speed up the clock counting operation after data input. Furthermore, the greater the number of bits of count data to be output, the more remarkable the effect of speeding up the counting operation.

【0017】なお、本実施例ではエンコーダから3ビッ
トのカウントデータを得るようにしたが、それは例示で
あり、適宜のビット数で出力するカウンタと、適宜の段
数のシフトレジスタとを用い得るのは勿論であり、本実
施例に限定されるものではない。
In this embodiment, 3-bit count data is obtained from the encoder, but this is just an example, and a counter that outputs an appropriate number of bits and a shift register with an appropriate number of stages can be used. Of course, the present invention is not limited to this embodiment.

【0018】[0018]

【発明の効果】以上詳述したように本発明のカウンタ回
路は、所定信号をシフトデータとし、クロックをシフト
クロックとしていて、フィードバック接続された複数段
のシフトレジスタと、所定信号をリセット信号としてシ
フトレジスタの所定段のデータをカウント対象としてい
るカウンタと、特定段を除く各段のシフトレジスタのデ
ータをエンコードするエンコーダとを備えたので、シフ
トレジスタ及びエンコーダによりカウント動作をする場
合は、カウンタの如きキャリー信号の伝搬による時間を
要せずカウント動作の時間が短くなる。またカウンタに
は、クロック計数値のビット数より少ないビット数のカ
ウンタを用い得るから、カウンタによるカウント動作の
時間が短くなる。したがってビット数が多いカウントデ
ータを得る場合でも、クロックを高速度にカウントでき
るカウンタ回路を提供できる優れた効果を奏する。
As described in detail above, the counter circuit of the present invention uses a predetermined signal as shift data and a clock as a shift clock, and uses a plurality of feedback-connected shift registers to shift the predetermined signal as a reset signal. Since it is equipped with a counter that counts data in a predetermined stage of the register and an encoder that encodes the data of the shift register in each stage except for a specific stage, when performing a counting operation using the shift register and encoder, it is possible to use The time required for the propagation of the carry signal is not required, and the time for the counting operation is shortened. Further, since a counter having a smaller number of bits than the number of bits of the clock count value can be used as the counter, the time required for the counting operation by the counter is shortened. Therefore, even when obtaining count data with a large number of bits, there is an excellent effect of providing a counter circuit that can count clocks at high speed.

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

【図1】本発明に係るカウンタ回路の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram showing the configuration of a counter circuit according to the present invention.

【図2】シフトレジスタの内部の構成を示すブロック図
である。
FIG. 2 is a block diagram showing the internal configuration of a shift register.

【図3】従来のカウンタ回路の構成を示すブロック図で
ある。
FIG. 3 is a block diagram showing the configuration of a conventional counter circuit.

【図4】図3におけるカウンタ回路の内部の構成を示す
ブロック図である。
FIG. 4 is a block diagram showing the internal configuration of the counter circuit in FIG. 3;

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

4          5ビットカウンタ5,6,7 
 4入力OR回路 SR          シフトレジスタ11,16 
      1ビットシフトレジスタ20      
    エンコーダ
4 5-bit counter 5, 6, 7
4-input OR circuit SR shift register 11, 16
1 bit shift register 20
encoder

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  所定信号が入力された場合に、クロッ
クを計数するカウンタ回路において、前記所定信号をシ
フトデータとし、前記クロックをシフトクロックとして
おり、フィードバック接続された複数段のシフトレジス
タと、前記所定信号をリセット信号とし、シフトレジス
タの所定段のデータをカウント対象としているカウンタ
と、特定段を除く各段のシフトレジスタのデータをエン
コードするエンコーダとを備え、エンコーダの出力値を
計数値の下位ビットとし、カウンタのデータを計数値の
上位ビットとしていることを特徴とするカウンタ回路。
1. A counter circuit that counts clocks when a predetermined signal is input, the predetermined signal being shift data and the clock being a shift clock, comprising a plurality of feedback-connected shift registers; A counter uses a predetermined signal as a reset signal, and includes a counter that counts data in a predetermined stage of a shift register, and an encoder that encodes data in each stage of the shift register except for a specific stage. A counter circuit characterized in that the counter circuit is configured as a bit, and the data of the counter is used as the upper bits of the counted value.
JP5228291A 1991-03-18 1991-03-18 Counter circuit Pending JPH04306018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5228291A JPH04306018A (en) 1991-03-18 1991-03-18 Counter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5228291A JPH04306018A (en) 1991-03-18 1991-03-18 Counter circuit

Publications (1)

Publication Number Publication Date
JPH04306018A true JPH04306018A (en) 1992-10-28

Family

ID=12910443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5228291A Pending JPH04306018A (en) 1991-03-18 1991-03-18 Counter circuit

Country Status (1)

Country Link
JP (1) JPH04306018A (en)

Similar Documents

Publication Publication Date Title
US4611337A (en) Minimal logic synchronous up/down counter implementations for CMOS
US4396829A (en) Logic circuit
JPH04306018A (en) Counter circuit
US4692640A (en) Majority circuit comprising binary counter
JPH06291604A (en) Variable delay circuit
US4581751A (en) Reversible shift register
US3423576A (en) Reversible counting circuit apparatus
JPS62192097A (en) Shift register circuit
US3862401A (en) Multi-phase pulse counter
JPH03228297A (en) Shift register circuit
JP2658232B2 (en) N-base counter
JP2643316B2 (en) Counter and configuration method thereof
JPH03254215A (en) Cascade connection counter
KR940006919B1 (en) Register shift circuit
KR0142470B1 (en) Synchronous counter circuit
SU1541776A1 (en) Counter
JP2001127619A (en) Counter circuit
JPH04302527A (en) Counting circuit
JPH0331015B2 (en)
GB1140491A (en) Improvements in or relating to shift registers
JPS6179322A (en) Counter circuit
JP2000029666A (en) CMOS size comparison circuit
JP2002204157A (en) Counter circuit
JPH05327480A (en) Synchronizing counter
JPS60127819A (en) Binary counter