mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Remove $date from .vcd files (#3779)
This commit is contained in:
parent
f4be3d5d2b
commit
6349e76abd
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <ctime>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
||||||
@ -362,17 +361,13 @@ void VerilatedVcd::printIndent(int level_change) {
|
|||||||
|
|
||||||
void VerilatedVcd::dumpHeader() {
|
void VerilatedVcd::dumpHeader() {
|
||||||
printStr("$version Generated by VerilatedVcd $end\n");
|
printStr("$version Generated by VerilatedVcd $end\n");
|
||||||
printStr("$date ");
|
|
||||||
{
|
// Verilator used to put in a $date here. Although $date is shown in
|
||||||
const time_t tick = time(nullptr);
|
// IEEE examples, and it is common in VCD writers, VCD readers don't
|
||||||
tm ticktm;
|
// seem to care about it. Thus, we omit the $date so artifacts are
|
||||||
VL_LOCALTIME_R(&tick, &ticktm);
|
// more likely to be reproducible. If use cases show up that require
|
||||||
constexpr size_t LEN_BUF = 50;
|
// the $date command to be present, it could be re-added with support
|
||||||
char buf[LEN_BUF];
|
// for the SOURCE_DATE_EPOCH hook.
|
||||||
std::strftime(buf, LEN_BUF, "%c", &ticktm);
|
|
||||||
printStr(buf);
|
|
||||||
}
|
|
||||||
printStr(" $end\n");
|
|
||||||
|
|
||||||
printStr("$timescale ");
|
printStr("$timescale ");
|
||||||
printStr(timeResStr().c_str()); // lintok-begin-on-ref
|
printStr(timeResStr().c_str()); // lintok-begin-on-ref
|
||||||
|
@ -502,12 +502,6 @@ using ssize_t = uint32_t; ///< signed size_t; returned from read()
|
|||||||
# define VL_STRCASECMP strcasecmp
|
# define VL_STRCASECMP strcasecmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MINGW32__) || defined(_MSC_VER)
|
|
||||||
# define VL_LOCALTIME_R(timep, tmp) localtime_s((tmp), (timep))
|
|
||||||
#else
|
|
||||||
# define VL_LOCALTIME_R(timep, tmp) localtime_r((timep), (tmp))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Macros controlling target specific optimizations
|
// Macros controlling target specific optimizations
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user