forked from github/verilator
Misc internal coverage cleanups
This commit is contained in:
parent
ffd461dcf8
commit
57a937df03
@ -123,8 +123,8 @@ void VerilatedSave::open(const char* filenamep) VL_MT_UNSAFE_ONE {
|
|||||||
if (isOpen()) return;
|
if (isOpen()) return;
|
||||||
VL_DEBUG_IF(VL_DBG_MSGF("- save: opening save file %s\n", filenamep););
|
VL_DEBUG_IF(VL_DBG_MSGF("- save: opening save file %s\n", filenamep););
|
||||||
|
|
||||||
if (filenamep[0] == '|') {
|
if (VL_UNCOVERABLE(filenamep[0] == '|')) {
|
||||||
assert(0); // Not supported yet.
|
assert(0); // LCOV_EXCL_LINE // Not supported yet.
|
||||||
} else {
|
} else {
|
||||||
// cppcheck-suppress duplicateExpression
|
// cppcheck-suppress duplicateExpression
|
||||||
m_fd = ::open(filenamep,
|
m_fd = ::open(filenamep,
|
||||||
@ -146,8 +146,8 @@ void VerilatedRestore::open(const char* filenamep) VL_MT_UNSAFE_ONE {
|
|||||||
if (isOpen()) return;
|
if (isOpen()) return;
|
||||||
VL_DEBUG_IF(VL_DBG_MSGF("- restore: opening restore file %s\n", filenamep););
|
VL_DEBUG_IF(VL_DBG_MSGF("- restore: opening restore file %s\n", filenamep););
|
||||||
|
|
||||||
if (filenamep[0] == '|') {
|
if (VL_UNCOVERABLE(filenamep[0] == '|')) {
|
||||||
assert(0); // Not supported yet.
|
assert(0); // LCOV_EXCL_LINE // Not supported yet.
|
||||||
} else {
|
} else {
|
||||||
// cppcheck-suppress duplicateExpression
|
// cppcheck-suppress duplicateExpression
|
||||||
m_fd = ::open(filenamep, O_CREAT | O_RDONLY | O_LARGEFILE | O_CLOEXEC, 0666);
|
m_fd = ::open(filenamep, O_CREAT | O_RDONLY | O_LARGEFILE | O_CLOEXEC, 0666);
|
||||||
|
@ -203,8 +203,8 @@ void VerilatedVcd::openNext(bool incFilename) {
|
|||||||
}
|
}
|
||||||
m_filename = name;
|
m_filename = name;
|
||||||
}
|
}
|
||||||
if (m_filename[0] == '|') {
|
if (VL_UNCOVERABLE(m_filename[0] == '|')) {
|
||||||
assert(0); // Not supported yet.
|
assert(0); // LCOV_EXCL_LINE // Not supported yet.
|
||||||
} else {
|
} else {
|
||||||
// cppcheck-suppress duplicateExpression
|
// cppcheck-suppress duplicateExpression
|
||||||
if (!m_filep->open(m_filename)) {
|
if (!m_filep->open(m_filename)) {
|
||||||
@ -904,9 +904,9 @@ void vcdInit(void*, VerilatedVcd* vcdp, vluint32_t) {
|
|||||||
/**/ // Note need to add 6 for next code.
|
/**/ // Note need to add 6 for next code.
|
||||||
/**/ vcdp->declDouble(0x1c, "doub", -1, 0);
|
/**/ vcdp->declDouble(0x1c, "doub", -1, 0);
|
||||||
/**/ // Note need to add 2 for next code.
|
/**/ // Note need to add 2 for next code.
|
||||||
/**/ vcdp->declDouble(0x1e, "flo", -1, 0);
|
/**/ vcdp->declFloat(0x1e, "flo", -1, 0);
|
||||||
/**/ vcdp->declArray(0x20, "q2", -1, 0, 95, 0);
|
/**/ vcdp->declArray(0x20, "q2", -1, 0, 95, 0);
|
||||||
// Note need to add 4 for next code.
|
/**/ // Note need to add 4 for next code.
|
||||||
}
|
}
|
||||||
|
|
||||||
void vcdFull(void*, VerilatedVcd* vcdp) {
|
void vcdFull(void*, VerilatedVcd* vcdp) {
|
||||||
@ -948,6 +948,7 @@ void vcdTestMain(const char* filenamep) {
|
|||||||
doub = 0;
|
doub = 0;
|
||||||
{
|
{
|
||||||
VerilatedVcdC* vcdp = new VerilatedVcdC;
|
VerilatedVcdC* vcdp = new VerilatedVcdC;
|
||||||
|
vcdp->evcd(true);
|
||||||
vcdp->spTrace()->addInitCb(&vcdInit, 0);
|
vcdp->spTrace()->addInitCb(&vcdInit, 0);
|
||||||
vcdp->spTrace()->addFullCb(&vcdFull, 0);
|
vcdp->spTrace()->addFullCb(&vcdFull, 0);
|
||||||
vcdp->spTrace()->addChgCb(&vcdChange, 0);
|
vcdp->spTrace()->addChgCb(&vcdChange, 0);
|
||||||
|
@ -336,8 +336,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
// METHODS
|
// METHODS
|
||||||
|
// Old/standalone API only
|
||||||
void evcd(bool flag) { m_evcd = flag; }
|
void evcd(bool flag) { m_evcd = flag; }
|
||||||
#endif // VL_TRACE_VCD_OLD_API
|
#endif // VL_TRACE_VCD_OLD_API
|
||||||
};
|
};
|
||||||
@ -405,6 +405,15 @@ public:
|
|||||||
|
|
||||||
/// Internal class access
|
/// Internal class access
|
||||||
inline VerilatedVcd* spTrace() { return &m_sptrace; }
|
inline VerilatedVcd* spTrace() { return &m_sptrace; }
|
||||||
|
|
||||||
|
#ifdef VL_TRACE_VCD_OLD_API
|
||||||
|
//=========================================================================
|
||||||
|
// Note: These are only for testing for backward compatibility with foreign
|
||||||
|
// code and is not used by Verilator. Do not use these as there is no
|
||||||
|
// guarantee of functionality.
|
||||||
|
/// Use evcd format
|
||||||
|
void evcd(bool flag) VL_MT_UNSAFE_ONE { m_sptrace.evcd(flag); }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
@ -178,7 +178,7 @@ sub test {
|
|||||||
if ($Opt_Stage <= 9) {
|
if ($Opt_Stage <= 9) {
|
||||||
travis_fold_start("upload");
|
travis_fold_start("upload");
|
||||||
print "Stage 9: Upload\n";
|
print "Stage 9: Upload\n";
|
||||||
my $cmd = 'bash <(curl -s https://codecov.io/bash) -f $cc_dir/app_total.info';
|
my $cmd = "bash <(curl -s https://codecov.io/bash) -f $cc_dir/app_total.info";
|
||||||
print "print: Not running: $cmd\n";
|
print "print: Not running: $cmd\n";
|
||||||
travis_fold_end();
|
travis_fold_end();
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,6 @@ remove_source("*examples/*");
|
|||||||
# Would just be removed with remove_source in later step
|
# Would just be removed with remove_source in later step
|
||||||
remove_gcda_regexp(qr!test_regress/.*/(Vt_|Vtop_).*\.gcda!);
|
remove_gcda_regexp(qr!test_regress/.*/(Vt_|Vtop_).*\.gcda!);
|
||||||
|
|
||||||
exclude_line_regexp(qr/(\bv3fatalSrc\b|\bVL_UNCOVERABLE\b|\bVL_FATAL)/);
|
exclude_line_regexp(qr/(\bv3fatalSrc\b|\bVL_UNCOVERABLE\b|\bVL_FATAL|\bUASSERT\bERROR_RSVD_WORD)/);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -125,7 +125,7 @@ public:
|
|||||||
// No more values but it's not defined to decrement an
|
// No more values but it's not defined to decrement an
|
||||||
// iterator past the beginning.
|
// iterator past the beginning.
|
||||||
v3fatalSrc("Decremented iterator past beginning");
|
v3fatalSrc("Decremented iterator past beginning");
|
||||||
return;
|
return; // LCOV_EXCL_LINE
|
||||||
}
|
}
|
||||||
--m_valIt;
|
--m_valIt;
|
||||||
// Should find a value here, as Every value bucket is supposed
|
// Should find a value here, as Every value bucket is supposed
|
||||||
|
Loading…
Reference in New Issue
Block a user