Age | Commit message (Collapse) | Author | Files | Lines |
|
The scheme was based on the notion that memory accesses are idempotent
up until the point the trigger would've been hit, which isn't true in
the case of side-effecting loads and data-value triggers.
Instead, check the trigger on the next instruction fetch. To keep the
perf overhead minimal, perform this check on the I$ refill path, and
ensure that path is taken by flushing the I$.
|
|
|
|
|
|
execute.cc, entropy_source.h and v_ext_macros.h
|
|
|
|
When WFI was changed to throw a C++ exception, the special-npc
signaling became obsolete.
|
|
Now that logic only affects ebreak instructions, and does not affect
triggers that also cause a trap to be taken.
Fixes #725. Although like Paul, I don't have a test for this case.
Introduce trap_debug_mode so so ebreak instructions can force entry into
debug mode.
|
|
This fix print x5 as "x5 ", instead of "x 5".
|
|
|
|
|
|
Created a new triggers::module_t to hold the structure.
Also make sure mcontrol_t instances are properly initialized.
|
|
These actions are not specific to the mcontrol trigger.
|
|
|
|
Before this change, the MCYCLE CSR was just a proxy for MINSTRET.
Similarly, CYCLE was a proxy for INSTRET. This models a machine where
every instruction takes exactly one cycle to execute.
That's not quite precise enough if you want to do cosimulation: there,
you're going to want to MCYCLE to actually match the behaviour of your
processor (because you need reads from the relevant CSRs to give the
expected result).
This commit splits the two CSRs, leaving the other proxy relationships
unchanged. The code in processor_t::step() which bumps MINSTRET now
bumps MCYCLE by the same amount, maintaining the previous behaviour.
Of course, now a cosimulation environment can update the value of
MCYCLE to fix things up for multi-cycle instructions after they run.
|
|
|
|
So I can fix breakpoints next to properly report gva.
|
|
Improves log because it now shows "trap_breakpoint" instead of "trap #3".
|
|
Adds commit log events for vl to many vector instructions.
|
|
|
|
This is a little messy in RV32 since it's accessed via two different
CSRs (upper and lower halves).
This changes logging of mcycle[h] to log a change to minstret[h],
since that's how it's always been implemented in Spike. There is no
separate mcycle register.
|
|
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
With recent compilers on recent computers, the much simpler version of
the code is actually slightly faster. I suspect, but haven't proven,
that more accurate indirect jump prediction is the main explanation.
Reduced I$ pressure might be a secondary factor.
|
|
Resolves #642
|
|
See https://github.com/riscv/riscv-isa-manual/issues/189#issuecomment-768525017
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
To avoid handling inconsistent csr status when running with reference design
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
* Adding symbol lookup when --enable-commitlog is enabled
* Removed the #ifdef RISCV_ENABLE_COMMITLOG for all get_symbol related function
Only retained the in processor.cc where it is called.
Co-authored-by: Shajid Thiruvathodi <sthiruva@valtrix.in>
|
|
* Add core id to lines generated by --log-commits
* Fixing the format specifier for cpuid in log-commits
Co-authored-by: Shajid Thiruvathodi <sthiruva@valtrix.in>
|
|
With hypervisor extension, we have more CSRs providing trap
related information. We extend existing trap classes to pass
additional trap information required by hypervisor extension.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
|
|
For csr register access instructions, there are log like
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
This patch adds a --log argument to spike. If not given, the behaviour
is unchanged: messages logging execution of instructions and (if
commit logging is enabled) commits go to stderr.
If --log=P is given, Spike now writes these messages to a log file at
the path P. This is nice, because they are no longer tangled up with
other errors and warnings.
The code is mostly plumbing: passing a FILE* object through to the
functions that were using stderr. I've written a simple "log_file_t"
class, which opens a log file if necessary and yields it or stderr.
|
|
1. store_fault_access
reorder the log and slow_path code
2. misaligned_access
reset the log buffer in the beginning rather at the end of execution to
avoid that uncompleted execution status is brought to the next
instruction
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
1. don't duplicate vconfig for lmul >=2 case
2. add l# to show prenset vl value
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
1. use hash to keep duplicated register write since vector has lmul
feature
2. enhance print fuction to support type larger than 64bit
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
use vector to store memory accesses
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
|
|
* Extends the commit log feature with memory writes.
This provides a little more information for debugging instruction
traces, allowing you to maintain the state of memory as the trace
is processed.
The following sample trace output illustrates the formatting of
the new memory writes. The first line is an instruction at
location 0x80000094, containing the bytes (0x80830313) and
commiting the value 0x80000898 to the register x6. The second
line is an instruction which neither commits a register nor
writes memory. The third line writes the value 0x0 to
0x80000890.
3 0x80000094 (0x80830313) x 6 0x80000898
3 0x80000098 (0x0062d663)
3 0x8000009c (0x00028023) mem 0x80000890 0x0
* Changes addressing feedback from review.
|
|
* Adds --log-commits commandline option.
Similar to histogram support, the commit logging feature must be
enabled with a configure option: --enable-commitlog. However, unlike
that feature, there was no way to turn off the logging with a
commandline option once the functionality was built in. This (git)
commit provides that abilty.
* Changes addressing review feedback.
|
|
In the previous scheme, debug-mode software could exit debug mode by
zeroing the dcsr.cause field. While benign, that behavior is out of
spec.
|
|
add command to show vector register in debug mode
Signed-off-by: Bruce Hoult <bruce@hoult.org>
|