Jerry Zhao
4d4159e76d
Pull memif_endianness_t into cfg.h
3 years ago
Jerry Zhao
ebc9367677
Add cfg.cc to hold internal implementation of mem_cfg_t
3 years ago
Andrew Waterman
d00c01d2af
Merge pull request #1175 from riscv-software-src/fix-mac-build
Fix build on M1
3 years ago
Andrew Waterman
f1c0a947be
Fix build on M1
https://github.com/riscv-software-src/riscv-isa-sim/pull/1173 introduced
a link error on M1. Fix it.
3 years ago
Andrew Waterman
291188f59c
Merge pull request #1169 from ucb-bar/socketif
Move boost asio socket interface to socketif_t
3 years ago
Jerry Zhao
68a3039598
Move boost asio socket interface to socketif_t
This reduces dependencies on config.h in sim.h
3 years ago
Andrew Waterman
572d5e4409
Merge pull request #1173 from ucb-bar/splitvu
Split vectorUnit into separate source/header files
3 years ago
Jerry Zhao
02d4a3f803
Make the processor_t interface independent of configure'd variables ( #1174 )
* Make the interface to processor_t static
* Move no-commitlog-enabled warning to processor_t
This is in case future user calls processor_t->enable_log_commits()
without going through sim_t.
3 years ago
Jerry Zhao
18b8c02b25
Pull vector unit into separate source/header
3 years ago
Jerry Zhao
d043952c8b
Pull p/v_ext_macros.h out of decode.h
3 years ago
Jerry Zhao
e5f6307033
Add Emacs lockfiles to .gitignore ( #1171 )
Signed-off-by: Jerry Zhao <jerryz123@berkeley.edu>
Signed-off-by: Jerry Zhao <jerryz123@berkeley.edu>
3 years ago
Andrew Waterman
921d56ca7a
Merge pull request #1160 from YenHaoChen/pr-textra
Implement textra (tdata3) of triggers
3 years ago
Scott Johnson
b2e6e7637e
Move mhselect_compare into mhselect_interpretation
3 years ago
Scott Johnson
ef5609525f
Use interpret_mhselect() to decide textra compare mode
3 years ago
Scott Johnson
88cfdf2972
Interpret mhselect in centralized place
And use that for legalize_mhselect(). Not using the second and third
fields yet.
3 years ago
YenHaoChen
f94ba5f423
triggers: add mcontext and hcontext CSRs
3 years ago
YenHaoChen
f6f1509ad0
triggers: add scontext CSR
3 years ago
YenHaoChen
8318edfb5f
triggers: checking textra (tdata3); checking ASID and VMID
3 years ago
YenHaoChen
a0fdc2b225
triggers: implement tdata3 CSR fields
3 years ago
YenHaoChen
8ce096c6aa
refactor: add tdata3_csr_t; preparation for CSR textra
3 years ago
YenHaoChen
b035edab78
refactor: remove proc parameter from functions of module_t
3 years ago
Andrew Waterman
adfaef00e5
Merge pull request #1162 from riscv-software-src/sfence
SFENCE.W.INVAL and SFENCE.INVAL.IR should check privilege mode
3 years ago
Andrew Waterman
b09a4dc2ae
Merge pull request #1161 from riscv-software-src/snprintf
Avoid use of sprintf
3 years ago
Andrew Waterman
9dc874288c
Avoid use of sprintf in disassembler
None of these cases are perf-critical.
It was easy to change one of them to use std::string, but the others
would have required more refactoring. So, simply change them to use
snprintf instead.
3 years ago
Andrew Waterman
69bfc02618
Avoid use of sprintf in trap_t
3 years ago
Andrew Waterman
bc16208aa5
SFENCE.INVAL.IR and SFENCE.W.INVAL are illegal in [V]U modes
See discussion on https://lists.riscv.org/g/tech-privileged/message/1213
3 years ago
Andrew Waterman
263af1d153
Simplify implementation of SFENCE.W.INVAL
For Spike, this instruction merely performs exception checks, just like
SFENCE.INVAL.IR. So, implement it in terms of SFENCE.INVAL.IR.
3 years ago
Scott Johnson
27caa02e7d
Merge pull request #1155 from YenHaoChen/pr-h-not-const
hypervisor extension does not hardwire misa.H
3 years ago
YenHaoChen
200ee39b7a
clear mevent.VUINH and mevent.VSINH when misa.H is cleared
3 years ago
YenHaoChen
af99d52f25
add macro N_HPMCOUNTERS (29)
3 years ago
YenHaoChen
1a7e9af460
use extension_enabled('H') instead of extension_enabled_const('H') since misa.H is RW
The masked_csr_t does not meet the behavior of mevent
because the misa.H is not read-only (hardwired).
h/t @kwalker27
reported at https://github.com/riscv-software-src/riscv-isa-sim/pull/1154
3 years ago
YenHaoChen
e878eee235
refactor: add custom CSR class, mevent_csr_t
The masked_csr_t does not meet the behavior of mevent
because the misa.H is not read-only (hardwired).
(fix in the next commit)
h/t @kwalker27
reported at https://github.com/riscv-software-src/riscv-isa-sim/pull/1154
3 years ago
Andrew Waterman
55c90c6561
Make require_novirt macro an expression, not a statement
This improves composability by allowing its use in other expressions.
3 years ago
Andrew Waterman
2d70e7f166
For trap_t::name, return an std::string instead of a C string
This is not a performance-critical case, since this method is invoked
only when printing the log and when an exception occurs in the target.
This works towards eliminating all uses of sprintf. I could have simply
switched to snprintf, but this path seems cleaner.
3 years ago
Scott Johnson
120d070680
Merge pull request #1158 from scottj97/trigger-cleanup
Minor trigger cleanup
3 years ago
Scott Johnson
49ccab0fcf
Remove unused constructor arg from match_result_t
3 years ago
Scott Johnson
4b792f570d
Remove no-longer-used match_result_t.fire
3 years ago
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