Skip to content

v0.9

Compare
Choose a tag to compare
@MikePopoloski MikePopoloski released this 07 Jan 02:13
· 1873 commits to master since this release

Highlights

This release focused on fixing bugs, improving compatibility with other tools, and internal code cleanup. There were still some good language additions though, such as let expressions and randsequence statements.

Language Support

  • Added the built-in coverage control methods and predefined macros (thanks @jrudess)
  • Added the PLA system tasks (thanks @jrudess)
  • Added support for let declarations and let expressions
  • Added support for package export directives
  • Added full support for union data types, including packed / unpacked / packed tagged / unpacked tagged variants
  • Added support for randcase statements
  • Added support for randsequence statements
  • Added more support for assignment patterns and cleaned up various corner cases and error handling issues. The only thing still not supported for assignment patterns is when they are used as an lvalue.
  • Added support for $psprintf as a non-standard alias for $sformatf for compatibility with other tools
  • Allow macros to be named after keywords for compatibility with other tools
  • Added support for extended foreach array name syntax for compatibility with other tools. For example:
int array[2][2];
foreach (array[i]) begin
    foreach (array[i][j]) begin
        array[i][j] = (i + 1) * (j + 1);
    end
end
  • Allow macro argument substitution inside of escaped identifiers for compatibility with other tools
  • Allow macro expanded arguments to insert line continuations when used inside another define directive for compatibility with other tools
  • Added support for clocking blocks in modports
  • Added support for accessing clocking blocks through virtual interfaces
  • Changed rand_mode and constraint_mode to always be considered functions for compatibility with other tools
  • Specifying a lifetime on a method prototype has been changed from an error to a warning, to make life easier for legacy codebases

General Features

  • The minimum required cmake version has been bumped to 3.15
  • Added a warning for non-blocking assignments used in final blocks (thanks @jrudess)
  • Made some general improvements to the SyntaxRewriter APIs
  • Instance caching was removed and parameter evaluation was reworked to better support hierarchical names in parameter values in the future. This is not allowed in SystemVerilog but some tools allow it anyway, so this sets the groundwork for eventually supporting it in slang as well.

Fixes

  • Fixed some spurious errors inside of foreach loops within uninstantiated modules
  • Fixed error reporting when an invalid base type is used for an enum
  • Fixed error reporting when an invalid net initializer is used in a package
  • Fixed the check for tasks being called from a constant expression
  • Fixed a crash when specparams are given an invalid data type
  • Fixed the error message issued when dynamic array range selection bounds are reversed
  • Fixed a crash within the handling of unbounded literals being assigned to parameters
  • Correctly prevent self-referential parameter initializers
  • Correctly allow property and sequence expressions in instance port connections
  • Fixed various bugs in parsing covergroups
  • Fixed an issue that could cause array iterator methods to evaluate to the wrong value in constant expressions
  • Correctly allow event trigger and wait_order statements to target an element of an array of events
  • Fixed class member accessibility checking from within randomize inline constraint blocks
  • Fixed type checking for unpacked arrays of strings in set membership expressions
  • Fixed overriding of inherited enumerands in extended classes
  • Fixed class member accessibility checking from out-of-block method default argument expressions
  • Fixed parsing of virtual interface properties with class qualifiers
  • Added class definitions to JSON AST output
  • Fixed a parsing ambiguity in parenthesized event expressions
  • Fixed an assertion when macro stringifying an escaped identifier
  • Fixed dist constraint type checking
  • Fixed implicit macro concatenation with adjacent tokens
  • Correctly allow scope randomize arguments to be considered rand variables
  • Fixed a bug in SVInt::operator< where both sides are 0 with large bit widths
  • Fixed an assertion when data type expressions have erroneous invocation syntax
  • Fixed a sequence repetition parsing bug
  • Fixed lookup resolving through typedefs that point to an error type
  • Fixed binding of special methods on dynamic array (and other) types
  • Fixed crash on default value checking for empty assignment patterns
  • Fixed checking of allowed types in constraint expressions
  • Fixed spurious errors in virtual interface assignment checking
  • Correctly disallow out-of-block class methods from having static variable lifetime
  • Fixed $sformat argument checking
  • Fixed class inheritance issues caused by circular references in base class constructor calls
  • Fixed spurious errors in uninstantiated generic classes with unknown base classes
  • Improved error reporting for invalid uses of dist expressions
  • Correctly handle nested chains of invocable symbols after lookup
  • Fixed an off-by-one error in lexer's splitTokens method that led to misparsing some literals
  • Fixed a crash when speculatively evaluating an assignment to an expression type that doesn't implement evalLValue
  • Fixed various places that could silently fail during constant evaluation
  • Fixed an issue where upward names could fail to properly issue all related diagnostics
  • Fixed evaluation of body parameters with defaults that depend on local functions

Extra Thanks

  • @Kuree for some build fixes and adding macos to the CI build
  • @jesec for some patches to fix the build on non-x86_64 platforms
  • @eggman79 for reporting and providing a patch for a memory leak
  • @jrudess for reporting many issues and providing helpful test cases
  • @chengniansun for running fuzz testing and reporting a bunch of discovered crashes