SlideShare a Scribd company logo
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

PDF
Day4 順序控制的循序邏輯實現
PPTX
PDA (pushdown automaton)
PPTX
Theory of Computation Unit 4
PPTX
Automata theory - NFA ε to DFA Conversion
PPTX
Automata theory -Conversion of ε nfa to nfa
PPT
Flip flops
PPTX
flip flop coverison
Day4 順序控制的循序邏輯實現
PDA (pushdown automaton)
Theory of Computation Unit 4
Automata theory - NFA ε to DFA Conversion
Automata theory -Conversion of ε nfa to nfa
Flip flops
flip flop coverison

What's hot (20)

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

Viewers also liked (9)

PPTX
Flip flops
PPTX
BE PPT (FLIP FLOPS)
PPT
Flipflops and Excitation tables of flipflops
PPTX
Flip flops (ff)
PPTX
Flip flop’s state tables & diagrams
PPTX
What are Flip Flops and Its types.
PPTX
Flipflop
PDF
Chapter 4 flip flop for students
Flip flops
BE PPT (FLIP FLOPS)
Flipflops and Excitation tables of flipflops
Flip flops (ff)
Flip flop’s state tables & diagrams
What are Flip Flops and Its types.
Flipflop
Chapter 4 flip flop for students
Ad

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

DOC
All VLSI programs
PPT
Verilog code
DOCX
Vend with ff
PDF
HDL PROGRAMMING-3.pdf
PPTX
Rishabh-Verilog_Examples_Nov_2019_VGS.pptx
PDF
An Example MIPS
DOC
Combinational circuits II outputs
PDF
0_Digital IC Pin Details and Functional Tables.pdf
TXT
verilog coding of butterfly diagram
DOCX
Microcontroller (8051) general and simple alp n cprograms
DOCX
VERILOG CODE
DOCX
Lampiran 1.programdocx
PPTX
Sequential Logic Circuits
DOCX
Verilog code all
PPTX
Flip flops, counters & registers
PDF
95414579 flip-flop
PDF
07 sequential verilog
PDF
................................................................................
PPTX
8051 C Assignments with all examples covered
PPT
Lect20 Engin112
All VLSI programs
Verilog code
Vend with ff
HDL PROGRAMMING-3.pdf
Rishabh-Verilog_Examples_Nov_2019_VGS.pptx
An Example MIPS
Combinational circuits II outputs
0_Digital IC Pin Details and Functional Tables.pdf
verilog coding of butterfly diagram
Microcontroller (8051) general and simple alp n cprograms
VERILOG CODE
Lampiran 1.programdocx
Sequential Logic Circuits
Verilog code all
Flip flops, counters & registers
95414579 flip-flop
07 sequential verilog
................................................................................
8051 C Assignments with all examples covered
Lect20 Engin112

More from Gouthaman V (20)

PDF
Professional Ethics Assignment II
DOC
Dip Unit Test-I
XLS
Scholastic averages sheet-2
DOC
Eligibility criteria and instructions for Infosys Placement
PDF
Answers for 2 Marks Unit Test I (RMW)
PDF
Anwers for 2 marks - RMW
PDF
Rmw unit test question papers
PDF
Circular and semicircular cavity resonator
DOC
VLSI Anna University Practical Examination
DOC
HCL IPT
DOC
VLSI Sequential Circuits II
PDF
VI Semester Examination Time Table
DOC
DOC
Antenna and Wave Propagation Assignment I
DOC
Antenna and Wave Propagation Assignment I
DOC
Computer Networks Unit Test II Questions
DOC
Antenna Unit Test II Questions
DOC
Antenna Unit Test II questions
DOC
POM Unit Test II - ECE B
DOC
VLSI experiments II
Professional Ethics Assignment II
Dip Unit Test-I
Scholastic averages sheet-2
Eligibility criteria and instructions for Infosys Placement
Answers for 2 Marks Unit Test I (RMW)
Anwers for 2 marks - RMW
Rmw unit test question papers
Circular and semicircular cavity resonator
VLSI Anna University Practical Examination
HCL IPT
VLSI Sequential Circuits II
VI Semester Examination Time Table
Antenna and Wave Propagation Assignment I
Antenna and Wave Propagation Assignment I
Computer Networks Unit Test II Questions
Antenna Unit Test II Questions
Antenna Unit Test II questions
POM Unit Test II - ECE B
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