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

Reply

VHDL - Signal assignment inside for loop

 
Thread Tools Search this Thread
Old 06-14-2009, 02:52 AM   #1
Default Signal assignment inside for loop


Hello all,
I'm new to VHDL and having a problem.

I know that signal assignment does not take effect until the end of the process unlike the variable assignment.
ie cnt <= cnt +1;
out <= cnt;
If cnt is a signal then out will have the value of cnt before adding 1.

My problem is I want to have same kind of signal assignment inside a for loop
ie for i 0 to 2 loop
cnt <= cnt +1;
end loop;

cnt is a signal, how can i do that and have the right cnt value?

Thanks.


krkrkr
krkrkr is offline   Reply With Quote
Old 06-17-2009, 09:21 AM   #2
debayan_p
Junior Member
 
Join Date: Jun 2009
Posts: 17
Default
for i 0 to 2 loop
cnt <= cnt +1;
end loop;

The above is ok if you declare 'cnt' as a variable. Is it necessary to declare it as a signal ?

Later when ur looping is complete you can saaign the variable 'cnt' to a signal or an output port.


debayan_p
debayan_p is offline   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
Cisco VPN Restrict Access by IP ? samirise Hardware 1 12-16-2007 03:17 PM
Spoke to Spoke Enhanced Config (ASA-PIX) NEED HELP ASAP!! T-Mak Hardware 1 10-27-2006 11:56 AM
Pix506e behind Cisco1841 VPN problem aimeruko Hardware 0 09-27-2006 08:10 AM
Cisco 1841 and Pix506e VPN aimeruko General Help Related Topics 0 09-26-2006 08:50 AM
PIX 506e config via PDM mbvales General Help Related Topics 1 08-29-2006 10:54 AM




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