v0.7: More features and fixes
Highlights
slang now supports enough features to elaborate UVM tests.
Language Support
- Finished support for upward name lookup
- Support for
$
in queue expressions - Max bound constraints for queues are now enforced at compile time in constant expressions
- Support for the %l and %v format specifiers
- Support for the parameterized
std::mailbox
class (the dynamic unparameterized form is not yet supported) - Partial support for virtual interface variables and expressions
- Finished implementing rules for procedural continuous assignments
- The preprocessor now supports concatenating together block comments at macro expansion time, which allows code like this to work:
`define FFSR(__q, __d, __reset_value, __clk, __reset_clk) \
`ifndef FOOBAR \
/``* synopsys sync_set_reset `"__reset_clk`" *``/ \
`endif \
always_ff @(posedge (__clk)) begin \
__q <= (__reset_clk) ? (__reset_value) : (__d); \
end
module m;
logic q, d, clk, rst;
`FFSR(q, d, 0, clk, rst)
endmodule
- Support for the stochastic analysis system tasks and functions
- Support for the probabilistic distribution system functions
- Support for the $sdf_annotate system task
- Partial support for defparams (does not yet support instance arrays or specific rules about interfaces)
- Support for specparams
- Support for user-defined primitives and instances
- Added parsing support for specify blocks, path declarations, and system timing checks
- Finished support for built-in gate primitives, including type checking of ports and delay expressions
- Finished implementing rules about which kinds of statements and expressions are allowed in function bodies
- Finished implementing rules about which kinds of expressions can reference automatic variables
- Support for null non-ansi module ports
- Finished support for type reference expressions
General Features
- Added a
--lint-only
flag that does not try to find top-level modules and skips errors related to unknown module instantiations - Added -Wformat-multibit-strength as a pedantic warning when using %v with multibit nets
- Added -Wenum-range when enum element ranges are not integer literals (as opposed to some constant expression instead)
Fixes
randc
variables are now correctly disallowed in soft constraints- static constraint blocks are allowed to access instance members
- Fixed detection of whether colors are supported in the calling terminal from the driver
- Reals and strings are now correctly converted to integers when passed as integer display format arguments
- Various rules for continuous assignment lvalues are now correctly enforced
- Delay values specified in continuous assignments are now checked for correctness
- Fixed parsing of function-like macros that have escaped names
- Fixed a bug that allowed multiple unary prefix operators to be placed next to each other in an expression
- Fixed an overly restrictive check on literals that are allowed in enum initializers
- Correctly disallow return statements in fork-join blocks
- Fixed a bug that incorrectly propagated signedness to the rhs of assignment operators
- Fixed a bug that failed to slice connections to output ports across instance arrays
ref
arguments are now correctly disallowed in static subroutines- Fixed expression lookup locations for non-ansi ports that have split I/O declarations and initializer expressions
- Allow real-to-integer conversions by default in repeat statements, $readmem and $writemem tasks
- Fixed a bug that normalized away negative packed array bounds
- Correctly disallow items in generate blocks based on the parent definition kind
- Correctly disallow instances of modules, interfaces, and programs based on the context in which they are instantiated
- Fixed overly permissive parsing rules for package headers
- Correctly allow non-blocking assignments to class properties
- Correctly disallow net initializers in packages
- Fixed default lifetime determination for packages and procedural blocks