data/full_repos/permissive/430026064/hazard_detection_unit.v
data/verilator_xmls/6ca50b4c-9813-432a-8bc4-298dacfd356a.xml
module hazard_detection_unit(
  input id_ex_mem_rd,
  input [4:0] id_ex_reg_rd,
  input [4:0] if_id_reg_rs1,
  input [4:0] if_id_reg_rs2,
  output reg is_stall
);
  
  initial begin 
  	is_stall = 0;
  end
  
  
  always@(*) begin
    if (id_ex_mem_rd && ((id_ex_reg_rd == if_id_reg_rs1) || (id_ex_reg_rd == if_id_reg_rs2))) begin 
      $display("is_stall = 1");
      is_stall = 1; 
    end
    else begin 

      is_stall = 0; 
    end
  end
endmodule
module hazard_detection_unit(
  input id_ex_mem_rd,
  input [4:0] id_ex_reg_rd,
  input [4:0] if_id_reg_rs1,
  input [4:0] if_id_reg_rs2,
  output reg is_stall
);

  
  initial begin 
  	is_stall = 0;
  end
  
  
  always@(*) begin
    if (id_ex_mem_rd && ((id_ex_reg_rd == if_id_reg_rs1) || (id_ex_reg_rd == if_id_reg_rs2))) begin 
      $display("is_stall = 1");
      is_stall = 1; 
    end
    else begin 

      is_stall = 0; 
    end
  end
endmodule