v1.0
Highlights
slang can now detect and enforce all of the various rules surrounding multiple drivers on nets, variables, and ports. This release also comes with support for functional coverage constructs, opt-in support for hierarchical names used within constant expressions, and some additional compatibility functionality to make it easier to use with codebases that primarily build with other, less-conformant tools.
As of this release, no pre-built binaries will be included. They were of limited usefulness and difficult to maintain and so it's not worth providing them -- build from the source release instead.
Language Support
- Added full support for covergroups, cover points, cover crosses, coverage bins and options.
- Added support for untyped mailboxes.
- Hierarchical references can now be used in constant expressions by passing the
--allow-hierarchical-const
flag. This is not strictly legal in SystemVerilog but other tools allow it and so slang supports it for compatibility. - Added support for non-ansi interface ports.
- Added support for user-defined nettypes in module and interface port lists.
- Added support for non-ansi "multiports" and sliced ports.
- Added support for explicit ansi and non-ansi ports.
- Added support for generic interface ports.
- Added support for nested module and interface declarations.
- Added the LRM rules for port collapsing of dissimilar net types.
- Added rules around multiple drivers or mixed continuous and procedural drivers for variables and uwires.
- Added rules for port connection directions (input vs output).
- Added rules to disallow reading output clock variables or continuous assignments to the target of a clock variable.
- Added rules to disallow assertion local variables from being driven by more than one output local variable formal argument.
- Added rules about what timing controls are allowed in always_comb / always_latch / always_ff.
- Added rules for user-defined nettype resolution functions.
- Added LRM-specified warnings when net port coercion occurs.
- Added full support for interconnect nets.
- Added support for let declarations and nettypes inside of statement blocks.
General Features
- A missing include directory passed to the driver tool is now a warning instead of an error.
- A
--compat
flag was added to allow specifying general compatibility requirements with other tools. Currently onlyvcs
is supported as a value. This enables a bunch of other flags to try to be compatible with VCS as much as possible. +incdir
and+define
flags were added to increase compatibility with other tools.- Support for "command files" was added -- use the
-F
and-f
flags to specify the path to a command file. Command files allow more conveniently specifying large lists of files and command line options to an invocation of the tool. See Command Files for more detail. - Added a $static_assert elaboration task that takes a condition and fails compilation if that condition is false. See Nonstandard Built-In Functions for an example.
- Added a
--relax-enum-conversions
flag to do less strict type checking of enum conversions, for compatibility with other tools. - Integer literal overflow is now a warning instead of an error.
- All warning flags are now documented with examples here: Warning Reference
- The
-Wno-top
warning flag was renamed to-Wmissing-top
to avoid confusion with the -no prefix. - Added a
--allow-dup-initial-drivers
flag which allows duplicate drivers from initial blocks instead of causing an error, for compatibility with other tools. - By default, procedural
for
loops will be unrolled if possible before checking for duplicate driver errors. The LRM is actually more strict and does not allow this looser form of driver checking, so a--strict-driver-checking
flag has been added to disable it. More details at Driver Loop Unrolling.
Fixes
- A better error is reported when trying to hierarchically refer to a type name.
$unit
based names are no longer erroneously considered hierarchical.- The coverage system functions now allow a standalone
$root
as an argument. - Finished a bunch of TODOs and corner case handling in port declarations.
- Made several tweaks to the parser's error recovery to get better diagnostics for commonly made mistakes.
- Fixed issues with non-ansi port declarations that used named types.
- Port initializers are now correctly required to be constants.
- The $dumpvars function is now allowed to dump nets as well.
- Fixed ICE when exporting an imported enum member from a package.
- Fixed the printing of hierarchical path names in diagnostics.
- Fixed macro stringification of substituted string literals.
- Parameters with unpacked dimensions are now allowed to have a partially inferred type (with a
logic
base element type). - Report an error for variables connected to
inout
ports. - Report an error for unconnected
ref
ports. - Top-level modules cannot have
ref
ports. - Fixed JSON serialization of method prototype arguments.
- A better error is reported when trying to assign to a constant.
- Correctly disallow
inout
uwire ports. - Fixed how subroutine argument types are inferred if not explicitly provided.
- Fixed a bug that allowed some errors in class randomize lookups to go unreported.
- Fixed a double reporting of errors when enums have an invalid base type.
- Fixed selection of enum values that are members of a struct declaration.
- Fixed type compatibility checking for types that share the same source syntax but live in different logical places in the hierarchy.
- Report an error if there are cycles in a class inheritance chain.
- Fixed the threshold for unrecoverable lexer errors to not include warnings in the count.
- Fixed some corner cases where lvalues of system methods were not properly validated.
- Correctly error if there are duplicate out-of-block class method definitions.
- Correctly require for loop variable declarations to have initializers.
- Fixed a few parsing corner cases for user-defined primitives.
- Correctly disallow assertion local variables from being referenced in event expressions.
- Fixed an incorrect implicit conversion of string literals inside of concatenation expressions.