data/full_repos/permissive/413230008/Binary-to-BCD/Code/Sources/encoder_4x2.v
data/verilator_xmls/c91e1ac4-ed18-41ab-b5bf-a205ce44c2b5.xml
module encoder_4x2(
    input [3:0] w,
    output reg [1:0] y
    );
    
    always @(w)
    begin
        y =2'bx;
        case(w)
            4'b0001: y =0;
            4'b0010: y =1;
            4'b0100: y =2;
            4'b1000: y =3;
            default: y = 2'bxx;
        endcase
    end
    
    
    
endmodule
module encoder_4x2(
    input [3:0] w,
    output reg [1:0] y
    );

    
    always @(w)
    begin
        y =2'bx;
        case(w)
            4'b0001: y =0;
            4'b0010: y =1;
            4'b0100: y =2;
            4'b1000: y =3;
            default: y = 2'bxx;
        endcase
    end
    
    
    
endmodule