data/full_repos/permissive/472385934/hazard_handle.v
data/verilator_xmls/d0294ac7-00d0-4a08-9de2-80249e79c559.xml
module forward_unit(
input [4:0]baseM,baseW,
input [4:0]rs,rt,
input ctrM,ctrW,
output reg [1:0]forwardA,forwardB);

always@(*) begin
    if((rs!=0)&&(rs==baseM)&&ctrM)
        forwardA = 2'b01;
    else if ((rs!=0)&&(rs==baseW)&&ctrW)
        forwardA = 2'b10;
    else
        forwardA = 2'b00;
end

always@(*) begin
    if((rt!=0)&&(rt==baseM)&&ctrM)
        forwardB = 2'b01;
    else if ((rt!=0)&&(rt==baseW)&&ctrW)
        forwardB = 2'b10;
    else
        forwardB = 2'b00;
end
endmodule
module forward_unit(
input [4:0]baseM,baseW,
input [4:0]rs,rt,
input ctrM,ctrW,
output reg [1:0]forwardA,forwardB);


always@(*) begin
    if((rs!=0)&&(rs==baseM)&&ctrM)
        forwardA = 2'b01;
    else if ((rs!=0)&&(rs==baseW)&&ctrW)
        forwardA = 2'b10;
    else
        forwardA = 2'b00;
end

always@(*) begin
    if((rt!=0)&&(rt==baseM)&&ctrM)
        forwardB = 2'b01;
    else if ((rt!=0)&&(rt==baseW)&&ctrW)
        forwardB = 2'b10;
    else
        forwardB = 2'b00;
end
endmodule