diff --git a/Changes b/Changes index 69b8ceb54..2fddd295d 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks! * Verilator 3.8**** +*** Add --trace-max-width and --trace-max-array, bug 319. [Alex Solomatnikov] + **** Support $bits(data_type), bug327. [Alex Solomatnikov] **** Accelerate bit-selected inversions. diff --git a/bin/verilator b/bin/verilator index 437e15c66..b49ac974b 100755 --- a/bin/verilator +++ b/bin/verilator @@ -292,6 +292,8 @@ descriptions in the next sections for more information. --top-module Name of top level input module --trace Enable waveform creation --trace-depth Depth of tracing + --trace-max-array Maximum bit width for tracing + --trace-max-width Maximum array depth for tracing --trace-underscore Enable tracing of _signals -U Undefine preprocessor define --unroll-count Tune maximum loop iterations @@ -816,6 +818,18 @@ Specify the number of levels deep to enable tracing, for example entire model. Using a small number will decrease visibility, but greatly improve runtime and trace file size. +=item --trace-max-array I + +Rarely needed. Specify the maximum array depth of a signal that may be +traced. Defaults to 32, as tracing large arrays may greatly slow traced +simulations. + +=item --trace-max-width I + +Rarely needed. Specify the maximum bit width of a signal that may be +traced. Defaults to 256, as tracing large vectors may greatly slow traced +simulations. + =item --trace-underscore Enable tracing of signals that start with an underscore. Normally, these @@ -865,11 +879,11 @@ example C<-Werror-NOUNOPTFLAT>. =item -Wfuture-I -Suppress unknown Verilator comments or warning messages with the given -message code. This is used to allow code written with pragmas for a later -version of Verilator to run under a older version; add -Wfuture- arguments -for each message code or comment that the new version supports which the -older version does not support. +Rarely needed. Suppress unknown Verilator comments or warning messages +with the given message code. This is used to allow code written with +pragmas for a later version of Verilator to run under a older version; add +-Wfuture- arguments for each message code or comment that the new version +supports which the older version does not support. =item -Wno-I diff --git a/src/V3Options.cpp b/src/V3Options.cpp index f11db1fec..66c304536 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -756,6 +756,14 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char shift; m_traceDepth = atoi(argv[i]); } + else if ( !strcmp (sw, "-trace-max-array") && (i+1)width() > 256) return "Wide bus > 256 bits"; - if (nodep->arrayElements() > 32) return "Wide memory > 32 ents"; + if ((int)nodep->width() > v3Global.opt.traceMaxWidth()) return "Wide bus > --trace-max-width bits"; + if ((int)nodep->arrayElements() > v3Global.opt.traceMaxArray()) return "Wide memory > --trace-max-array ents"; if (!(nodep->dtypeSkipRefp()->castBasicDType() || (nodep->dtypeSkipRefp()->castArrayDType() && nodep->dtypeSkipRefp()->castArrayDType()->dtypeSkipRefp()->castBasicDType()))) {