In reply to ben@SystemVerilog.us:
Thank you Ben!
Sorry I forgot to initialize the clock. But real problem is, trying to call the function without parenthesis,
()
After adding parenthesis it worked like a charm. I have few more questions regarding your modifications,
- Is it better to use $realtime rather than $time?
- Are there any differences between always forever and initial forever?
- What is the advantage of using data type bit over logic?
Thank you in advance.