Browse Source

Fix trigger mcontrol.chain match issue #599 #627 (#1083)

The variable chain_ok is used to indicate if the current trigger
is suppressed by the trigger chain. A true value means the trigger
is either un-chained or matches all previous triggers in the chain,
and a false value means the trigger is chained and mismatches
previous triggers.

A false condition of variable chain_ok is missing. The false
condition should be mcontrol.chain=1 and not matching; otherwise,
the chain_ok=true (including initialization). The bug results in
issues #559 and #627.

Related issues:
- https://github.com/riscv-software-src/riscv-isa-sim/issues/599
- https://github.com/riscv-software-src/riscv-isa-sim/issues/627

This PR fixes the issues #559 and #627.
pull/1109/head
YenHaoChen 4 years ago
committed by GitHub
parent
commit
3c9cfac9b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      riscv/triggers.cc

2
riscv/triggers.cc

@ -176,7 +176,7 @@ match_result_t module_t::memory_access_match(action_t * const action, operation_
return result;
}
chain_ok = true;
chain_ok = result != MATCH_NONE || !triggers[i]->chain();
}
return MATCH_NONE;
}

Loading…
Cancel
Save