mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-24 14:09:08 -04:00
[rtl] Ignore LSB only for writes to dpc
Without this commit, writes to `dpc` with the LSB set are completely ignored. This commit changes the implementation to ignore the LSB only. This is the same behavior as seen required for `mepc`. This resolves lowRISC/ibex#444. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit is contained in:
parent
9b390c5d4e
commit
d538261c78
1 changed files with 2 additions and 6 deletions
|
@ -459,12 +459,8 @@ module ibex_cs_registers #(
|
|||
dcsr_d.zero2 = 12'h0;
|
||||
end
|
||||
|
||||
CSR_DPC: begin
|
||||
// Only valid PC addresses are allowed (half-word aligned with C ext.)
|
||||
if (csr_wdata_int[0] == 1'b0) begin
|
||||
depc_d = csr_wdata_int;
|
||||
end
|
||||
end
|
||||
// dpc: debug program counter
|
||||
CSR_DPC: depc_d = {csr_wdata_int[31:1], 1'b0};
|
||||
|
||||
CSR_DSCRATCH0: dscratch0_d = csr_wdata_int;
|
||||
CSR_DSCRATCH1: dscratch1_d = csr_wdata_int;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue