Add -sv option to match other simulators

This commit is contained in:
Wilson Snyder 2009-12-07 15:30:37 -05:00
parent 17bf13fcb6
commit 097f3590ae
2 changed files with 9 additions and 1 deletions

View File

@ -234,6 +234,7 @@ descriptions in the next sections for more information.
--sc Create SystemC output --sc Create SystemC output
--sp Create SystemPerl output --sp Create SystemPerl output
--stats Create statistics file --stats Create statistics file
-sv Enable SystemVerilog parsing
--top-module <topname> Name of top level input module --top-module <topname> Name of top level input module
--trace Enable waveform creation --trace Enable waveform creation
--trace-depth <levels> Depth of tracing --trace-depth <levels> Depth of tracing
@ -600,6 +601,12 @@ Specifies SystemPerl output mode; see also --cc and -sc.
Creates a dump file with statistics on the design in {prefix}__stats.txt. Creates a dump file with statistics on the design in {prefix}__stats.txt.
=item -sv
Specifies SystemVerilog language features should be enabled; equivalent to
"--language 1800-2005". This option is selected by default, it exists for
compatibility with other simulators.
=item --top-module I<topname> =item --top-module I<topname>
When the input Verilog contains more than one top level module, specifies When the input Verilog contains more than one top level module, specifies

View File

@ -677,9 +677,10 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) {
else if ( onoff (sw, "-psl", flag/*ref*/) ) { m_psl = flag; } else if ( onoff (sw, "-psl", flag/*ref*/) ) { m_psl = flag; }
else if ( onoff (sw, "-public", flag/*ref*/) ) { m_public = flag; } else if ( onoff (sw, "-public", flag/*ref*/) ) { m_public = flag; }
else if ( !strcmp (sw, "-sc") ) { m_outFormatOk = true; m_systemC = true; m_systemPerl = false; } else if ( !strcmp (sw, "-sc") ) { m_outFormatOk = true; m_systemC = true; m_systemPerl = false; }
else if ( !strcmp (sw, "-sp") ) { m_outFormatOk = true; m_systemC = true; m_systemPerl = true; }
else if ( onoff (sw, "-skip-identical", flag/*ref*/) ) { m_skipIdentical = flag; } else if ( onoff (sw, "-skip-identical", flag/*ref*/) ) { m_skipIdentical = flag; }
else if ( !strcmp (sw, "-sp") ) { m_outFormatOk = true; m_systemC = true; m_systemPerl = true; }
else if ( onoff (sw, "-stats", flag/*ref*/) ) { m_stats = flag; } else if ( onoff (sw, "-stats", flag/*ref*/) ) { m_stats = flag; }
else if ( !strcmp (sw, "-sv") ) { m_language = V3LangCode::L1800_2005; }
else if ( onoff (sw, "-trace", flag/*ref*/) ) { m_trace = flag; } else if ( onoff (sw, "-trace", flag/*ref*/) ) { m_trace = flag; }
else if ( onoff (sw, "-trace-dups", flag/*ref*/) ) { m_traceDups = flag; } else if ( onoff (sw, "-trace-dups", flag/*ref*/) ) { m_traceDups = flag; }
else if ( onoff (sw, "-underline-zero", flag/*ref*/) ) { m_underlineZero = flag; } // Undocumented, old Verilator-2 else if ( onoff (sw, "-underline-zero", flag/*ref*/) ) { m_underlineZero = flag; } // Undocumented, old Verilator-2