forked from github/verilator
Remove VerilatedVcd::m_evcd and related dead code.
The legacy code that was using this was removed earlier, and m_evcd was constant false, so removed.
This commit is contained in:
parent
f8b7981be4
commit
3a002b6cf2
@ -261,11 +261,6 @@ void VerilatedVcd::close() VL_MT_SAFE_EXCLUDES(m_mutex) {
|
|||||||
// This function is on the flush() call path
|
// This function is on the flush() call path
|
||||||
const VerilatedLockGuard lock{m_mutex};
|
const VerilatedLockGuard lock{m_mutex};
|
||||||
if (!isOpen()) return;
|
if (!isOpen()) return;
|
||||||
if (m_evcd) {
|
|
||||||
printStr("$vcdclose ");
|
|
||||||
printQuad(timeLastDump());
|
|
||||||
printStr(" $end\n");
|
|
||||||
}
|
|
||||||
closePrev();
|
closePrev();
|
||||||
// closePrev() called Super::flush(), so we just
|
// closePrev() called Super::flush(), so we just
|
||||||
// need to shut down the tracing thread here.
|
// need to shut down the tracing thread here.
|
||||||
@ -515,38 +510,29 @@ void VerilatedVcd::declare(uint32_t code, const char* name, const char* wirep, b
|
|||||||
|
|
||||||
// Print reference
|
// Print reference
|
||||||
std::string decl = "$var ";
|
std::string decl = "$var ";
|
||||||
if (m_evcd) {
|
decl += wirep; // usually "wire"
|
||||||
decl += "port";
|
|
||||||
} else {
|
|
||||||
decl += wirep; // usually "wire"
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr size_t bufsize = 1000;
|
constexpr size_t bufsize = 1000;
|
||||||
char buf[bufsize];
|
char buf[bufsize];
|
||||||
VL_SNPRINTF(buf, bufsize, " %2d ", bits);
|
VL_SNPRINTF(buf, bufsize, " %2d ", bits);
|
||||||
decl += buf;
|
decl += buf;
|
||||||
if (m_evcd) {
|
// Add string code to decl
|
||||||
VL_SNPRINTF(buf, bufsize, "<%u", code);
|
char* const endp = writeCode(buf, code);
|
||||||
decl += buf;
|
*endp = '\0';
|
||||||
} else {
|
decl += buf;
|
||||||
// Add string code to decl
|
// Build suffix array entry
|
||||||
char* const endp = writeCode(buf, code);
|
char* const entryp = &m_suffixes[code * VL_TRACE_SUFFIX_ENTRY_SIZE];
|
||||||
*endp = '\0';
|
const size_t length = endp - buf;
|
||||||
decl += buf;
|
assert(length <= VL_TRACE_MAX_VCD_CODE_SIZE);
|
||||||
// Build suffix array entry
|
// 1 bit values don't have a ' ' separator between value and string code
|
||||||
char* const entryp = &m_suffixes[code * VL_TRACE_SUFFIX_ENTRY_SIZE];
|
const bool isBit = bits == 1;
|
||||||
const size_t length = endp - buf;
|
entryp[0] = ' '; // Separator
|
||||||
assert(length <= VL_TRACE_MAX_VCD_CODE_SIZE);
|
// Use memcpy as we checked size above, and strcpy is flagged unsafe
|
||||||
// 1 bit values don't have a ' ' separator between value and string code
|
std::memcpy(entryp + !isBit, buf,
|
||||||
const bool isBit = bits == 1;
|
std::strlen(buf)); // Code (overwrite separator if isBit)
|
||||||
entryp[0] = ' '; // Separator
|
entryp[length + !isBit] = '\n'; // Replace '\0' with line termination '\n'
|
||||||
// Use memcpy as we checked size above, and strcpy is flagged unsafe
|
// Set length of suffix (used to increment write pointer)
|
||||||
std::memcpy(entryp + !isBit, buf,
|
entryp[VL_TRACE_SUFFIX_ENTRY_SIZE - 1] = !isBit + length + 1;
|
||||||
std::strlen(buf)); // Code (overwrite separator if isBit)
|
|
||||||
entryp[length + !isBit] = '\n'; // Replace '\0' with line termination '\n'
|
|
||||||
// Set length of suffix (used to increment write pointer)
|
|
||||||
entryp[VL_TRACE_SUFFIX_ENTRY_SIZE - 1] = !isBit + length + 1;
|
|
||||||
}
|
|
||||||
decl += " ";
|
decl += " ";
|
||||||
decl += basename;
|
decl += basename;
|
||||||
if (array) {
|
if (array) {
|
||||||
|
@ -49,7 +49,6 @@ private:
|
|||||||
VerilatedVcdFile* m_filep; // File we're writing to
|
VerilatedVcdFile* m_filep; // File we're writing to
|
||||||
bool m_fileNewed; // m_filep needs destruction
|
bool m_fileNewed; // m_filep needs destruction
|
||||||
bool m_isOpen = false; // True indicates open file
|
bool m_isOpen = false; // True indicates open file
|
||||||
bool m_evcd = false; // True for evcd format
|
|
||||||
std::string m_filename; // Filename we're writing to (if open)
|
std::string m_filename; // Filename we're writing to (if open)
|
||||||
uint64_t m_rolloverMB = 0; // MB of file size to rollover at
|
uint64_t m_rolloverMB = 0; // MB of file size to rollover at
|
||||||
int m_modDepth = 0; // Depth of module hierarchy
|
int m_modDepth = 0; // Depth of module hierarchy
|
||||||
|
Loading…
Reference in New Issue
Block a user