data/full_repos/permissive/517239653/print.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/517239653/print.v:115: Multiple top level modules\n                                                                   : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                   : ... Top module \'hex_printer\'\nmodule hex_printer(chars_out, number_in);\n       ^~~~~~~~~~~\n                                                                   : ... Top module \'binary_printer\'\nmodule binary_printer(chars_out, binary_in);\n       ^~~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/517239653/print.v:48: Operator ADD expects 32 or 8 bits on the LHS, but LHS\'s VARREF \'binary\' generates 4 bits.\n                                                               : ... In instance hex_printer.genloop[7].BIN_TO_CHAR\n        ascii_reg <= binary + 55;\n                            ^\n%Warning-WIDTH: data/full_repos/permissive/517239653/print.v:50: Operator ADD expects 32 or 8 bits on the LHS, but LHS\'s VARREF \'binary\' generates 4 bits.\n                                                               : ... In instance hex_printer.genloop[7].BIN_TO_CHAR\n        ascii_reg <= binary + 48;\n                            ^\n%Error: Exiting due to 3 warning(s)\n'
module hex_printer(chars_out, number_in);

parameter CHARACTERS = 8;

output [8*CHARACTERS-1:0] chars_out;
input [31:0] number_in;

genvar i;
generate
    
    for(i=0; i<CHARACTERS; i=i+1) begin : genloop
        binary_to_ascii_hex BIN_TO_CHAR(chars_out[(i<<3)+:8], number_in[(((CHARACTERS-1)-i)<<2)+:4]);
    end

endgenerate

endmodule
module hex_printer(chars_out, number_in);


parameter CHARACTERS = 8;

output [8*CHARACTERS-1:0] chars_out;
input [31:0] number_in;

genvar i;
generate
    
    for(i=0; i<CHARACTERS; i=i+1) begin : genloop
        binary_to_ascii_hex BIN_TO_CHAR(chars_out[(i<<3)+:8], number_in[(((CHARACTERS-1)-i)<<2)+:4]);
    end

endgenerate

endmodule