data/full_repos/permissive/117026779/src/AmbientLightSensor.v
1: b'%Warning-WIDTH: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:128: Operator ASSIGN expects 16 bits on the Assign RHS, but Assign RHS\'s REPLICATE generates 15 bits.\n                                                                                 : ... In instance AmbientLightSensorDemo.U0\n           shift_in  = { shift_in[14:1], sdata };\n                     ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:121: Operator EQ expects 32 or 5 bits on the LHS, but LHS\'s VARREF \'counter\' generates 4 bits.\n                                                                                 : ... In instance AmbientLightSensorDemo.U0\n          if(counter == 16)\n                     ^~\n%Warning-WIDTH: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:138: Operator GTE expects 32 or 9 bits on the LHS, but LHS\'s VARREF \'clk_counter\' generates 4 bits.\n                                                                                 : ... In instance AmbientLightSensorDemo.U0\n          else if(clk_counter >= CLOCK_DIVIDER)\n                              ^~\n%Warning-WIDTH: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:134: Operator GTE expects 32 or 9 bits on the LHS, but LHS\'s VARREF \'clk_counter\' generates 4 bits.\n                                                                                 : ... In instance AmbientLightSensorDemo.U0\n          if(clk_counter >= CLOCK_DIVIDER*2)\n                         ^~\n%Error: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:49: Unsupported: Inout port connection \'data\' to inout signal requires 8 bits, but connection\'s VARREF \'data\' generates 32 bits.\n                                                                        : ... In instance AmbientLightSensorDemo\n    .data(data)\n     ^~~~\n%Warning-WIDTH: data/full_repos/permissive/117026779/src/AmbientLightSensor.v:49: Inout port connection \'data\' expects 8 bits on the pin connection, but pin connection\'s VARREF \'data\' generates 32 bits.\n                                                                                : ... In instance AmbientLightSensorDemo\n    .data(data)\n     ^~~~\n%Error: Exiting due to 1 error(s), 5 warning(s)\n'
module AmbientLightSensorDemo(
	input wire clk,
	input wire rst,
	input wire oe,
	input wire trigger,
	input wire sdata,
	output wire cs,
	output wire sclk,
	output wire done
);

wire [31:0] data;
wire not_oe;
wire not_trigger;

assign not_oe = ~oe;
assign not_trigger = ~trigger;

AmbientLightSensor U0(
    .clk(clk),
    .rst(rst),
    .oe(not_oe),
    .trigger(not_trigger),
    .sdata(sdata),
    .sclk(sclk),
    .cs(cs),
    .done(done),
    .data(data)
);

endmodule
module AmbientLightSensorDemo(
	input wire clk,
	input wire rst,
	input wire oe,
	input wire trigger,
	input wire sdata,
	output wire cs,
	output wire sclk,
	output wire done
);


wire [31:0] data;
wire not_oe;
wire not_trigger;

assign not_oe = ~oe;
assign not_trigger = ~trigger;

AmbientLightSensor U0(
    .clk(clk),
    .rst(rst),
    .oe(not_oe),
    .trigger(not_trigger),
    .sdata(sdata),
    .sclk(sclk),
    .cs(cs),
    .done(done),
    .data(data)
);

endmodule