data/full_repos/permissive/105729488/state_machine_tb.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:30: Unsupported: Ignoring delay on this delayed statement.\n  #10;\n  ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:32: Unsupported: Ignoring delay on this delayed statement.\n  #10;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:42: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:46: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:53: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:60: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:70: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:74: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:81: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/105729488/state_machine_tb.v:93: Unsupported: Ignoring delay on this delayed statement.\n   #3;\n   ^\n%Error: data/full_repos/permissive/105729488/state_machine_tb.v:16: Cannot find file containing module: \'state_machine\'\n state_machine UUT(.clk(clk), .reset_n(reset_n), .la_rue_sensor(la_rue_sensor),\n ^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/105729488,data/full_repos/permissive/105729488/state_machine\n             data/full_repos/permissive/105729488,data/full_repos/permissive/105729488/state_machine.v\n             data/full_repos/permissive/105729488,data/full_repos/permissive/105729488/state_machine.sv\n             state_machine\n             state_machine.v\n             state_machine.sv\n             obj_dir/state_machine\n             obj_dir/state_machine.v\n             obj_dir/state_machine.sv\n%Error: Exiting due to 1 error(s), 10 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module state_machine_tb();

	wire la_rue_green, la_rue_yellow, la_rue_red;
	wire orchard_green, orchard_yellow, orchard_red;
	wire pedestrian_walk, pedestrian_stop;
	wire [27:0] count, count_c, x, x_c;
	wire [3:0] state, state_c;
	
	reg clk;
	reg reset_n;
	reg la_rue_sensor, orchard_sensor, pedestrian_sensor;
	
	
	integer i, last_count;
	
	state_machine UUT(.clk(clk), .reset_n(reset_n), .la_rue_sensor(la_rue_sensor),
						.orchard_sensor(orchard_sensor), .pedestrian_sensor(pedestrian_sensor), 
						.la_rue_green(la_rue_green), .la_rue_yellow(la_rue_yellow), .la_rue_red(la_rue_red),
						.orchard_green(orchard_green), .orchard_yellow(orchard_yellow), .orchard_red(orchard_red),
						.pedestrian_walk(pedestrian_walk), .pedestrian_stop(pedestrian_stop),
						.count(count), .count_c(count_c),
						.state(state), .state_c(state_c), .x(x), .x_c(x_c));
	initial begin
	

		clk = 0;
		

		reset_n = 0;
		#10;
		reset_n = 1;
		#10;
		

		la_rue_sensor = 1;
		orchard_sensor = 0;
		pedestrian_sensor = 1;

		$display("Test 1");
		for (i = 0; i < 50; i = i + 1) begin
		
			#3;
			
			clk = ~clk;
			
			#3;
			
			if (i == 1) begin

				pedestrian_sensor = 0;
			end
			
			#3;
			
			if (i == 3) begin
				pedestrian_sensor = 1;
				orchard_sensor = 1;
			end
			
			#3;
			
			$display("Count: %d, Current State: %d", count, state);		
			
		end
		
		$display("Test 2");

		for (i = 0; i < 50; i = i + 1) begin
		
			#3;
			
			clk = ~clk;
			
			#3;
			
			if (i == 1) begin
				la_rue_sensor = 0;
				orchard_sensor = 1;
			end
			
			#3;
			
			if (i == 20) begin
				pedestrian_sensor = 0;
			end
			

			if (i == 25) begin
				la_rue_sensor = 1;
				orchard_sensor = 0;
			end
			
			#3;
			
			$display("Count: %d, Current State: %d", count, state);		
			
		end
		
		$display("End Tests");


	end
	
endmodule
module state_machine_tb();


	wire la_rue_green, la_rue_yellow, la_rue_red;
	wire orchard_green, orchard_yellow, orchard_red;
	wire pedestrian_walk, pedestrian_stop;
	wire [27:0] count, count_c, x, x_c;
	wire [3:0] state, state_c;
	
	reg clk;
	reg reset_n;
	reg la_rue_sensor, orchard_sensor, pedestrian_sensor;
	
	
	integer i, last_count;
	
	state_machine UUT(.clk(clk), .reset_n(reset_n), .la_rue_sensor(la_rue_sensor),
						.orchard_sensor(orchard_sensor), .pedestrian_sensor(pedestrian_sensor), 
						.la_rue_green(la_rue_green), .la_rue_yellow(la_rue_yellow), .la_rue_red(la_rue_red),
						.orchard_green(orchard_green), .orchard_yellow(orchard_yellow), .orchard_red(orchard_red),
						.pedestrian_walk(pedestrian_walk), .pedestrian_stop(pedestrian_stop),
						.count(count), .count_c(count_c),
						.state(state), .state_c(state_c), .x(x), .x_c(x_c));
	initial begin
	

		clk = 0;
		

		reset_n = 0;
		#10;
		reset_n = 1;
		#10;
		

		la_rue_sensor = 1;
		orchard_sensor = 0;
		pedestrian_sensor = 1;

		$display("Test 1");
		for (i = 0; i < 50; i = i + 1) begin
		
			#3;
			
			clk = ~clk;
			
			#3;
			
			if (i == 1) begin

				pedestrian_sensor = 0;
			end
			
			#3;
			
			if (i == 3) begin
				pedestrian_sensor = 1;
				orchard_sensor = 1;
			end
			
			#3;
			
			$display("Count: %d, Current State: %d", count, state);		
			
		end
		
		$display("Test 2");

		for (i = 0; i < 50; i = i + 1) begin
		
			#3;
			
			clk = ~clk;
			
			#3;
			
			if (i == 1) begin
				la_rue_sensor = 0;
				orchard_sensor = 1;
			end
			
			#3;
			
			if (i == 20) begin
				pedestrian_sensor = 0;
			end
			

			if (i == 25) begin
				la_rue_sensor = 1;
				orchard_sensor = 0;
			end
			
			#3;
			
			$display("Count: %d, Current State: %d", count, state);		
			
		end
		
		$display("End Tests");


	end
	
endmodule