data/full_repos/permissive/13952960/lib/unary_select_pair.v
 line:36: before: "["
1: b"%Error: data/full_repos/permissive/13952960/lib/unary_select_pair.v:52: Can't find definition of variable: 'OUT'\n      for (j=0; j<links[i][OUT]; j=j+1)\n                           ^~~\n%Error: data/full_repos/permissive/13952960/lib/unary_select_pair.v:53: Can't find definition of task/function: 'LAG_route_valid_turn'\n        selected[i*WB+j] = (LAG_route_valid_turn(input_port, i)) ?\n                            ^~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module unary_select_pair (sel_a, sel_b, data_in, selected_bit);

   parameter input_port = 0;
   parameter WA = 5;
   parameter WB = 2;
   parameter integer links[WA][2] = '{'{2,2}, '{2,2}, '{2,2}, '{2,2}, '{2,2} };

   input [WA-1:0] sel_a;
   input [WB-1:0] sel_b;
   input [WA*WB-1:0] data_in;
   output selected_bit;

   integer i,j;

   logic [WA*WB-1:0]  selected;
   
    always_comb begin
   
    selected = '0;
    
    for (i=0; i<WA; i=i+1)
      for (j=0; j<links[i][OUT]; j=j+1)
        selected[i*WB+j] = (LAG_route_valid_turn(input_port, i)) ?
				      data_in[i*WB+j] & sel_a[i] & sel_b[j] : 1'b0;
	      
    end

   assign selected_bit=|selected;
   
endmodule
module unary_select_pair (sel_a, sel_b, data_in, selected_bit);


   parameter input_port = 0;
   parameter WA = 5;
   parameter WB = 2;
   parameter integer links[WA][2] = '{'{2,2}, '{2,2}, '{2,2}, '{2,2}, '{2,2} };

   input [WA-1:0] sel_a;
   input [WB-1:0] sel_b;
   input [WA*WB-1:0] data_in;
   output selected_bit;

   integer i,j;

   logic [WA*WB-1:0]  selected;
   
    always_comb begin
   
    selected = '0;
    
    for (i=0; i<WA; i=i+1)
      for (j=0; j<links[i][OUT]; j=j+1)
        selected[i*WB+j] = (LAG_route_valid_turn(input_port, i)) ?
				      data_in[i*WB+j] & sel_a[i] & sel_b[j] : 1'b0;
	      
    end

   assign selected_bit=|selected;
   
endmodule