TWI776488B - Counting device - Google Patents
Counting device Download PDFInfo
- Publication number
- TWI776488B TWI776488B TW110115547A TW110115547A TWI776488B TW I776488 B TWI776488 B TW I776488B TW 110115547 A TW110115547 A TW 110115547A TW 110115547 A TW110115547 A TW 110115547A TW I776488 B TWI776488 B TW I776488B
- Authority
- TW
- Taiwan
- Prior art keywords
- counting
- stage
- signal
- flip
- circuit
- Prior art date
Links
Images
Landscapes
- Measurement Of Unknown Time Intervals (AREA)
- Radar Systems Or Details Thereof (AREA)
- Investigating Or Analysing Biological Materials (AREA)
- Vehicle Body Suspensions (AREA)
Abstract
Description
本發明是有關於一種計數裝置,且特別是有關於一種可提升工作速度的計數裝置。 The present invention relates to a counting device, and in particular, to a counting device that can increase the working speed.
在計數裝置的應用中,可針對計數裝置設定一初始值,然後在計數動作中,計數裝置可依據一時脈信號來動作,並輸出多個位元的計數結果。 In the application of the counting device, an initial value can be set for the counting device, and then during the counting operation, the counting device can operate according to a clock signal and output the counting results of multiple bits.
在習知技術領域中,計數裝置在操作時,可以設定一計算目標數值以作為計數終止點。並且,計數裝置中的邏輯運算電路會被啟動,當時脈信號在震盪時,邏輯運算電路會針對逐漸減小的計數結果進行運算,並在當計數結到達計算目標數值時,邏輯運算電路可輸出一個計數終止信號。在這樣的應用中,當時脈信號的頻率過高時(週期過小),而使得邏輯運算電路的計算速度來不及產生計數終止信號時,計數裝置的計數動作就會產生錯誤。 In the prior art, when the counting device is in operation, a calculation target value can be set as the counting end point. In addition, the logic operation circuit in the counting device will be activated. When the clock signal is oscillating, the logic operation circuit will perform operations on the gradually decreasing count result, and when the counting node reaches the calculation target value, the logic operation circuit can output. A count termination signal. In such an application, when the frequency of the clock signal is too high (the period is too small), and the calculation speed of the logic operation circuit is too late to generate the count termination signal, the counting action of the counting device will generate errors.
本發明提供一種計數裝置,可有效提升工作頻率。 The invention provides a counting device, which can effectively increase the working frequency.
本發明的計數裝置包括多個計數電路級以及第一邏輯運算電路。計數電路級依序連接,其中第一級的計數電路級依據第一時脈信號執行計數動作,並產生第一級計數結果。第二級的計數電路級至第N級的計數電路級依據第二時脈信號以進行計數動作,N為大於2的正整數。第一邏輯運算電路耦接該些計數電路級,依據指示信號以提供第一級計數結果以做為第二時脈信號。 The counting device of the present invention includes a plurality of counting circuit stages and a first logic operation circuit. The counting circuit stages are connected in sequence, wherein the counting circuit stage of the first stage performs the counting action according to the first clock signal, and generates the counting result of the first stage. The counting circuit stage of the second stage to the counting circuit stage of the Nth stage performs the counting operation according to the second clock signal, and N is a positive integer greater than 2. The first logic operation circuit is coupled to the counting circuit stages, and provides the first stage counting result as the second clock signal according to the indication signal.
基於上述,本發明透過使第一級的計數電路級依據相對高頻率的第一時脈信號來工作,並使第一時脈信號降頻以產生第二時脈信號,再使後級的第二級的計數電路級至第N級的計數電路級依據對低頻率的第二時脈信號來工作。如此一來,本發明實施例的計數裝置可以產生第一時脈信號所進行的計數結果,且不至於因運算電路來不及動作而產生錯誤,有效提升計數裝置的速度。 Based on the above, the present invention makes the counter circuit stage of the first stage work according to the relatively high-frequency first clock signal, and reduces the frequency of the first clock signal to generate the second clock signal, and then makes the second clock signal of the subsequent stage work. The counter circuit stage of the second stage to the counter circuit stage of the Nth stage work according to the second clock signal of the low frequency. In this way, the counting device of the embodiment of the present invention can generate the counting result performed by the first clock signal, and avoid errors due to the operation circuit being too late, thereby effectively increasing the speed of the counting device.
100:計數裝置 100: Counting device
111~11N、211~217:計數電路級 111~11N, 211~217: Counting circuit level
120、400、500:邏輯運算電路 120, 400, 500: logic operation circuit
CK:時脈端 CK: clock terminal
CK1:第一時脈信號 CK1: The first clock signal
CK2:第二時脈信號 CK2: The second clock signal
CNT<0>~CNT<N-1>:計數結果 CNT<0>~CNT<N-1>: count result
CNTB<1>~CNTB<6>:反向計數結果 CNTB<1>~CNTB<6>: Reverse count result
D:資料端 D: data terminal
DEL:延遲器 DEL: Delayer
FF1~FF7、FFx、DFF1、DFF51、DFF52:正反器 FF1~FF7, FFx, DFF1, DFF51, DFF52: flip-flop
i0~i6:初始值 i0~i6: initial value
Ini:初始端 Ini: Initiator
IV1~IV9、IV41~IV45、IV51:反向器 IV1~IV9, IV41~IV45, IV51: Inverter
ND1~ND4、ND41、ND42、ND51、ND52:反及閘 ND1~ND4, ND41, ND42, ND51, ND52: reverse and gate
NO1、NO2、NO3、NO51:反或閘 NO1, NO2, NO3, NO51: reverse or gate
OR1、OR41:或閘 OR1, OR41: OR gate
Q:輸出端 Q: output terminal
R:重置端 R: reset terminal
RST:重置信號 RST: reset signal
RUN:指示信號 RUN: Indication signal
RUNX:指示信號接收端 RUNX: Indication signal receiver
SRUN:同步指示信號 SRUN: synchronization indication signal
STP:計數終止信號 STP: count stop signal
T1~T4:時間點 T1~T4: Time point
X1~X6:反互斥或閘 X1~X6: anti-mutual exclusion or gate
圖1繪示本發明一實施例的計數裝置的示意圖。 FIG. 1 is a schematic diagram of a counting device according to an embodiment of the present invention.
圖2繪示本發明實施例的計數裝置的多個計數電路級的電路示意圖。 FIG. 2 is a schematic circuit diagram of a plurality of counting circuit stages of a counting device according to an embodiment of the present invention.
圖3繪示本發明實施例的計數電路級中的正反器的元件符號圖。 FIG. 3 is a schematic diagram of components of a flip-flop in a counting circuit stage according to an embodiment of the present invention.
圖4繪示本發明實施例的計數裝置的邏輯運算電路的示意 圖。 4 is a schematic diagram of a logic operation circuit of the counting device according to the embodiment of the present invention picture.
圖5繪示本發明實施例中,計數裝置中用以產生一計數終止信號的邏輯運算電路的電路示意圖。 FIG. 5 is a schematic circuit diagram of a logic operation circuit for generating a counting termination signal in the counting device according to an embodiment of the present invention.
圖6A以及圖6B分別繪示本發明實施例的計數裝置依據不同初始值所執行的計數動作的波形圖。 FIG. 6A and FIG. 6B respectively illustrate waveform diagrams of counting operations performed by the counting device according to the embodiment of the present invention according to different initial values.
請參照圖1,圖1繪示本發明一實施例的計數裝置的示意圖。計數裝置100包括多個計數電路級111~11N以及邏輯運算電路120。計數電路級111~11N依序連接,其中,第一級的計數電路級111接收第一時脈信號CK1,並依據第一時脈信號CK1執行計數動作,以產生第一級計數結果CNT<0>。邏輯運算電路120耦接計數電路級111~11N。第一級的計數電路級111傳送所產生的第一級計數結果CNT<0>至邏輯運算電路120。邏輯運算電路120並依據第一級計數結果CNT<0>以及指示信號RUN以提供第一級計數結果CNT<0>來產生第二時脈信號CK2。
Please refer to FIG. 1 , which is a schematic diagram of a counting device according to an embodiment of the present invention. The
計數電路級111~11N中,第二級的計數電路級112至第N級的計數電路級11N均接收第二時脈信號CK2。第二級的計數電路級112至第N級的計數電路級11N依據第二時脈信號CK2來執行計數動作,並分別產生第二計數結果至第N計數結果CNT<1>~CNT<N-1>。其中,第二時脈信號CK2的頻率低於第一時脈信號CK1的頻率。
Among the
在本實施例中,邏輯運算電路120可依據指示信號RUN第一級計數結果CNT<0>以決定使第二時脈信號CK2等於第一級計數結果CNT<0>或第一時脈信號CK1。其中,在當指示信號RUN為第一邏輯準位時,邏輯運算電路120可以提供第一級計數結果CNT<0>以作為第二時脈信號CK2。相對的,在當指示信號RUN為第二邏輯準位時,邏輯運算電路120則可以提供第一時脈信號CK1以作為第二時脈信號CK2。另外,計數電路級111~11N並接收指示信號RUN,並在當指示信號RUN為第一邏輯準位時,被啟動以執行加速的計數動作。在本實施例中,第一邏輯準位可以為邏輯1或邏輯0,第二邏輯準位則可以為邏輯0或邏輯1。
In this embodiment, the
在本實施例中,計數電路級111~11N可以建構為一同步計數器。計數電路級111~11N在一初始時間點可分別接收多個初始值。這些初始值用以設定計數裝置100的一計數起點。計數電路級111~11N並在計數動作中由此計數起點執行一遞減計數動作。計數電路級111~11N的計數動作可以在第一級計數結果至第N級計數結果CNT<0>~CNT<N-1>等於一預設值時結束。
In this embodiment, the
值得注意的,在本實施例中,計數電路級111~11N中僅有對應最小有效位元的第一級計數電路級111是依據具有相對高頻率的第一時脈信號CK1來進行計數動作,其餘的第二級計數電路級112至第N級計數電路級11N的計數動作均是依據具有相對低頻率的第一時脈信號CK2來進行。因此,因做為計數依據的時脈信號的頻率過高,而導致的周邊的運算電路音來不及運算所發
生的錯誤可以有效被避免。也因此,計數裝置100在可產生正確的計數結果CNT<0>~CNT<N-1>的前提下,可以有效提升計數動作的速度。
It is worth noting that, in this embodiment, only the first-stage
請參照圖2以及圖3,其中圖2繪示本發明實施例的計數裝置的多個計數電路級的電路示意圖,圖3則繪示本發明實施例的計數電路級中的正反器的元件符號圖。在圖2中,計數裝置200包括計數電路級211~217。其中,第一級的計數電路級211接收第一時脈信號CK1,並依據第一時脈信號CK1以執行計數動作。在本實施例中,第一級的計數電路級211包括正反器FF1以及反向器IV1。請先參照圖3,圖2實施例中的正反器FF1~FF7的電路符號可如圖3所示的正反器FFx。其中,正反器FFx具有時脈端CK、重置端R、初始端ini、指示信號接收端RUNX、資料端D以及輸出端Q。正反器FFx可透過時脈端CK以接收工作時脈;透過初始端ini以接收進行初始化的初始值;透過指示信號接收端RUNX以接收指示信號RUN;透過重置端R以接收重置信號;並透過輸出端Q產生計數結果。
Please refer to FIG. 2 and FIG. 3 , wherein FIG. 2 is a schematic circuit diagram of a plurality of counting circuit stages of the counting device according to the embodiment of the present invention, and FIG. 3 is a schematic diagram showing the elements of the flip-flops in the counting circuit stage according to the embodiment of the present invention. Symbol diagram. In FIG. 2 , the
請重新參照圖2,在第一級的計數電路級211中,正反器FF1的初始端接收初始值i0;正反器FF1的時脈端接收第一時脈信號CK1;正反器FF1的指示信號接收端接收指示信號RUN;正反器FF1的資料端耦接至反向器IV1的輸出端;正反器FF1的輸出端產生第一級計數結果CNT<0>。在本實施例中,正反器FF1可以建構為一除頻器,並用以使第一時脈信號CK1的頻率除以2,
以產生第一級計數結果CNT<0>。
Please refer to FIG. 2 again, in the first stage of the
此外,第二級的計數電路級212包括正反器FF2、反互斥或閘X1以及反向器IV2、IV3。反互斥或閘X1具有第一輸入端接收第二級計數結果CNT<1>,並具有第二輸入端接收依據前級計數結果所產生的邏輯運算結果。其中,在第二級的計數電路級212中,反互斥或閘X1的第二輸入端接收反向器IV2所產生的第一級計數結果CNT<0>的反向信號。反互斥或閘X1的輸出端則耦接至正反器FF2的資料端。
In addition, the
此外,正反器FF2的初始端接收初始值i1;正反器FF2的時脈端接收第二時脈信號CK2;正反器FF2的指示信號接收端接收指示信號RUN;正反器FF2的輸出端產生第二級計數結果CNT<1>。並且,反向器IV3並耦接至正反器FF2的輸出端,用以產生第二級反向計數結果CNTB<1>。 In addition, the initial end of the flip-flop FF2 receives the initial value i1; the clock terminal of the flip-flop FF2 receives the second clock signal CK2; the indication signal receiving end of the flip-flop FF2 receives the indication signal RUN; the output of the flip-flop FF2 The second-level count result CNT<1> is generated at the terminal. In addition, the inverter IV3 is coupled to the output end of the flip-flop FF2 for generating the second-stage reverse counting result CNTB<1>.
在本實施例中,第三級的計數電路級213包括正反器FF3、反互斥或閘X2以及反向器IV4、IV5。反互斥或閘X2具有第一輸入端接收第二級計數結果CNT<2>,並具有第二輸入端接收依據前級計數結果所產生的邏輯運算結果。其中,在第三級的計數電路級213中,反互斥或閘X2的第二輸入端接收反向器IV4以及反或閘NO1所產生的第一級計數結果CNT<0>以及第二級計數結果CNT<1>的或運算結果。反互斥或閘X2的輸出端則耦接至正反器FF3的資料端。
In this embodiment, the
此外,正反器FF3的初始端接收初始值i2;正反器FF3 的時脈端接收第二時脈信號CK2;正反器FF3的指示信號接收端接收指示信號RUN;正反器FF3的輸出端產生第三級計數結果CNT<2>。反向器IV5並耦接至正反器FF3的輸出端,用以產生第二級反向計數結果CNTB<2>。 In addition, the initial end of the flip-flop FF3 receives the initial value i2; the flip-flop FF3 The clock terminal of the flip-flop FF3 receives the second clock signal CK2; the indicator signal receiving terminal of the flip-flop FF3 receives the indicator signal RUN; the output terminal of the flip-flop FF3 generates the third-level counting result CNT<2>. The inverter IV5 is coupled to the output end of the flip-flop FF3 for generating the second-stage reverse counting result CNTB<2>.
第四級的計數電路級214至第七級的計數電路級217的電路架構與第四級的計數電路級213相類似,相關細節不多贅述。其中,第四級的計數電路級214至第七級的計數電路級217分別包括正反器FF4~FF7、反互斥或閘X3~X6以及反向器IV6~IV9。並且,反互斥或閘X3透過反及閘ND1以及反或閘NO1以接收多個前級計數結果(第一級計數結果CNT<0>至第三級計數結果CNT<2>)的邏輯運算結果;反互斥或閘X4透過反及閘ND2、反或閘NO2以及反或閘NO1以接收多個前級計數結果(第一級計數結果CNT<0>至第四級計數結果CNT<3>)的邏輯運算結果;反互斥或閘X5透過反及閘ND3、反或閘NO1以及反或閘NO2以接收多個前級計數結果(第一級計數結果CNT<0>至第五級計數結果CNT<4>)的邏輯運算結果;反互斥或閘X6透過反及閘ND4、反或閘NO1、NO2以及NO3以接收多個前級計數結果(第一級計數結果CNT<0>至第六級計數結果CNT<5>)的邏輯運算結果。
The circuit structure of the
附帶一提,反向器IV6至IV9分別產生第四級反向計數結果CNTB<3>至第七級反向計數結果CNTB<6>。正反器FF4~FF7分別依據初始值i3~i6以執行初始化動作。 Incidentally, the inverters IV6 to IV9 generate the fourth-stage reverse count result CNTB<3> to the seventh-stage reverse count result CNTB<6>, respectively. The flip-flops FF4 to FF7 perform initialization actions according to the initial values i3 to i6 respectively.
在本實施例中,正反器FF1~FF7可以是J-K型的正反器。 In this embodiment, the flip-flops FF1 to FF7 may be J-K type flip-flops.
計數電路級211~217可執行一同步計數動作,並在初始時間點上分別依據初始值i0~i6以獲得計數起點。正反器FF1依據第一時脈信號CK1,正反器FF2~FF7則依據第二時脈信號CK2由計數起點開始,執行遞減計數動作。
The
以下請參照圖4,圖4繪示本發明實施例的計數裝置的邏輯運算電路的示意圖。邏輯運算電路400用以依據指示信號RUN以提供第二時脈信號CK2。其中,邏輯運算電路400包括正反器DFF1、反向器IV41~IV45、反及閘ND41、ND42、或閘OR41以及延遲器DEL。正反器DFF1為一D型正反器,接收指示信號RUN並依據第一時脈信號CK1以對指示信號RUN同步,並產生同步指示信號SRUN。另外,正反器DFF1可依據重置信號RST以執行重置動作。反向器IV41、IV42依序串接在正反器DFF1的輸出端以及反及閘ND41的一輸入端間。反及閘ND41的另一輸入端接收第一級計數結果CNT<0>。反及閘ND41針對同步指示信號SRUN以及第一級計數結果CNT<0>進行反及運算,並將結果透過串接的反向器IV43、IV44以及延遲器DEL傳送至及閘ND42。具體來說明,當同步指示信號SRUN為邏輯準位1時,第一級計數結果CNT<0>可在被延遲後,被傳送至及閘ND42的一輸入端。相對的,當同步指示信號SRUN為邏輯準位0時,延遲器DEL傳送邏輯準位1至反及閘ND42。
Please refer to FIG. 4 below. FIG. 4 is a schematic diagram of a logic operation circuit of the counting device according to an embodiment of the present invention. The
在另一方面,或閘OR41接收第一時脈信號CK1以及同步指示信號SRUN。在當同步指示信號SRUN為邏輯準位1時,
第一時脈信號CK1可被遮罩而不被傳送至反及閘ND42。相對的,若同步指示信號SRUN為邏輯準位0時,第一時脈信號CK1可被傳送至反及閘ND42。
On the other hand, the OR gate OR41 receives the first clock signal CK1 and the synchronization instruction signal SRUN. When the synchronization indication signal SRUN is
承續上述的說明,在當同步指示信號SRUN為邏輯準位1時,反及閘ND42可輸出第一級計數結果CNT<0>的反向信號,並透過反向器IV45,可使第二時脈信號CK2實質上與第一級計數結果CNT<0>相同。相對的,在當同步指示信號SRUN為邏輯準位0時,反及閘ND42則輸出第一時脈信號CK1的反向信號,並透過反向器IV45,可使第二時脈信號CK2實質上與第一時脈信號相同。
Continuing the above description, when the synchronization indication signal SRUN is at
以下請參照圖5,圖5繪示本發明實施例中,計數裝置中用以產生一計數終止信號的邏輯運算電路的電路示意圖。在本發明實施例中,計數裝置並可設置邏輯運算電路500以產生計數終止信號STP。計數終止信號STP用以指示計數裝置的計數動作已經完成。計數裝置後的應用電路,可以依據計數終止信號來執行各項所需要的操作。
Please refer to FIG. 5 below. FIG. 5 is a schematic circuit diagram of a logic operation circuit for generating a counting termination signal in the counting device according to an embodiment of the present invention. In the embodiment of the present invention, the counting device can set the
對應圖2實施例的計數裝置200,在本實施方式中,計數裝置200的計數終止點例如設置在第二級計數結果CNT<1>至第七級計數結果CNT<6>分別為邏輯準位1、0、0、0、0、0時。邏輯運算電路500包括反向器IV51、反及閘ND51、ND52、反或閘NO51以及正反器DFF51、DFF52。反向器IV51、反及閘ND51、ND52以及反或閘NO51用以基於第二級反向計數結果CNTB<1>至第七級反向計數結果CNTB<6>進行邏輯運算,並在當第二級計
數結果CNT<1>至第七級計數結果CNT<6>分別為邏輯準位1、0、0、0、0、0時,由反或閘NO51產生邏輯準位1的輸出信號。這個邏輯準位1的輸出信號可透過正反器DFF51、DFF52,以依據第一時脈信號CK1進行同步來產生計數終止信號STP。另外,正反器DFF51、DFF52可依據重置信號RST執行重置動作。
Corresponding to the
值得一提的,在本實施方式中,設計者可以自行設置所需要的計數終止點,並針對所設定的計數終止點所需的邏輯運算式來變更其中的反向器IV51、反及閘ND51、ND52以及反或閘NO51。相關的邏輯運算式與對應的邏輯閘設置的方式,為本領域具通常知識者所熟知,在此述不多贅述。 It is worth mentioning that in this embodiment, the designer can set the required counting termination point, and change the inverter IV51 and the inverter gate ND51 according to the logic operation formula required for the set counting termination point. , ND52 and anti-OR gate NO51. The related logic operation formulas and the corresponding logic gate setting methods are well known to those skilled in the art, and will not be repeated here.
請參照圖6A以及圖6B,圖6A以及圖6B分別繪示本發明實施例的計數裝置依據不同初始值所執行的計數動作的波形圖。在圖6A中,對應圖2實施例的計數裝置200,計數裝置200接收十六進位值為38的初始值i6-i0以作為計數起點,並在時間點T1啟動計數動作。在時間點T1上,第七級計數結果CNT<6>至第二級計數結果CNT<1>的十六進位值為1c,第七級的反向計數結果CNTB<6>至第二級的反向計數結果CNT<1>的十六進位值則為23,而此時的第一級計數結果CNT<0>為邏輯準位0。
Please refer to FIG. 6A and FIG. 6B . FIG. 6A and FIG. 6B respectively illustrate waveform diagrams of counting operations performed by the counting device according to the embodiment of the present invention according to different initial values. In FIG. 6A , corresponding to the
在時間點T1後,第一級計數結果CNT<0>依據第一時脈信號CK1轉態,第二級計數結果CNT<1>至第七級計數結果CNT<6>則依據第一級計數結果CNT<0>轉態。第一級計數結果CNT<0>至第七級計數結果CNT<6>的數位值可隨著第一時脈信號
CK1依序遞減。在時間點T2時,第一級計數結果CNT<0>至第七級計數結果CNT<6>等於所設定的終止時間點,因此,計數終止信號STP被拉升為邏輯準位1,計數裝置200的計數動作可以被停止。
After the time point T1, the first-level counting result CNT<0> changes state according to the first clock signal CK1, and the second-level counting result CNT<1> to the seventh-level counting result CNT<6> are based on the first-level counting As a result, CNT<0> changes state. The digital values of the first-level counting result CNT<0> to the seventh-level counting result CNT<6> can follow the first clock signal
CK1 decreases sequentially. At the time point T2, the first-stage counting result CNT<0> to the seventh-stage counting result CNT<6> are equal to the set termination time point, therefore, the counting termination signal STP is pulled up to the
在圖6B中,同樣對應圖2實施例的計數裝置200,計數裝置200接收十六進位值為39的初始值i6-i0以作為計數起點,並在時間點T3啟動計數動作。在時間點T3上,第七級計數結果CNT<6>至第二級計數結果CNT<1>的十六進位值為1c,第七級的反向計數結果CNTB<6>至第二級的反向計數結果CNT<1>的十六進位值則為23,而此時的第一級計數結果CNT<0>為邏輯準位1。
In FIG. 6B , also corresponding to the
在時間點T3後,第一級計數結果CNT<0>依據第一時脈信號CK1轉態,第二級計數結果CNT<1>至第七級計數結果CNT<6>則依據第一級計數結果CNT<0>轉態。第一級計數結果CNT<0>至第七級計數結果CNT<6>的數位值可隨著第一時脈信號CK1依序遞減。在時間點T4時,第一級計數結果CNT<0>至第七級計數結果CNT<6>等於所設定的終止時間點,因此,計數終止信號STP被拉升為邏輯準位1,計數裝置200的計數動作可以被停止。
After the time point T3, the first-level counting result CNT<0> changes state according to the first clock signal CK1, and the second-level counting result CNT<1> to the seventh-level counting result CNT<6> are based on the first-level counting As a result, CNT<0> changes state. The digital values of the first-level counting result CNT<0> to the seventh-level counting result CNT<6> can be sequentially decremented with the first clock signal CK1. At the time point T4, the first-stage counting result CNT<0> to the seventh-stage counting result CNT<6> are equal to the set termination time point. Therefore, the counting termination signal STP is pulled up to the
由圖6A以及圖6B的波形可以得知,本發明實施例的計數裝置可在相對高速的第一時信號CK1下完成計數動作,不會因邏輯運算電路來不及運算而產生錯誤的情況。 It can be seen from the waveforms in FIG. 6A and FIG. 6B that the counting device of the embodiment of the present invention can complete the counting operation under the relatively high-speed first clock signal CK1, and will not generate errors due to the logic operation circuit being too late to perform operations.
值得一提的,在圖6A以及圖6B的波形中,計數裝置均 執行遞減計數動作。然在本發明的實施範疇中,並不限定計數裝置必須執行遞減計數動作。依據本發明多個實施例以及實施方式的提示,本領域具通常知識者不難進行相同概念的執行遞增計數動作的計數裝置。 It is worth mentioning that in the waveforms of FIG. 6A and FIG. 6B , the counting devices are both Execute the countdown action. However, within the scope of implementation of the present invention, it is not limited that the counting device must perform the down counting action. According to the prompts of various embodiments and implementation manners of the present invention, it is not difficult for those skilled in the art to implement a counting device for performing an incrementing counting action with the same concept.
綜上所述,本發明透過使第一級的計數電路級依據相對高頻率的第一時脈信號來工作,並維持計數裝置的正常計數行為。本發明並使第一時脈信號降頻以產生第二時脈信號,再使後級的第二級的計數電路級至第N級的計數電路級依據對低頻率的第二時脈信號來工作。如此一來,本發明實施例的計數裝置不至於因運算電路來不及動作而產生錯誤,有效提升計數裝置的速度。 To sum up, the present invention maintains the normal counting behavior of the counting device by making the counting circuit stage of the first stage work according to the relatively high-frequency first clock signal. The present invention reduces the frequency of the first clock signal to generate the second clock signal, and then makes the counting circuit stage of the second stage of the subsequent stage to the counting circuit stage of the Nth stage according to the second clock signal of low frequency. Work. In this way, the counting device according to the embodiment of the present invention will not generate errors due to the operation circuit being too late to operate, thereby effectively increasing the speed of the counting device.
100:計數裝置 100: Counting device
111~11N:計數電路級 111~11N: Counting circuit level
120:邏輯運算電路 120: Logic Operation Circuit
CK1:第一時脈信號 CK1: The first clock signal
CNT<0>~CNT<N-1>:計數結果 CNT<0>~CNT<N-1>: count result
CK2:第二時脈信號 CK2: The second clock signal
RUN:指示信號 RUN: Indication signal
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110115547A TWI776488B (en) | 2021-04-29 | 2021-04-29 | Counting device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110115547A TWI776488B (en) | 2021-04-29 | 2021-04-29 | Counting device |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI776488B true TWI776488B (en) | 2022-09-01 |
TW202243410A TW202243410A (en) | 2022-11-01 |
Family
ID=84957859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110115547A TWI776488B (en) | 2021-04-29 | 2021-04-29 | Counting device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI776488B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4741006A (en) * | 1984-07-12 | 1988-04-26 | Kabushiki Kaisha Toshiba | Up/down counter device with reduced number of discrete circuit elements |
TW200614671A (en) * | 2004-04-26 | 2006-05-01 | Sony Corp | Counter circuit, ad conversion method, ad converter, semiconductor device for detecting distribution of physical quantities, and electronic apparatus |
US20170214406A1 (en) * | 2014-02-26 | 2017-07-27 | Taiwan Semiconductor Manufacturing Company Limited | Gray code counter |
US20200382124A1 (en) * | 2019-05-30 | 2020-12-03 | Samsung Electronics Co., Ltd. | Code generator including asynchronous counter and synchronous counter, and operating method thereof |
-
2021
- 2021-04-29 TW TW110115547A patent/TWI776488B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4741006A (en) * | 1984-07-12 | 1988-04-26 | Kabushiki Kaisha Toshiba | Up/down counter device with reduced number of discrete circuit elements |
TW200614671A (en) * | 2004-04-26 | 2006-05-01 | Sony Corp | Counter circuit, ad conversion method, ad converter, semiconductor device for detecting distribution of physical quantities, and electronic apparatus |
US20170214406A1 (en) * | 2014-02-26 | 2017-07-27 | Taiwan Semiconductor Manufacturing Company Limited | Gray code counter |
US20200382124A1 (en) * | 2019-05-30 | 2020-12-03 | Samsung Electronics Co., Ltd. | Code generator including asynchronous counter and synchronous counter, and operating method thereof |
Also Published As
Publication number | Publication date |
---|---|
TW202243410A (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050220089A1 (en) | Demultiplexer circuit | |
US9154291B2 (en) | Differential signal skew adjustment method and transmission circuit | |
US20100128837A1 (en) | System and a method for generating time bases in low power domain | |
TWI436219B (en) | Sampling phase selection module for a stream of data bits | |
TWI776488B (en) | Counting device | |
TWI658700B (en) | Integrated circuit, multi-channels transmission apparatus and signal transmission method thereof | |
JP6423270B2 (en) | Random number generation apparatus and random number generation method | |
US9479178B2 (en) | Digital counter | |
CN115378423A (en) | Counting device | |
US20100201409A1 (en) | Frequency Divider Circuit | |
US11264993B1 (en) | Counting device | |
JP2016126518A (en) | Device and method for generating random numbers | |
CN111490776B (en) | Synchronous frequency divider with adjustable duty ratio based on counter | |
KR20010091311A (en) | Programmable frequency divider by high speed counter | |
KR101251764B1 (en) | Gray code counter | |
US11757453B2 (en) | Multi-bit gray code generation circuit | |
JP2004289540A (en) | Clock extraction circuit and clock extraction method | |
JP7570899B2 (en) | Multi-bit Gray code generator | |
JPH03233492A (en) | Driving circuit | |
JP3125651B2 (en) | Rate generator | |
JP3514020B2 (en) | Rate generator | |
KR100444842B1 (en) | Timer circuit of flash memory for securing timing margin and preventing generation of errors | |
JP2004164402A (en) | Asynchronous reading method of timer count value, and timer | |
JPH09196983A (en) | Time counting circuit, pulse converting circuit, and fm demodulation circuit | |
JP2024022445A (en) | entropy source circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent |