rohd
rohd copied to clipboard
Mechanism to warn about integer truncation in constants
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.
Related discussion: https://github.com/intel/rohd/discussions/335