Manufaktur industri
Industri Internet of Things | bahan industri | Pemeliharaan dan Perbaikan Peralatan | Pemrograman industri |
home  MfgRobots >> Manufaktur industri >  >> Industrial programming >> Verilog

JK Flip Flop

Desain

  
  
module jk_ff ( input j,
               input k,
               input clk,
               output q);

   reg q;

   always @ (posedge clk)
      case ({j,k})
         2'b00 :  q <= q;
         2'b01 :  q <= 0;
         2'b10 :  q <= 1;
         2'b11 :  q <= ~q;
      endcase
endmodule

  

Skema Perangkat Keras

Testbench

  
  
module tb_jk;
   reg j;
   reg k;
   reg clk;
   
   always #5 clk = ~clk;
   
   jk_ff    jk0 ( .j(j),
                  .k(k),
                  .clk(clk),
                  .q(q));

   initial begin
      j <= 0;
      k <= 0;
      
      #5 j <= 0;
         k <= 1;
      #20 j <= 1;
          k <= 0;
      #20 j <= 1;
          k <= 1;
      #20 $finish;
   end

   initial
      $monitor ("j=%0d k=%0d q=%0d", j, k, q);
endmodule	

  

Verilog

  1. Pengantar Verilog
  2. Tutorial Verilog
  3. Alur Desain ASIC
  4. Desain Lapisan Abstraksi
  5. Sintaks Verilog
  6. Tipe Data Verilog
  7. Verilog T Flip Flop
  8. Penghitung Mod-N Verilog
  9. Penghitung Abu-abu Verilog
  10. Flip the Switch:Inilah Fungsi Inverter Frekuensi