Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - For loop delay???

 
Thread Tools Search this Thread
Old 06-15-2009, 04:39 AM   #1
Default For loop delay???


Hi all,

If I assign a signal before a long for loop in a process, will that signal wait until the end of the process to take place?

ie process (a) is
variable cnt : std_logic_vector(0 to 15) := X"0000";
begin
active <= '1';
for i 0 to 1000 loop
cnt := cnt + a;
end loop;
end process;

What if I want "active" take place once the process is activated and I don't want ot wait for the 1000 loop and reach the end of the process?

Regards.


krkrkr
krkrkr is offline   Reply With Quote
Old 06-15-2009, 01:22 PM   #2
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
Will this be code for simulation or for synthesize (hardware implementation)
????


jeppe
jeppe is online now   Reply With Quote
Old 06-15-2009, 01:36 PM   #3
krkrkr
Junior Member
 
Join Date: Jun 2009
Posts: 7
Default
Its for hardware implimentation.


krkrkr
krkrkr is offline   Reply With Quote
Old 06-15-2009, 02:16 PM   #4
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
OK - You must understand some basic principles behind VHDL.
You can't create delays in hardware with a loop statement.

In order to get fixed delays must you have a clock signal (with a fixed frequency)


jeppe
jeppe is online now   Reply With Quote
Old 06-15-2009, 03:23 PM   #5
krkrkr
Junior Member
 
Join Date: Jun 2009
Posts: 7
Default
Thanks Jeppe for your reply.

But I'm not looking to make a delay, I'm new to VHDL and I would like to understand the process concept.
I read that signal assignment in a process will take place at the end of the process, so what if I have a long for loop after the signal assignment? does that mean the signal assignment will not take place except when the for loop and all other statments finished?

If I want to design a logic that gives an active '1' once it comes in the process then do some other statments in the process, will this active signal comes to '1' just when it get in the process or at the end after all other statments in the process?

Regards.


krkrkr
krkrkr is offline   Reply With Quote
Old 06-15-2009, 10:06 PM   #6
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
Hi Krkrkr
In that case will you get my "standard answer"
Search the net for the free interactive book on VHDL EVITA from actel
Specially chapter 6 will answer your questions about processes and signals

And yes your right - the loop will have to end before the assignment takes places - but in hardware will the loop not exist.

Jeppe


jeppe
jeppe is online now   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
loop according to the delay kavidream24 Software 0 12-23-2008 02:18 AM
Toshiba to delay HD DVD player launch Allan DVD Video 12 12-27-2005 03:45 PM
Toshiba hints at HD DVD launch delay. Allan DVD Video 3 09-02-2005 03:32 AM
Bush administration will delay major assaults until after U.S. elections jasmine DVD Video 9 10-14-2004 12:30 AM
Disney Treasures 3 Delay: Tin Can Alley. Scot Gardner DVD Video 0 11-16-2003 11:56 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46