Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to produce time delays using VHDL?

Status
Not open for further replies.

bekirhakan

Newbie level 3
Joined
Dec 25, 2002
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
37
using time delay

Hi everybody...

I have a guestion. I want to produce time delay using
VHDL. If the input signal rises '1' from '0' , the output signal
must rise '1' from '0' after 5 seconds. If the input signal
falls '0' from '1' , the output signal must fall '0' from '1' after
5 seconds. How can I produce this time delay ? if you help me,
you will make me happy.

Thanks in advance...
 

using time delay

Hi man,

use word "after"

Look at

**broken link removed**

Bye
 

Re: using time delay

Hi

This entity is a simple inverter with a delay
ENTITY inv IS
PORT (
i1: IN BIT;
o1: OUT BIT
);
END inv;
ARCHITECTURE single_delay OF inv IS
BEGIN
o1 <= NOT i1 AFTER 5 NS;
END single_delay;
 

Re: using time delay

Hi

Again example :D

ENTITY and2 is
GENERIC(trise : delay := 10 ns;
tfall : delay := 8 ns);
PORT(a : IN level;
b : IN level;
c : OUT level);
END and2;


ARCHITECTURE behav OF and2 IS
BEGIN
one : PROCESS (a,b)
BEGIN
IF (a = '1' AND b = '1') THEN
c <= '1' AFTER trise;
ELSIF (a = '0' OR b = '0') THEN
c <= '0' AFTER tfall;
ELSE
c<= 'X' AFTER (trise+tfall)/2;
END IF;
END PROCESS one;

END behav;
 

Re: using time delay

hi all...

I want to use this program for synthesizing
the FPGA. I think, 'after' clause is used only
for simulation. Am I right? And I want to use
time delay 5 seconds or 10 seconds.

bye...
 

using time delay

Right, "after" clause is used only for simulation. So you see, it does not rely on the language how long delay occurs between the ouput signals and inputs. So you must look up for the device's support. Maybe I would use buf or other combinational logic to implement the 5 ns delay. At the end, this is not a good method and the accurate delay will be temperature relative.
 

Re: using time delay

after is useless for synthesizing.

i've seen an article abt how to delay.

the high frequency clk will be used to drive a shift register,
the input is the signal u want to delay,
configurating the register according to the delay time of the signal.
the output is the delay signal.

but this method will cause error,so we can resample the signal with data clk.
 

Re: using time delay

Here is what you want, attached is a syntheziable code for a delay element The load is the input signal and done is the output one. change the counter length to get dufferent delays
( Delay = CounterLengthxClok period)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top