Change `--preproc-comments` to be new name of `--pp-comments` option.

This commit is contained in:
Wilson Snyder 2025-11-01 21:59:16 -04:00
parent e6cdaf112c
commit d4aa00dbeb
8 changed files with 17 additions and 9 deletions

View File

@ -34,6 +34,7 @@ Verilator 5.041 devel
* Change developer coverage flow and add configure `--enable-dev-gcov` (#6526). [Geza Lore]
* Change `verilator_difftree` to return exit code 1 on mismatch, 2 on error.
* Change default thread pool sizes to respect processor affinity (#6604). [Geza Lore]
* Change `--preproc-comments` to be new name of `--pp-comments` option.
* Support modports referencing clocking blocks (#4555) (#6436). [Ryszard Rozak, Antmicro Ltd.]
* Support class package reference on pattern keys (#5653). [Todd Strader]
* Support digits in `$sscanf` field width formats (#6083). [Iztok Jeras]

View File

@ -453,8 +453,8 @@ detailed descriptions of these arguments.
--pins-uint8 Specify types for top-level ports
--no-pins64 Don't use uint64_t's for 33-64 bit sigs
--pipe-filter <command> Filter all input through a script
--pp-comments Show preprocessor comments with -E
--prefix <topname> Name of top-level class
--preproc-comments Include preprocessor comments in the output with -E
--preproc-resolve Include all found modules in the output with -E
--preproc-token-limit Maximum tokens on a line allowed by preprocessor
--private Debugging; see docs

View File

@ -539,8 +539,8 @@ Summary:
out. Beware of enabling debugging messages, as they will also go to
standard out. See :vlopt:`--no-std`, which is implied by this.
See also :vlopt:`--dump-defines`, :vlopt:`-P`, :vlopt:`--pp-comments`
and :vlopt:`--preproc-resolve` options.
See also :vlopt:`--dump-defines`, :vlopt:`-P`,
:vlopt:`--preproc-comments` and :vlopt:`--preproc-resolve` options.
.. option:: --emit-accessors
@ -1267,7 +1267,8 @@ Summary:
.. option:: --pp-comments
With :vlopt:`-E`, show comments in preprocessor output.
Deprecated. In versions before 5.042, the name for
:vlopt:`--preproc-comments`.
.. option:: --prefix <topname>
@ -1275,6 +1276,10 @@ Summary:
prepended to the name of the :vlopt:`--top` option, or V prepended to
the first Verilog filename passed on the command line.
.. option:: --preproc-comments
With :vlopt:`-E`, show comments in preprocessor output.
.. option:: --preproc-resolve
With :vlopt:`-E`, resolve referenced instance modules, to include

View File

@ -1612,11 +1612,12 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
});
DECL_OPTION("-pins-uint8", OnOff, &m_pinsUint8);
DECL_OPTION("-pipe-filter", Set, &m_pipeFilter);
DECL_OPTION("-pp-comments", OnOff, &m_ppComments);
DECL_OPTION("-pp-comments", OnOff, &m_preprocComments).undocumented(); // Renamed
DECL_OPTION("-prefix", CbVal, [this, fl](const char* valp) {
validateIdentifier(fl, valp, "--prefix");
m_prefix = valp;
});
DECL_OPTION("-preproc-comments", OnOff, &m_preprocComments);
DECL_OPTION("-preproc-resolve", OnOff, &m_preprocResolve);
DECL_OPTION("-preproc-token-limit", CbVal, [this, fl](const char* valp) {
m_preprocTokenLimit = std::atoi(valp);

View File

@ -267,7 +267,7 @@ private:
bool m_pinsScUintBool = false; // main switch: --pins-sc-uint-bool
bool m_pinsScBigUint = false; // main switch: --pins-sc-biguint
bool m_pinsUint8 = false; // main switch: --pins-uint8
bool m_ppComments = false; // main switch: --pp-comments
bool m_preprocComments = false; // main switch: --preproc-comments
bool m_profC = false; // main switch: --prof-c
bool m_profCFuncs = false; // main switch: --prof-cfuncs
bool m_profExec = false; // main switch: --prof-exec
@ -554,7 +554,7 @@ public:
bool pinsScUintBool() const { return m_pinsScUintBool; }
bool pinsScBigUint() const VL_MT_SAFE { return m_pinsScBigUint; }
bool pinsUint8() const { return m_pinsUint8; }
bool ppComments() const { return m_ppComments; }
bool preprocComments() const { return m_preprocComments; }
bool profC() const { return m_profC; }
bool profCFuncs() const { return m_profCFuncs; }
bool profExec() const { return m_profExec; }

View File

@ -444,7 +444,7 @@ bool V3PreProcImp::commentTokenMatch(string& cmdr, const char* strg) {
void V3PreProcImp::comment(const string& text) {
// Comment detected. Only keep relevant data.
bool printed = false;
if (v3Global.opt.preprocOnly() && v3Global.opt.ppComments()) {
if (v3Global.opt.preprocOnly() && v3Global.opt.preprocComments()) {
insertUnreadback(text);
printed = true;
}

View File

@ -18,6 +18,7 @@ Doc_Waivers = [
'-clk', # Deprecated
'-lineno', # Deprecated
'-order-clock-delay', # Deprecated
'-pp-comments', # Deprecated
'-prof-threads', # Deprecated
]

View File

@ -14,7 +14,7 @@ test.top_filename = "t/t_preproc.v"
stdout_filename = os.path.join(test.obj_dir, test.name + "__test.vpp")
test.compile(verilator_flags2=['-DDEF_A0 -DPREDEF_COMMAND_LINE -E --pp-comments'],
test.compile(verilator_flags2=['-DDEF_A0 -DPREDEF_COMMAND_LINE -E --preproc-comments'],
verilator_make_gmake=False,
make_top_shell=False,
make_main=False,