Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Illegal concurrent statement?

1,418 views
Skip to first unread message

Philipp

unread,
Jul 4, 2008, 11:26:57 AM7/4/08
to
Hi

I wanna evaluate for each bit in the std_logic_vector I(14 downto 0) the
following espression:


for I in 0 to 14 loop
RanIB_tmp(I) <= '1' when
((DST(I)(conv_integer(std_logic_vector(OLD_Dest)))='1')
and
(CDT(conv_integer(std_logic_vector(OLD_Dest)))='1'))
else '0';
end loop;

However, when I try to run the code it tells me that I am using an
illegal concurrent statement? Anyone an idea how I could write this in
an loop so that I can save some copy & paste?

many thanks
Philipp

Mike Treseler

unread,
Jul 4, 2008, 12:14:53 PM7/4/08
to
Philipp wrote:

> However, when I try to run the code it tells me that I am using an
> illegal concurrent statement?

Maybe you forgot to put the loop inside a process.

kennhe...@sympatico.ca

unread,
Jul 4, 2008, 12:27:44 PM7/4/08
to

It looks like the original signal assignment was a concurrent
assignment, which is OK on its own inside an architecture body.
Changing the "for ... loop... end loop", which is a sequential form,
into a "for ... generate ... end generate", which is a concurrent
statement, should make this construct OK in the same context.

- Kenn

Dal

unread,
Jul 6, 2008, 12:09:12 AM7/6/08
to
The 'when ... else ...' is a concurrent signal assignment. If your
code is in a process then changing it to a 'if ... then ... else ...'
should fix the problem. If not in a process then using a generate as
suggested should also fix the problem.

Darrin

Luc

unread,
Jul 22, 2008, 8:06:21 AM7/22/08
to
I think recoding to:

for I in 0 to 14 loop

if (DST(I09conv_integer(std_logic_vector(OLD_Dest)))='1')
and
(CDT(conv_integer(std_logic_vector(OLD_Dest)00='1')) then
RANIB_tmp(I) <= '1';
else
RanIB_tmp(I) <= '0';
end if;
end loop;

this should do it. Both are now sequential statements ( need to place
in a process)
Otherwise use generate ... statement as posted before

Luc

On Fri, 04 Jul 2008 16:26:57 +0100, Philipp <Phil...@hotmail.com>
wrote:

0 new messages