Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Capturing loop index some problems

Reply
Thread Tools

Capturing loop index some problems

 
 
Daku
Guest
Posts: n/a
 
      11-23-2009
Could some VHDL guru please shed some light as to what my problem
might be ?
In my architecture description I have :
ARCHITECTURE dataflow_view OF ram IS
CONSTANT MAX : integer := 32;
SIGNAL index : std_logic_vector (0 to 31);
SIGNAL position : integer RANGE 0 TO MAX - 1;

BEGIN
index <= (OTHERS => 0);
position <= 0;

RAM_0 : PROCESS( WEB )
VARIABLE head : INTEGER RANGE 0 TO MAX - 1;

BEGIN
head := 0;

IF (WEB='1' AND WEB'EVENT )
THEN IF (REB='0') THEN
IF (index(0) = '0') THEN
index(0) <= '1';
END IF;
END IF;
END IF;

END PROCESS RAM_0;

I am getting a compile time error message about illegal assignment.

My goal is to iterate over the elements of the std_logic_vector index,
and depending on whether it has value '0' set it to '1' and then
assign values to another signal. Could someone please point out what
the error might be ?
Any hints, suggestions would be of immense help. Thanks in advance for
your help.
 
Reply With Quote
 
 
 
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 346
 
      11-23-2009
In my architecture description I have :
ARCHITECTURE dataflow_view OF ram IS
CONSTANT MAX : integer := 32;
SIGNAL index : std_logic_vector (0 to 31) := (others =>'0');
SIGNAL position : integer RANGE 0 TO MAX - 1;

BEGIN
-- index <= (OTHERS => 0); -- This assignment not allowed together with the process assignment.
position <= 0;

RAM_0 : PROCESS( WEB )
VARIABLE head : INTEGER RANGE 0 TO MAX - 1;

BEGIN
head := 0;

IF (WEB='1' AND WEB'EVENT )
THEN IF (REB='0') THEN
IF (index(0) = '0') THEN
index(0) <= '1';
END IF;
END IF;
END IF;

END PROCESS RAM_0;

Hopefully will this help you
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Triple nested loop python (While loop insde of for loop inside ofwhile loop) Isaac Won Python 9 03-04-2013 10:08 AM
using message loop for hotkey capturing Alex Hall Python 2 10-16-2012 01:06 PM
sorting index-15, index-9, index-110 "the human way"? Tomasz Chmielewski Perl Misc 4 03-04-2008 05:01 PM
help with some capturing syntax Matt Williamson Perl Misc 12 07-09-2006 03:49 PM
Need some help with this capturing keys tmarkovski@gmail.com C++ 1 05-22-2006 01:55 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57