Simulation problem using CONV_INTEGER

I have the following code:

signal busy_condition : std_logic; signal high_registered : std_logic_vector(1 downto 0); signal high_current : std_logic_vector(1 downto 0);

busy_condition CONV_INTEGER(high_registered)) ELSE '0';

During simulation high_registered become "10" and high_current = "00". However busy_condition is high impedence. Is there someone that can explain me what is my error? Thanks a lo Gio

Reply to
Giox
Loading thread data ...

"Giox" a écrit dans le message de news:

Which library do you use? Signed or unsigned? If you use ieee.std_logic_signed.all, the CONV_INTEGER ("10") is a negative number.

Change your library or add a sign bit like this:

busy_condition CONV_INTEGER('0'&high_registered)) ELSE '0';

Dan.

Reply to
Dan NITA

The basic problem is that you are using non-standard libraries to make your code ambiguous. Is "10" a positive number or a negative one?

Using "ieee.numeric_std" you would make the signals in question either signed or unsigned, according to what your code is meant to do, and simplify the expression to

busy_condition high_registered ELSE '0';

- Brian

Reply to
Brian Drummond

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.