In reply to sush:
You did not show the way you compiled the modules, but I assume you were compiling them as SystemVerilog files. In which case, each file is treated as a separate compilation unit.
In reply to sush:
You did not show the way you compiled the modules, but I assume you were compiling them as SystemVerilog files. In which case, each file is treated as a separate compilation unit.