![]() |
|
|
|||||||
![]() |
VHDL - cant interrupt sub program call ERROR!!!! for conversion. |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
A part for the fullfilment of my B.E degree i am supposed to do a
project.My current project involves the correlation of very high frequencu data using MAX PLUS II 10.2(2) version. While compilation i came across an error that is hindering us to proceed us further. The program goes like this for conversion of std_logic_vetor to integer. This is part of my program. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity bv_to_natural is generic(n:natural := port (alw: std_logic_vector(n-1 downto 0));--input to be converted to integer. end entity; architecture bv of bv_to_natural is begin process variable int_alw : integer:=0; begin for index in 0 to n-1 loop int_alw:= ((int_alw )+((2**(index))*(alw(index)))); --performing the operation for conversion. end loop ; end process; end architecture bv; ur suggestion will be of immense help to me.please reply..... prabhu |
|
|
|
|
#2 |
|
Posts: n/a
|
prabhu wrote:
> While compilation i > came across an error that is hindering us to proceed us further. The > program goes like this for conversion of std_logic_vetor to integer. > This is part of my program. > > library ieee; > use ieee.std_logic_1164.all; > use ieee.std_logic_arith.all; > > entity bv_to_natural is > generic(n:natural := > port (alw: std_logic_vector(n-1 downto 0));--input to be converted to > integer. > end entity; You want to have "alw" converted to type integer, won't you? I use the following package: use IEEE.numeric_std.all; (Package ieee.std_logic_arith.all is not recommended, because, it's not standardisized.) With this package the conversion is easy: alw_int<=to_integer(unsigned(alw)); or, if "alw" is a signed value alw_int<=to_integer(signed(alw)); With Package ieee.std_logic_arith.all there is a similar way, but I don't remember the correct names of the conversion functions. Look into the package. Ralf Ralf Hildebrandt |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TRADING FEMALE CELEB INTERVIEWS ON DVD | stu | DVD Video | 1 | 05-26-2008 09:39 AM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 10:47 AM |
| Please try this | Rob | DVD Video | 1 | 08-13-2006 10:43 AM |
| Been around for a while but very effective | Paul | A+ Certification | 0 | 02-29-2004 12:14 PM |
| Re: free email addresses finding program (files included) | Leonardo | A+ Certification | 1 | 12-05-2003 03:51 PM |