data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Warning-IMPLICIT: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Signal definition not found, creating implicitly: \'IN\'\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                                                      ^~\n                   ... Use "/* verilator lint_off IMPLICIT */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:59: Cannot find file containing module: \'matrix_arb\'\n  matrix_arb #(.size(links[i][IN]),\n  ^~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/13952960/lib,data/full_repos/permissive/13952960/matrix_arb\n             data/full_repos/permissive/13952960/lib,data/full_repos/permissive/13952960/matrix_arb.v\n             data/full_repos/permissive/13952960/lib,data/full_repos/permissive/13952960/matrix_arb.sv\n             matrix_arb\n             matrix_arb.v\n             matrix_arb.sv\n             obj_dir/matrix_arb\n             obj_dir/matrix_arb.v\n             obj_dir/matrix_arb.sv\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Expecting expression to be constant, but variable isn\'t const: \'IN\'\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                                                      ^~\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Expecting expression to be constant, but variable isn\'t const: \'links\'\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                                             ^~~~~\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Second value of [a:b] isn\'t a constant, maybe you want +: or -:\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                                                         ^\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: [1:4] Range extract has backward bit ordering, perhaps you wanted [4:1]\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: [1:8] Range extract has backward bit ordering, perhaps you wanted [8:1]\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: [1:12] Range extract has backward bit ordering, perhaps you wanted [12:1]\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Warning-SELRANGE: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Selection index out of range: 23:12 outside 19:0\n                                                                                : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: [1:16] Range extract has backward bit ordering, perhaps you wanted [16:1]\n                                                                     : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Warning-SELRANGE: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:77: Selection index out of range: 31:16 outside 19:0\n                                                                                : ... In instance LAG_tree_arbiter\n      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];\n                                            ^\n%Error: data/full_repos/permissive/13952960/lib/LAG_tree_arbiter.v:106: Cannot find file containing module: \'matrix_arb\'\n   matrix_arb #(.size(numgroups),\n   ^~~~~~~~~~\n%Error: Exiting due to 9 error(s), 3 warning(s)\n'
module LAG_tree_arbiter (request, grant, success, clk, rst_n);

   parameter multistage=0;
   
   parameter max_groupsize=4;

   parameter numgroups = 5;
   
   parameter integer links[numgroups][2] = '{'{2,2}, '{2,2}, '{2,2}, '{2,2}, '{2,2} };

   parameter priority_support = 0;
  
   input [numgroups*max_groupsize-1:0] request;
  

   output [numgroups*max_groupsize-1:0] grant;
   input 	     success;

   input 	     clk, rst_n;

   logic [numgroups*max_groupsize-1:0] intra_group_grant;
   logic [numgroups-1:0] group_grant, any_group_request;
   logic [numgroups-1:0] current_group_success, last_group_success;
   logic [numgroups-1:0] group_success;

   
   genvar i;

   generate

   for (i=0; i<numgroups; i=i+1) begin:arbiters

      if (multistage==0) begin



	 matrix_arb #(.size(links[i][IN]),
		      .multistage(1)) arb
	   (.request(request[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .grant(intra_group_grant[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .success(group_success[i]), 
	    .clk, .rst_n);
	 
      end else begin
      
	 matrix_arb #(.size(links[i][IN]),
		      .multistage(multistage)) arb
	   (.request(request[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .grant(intra_group_grant[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .success(group_success[i] & success),

	    .clk, .rst_n);
      end
			   
      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];

      assign grant[(i+1)*max_groupsize-1:i*max_groupsize]=
      	     intra_group_grant[(i+1)*max_groupsize-1:i*max_groupsize] & {max_groupsize{group_grant[i]}};




      assign current_group_success[i]= group_grant[i];
      
   end
   
   if (multistage==2) begin
      always@(posedge clk) begin
	 if (!rst_n) begin
	    last_group_success<='0;
	 end else begin
	    last_group_success<=current_group_success;
	 end
      end

      assign group_success=last_group_success;
   
   end else begin
      assign group_success=current_group_success;
   end
   
   endgenerate
   
   matrix_arb #(.size(numgroups),
		.multistage(multistage)
    ) group_arb 
     (.request(any_group_request),
      .grant(group_grant),
      .success(success),
      .clk, .rst_n);

endmodule
module LAG_tree_arbiter (request, grant, success, clk, rst_n);


   parameter multistage=0;
   
   parameter max_groupsize=4;

   parameter numgroups = 5;
   
   parameter integer links[numgroups][2] = '{'{2,2}, '{2,2}, '{2,2}, '{2,2}, '{2,2} };

   parameter priority_support = 0;
  
   input [numgroups*max_groupsize-1:0] request;
  

   output [numgroups*max_groupsize-1:0] grant;
   input 	     success;

   input 	     clk, rst_n;

   logic [numgroups*max_groupsize-1:0] intra_group_grant;
   logic [numgroups-1:0] group_grant, any_group_request;
   logic [numgroups-1:0] current_group_success, last_group_success;
   logic [numgroups-1:0] group_success;

   
   genvar i;

   generate

   for (i=0; i<numgroups; i=i+1) begin:arbiters

      if (multistage==0) begin



	 matrix_arb #(.size(links[i][IN]),
		      .multistage(1)) arb
	   (.request(request[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .grant(intra_group_grant[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .success(group_success[i]), 
	    .clk, .rst_n);
	 
      end else begin
      
	 matrix_arb #(.size(links[i][IN]),
		      .multistage(multistage)) arb
	   (.request(request[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .grant(intra_group_grant[i*max_groupsize+links[i][IN]-1:i*max_groupsize]),
	    .success(group_success[i] & success),

	    .clk, .rst_n);
      end
			   
      assign any_group_request[i] = |request[i*max_groupsize+links[i][IN]-1:i*max_groupsize];

      assign grant[(i+1)*max_groupsize-1:i*max_groupsize]=
      	     intra_group_grant[(i+1)*max_groupsize-1:i*max_groupsize] & {max_groupsize{group_grant[i]}};




      assign current_group_success[i]= group_grant[i];
      
   end
   
   if (multistage==2) begin
      always@(posedge clk) begin
	 if (!rst_n) begin
	    last_group_success<='0;
	 end else begin
	    last_group_success<=current_group_success;
	 end
      end

      assign group_success=last_group_success;
   
   end else begin
      assign group_success=current_group_success;
   end
   
   endgenerate
   
   matrix_arb #(.size(numgroups),
		.multistage(multistage)
    ) group_arb 
     (.request(any_group_request),
      .grant(group_grant),
      .success(success),
      .clk, .rst_n);

endmodule