data/full_repos/permissive/214278225/1_LEDs/knightRiderV2/decoder.v
1: b'%Warning-WIDTH: data/full_repos/permissive/214278225/1_LEDs/knightRiderV2/decoder.v:14: Operator SUB expects 32 or 24 bits on the LHS, but LHS\'s VARREF \'COUNT\' generates 22 bits.\n                                                                                      : ... In instance decoder\n if(counter == COUNT -1)begin\n                     ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: Exiting due to 1 warning(s)\n'
module decoder(enc_dataIn,dataOut,counter);


parameter COUNT = 22'h3FFFFF;
input [23:0] counter;

input [2:0] enc_dataIn;
output reg [7:0] dataOut;


always@(*)begin
	dataOut = 0;
	if(counter == COUNT -1)begin
		case(enc_dataIn)
			3'b000: dataOut = 8'b0000_0001;
			3'b001: dataOut = 8'b0000_0010;
			3'b010: dataOut = 8'b0000_0100;
			3'b011: dataOut = 8'b0000_1000;
			3'b100: dataOut = 8'b0001_0000;
			3'b101: dataOut = 8'b0010_0000;
			3'b110: dataOut = 8'b0100_0000;
			3'b111: dataOut = 8'b1000_0000;
		endcase
	end
end

endmodule
module decoder(enc_dataIn,dataOut,counter);



parameter COUNT = 22'h3FFFFF;
input [23:0] counter;

input [2:0] enc_dataIn;
output reg [7:0] dataOut;


always@(*)begin
	dataOut = 0;
	if(counter == COUNT -1)begin
		case(enc_dataIn)
			3'b000: dataOut = 8'b0000_0001;
			3'b001: dataOut = 8'b0000_0010;
			3'b010: dataOut = 8'b0000_0100;
			3'b011: dataOut = 8'b0000_1000;
			3'b100: dataOut = 8'b0001_0000;
			3'b101: dataOut = 8'b0010_0000;
			3'b110: dataOut = 8'b0100_0000;
			3'b111: dataOut = 8'b1000_0000;
		endcase
	end
end

endmodule