image1 image2 image3

HELLO I'M LiNuS|WELCOME TO MY PERSONAL BLOG|I LOVE TO DO CREATIVE THINGS|I PRESENT MY WORKS ON VLSI AND EMBEDDED

3bit Counter design


3bit Counter
3bit Counter


FSM diagram
FSM diagram


data flow
Data Flow

Truth Table
Truth Table


Verilog Code:

module   UpDown_Counter_loopFilter( up_dn, CLK, up_dn_counter );
    input up_dn;
    input CLK;
    output reg [2:0] up_dn_counter;

initial
begin
up_dn_counter = 3'b000;
end
 
always @(posedge CLK)
begin
if (up_dn == 1'b1)
begin
up_dn_counter = up_dn_counter + 1'b1;
end
else if (up_dn == 1'b0)
begin
up_dn_counter = up_dn_counter - 1'b1;
end
end

endmodule


Waveform : (simulation)

waveforms
       

Share this:

CONVERSATION

0 comments:

Post a Comment