Skip to content

Commit

Permalink
Fix a bug about repeated writing
Browse files Browse the repository at this point in the history
  • Loading branch information
5265325 committed Sep 1, 2021
1 parent 4fc9ccd commit f81ea2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/cpu_axi_diff/vsrc/cpu.v
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,15 @@ exe_stage Exe_stage(
.rd_data (rd_data)
);


wire w_ena = rd_w_ena & fetched;

regfile Regfile(
.clk (clock),
.rst (reset),
.w_addr (rd_w_addr),
.w_data (rd_data),
.w_ena (rd_w_ena),
.w_ena (w_ena),

.r_addr1 (rs1_r_addr),
.r_data1 (r_data1),
Expand Down

0 comments on commit f81ea2c

Please sign in to comment.