data/full_repos/permissive/486216880/Encoders.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/486216880/Encoders.v:21: 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 \'Encoder_4\'\nmodule Encoder_4 (\n       ^~~~~~~~~\n                                                                     : ... Top module \'Encoder_8\'\nmodule Encoder_8 (\n       ^~~~~~~~~\n                                                                     : ... Top module \'Encoder_16\'\nmodule Encoder_16 (\n       ^~~~~~~~~~\n%Error: Exiting due to 1 warning(s)\n'
module Encoder_16 (
    input [15:0] input_i,
    output reg [3:0] output_o
  );
  initial begin
    output_o = 0;
  end
  
  always @(input_i) begin
    casex (input_i)
      16'b1xxxxxxxxxxxxxxx : output_o = 15;
      16'b01xxxxxxxxxxxxxx : output_o = 14;
      16'b001xxxxxxxxxxxxx : output_o = 13;
      16'b0001xxxxxxxxxxxx : output_o = 12;
      16'b00001xxxxxxxxxxx : output_o = 11;
      16'b000001xxxxxxxxxx : output_o = 10;
      16'b0000001xxxxxxxxx : output_o = 9;
      16'b00000001xxxxxxxx : output_o = 8;
      16'b000000001xxxxxxx : output_o = 7;
      16'b0000000001xxxxxx : output_o = 6;
      16'b00000000001xxxxx : output_o = 5;
      16'b000000000001xxxx : output_o = 4;
      16'b0000000000001xxx : output_o = 3;
      16'b00000000000001xx : output_o = 2;
      16'b000000000000001x : output_o = 1;
      16'b0000000000000001 : output_o = 0;
      16'b0000000000000000 : output_o = 0;
      default: output_o = 0;
    endcase
  end
  
endmodule
module Encoder_16 (
    input [15:0] input_i,
    output reg [3:0] output_o
  );

  initial begin
    output_o = 0;
  end
  
  always @(input_i) begin
    casex (input_i)
      16'b1xxxxxxxxxxxxxxx : output_o = 15;
      16'b01xxxxxxxxxxxxxx : output_o = 14;
      16'b001xxxxxxxxxxxxx : output_o = 13;
      16'b0001xxxxxxxxxxxx : output_o = 12;
      16'b00001xxxxxxxxxxx : output_o = 11;
      16'b000001xxxxxxxxxx : output_o = 10;
      16'b0000001xxxxxxxxx : output_o = 9;
      16'b00000001xxxxxxxx : output_o = 8;
      16'b000000001xxxxxxx : output_o = 7;
      16'b0000000001xxxxxx : output_o = 6;
      16'b00000000001xxxxx : output_o = 5;
      16'b000000000001xxxx : output_o = 4;
      16'b0000000000001xxx : output_o = 3;
      16'b00000000000001xx : output_o = 2;
      16'b000000000000001x : output_o = 1;
      16'b0000000000000001 : output_o = 0;
      16'b0000000000000000 : output_o = 0;
      default: output_o = 0;
    endcase
  end
  
endmodule