Tie off 1 or 2 LSBs of DPC depending on IALIGN

This commit is contained in:
Luke Wren 2021-07-23 23:09:03 +01:00
parent 115cb2c50f
commit 155d3ba554
1 changed files with 2 additions and 1 deletions

View File

@ -550,7 +550,8 @@ always @ (posedge clk or negedge rst_n) begin
if (enter_debug_mode) if (enter_debug_mode)
dpc <= mepc_in; dpc <= mepc_in;
else if (debug_mode && wen && addr == DPC) else if (debug_mode && wen && addr == DPC)
dpc <= update(dpc); // 1 or 2 LSBs are hardwired to 0, depending on IALIGN.
dpc <= update(dpc) & (~X0 << 2 - EXTENSION_C);
end end
end end