SlideShare a Scribd company logo
Design of Synchronous Loadable Up and Down Counter
Presented by
Dr. Shirshendu Roy
Homepage - https://digitalsystemdesign.in
Course - Digital Electronics
Dr. Shirshendu Roy Loadable Counter 1 / 13
Loadable up/down counter application
Loadable up or down counter is generalized synchronous counter which is
used
In any counting application (downward or upward).
In phase signal generation. These phase signals can be used to activate
or deactivate memory blocks.
In clock division circuits loadable counters can easily behave as MOD
counter.
In periodic or arbitrary counting loadable counters are used.
In starting a process or stopping any process.
Dr. Shirshendu Roy Loadable Counter 2 / 13
Design of loadable up counter.
The block diagram of a loadable up counter is shown in Figure 1.
Loadable
Up/Down
Counter
lmt
b
en
clk
rst load
tc
q
4
4 4
Figure 1: Block diagram for the 4-bit loadable up counter.
Logic high en signal enables counting, rst is synchronous active high reset
signal, b is called the load value for the loadable counter, load signal loads
counter with b value, lmt input indicates maximum count, q is the output
count and tc or terminal count signal is generated when maximum count is
reached.
Dr. Shirshendu Roy Loadable Counter 3 / 13
Design Procedure
Design procedure steps for loadable counter are
In order to design a loadable up counter, first step is to know how to
design synchronous up counter from its truth table.
Selection of flip/flop by which the counter will be designed.
Here, 4-bit counter will be designed and D flip-flop is chosen for realizing
the counter.
Thus four flip-flops will be required. Here, q3q2q1q0 denotes present
states (PS) of the flip-flops and q∗
3q∗
2q∗
1q∗
0 are next states (NS).
We have find the expression for the inputs of the flip-flops (d3, d2, d1
and d0).
In case D flip-flop, input of the flip-flops follows the status of the next
states.
K-map is used here to find the expression for inputs.
.
Dr. Shirshendu Roy Loadable Counter 4 / 13
Truth table for synchronous up counter.
Table 1: Truth table for synchronous up counter.
Decimal q3q2q1q0 q∗
3q∗
2q∗
1q∗
0 d3 d2 d1 d0
0 0000 0001 0 0 0 1
1 0001 0010 0 0 1 0
2 0010 0011 0 0 1 1
3 0011 0100 0 1 0 0
4 0100 0101 0 1 0 1
5 0101 0110 0 1 1 0
6 0110 0111 0 1 1 1
7 0111 1000 1 0 0 0
8 1000 1001 1 0 0 1
9 1001 1010 1 0 1 0
10 1010 1011 1 0 1 1
11 1011 1100 1 1 0 0
12 1100 1101 1 1 0 1
13 1101 1110 1 1 1 0
14 1110 1111 1 1 1 1
15 1111 0000 0 0 0 0
Dr. Shirshendu Roy Loadable Counter 5 / 13
Deriving logical expression using K-map.
q3q2
q1q0
00 01 11 10
00
01
11
10
1
1
1
1
1
1
1
1
0 0
0 0
0 0
0 0
(a) K-map for d0.
q3q2
q1q0
00 01 11 10
00
01
11
10
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
(b) K-map for d1.
q3q2
q1q0
00 01 11 10
00
01
11
10
1
0
0
1
0
1
1
1
1
0
0
0
0
0
1
1
(c) K-map for d2.
q3q2
q1q0
00 01 11 10
00
01
11
10
0
1
0
1
0 0
1
0
0
1
1
1
1
1
0
0
(d) K-map for d3.
Figure 2: Deriving the logical equation for up counter using K-map.
Dr. Shirshendu Roy Loadable Counter 6 / 13
Boolean expression for Up/Down Counter.
Logical expressions for up counter is
d0 = q0 (1)
d1 = q1.q0 + q1.q0 = q1 ⊕ q0 (2)
d2 = q2.q1 + q2.q0 + q2.q1.q0 = q2 ⊕ (q1.q0) (3)
d3 = q3.q2 + q3.q1 + q3.q0 + q3.q2.q1.q0 = q3 ⊕ (q2.q1.q0) (4)
Similarly, logical expressions for down counter is
d0 = q0 (5)
d1 = q1 ⊕ q0 (6)
d2 = q2 ⊕ (q1.q0) (7)
d3 = q3 ⊕ (q2.q1.q0) (8)
Dr. Shirshendu Roy Loadable Counter 7 / 13
Synchronous Up Counter
Architecture of the Synchronous Up Counter is shown below. Same clock is
connected to each flip-flop.
Now we have to make it loadable by adding a feature where we can load any
load value (b) to the flip-flops by a control signal (load).
This is done by adding multiplexers before each flip-flops.
d0
dff1 dff2 dff3 dff4
q0 d1
q1 d2
q2 d3
q3
clk
Figure 3: Architecture of Synchronous Up Counter
Dr. Shirshendu Roy Loadable Counter 8 / 13
Schematic of Loadable Up Counter
0
1
d0
0
1
0
1
0
1
dff1 dff2 dff3 dff4
q0 d1
q1 d2
q2 d3
q3
b0 b1 b2 b3
clk
reset
load
en
Equality
Comparator
q[3 : 0]
lmt[3 : 0]
tc
Figure 4: Schematic of Loadable Up Counter
Whenever the load signal is high input b is passed to the flip-flops and
whenever the counter reaches lmt value a tc signal is generated by a equality
comparator.
Dr. Shirshendu Roy Loadable Counter 9 / 13
Equality Comparator
q0
lmt0
q1
lmt1
q2
lmt2
q3
lmt3
tc
Figure 5: Schematic of Loadable Up Counter
Dr. Shirshendu Roy Loadable Counter 10 / 13
Schematic of Loadable Down Counter
Similarly, we can design a loadable down counter.
0
1
d0
0
1
0
1
0
1
dff1 dff2 dff3 dff4
q0 d1
q1 d2
q2 d3
q3
b0 b1 b2 b3
clk
reset
load
en
Figure 6: Architecture of Loadable Down Counter.
Dr. Shirshendu Roy Loadable Counter 11 / 13
Timing Diagram for Loadable Up Counter
An example of loadable up counter is shown below. Here, lmt = 7 and
b = 5.
clk
en
q 0 1 2 5 6 7
load
tc
Figure 7: An example of operation of Loadable Up Counter.)
Dr. Shirshendu Roy Loadable Counter 12 / 13
Thank You
Dr. Shirshendu Roy Loadable Counter 13 / 13

