data/full_repos/permissive/213289758/f-iSLIP/select_accept.v
1: b"%Error: data/full_repos/permissive/213289758/f-iSLIP/select_accept.v:78: 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_accept.v:84: 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_accept#(
parameter N = 25,
parameter P = 8
)(
input clk,
input reset,
input i_busy,
input [N * P - 1 : 0] i_priority,
input [N - 1 : 0] i_port_grant,
output [N - 1 : 0] o_accept,
output [P - 1 : 0] o_priority
);
wire [N - 1 : 0] trans_priority [P - 1 : 0];
wire [P - 1 : 0] port_priority [N - 1 : 0];
wire [P - 1 : 0] filtered_priority;
wire [P - 1 : 0] acc_pri;
wire [N - 1 : 0] filtered_port;


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] accept;

generate
   genvar i,j;
   for(j = 0; j < P; j = j + 1) begin:pri_pr_gp
      for(i = 0; i < N; i = i + 1) begin:sub_pri_pr_gp

         assign trans_priority[j][i] = i_priority[i * P + j] & i_port_grant[i];

         assign port_priority[i][j] = i_priority[i * P + j] & i_port_grant[i];
         assign trans_p_enc[i][j] = p_enc[j][i] & acc_pri[P - 1 - j];
      end
      assign filtered_priority[P - 1 - j] = | trans_priority[j];

      assign o_priority[j] = acc_pri[P - 1 - j];
   end
   for(i = 0; i < N; i = i + 1)begin:filtered_port_gp

      assign filtered_port[i] = (i_port_grant[i]) && (o_priority == port_priority[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 & acc_pri[P - 1 - i]) begin
                  p_enc[i] <= {accept[N - 2 : 0], 1'b0};
              end
          end
      end
   end
endgenerate
simple_priority_encoder #(
.N (P)
) spe_u (
.in_request (filtered_priority),
.out_grant (acc_pri)
);
program_priority_encoder_v1_0#(
.N (N)
) ppe_v1_0 (
.in_p_enc (filtered_enc),
.in_req (filtered_port),
.out_grant (accept)
);






assign o_accept = accept;
endmodule
module select_accept#(
parameter N = 25,
parameter P = 8
)(
input clk,
input reset,
input i_busy,
input [N * P - 1 : 0] i_priority,
input [N - 1 : 0] i_port_grant,
output [N - 1 : 0] o_accept,
output [P - 1 : 0] o_priority
);

wire [N - 1 : 0] trans_priority [P - 1 : 0];
wire [P - 1 : 0] port_priority [N - 1 : 0];
wire [P - 1 : 0] filtered_priority;
wire [P - 1 : 0] acc_pri;
wire [N - 1 : 0] filtered_port;


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] accept;

generate
   genvar i,j;
   for(j = 0; j < P; j = j + 1) begin:pri_pr_gp
      for(i = 0; i < N; i = i + 1) begin:sub_pri_pr_gp

         assign trans_priority[j][i] = i_priority[i * P + j] & i_port_grant[i];

         assign port_priority[i][j] = i_priority[i * P + j] & i_port_grant[i];
         assign trans_p_enc[i][j] = p_enc[j][i] & acc_pri[P - 1 - j];
      end
      assign filtered_priority[P - 1 - j] = | trans_priority[j];

      assign o_priority[j] = acc_pri[P - 1 - j];
   end
   for(i = 0; i < N; i = i + 1)begin:filtered_port_gp

      assign filtered_port[i] = (i_port_grant[i]) && (o_priority == port_priority[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 & acc_pri[P - 1 - i]) begin
                  p_enc[i] <= {accept[N - 2 : 0], 1'b0};
              end
          end
      end
   end
endgenerate
simple_priority_encoder #(
.N (P)
) spe_u (
.in_request (filtered_priority),
.out_grant (acc_pri)
);
program_priority_encoder_v1_0#(
.N (N)
) ppe_v1_0 (
.in_p_enc (filtered_enc),
.in_req (filtered_port),
.out_grant (accept)
);






assign o_accept = accept;
endmodule