Skip to content

Commit

Permalink
Merge pull request riscv-software-src#1779 from rtwfroody/trigger_timing
Browse files Browse the repository at this point in the history
For mcontrol6, default to BEFORE timing.
  • Loading branch information
aswaterman authored Aug 30, 2024
2 parents 3f556d6 + a1506ec commit 3c5b1bb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion riscv/triggers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,14 @@ bool mcontrol_common_t::legalize_timing(reg_t val, reg_t timing_mask, reg_t sele
return TIMING_AFTER;
if (get_field(val, execute_mask))
return TIMING_BEFORE;
return get_field(val, timing_mask);
if (timing_mask) {
// Use the requested timing.
return get_field(val, timing_mask);
} else {
// For mcontrol6 you can't request a timing. Default to before since that's
// most useful to the user.
return TIMING_BEFORE;
}
}

reg_t mcontrol6_t::tdata1_read(const processor_t * const proc) const noexcept {
Expand Down

0 comments on commit 3c5b1bb

Please sign in to comment.