diff --git a/PipelineProcessor.srcs/sources_1/new/InstFetch.v b/PipelineProcessor.srcs/sources_1/new/InstFetch.v index 85f884a..94e044e 100644 --- a/PipelineProcessor.srcs/sources_1/new/InstFetch.v +++ b/PipelineProcessor.srcs/sources_1/new/InstFetch.v @@ -26,7 +26,9 @@ module InstFetch ( if (reset) begin PC <= 32'h00000000; 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; end else begin if (PC_branch) begin