data/full_repos/permissive/108698528/up_counter.v
'utf-8' codec can't decode byte 0xa1 in position 672: invalid start byte
data/verilator_xmls/83bf140a-5169-4ea4-bf15-d4999650445a.xml
module up_counter(en, clr, count, clk);


	parameter WIDTH = 8;
	parameter MAX = (1 << WIDTH) - 1;
	input en, clr, clk;
	(* KEEP = "TRUE"*) 
	output reg [WIDTH-1:0] count;


	initial begin 
		count = 0;
	end

	always @(posedge clk) begin
		if(clr) begin
			count <= 0;
		end
		else if(en && (count < MAX)) begin
 			count <= count + 1;
		end
	end

endmodule
module up_counter(en, clr, count, clk);



	parameter WIDTH = 8;
	parameter MAX = (1 << WIDTH) - 1;
	input en, clr, clk;
	(* KEEP = "TRUE"*) 
	output reg [WIDTH-1:0] count;


	initial begin 
		count = 0;
	end

	always @(posedge clk) begin
		if(clr) begin
			count <= 0;
		end
		else if(en && (count < MAX)) begin
 			count <= count + 1;
		end
	end

endmodule