data/full_repos/permissive/172602559/FPGA_Lab_5-keyboard_interface/FPGA Keyboard Interface/db/labFive.v
None: at end of input
1: b'%Error: Cannot find file containing module: Keyboard\n        ... Looked in:\n             data/full_repos/permissive/172602559/FPGA_Lab_5-keyboard_interface/FPGA/Keyboard\n             data/full_repos/permissive/172602559/FPGA_Lab_5-keyboard_interface/FPGA/Keyboard.v\n             data/full_repos/permissive/172602559/FPGA_Lab_5-keyboard_interface/FPGA/Keyboard.sv\n             Keyboard\n             Keyboard.v\n             Keyboard.sv\n             obj_dir/Keyboard\n             obj_dir/Keyboard.v\n             obj_dir/Keyboard.sv\n%Error: Cannot find file containing module: Interface/db,data/full_repos/permissive/172602559\n%Error: Cannot find file containing module: data/full_repos/permissive/172602559/FPGA_Lab_5-keyboard_interface/FPGA\n%Error: Cannot find file containing module: Interface/db/labFive.v\n%Error: Exiting due to 4 error(s)\n'
module labFivekeyBoard( 
	output reg [6:0] Digi0, Digi1, Digi2, Digi3,
	input PS2_CLK, PS2_DAT,
	input [0:0] KEY
); 

wire newChar; 
wire [7:0] char; 
reg [7:0] lastChar, lastChar2;

receiver M1(.newChar(newChar), .char(char), .PS2_CLK(PS2_CLK), .PS2_DAT(PS2_DAT), .reset(!KEY[0])); 

always @ (posedge newChar or negedge KEY[0]) begin 
	if (!KEY[0]) begin 
		Digi0 = 7'b1111111;
		Digi1 = 7'b1111111;
		Digi2 = 7'b1111111;
		Digi3 = 7'b1111111;
end 

else if (char == 8'hF0) begin

if (lastChar == 8'hE0) begin
	Digi2 = display_driver(lastChar[3:0]); 	
	Digi3 = display_driver(lastChar[7:4]); 
	Digi0 = display_driver(lastChar2[3:0]); 
	Digi1 = display_driver(lastChar2[7:4]); 
end 
else begin 
	Digi2 = Digi0; 
	Digi3 = Digi1;
	Digi0 = display_driver(lastChar[3:0]); 
	Digi1 = display_driver(lastChar[7:4]); 
	end 
end 
else begin 
	lastChar2 = lastChar;
	lastChar = char;
end 
end 

function [6:0] display_driver; 
input [3:0] in; 
case (in) 
4'b0000 : display_driver = 7'b1000000;
4'b0001 : display_driver = 7'b1111001;
4'b0010 : display_driver = 7'b0100100;
4'b0011 : display_driver = 7'b0110000;
4'b0100 : display_driver = 7'b0011001;
4'b0101 : display_driver = 7'b0010010;
4'b0110 : display_driver = 7'b0000011;
4'b0111 : display_driver = 7'b1111000;
4'b1000 : display_driver = 7'b0000000;
4'b1001 : display_driver = 7'b0011000;
4'b1010 : display_driver = 7'b0001000;
4'b1011 : display_driver = 7'b0000000;
4'b1100 : display_driver = 7'b1000110;
4'b1101 : display_driver = 7'b1000000;
4'b1110 : display_driver = 7'b0000110;
4'b1111 : display_driver = 7'b0001110;
default : display_driver = 7'b1111111;
endcase 
endfunction
endmodule
module labFivekeyBoard( 
	output reg [6:0] Digi0, Digi1, Digi2, Digi3,
	input PS2_CLK, PS2_DAT,
	input [0:0] KEY
);
 

wire newChar; 
wire [7:0] char; 
reg [7:0] lastChar, lastChar2;

receiver M1(.newChar(newChar), .char(char), .PS2_CLK(PS2_CLK), .PS2_DAT(PS2_DAT), .reset(!KEY[0])); 

always @ (posedge newChar or negedge KEY[0]) begin 
	if (!KEY[0]) begin 
		Digi0 = 7'b1111111;
		Digi1 = 7'b1111111;
		Digi2 = 7'b1111111;
		Digi3 = 7'b1111111;
end 

else if (char == 8'hF0) begin

if (lastChar == 8'hE0) begin
	Digi2 = display_driver(lastChar[3:0]); 	
	Digi3 = display_driver(lastChar[7:4]); 
	Digi0 = display_driver(lastChar2[3:0]); 
	Digi1 = display_driver(lastChar2[7:4]); 
end 
else begin 
	Digi2 = Digi0; 
	Digi3 = Digi1;
	Digi0 = display_driver(lastChar[3:0]); 
	Digi1 = display_driver(lastChar[7:4]); 
	end 
end 
else begin 
	lastChar2 = lastChar;
	lastChar = char;
end 
end 

function [6:0] display_driver; 
input [3:0] in; 
case (in) 
4'b0000 : display_driver = 7'b1000000;
4'b0001 : display_driver = 7'b1111001;
4'b0010 : display_driver = 7'b0100100;
4'b0011 : display_driver = 7'b0110000;
4'b0100 : display_driver = 7'b0011001;
4'b0101 : display_driver = 7'b0010010;
4'b0110 : display_driver = 7'b0000011;
4'b0111 : display_driver = 7'b1111000;
4'b1000 : display_driver = 7'b0000000;
4'b1001 : display_driver = 7'b0011000;
4'b1010 : display_driver = 7'b0001000;
4'b1011 : display_driver = 7'b0000000;
4'b1100 : display_driver = 7'b1000110;
4'b1101 : display_driver = 7'b1000000;
4'b1110 : display_driver = 7'b0000110;
4'b1111 : display_driver = 7'b0001110;
default : display_driver = 7'b1111111;
endcase 
endfunction
endmodule