mirror of https://github.com/YosysHQ/picorv32.git
Suppress writes to cpuregs[0] to prevent confusion
This commit is contained in:
parent
2bc93eb8d0
commit
f99cd747da
|
@ -190,7 +190,7 @@ module picorv32 #(
|
||||||
endtask
|
endtask
|
||||||
|
|
||||||
`ifdef DEBUGREGS
|
`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_x1 = cpuregs[1];
|
||||||
wire [31:0] dbg_reg_x2 = cpuregs[2];
|
wire [31:0] dbg_reg_x2 = cpuregs[2];
|
||||||
wire [31:0] dbg_reg_x3 = cpuregs[3];
|
wire [31:0] dbg_reg_x3 = cpuregs[3];
|
||||||
|
@ -1301,7 +1301,7 @@ module picorv32 #(
|
||||||
end
|
end
|
||||||
|
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
if (resetn && cpuregs_write)
|
if (resetn && cpuregs_write && latched_rd)
|
||||||
cpuregs[latched_rd] <= cpuregs_wrdata;
|
cpuregs[latched_rd] <= cpuregs_wrdata;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue