Commit d61f4a71 authored by YenHaoChen's avatar YenHaoChen
Browse files

triggers: legalize timing=1(after) for load data trigger

As recommended in the debug spec table "Suggested Trigger Timings", to
avoid the footgun of replaying a load (which may have side effects) when
the breakpoint trap handler returns.

reference: https://github.com/riscv-software-src/riscv-isa-sim/pull/1208#issuecomment-1373035906

-----------------------------------------------------------------------

The legalize_timing() depends on select, execution, load, and store,
which are updated in the same function tdata1_write(). As a result,
reordering statements in the tdata1_write() may break the functionality.

Passing those variables as parameters to legalize_timing() does not
solve the problem. Thus, we give the original write value and the masks
of the variables to the legalize_timing(). This makes the legalization
function independent of the updating variables and resolves the issue.

reference: https://github.com/riscv-software-src/riscv-isa-sim/pull/1214
parent b8c2b26a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment