JPS5871734A - Counter circuit - Google Patents

Counter circuit

Info

Publication number
JPS5871734A
JPS5871734A JP17036881A JP17036881A JPS5871734A JP S5871734 A JPS5871734 A JP S5871734A JP 17036881 A JP17036881 A JP 17036881A JP 17036881 A JP17036881 A JP 17036881A JP S5871734 A JPS5871734 A JP S5871734A
Authority
JP
Japan
Prior art keywords
circuit
count
bits
register
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.)
Granted
Application number
JP17036881A
Other languages
Japanese (ja)
Other versions
JPS6333805B2 (en
Inventor
Toshiaki Koyama
俊明 小山
Hiroshi Iwamoto
博志 岩本
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP17036881A priority Critical patent/JPS5871734A/en
Publication of JPS5871734A publication Critical patent/JPS5871734A/en
Publication of JPS6333805B2 publication Critical patent/JPS6333805B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K27/00Pulse counters in which pulses are continuously circulated in a closed loop; Analogous frequency dividers

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
  • Error Detection And Correction (AREA)

Abstract

PURPOSE:To obtain a counter circuit which is capable of a high-speed working with a small number of gates, by constituting a replacing circuit in a counter consiting of n bits of a shifting means for (n-1)bits and an exclusive OR circuit for a bit. CONSTITUTION:A count holding register 1 and a work register 3 are driven by the two phase timing signals 101 and 102 which are supplied fon a timing circuit 4. The register 1 is set to its initial state by an initial setting signal 103, and then rewritten to the value of the register 3 by a count replacing signal 104. A count replacing circuit 5 shifts the 2nd-n-th bits, for example, by a bit among (n) count bits of the register 1, and transfers the 1st and n-th bits to the register 3 on the basis of the timing signal 102, in the form of a bit which passed through an exclusive OR gate.

Description

【発明の詳細な説明】 本発明は、カウンタ回路に関し、特に少な一ゲート数を
用φて、カウント値よりもカウンシ数を重視する場合に
適用できるカウンタ回路に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a counter circuit, and particularly to a counter circuit that uses a small number of gates and can be applied when the count number is more important than the count value.

LSIを用≠て論理回路を設計する場合、LSIの診断
率を向上させるため、通常、同相転送を禁止して論理設
計を行って−る。その場合に、カウンタ回路の構t&は
、従来より第1図に示すように、カラン)値を保持する
レジスタ1と、プラス1(あるいはマイナス1)の演算
を行うインクリメント(ある−社デクリメント)回路2
と、レジスタの同相転送を避妙るために、前の回路2で
演算された結果(針数値)を保持するワーク・レジスタ
3と、2招のタイ濁ング101および102を常時供給
するタイミング発生阿路養とからなる。
When designing a logic circuit using an LSI, in order to improve the diagnosis rate of the LSI, the logic is usually designed with in-phase transfer prohibited. In that case, the structure of the counter circuit has traditionally been as shown in Figure 1: a register 1 that holds a value, and an increment (or decrement) circuit that performs a plus-one (or minus-one) operation. 2
Then, in order to avoid in-phase transfer of the registers, a timing is generated to constantly supply the work register 3 that holds the result (handle value) calculated in the previous circuit 2, and the 2-invitation tie digits 101 and 102. It consists of Aroyo.

先ずカウント保持レジスタlは、初期設定信号103に
より、レジスタのセットあるいはりセット入力端子を用
いて所定の初期状態にされる一ワーク・レジスタ3Fi
、タイミング102に同期して、常時、そのときのカウ
ント保持レジスタlの内容にプラス1した値を取9述ん
でいる0次に、カウント保持レジスタ1の内容は、カウ
ント更新信号104がオンになるき、ワーク・レジスタ
3に保持されているプラス1された値に書き摸見られる
。 このようにして、カウント更新信号104がオンに
なるごとに、カウント保持レジスタ1はプラス1され、
カウントが更新される。
First, the count holding register 1 is set to a predetermined initial state by the initial setting signal 103 using the set input terminal of the register or the work register 3Fi.
, in synchronization with timing 102, always states the value of the current contents of count holding register l plus 1.0 Next, the contents of count holding register 1 are changed to count update signal 104 when turned on. The value held in work register 3 is incremented by 1. In this way, each time the count update signal 104 turns on, the count holding register 1 is incremented by 1.
The count is updated.

したがって、従来のカウンタ回路では、更新後のカウン
ト値を求めるため、プラス1回路(あるいはマイナス1
回路)2が必要不可欠であり、プラス1(あるいはマイ
ナス1)を演算するためのゲート回路を多数用いる必要
がある。
Therefore, in conventional counter circuits, in order to obtain the updated count value, a plus one circuit (or a minus one circuit) is used.
Circuit) 2 is essential, and it is necessary to use a large number of gate circuits for calculating plus 1 (or minus 1).

本発明の目的は、このような従来の間・題を解決するた
め、ゲート数を削減して簡単な構成にするとともに、高
速カウント動作が可能なカウンタ回路を提供することに
ある。
SUMMARY OF THE INVENTION In order to solve these conventional problems, it is an object of the present invention to provide a counter circuit that has a simple configuration by reducing the number of gates and is capable of high-speed counting operation.

上記目的を達成するため、本発明のカウンタ回路は、n
ビットで構成されるカウンタの更新回路をn −1ビツ
トにつ−てのシフト手段と1ビツトについての排他的論
理和ゲートで構成することを特徴としている。
In order to achieve the above object, the counter circuit of the present invention has n
A feature of the present invention is that the update circuit for a counter made up of bits is composed of a shift means for n-1 bits and an exclusive OR gate for 1 bit.

カウンタ回路では、使一方によってカウント値を必要と
せず、カウント数のみを必要とする場合か多いが、この
ような用途に対して、本発明のカウンタ回路は、従来必
要であるプラス1回路を用いることなく、n個の計数ビ
ットのうちの*−1ビツトについてのシフ)論理と1個
の排他約論理和とからなる更新回路を用−て、ゲート数
減少と高速カランF動作を可能にする。
In many cases, a counter circuit does not require a count value, but only a count number, depending on its usage.For such applications, the counter circuit of the present invention uses a plus-one circuit, which is conventionally required. The number of gates can be reduced and high-speed Callan F operation can be achieved by using an update circuit consisting of a shift (shift) logic for *-1 bit out of n counting bits and one exclusive disjunction. .

以下1本発明の実施例について、図面によ〉説明する。An embodiment of the present invention will be described below with reference to the drawings.

第2図は、本発明の一実施例を示すカウンタ回路の*成
因である。
FIG. 2 shows the origins of a counter circuit showing one embodiment of the present invention.

第2図に示すように、本発明のカウンタ回路は、カウン
ト保持レジスタ1と、ワーク・レジスタ3と、2相のタ
イミング101.102  を常時供給するタイミング
発生回路4とを具備する他に、プラスl1g回路に替っ
て新しくカウント更新回路6を備える。
As shown in FIG. 2, the counter circuit of the present invention includes a count holding register 1, a work register 3, and a timing generation circuit 4 that constantly supplies two-phase timings 101 and 102. A new count update circuit 6 is provided in place of the l1g circuit.

カウント保持レジスタlは、従来と同じように、初期設
定信号103によって所定の初期状態となり、カウント
更新信号104がオンになることによってワーク・レジ
スタ3の値にその内容が書き換えられる。 また、ワー
ク・レジスタ8も、従来と同じように、タイミング10
2で8時、次のカウント値となるべきカウント更新回路
δの出力を取り込む。 このように、カウント、更新信
号104がオンになるごとに、カウント保持レジスタ1
は更新される。
As in the conventional case, the count holding register 1 is brought into a predetermined initial state by the initial setting signal 103, and its contents are rewritten to the value of the work register 3 by turning on the count update signal 104. In addition, the work register 8 is also set at timing 10, as in the past.
At 8 o'clock in 2, the output of the count update circuit δ, which should become the next count value, is taken in. In this way, each time the count and update signal 104 turns on, the count holding register 1
will be updated.

カウント更新回路6は、二ビットの計数ビットのうち!
l−1ビットについて、1ビツトずつジアドするように
入力側と出力側を結線するのみでよく、残)の1ビツト
についてのみ、1個の排他的論理和ゲートを入力側と出
力側に接続して構成される。
The count update circuit 6 is one of the two counting bits!
For l-1 bits, it is only necessary to connect the input and output sides to diad one bit at a time, and for the remaining (1) bit, connect one exclusive OR gate to the input and output sides. It consists of

第3図は、本発明の実施例を示すカウント更新回路の構
成図である。
FIG. 3 is a configuration diagram of a count update circuit showing an embodiment of the present invention.

第3図において、al  はビット位置1に対応する入
力を示し1./  はビット位置1に対応する更新出力
を示す。
In FIG. 3, al indicates the input corresponding to bit position 1.1. / indicates the updated output corresponding to bit position 1.

第3図に示すように、更新出力h′1(i−1〜(n−
1))は入力&よ(i−2〜Il)を単にシフトさせる
ことにより求められ、更新出力の残りの1つ&−はao
とanの排他的論理和ゲート6を1個設けるだけで求め
られる。 すなわち、83図に示すカウント更新回路δ
は、a′1−&1+1 (i−1〜(n−1)) 、a
n−’n■a□ により更新後の計数値を求めるもので
ある。なお、■は排他的論理和を示す。
As shown in FIG. 3, the updated output h'1(i-1 to (n-
1)) is found by simply shifting the input &yo(i-2~Il), and the remaining one of the update outputs &- is ao
This can be obtained by simply providing one exclusive OR gate 6 of and an. In other words, the count update circuit δ shown in FIG.
is a'1-&1+1 (i-1~(n-1)), a
The updated count value is determined by n-'n■a□. Note that ■ indicates exclusive OR.

また、排他的論理和の入力信号のどちらか一方の極性を
反転することによシ、a′、−11+、(1−1〜(!
l−1))、&−−〜■a0  を更新後の計数値とし
て求めることができる。なお、a、■ala〜とa、の
排他的論理和の否定を示す。
Also, by inverting the polarity of either one of the input signals of the exclusive OR, a', -11+, (1-1~(!
l-1)), &---~■a0 can be obtained as the updated count value. In addition, it shows the negation of the exclusive OR of a, ``ala~'' and a.

なお、排他的論理和ゲートは、2つの入力のうちの一方
の入力極性を反転させるだけで、相補的出力が得られる
ことになるので、いずれか一方の値を更新カウント値と
して選択すればよい。したがって、カウンタ保持レジス
タ1の出力に、反転と非反転の2つの出力がある場合に
は、新たに極性反転回路を追加することなく、2つの出
力のいずれか一方を選択するだけでよい。
Note that the exclusive OR gate can obtain complementary outputs simply by reversing the polarity of one of its two inputs, so it is only necessary to select one of the values as the updated count value. . Therefore, if the counter holding register 1 has two outputs, inverted and non-inverted, it is sufficient to select one of the two outputs without adding a new polarity inversion circuit.

III¥4図は第3図に示すカウント更新回路においで
、n−手の場合の更新値の説明図である〇第4図では、
n−4の場合について、カウンタの初期値を“1111
 として、カウンタ保持レジスタlの内容がどのように
更新されていくかを示している。 &l、 &、、 i
iL、  につψては、前の値の&。
III¥4 Figure is an explanatory diagram of the updated value in the case of n-movement in the count update circuit shown in Figure 3. In Figure 4,
For the case of n-4, the initial value of the counter is set to "1111".
shows how the contents of the counter holding register l are updated. &l, &,,i
For iL, ψ is & of the previous value.

& a + & 4  を1ビツトずつシフトして求め
られ、残りのa、については、前の値の10と14との
排他的論理和で求められる。
It is obtained by shifting & a + & 4 one bit at a time, and the remaining a is obtained by exclusive ORing the previous values 10 and 14.

n−養の場合には、矢印で示すように1から16までカ
ウントした後、再び初期@”1ill”に戻るので、1
6までのカウンタ回路として使用するこζができる。 
なお、“0000″の値に初期値を設定すると、元の値
にループしてしまうので、これ以外の値を初期値として
用いる必要がある。
In the case of n-nutrient, after counting from 1 to 16 as shown by the arrow, it returns to the initial @"1ill", so 1
It can be used as a counter circuit up to 6.
Note that if the initial value is set to "0000", a loop will be returned to the original value, so it is necessary to use a value other than this as the initial value.

また、第4図から明らかなように、1から15までのカ
ウンシ値は、順次プラス1あるーはマイナス1されるこ
となく、任意の値に変化して―〈ので、カウント値では
なくカウント数を重視する場合に用いればきわめて有利
である。
Also, as is clear from Figure 4, the count values from 1 to 15 change to any value without being sequentially increased by plus 1 or minus 1. It is extremely advantageous to use this method when emphasis is placed on

第5図は、本発明のカウンタ回路において、ビット数に
対する最大カウント数を示す図である。
FIG. 5 is a diagram showing the maximum count number relative to the number of bits in the counter circuit of the present invention.

計数ビット”−2p n ”’−3、11−4の場合は
、オール“0”を除−た組み合わせ数と同一数だけカウ
ントすることができるが、n−6の場合には、少ないカ
ラン)数で自分にループする値が途中に存在するので、
それらを除−た値を初期値に用いるため)最大力、ラン
ト数は全組み合わせ数32より少なくなる。zl−f3
の場合にも、同じ理由により全組み合わせ′t!1.6
4より少ないカウンシ数である◎ 第6図は、本発明の他の実施例を示すカラ〉・り回路の
構成図である。
In the case of counting bits "-2p n"'-3 and 11-4, it is possible to count the same number of combinations excluding all "0", but in the case of n-6, there are fewer karans) Since there is a value in the middle that loops to itself with a number,
Since the value obtained by dividing these values is used as the initial value, the maximum force and runt number are less than the total number of combinations, 32. zl-f3
For the same reason, all combinations 't! 1.6
The number of counts is less than 4. ◎ FIG. 6 is a block diagram of a color circuit showing another embodiment of the present invention.

第6図(a)ではカウンタ回路の内容にパリティ・ピッ
Fを付加した場合であって、カウント保持レジスタ11
のパリティ・ビットPを含めた全体の値ヲパリテイ・チ
ェッカ14に加える。従来のカウンタ回路では、プラス
1回路で更新した値にもとづいて予測パリティを発生さ
せる回路が必要であるが、本発明のカウント更新回路1
2では、予測パリティのピッtを1個の排他的論理和ゲ
ージの与で発生することができ、ゲート数が削減される
。 すなわち、第6図(b)に示すように、前述の方法
で入力a0〜&、から出力、/、〜a−を得るとともに
、更新後のパリティP′は、an  とパリティ・ピッ
)Pとの排他的論理和、あるψ11ian  とパリテ
ィ・ピッ)Pとの排他的論理和の否定により、簡単に求
めることができる。 剥えば、入力、が”l l l 
l”とパリティ“ I+のときには、更新出力は“11
10”とパリティ“0 となる。
FIG. 6(a) shows the case where a parity bit F is added to the contents of the counter circuit, and the count holding register 11
The entire value including the parity bit P is added to the parity checker 14. Conventional counter circuits require a circuit that generates predicted parity based on the value updated by the plus 1 circuit, but the count update circuit 1 of the present invention
In No. 2, the predicted parity pit t can be generated using one exclusive OR gauge, and the number of gates is reduced. That is, as shown in FIG. 6(b), the outputs /, ~a- are obtained from the inputs a0~&, using the method described above, and the updated parity P' is obtained by an and parity p)P. It can be easily obtained by negating the exclusive OR of a certain ψ11ian and the parity pitch P. If you peel it off, the input will be “l l l
l” and parity “I+, the update output is “11
10” and the parity is “0”.

