code coverage cleanup
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
This commit is contained in:
parent
f331c0c801
commit
ce17da9a58
|
|
@ -3603,16 +3603,14 @@ void VerilatedContextImp::commandArgVl(const std::string& arg) {
|
||||||
// and the run can be reproduced by passing +verilator+seed+<that_value>.
|
// and the run can be reproduced by passing +verilator+seed+<that_value>.
|
||||||
if (u64 == 0) u64 = pickRandomSeed();
|
if (u64 == 0) u64 = pickRandomSeed();
|
||||||
randSeed(static_cast<int>(u64));
|
randSeed(static_cast<int>(u64));
|
||||||
} else if (0
|
} else if (commandArgVlString(arg, "+verilator+vpi+", str)) {
|
||||||
== std::strncmp(arg.c_str(), "+verilator+vpi+",
|
|
||||||
std::strlen("+verilator+vpi+"))) {
|
|
||||||
// With --vpi the generated --main (vl_load_vpi_libs) consumes this, so accept
|
// With --vpi the generated --main (vl_load_vpi_libs) consumes this, so accept
|
||||||
// it silently here. Without --vpi there is no loader, so warn it is ignored.
|
// it silently here. Without --vpi there is no loader, so warn it is ignored.
|
||||||
#if !VM_VPI
|
#if !VM_VPI
|
||||||
VL_WARN_MT(
|
VL_WARN_MT(
|
||||||
"COMMAND_LINE", 0, "",
|
"COMMAND_LINE", 0, "",
|
||||||
("+verilator+vpi+ ignored: simulation was not compiled with --vpi '" + arg + "'")
|
("+verilator+vpi+ ignored: simulation was not compiled with --vpi '" + arg + "'")
|
||||||
.c_str());
|
.c_str()); // LCOV_EXCL_LINE (gcov zeroes this wrapped continuation line)
|
||||||
#endif
|
#endif
|
||||||
} else if (arg == "+verilator+V") {
|
} else if (arg == "+verilator+V") {
|
||||||
VerilatedImp::versionDump(); // Someday more info too
|
VerilatedImp::versionDump(); // Someday more info too
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,12 @@ else:
|
||||||
# Run the generated binary; load the VPI library via the +verilator+vpi+ plusarg.
|
# Run the generated binary; load the VPI library via the +verilator+vpi+ plusarg.
|
||||||
# The VPI library's output (observed 'count' reaching MAX_TICKS, then end-of-sim) is
|
# The VPI library's output (observed 'count' reaching MAX_TICKS, then end-of-sim) is
|
||||||
# checked against the golden .out file.
|
# checked against the golden .out file.
|
||||||
test.execute(all_run_flags=["+verilator+vpi+" + test.obj_dir + "/libvpi.so"],
|
# Also pass a non-VPI plusarg (skipped by the loader's prefix check) and a bare
|
||||||
|
# +verilator+vpi+ with an empty payload (skipped by the empty-arg check), so both
|
||||||
|
# loader-skip branches are exercised alongside the real library load.
|
||||||
|
test.execute(all_run_flags=[
|
||||||
|
"+othertest", "+verilator+vpi+", "+verilator+vpi+" + test.obj_dir + "/libvpi.so"
|
||||||
|
],
|
||||||
check_finished=True,
|
check_finished=True,
|
||||||
expect_filename=test.golden_filename)
|
expect_filename=test.golden_filename)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue