Declaring timeunit in package

In reply to dave_59:

You should define your period as

parameter real Period = 1.56ns/1ps; // value will be in ps 1560

And use the period as
#(Period *1ps)/2 clk = !clk;

Dave, I disagree with the statement “1.56ns/1ps; // value will be in ps 1560”
If I remember my physics 101 class from way back then, the unitX_scale/unitX_scale cancel out, yielding no unit scale.
Remember the classical problem: how far have you walked if you travel at 3 mi/hr for one hour?
Answer: (3 mi x 1 hr)/hr, and the hr scale cancels out.
Thus, the comment should be:

parameter real Period = 1.56ns/1ps; // value will real with a converted value of 1560