以上説明したように、本発明のカウンタ回路では、従来
のプラス1回路を構成するゲートの数から排他的論理和
ゲー)1個分(パリティ発生するときには2個分)を差
し引いたゲート数の削減が可能であり、またゲート段数
が減少するのでより高速なカウント動作が可能となる。
As explained above, in the counter circuit of the present invention, the number of gates can be reduced by subtracting one exclusive OR game (two gates when parity occurs) from the number of gates constituting the conventional plus-one circuit. In addition, since the number of gate stages is reduced, faster counting operation is possible.

さらに、パリティ・ビットを付加した場合には、複雑な
パリティ予測MMが不要であシ、ゲート数もさらに削減
される。
Furthermore, when a parity bit is added, a complicated parity prediction MM is not required and the number of gates is further reduced.

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

11s1図は従来のカウンタ回路の構成図、第2図は本
発明の実施例を示ずカウンタ回路の構成図、第3図は本
発明の実施例を示すカウント更新回路の構成図、第4図
は第3図に示す回路の更新動作の一稠を壓す図、第6図
は本発明のカウンタ回路のビット数に対する最大カウン
ト数を示す図、第6図は本発明の他の実施例を示すカウ
ンタ回路の構成Vである。 l:カウンタ値保持レジスタ、2ニブラス1回路、3=
ワーク・レジスタ、4=タイミング発生回路、5:カウ
ント更新回路、6,7:排他的論理和ゲート、11:パ
リティ・ビット付加の保持レジスタ、12:カウント更
新−%、13:ワーク・レジスタ、14:パリティ・チ
ェッカO第1図 第2図 第3図 第4図
11s1 is a block diagram of a conventional counter circuit, FIG. 2 is a block diagram of a counter circuit that does not show an embodiment of the present invention, FIG. 3 is a block diagram of a count update circuit that shows an embodiment of the present invention, and FIG. 6 is a diagram illustrating the update operation of the circuit shown in FIG. 3, FIG. 6 is a diagram illustrating the maximum count number with respect to the number of bits of the counter circuit of the present invention, and FIG. 6 is a diagram illustrating another embodiment of the present invention. This is the configuration V of the counter circuit shown in FIG. l: Counter value holding register, 2 Nibras 1 circuit, 3=
Work register, 4 = timing generation circuit, 5: count update circuit, 6, 7: exclusive OR gate, 11: holding register with parity bit added, 12: count update -%, 13: work register, 14 :Parity checker O Figure 1 Figure 2 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】 ■複数に)ビットの計数ビットを持つカウンター路にお
いて、(n−1)ビットについてのシフ)子役と1ビツ
トについての排他的kII和ゲージで計数値の更新回路
を!威する仁とを特徴とするカウンタ回路。 ■前記更新回路は、更新前の計数ビットの値を&t (
1−1〜!L)、更新後の計数ビットの値をa−(1−
1〜m)としたと龜、”t ”” ”1+ 1 (1a
m 1〜XL−1)、a’、−〜■aい  となるよう
に構成される仁とを特徴とする特許−求の範囲第lll
[記載のカウンタ回路0 (至)前記更新回路は1.’、 = 、、+1 (t 
−1〜m−1)&−−ζ]「り  となるように構成さ
れる仁とを特徴とする特許請求の範m第1項記載のカウ
ンタ回路。(〜Φali;janと11の排他的論理和
の否定を示す) (〜前記更新回路祉、更新前のパリティ・ビットをP1
更新後のパリティ・ビットをP′とするとき、P′−へ
■PIたけP′−a!l■P となるように構成される
ことを特徴とする特許請求の範囲第1項記載のカウンタ
回路。
[Claims] ■In a counter path having count bits of (plural) bits, a circuit for updating the count value with a shift) child actor for (n-1) bits and an exclusive kII sum gauge for 1 bit! A counter circuit that is characterized by its powerful characteristics. ■The update circuit updates the value of the count bit before update by &t (
1-1~! L), the updated count bit value is a-(1-
1~m), then ``t'''' ``1+1 (1a
m 1 to XL-1), a', - to ■ ai
[Counter circuit described in 0 (to) The update circuit is 1. ', = ,,+1 (t
-1~m-1)&--ζ] "The counter circuit according to claim m, characterized in that (indicates the negation of logical OR) (~In the update circuit, the parity bit before update is P1
When the parity bit after update is P', P'- is PI only P'-a! 2. The counter circuit according to claim 1, wherein the counter circuit is configured such that l■P.
JP17036881A 1981-10-23 1981-10-23 Counter circuit Granted JPS5871734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17036881A JPS5871734A (en) 1981-10-23 1981-10-23 Counter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17036881A JPS5871734A (en) 1981-10-23 1981-10-23 Counter circuit

Publications (2)

Publication Number Publication Date
JPS5871734A true JPS5871734A (en) 1983-04-28
JPS6333805B2 JPS6333805B2 (en) 1988-07-07

Family

ID=15903633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17036881A Granted JPS5871734A (en) 1981-10-23 1981-10-23 Counter circuit

Country Status (1)

Country Link
JP (1) JPS5871734A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014099238A (en) * 2014-01-08 2014-05-29 Ps4 Luxco S A R L Semiconductor device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54120541A (en) * 1978-03-10 1979-09-19 Sharp Corp Input circuit of shift register
JPS5634237A (en) * 1979-08-29 1981-04-06 Fujitsu Ltd N-notation ring counter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54120541A (en) * 1978-03-10 1979-09-19 Sharp Corp Input circuit of shift register
JPS5634237A (en) * 1979-08-29 1981-04-06 Fujitsu Ltd N-notation ring counter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014099238A (en) * 2014-01-08 2014-05-29 Ps4 Luxco S A R L Semiconductor device

Also Published As

Publication number Publication date
JPS6333805B2 (en) 1988-07-07

Similar Documents

Publication Publication Date Title
CN101154153B (en) Bit field operation circuit
US4110832A (en) Carry save adder
US4153939A (en) Incrementer circuit
US5957996A (en) Digital data comparator and microprocessor
JP2596909B2 (en) Digital processing device with min / max search instructions
JPS642986B2 (en)
JPH0570187B2 (en)
US4641278A (en) Memory device with a register interchange function
GB2050018A (en) Shift register
JPS5871734A (en) Counter circuit
JP2937326B2 (en) Test circuit for logic circuits
US4020362A (en) Counter using an inverter and shift registers
JPH09198231A (en) Arithmetic processor
US6122651A (en) Method and apparatus for performing overshifted rotate through carry instructions by shifting in opposite directions
JPH1063500A (en) Signal processor
JP3329921B2 (en) Arithmetic unit
JP2654451B2 (en) Data output method
SU1721626A2 (en) Vector generator
JP3074958B2 (en) Serial multiplier with addition function
JP2001034457A (en) Adding and subtracting circuit
SU634285A1 (en) Combination scanning arrangement
JPH0588887A (en) Data processor
JP2615746B2 (en) Bit operation circuit
SU1566401A1 (en) Vector generator
JPS6236255B2 (en)