More Related Content

What's hot

J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
Krishma Parekh
 
Sequential cmos logic circuits
Sequential cmos logic circuitsSequential cmos logic circuits
Sequential cmos logic circuits
Sakshi Bhargava
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
sheheryar ahmed
 
Programmable Logic Devices Plds
Programmable Logic Devices PldsProgrammable Logic Devices Plds
Programmable Logic Devices Plds
Gaditek
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
Sudhanshu Janwadkar
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
Anuja Bhakuni
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
Vinoth Loganathan
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
Huba Akhtar
 
Flipflop
FlipflopFlipflop
Flipflop
sohamdodia27
 
VERILOG CODE FOR Adder
VERILOG CODE FOR AdderVERILOG CODE FOR Adder
VERILOG CODE FOR Adder
Rakesh kumar jha
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
DrSonali Vyas
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
Amr Rashed
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
Mantra VLSI
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
Pradhan Rishi Sharma
 
Data types in verilog
Data types in verilogData types in verilog
Data types in verilog
Nallapati Anindra
 
Vlsi gate level design
Vlsi gate level designVlsi gate level design
Vlsi gate level design
CHENCHU CHANDU PRASANTH NADELLA
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
Ramasubbu .P
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
Shuaib Hotak
 
Verilog hdl
Verilog hdlVerilog hdl
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
Muthu Manickam
 

What's hot (20)

J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
 
Sequential cmos logic circuits
Sequential cmos logic circuitsSequential cmos logic circuits
Sequential cmos logic circuits
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
Programmable Logic Devices Plds
Programmable Logic Devices PldsProgrammable Logic Devices Plds
Programmable Logic Devices Plds
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
 
Flipflop
FlipflopFlipflop
Flipflop
 
VERILOG CODE FOR Adder
VERILOG CODE FOR AdderVERILOG CODE FOR Adder
VERILOG CODE FOR Adder
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
 
Data types in verilog
Data types in verilogData types in verilog
Data types in verilog
 
Vlsi gate level design
Vlsi gate level designVlsi gate level design
Vlsi gate level design
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 

Similar to Synchronous Loadable Up and Down Counter

Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Katrina Little
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
RLJIT
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
Edhole.com
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
Edhole.com
 
