mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Change --trace to --trace-vcd.
This commit is contained in:
+3
-3
@@ -110,15 +110,15 @@ class CMakeEmitter final {
|
||||
cmake_set_raw(*of, name + "_TIMING", v3Global.usesTiming() ? "1" : "0");
|
||||
*of << "# Threaded output mode? 1/N threads (from --threads)\n";
|
||||
cmake_set_raw(*of, name + "_THREADS", cvtToStr(v3Global.opt.threads()));
|
||||
*of << "# VCD Tracing output mode? 0/1 (from --trace)\n";
|
||||
cmake_set_raw(*of, name + "_TRACE_VCD",
|
||||
(v3Global.opt.trace() && v3Global.opt.traceFormat().vcd()) ? "1" : "0");
|
||||
*of << "# FST Tracing output mode? 0/1 (from --trace-fst)\n";
|
||||
cmake_set_raw(*of, name + "_TRACE_FST",
|
||||
(v3Global.opt.trace() && v3Global.opt.traceFormat().fst()) ? "1" : "0");
|
||||
*of << "# SAIF Tracing output mode? 0/1 (from --trace-saif)\n";
|
||||
cmake_set_raw(*of, name + "_TRACE_SAIF",
|
||||
(v3Global.opt.trace() && v3Global.opt.traceFormat().saif()) ? "1" : "0");
|
||||
*of << "# VCD Tracing output mode? 0/1 (from --trace-vcd)\n";
|
||||
cmake_set_raw(*of, name + "_TRACE_VCD",
|
||||
(v3Global.opt.trace() && v3Global.opt.traceFormat().vcd()) ? "1" : "0");
|
||||
|
||||
*of << "\n### Sources...\n";
|
||||
std::vector<string> classes_fast;
|
||||
|
||||
@@ -584,7 +584,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
puts(/****/ "vl_fatal(__FILE__, __LINE__, __FILE__,\"'" + topClassName()
|
||||
+ "::trace()' called on non-" + v3Global.opt.traceClassBase() + "C object;\"\n"
|
||||
+ "\" use --trace-fst with VerilatedFst object,"
|
||||
+ " and --trace with VerilatedVcd object\");\n");
|
||||
+ " and --trace-vcd with VerilatedVcd object\");\n");
|
||||
puts(/**/ "}\n");
|
||||
puts(/**/ "stfp->spTrace()->addModel(this);\n");
|
||||
puts(/**/ "stfp->spTrace()->addInitCb(&" + protect("trace_init")
|
||||
|
||||
+5
-5
@@ -551,14 +551,10 @@ public:
|
||||
of.puts("VM_PARALLEL_BUILDS = ");
|
||||
of.puts(v3Global.useParallelBuild() ? "1" : "0");
|
||||
of.puts("\n");
|
||||
of.puts("# Tracing output mode? 0/1 (from --trace/--trace-fst/--trace-saif)\n");
|
||||
of.puts("# Tracing output mode? 0/1 (from --trace-fst/--trace-saif/--trace-vcd)\n");
|
||||
of.puts("VM_TRACE = ");
|
||||
of.puts(v3Global.opt.trace() ? "1" : "0");
|
||||
of.puts("\n");
|
||||
of.puts("# Tracing output mode in VCD format? 0/1 (from --trace)\n");
|
||||
of.puts("VM_TRACE_VCD = ");
|
||||
of.puts(v3Global.opt.trace() && v3Global.opt.traceFormat().vcd() ? "1" : "0");
|
||||
of.puts("\n");
|
||||
of.puts("# Tracing output mode in FST format? 0/1 (from --trace-fst)\n");
|
||||
of.puts("VM_TRACE_FST = ");
|
||||
of.puts(v3Global.opt.trace() && v3Global.opt.traceFormat().fst() ? "1" : "0");
|
||||
@@ -567,6 +563,10 @@ public:
|
||||
of.puts("VM_TRACE_SAIF = ");
|
||||
of.puts(v3Global.opt.trace() && v3Global.opt.traceFormat().saif() ? "1" : "0");
|
||||
of.puts("\n");
|
||||
of.puts("# Tracing output mode in VCD format? 0/1 (from --trace-vcd)\n");
|
||||
of.puts("VM_TRACE_VCD = ");
|
||||
of.puts(v3Global.opt.trace() && v3Global.opt.traceFormat().vcd() ? "1" : "0");
|
||||
of.puts("\n");
|
||||
|
||||
of.puts("\n### Object file lists...\n");
|
||||
for (int support = 0; support < 3; ++support) {
|
||||
|
||||
+5
-1
@@ -930,7 +930,7 @@ void V3Options::notify() VL_MT_DISABLED {
|
||||
}
|
||||
|
||||
if (trace()) {
|
||||
// With --trace, --trace-threads is ignored
|
||||
// With --trace-vcd, --trace-threads is ignored
|
||||
if (traceFormat().vcd()) m_traceThreads = 1;
|
||||
}
|
||||
|
||||
@@ -1671,6 +1671,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
|
||||
});
|
||||
DECL_OPTION("-no-trace-top", Set, &m_noTraceTop);
|
||||
DECL_OPTION("-trace-underscore", OnOff, &m_traceUnderscore);
|
||||
DECL_OPTION("-trace-vcd", CbCall, [this]() {
|
||||
m_trace = true;
|
||||
m_traceFormat = TraceFormat::VCD;
|
||||
});
|
||||
|
||||
DECL_OPTION("-U", CbPartialMatch, &V3PreShell::undef);
|
||||
DECL_OPTION("-underline-zero", OnOff, &m_underlineZero); // Deprecated
|
||||
|
||||
Reference in New Issue
Block a user