diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-09 09:25:48 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-09 09:25:48 -0600 |
| commit | 5d798386c3b1c1dc45a2fbc382c9367ccc27c524 (patch) | |
| tree | a04fff74505af30c8044f80f523fd887331e6234 /rtl/core/control/cycles.sv | |
| parent | 65590be80332d132d7037bfe3bb19e5d6e5bcd7b (diff) | |
Implement reset
Diffstat (limited to 'rtl/core/control/cycles.sv')
| -rw-r--r-- | rtl/core/control/cycles.sv | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rtl/core/control/cycles.sv b/rtl/core/control/cycles.sv index f6bc517..0a70d5e 100644 --- a/rtl/core/control/cycles.sv +++ b/rtl/core/control/cycles.sv @@ -3,6 +3,7 @@ module core_control_cycles ( input logic clk, + rst_n, mul, ldst, bubble, @@ -61,10 +62,7 @@ module core_control_cycles end end - always_ff @(posedge clk) - cycle <= next_cycle; - - initial - cycle = ISSUE; + always_ff @(posedge clk or negedge rst_n) + cycle <= !rst_n ? ISSUE : next_cycle; endmodule |
