data/full_repos/permissive/213289758/f-iSLIP/select_grant.v
1: b"%Error: data/full_repos/permissive/213289758/f-iSLIP/select_grant.v:74: Cannot find file containing module: 'simple_priority_encoder'\nsimple_priority_encoder #(\n^~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/213289758/f-iSLIP,data/full_repos/permissive/213289758/simple_priority_encoder\n             data/full_repos/permissive/213289758/f-iSLIP,data/full_repos/permissive/213289758/simple_priority_encoder.v\n             data/full_repos/permissive/213289758/f-iSLIP,data/full_repos/permissive/213289758/simple_priority_encoder.sv\n             simple_priority_encoder\n             simple_priority_encoder.v\n             simple_priority_encoder.sv\n             obj_dir/simple_priority_encoder\n             obj_dir/simple_priority_encoder.v\n             obj_dir/simple_priority_encoder.sv\n%Error: data/full_repos/permissive/213289758/f-iSLIP/select_grant.v:80: Cannot find file containing module: 'program_priority_encoder_v1_0'\nprogram_priority_encoder_v1_0#(\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module select_grant# (
parameter N = 25,
parameter P = 8
)(
input  clk,
input  reset,
input  i_busy,
input  i_random_robin,
input  [P * N - 1 : 0] i_port_req,
output [N - 1 : 0] o_port_grant,
output [P - 1 : 0] o_grant_priority
);
wire [N - 1 : 0] request [P - 1 : 0];
wire [P - 1 : 0] trans_request [N - 1 : 0];
wire [P - 1 : 0] has_priority;
wire [P - 1 : 0] gnt_priority;
wire [N - 1 : 0] filtered_req;
reg  [N - 1 : 0] p_enc [P - 1 : 0];


wire [P - 1 : 0] trans_p_enc [N - 1 : 0];
wire [N - 1 : 0] filtered_enc;
wire [N - 1 : 0] grant;
generate
   genvar i,j;
   for(i = 0; i < P; i = i + 1) begin:trans_req
      for(j = 0; j < N; j = j + 1) begin:sub_trans_req
         assign request[i][j] = i_port_req[i * N + j];
         assign trans_request[j][i] = i_port_req[i * N + j] & gnt_priority[P - 1 - i];
         assign trans_p_enc[j][i] = p_enc[i][j] & gnt_priority[P - 1 - i];
      end
      assign has_priority[P - 1 - i] = | request[i];

      assign o_grant_priority[i] =  gnt_priority[P - 1 - i]; 
   end
   for(i = 0; i < N; i = i + 1) begin:filt_req
      assign filtered_req[i] = | trans_request[i];
      assign filtered_enc[i] = | trans_p_enc[i];
   end
   for(i = 0;i < P; i = i + 1) begin:rd_rb_gp
      always @(posedge clk) begin
          if (reset) begin
               p_enc[i] <= 0;
          end
          else begin

              if (i_busy & i_random_robin & gnt_priority[P - 1 - i]) begin
                  p_enc[i] <= {grant[N - 2 : 0], 1'b0};
              end
          end
      end
   end
endgenerate
simple_priority_encoder #(
.N (P)
) spe_u (
 .in_request (has_priority),
 .out_grant (gnt_priority)
);
program_priority_encoder_v1_0#(
.N (N)
) ppe_v1_0 (
.in_p_enc (filtered_enc),
.in_req (filtered_req),
.out_grant (grant)
);





assign o_port_grant =  grant;
endmodule
module select_grant# (
parameter N = 25,
parameter P = 8
)(
input  clk,
input  reset,
input  i_busy,
input  i_random_robin,
input  [P * N - 1 : 0] i_port_req,
output [N - 1 : 0] o_port_grant,
output [P - 1 : 0] o_grant_priority
);

wire [N - 1 : 0] request [P - 1 : 0];
wire [P - 1 : 0] trans_request [N - 1 : 0];
wire [P - 1 : 0] has_priority;
wire [P - 1 : 0] gnt_priority;
wire [N - 1 : 0] filtered_req;
reg  [N - 1 : 0] p_enc [P - 1 : 0];


wire [P - 1 : 0] trans_p_enc [N - 1 : 0];
wire [N - 1 : 0] filtered_enc;
wire [N - 1 : 0] grant;
generate
   genvar i,j;
   for(i = 0; i < P; i = i + 1) begin:trans_req
      for(j = 0; j < N; j = j + 1) begin:sub_trans_req
         assign request[i][j] = i_port_req[i * N + j];
         assign trans_request[j][i] = i_port_req[i * N + j] & gnt_priority[P - 1 - i];
         assign trans_p_enc[j][i] = p_enc[i][j] & gnt_priority[P - 1 - i];
      end
      assign has_priority[P - 1 - i] = | request[i];

      assign o_grant_priority[i] =  gnt_priority[P - 1 - i]; 
   end
   for(i = 0; i < N; i = i + 1) begin:filt_req
      assign filtered_req[i] = | trans_request[i];
      assign filtered_enc[i] = | trans_p_enc[i];
   end
   for(i = 0;i < P; i = i + 1) begin:rd_rb_gp
      always @(posedge clk) begin
          if (reset) begin
               p_enc[i] <= 0;
          end
          else begin

              if (i_busy & i_random_robin & gnt_priority[P - 1 - i]) begin
                  p_enc[i] <= {grant[N - 2 : 0], 1'b0};
              end
          end
      end
   end
endgenerate
simple_priority_encoder #(
.N (P)
) spe_u (
 .in_request (has_priority),
 .out_grant (gnt_priority)
);
program_priority_encoder_v1_0#(
.N (N)
) ppe_v1_0 (
.in_p_enc (filtered_enc),
.in_req (filtered_req),
.out_grant (grant)
);





assign o_port_grant =  grant;
endmodule