Filter simv command-line args starting with -cm
These confuse HTIF, so don't pass them through. Contributed by @scottj97.
This commit is contained in:
parent
cf1bd90a70
commit
2dfcf18167
@ -6,6 +6,27 @@
|
|||||||
|
|
||||||
dtm_t* dtm;
|
dtm_t* dtm;
|
||||||
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// Remove args that will confuse dtm, such as those that require two tokens, like VCS code coverage "-cm line+cond"
|
||||||
|
std::vector<std::string> filter_argv_for_dtm(int argc, char** argv)
|
||||||
|
{
|
||||||
|
std::vector<std::string> out;
|
||||||
|
for (int i = 1; i < argc; ++i) { // start with 1 to skip my executable name
|
||||||
|
if (!strncmp(argv[i], "-cm", 3)) {
|
||||||
|
++i; // skip this one and the next one
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out.push_back(argv[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" int debug_tick
|
extern "C" int debug_tick
|
||||||
(
|
(
|
||||||
unsigned char* debug_req_valid,
|
unsigned char* debug_req_valid,
|
||||||
@ -23,7 +44,7 @@ extern "C" int debug_tick
|
|||||||
s_vpi_vlog_info info;
|
s_vpi_vlog_info info;
|
||||||
if (!vpi_get_vlog_info(&info))
|
if (!vpi_get_vlog_info(&info))
|
||||||
abort();
|
abort();
|
||||||
dtm = new dtm_t(std::vector<std::string>(info.argv + 1, info.argv + info.argc));
|
dtm = new dtm_t(filter_argv_for_dtm(info.argc, info.argv));
|
||||||
}
|
}
|
||||||
|
|
||||||
dtm_t::resp resp_bits;
|
dtm_t::resp resp_bits;
|
||||||
|
Loading…
Reference in New Issue
Block a user