diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-07-14 11:20:55 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-07-14 11:20:55 +0200 |
commit | f99cd747dae83c29d1df6e6eb2c5019854f084f7 (patch) | |
tree | 86bb35ff9bb4f9e82f7041e74eeb8c1bd81b3770 /picorv32.v | |
parent | 2bc93eb8d048f855ffccde23eff583e98430e209 (diff) | |
download | picorv32-f99cd747dae83c29d1df6e6eb2c5019854f084f7.tar.gz picorv32-f99cd747dae83c29d1df6e6eb2c5019854f084f7.zip |
Suppress writes to cpuregs[0] to prevent confusion
Diffstat (limited to 'picorv32.v')
-rw-r--r-- | picorv32.v | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -190,7 +190,7 @@ module picorv32 #( endtask `ifdef DEBUGREGS - wire [31:0] dbg_reg_x0 = cpuregs[0]; + wire [31:0] dbg_reg_x0 = 0; wire [31:0] dbg_reg_x1 = cpuregs[1]; wire [31:0] dbg_reg_x2 = cpuregs[2]; wire [31:0] dbg_reg_x3 = cpuregs[3]; @@ -1301,7 +1301,7 @@ module picorv32 #( end always @(posedge clk) begin - if (resetn && cpuregs_write) + if (resetn && cpuregs_write && latched_rd) cpuregs[latched_rd] <= cpuregs_wrdata; end |