diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-09-27 15:16:07 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-09-27 15:16:07 -0600 |
| commit | ec7649eef16c7f9c3ca4b74a1cea95eb2f524b29 (patch) | |
| tree | 505a5fb945a4db50d7b4acd2fb92b45df6551220 /rtl/core/regs/file.sv | |
| parent | 583a1ebaafe285c223afbfcc60bb68e6c10174ca (diff) | |
Fix branching bugs
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/regs/file.sv | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rtl/core/regs/file.sv b/rtl/core/regs/file.sv index e2bcc09..b2dd634 100644 --- a/rtl/core/regs/file.sv +++ b/rtl/core/regs/file.sv @@ -18,9 +18,9 @@ module core_reg_file assign rd_value = overwrite_hold ? wr_value_hold : q; - always @(posedge clk) begin + always @(negedge clk) begin if(wr_enable) begin - file[rd_index] <= wr_value; + file[wr_index] <= wr_value; wr_value_hold <= wr_value; end |