Unit 4 dica
Unit 4 dicaUnit 4 dica
Unit 4 dica
Pavan Mukku
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
navaneethakrishnanec
 
Lec17-Registers.ppt
Lec17-Registers.pptLec17-Registers.ppt
Lec17-Registers.ppt
priyadarsini47
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
SHASHISHARMA850123
 
Sequential Logic Circuits
Sequential Logic CircuitsSequential Logic Circuits
Sequential Logic Circuits
Dilum Bandara
 
Sequential Logic
Sequential LogicSequential Logic
Flip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas AghaniFlip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
Information Technology Center
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders
iosrjce
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 
Digital logic circuit
Digital logic circuit Digital logic circuit
Digital logic circuit
Prabhu R
 
Sequntial logic design
Sequntial logic designSequntial logic design
Sequntial logic design
Pavan Mukku
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
EasyStudy3
 
Dee2034 chapter 5 counter
Dee2034 chapter 5 counterDee2034 chapter 5 counter
Dee2034 chapter 5 counter
SITI SABARIAH SALIHIN
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
Heman Pathak
 
Design of chip controller
Design of chip controllerDesign of chip controller
Design of chip controller
asha
 
COA-unit-2-Arithmetic.ppt
COA-unit-2-Arithmetic.pptCOA-unit-2-Arithmetic.ppt
COA-unit-2-Arithmetic.ppt
Ruhul Amin
 

Similar to Synchronous Loadable Up and Down Counter (20)

Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Unit 4 dica
Unit 4 dicaUnit 4 dica
Unit 4 dica
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
 
Lec17-Registers.ppt
Lec17-Registers.pptLec17-Registers.ppt
Lec17-Registers.ppt
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
 
Sequential Logic Circuits
Sequential Logic CircuitsSequential Logic Circuits
Sequential Logic Circuits
 
Sequential Logic
Sequential LogicSequential Logic
Sequential Logic
 
Flip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas AghaniFlip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Digital logic circuit
Digital logic circuit Digital logic circuit
Digital logic circuit
 
Sequntial logic design
Sequntial logic designSequntial logic design
Sequntial logic design
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Dee2034 chapter 5 counter
Dee2034 chapter 5 counterDee2034 chapter 5 counter
Dee2034 chapter 5 counter
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Design of chip controller
Design of chip controllerDesign of chip controller
Design of chip controller
 
COA-unit-2-Arithmetic.ppt
COA-unit-2-Arithmetic.pptCOA-unit-2-Arithmetic.ppt
COA-unit-2-Arithmetic.ppt
 

Recently uploaded

Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 

Recently uploaded (20)

Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 

