Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Synthesis erron for "bit'val" attribute....plz chek

Reply
Thread Tools

Synthesis erron for "bit'val" attribute....plz chek

 
 
Dunce by face...
Guest
Posts: n/a
 
      01-19-2006
hi all i am using this function to convetr integer to bitvector and
Synplify gives error

pack.vhd(25): type bit needs a syn_enum_encoding attribute of
"sequential" @E:"c:\synthesis\one\pack.vhd":25:22:25:29

code is here:- please have a look
-------------------------------------------------------------------
PACKAGE convert is
function int_to_bv(int : in integer) return bit_vector;
END convert;
PACKAGE BODY convert is

function int_to_bv(int : in integer) return bit_vector is
variable temp : integer;
variable result : bit_vector(0 to 8-1);

begin
if int < 0 then
temp := -(int+1);
else
temp := int;
end if;
for index in result'reverse_range loop
result(index) := bit'val(temp rem 2);
temp := temp / 2;
end loop;
if int < 0 then
result := not result;
result(result'left) := '1';
end if;
return result;
end int_to_bv;
end convert;
-------------------------------------------------------------
best regards,
mirza

 
Reply With Quote
 
 
 
 
Dunce by face...
Guest
Posts: n/a
 
      01-19-2006
Thanks every one, I got that "rem" is not supported by synthesis.

 
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
call of overloaded func() is ambiguous - Erron in gcc vinay.muthyal C++ 0 02-26-2008 05:59 AM
chek where mouse is sandip.dhamapurkar@gmail.com Javascript 7 04-05-2006 07:56 AM
Partition Erron on install =?Utf-8?B?Qm9iIFQu?= Windows 64bit 1 11-05-2005 07:44 PM
Can RangeValidator Chek emtpy value ad ASP .Net 1 07-15-2005 11:19 AM
How to chek if USB port is mounted in linux? KimHoon C Programming 4 09-20-2003 02:33 AM



Advertisments