I need to divide two delay parameter values which are in ps. The result has to be an integer value. I have tried the code below, but the result is incorrect. N, a parameter which I need at compile/elaboration time, needs to be calculated to 60. Link on edaplayground.
module test #(parameter delay=3000ps, unitDelay = 50ps, integer N=$ceil(delay/unitDelay)) (input logic L, output logic R); initial begin $display ("delay=%d, unitDelay=%d, N=%d", delay, unitDelay, N); $display ("delay=%t, unitDelay=%t, N=%d", delay, unitDelay, N); end endmodule