Synchronous Loadable Up and Down Counter

  • 1. Design of Synchronous Loadable Up and Down Counter Presented by Dr. Shirshendu Roy Homepage - https://digitalsystemdesign.in Course - Digital Electronics Dr. Shirshendu Roy Loadable Counter 1 / 13
  • 2. Loadable up/down counter application Loadable up or down counter is generalized synchronous counter which is used In any counting application (downward or upward). In phase signal generation. These phase signals can be used to activate or deactivate memory blocks. In clock division circuits loadable counters can easily behave as MOD counter. In periodic or arbitrary counting loadable counters are used. In starting a process or stopping any process. Dr. Shirshendu Roy Loadable Counter 2 / 13
  • 3. Design of loadable up counter. The block diagram of a loadable up counter is shown in Figure 1. Loadable Up/Down Counter lmt b en clk rst load tc q 4 4 4 Figure 1: Block diagram for the 4-bit loadable up counter. Logic high en signal enables counting, rst is synchronous active high reset signal, b is called the load value for the loadable counter, load signal loads counter with b value, lmt input indicates maximum count, q is the output count and tc or terminal count signal is generated when maximum count is reached. Dr. Shirshendu Roy Loadable Counter 3 / 13
  • 4. Design Procedure Design procedure steps for loadable counter are In order to design a loadable up counter, first step is to know how to design synchronous up counter from its truth table. Selection of flip/flop by which the counter will be designed. Here, 4-bit counter will be designed and D flip-flop is chosen for realizing the counter. Thus four flip-flops will be required. Here, q3q2q1q0 denotes present states (PS) of the flip-flops and q∗ 3q∗ 2q∗ 1q∗ 0 are next states (NS). We have find the expression for the inputs of the flip-flops (d3, d2, d1 and d0). In case D flip-flop, input of the flip-flops follows the status of the next states. K-map is used here to find the expression for inputs. . Dr. Shirshendu Roy Loadable Counter 4 / 13
  • 5. Truth table for synchronous up counter. Table 1: Truth table for synchronous up counter. Decimal q3q2q1q0 q∗ 3q∗ 2q∗ 1q∗ 0 d3 d2 d1 d0 0 0000 0001 0 0 0 1 1 0001 0010 0 0 1 0 2 0010 0011 0 0 1 1 3 0011 0100 0 1 0 0 4 0100 0101 0 1 0 1 5 0101 0110 0 1 1 0 6 0110 0111 0 1 1 1 7 0111 1000 1 0 0 0 8 1000 1001 1 0 0 1 9 1001 1010 1 0 1 0 10 1010 1011 1 0 1 1 11 1011 1100 1 1 0 0 12 1100 1101 1 1 0 1 13 1101 1110 1 1 1 0 14 1110 1111 1 1 1 1 15 1111 0000 0 0 0 0 Dr. Shirshendu Roy Loadable Counter 5 / 13
  • 6. Deriving logical expression using K-map. q3q2 q1q0 00 01 11 10 00 01 11 10 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 (a) K-map for d0. q3q2 q1q0 00 01 11 10 00 01 11 10 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 (b) K-map for d1. q3q2 q1q0 00 01 11 10 00 01 11 10 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 (c) K-map for d2. q3q2 q1q0 00 01 11 10 00 01 11 10 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 (d) K-map for d3. Figure 2: Deriving the logical equation for up counter using K-map. Dr. Shirshendu Roy Loadable Counter 6 / 13
  • 7. Boolean expression for Up/Down Counter. Logical expressions for up counter is d0 = q0 (1) d1 = q1.q0 + q1.q0 = q1 ⊕ q0 (2) d2 = q2.q1 + q2.q0 + q2.q1.q0 = q2 ⊕ (q1.q0) (3) d3 = q3.q2 + q3.q1 + q3.q0 + q3.q2.q1.q0 = q3 ⊕ (q2.q1.q0) (4) Similarly, logical expressions for down counter is d0 = q0 (5) d1 = q1 ⊕ q0 (6) d2 = q2 ⊕ (q1.q0) (7) d3 = q3 ⊕ (q2.q1.q0) (8) Dr. Shirshendu Roy Loadable Counter 7 / 13
  • 8. Synchronous Up Counter Architecture of the Synchronous Up Counter is shown below. Same clock is connected to each flip-flop. Now we have to make it loadable by adding a feature where we can load any load value (b) to the flip-flops by a control signal (load). This is done by adding multiplexers before each flip-flops. d0 dff1 dff2 dff3 dff4 q0 d1 q1 d2 q2 d3 q3 clk Figure 3: Architecture of Synchronous Up Counter Dr. Shirshendu Roy Loadable Counter 8 / 13
  • 9. Schematic of Loadable Up Counter 0 1 d0 0 1 0 1 0 1 dff1 dff2 dff3 dff4 q0 d1 q1 d2 q2 d3 q3 b0 b1 b2 b3 clk reset load en Equality Comparator q[3 : 0] lmt[3 : 0] tc Figure 4: Schematic of Loadable Up Counter Whenever the load signal is high input b is passed to the flip-flops and whenever the counter reaches lmt value a tc signal is generated by a equality comparator. Dr. Shirshendu Roy Loadable Counter 9 / 13
  • 10. Equality Comparator q0 lmt0 q1 lmt1 q2 lmt2 q3 lmt3 tc Figure 5: Schematic of Loadable Up Counter Dr. Shirshendu Roy Loadable Counter 10 / 13
  • 11. Schematic of Loadable Down Counter Similarly, we can design a loadable down counter. 0 1 d0 0 1 0 1 0 1 dff1 dff2 dff3 dff4 q0 d1 q1 d2 q2 d3 q3 b0 b1 b2 b3 clk reset load en Figure 6: Architecture of Loadable Down Counter. Dr. Shirshendu Roy Loadable Counter 11 / 13
  • 12. Timing Diagram for Loadable Up Counter An example of loadable up counter is shown below. Here, lmt = 7 and b = 5. clk en q 0 1 2 5 6 7 load tc Figure 7: An example of operation of Loadable Up Counter.) Dr. Shirshendu Roy Loadable Counter 12 / 13
  • 13. Thank You Dr. Shirshendu Roy Loadable Counter 13 / 13