Repository navigation
SUS 0.6.0 is a syntax-heavy release. The main additions are a shorthand for integer bounds (int#(0..16) as shorthand for int#(FROM: 0, TO: 16)). With this the general "ranges" syntax has been updated to a..b instead of a:b. Likewise this version also introduces the function keyword; a "local" action that can be called from within the module. With this, we've made actions, triggers and functions the type bool, which lets you use them in general boolean expressions.
Breaking Changes
- Change slicing syntax to
[a..b],[a..=b],[a +.. w],[a -.. w], and add[a *.. w](#171). This replaces[a:b],[a +: w]and[a -: w] - Remove the
interfacekeyword. A module's main interface is now declared in its header:module M #(T) : T a -> T b { ... }. The oldmodule M {action M : ... {}}syntax is still supported for making "function-style" modules. - Actions, triggers and functions are now plain
boolwires (#95). Referring to one by name yields its condition wire, so they can be used in boolean expressions - Generative assignments now check the declared array size (#205).
gen int[10] X = [1, 2, 3]used to silently makeXa 3-element array - Remove
LatencyOffset, usenext(N)instead
Language
- Add local actions with the
functionkeyword (#198):function name : T a -> T b { body } - Add secondary (partial) bindings on actions, triggers and functions (#198): an
actionorfunctionmay be declared without a body, and bound later withwhen name : T a -> T b { ... } - Add shorthand for integer bounds:
int#(a..b). All slice forms work:int#(a..=b),int#(a +.. w),int#(a -.. w),int#(a *.. w)(#171) forloops accept every slice form too:for int I in a..=b- Add array literals with a default element:
[v ...]and[a, b, v ...]. The size is taken from context - Parser: Allow newlines after open brackets, before
{,else,->, and after=and binary operators (#107) - Parser: Allow trailing commas in function calls
- Allow write modifiers on standalone function calls:
reg f(x, y),next f(x, y) ==and!=now work on all types, not justint. They check binary identity, not any "equivalence". (#192)
Compiler
- Update to Minimum Rust version to 1.94
- Add
--no-optimizationflag, for more readable testbenching - Explicit
reglatency registers are now marked(* shreg_extract = "no" *), so Vivado doesn't turn them into SRLs - Add bounds checking for
splitwire indices - Improve the jagged tensor error by telling you which array indices don't match
- Lint: Remove "effectively constant" for output ports
- Lint: Remove spurious "unused" warning on trigger return values
- Fix ICE on out of bounds array write (#204)
- Fix ICE on negative array sizes
- Fix
[gen -: w]ignored the direction when the start index is generative - Fix module names may conflict with SystemVerilog keywords
- Remove
__top_module.htmlfrom--gen-docs
LSP
- Fix LSP crashed on startup for file paths containing spaces, non-ASCII characters,
[,]or% - Slightly improve completions for conditional bindings without braces
- Tab-complete on a type template argument now adds the
typekeyword
Standard Library
- Add
MultiReduction - Add
CountStartingZeros - Remove
LatencyOffset,LatencyOffsetActionandLatencyOffsetActionNoData. Usenext(N)instead - Remove
RepeatandRepeatGen. Use[v ...]instead - Fix off-by-one error in the size of
TreeAdd's intermediate sums