Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > maxplusII error: a deferred constant declaration without a full declaration is not supported

Reply
Thread Tools

maxplusII error: a deferred constant declaration without a full declaration is not supported

 
 
Noah
Guest
Posts: n/a
 
      04-07-2006
hi, all,
this describes a logic_vector to integer converter function.
and I comiple it in maxplusII student edition, but I found an error:
"unsupported feature error: a deferred constant declaration without a
full declaration is not supported"
but while I synthesis it in quartusII 5.1sp1, it success...

so what's wrong in maxplusII student editon? it's about packages
supported? or something else?

thanks.
follow is the code section:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity vectorToInt is
port(
vector : in std_logic_vector(4 downto 0);
int : out integer range 0 to 31
);
end entity vectorToInt;

architecture behave of vectorToInt is
function VIConvert(vectorIn : std_logic_vector(4 downto 0)) return
integer is
variable intOut : integer;
variable temp : integer;
begin
intOut := 0;
for i in 0 to 4 loop
temp := 1;
if vectorIn(i) = '1' then
if i = 0 then
intOut := intOut + 1;
else
for j in 1 to i loop
temp := temp * 2;
-- since maxplusII student edition doesn't support operator
**, just use * instead here.
end loop;
intOut := intOut + temp;
end if;
elsif vectorIn(i) = '0' then
intOut := intOut;
else
intOut := 0;
end if;
end loop;
return intOut;
end function VIConvert;

signal vectorIn : std_logic_vector(4 downto 0);
begin
vectorIn <= vector;
process(vectorIn)
begin
int <= VIConvert(vectorIn);
end process;
end behave;

 
Reply With Quote
 
 
 
 
Noah
Guest
Posts: n/a
 
      04-07-2006
and another problem:
sometimes in maxplusII student edition, while compile, an error point
to varialbe defination in function part. error message as follow:
non locally static bounds are not supported.

but it is also disappeared if I synthesis the code in quartusII.
what's wrong with maxplusII ... I really can't find them...

thanks!

-- Noah

 
Reply With Quote
 
 
 
 
Ralf Hildebrandt
Guest
Posts: n/a
 
      04-07-2006
Noah wrote:

> this describes a logic_vector to integer converter function.


Why do you need this?

With IEEE.Numeric_std you can simply use:

my_int<=to_integer(unsigned(my_std_logic_vector));
my_int<=to_integer(signed(my_std_logic_vector));


Even with std_logic_arith a similar way of conversion exists.
Nevertheless std_logic_arith as well as std_logic_unsigned are *not*
recommended, because they are not standard functions.

Ralf
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      04-07-2006
Noah wrote:

> what's wrong with maxplusII ... I really can't find them...


MAXplus2 is obsolete and unusable for vhdl synthesis.
Try the free version of quartus here.
http://www.altera.com/products/softw...arwebmain.html

-- Mike Treseler
 
Reply With Quote
 
Noah
Guest
Posts: n/a
 
      04-07-2006
yeah, I know some functions come with libraries

but I just learn about sub programs. and unfortunately, just encoutner such
problems... and want to know the solution ...

thanks!

-- Noah

"Ralf Hildebrandt" <(E-Mail Removed)>
??????:(E-Mail Removed)...
> Noah wrote:
>
>> this describes a logic_vector to integer converter function.

>
> Why do you need this?
>
> With IEEE.Numeric_std you can simply use:
>
> my_int<=to_integer(unsigned(my_std_logic_vector));
> my_int<=to_integer(signed(my_std_logic_vector));
>
>
> Even with std_logic_arith a similar way of conversion exists. Nevertheless
> std_logic_arith as well as std_logic_unsigned are *not* recommended,
> because they are not standard functions.
>
> Ralf



 
Reply With Quote
 
Noah
Guest
Posts: n/a
 
      04-07-2006
yeah. I have also used quartusII to synthesis the code. it's totally ok.
but for some reasons, I have to use maxplusII student edition... so...

thanks!

--Noah

"Mike Treseler" <(E-Mail Removed)>
??????:(E-Mail Removed)...
> Noah wrote:
>
>> what's wrong with maxplusII ... I really can't find them...

>
> MAXplus2 is obsolete and unusable for vhdl synthesis.
> Try the free version of quartus here.
> http://www.altera.com/products/softw...arwebmain.html
>
> -- Mike Treseler



 
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
Asynchronous load of non constant data for is not supported Steffen VHDL 1 03-17-2011 09:16 PM
Deferred constant in package hssig VHDL 7 12-03-2009 05:55 PM
Deferred packets on a full duplex link Ken Stumpf Cisco 5 09-26-2005 09:22 PM
Re: [Twisted-Python] xmlrpc deferred Jp Calderone Python 0 05-27-2005 07:46 PM
deferred decorator Bryan Python 3 12-09-2004 09:34 AM



Advertisments