Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw: Add missing cast in ambiguous default expression (#147)
* hw: fix slang casting error Slang says: error: assignment pattern target type cannot be deduced in this context According to the spec chapter 6.24.1 the parenthesis around the expression to be casted are necessary. This fixes the slang error. * hw: fix ambiguous inferred type in default Its not pretty but it works. Without the explicit cast or type slang is unable to infer the type of the value in the default. By just adding an explicit cast parenthesis like: '('{0, 0}) Vivado gives a Syntax error. So adding a localparam seems to be the simplest fix. * hw: fix verible linter warning * Improve naming, add clarifying comment on default case --------- Co-authored-by: Paul Scheffler <[email protected]>
- Loading branch information