data/full_repos/permissive/163494071/migong/migong.v
 line:522: before: "["
1: b"%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                 ^~~\n        data/full_repos/permissive/163494071/migong/migong.v:527: ... Location of original declaration\n    input [N-1:0] key;                  \n                  ^~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                        ^~~\n        data/full_repos/permissive/163494071/migong/migong.v:527: ... Location of original declaration\n    input [N-1:0] key;                  \n                  ^~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                               ^~~\n        data/full_repos/permissive/163494071/migong/migong.v:527: ... Location of original declaration\n    input [N-1:0] key;                  \n                  ^~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key_pulse'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                                                   ^~~~~~~~~\n        data/full_repos/permissive/163494071/migong/migong.v:528: ... Location of original declaration\n output [N-1:0] key_pulse;                   \n                ^~~~~~~~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key_pulse'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                                                                ^~~~~~~~~\n        data/full_repos/permissive/163494071/migong/migong.v:528: ... Location of original declaration\n output [N-1:0] key_pulse;                   \n                ^~~~~~~~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:522: Duplicate declaration of port: 'key_pulse'\nmodule debounce1 (clk,rst,key[0],key[1],key[2],key[3],key_pulse[0],key_pulse[1],key_pulse[2],key_pulse[3]);\n                                                                                             ^~~~~~~~~\n        data/full_repos/permissive/163494071/migong/migong.v:528: ... Location of original declaration\n output [N-1:0] key_pulse;                   \n                ^~~~~~~~~\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber4'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                            ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                               ^\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber5'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                         ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                               ^\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber6'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                      ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                               ^\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber8'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                                          ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                        ^\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber9'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                                                            ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                        ^\n%Error: data/full_repos/permissive/163494071/migong/migong.v:91: Duplicate pin connection: '__pinNumber10'\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                                                                              ^\n        data/full_repos/permissive/163494071/migong/migong.v:91: ... Location of original pin connection\n debounce1 m5(clk,res,direction[0],direction[1],direction[2],direction[3],direction_lock[0],direction_lock[1],direction_lock[2],direction_lock[3]);\n                                                                                        ^\n%Error: Exiting due to 12 error(s)\n"
module debounce(clk,key_in,key_out);
	input key_in;
	input clk;
	output reg key_out;
	reg [19:0]tcnt1;
	
	always @(posedge clk or negedge key_in)
	begin
	if(!key_in)tcnt1<=20'd0;
	else tcnt1<=tcnt1+1;
	end
	always @(posedge clk or negedge key_in)
	begin
	if(!key_in)key_out<=0;
		else if(tcnt1==20'hfffff)key_out<=key_in;
	end
endmodule
module debounce(clk,key_in,key_out);

	input key_in;
	input clk;
	output reg key_out;
	reg [19:0]tcnt1;
	
	always @(posedge clk or negedge key_in)
	begin
	if(!key_in)tcnt1<=20'd0;
	else tcnt1<=tcnt1+1;
	end
	always @(posedge clk or negedge key_in)
	begin
	if(!key_in)key_out<=0;
		else if(tcnt1==20'hfffff)key_out<=key_in;
	end
endmodule