Plusargs

if ($test$plusargs(“CPU0_LOAD=”)) begin
$value$plusargs(“CPU0_LOAD=%s”, cpu0_str);
end

The above code actually compiles and works just fine. I am confused about the “=” in the ‘if’ statement. Seems like the “=” really didn’t cause any issues in determining if the plusarg has been defined or not.

In the If statement you used “=” , Whatever you write in between “” in $test$plusargs…you have to add same string while compiling the code.

If you testing “CPU0_LOAD=” in $test$plusargs you have to pass +CPU0_LOAD= in the run time .

If you pass +CPU0_LOAD in run time argument it will not satisfy if condition.

I have made small code. Have a look at It.

link :- Edit code - EDA Playground

Thank you Abhay!
I figured it as much. I was under the impression that “=” is always used as a delimiter between the definition and the value
+=