I have this in a module and it works.
assign tb.foo.fie.module.signal_name = 1'b1;
If I try to do this, it does not compile.
if (condition)
assign tb.foo.fie.module.signal_name = 1'b1;
If I do the following, it compiles without error.
initial begin
if (condition)
force tb.foo.fie.module.signal_name = 1'b1;
end
Why does the ‘if’ statement not work without the initial begin block?
Thanks!