Scott Johnson
1327dc6f6e
Use std::optional for detect_trap_match in trigger_t hierarchy
Goal is to remove match_result_t.fire field to eliminate dont-care
fields.
3 years ago
Scott Johnson
a078ef221f
Convert triggers::module_t::detect_trap_match to std::optional
Goal is to remove match_result_t.fire field to eliminate dont-care fields.
3 years ago
Scott Johnson
aa5c5a6e03
Remove unnecessary logical-or
We know chain_ok is false because we just tested it.
3 years ago
Scott Johnson
849ec1e129
Use std::optional for detect_memory_access_match in trigger_t hierarchy
Goal is to remove match_result_t.fire field to eliminate dont-care
fields.
3 years ago
Scott Johnson
a315193ab0
Convert triggers::module_t::detect_memory_access_match to std::optional
Goal is to remove match_result_t.fire field to eliminate dont-care
fields when fire=false.
3 years ago
Scott Johnson
024533d921
Extract common method for legalizing trigger action field
3 years ago
Scott Johnson
35803393d9
Add noexcept to trigger-matching functions
To make it clear that breakpoint exceptions are not thrown in these
methods.
3 years ago
Scott Johnson
9b6138a1b6
Remove no-longer-useful trigger_with_tdata2_t
3 years ago
Scott Johnson
a0baf8c02f
Move tdata2 into parent class
Since all triggers currently implemented have tdata2.
3 years ago
Scott Johnson
39c3b25400
Merge pull request #1128 from YenHaoChen/pr-itrigger-etrigger
Implement itrigger and etrigger
3 years ago
YenHaoChen
7d05c34756
triggers: s and u of mcontrol dependents on extension support
3 years ago
YenHaoChen
7965f25acb
triggers: legalize mcontrol.action
3 years ago
YenHaoChen
7c208a6292
triggers: add debug log of trigger action
3 years ago
YenHaoChen
bbaad7a422
triggers: refactor: rename memory_access_match() to detect_memory_access_match()
3 years ago
YenHaoChen
8da8a8c89a
triggers: add etrigger_t
3 years ago
YenHaoChen
8ffff21ac6
triggers: add itrigger_t
add module_t::trap_taking_match and trigger_t::trap_taking_match for
checking itrigger after taking traps
3 years ago
YenHaoChen
c87b2cbe33
triggers: refactor: add action_t::ACTION_MAXVAL
3 years ago
YenHaoChen
94752bc430
refactor: let trap_t::cause() be const function
3 years ago
YenHaoChen
a3474ac8e1
triggers: refactor: add take_trigger_action() to processor.h/processor.cc
3 years ago
YenHaoChen
e0e1f2036f
triggers: hardware should ignore writes that set dmode to 1 if the previous trigger has both dmode of 0 and chain of 1
3 years ago
YenHaoChen
997da68cbe
triggers: hardware must zero chain in writes that set dmode to 0 if the next trigger has dmode of 1
3 years ago
Andrew Waterman
c28da4364e
Merge pull request #1150 from aap-sc/aap-sc/mem_merge_refactoring
Reimplement memory merging routines
3 years ago
Parshintsev Anatoly
1f920f914b
Reimplement memory merging routines
This commit simplifies the codebase by factoring out memory merging and
intersection checking routines into separate functions. This allows us
to check for corner cases more easily.
4 years ago
YenHaoChen
8b7e11ff04
triggers: refactor: remove obsolete checking of debug_mode in disabled_trigger_t::tdata1_write()
3 years ago
YenHaoChen
07530cb3c5
triggers: refactor: use CSR_MCONTROL_DMODE(xlen) instead of MCONTROL_DMODE(xlen)
3 years ago
YenHaoChen
634d18bb70
triggers: dmode only writable from debug mode
3 years ago
YenHaoChen
cb7ba04f4b
triggers: refactor: use modern C++ loop
3 years ago
YenHaoChen
85657e8e61
triggers: refactor: reorder functions in module_t for consistency
3 years ago
YenHaoChen
25a567ce7a
triggers: make disabled_trigger_t as default trigger
3 years ago
YenHaoChen
88b7aab655
triggers: refactor: use CSR_TDATA1_TYPE_MCONTROL instead of MCONTROL_TYPE_MATCH for consistency
3 years ago
YenHaoChen
1b13e942d2
triggers: refactor: add assertions for mcontrol.type checking
3 years ago
YenHaoChen
414a9c11e4
triggers: add disabled_trigger_t
3 years ago
YenHaoChen
b3ab18867e
triggers: mcontrol does not support VS and VU modes
3 years ago
YenHaoChen
97e7887de5
triggers: refactor: remove return value of mcontrol_t::tdata1_write(...) and trigger_with_tdata2_t::tdata2_write(...)
Write ignorance, i.e. dmode and chain, are checked in module_t
3 years ago
YenHaoChen
67e6112b03
triggers: refactor: move dmode checking of tdata2 to module_t for consistency
3 years ago
YenHaoChen
a399d65d9f
triggers: refactor: let action be part of match_result_t
3 years ago
YenHaoChen
b81652954e
triggers: refactor: let match_result_t be a struct with fire and timing variables
Mapping of previous and revised match_result_t data type:
-------------------------------------------
Previous Revised
MATCH_NONE fire=false (don't care timing)
MATCH_MATCH_FIRE_BEFORE fire=true,timing=TIMING_BEFORE
MATCH_MATCH_FIRE_AFTER fire=true,timing=TIMING_AFTER
3 years ago
YenHaoChen
e359d95285
update debug_defines.h
3 years ago
Tim Newsome
13dbbb2de3
trigger_t: Protect destructor and memory_access_match()
3 years ago
Tim Newsome
3bc519294f
triggers: Move trigger_t.hit to mcontrol_t.hit
3 years ago
Tim Newsome
43f54c057f
triggers: Access action bit through get_action()
3 years ago
Tim Newsome
2e9ec96a7a
triggers: rename chain
chain() -> get_chain()
chain_bit -> chain
3 years ago
YenHaoChen
03ec7e1b93
triggers: refactor: move dmode checking of tdata1 to module_t
The tdata1.dmode is defined at the same level of tdata1.type. As a
result, all triggers has a tdata1.dmode field (even the disabled
trigger).
With the above consideration, we move the tdata1.dmode checking and
setting to the same level of tdata1.type, i.e., in module_t.
3 years ago
Tim Newsome
5d51920dee
triggers: Rename/move dmode
dmode() -> get_dmode()
trigger_t.dmode_bit -> mcontrol_t.dmode
3 years ago
Tim Newsome
3aec432e12
triggers: rename store
store() -> get_store()
store_bit -> store
3 years ago
Tim Newsome
9b7f1a8642
Triggers: rename load
load() -> get_load()
load_bit -> load
3 years ago
Andrew Waterman
70f8aa01b8
Merge pull request #1156 from plctlab/plct-zce-fix
Fix support for Zc*
3 years ago
Weiwei Li
4174bcf4d4
Restore fetch_jump_table to instruction fetch
3 years ago
Weiwei Li
519e383443
Fix field extract for jvt.base
3 years ago
Weiwei Li
09fdfc30c2
Fix type error in some platform
3 years ago