data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v
1: b"%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:50: Cannot find file containing module: 'vga_adapter'\n vga_adapter VGA(\n ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/515245706/test/gameStateTester,data/full_repos/permissive/515245706/vga_adapter\n             data/full_repos/permissive/515245706/test/gameStateTester,data/full_repos/permissive/515245706/vga_adapter.v\n             data/full_repos/permissive/515245706/test/gameStateTester,data/full_repos/permissive/515245706/vga_adapter.sv\n             vga_adapter\n             vga_adapter.v\n             vga_adapter.sv\n             obj_dir/vga_adapter\n             obj_dir/vga_adapter.v\n             obj_dir/vga_adapter.sv\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:74: Cannot find file containing module: 'gameStateFSM'\n gameStateFSM gsfsm0(\n ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:87: Cannot find file containing module: 'gridDrawer'\n gridDrawer g0(\n ^~~~~~~~~~\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:96: Cannot find file containing module: 'numberDrawer'\n numberDrawer d0(\n ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:106: Cannot find file containing module: 'numberDrawer'\n numberDrawer d1(\n ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:116: Cannot find file containing module: 'numberDrawer'\n numberDrawer d2(\n ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/515245706/test/gameStateTester/FSMTester.v:126: Cannot find file containing module: 'clear'\n clear c0(\n ^~~~~\n%Error: Exiting due to 7 error(s)\n"
module FSMTester
(
		CLOCK_50,

        KEY,
        SW,

		VGA_CLK,
		VGA_HS,
		VGA_VS,
		VGA_BLANK_N,
		VGA_SYNC_N,
		VGA_R,
		VGA_G,
		VGA_B
	);

	input			CLOCK_50;
	input   [9:0]   SW;
	input   [3:0]   KEY;


	output			VGA_CLK;
	output			VGA_HS;
	output			VGA_VS;
	output			VGA_BLANK_N;
	output			VGA_SYNC_N;
	output	[9:0]	VGA_R;
	output	[9:0]	VGA_G;
	output	[9:0]	VGA_B;
	
	wire resetn;
	assign resetn = KEY[0];
	

	wire [2:0] gridColor, ezColor, normalColor, hardColor, clearColor;
	reg [2:0] color;
	reg [7:0] x;
	reg [6:0] y;
	
	wire [7: 0] gridXOut, ezXOut, normalXOut, hardXOut, clearXOut;
	wire [6: 0] gridYOut, ezYOut, normalYOut, hardYOut, clearYOut;
	
	
	wire grid, ez, normal, hard, inGame, clear;




	vga_adapter VGA(
			.resetn(resetn),
			.clock(CLOCK_50),
			.colour(color),
			.x(x),
			.y(y),
			.plot(SW[9]),

			.VGA_R(VGA_R),
			.VGA_G(VGA_G),
			.VGA_B(VGA_B),
			.VGA_HS(VGA_HS),
			.VGA_VS(VGA_VS),
			.VGA_BLANK(VGA_BLANK_N),
			.VGA_SYNC(VGA_SYNC_N),
			.VGA_CLK(VGA_CLK));
		defparam VGA.RESOLUTION = "160x120";
		defparam VGA.MONOCHROME = "FALSE";
		defparam VGA.BITS_PER_COLOUR_CHANNEL = 1;
		defparam VGA.BACKGROUND_IMAGE = "black.mif";
			


	 
	gameStateFSM gsfsm0(
		.clk(CLOCK_50),
		.resetn(KEY[0]),
		.go(~KEY[3:1]),
		.gameOver(SW[5]),
		.drawGrid(grid),
		.drawEZ(ez),
		.drawNORMAL(normal),
		.drawHARD(hard),
		.inGame(inGame),
		.clear(clear)
	);
	
	gridDrawer g0(
		.clk(CLOCK_50),
		.enable(grid),
		.resetn(KEY[0]),
		.colorOut(gridColor),
		.xOut(gridXOut),
		.yOut(gridYOut)
	);
	 
	numberDrawer d0(
		.numbers(64'b0000_1111_1110_1101_1100_1011_1010_1001_1000_0111_0110_0101_0100_0011_0010_0001),
		.clk(CLOCK_50),
		.enable(ez),
		.resetn(KEY[0]),
		.colorOut(ezColor),
		.xOut(ezXOut),
		.yOut(ezYOut)
	);
	
	numberDrawer d1(
		.numbers(64'b0000_0001_0010_0011_0100_0101_0110_0111_1000_1001_1010_1011_1100_1101_1110_1111),
		.clk(CLOCK_50),
		.enable(normal),
		.resetn(KEY[0]),
		.colorOut(normalColor),
		.xOut(normalXOut),
		.yOut(normalYOut)
	);
	
	numberDrawer d2(
		.numbers(64'b0000_0101_0010_1011_0100_0001_0110_0011_1000_1001_1010_0111_1100_1101_1110_1111),
		.clk(CLOCK_50),
		.enable(hard),
		.resetn(KEY[0]),
		.colorOut(hardColor),
		.xOut(hardXOut),
		.yOut(hardYOut)
	);
	
	clear c0(
		.clk(CLOCK_50),
		.enable(clear),
		.resetn(KEY[0]),
		.colorOut(clearColor),
		.xOut(clearXOut),
		.yOut(clearYOut)
	);
	
	always@(*)
   begin
		if (grid == 1'b1)
			begin
				x = gridXOut;
				y = gridYOut;
				color = gridColor;
			end
		else if (ez == 1'b1)
			begin
				x = ezXOut;
				y = ezYOut;
				color = ezColor;
			end
		else if (normal == 1'b1)
			begin
				x = normalXOut;
				y = normalYOut;
				color = normalColor;
			end
		else if (hard == 1'b1)
			begin
				x = hardXOut;
				y = hardYOut;
				color = hardColor;
			end
		else if (clear == 1'b1)
			begin
				x = clearXOut;
				y = clearYOut;
				color = clearColor;
			end
		else
			begin
				x = 8'd0;
				y = 7'd0;
				color = 3'b000;
			end
	end
	
endmodule
module FSMTester
(
		CLOCK_50,

        KEY,
        SW,

		VGA_CLK,
		VGA_HS,
		VGA_VS,
		VGA_BLANK_N,
		VGA_SYNC_N,
		VGA_R,
		VGA_G,
		VGA_B
	);


	input			CLOCK_50;
	input   [9:0]   SW;
	input   [3:0]   KEY;


	output			VGA_CLK;
	output			VGA_HS;
	output			VGA_VS;
	output			VGA_BLANK_N;
	output			VGA_SYNC_N;
	output	[9:0]	VGA_R;
	output	[9:0]	VGA_G;
	output	[9:0]	VGA_B;
	
	wire resetn;
	assign resetn = KEY[0];
	

	wire [2:0] gridColor, ezColor, normalColor, hardColor, clearColor;
	reg [2:0] color;
	reg [7:0] x;
	reg [6:0] y;
	
	wire [7: 0] gridXOut, ezXOut, normalXOut, hardXOut, clearXOut;
	wire [6: 0] gridYOut, ezYOut, normalYOut, hardYOut, clearYOut;
	
	
	wire grid, ez, normal, hard, inGame, clear;




	vga_adapter VGA(
			.resetn(resetn),
			.clock(CLOCK_50),
			.colour(color),
			.x(x),
			.y(y),
			.plot(SW[9]),

			.VGA_R(VGA_R),
			.VGA_G(VGA_G),
			.VGA_B(VGA_B),
			.VGA_HS(VGA_HS),
			.VGA_VS(VGA_VS),
			.VGA_BLANK(VGA_BLANK_N),
			.VGA_SYNC(VGA_SYNC_N),
			.VGA_CLK(VGA_CLK));
		defparam VGA.RESOLUTION = "160x120";
		defparam VGA.MONOCHROME = "FALSE";
		defparam VGA.BITS_PER_COLOUR_CHANNEL = 1;
		defparam VGA.BACKGROUND_IMAGE = "black.mif";
			


	 
	gameStateFSM gsfsm0(
		.clk(CLOCK_50),
		.resetn(KEY[0]),
		.go(~KEY[3:1]),
		.gameOver(SW[5]),
		.drawGrid(grid),
		.drawEZ(ez),
		.drawNORMAL(normal),
		.drawHARD(hard),
		.inGame(inGame),
		.clear(clear)
	);
	
	gridDrawer g0(
		.clk(CLOCK_50),
		.enable(grid),
		.resetn(KEY[0]),
		.colorOut(gridColor),
		.xOut(gridXOut),
		.yOut(gridYOut)
	);
	 
	numberDrawer d0(
		.numbers(64'b0000_1111_1110_1101_1100_1011_1010_1001_1000_0111_0110_0101_0100_0011_0010_0001),
		.clk(CLOCK_50),
		.enable(ez),
		.resetn(KEY[0]),
		.colorOut(ezColor),
		.xOut(ezXOut),
		.yOut(ezYOut)
	);
	
	numberDrawer d1(
		.numbers(64'b0000_0001_0010_0011_0100_0101_0110_0111_1000_1001_1010_1011_1100_1101_1110_1111),
		.clk(CLOCK_50),
		.enable(normal),
		.resetn(KEY[0]),
		.colorOut(normalColor),
		.xOut(normalXOut),
		.yOut(normalYOut)
	);
	
	numberDrawer d2(
		.numbers(64'b0000_0101_0010_1011_0100_0001_0110_0011_1000_1001_1010_0111_1100_1101_1110_1111),
		.clk(CLOCK_50),
		.enable(hard),
		.resetn(KEY[0]),
		.colorOut(hardColor),
		.xOut(hardXOut),
		.yOut(hardYOut)
	);
	
	clear c0(
		.clk(CLOCK_50),
		.enable(clear),
		.resetn(KEY[0]),
		.colorOut(clearColor),
		.xOut(clearXOut),
		.yOut(clearYOut)
	);
	
	always@(*)
   begin
		if (grid == 1'b1)
			begin
				x = gridXOut;
				y = gridYOut;
				color = gridColor;
			end
		else if (ez == 1'b1)
			begin
				x = ezXOut;
				y = ezYOut;
				color = ezColor;
			end
		else if (normal == 1'b1)
			begin
				x = normalXOut;
				y = normalYOut;
				color = normalColor;
			end
		else if (hard == 1'b1)
			begin
				x = hardXOut;
				y = hardYOut;
				color = hardColor;
			end
		else if (clear == 1'b1)
			begin
				x = clearXOut;
				y = clearYOut;
				color = clearColor;
			end
		else
			begin
				x = 8'd0;
				y = 7'd0;
				color = 3'b000;
			end
	end
	
endmodule