Sometimes the compiler errors out because of a class variable being used before the declaration of the class itself. For example, if two classes need a handle to each other, the classic puzzle of whether chicken or egg came first pops up. This is because the compiler processes the first class where it finds a reference to the second class being that which hasn't been declared yet.

class ABC;
  DEF   def;   // Error: DEF has not been declared yet
class DEF;
  ABC   abc;
Compilation Error
   DEF def;
ncvlog: *E,NOIPRT (,2|5): Unrecognized declaration 'DEF' could be an unsupported keyword, a spelling mistake or missing instance port list '()' [SystemVerilog].

Login to your free account to read more ...

Was this article helpful ?