I came across some issue to understand about +define+macro vs define Macro in SV.
When passing macro define from compile option like +define+macro always takes effect even if it is put at the end of the file.
But it is different when a SV macro puts in the SV file.
I am confused on that. Can someone give some clue how tool process +define+macro differently from the SV macro in SV file?
string name = "tomma";
string name = "matthewma";
string cn = "USA";
string cn = "ASU";
$display("name:%s",name); //why name's value even if +define+TOMMA after tb.sv, how tool handle SV macro in this case? Does macro define order not matter?
$display("cn:%s",cn); //expected, as US define after cn declaration, so cn = "ASU"