data/full_repos/permissive/102955443/encode.v
1: b'%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:14: Operator SUB expects 7 bits on the LHS, but LHS\'s VARREF \'value\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value - ring_position + rotor;\n               ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:14: Operator SUB expects 7 bits on the RHS, but RHS\'s VARREF \'ring_position\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value - ring_position + rotor;\n               ^\n%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:14: Operator ADD expects 7 bits on the RHS, but RHS\'s VARREF \'rotor\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value - ring_position + rotor;\n                               ^\n%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:16: Operator ADD expects 7 bits on the LHS, but LHS\'s VARREF \'value\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value + ring_position - rotor;\n               ^\n%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:16: Operator ADD expects 7 bits on the RHS, but RHS\'s VARREF \'ring_position\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value + ring_position - rotor;\n               ^\n%Warning-WIDTH: data/full_repos/permissive/102955443/encode.v:16: Operator SUB expects 7 bits on the RHS, but RHS\'s VARREF \'rotor\' generates 5 bits.\n                                                                : ... In instance encode.coutput\n   val = value + ring_position - rotor;\n                               ^\n%Error: data/full_repos/permissive/102955443/encode.v:38: Cannot find file containing module: \'rotorEncode\'\n rotorEncode #(.REVERSE(REVERSE)) rotEncode(.code(calculated_input),.val(outval),.rotor_type(rotor_type));\n ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/102955443,data/full_repos/permissive/102955443/rotorEncode\n             data/full_repos/permissive/102955443,data/full_repos/permissive/102955443/rotorEncode.v\n             data/full_repos/permissive/102955443,data/full_repos/permissive/102955443/rotorEncode.sv\n             rotorEncode\n             rotorEncode.v\n             rotorEncode.sv\n             obj_dir/rotorEncode\n             obj_dir/rotorEncode.v\n             obj_dir/rotorEncode.sv\n%Error: Exiting due to 1 error(s), 6 warning(s)\n'
module encode #(
	parameter REVERSE = 0
) (
	input [4:0] inputValue,
	input [4:0] rotor,
	output [4:0] outputValue,
	input [2:0] rotor_type,
	input [4:0] ring_position
);
	wire [4:0] calculated_input;
	wire [4:0] outval;
	
	calculate_val #(.INPUT(1)) cinput(.value(inputValue),.rotor(rotor),.out(calculated_input),.ring_position(ring_position));
	
	rotorEncode #(.REVERSE(REVERSE)) rotEncode(.code(calculated_input),.val(outval),.rotor_type(rotor_type));
	
	calculate_val #(.INPUT(0)) coutput(.value(outval),.rotor(rotor),.out(outputValue),.ring_position(ring_position));
endmodule
module encode #(
	parameter REVERSE = 0
) (
	input [4:0] inputValue,
	input [4:0] rotor,
	output [4:0] outputValue,
	input [2:0] rotor_type,
	input [4:0] ring_position
);

	wire [4:0] calculated_input;
	wire [4:0] outval;
	
	calculate_val #(.INPUT(1)) cinput(.value(inputValue),.rotor(rotor),.out(calculated_input),.ring_position(ring_position));
	
	rotorEncode #(.REVERSE(REVERSE)) rotEncode(.code(calculated_input),.val(outval),.rotor_type(rotor_type));
	
	calculate_val #(.INPUT(0)) coutput(.value(outval),.rotor(rotor),.out(outputValue),.ring_position(ring_position));
endmodule