data/full_repos/permissive/448204225/src/riscv_core/Forward.v
1: b"%Error: data/full_repos/permissive/448204225/src/riscv_core/Forward.v:32: Define or directive not defined: '`OPC_STORE'\n      if (opcode_id == `OPC_STORE)\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/448204225/src/riscv_core/Forward.v:32: syntax error, unexpected ')', expecting TYPE-IDENTIFIER\n      if (opcode_id == `OPC_STORE)\n                                 ^\n%Error: data/full_repos/permissive/448204225/src/riscv_core/Forward.v:44: Define or directive not defined: '`OPC_STORE'\n    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && opcode_id == `OPC_STORE) begin\n                                                                          ^~~~~~~~~~\n%Error: data/full_repos/permissive/448204225/src/riscv_core/Forward.v:44: syntax error, unexpected ')', expecting TYPE-IDENTIFIER\n    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && opcode_id == `OPC_STORE) begin\n                                                                                    ^\n%Error: Cannot continue\n"
module FORWARD #(
  parameter DWIDTH = 32
) (
  input [4:0] rs1_addr_id,
  input [4:0] rs2_addr_id,
  input [6:0] opcode_id,
  input [4:0] rd_addr_ex_in,
  input [4:0] rd_addr_id_in,
  input ctrl_reg_we_ex_in,
  input ctrl_reg_we_id_in,
  output reg ex_forward_a_sel,
  output reg ex_forward_b_sel,
  output reg ex_forward_data_sel,
  output reg id_forward_a_sel,
  output reg id_forward_b_sel
);


  always @(*) begin
    if (ctrl_reg_we_ex_in && rs1_addr_id == rd_addr_ex_in && rd_addr_ex_in != 5'd0) begin
      ex_forward_a_sel = 1'b1;
    end else begin
      ex_forward_a_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && rd_addr_ex_in != 5'd0) begin
      if (opcode_id == `OPC_STORE)


        ex_forward_b_sel = 1'b0;
      else
        ex_forward_b_sel = 1'b1;
    end else begin
      ex_forward_b_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && opcode_id == `OPC_STORE) begin
      ex_forward_data_sel = 1'b1;
    end else begin
      ex_forward_data_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_id_in && rs1_addr_id == rd_addr_id_in && rd_addr_id_in != 5'd0) begin
      id_forward_a_sel = 1'b1;
    end else begin
      id_forward_a_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_id_in && rs2_addr_id == rd_addr_id_in && rd_addr_id_in != 5'd0) begin
      id_forward_b_sel = 1'b1;
    end else begin
      id_forward_b_sel = 1'b0;
    end
  end
endmodule
module FORWARD #(
  parameter DWIDTH = 32
) (
  input [4:0] rs1_addr_id,
  input [4:0] rs2_addr_id,
  input [6:0] opcode_id,
  input [4:0] rd_addr_ex_in,
  input [4:0] rd_addr_id_in,
  input ctrl_reg_we_ex_in,
  input ctrl_reg_we_id_in,
  output reg ex_forward_a_sel,
  output reg ex_forward_b_sel,
  output reg ex_forward_data_sel,
  output reg id_forward_a_sel,
  output reg id_forward_b_sel
);



  always @(*) begin
    if (ctrl_reg_we_ex_in && rs1_addr_id == rd_addr_ex_in && rd_addr_ex_in != 5'd0) begin
      ex_forward_a_sel = 1'b1;
    end else begin
      ex_forward_a_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && rd_addr_ex_in != 5'd0) begin
      if (opcode_id == `OPC_STORE)


        ex_forward_b_sel = 1'b0;
      else
        ex_forward_b_sel = 1'b1;
    end else begin
      ex_forward_b_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_ex_in && rs2_addr_id == rd_addr_ex_in && opcode_id == `OPC_STORE) begin
      ex_forward_data_sel = 1'b1;
    end else begin
      ex_forward_data_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_id_in && rs1_addr_id == rd_addr_id_in && rd_addr_id_in != 5'd0) begin
      id_forward_a_sel = 1'b1;
    end else begin
      id_forward_a_sel = 1'b0;
    end
  end

  always @(*) begin
    if (ctrl_reg_we_id_in && rs2_addr_id == rd_addr_id_in && rd_addr_id_in != 5'd0) begin
      id_forward_b_sel = 1'b1;
    end else begin
      id_forward_b_sel = 1'b0;
    end
  end
endmodule