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

Reply

VHDL - std_logic_vector representing one bit

 
Thread Tools Search this Thread
Old 02-25-2004, 01:34 PM   #1
Default std_logic_vector representing one bit


Hi,

I have the following problem, maybe I am to blind to see
the solution )


signal declaration:

signal li3_q : std_logic_vector(0 downto 0);

The signal was created that way when instantiating a RAM component.

How can I do an if-then-else?


if li3_q='1' then
...
else
....
end if;

The compiler (Altera QuartusII) says:
"Error: VHDL error at ... : can't determine definition of operator "="
-- found 0 possible definitions"

Would be thankful for any explanation.

Kind regards

Andrés V.


ALuPin
  Reply With Quote
Old 02-25-2004, 01:41 PM   #2
valentin tihomirov
 
Posts: n/a
Default Re: std_logic_vector representing one bit
Vector is not the same as a signal. Try if VEC = "1" then or VEC = (others
=> '1').




valentin tihomirov
  Reply With Quote
Old 02-25-2004, 01:41 PM   #3
Egbert Molenkamp
 
Posts: n/a
Default Re: std_logic_vector representing one bit
It is a vector .. so you should treat it as a vector : if li3_q="1"
or if li3_q(0)='1'

Egbert Molenkamp


"ALuPin" <> wrote in message
news: om...
> Hi,
>
> I have the following problem, maybe I am to blind to see
> the solution )
>
>
> signal declaration:
>
> signal li3_q : std_logic_vector(0 downto 0);
>
> The signal was created that way when instantiating a RAM component.
>
> How can I do an if-then-else?
>
>
> if li3_q='1' then
> ...
> else
> ....
> end if;
>
> The compiler (Altera QuartusII) says:
> "Error: VHDL error at ... : can't determine definition of operator "="
> -- found 0 possible definitions"
>
> Would be thankful for any explanation.
>
> Kind regards
>
> Andrés V.





Egbert Molenkamp
  Reply With Quote
Old 02-25-2004, 08:41 PM   #4
Egbert Molenkamp
 
Posts: n/a
Default Re: std_logic_vector representing one bit

"valentin tihomirov" <> schreef in
bericht news:c1i8mg$1jaanc$...
> Vector is not the same as a signal. Try if VEC = "1" then or VEC = (others
> => '1').
>

if VEC = (others => '1') then ..

is not correct. Correct is:

if VEC=(VEC'RANGE=>'1') then
(but I'm not sure if MaxPlus supports this).

Egbert Molenkamp






Egbert Molenkamp
  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




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