data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:48: Unsupported: Ignoring delay on this delayed statement.\n  #40  sys_clk_i <= 1;\n  ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:49: Unsupported: Ignoring delay on this delayed statement.\n  #40  sys_clk_i <= 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:59: Unsupported: Ignoring delay on this delayed statement.\n  #80 reset_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:61: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:62: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:64: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:65: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:67: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:68: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:70: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 1; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:71: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:73: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:74: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:76: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:77: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:79: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 1; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:80: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:82: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 1; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:83: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:85: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 0; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:86: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:88: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 1; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:89: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:91: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_d_i = 1; ps2_c_i = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:92: Unsupported: Ignoring delay on this delayed statement.\n  #50000  ps2_c_i = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:94: Unsupported: Ignoring delay on this delayed statement.\n  #320 ;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:107: Unsupported: Ignoring delay on this delayed statement.\n  #80 reset_i = 0;\n  ^\n%Error: data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io/T_uxa_ps2_shfreg.v:38: Cannot find file containing module: \'M_uxa_ps2_shfreg\'\n M_uxa_ps2_shfreg uut (\n ^~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io,data/full_repos/permissive/51711917/M_uxa_ps2_shfreg\n             data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io,data/full_repos/permissive/51711917/M_uxa_ps2_shfreg.v\n             data/full_repos/permissive/51711917/2/nexys2/uxa/ps2io,data/full_repos/permissive/51711917/M_uxa_ps2_shfreg.sv\n             M_uxa_ps2_shfreg\n             M_uxa_ps2_shfreg.v\n             M_uxa_ps2_shfreg.sv\n             obj_dir/M_uxa_ps2_shfreg\n             obj_dir/M_uxa_ps2_shfreg.v\n             obj_dir/M_uxa_ps2_shfreg.sv\n%Error: Exiting due to 1 error(s), 27 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module T_uxa_ps2_shfreg;


	reg ps2_d_i;
	reg ps2_c_i;
	reg reset_i;
	reg sys_clk_i;


	wire [7:0] d_o;
	wire frame_o;


	M_uxa_ps2_shfreg uut (
		.ps2_d_i(ps2_d_i), 
		.ps2_c_i(ps2_c_i), 
		.d_o(d_o), 
		.frame_o(frame_o), 
		.reset_i(reset_i), 
		.sys_clk_i(sys_clk_i)
	);

	always begin
		#40  sys_clk_i <= 1;
		#40  sys_clk_i <= 0;
	end
	
	initial begin

		ps2_d_i = 1;
		ps2_c_i = 1;
		reset_i = 1;
		sys_clk_i = 0;
		
		#80 reset_i = 0;

		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#320 ;

		if(d_o != 8'b01100100) begin
			$display("Deserializer failed to grab byte correctly.");
			$stop;
		end
		
		if(frame_o != 1) begin
			$display("Deserializer failed to sync to the PS/2 frame.");
			$stop;
		end
		
		reset_i = 1;
		#80 reset_i = 0;
		
		if(d_o != 8'b11111111) begin
			$display("Deserializer didn't reset when instructed.");
			$stop;
		end
		
		if(frame_o != 0) begin
			$display("Frame indicator didn't reset when instructed.");
			$stop;
		end
	end
endmodule
module T_uxa_ps2_shfreg;



	reg ps2_d_i;
	reg ps2_c_i;
	reg reset_i;
	reg sys_clk_i;


	wire [7:0] d_o;
	wire frame_o;


	M_uxa_ps2_shfreg uut (
		.ps2_d_i(ps2_d_i), 
		.ps2_c_i(ps2_c_i), 
		.d_o(d_o), 
		.frame_o(frame_o), 
		.reset_i(reset_i), 
		.sys_clk_i(sys_clk_i)
	);

	always begin
		#40  sys_clk_i <= 1;
		#40  sys_clk_i <= 0;
	end
	
	initial begin

		ps2_d_i = 1;
		ps2_c_i = 1;
		reset_i = 1;
		sys_clk_i = 0;
		
		#80 reset_i = 0;

		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 0; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#50000  ps2_d_i = 1; ps2_c_i = 0;
		#50000  ps2_c_i = 1;
		
		#320 ;

		if(d_o != 8'b01100100) begin
			$display("Deserializer failed to grab byte correctly.");
			$stop;
		end
		
		if(frame_o != 1) begin
			$display("Deserializer failed to sync to the PS/2 frame.");
			$stop;
		end
		
		reset_i = 1;
		#80 reset_i = 0;
		
		if(d_o != 8'b11111111) begin
			$display("Deserializer didn't reset when instructed.");
			$stop;
		end
		
		if(frame_o != 0) begin
			$display("Frame indicator didn't reset when instructed.");
			$stop;
		end
	end
endmodule