data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v
None: at end of input
1: b'%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:1: Cannot find include file: ././define/instr_def.v\n`include "././define/instr_def.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/123304708/src/control,data/full_repos/permissive/123304708/././define/instr_def.v\n             data/full_repos/permissive/123304708/src/control,data/full_repos/permissive/123304708/././define/instr_def.v.v\n             data/full_repos/permissive/123304708/src/control,data/full_repos/permissive/123304708/././define/instr_def.v.sv\n             ././define/instr_def.v\n             ././define/instr_def.v.v\n             ././define/instr_def.v.sv\n             obj_dir/././define/instr_def.v\n             obj_dir/././define/instr_def.v.v\n             obj_dir/././define/instr_def.v.sv\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:19: Define or directive not defined: \'`OP_BEQ\'\n    if((OP_id ==`OP_BEQ && (rf_rd1 != rf_rd2)) ||\n                ^~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:19: syntax error, unexpected &&, expecting TYPE-IDENTIFIER\n    if((OP_id ==`OP_BEQ && (rf_rd1 != rf_rd2)) ||\n                        ^~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:20: Define or directive not defined: \'`OP_BNE\'\n      (OP_id == `OP_BNE && (rf_rd1 == rf_rd2)) ||\n                ^~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:21: Define or directive not defined: \'`OP_BLEZ\'\n      (OP_id == `OP_BLEZ && (!rf_rd1[31] && rf_rd1 != 32\'b0))||\n                ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:22: Define or directive not defined: \'`OP_BGTZ\'\n      (OP_id == `OP_BGTZ && (rf_rd1[31] || rf_rd1 == 32\'b0)) ||\n                ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:23: Define or directive not defined: \'`OP_BLTZ\'\n      (OP_id == `OP_BLTZ && (rt_id == 5\'b0 && !rf_rd1[31])) ||   \n                ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:24: Define or directive not defined: \'`OP_BGEZ\'\n      (OP_id == `OP_BGEZ && (rt_id != 5\'b0 && rf_rd1[31])))  \n                ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:31: syntax error, unexpected else\n    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||\n    ^~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:31: Define or directive not defined: \'`OP_BEQ\'\n    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||\n                     ^~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:31: Define or directive not defined: \'`OP_BNE\'\n    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||\n                                         ^~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:31: Define or directive not defined: \'`OP_BLEZ\'\n    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||\n                                                             ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:31: Define or directive not defined: \'`OP_BGTZ\'\n    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||\n                                                                                  ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:32: Define or directive not defined: \'`OP_BLTZ\'\n      OP_if == `OP_BLTZ || OP_if == `OP_BGEZ)\n               ^~~~~~~~\n%Error: data/full_repos/permissive/123304708/src/control/branch_jump_ctrl.v:32: Define or directive not defined: \'`OP_BGEZ\'\n      OP_if == `OP_BLTZ || OP_if == `OP_BGEZ)\n                                    ^~~~~~~~\n%Error: Cannot continue\n'
module branch_jump_ctrl(
  input [5:0] OP_if,
  input [5:0] OP_id,
  input [4:0] rt_id,
  input [31:0] rf_rd1,
  input [31:0] rf_rd2,
  input [1:0] Jump,
  
  output reg[1:0] Branch,
  output reg IF_flush
  );

  always@(*)
  begin


    if((OP_id ==`OP_BEQ && (rf_rd1 != rf_rd2)) ||
      (OP_id == `OP_BNE && (rf_rd1 == rf_rd2)) ||
      (OP_id == `OP_BLEZ && (!rf_rd1[31] && rf_rd1 != 32'b0))||
      (OP_id == `OP_BGTZ && (rf_rd1[31] || rf_rd1 == 32'b0)) ||
      (OP_id == `OP_BLTZ && (rt_id == 5'b0 && !rf_rd1[31])) ||
      (OP_id == `OP_BGEZ && (rt_id != 5'b0 && rf_rd1[31])))
    begin
      Branch = 2'b10;
      IF_flush = 1;
    end
    

    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||
      OP_if == `OP_BLTZ || OP_if == `OP_BGEZ)
    begin
      Branch = 2'b01; 
      IF_flush = 0;
    end
    else 
    begin
      Branch = 2'b00;
      IF_flush = 0;
    end
      

    if(Jump == 2'b01)
      IF_flush = 1;
    else
      IF_flush = 0;
  end
  
endmodule
module branch_jump_ctrl(
  input [5:0] OP_if,
  input [5:0] OP_id,
  input [4:0] rt_id,
  input [31:0] rf_rd1,
  input [31:0] rf_rd2,
  input [1:0] Jump,
  
  output reg[1:0] Branch,
  output reg IF_flush
  );


  always@(*)
  begin


    if((OP_id ==`OP_BEQ && (rf_rd1 != rf_rd2)) ||
      (OP_id == `OP_BNE && (rf_rd1 == rf_rd2)) ||
      (OP_id == `OP_BLEZ && (!rf_rd1[31] && rf_rd1 != 32'b0))||
      (OP_id == `OP_BGTZ && (rf_rd1[31] || rf_rd1 == 32'b0)) ||
      (OP_id == `OP_BLTZ && (rt_id == 5'b0 && !rf_rd1[31])) ||
      (OP_id == `OP_BGEZ && (rt_id != 5'b0 && rf_rd1[31])))
    begin
      Branch = 2'b10;
      IF_flush = 1;
    end
    

    else if(OP_if == `OP_BEQ || OP_if == `OP_BNE || OP_if == `OP_BLEZ || OP_if == `OP_BGTZ ||
      OP_if == `OP_BLTZ || OP_if == `OP_BGEZ)
    begin
      Branch = 2'b01; 
      IF_flush = 0;
    end
    else 
    begin
      Branch = 2'b00;
      IF_flush = 0;
    end
      

    if(Jump == 2'b01)
      IF_flush = 1;
    else
      IF_flush = 0;
  end
  
endmodule