You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Const is just a Logic that initializes itself with a specific value. Technically, the value could be changed later via a put directly on the Const or on another Logic which shares an underlying _Wire. This can be confusing for debug, and worse, could cause synthesized outputs (e.g. SystemVerilog) to have constant values which do not match the requested value at the time of Const creation.
Desired solution
Some ideas:
Have a way to flag/throw an exception when the value of a Const is attempted to be changed
Have a way to ensure synthesized outputs have the intended constant value
Motivation
Currently,
Const
is just aLogic
that initializes itself with a specific value. Technically, the value could be changed later via aput
directly on theConst
or on anotherLogic
which shares an underlying_Wire
. This can be confusing for debug, and worse, could cause synthesized outputs (e.g. SystemVerilog) to have constant values which do not match the requested value at the time ofConst
creation.Desired solution
Some ideas:
Const
is attempted to be changedAlternatives considered
No response
Additional details
Somewhat related to #429
The text was updated successfully, but these errors were encountered: