aboutsummaryrefslogtreecommitdiff
path: root/riscv/processor.h
diff options
context:
space:
mode:
authordave-estes-syzexion <53795406+dave-estes-syzexion@users.noreply.github.com>2019-09-18 14:14:56 -0400
committerChih-Min Chao <chihmin.chao@sifive.com>2019-09-29 22:27:14 -0700
commit66c4933e1a23c4504188f391ffc4886de09f9e91 (patch)
tree51f8601bda035cb97f62ea5d4f3ab5c6134519af /riscv/processor.h
parentf353f81f6279ee0b51b778f68abf9bfb682f7264 (diff)
downloadspike-66c4933e1a23c4504188f391ffc4886de09f9e91.zip
spike-66c4933e1a23c4504188f391ffc4886de09f9e91.tar.gz
spike-66c4933e1a23c4504188f391ffc4886de09f9e91.tar.bz2
Adds --log-commits commandline option. (#323)
* 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.
Diffstat (limited to 'riscv/processor.h')
-rw-r--r--riscv/processor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/riscv/processor.h b/riscv/processor.h
index 688b3a1..99fbd37 100644
--- a/riscv/processor.h
+++ b/riscv/processor.h
@@ -300,6 +300,8 @@ public:
void set_debug(bool value);
void set_histogram(bool value);
+ void set_log_commits(bool value);
+ bool get_log_commits() { return log_commits_enabled; }
void reset();
void step(size_t n); // run for n cycles
void set_csr(int which, reg_t val);
@@ -439,6 +441,7 @@ private:
reg_t max_isa;
std::string isa_string;
bool histogram_enabled;
+ bool log_commits_enabled;
bool halt_on_reset;
std::vector<insn_desc_t> instructions;