Latest Post

Verilog: 4 Bit Counter Behavioral Modelling using If Else Statement

Verilog Code for 4 Bit Counter Behavioral Modelling using If Else Statement

module 4_bit_Count(
    input clock, reset,
    output [3:0]dout
    );
reg [3:0]dout; 
initial dout = 0;
 
always @ (posedge (clock))
   begin 
        if (reset) 
            dout <= 0; 
        else 
            dout <= dout + 1; 
   end
endmodule

Xillinx Output:

Verilog Code for 4 Bit Counter Behavioral Modelling
4 Bit Counter Behavioral Modelling Response
 

Also See:

List of Verilog Programs

Comments

Popular posts from this blog

VLSI: 1-4 DEMUX (Demultiplexer) Dataflow Modelling with Testbench

VLSI: BCD to Excess 3 and Excess 3 to BCD Dataflow Modelling

Full Subtractor Verilog Code in Structural/Gate Level Modelling with Testbench

Verilog: 4 to 2 Encoder Behavioral Modelling using Case Statement with Testbench Code

VLSI: 8-3 Encoder Dataflow Modelling with Testbench