Hi,
I want to generate a 875Mhz clock (this means a 1.142857143e-9 time period).
I do this by:
initial begin
int clk_cycle_fs = int'(1_000_000_000.0/875.0);
#(1fs * (clk_cycle_fs/2))
clk = 1;
#(1fs * (clk_cycle_fs/2))
clk = 0;
end
In simulation i get time period of 1.142858e-9. that means 874.999343Mhz clock, and not the clock i want.
does anyone know why this is the generated clock? is the simulation not accurate enough? is there other way of getting 875Mhz clock?
I use `timescale 100ps/1ps inside tb.