From 8b20d777b092f5b48556aa2ab2fa25a3da4e74dc Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 25 Jun 2009 19:53:26 -0400 Subject: [PATCH] Add verilator -V option, to show verbose version. --- Changes | 2 ++ bin/verilator | 6 ++++++ src/V3Options.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- src/V3Options.h | 4 +++- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index cacfdd2e9..d8ad1d150 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks! * Verilator 3.711 2009/** +**** Add verilator -V option, to show verbose version. + **** Add BLKLOOPINIT error code, and describe --unroll-count. [Jeff Winston] * Verilator 3.711 2009/06/23 diff --git a/bin/verilator b/bin/verilator index 3b62da3e7..81d17cd12 100755 --- a/bin/verilator +++ b/bin/verilator @@ -227,6 +227,7 @@ descriptions in the next sections for more information. --trace-depth Depth of tracing -U Undefine preprocessor define --underline-zero Zero signals with leading _'s + -V Verbose version and config -v Verilog library -Werror- Convert warning to error -Wfuture- Disable unknown message warnings @@ -696,6 +697,11 @@ example module I is referenced, look in I.I. Undefines the given preprocessor symbol. +=item -V + +Shows the verbose version, including configuration information compiled +into Verilator. (Similar to perl -V.) + =item -v I Read the filename as a Verilog library. Any modules in the file may be diff --git a/src/V3Options.cpp b/src/V3Options.cpp index bb7589f0a..b2757dc4b 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -624,9 +624,12 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) { shift; V3Options::addLibraryFile(filenameSubstitute(argv[i])); } + else if ( !strcmp (sw, "-V") ) { + showVersion(true); + exit(0); + } else if ( !strcmp (sw, "-version") ) { - cout <