Thursday, 14 August 2014

Hardware of a always block with posedge of clock & blocking statement variable

2 comments:

  1. the code you posted is i think incorrect..... correct one should be like this

    module ff(
    input clk,
    input rst,
    input a,
    output reg t1,
    output reg t2,
    output reg t3
    );



    always @(posedge clk)
    begin
    if(rst)
    begin
    t1=0;
    t2=0;
    t3=0;
    end
    else
    begin
    t1=t2;
    t2=t3;
    t3=a;
    end
    end
    endmodule

    ReplyDelete
    Replies
    1. your code is an active low reset FF and that is correct, but I have designed a FF without reset

      Kindly visit the following to see with the reset FF
      http://mantravlsi.blogspot.com/2014/08/flip-flop-with-asynchronous-reset.html

      Delete