M
Melvin
Guest
Hi,
I am facing an issue in Clock generation using my Verilog Testbench.
I am generating clock using
assign clk_final = clk_stb and clk_enable
always begin
if (clk_final == 1'b0)
clk_usim_stb <= #(10.416) 1'b1;
else clk_usim_stb <= #(10.416) 1'b0;
@(clk_final);
end
(clk_final is 0 intially)
The problem I am facing is I am getting clock with a period/2 of only
10 ns . I tried giving 10.5 (10.6, 10.7 etc)...In these cases I am
getting period/2 of 11 ns.....i.e. I am not able to get the actual
desired clock. The clock period is getting rounded up.
I am also providing the following in my Testbench
`timescale 1ns/1ps
initial $timeformat(-9, 1, " ns", 12);
Please can someone help me understand if this is my testbench problem
or my simulator problem... I am using Verdi for opening this fsdb file
dump.
Thanks
Verilog Baby
I am facing an issue in Clock generation using my Verilog Testbench.
I am generating clock using
assign clk_final = clk_stb and clk_enable
always begin
if (clk_final == 1'b0)
clk_usim_stb <= #(10.416) 1'b1;
else clk_usim_stb <= #(10.416) 1'b0;
@(clk_final);
end
(clk_final is 0 intially)
The problem I am facing is I am getting clock with a period/2 of only
10 ns . I tried giving 10.5 (10.6, 10.7 etc)...In these cases I am
getting period/2 of 11 ns.....i.e. I am not able to get the actual
desired clock. The clock period is getting rounded up.
I am also providing the following in my Testbench
`timescale 1ns/1ps
initial $timeformat(-9, 1, " ns", 12);
Please can someone help me understand if this is my testbench problem
or my simulator problem... I am using Verdi for opening this fsdb file
dump.
Thanks
Verilog Baby