Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > CONV_INTEGER problems

Reply
Thread Tools

CONV_INTEGER problems

 
 
Giox
Guest
Posts: n/a
 
      02-12-2006
Hello everybody, I have the followin code:

LIBRARY ieee;

USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all

......SNIP.....
signal high_registered : std_logic_vector(1 downto 0);
signal high_current : std_logic_vector(1 downto 0);

......SNIP.....

busy_condition <= '1' WHEN CONV_INTEGER(high_registered) >
CONV_INTEGER(high_current)
ELSE '0';
......SNIP.....

During simulation:
high_registered "10";
high_current "00";

The resulting busy_condition is Z.... what's wrong?
Any help will be appreciated
Gio

 
Reply With Quote
 
 
 
 
Arnaud
Guest
Posts: n/a
 
      02-12-2006
I suggest that you simply used a conversion to unsigned instead of the
non standard function conv_integer:

busy_condition <= '1' WHEN unsigned(high_registered) >
unsigned(high_current)
ELSE '0';

I also suggest that you used library ieee.numeric_std.all; instead of
ieee.std_logic_arith.all;

Regards,

Arnaud

 
Reply With Quote
 
 
 
 
anupam
Guest
Posts: n/a
 
      02-13-2006
hi,
The library arith has both signed and unsigned defined in it so while
converting to interger ,you need to specify that your std_logic is
signed or unsigned ....

Just include "use ieee.std_logic_unsigned.all" or "use
ieee.std_signed.all" to make it happen

regards,
Anupam Jain

 
Reply With Quote
 
Giox
Guest
Posts: n/a
 
      02-13-2006
Thanks a lot now it works !

 
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
A problem with conv_integer ThWolf VHDL 2 12-15-2008 02:36 PM
conv_integer for unsigned value Clemens VHDL 9 07-14-2008 05:10 PM
conv_integer simulation whining in ISE nfirtaps VHDL 8 11-17-2006 01:37 AM
CONV_INTEGER ERROR ted.franklin3@gmail.com VHDL 4 10-18-2006 10:41 PM
Re: sound problems and modem problems Harold Potter Computer Support 5 12-04-2003 04:12 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57