data/full_repos/permissive/413230008/Binary-to-BCD/Code/Sources/proirity_encoder_4x2.v
data/verilator_xmls/2c640916-2bb3-4acb-ae8c-b8c273848bb6.xml
module proirity_encoder_4x2(
    input [3:0] w,
    output z,
    output reg [1:0] y
    );
    
    assign z = |w;
    
    always @(w)
    begin 
        y = 2'bxx;
        
        if(w[3])
            y = 2'b11;
        else if (w[2])
            y = 2'b10;
        else if (w[1])
            y = 2'b01;
        else 
            y = 2'bxx;
                    
            
            
    
    end
    
endmodule
module proirity_encoder_4x2(
    input [3:0] w,
    output z,
    output reg [1:0] y
    );

    
    assign z = |w;
    
    always @(w)
    begin 
        y = 2'bxx;
        
        if(w[3])
            y = 2'b11;
        else if (w[2])
            y = 2'b10;
        else if (w[1])
            y = 2'b01;
        else 
            y = 2'bxx;
                    
            
            
    
    end
    
endmodule