projects
/
riscv-isa-sim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an option (-l) to display a log of execution in non-interactive mode.
[riscv-isa-sim.git]
/
riscv
/
sim.cc
diff --git
a/riscv/sim.cc
b/riscv/sim.cc
index eb31f12d3b3a288c2311987959fecc1f550132aa..66bebb3b8cbf7bffe61ddba9fd226cf63bd9a7bc 100644
(file)
--- a/
riscv/sim.cc
+++ b/
riscv/sim.cc
@@
-71,6
+71,8
@@
reg_t sim_t::get_scr(int which)
int sim_t::run()
{
int sim_t::run()
{
+ if (!debug && log)
+ set_procs_debug(true);
while (htif->tick())
{
if (debug || ctrlc_pressed)
while (htif->tick())
{
if (debug || ctrlc_pressed)
@@
-123,6
+125,11
@@
void sim_t::set_debug(bool value)
debug = value;
}
debug = value;
}
+void sim_t::set_log(bool value)
+{
+ log = value;
+}
+
void sim_t::set_histogram(bool value)
{
histogram_enabled = value;
void sim_t::set_histogram(bool value)
{
histogram_enabled = value;