data/full_repos/permissive/408212214/top.v
1: b"%Error: data/full_repos/permissive/408212214/top.v:19: Cannot find file containing module: 'pll_12_50'\npll_12_50 pll(.clki(clk12), .clko(clk));\n^~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/408212214,data/full_repos/permissive/408212214/pll_12_50\n             data/full_repos/permissive/408212214,data/full_repos/permissive/408212214/pll_12_50.v\n             data/full_repos/permissive/408212214,data/full_repos/permissive/408212214/pll_12_50.sv\n             pll_12_50\n             pll_12_50.v\n             pll_12_50.sv\n             obj_dir/pll_12_50\n             obj_dir/pll_12_50.v\n             obj_dir/pll_12_50.sv\n%Error: data/full_repos/permissive/408212214/top.v:33: Cannot find file containing module: 'n64_controller'\n      n64_controller #(.NUM_CONSOLES(NUM_CONSOLES)) player_i (\n      ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/408212214/top.v:47: Cannot find file containing module: 'n64_controller_reader'\nn64_controller_reader reader(\n^~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/408212214/top.v:57: Cannot find file containing module: 'glitch_filter'\nglitch_filter data_filter(.sys_clk(clk), .line_in(button), .line_out(button_f));\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/408212214/top.v:78: Cannot find file containing module: 'serial_handler'\nserial_handler #(.NUM_CONSOLES(NUM_CONSOLES)) ftdi (\n^~~~~~~~~~~~~~\n%Error: Exiting due to 5 error(s)\n"
module top #(parameter NUM_CONSOLES=9) (
    input clk12,
	output [7:0] led,
    inout n64real,
    inout [NUM_CONSOLES-1:0] n64,
    output tx_uart,
    input rx_uart,
	input button
);


wire clk;
pll_12_50 pll(.clki(clk12), .clko(clk));


wire [31:0] real_controller_data;
wire [NUM_CONSOLES-1:0] ready_for_next_frame;
wire queueWrEn;
wire [31:0] received_frame_data;
wire n64_controller_reset;

reg input_mode;

generate
   genvar i;
   for(i=0; i<NUM_CONSOLES;i=i+1) begin
      n64_controller #(.NUM_CONSOLES(NUM_CONSOLES)) player_i (
		.sys_clk(clk),
		.n64d(n64[i]),
		.real_controller_data(real_controller_data),
		.input_mode(input_mode),
		.queue_WrEn(queueWrEn),
		.queue_data(received_frame_data),
		.next_frame_request(ready_for_next_frame[i]),
		.n64_controller_reset(n64_controller_reset)
		);
   end
endgenerate


n64_controller_reader reader(
   .sys_clk(clk),
   .n64d(n64real),
   .controller_data(real_controller_data)
);



wire button_f;
reg debounce;
glitch_filter data_filter(.sys_clk(clk), .line_in(button), .line_out(button_f));

always @(posedge clk) begin
	if(!button_f && !debounce) begin
		debounce <= 1'b1;
		input_mode <= !input_mode;
	end else if(button_f) begin
		debounce <= 1'b0;
	end
end

initial begin
   input_mode = 1'b1;
   debounce = 1'b0;
end


assign led[6:0] = 7'b1111111;
assign led[7] = input_mode;


serial_handler #(.NUM_CONSOLES(NUM_CONSOLES)) ftdi (
    .clk(clk),
	.request_frame(ready_for_next_frame),
    .rx_uart(rx_uart),
	.tx_uart(tx_uart),
	.queue_WrEn(queueWrEn),
	.received_frame_data(received_frame_data),
	.n64_controller_reset(n64_controller_reset)
);

endmodule
module top #(parameter NUM_CONSOLES=9) (
    input clk12,
	output [7:0] led,
    inout n64real,
    inout [NUM_CONSOLES-1:0] n64,
    output tx_uart,
    input rx_uart,
	input button
);



wire clk;
pll_12_50 pll(.clki(clk12), .clko(clk));


wire [31:0] real_controller_data;
wire [NUM_CONSOLES-1:0] ready_for_next_frame;
wire queueWrEn;
wire [31:0] received_frame_data;
wire n64_controller_reset;

reg input_mode;

generate
   genvar i;
   for(i=0; i<NUM_CONSOLES;i=i+1) begin
      n64_controller #(.NUM_CONSOLES(NUM_CONSOLES)) player_i (
		.sys_clk(clk),
		.n64d(n64[i]),
		.real_controller_data(real_controller_data),
		.input_mode(input_mode),
		.queue_WrEn(queueWrEn),
		.queue_data(received_frame_data),
		.next_frame_request(ready_for_next_frame[i]),
		.n64_controller_reset(n64_controller_reset)
		);
   end
endgenerate


n64_controller_reader reader(
   .sys_clk(clk),
   .n64d(n64real),
   .controller_data(real_controller_data)
);



wire button_f;
reg debounce;
glitch_filter data_filter(.sys_clk(clk), .line_in(button), .line_out(button_f));

always @(posedge clk) begin
	if(!button_f && !debounce) begin
		debounce <= 1'b1;
		input_mode <= !input_mode;
	end else if(button_f) begin
		debounce <= 1'b0;
	end
end

initial begin
   input_mode = 1'b1;
   debounce = 1'b0;
end


assign led[6:0] = 7'b1111111;
assign led[7] = input_mode;


serial_handler #(.NUM_CONSOLES(NUM_CONSOLES)) ftdi (
    .clk(clk),
	.request_frame(ready_for_next_frame),
    .rx_uart(rx_uart),
	.tx_uart(tx_uart),
	.queue_WrEn(queueWrEn),
	.received_frame_data(received_frame_data),
	.n64_controller_reset(n64_controller_reset)
);

endmodule