rohd icon indicating copy to clipboard operation
rohd copied to clipboard

Mechanism to warn about integer truncation in constants

Open mkorbel1 opened this issue 2 years ago • 2 comments

Motivation

Sometimes one might want to create a Const which requires passing an integer, but the integer doesn't "fit" in the specified width of the constant signal. The current behavior is just truncation, meaning the constant value doesn't match the value of the original int.

Desired solution

A warning, error, exception, or something along those lines making it more difficult to accidentally truncate the desired constant value.

mkorbel1 avatar Jul 28 '22 15:07 mkorbel1

Related discussion: https://github.com/intel/rohd/discussions/335

mkorbel1 avatar Mar 29 '23 20:03 mkorbel1