data/full_repos/permissive/157253481/slike_rd.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/eaa30dca-1292-4390-a74f-9f31ca43375e.xml
module slike_rd(
	reset,
	CLOCK_50,
	max_count,
	countdown,
	
	fin,
	half
);
	
	input reset, CLOCK_50;
	input [25:0] max_count;
	input countdown;
	
	reg [25:0] counter;
	output reg fin;
	output reg half;
	
	always@(posedge CLOCK_50)
	begin
		if (countdown == 1'b1)
			begin
				if (reset == 1'b1)
					counter <= max_count;
				if (counter < 26'd25000000)
					half <= 1'b1;
				if (counter < 26'd1)
					fin <= 1'b1;
				else
					counter <= counter - 1'b1;
			end
		else
			begin
				counter <= max_count;
				fin <= 1'b0;
				half <= 1'b0;
			end
	end
	
endmodule
module slike_rd(
	reset,
	CLOCK_50,
	max_count,
	countdown,
	
	fin,
	half
);

	
	input reset, CLOCK_50;
	input [25:0] max_count;
	input countdown;
	
	reg [25:0] counter;
	output reg fin;
	output reg half;
	
	always@(posedge CLOCK_50)
	begin
		if (countdown == 1'b1)
			begin
				if (reset == 1'b1)
					counter <= max_count;
				if (counter < 26'd25000000)
					half <= 1'b1;
				if (counter < 26'd1)
					fin <= 1'b1;
				else
					counter <= counter - 1'b1;
			end
		else
			begin
				counter <= max_count;
				fin <= 1'b0;
				half <= 1'b0;
			end
	end
	
endmodule