wenna
New Contributor
1 year agoDirect operations on strings will result in synthesis errors.
Consider the following code, which fails synthesis.
module test1 (y, clk); output wire y; input wire clk; wire wire1; assign wire1 = $signed((~"")); assign y = wire1; endmodule
However, when I use a register to store the value before performing operations, it synthesizes successfully.
module test1 (y, clk); output wire y; input wire clk; wire wire1; reg str = ""; assign wire1 = $signed(~str); assign y = wire1; endmodule