data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v
1: b'%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:8: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 32 or 10 bits.\n                                                                              : ... In instance bianaryToBCD\n  ones = bianary % 10;\n       ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:9: Operator SUB expects 32 or 10 bits on the RHS, but RHS\'s VARREF \'ones\' generates 4 bits.\n                                                                              : ... In instance bianaryToBCD\n  tens = ((bianary - ones) / 10) % 10;\n                   ^\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:9: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 32 or 10 bits.\n                                                                              : ... In instance bianaryToBCD\n  tens = ((bianary - ones) / 10) % 10;\n       ^\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:10: Operator SUB expects 32 or 10 bits on the RHS, but RHS\'s VARREF \'tens\' generates 4 bits.\n                                                                               : ... In instance bianaryToBCD\n  hundreds = ((bianary - tens) / 10) % 10;\n                       ^\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:10: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 32 or 10 bits.\n                                                                               : ... In instance bianaryToBCD\n  hundreds = ((bianary - tens) / 10) % 10;\n           ^\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:11: Operator SUB expects 32 or 10 bits on the RHS, but RHS\'s VARREF \'hundreds\' generates 4 bits.\n                                                                               : ... In instance bianaryToBCD\n  thousands = ((bianary - hundreds) / 10) % 10;\n                        ^\n%Warning-WIDTH: data/full_repos/permissive/422447942/Codebase/bianaryToBCD.v:11: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 32 or 10 bits.\n                                                                               : ... In instance bianaryToBCD\n  thousands = ((bianary - hundreds) / 10) % 10;\n            ^\n%Error: Exiting due to 7 warning(s)\n'
module bianaryToBCD
	(
		input [9:0] bianary,
		output reg [3:0] ones, tens, hundreds, thousands
	);

	always @(bianary) begin
		ones = bianary % 10;
		tens = ((bianary - ones) / 10) % 10;
		hundreds = ((bianary - tens) / 10) % 10;
		thousands = ((bianary - hundreds) / 10) % 10;
	end
	
endmodule
module bianaryToBCD
	(
		input [9:0] bianary,
		output reg [3:0] ones, tens, hundreds, thousands
	);


	always @(bianary) begin
		ones = bianary % 10;
		tens = ((bianary - ones) / 10) % 10;
		hundreds = ((bianary - tens) / 10) % 10;
		thousands = ((bianary - hundreds) / 10) % 10;
	end
	
endmodule