aboutsummaryrefslogtreecommitdiff
path: root/riscv/triggers.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-10-14In triggers, use optional<data> instead of {has_data, data}Andrew Waterman1-5/+5
2022-10-05Merge pull request #1105 from YenHaoChen/pr-trigger-priorityAndrew Waterman1-3/+5
Fix trigger priority
2022-10-04Suppress most unused variable warningsAndrew Waterman1-1/+1
2022-10-04Fix trigger mcontrol.chain match issue #599 #627 (#1083)YenHaoChen1-1/+1
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.
2022-09-30Add has_data argument to trigger checking functionsYenHaoChen1-3/+5
The mcontrol trigger can select either address or data for checking. The The selection decides the priority of the trigger. For instance, the address trigger has a higher priority over the page fault, and the page fault has a higher priority over the data trigger. The previous implementation only has the checking functions for data trigger, which results in incorrect priority of address trigger. This commit adds a has_data argument to indicate address trigger and the priority of the trigger.
2022-09-15Initialize triggers using default member initializersScott Johnson1-7/+0
Instead of constructor member initializer lists, which require repeating the list of members, and cause ugly merge conflicts when the list of members changes.
2022-07-07remove multi blank linesWeiwei Li1-1/+0
2022-05-02Use MCONTROL_TYPE_MATCH macro instead of 2Tim Newsome1-1/+1
2022-05-02Implement mcontrol trigger hit bit.Tim Newsome1-0/+12
2022-04-22Remove mcontrol_t.hTim Newsome1-3/+1
It was removed from the spec a long time ago.
2022-04-22Remove maskmax as a variable.Tim Newsome1-2/+2
2022-04-22Remove mcontrol_t.type.Tim Newsome1-2/+2
It's not writable anyway.
2022-04-07Pass ref instead of pointer to trigger_updated()Tim Newsome1-2/+2
2022-04-07Add const to pointers where possible.Tim Newsome1-12/+12
2022-04-07Add module_t::~module_t()Tim Newsome1-0/+6
Also add virtual destructor trigger_t.
2022-04-05Abstract away access to load/store/execute bits.Tim Newsome1-12/+12
2022-04-05Make chain into chain() for all triggers.Tim Newsome1-5/+5
2022-04-05Make triggers::module_t::triggers private.Tim Newsome1-3/+6
2022-04-05Don't access triggers vector directly from csrs.cc.Tim Newsome1-0/+20
2022-04-05Move trigger match logic into triggers.ccTim Newsome1-32/+42
2022-04-05module_t::trigger_match -> memory_access_matchTim Newsome1-1/+1
2022-04-05Move mcontrol match logic into mcontrol_t.Tim Newsome1-61/+54
2022-04-05Give triggers::module_t its own processor_t*Tim Newsome1-1/+1
2022-04-05Move trigger_match() into triggers.Tim Newsome1-0/+84
2022-04-05Move tdata2 logic into trigger.Tim Newsome1-0/+12
There isn't much logic, but different trigger types will have different logic.
2022-04-05Turn unsupported mcontrol.match into a supported one.Tim Newsome1-1/+14
This way you cannot get the assert in mcontrol_t::simple_match() by writing an "incorrect" value to tdata1.
2022-03-30Move tdata1 write logic into triggers.Tim Newsome1-0/+25
2022-03-30Move tdata1 read logic into triggers.cc.Tim Newsome1-0/+22
2022-03-30Replace state.mcontrol with TM.triggers.Tim Newsome1-0/+14
Created a new triggers::module_t to hold the structure. Also make sure mcontrol_t instances are properly initialized.
2022-03-30Create triggers.cc, triggers.h.Tim Newsome1-0/+4