data/full_repos/permissive/503509790/verilog/rtl/Thermometer_Mask.v
1: b"%Error: data/full_repos/permissive/503509790/verilog/rtl/Thermometer_Mask.v:19: Replication value of 0 is only legal under a concatenation (IEEE 1800-2017 11.4.12.1)\n                                                                              : ... In instance Thermometer_Mask\n    localparam zero = {WORD_WIDTH{1'b0}};\n                                 ^\n%Error: Exiting due to 1 error(s)\n"
module Thermometer_Mask
#(
    parameter       WORD_WIDTH          = 0
)
(
    input   wire    [WORD_WIDTH-1:0]    bitvector,
    output  reg     [WORD_WIDTH-1:0]    mask
);

    initial begin
        mask = 0;
    end

    localparam zero = {WORD_WIDTH{1'b0}};

    always @(*) begin




        mask = bitvector ^ (bitvector - 1);




        mask = (bitvector == zero) ? mask : ~mask;



        mask = mask | bitvector;
    end

endmodule
module Thermometer_Mask
#(
    parameter       WORD_WIDTH          = 0
)
(
    input   wire    [WORD_WIDTH-1:0]    bitvector,
    output  reg     [WORD_WIDTH-1:0]    mask
);


    initial begin
        mask = 0;
    end

    localparam zero = {WORD_WIDTH{1'b0}};

    always @(*) begin




        mask = bitvector ^ (bitvector - 1);




        mask = (bitvector == zero) ? mask : ~mask;



        mask = mask | bitvector;
    end

endmodule