feat(npc): add mtrace

This commit is contained in:
xinyangli 2024-04-12 09:35:41 +08:00
parent 4c07b66093
commit 9f64a88f8d
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
12 changed files with 110 additions and 123 deletions

View file

@ -7,18 +7,16 @@ void Config::cli_parse(int argc, char **argv) {
->check(CLI::ExistingFile);
app.add_flag("!--no-bin", memory_file_binary,
"Memory file is in text format");
app.add_flag("--trace", do_trace, "Enable tracing");
app.add_option("--wav", wavefile, "output .vcd file path")
->check([=](const std::string &) {
if (!do_trace)
throw CLI::ValidationError(
"dependency", "You must turn on trace before specify wave file");
return std::string();
});
app.add_option("--wav", wavefile, "output .vcd file path");
app.add_option("-t", max_sim_time, "Max simulation timestep");
app.add_option("--diff-lib", lib_ref,
"Dynamic library file of difftest reference")
->check(CLI::ExistingFile);
app.add_flag("--mtrace", do_mtrace, "Enable memory tracing");
app.add_option(
"--mtrace-range", mtrace_ranges,
"Specify memory tracing range (default: 0x80000000-0x8fffffff)")
->delimiter(',');
try {
app.parse(argc, argv);