data/full_repos/permissive/170402453/LineCounter.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/8ba372ea-2f66-4810-aa03-fe9404d15828.xml
module LineCounter(
			input CLK,
			input LineCounter,
			input Reset,
			output [15:0] Counted
    );
	
	reg [15:0] Count;
	assign Counted = Count;
	reg SET1, SET2;
	wire SET;
	
	initial begin
		Count = 0;
		SET1 = 0;
		SET2 = 0;
	end
	

	xor(SET, SET1, SET2); 
	
	always @(posedge LineCounter) begin
		SET1 <= ~SET1;
	end
	


	always @(posedge CLK) begin
		Count <= (Reset) ? 0 : ((SET) ? Count+1 : Count);
		SET2 <= (SET) ? ~SET2 : SET2;
	end

endmodule
module LineCounter(
			input CLK,
			input LineCounter,
			input Reset,
			output [15:0] Counted
    );

	
	reg [15:0] Count;
	assign Counted = Count;
	reg SET1, SET2;
	wire SET;
	
	initial begin
		Count = 0;
		SET1 = 0;
		SET2 = 0;
	end
	

	xor(SET, SET1, SET2); 
	
	always @(posedge LineCounter) begin
		SET1 <= ~SET1;
	end
	


	always @(posedge CLK) begin
		Count <= (Reset) ? 0 : ((SET) ? Count+1 : Count);
		SET2 <= (SET) ? ~SET2 : SET2;
	end

endmodule