diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-04-05 20:07:10 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-04-05 20:07:10 +0200 |
commit | 299504df7e4882908e59fe7493fe133bf6271e8b (patch) | |
tree | 2bec45ffbbbaf252d0fbaa9a8889a97339f1a0fe /qtmips_cli/main.cpp | |
parent | 7becab88ae5287846299f22d291ccd44740fddbc (diff) | |
download | qtmips-299504df7e4882908e59fe7493fe133bf6271e8b.tar.gz qtmips-299504df7e4882908e59fe7493fe133bf6271e8b.tar.bz2 qtmips-299504df7e4882908e59fe7493fe133bf6271e8b.zip |
qtmips_cli: add option to report number of required cycles and stalls.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_cli/main.cpp')
-rw-r--r-- | qtmips_cli/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qtmips_cli/main.cpp b/qtmips_cli/main.cpp index e80670b..82296ed 100644 --- a/qtmips_cli/main.cpp +++ b/qtmips_cli/main.cpp @@ -65,6 +65,7 @@ void create_parser(QCommandLineParser &p) { p.addOption({{"trace-hi", "tr-hi"}, "Print HI register changes."}); p.addOption({{"dump-registers", "d-regs"}, "Dump registers state at program exit."}); p.addOption({"dump-cache-stats", "Dump cache statistics at program exit."}); + p.addOption({"dump-cycles", "Dump number of CPU cycles till program end."}); p.addOption({"dump-range", "Dump memory range.", "START,LENGTH,FNAME"}); p.addOption({"load-range", "Load memory range.", "START,FNAME"}); p.addOption({"expect-fail", "Expect that program causes CPU trap and fail if it doesn't."}); @@ -200,6 +201,8 @@ void configure_reporter(QCommandLineParser &p, Reporter &r, const SymbolTable *s r.regs(); if (p.isSet("dump-cache-stats")) r.cache_stats(); + if (p.isSet("dump-cycles")) + r.cycles(); QStringList fail = p.values("fail-match"); for (int i = 0; i < fail.size(); i++) { |