diff options
Diffstat (limited to 'rtl/core/porch')
| -rw-r--r-- | rtl/core/porch/porch.sv | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/rtl/core/porch/porch.sv b/rtl/core/porch/porch.sv index 6f5caf7..2eec438 100644 --- a/rtl/core/porch/porch.sv +++ b/rtl/core/porch/porch.sv @@ -3,6 +3,7 @@ module core_porch ( input logic clk, + rst_n, flush, stall, input psr_flags flags, @@ -35,8 +36,12 @@ module core_porch dec.ctrl.conditional = !flush && (dec.ctrl.conditional || conditional); end - always @(posedge clk) - if(!stall) begin + always_ff @(posedge clk or negedge rst_n) + if(!rst_n) begin + insn <= `NOP; + insn_pc <= 0; + hold_dec <= nop; + end else if(!stall) begin insn <= fetch_insn; hold_dec <= fetch_dec; @@ -44,10 +49,4 @@ module core_porch insn_pc <= fetch_insn_pc; end - initial begin - insn = `NOP; - insn_pc = 0; - hold_dec = nop; - end - endmodule |
