diff --git a/Changes b/Changes index 015a5e8fa..3ca639402 100644 --- a/Changes +++ b/Changes @@ -30,6 +30,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Add Makefile VM_GLOBAL_FAST, listing objects needed to link executables. +**** Add --bbox-unsup option to black-box unsupported UDP tables. + **** Fix creating implicit variables for expressions, bug196. [Byron Bradley] **** Fix MinGW compilation, bug184. [by Shankar Giri] diff --git a/bin/verilator b/bin/verilator index 592805667..fb835c712 100755 --- a/bin/verilator +++ b/bin/verilator @@ -190,6 +190,7 @@ descriptions in the next sections for more information. --assert Enable all assertions --autoflush Flush streams after all $displays --bbox-sys Blackbox unknown $system calls + --bbox-unsup Blackbox unsupported language features --bin Override Verilator binary --cc Create C++ output --compiler Tune for specified C++ compiler @@ -291,6 +292,11 @@ Arguments to such functions will be parsed, but not otherwise checked. This prevents errors when linting in the presence of company specific PLI calls. +=item --bbox-unsup + +Black box some unsupported language features, currently UDP tables. This +may allow linting when unsupported constructs are present. + =item --bin I Rarely needed. Override the default filename for Verilator itself. When a @@ -463,8 +469,8 @@ appropriate `begin_keywords. Check the files for lint violations only, do not create any other output. -If the design is not to be completely Verilated see also the --bbox-sys -option. +If the design is not to be completely Verilated see also the --bbox-sys and +--bbox-unsup options. =item --MMD diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index 0db8593fd..6672d6bdb 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -336,8 +336,8 @@ private: virtual void visit(AstUdpTable* nodep, AstNUser*) { UINFO(5,"UDPTABLE "<v3error("Unsupported: Verilog 1995 UDP Tables"); + if (!v3Global.opt.bboxUnsup()) { + nodep->v3error("Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables."); } else { // Massive hack, just tie off all outputs so our analysis can proceed AstVar* varoutp = NULL; diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 01542d0ca..53a95c6bc 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -656,6 +656,7 @@ void V3Options::parseOptsList(FileLine* fl, int argc, char** argv) { else if ( onoff (sw, "-assert", flag/*ref*/) ) { m_assert = flag; m_psl = flag; } else if ( onoff (sw, "-autoflush", flag/*ref*/) ) { m_autoflush = flag; } else if ( onoff (sw, "-bbox-sys", flag/*ref*/) ) { m_bboxSys = flag; } + else if ( onoff (sw, "-bbox-unsup", flag/*ref*/) ) { m_bboxUnsup = flag; } else if ( !strcmp (sw, "-cc") ) { m_outFormatOk = true; m_systemC = false; m_systemPerl = false; } else if ( onoff (sw, "-coverage", flag/*ref*/) ) { coverage(flag); } else if ( onoff (sw, "-coverage-line", flag/*ref*/) ){ m_coverageLine = flag; } diff --git a/src/V3Options.h b/src/V3Options.h index bbcbbed9d..6b1bbd286 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -95,6 +95,7 @@ class V3Options { bool m_assert; // main switch: --assert bool m_autoflush; // main switch: --autoflush bool m_bboxSys; // main switch: --bbox-sys + bool m_bboxUnsup; // main switch: --bbox-unsup bool m_coverageLine; // main switch: --coverage-block bool m_coverageToggle;// main switch: --coverage-toggle bool m_coverageUser; // main switch: --coverage-func @@ -206,6 +207,7 @@ class V3Options { bool assertOn() const { return m_assert; } // assertOn as __FILE__ may be defined bool autoflush() const { return m_autoflush; } bool bboxSys() const { return m_bboxSys; } + bool bboxUnsup() const { return m_bboxUnsup; } bool coverage() const { return m_coverageLine || m_coverageToggle || m_coverageUser; } bool coverageLine() const { return m_coverageLine; } bool coverageToggle() const { return m_coverageToggle; } diff --git a/test_regress/t/t_udp_lint.pl b/test_regress/t/t_udp_lint.pl index 7600eec23..780526d5e 100755 --- a/test_regress/t/t_udp_lint.pl +++ b/test_regress/t/t_udp_lint.pl @@ -13,7 +13,7 @@ compile ( # Unsupported: UDP Tables make_top_shell => 0, make_main => 0, - v_flags2 => ["--lint-only"], + v_flags2 => ["--lint-only --bbox-unsup"], verilator_make_gcc => 0, );