SlideShare a Scribd company logo
1 of 3
Download to read offline
SR Flip-Flop




D Flip-Flop




JK Flip-Flop




T Flip-Flop
SR FLIP-FLOP
module sr_flipflop(s,r,clk,q,qbar);
input s,r,clk;
output q,qbar;
reg q,qbar;
always@(posedge clk)
begin
  case ({s,r})
          2'b00:q=q;
          2'b01:q=1'b0;
          2'b10:q=1'b1;
          2'b11:q=1'bx;
  endcase
          qbar=~q;
 end
 endmodule




D FLIP-FLOP
module D_FF (D,clk,reset,Q);
         input D,clk,reset;
         output Q;
         reg Q;
         always @ (posedge reset or negedge clk)
if (reset)
         Q = 1'b0;
else
         Q = D;
endmodule
JK FLIP-FLOP
module JK_FF (J,K,clk,reset,Q);
      input J,K,clk,reset;
      output Q;
      wire w;
      assign w = (J&~Q)|(~K&Q);
      D_FF dff1(w,clk,reset,Q);
endmodule

module D_FF (D,clk,reset,Q);
         input D,clk,reset;
         output Q;
         reg Q;
         always @ (posedge reset or negedge clk)
if (reset)
         Q = 1'b0;
else
         Q = D;
endmodule




T FLIP-FLOP
module T_FF (T,clk,reset,Q);
      input T,clk,reset;
      output Q;
      wire w;
      assign w = T^Q;
      D_FF dff1(w,clk,reset,Q);
endmodule

module D_FF (D,clk,reset,Q);
         input D,clk,reset;
         output Q;
         reg Q;
         always @ (posedge reset or negedge clk)
if (reset)
         Q = 1'b0;
else
         Q = D;
endmodule

More Related Content

What's hot

COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSStarlee Lathong
 
MATLAB CODE OF Shifting sequence
MATLAB  CODE  OF Shifting sequenceMATLAB  CODE  OF Shifting sequence
MATLAB CODE OF Shifting sequenceRakesh kumar jha
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsAneeq Malik
 
matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesmatlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesRakesh kumar jha
 
20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料jugemjugemjugem
 
HKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCHKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCLinaro
 
Introduction to Verilog & code coverage
Introduction to Verilog & code coverageIntroduction to Verilog & code coverage
Introduction to Verilog & code coverageJyun-Kai Hu
 
Flipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesFlipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesSid Rehmani
 
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018UVCE
 
Logic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsLogic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsGouda Mando
 
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018UVCE
 
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...Rene Kotze
 

What's hot (20)

Conversion of flip flop
Conversion of flip flopConversion of flip flop
Conversion of flip flop
 
push down automata
push down automatapush down automata
push down automata
 
COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPS
 
MATLAB CODE OF Shifting sequence
MATLAB  CODE  OF Shifting sequenceMATLAB  CODE  OF Shifting sequence
MATLAB CODE OF Shifting sequence
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesmatlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequences
 
Trts d flip flop1
Trts d flip flop1Trts d flip flop1
Trts d flip flop1
 
4x4
4x44x4
4x4
 
20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料20170127 tokyoserversideswiftmeetup資料
20170127 tokyoserversideswiftmeetup資料
 
HKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCHKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCC
 
Introduction to Verilog & code coverage
Introduction to Verilog & code coverageIntroduction to Verilog & code coverage
Introduction to Verilog & code coverage
 
Flipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesFlipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop Slides
 
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018
Pic programms FOR 8TH SEM STUDENTS BY LOHITH KUMAR | 11GUEE6018
 
Logic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsLogic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip Flops
 
Pwm wave
Pwm wave Pwm wave
Pwm wave
 
Flip flop
Flip flopFlip flop
Flip flop
 
All flipflop
All flipflopAll flipflop
All flipflop
 
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
Lab programs FOR 8TH SEM EC SUBJECT BY LOHITH KUMAR |11GUEE6018
 
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...
Dr. Pablo Diaz Benito (University of the Witwatersrand) TITLE: "Novel Charges...
 
Carry save adder vhdl
Carry save adder vhdlCarry save adder vhdl
Carry save adder vhdl
 

Viewers also liked

Flipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsFlipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsstudent
 
Flip flop’s state tables & diagrams
Flip flop’s state tables & diagramsFlip flop’s state tables & diagrams
Flip flop’s state tables & diagramsSunny Khatana
 
What are Flip Flops and Its types.
What are Flip Flops and Its types.What are Flip Flops and Its types.
What are Flip Flops and Its types.Satya P. Joshi
 
Chapter 4 flip flop for students
Chapter 4 flip flop for studentsChapter 4 flip flop for students
Chapter 4 flip flop for studentsCT Sabariah Salihin
 

Viewers also liked (9)

sultan Ppt
sultan Pptsultan Ppt
sultan Ppt
 
Flip flops
Flip flopsFlip flops
Flip flops
 
BE PPT (FLIP FLOPS)
BE PPT (FLIP FLOPS)BE PPT (FLIP FLOPS)
BE PPT (FLIP FLOPS)
 
Flipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsFlipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflops
 
Flip flops (ff)
Flip flops (ff)Flip flops (ff)
Flip flops (ff)
 
Flip flop’s state tables & diagrams
Flip flop’s state tables & diagramsFlip flop’s state tables & diagrams
Flip flop’s state tables & diagrams
 
What are Flip Flops and Its types.
What are Flip Flops and Its types.What are Flip Flops and Its types.
What are Flip Flops and Its types.
 
Flipflop
FlipflopFlipflop
Flipflop
 
Chapter 4 flip flop for students
Chapter 4 flip flop for studentsChapter 4 flip flop for students
Chapter 4 flip flop for students
 

Similar to Sequential Circuits I VLSI 9th experiment

All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programsGouthaman V
 
HDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdfHDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdfkaarthikK6
 
Digital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential CircuitsDigital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential CircuitsIndira Priyadarshini
 
VLSI Sequential Circuits II
VLSI Sequential Circuits IIVLSI Sequential Circuits II
VLSI Sequential Circuits IIGouthaman V
 
Types of flip flops ppt
Types of flip flops pptTypes of flip flops ppt
Types of flip flops pptViraj Shah
 
J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSKrishma Parekh
 
Fpga 09-behavioral-modeling-moore-machine
Fpga 09-behavioral-modeling-moore-machineFpga 09-behavioral-modeling-moore-machine
Fpga 09-behavioral-modeling-moore-machineMalik Tauqir Hasan
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.pptdiganta das
 
FlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptFlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptSalmanHameed26
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.pptdiganta das
 
FlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bFlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bMeenakshi Munjal
 

Similar to Sequential Circuits I VLSI 9th experiment (20)

All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programs
 
07 sequential verilog
07 sequential verilog07 sequential verilog
07 sequential verilog
 
Verilog_Examples (1).pdf
Verilog_Examples (1).pdfVerilog_Examples (1).pdf
Verilog_Examples (1).pdf
 
HDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdfHDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdf
 
Verilog code
Verilog codeVerilog code
Verilog code
 
Digital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential CircuitsDigital System Design-Synchronous Sequential Circuits
Digital System Design-Synchronous Sequential Circuits
 
VLSI Sequential Circuits II
VLSI Sequential Circuits IIVLSI Sequential Circuits II
VLSI Sequential Circuits II
 
Types of flip flops ppt
Types of flip flops pptTypes of flip flops ppt
Types of flip flops ppt
 
Pda
PdaPda
Pda
 
PDA (1) (1).pptx
PDA (1) (1).pptxPDA (1) (1).pptx
PDA (1) (1).pptx
 
Flip flops
Flip flopsFlip flops
Flip flops
 
J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
 
Flip flops & registers
Flip flops & registersFlip flops & registers
Flip flops & registers
 
Fpga 09-behavioral-modeling-moore-machine
Fpga 09-behavioral-modeling-moore-machineFpga 09-behavioral-modeling-moore-machine
Fpga 09-behavioral-modeling-moore-machine
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
FlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).pptFlipFlopsLatches1 (3).ppt
FlipFlopsLatches1 (3).ppt
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
FlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and bFlipFlopsLatches off different inputs a and b
FlipFlopsLatches off different inputs a and b
 
FlipFlopsLatches1.ppt
FlipFlopsLatches1.pptFlipFlopsLatches1.ppt
FlipFlopsLatches1.ppt
 
DHow2 - L6 VHDL
DHow2 - L6 VHDLDHow2 - L6 VHDL
DHow2 - L6 VHDL
 

More from Gouthaman V

Professional Ethics Assignment II
Professional Ethics Assignment IIProfessional Ethics Assignment II
Professional Ethics Assignment IIGouthaman V
 
Scholastic averages sheet-2
Scholastic averages sheet-2Scholastic averages sheet-2
Scholastic averages sheet-2Gouthaman V
 
Eligibility criteria and instructions for Infosys Placement
Eligibility criteria and instructions for Infosys PlacementEligibility criteria and instructions for Infosys Placement
Eligibility criteria and instructions for Infosys PlacementGouthaman V
 
Answers for 2 Marks Unit Test I (RMW)
Answers for 2 Marks Unit Test I (RMW)Answers for 2 Marks Unit Test I (RMW)
Answers for 2 Marks Unit Test I (RMW)Gouthaman V
 
Anwers for 2 marks - RMW
Anwers for 2 marks - RMWAnwers for 2 marks - RMW
Anwers for 2 marks - RMWGouthaman V
 
Rmw unit test question papers
Rmw unit test question papersRmw unit test question papers
Rmw unit test question papersGouthaman V
 
Circular and semicircular cavity resonator
Circular and semicircular cavity resonatorCircular and semicircular cavity resonator
Circular and semicircular cavity resonatorGouthaman V
 
VLSI Anna University Practical Examination
VLSI Anna University Practical ExaminationVLSI Anna University Practical Examination
VLSI Anna University Practical ExaminationGouthaman V
 
VI Semester Examination Time Table
VI Semester Examination Time TableVI Semester Examination Time Table
VI Semester Examination Time TableGouthaman V
 
Antenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IAntenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IGouthaman V
 
Antenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IAntenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IGouthaman V
 
Computer Networks Unit Test II Questions
Computer Networks Unit Test II QuestionsComputer Networks Unit Test II Questions
Computer Networks Unit Test II QuestionsGouthaman V
 
Antenna Unit Test II Questions
Antenna Unit Test II QuestionsAntenna Unit Test II Questions
Antenna Unit Test II QuestionsGouthaman V
 
Antenna Unit Test II questions
Antenna Unit Test II questionsAntenna Unit Test II questions
Antenna Unit Test II questionsGouthaman V
 
Combinational circuits II outputs
Combinational circuits II outputsCombinational circuits II outputs
Combinational circuits II outputsGouthaman V
 
POM Unit Test II - ECE B
POM Unit Test II - ECE BPOM Unit Test II - ECE B
POM Unit Test II - ECE BGouthaman V
 
VLSI experiments II
VLSI experiments IIVLSI experiments II
VLSI experiments IIGouthaman V
 

More from Gouthaman V (20)

Professional Ethics Assignment II
Professional Ethics Assignment IIProfessional Ethics Assignment II
Professional Ethics Assignment II
 
Dip Unit Test-I
Dip Unit Test-IDip Unit Test-I
Dip Unit Test-I
 
Scholastic averages sheet-2
Scholastic averages sheet-2Scholastic averages sheet-2
Scholastic averages sheet-2
 
Eligibility criteria and instructions for Infosys Placement
Eligibility criteria and instructions for Infosys PlacementEligibility criteria and instructions for Infosys Placement
Eligibility criteria and instructions for Infosys Placement
 
Answers for 2 Marks Unit Test I (RMW)
Answers for 2 Marks Unit Test I (RMW)Answers for 2 Marks Unit Test I (RMW)
Answers for 2 Marks Unit Test I (RMW)
 
Anwers for 2 marks - RMW
Anwers for 2 marks - RMWAnwers for 2 marks - RMW
Anwers for 2 marks - RMW
 
Rmw unit test question papers
Rmw unit test question papersRmw unit test question papers
Rmw unit test question papers
 
Circular and semicircular cavity resonator
Circular and semicircular cavity resonatorCircular and semicircular cavity resonator
Circular and semicircular cavity resonator
 
VLSI Anna University Practical Examination
VLSI Anna University Practical ExaminationVLSI Anna University Practical Examination
VLSI Anna University Practical Examination
 
HCL IPT
HCL IPTHCL IPT
HCL IPT
 
VI Semester Examination Time Table
VI Semester Examination Time TableVI Semester Examination Time Table
VI Semester Examination Time Table
 
Email
EmailEmail
Email
 
Antenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IAntenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment I
 
Antenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment IAntenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment I
 
Computer Networks Unit Test II Questions
Computer Networks Unit Test II QuestionsComputer Networks Unit Test II Questions
Computer Networks Unit Test II Questions
 
Antenna Unit Test II Questions
Antenna Unit Test II QuestionsAntenna Unit Test II Questions
Antenna Unit Test II Questions
 
Antenna Unit Test II questions
Antenna Unit Test II questionsAntenna Unit Test II questions
Antenna Unit Test II questions
 
Combinational circuits II outputs
Combinational circuits II outputsCombinational circuits II outputs
Combinational circuits II outputs
 
POM Unit Test II - ECE B
POM Unit Test II - ECE BPOM Unit Test II - ECE B
POM Unit Test II - ECE B
 
VLSI experiments II
VLSI experiments IIVLSI experiments II
VLSI experiments II
 

Sequential Circuits I VLSI 9th experiment

  • 1. SR Flip-Flop D Flip-Flop JK Flip-Flop T Flip-Flop
  • 2. SR FLIP-FLOP module sr_flipflop(s,r,clk,q,qbar); input s,r,clk; output q,qbar; reg q,qbar; always@(posedge clk) begin case ({s,r}) 2'b00:q=q; 2'b01:q=1'b0; 2'b10:q=1'b1; 2'b11:q=1'bx; endcase qbar=~q; end endmodule D FLIP-FLOP module D_FF (D,clk,reset,Q); input D,clk,reset; output Q; reg Q; always @ (posedge reset or negedge clk) if (reset) Q = 1'b0; else Q = D; endmodule
  • 3. JK FLIP-FLOP module JK_FF (J,K,clk,reset,Q); input J,K,clk,reset; output Q; wire w; assign w = (J&~Q)|(~K&Q); D_FF dff1(w,clk,reset,Q); endmodule module D_FF (D,clk,reset,Q); input D,clk,reset; output Q; reg Q; always @ (posedge reset or negedge clk) if (reset) Q = 1'b0; else Q = D; endmodule T FLIP-FLOP module T_FF (T,clk,reset,Q); input T,clk,reset; output Q; wire w; assign w = T^Q; D_FF dff1(w,clk,reset,Q); endmodule module D_FF (D,clk,reset,Q); input D,clk,reset; output Q; reg Q; always @ (posedge reset or negedge clk) if (reset) Q = 1'b0; else Q = D; endmodule