data/full_repos/permissive/167632244/FlappyBird/top.v
1: b"%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:63: Cannot find file containing module: 'pic'\n pic outpic(\n ^~~\n        ... Looked in:\n             data/full_repos/permissive/167632244/FlappyBird,data/full_repos/permissive/167632244/pic\n             data/full_repos/permissive/167632244/FlappyBird,data/full_repos/permissive/167632244/pic.v\n             data/full_repos/permissive/167632244/FlappyBird,data/full_repos/permissive/167632244/pic.sv\n             pic\n             pic.v\n             pic.sv\n             obj_dir/pic\n             obj_dir/pic.v\n             obj_dir/pic.sv\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:68: Cannot find file containing module: 'vgac'\n vgac forvga (\n ^~~~\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:73: Cannot find file containing module: 'ps2_ver2'\n ps2_ver2 outkey(.clk(clk),.rst(1'b0),.ps2_clk(ps2_clk),.ps2_data(ps2_data),.data_out(getkey));\n ^~~~~~~~\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:77: Cannot find file containing module: 'pbdebounce'\n pbdebounce fangdou(clkdiv[17],rst,btnout);\n ^~~~~~~~~~\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:78: Cannot find file containing module: 'disp_num'\n disp_num arduino(clkdiv[1],{4'b0,gametimes[11:0]},4'b0,4'b0,1'b0,AN,SEGMENT);\n ^~~~~~~~\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:98: Cannot find file containing module: 'SSeg_Dev'\n SSeg_Dev sevenseg(.clk(clk),.rst(1'b0),.Start(clkdiv[20]),.SW0(PM),.flash(1'b0),\n ^~~~~~~~\n%Error: data/full_repos/permissive/167632244/FlappyBird/top.v:105: Cannot find file containing module: 'music'\n music whenplay(.clk(clk),.playbar(judgedeath),.buzzer(buzzer));\n ^~~~~\n%Error: Exiting due to 7 error(s)\n"
module top(
	input clk,
	input SW,
	input ps2_data,
	input ps2_clk,
	input rst,
	output hs,
	output vs,
	output [3:0] r,
	output [3:0] g,
	output [3:0] b,
	output [7:0]LED,
	output wire [3:0] AN,
    output wire [7:0] SEGMENT,
	output wire BTN_X,
	output wire seg_clk,
	output wire seg_sout,
	output wire SEG_PEN,
	output wire seg_clm,
	output wire buzzer,
	input wire PM
    );
	
	
	wire [8:0]vga_row;
	wire [9:0]vga_col;
	wire [9:0]getkey;
	wire [11:0] vga_data;
	wire judgedeath;
	wire [11:0] judgewin;
	wire btnout;            

	
	reg [31:0]clkdiv;
	reg [11:0]gametimes=0;
	
	always @(posedge clk) begin
		clkdiv<=clkdiv+1;
	end
	


	pic outpic(
		.clk(clk),.clrn(btnout),.rowaddr(vga_row),.coladdr(vga_col),.keydata(getkey),.outRGB(vga_data),.death(judgedeath),.wintime(judgewin)
			);


	vgac forvga (
		.vga_clk(clkdiv[1]), .clrn(SW), .d_in(vga_data), .row_addr(vga_row), .col_addr(vga_col), .r(r), .g(g), .b(b), .hs(hs), .vs(vs)
	);
	

	ps2_ver2 outkey(.clk(clk),.rst(1'b0),.ps2_clk(ps2_clk),.ps2_data(ps2_data),.data_out(getkey));



	pbdebounce fangdou(clkdiv[17],rst,btnout);
	disp_num arduino(clkdiv[1],{4'b0,gametimes[11:0]},4'b0,4'b0,1'b0,AN,SEGMENT);


	assign LED[0]=judgedeath;
	assign LED[1]=judgedeath;
	assign LED[2]=judgedeath;
	assign LED[3]=judgedeath;
	assign LED[4]=judgedeath;
	assign LED[5]=judgedeath;
	assign LED[6]=judgedeath;
	assign LED[7]=judgedeath;

	assign BTN_X=0;
	

	always @(posedge btnout)begin
		gametimes=gametimes+1;
	end


	SSeg_Dev sevenseg(.clk(clk),.rst(1'b0),.Start(clkdiv[20]),.SW0(PM),.flash(1'b0),
					.Hexs({24'h000000,judgewin}),
					.point(8'b0000_0000),.LES(8'b1111_0000),
					.seg_clk(seg_clk),.seg_sout(seg_sout),.SEG_PEN(SEG_PEN),
					.seg_clm(seg_clm));
	

	music whenplay(.clk(clk),.playbar(judgedeath),.buzzer(buzzer));


endmodule
module top(
	input clk,
	input SW,
	input ps2_data,
	input ps2_clk,
	input rst,
	output hs,
	output vs,
	output [3:0] r,
	output [3:0] g,
	output [3:0] b,
	output [7:0]LED,
	output wire [3:0] AN,
    output wire [7:0] SEGMENT,
	output wire BTN_X,
	output wire seg_clk,
	output wire seg_sout,
	output wire SEG_PEN,
	output wire seg_clm,
	output wire buzzer,
	input wire PM
    );

	
	
	wire [8:0]vga_row;
	wire [9:0]vga_col;
	wire [9:0]getkey;
	wire [11:0] vga_data;
	wire judgedeath;
	wire [11:0] judgewin;
	wire btnout;            

	
	reg [31:0]clkdiv;
	reg [11:0]gametimes=0;
	
	always @(posedge clk) begin
		clkdiv<=clkdiv+1;
	end
	


	pic outpic(
		.clk(clk),.clrn(btnout),.rowaddr(vga_row),.coladdr(vga_col),.keydata(getkey),.outRGB(vga_data),.death(judgedeath),.wintime(judgewin)
			);


	vgac forvga (
		.vga_clk(clkdiv[1]), .clrn(SW), .d_in(vga_data), .row_addr(vga_row), .col_addr(vga_col), .r(r), .g(g), .b(b), .hs(hs), .vs(vs)
	);
	

	ps2_ver2 outkey(.clk(clk),.rst(1'b0),.ps2_clk(ps2_clk),.ps2_data(ps2_data),.data_out(getkey));



	pbdebounce fangdou(clkdiv[17],rst,btnout);
	disp_num arduino(clkdiv[1],{4'b0,gametimes[11:0]},4'b0,4'b0,1'b0,AN,SEGMENT);


	assign LED[0]=judgedeath;
	assign LED[1]=judgedeath;
	assign LED[2]=judgedeath;
	assign LED[3]=judgedeath;
	assign LED[4]=judgedeath;
	assign LED[5]=judgedeath;
	assign LED[6]=judgedeath;
	assign LED[7]=judgedeath;

	assign BTN_X=0;
	

	always @(posedge btnout)begin
		gametimes=gametimes+1;
	end


	SSeg_Dev sevenseg(.clk(clk),.rst(1'b0),.Start(clkdiv[20]),.SW0(PM),.flash(1'b0),
					.Hexs({24'h000000,judgewin}),
					.point(8'b0000_0000),.LES(8'b1111_0000),
					.seg_clk(seg_clk),.seg_sout(seg_sout),.SEG_PEN(SEG_PEN),
					.seg_clm(seg_clm));
	

	music whenplay(.clk(clk),.playbar(judgedeath),.buzzer(buzzer));


endmodule