J
JT
Guest
I've seen verilog code that uses #delay_value in synchronous processes
while doing the assign with a non blocking assignment:
(taken from a previous posting about grey counters)
always @(posedge clk or posedge global_async_reset)
gray_ctr <= #1 global_async_reset ? 0 :
preload_en ? preload_val :
inc_en ? gray_plus_1 :
gray_ctr;
or
always @ (posedge fpga_sysclk_b or negedge reset_l)
begin
if (!reset_l)
begin
mv_in <= `dly 'h0;
mv_datai <= `dly 'h0;
end
else
begin
mv_datai <= `dly mv_dataix;
mv_in <= `dly mv_datai;
end
end
I have never encountered problems in not using delays in sequential
processes with non blocking assignments. Why do people use delays??
I'd understand the need for the delay if blocking assignments were
used, but not for non-blocking.
Any thoughts??
while doing the assign with a non blocking assignment:
(taken from a previous posting about grey counters)
always @(posedge clk or posedge global_async_reset)
gray_ctr <= #1 global_async_reset ? 0 :
preload_en ? preload_val :
inc_en ? gray_plus_1 :
gray_ctr;
or
always @ (posedge fpga_sysclk_b or negedge reset_l)
begin
if (!reset_l)
begin
mv_in <= `dly 'h0;
mv_datai <= `dly 'h0;
end
else
begin
mv_datai <= `dly mv_dataix;
mv_in <= `dly mv_datai;
end
end
I have never encountered problems in not using delays in sequential
processes with non blocking assignments. Why do people use delays??
I'd understand the need for the delay if blocking assignments were
used, but not for non-blocking.
Any thoughts??