pulp-platform / riscv-dbg

RISC-V Debug Support for our PULP RISC-V Cores
Other
197 stars 70 forks source link

dmcontrol.haltreq should always read as 0 #161

Open bcstrongx opened 1 month ago

bcstrongx commented 1 month ago

The RISC-V spec (v0.13.2, here) defines the dmcontrol.haltreq bit with access "W" (Section 3.12.2), which is defined as "Write-only. When read this field returns 0" (Table 1.2). However, the current implementation allows this bit to be read as 1 after a write sets it to 1.

Any easy fix might be to mask off the top bit of the read value in dm_csrs.sv: dm::DMControl: resp_queue_inp.data = dmcontrol_q;