data/full_repos/permissive/454263844/Project_files/down_counter.v
data/verilator_xmls/48319add-d5df-4079-98b4-ce2c1376f5b2.xml
module down_counter(
i_clk , reset ,en , Count_out
    );
	 
	 parameter DATA_WIDTH = 4 ;
input i_clk ;
input reset ;
input en ;
output reg [DATA_WIDTH-1:0] Count_out ;
always @ (posedge i_clk)
 begin
        if (reset==1'b1)
          begin
           Count_out <= 4'b1000 ;
            end
         else if (en==1'b1) 
            begin
              Count_out <= Count_out - 1'b1 ;
                end
             else
                begin
                   Count_out <= 4'b0000 ; 
                    end  
            end                
endmodule
module down_counter(
i_clk , reset ,en , Count_out
    );

	 
	 parameter DATA_WIDTH = 4 ;
input i_clk ;
input reset ;
input en ;
output reg [DATA_WIDTH-1:0] Count_out ;
always @ (posedge i_clk)
 begin
        if (reset==1'b1)
          begin
           Count_out <= 4'b1000 ;
            end
         else if (en==1'b1) 
            begin
              Count_out <= Count_out - 1'b1 ;
                end
             else
                begin
                   Count_out <= 4'b0000 ; 
                    end  
            end                
endmodule