Skip to content

v4.0

Compare
Choose a tag to compare
@MikePopoloski MikePopoloski released this 10 Aug 13:38
· 500 commits to master since this release
007e5ab

Language Support

  • Finished full support for user-defined primitives by adding error checking for table entries
  • Support for whitespace between the two characters of the dist weight operators has been added for compatibility with other tools -- this is an error by default but can be downgraded as needed. See -Wsplit-distweight-op.
  • Added support for net aliases
  • Added support for checkers
  • Added support for extern modules/interfaces/programs/primitives, along with wildcard port lists in declaration headers

General Features

  • slang now requires a C++20 compatible compiler to build (e.g. minimum GCC 10)
  • New warnings -Wport-width-expand and -Wport-width-trunc separate out width warnings that occur in port connections from general expressions elsewhere. This makes it easier to find and target these specific cases of width mismatches.
  • New option --suppress-macro-warnings that functions similarly to --suppress-warnings except that it applies to the original definition location of macros instead of their expansion location. This is useful if, for example, you want to hide warnings from 3rd party macros (like from UVM) that you use in your own code.
  • A new experimental tool called slang-netlist has been added (thanks to @jameshanlon) -- see the readme for more details
  • A new experimental tool called slang-reflect has been added (thanks to @Sustrak) -- see the readme for more details
  • The slang build optionally supports obtaining dependencies via conan.io -- see the docs for details.
  • The slang driver now accepts file patterns to make it easier to select groups of files
  • Initial support for source libraries and library map files has been added. This is only for specifying input files right now but in future releases will be expanded to work with SystemVerilog config declarations.

Improvements

  • When dealing with duplicate module/interface/program definitions (where the error has been downgraded to a warning) slang will now make use of the first definition seen instead of any later ones, to better match the behavior of other tools
  • Improved the warnings issued for unused 'inout' ports
  • Macros declared in slang headers have been namespaced to avoid polluting user code
  • Several hash table implementations used by slang (ska::flat_hash_map, unordered_dense, StringTable) have been removed and consolidated into using boost::unordered. The library includes a minimal boost_unordered.hpp header to avoid needing to depend on all of boost.
  • Added a dependency on the mimalloc custom allocator (can be disabled if desired)
  • A number of small optimizations (including the switch to boost::unordered and use of mimalloc) combine to improve general slang compilation performance by about 10%
  • slang can now build correctly with exceptions and RTTI disabled, to allow integration with other codebases that disable use of these features
  • The slang driver will now parse input files in multiple threads by default. This can be disabled with --threads=1. This feature is not supported when using --single-unit.
  • The --libdir feature will now search for files based on interface port declarations in addition to module instantiations (thanks to @AndrewNolte)
  • Support for visitors has been added to the Python bindings (thanks to @tdp2110)
  • Low-level file loading routines in slang have been rewritten to use platform-level APIs. This should slightly improve performance, but more importantly it allows slang to report system-specific error messages when file loading fails.
  • Failed file loads invoked via the Python bindings now raise an appropriate Python exception
  • The --suppress-warnings option has been changed to take a file pattern instead of a directory path prefix. Existing uses of this flag will need to be updated to the new behavior.
  • Most command line arguments that accept multiple values now accept those values as a comma-separated list in addition to repeating the argument multiple times
  • slang can now read input from stdin by specifying a file named '-'

Fixes

  • Fixed a bug that prevented indexing into an interface array when accessing that array hierarchically
  • break and continue statements are now correctly disallowed from controlling a loop outside of a fork-join block
  • Duplicate driver checking now applies to signals accessed via modports
  • Subroutine ports with initializers will now issue an appropriate error
  • Subroutine argument default values are now checked for the correct direction and count as drivers for target symbols
  • Fixed messaging generated by elaboration system tasks when arguments are invalid
  • Fixed an off-by-one error in symbol lookup location for detecting whether parameters are used before they are declared
  • Fixed a few return value policies in the Python bindings that were incorrect
  • Fixed a bug where a continuous assign statement that referenced an implicit net more than once would cause an error about duplicate net declarations
  • Fixed the use of the $global_clocking system functions in direct event controls
  • Fixed an erroneous diagnostic when checking which kinds of expressions are allowed in a binary and or or property expression
  • Fixed parsing of tagged patterns when followed immediately by a &&& predicate
  • Added tests and fixed resulting issues found in AST serialization and visitation methods
  • The Compilation constructor now ensures it safely only adds type diagnostic printing callbacks once, to allow multithreaded use of separate Compilation objects
  • Fixed the error message reported for -Wimplicit-port-type-mismatch -- it was reporting the wrong types involved
  • Fixed parsing of parameter ports that have multiple declarators -- previously later parameters in the list were not being associated with the prior type declaration

New Contributors

Full Changelog: v3.0...v4.0