data/full_repos/permissive/147690299/lab/14_comb_mux_onehot/rtl/bN_mux_N_1_priority.sv
 line:8: before: "["
data/verilator_xmls/2c0b2a4d-7d5c-44bf-a24b-fdeb3dc48f1d.xml
module bN_mux_N_1_priority
#(
    parameter DATA_WIDTH = 4,
              INPUT_SIZE = 4
)(

    input      [INPUT_SIZE-1:0][DATA_WIDTH-1:0] d,   
    input      [INPUT_SIZE-1:0]                 sel,
    output reg                 [DATA_WIDTH-1:0] y
);
    always @(*) begin
        y = d[0];
        for (int i = 0; i < INPUT_SIZE; i = i+1 ) begin
            if(sel[i])
                y = d[i];
        end
    end
endmodule
module bN_mux_N_1_priority
#(
    parameter DATA_WIDTH = 4,
              INPUT_SIZE = 4
)(

    input      [INPUT_SIZE-1:0][DATA_WIDTH-1:0] d,   
    input      [INPUT_SIZE-1:0]                 sel,
    output reg                 [DATA_WIDTH-1:0] y
);

    always @(*) begin
        y = d[0];
        for (int i = 0; i < INPUT_SIZE; i = i+1 ) begin
            if(sel[i])
                y = d[i];
        end
    end
endmodule