Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

How to delay in verilog HDL ?

Altera_Forum
Honored Contributor II
5,285 Views

How to delay in verilog HDL in designing?

0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
3,652 Views

How to delay what? Generally, you should consider a count-down timer.

0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

 

--- Quote Start ---  

How to delay what? Generally, you should consider a count-down timer. 

--- Quote End ---  

 

 

Indeed what delay? but intersting to discuss... 

 

delay type 1 : low level things like TCO, gate delays etc. 

delay type 2 : one or (n) clock latency of design 

delay type 3 : of a function output valid relevant to input 

delay type 4 : fractional sample delay(of a signal) 

others : of postings or payments ...etc.
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

When you are using MCU, you write code in C language. And delay function is frequently used. But when it comes to FPGA, delay time is hard to control.  

By the way, are you 徐佳? A friend of mine, bornd in 1986? I'm just curious.
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

 

--- Quote Start ---  

Indeed what delay? but intersting to discuss... 

 

delay type 1 : low level things like TCO, gate delays etc. 

delay type 2 : one or (n) clock latency of design 

delay type 3 : of a function output valid relevant to input 

delay type 4 : fractional sample delay(of a signal) 

others : of postings or payments ...etc. 

--- Quote End ---  

 

 

 

Would using count down timer be the best in all these instances well in parrticular type 2?
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

用标志(使能)控制计数器。 

标志为0,计数器开始计数xxx时间,标志置一; 

标志为1,计数器清零。 

 

 

Use the flag(enable flag) to control counter. 

When the flag is 0, the counter begin to count some long time, set the flag as the time is up. 

When the flag is 1, clear the counter.
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

Suppose this situation: 

 

the device is MAX7000, and the inputs are trigger signal, the pulses on each trigger are random and continuous. How to implement delay 100 to 3000ns like this?
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

hello , i want to add delay to an output in verilog language , 

hazard is the "output signal" can i use this way ??? 

 

if ( result_ns < vt )  

# 5000000 hazard = 1; 

else 

# 5000000 hazard = 0; 

 

thanks
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

yes, that will work in simulation. 

But it does not work in hardware (FPGA).
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

thank you for your reply , 

But am using FPGA so do you know how can i add delay to the output ??
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

It depends on your purpose. 

 

Often, what you want to do can be achieved with a counter. 

 

Another common technique is to use shift registers to delay signals. 

 

You can also add (small, 1 to 20 ns maybe and not very accurate) propagation delays by setting min/max delays constraints in TimeQuest.
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

yeah same pblm i m facing :(... please tell me how is it possible to provide delay in hardware if we implement it to FPGA ...

0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

rbugalho already answered you. 

What didn't you understand ?
0 Kudos
Altera_Forum
Honored Contributor II
3,652 Views

yeah i understand that ... when i post this comment , i didnt see that post due to browser pblem .. 

 

Thnx alot ..
0 Kudos
Reply