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.

any instruction for delay

Status
Not open for further replies.

j hemangini

Member level 1
Joined
Jul 21, 2008
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,573
I want to give fixed 10ms delay in any code . How can i write this in vhdl code ?
Is there any direct instruction?
please reply.
 

vidyaredy

Member level 2
Joined
Jan 31, 2008
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,716
hi,

u can use "after 10ms" if u r interested only in simulating ur design, bcz its not synthesizable. Else u may need to write a code either using counter of shift reg to generate particular delay with respect to clock.
 

lordsathish

Full Member level 5
Joined
Feb 11, 2006
Messages
247
Helped
33
Reputation
66
Reaction score
3
Trophy points
1,298
Location
Asia
Activity points
2,698
If you have a faster clock and the you can use a FIFO to hold the data...
 

mmarco76

Member level 5
Joined
Jan 4, 2008
Messages
85
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,286
Activity points
1,937
I can't understand the question..
I mean VHDL is not a programming language..
Think what you wanna do in terms of flip-flops and memory and then write..
If you wanna do something after 10ms, you need to instanziate a counter that trigger after 10ms and use the counter value to start your event.
 

satish_mahankali

Newbie level 3
Joined
Jun 9, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
u can use after ,wait to generate delays...but these are not synthesizable ...
 

lucbra

Advanced Member level 2
Joined
Oct 30, 2003
Messages
514
Helped
73
Reputation
146
Reaction score
63
Trophy points
1,308
Location
Belgium
Activity points
3,251
why should you do that?

BTW every book that handles VHDL demonstrates at least the 'after' instruction and also tells that this function is not synthesisable (i.e. cannot be implemented in real hardware)
 

sprao

Member level 1
Joined
Dec 7, 2006
Messages
32
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,288
Activity points
1,464
If you are asking in hardware point of view then this is the answer.
There is no instruction in any HDL to get a specified delay from hardware.
To get a specified delay you need to use a counter in your code. From that you have to calculate the counter value with reference to your clock period.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top