data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v
 line:129: before: "."
1: b'%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:3: Cannot find include file: common_defines.v\n`include "common_defines.v" \n         ^~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source,data/full_repos/permissive/114714167/common_defines.v\n             data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source,data/full_repos/permissive/114714167/common_defines.v.v\n             data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source,data/full_repos/permissive/114714167/common_defines.v.sv\n             common_defines.v\n             common_defines.v.v\n             common_defines.v.sv\n             obj_dir/common_defines.v\n             obj_dir/common_defines.v.v\n             obj_dir/common_defines.v.sv\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:67: Unsupported: Ignoring delay on this delayed statement.\n    #100\n    ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:81: Define or directive not defined: \'`LOW\'\n   ac_active <= `LOW;\n                ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:81: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active <= `LOW;\n                    ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:83: Define or directive not defined: \'`LOW\'\n   ac_active <= `LOW;\n                ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:83: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active <= `LOW;\n                    ^\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:84: Unsupported: Ignoring delay on this delayed statement.\n   #1000;\n   ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:85: Define or directive not defined: \'`HIGH\'\n   ac_active <= `HIGH;\n                ^~~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:85: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active <= `HIGH;\n                     ^\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:86: Unsupported: Ignoring delay on this delayed statement.\n   #100;\n   ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:87: Define or directive not defined: \'`LOW\'\n   ac_active <= `LOW;\n                ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:87: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active <= `LOW;\n                    ^\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:88: Unsupported: Ignoring delay on this delayed statement.\n   #1;\n   ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:94: Define or directive not defined: \'`LOW\'\n   ac_active_cmd <= `LOW;\n                    ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:94: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active_cmd <= `LOW;\n                        ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:96: Define or directive not defined: \'`HIGH\'\n   ac_active_cmd <= `HIGH;\n                    ^~~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:96: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active_cmd <= `HIGH;\n                         ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:98: Define or directive not defined: \'`LOW\'\n   ac_active_cmd <= `LOW;\n                    ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:98: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active_cmd <= `LOW;\n                        ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:100: Define or directive not defined: \'`LOW\'\n   ac_active_cmd <= `LOW;\n                    ^~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:100: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n   ac_active_cmd <= `LOW;\n                        ^\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:105: Unsupported: Verilog 1995 strength specifiers\n assign ( pull1, strong0 ) scl_1 = 1\'b1;\n          ^~~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:105: Unsupported: Verilog 1995 strength specifiers\n assign ( pull1, strong0 ) scl_1 = 1\'b1;\n                 ^~~~~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:106: Unsupported: Verilog 1995 strength specifiers\n assign ( pull1, strong0 ) sda_1 = (i2c_ack == 1\'b1) ? 1\'b0: 1\'b1;\n          ^~~~~\n%Error: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:106: Unsupported: Verilog 1995 strength specifiers\n assign ( pull1, strong0 ) sda_1 = (i2c_ack == 1\'b1) ? 1\'b0: 1\'b1;\n                 ^~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:109: Unsupported: Ignoring delay on this delayed statement.\n  #10 rstn = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:110: Unsupported: Ignoring delay on this delayed statement.\n  #10 rstn = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/114714167/Source-Code/Drone2/impl1/source/test_bno055_driver.v:117: Unsupported: Ignoring delay on this delayed statement.\n  #1_000_00000;\n  ^\n%Error: Exiting due to 21 error(s), 7 warning(s)\n'
module bno055_module_tb();
	wire scl_1;
	wire sda_1;
	wire scl_2;
	wire sda_2;
	reg rstn;
	reg purn;
	wire rstn_imu;
	wire [7:0] data_rx;
    wire sys_clk;
	wire done;
	reg go;
	reg read_write_in = 1;
	reg [3:0] i2c_count;
	reg i2c_ack;
	reg [7:0]sda_byte;
	reg ac_active;
	reg ac_active_cmd;
	wire valid_strobe;

	integer i;
	integer j;


	GSR GSR_INST (.GSR (rstn));
	PUR PUR_INST (.PUR (purn));

	defparam OSCH_inst.NOM_FREQ = "38.00";
	OSCH OSCH_inst (.STDBY(1'b0),
       			    .OSC(sys_clk),
       			    .SEDSTDBY());


	bno055_driver #(0) bno055(
		.scl_1(scl_1),
		.sda_1(sda_1),
		.scl_2(scl_2),
		.sda_2(sda_2),
		.rstn( (rstn) ),
		.rstn_imu(rstn_imu),
		.ac_active(ac_active),
		.valid_strobe(valid_strobe),
		.led_data_out(data_rx),
		.sys_clk(sys_clk)
		);;


	always@(posedge scl_1, negedge rstn) begin
		if(~rstn) begin
			i2c_count = 1'b0;
			i2c_ack = 1'b0;
		end
		else begin
			i2c_count = i2c_count + 1'b1;
			if(i2c_count == 4'd9) begin
				i2c_ack = 1'b1;
				#100
				i2c_ack = 1'b0;
				i2c_count = 1'b0;
				sda_byte = 8'b0;
			end
			else begin
				i2c_ack = 1'b0;
				sda_byte = {sda_byte[6:0], sda_1};
			end
		end
	end

	always@(posedge ac_active_cmd, negedge rstn) begin
		if (~rstn)
			ac_active <= `LOW;
		else begin
			ac_active <= `LOW;
			#1000;
			ac_active <= `HIGH;
			#100;
			ac_active <= `LOW;
			#1;
		end
	end

	always@(posedge sys_clk, negedge rstn) begin
		if (~rstn)
			ac_active_cmd <= `LOW;
		else if(valid_strobe && (~ac_active_cmd))
			ac_active_cmd <= `HIGH;
		else if(valid_strobe && (ac_active_cmd))
			ac_active_cmd <= `LOW;
		else
			ac_active_cmd <= `LOW;


	end

	assign ( pull1, strong0 ) scl_1 = 1'b1;
	assign ( pull1, strong0 ) sda_1 = (i2c_ack == 1'b1) ? 1'b0: 1'b1;
	initial begin
		rstn = 1;
		#10 rstn = 0;
		#10 rstn = 1;
		read_write_in = 0;
		for(j = 0; j < 2; j = j + 1) begin
			for(i = 0; i < 10; i = i + 1) begin
				$display("efb_registers %1d EFB#%1d = %h", i[4:0], (j[4:0]+1), bno055.i2c.efb_registers[i][j]);
			end
		end
		#1_000_00000;
		$stop;
		end
endmodule
module bno055_module_tb();

	wire scl_1;
	wire sda_1;
	wire scl_2;
	wire sda_2;
	reg rstn;
	reg purn;
	wire rstn_imu;
	wire [7:0] data_rx;
    wire sys_clk;
	wire done;
	reg go;
	reg read_write_in = 1;
	reg [3:0] i2c_count;
	reg i2c_ack;
	reg [7:0]sda_byte;
	reg ac_active;
	reg ac_active_cmd;
	wire valid_strobe;

	integer i;
	integer j;


	GSR GSR_INST (.GSR (rstn));
	PUR PUR_INST (.PUR (purn));

	defparam OSCH_inst.NOM_FREQ = "38.00";
	OSCH OSCH_inst (.STDBY(1'b0),
       			    .OSC(sys_clk),
       			    .SEDSTDBY());


	bno055_driver #(0) bno055(
		.scl_1(scl_1),
		.sda_1(sda_1),
		.scl_2(scl_2),
		.sda_2(sda_2),
		.rstn( (rstn) ),
		.rstn_imu(rstn_imu),
		.ac_active(ac_active),
		.valid_strobe(valid_strobe),
		.led_data_out(data_rx),
		.sys_clk(sys_clk)
		);;


	always@(posedge scl_1, negedge rstn) begin
		if(~rstn) begin
			i2c_count = 1'b0;
			i2c_ack = 1'b0;
		end
		else begin
			i2c_count = i2c_count + 1'b1;
			if(i2c_count == 4'd9) begin
				i2c_ack = 1'b1;
				#100
				i2c_ack = 1'b0;
				i2c_count = 1'b0;
				sda_byte = 8'b0;
			end
			else begin
				i2c_ack = 1'b0;
				sda_byte = {sda_byte[6:0], sda_1};
			end
		end
	end

	always@(posedge ac_active_cmd, negedge rstn) begin
		if (~rstn)
			ac_active <= `LOW;
		else begin
			ac_active <= `LOW;
			#1000;
			ac_active <= `HIGH;
			#100;
			ac_active <= `LOW;
			#1;
		end
	end

	always@(posedge sys_clk, negedge rstn) begin
		if (~rstn)
			ac_active_cmd <= `LOW;
		else if(valid_strobe && (~ac_active_cmd))
			ac_active_cmd <= `HIGH;
		else if(valid_strobe && (ac_active_cmd))
			ac_active_cmd <= `LOW;
		else
			ac_active_cmd <= `LOW;


	end

	assign ( pull1, strong0 ) scl_1 = 1'b1;
	assign ( pull1, strong0 ) sda_1 = (i2c_ack == 1'b1) ? 1'b0: 1'b1;
	initial begin
		rstn = 1;
		#10 rstn = 0;
		#10 rstn = 1;
		read_write_in = 0;
		for(j = 0; j < 2; j = j + 1) begin
			for(i = 0; i < 10; i = i + 1) begin
				$display("efb_registers %1d EFB#%1d = %h", i[4:0], (j[4:0]+1), bno055.i2c.efb_registers[i][j]);
			end
		end
		#1_000_00000;
		$stop;
		end
endmodule