I have started looking into SV and came across construct a lot.
ifndef TEXT_IDENTIFIER
define TEXT_IDENTIFIER
//blah blah blah code here
`endif
Code blah blah blah code gets executed even if TEXT_IDENTIFIER was defined just below it.
-
So in looking at compiler directive, does compiler read line by line and 2nd line
define TEXT_IDENTIFIER is not read when
ifndef was encountered and thus blah blah blah code gets executed? -
If answer to 1 is yes, then why do we write code like this? I have seen similar code in uvm_pkg.sv