Forum Discussion
RichardT_altera
Super Contributor
1 year agoThe "" in the failing code represents an empty string, which is not a standard numeric literal in Verilog. The bitwise NOT operator ~ applied to a non-numeric type (empty string) is not well-defined and can lead to synthesis issues.
In line:
reg str = "";
The reg type expects a single-bit value, and "" is treated as an implicit zero or 1'b0 as mentioned by @_AK6DN_
Regards,
Richard Tan