Avoid stall when actual branch
This commit is contained in:
@@ -26,7 +26,9 @@ module InstFetch (
|
|||||||
if (reset) begin
|
if (reset) begin
|
||||||
PC <= 32'h00000000;
|
PC <= 32'h00000000;
|
||||||
end else begin
|
end else begin
|
||||||
if (need_stall) begin
|
// Note: if the inst is branch followed by a load word, the stall of the load word
|
||||||
|
// will prevent the branch from jump
|
||||||
|
if (need_stall == 1'h1 && PC_branch == 1'h0) begin
|
||||||
PC <= PC;
|
PC <= PC;
|
||||||
end else begin
|
end else begin
|
||||||
if (PC_branch) begin
|
if (PC_branch) begin
|
||||||
|
|||||||
Reference in New Issue
Block a user