"Andreas H?lscher" <> wrote in message
news: om...
> Hi,
> I have code like this:
>
> cs_reg <= '1' when Adr = conv_std_logic_vector(21,
else '0';
>
> To get my code more readable I want to use hexadecimal numbers for the
> address. I tried to replace the 21 with 0x15, 15h, x"15" but nothing
> works.
>
> Any hint?
>
> Thanks,
> Andreas
X"15" does work but the target type has to be of bit_vector.
------------------------------------
signal Adr: bit_vector(7 downto 0);
cs_reg<='1' when Adr=X"15" else '0';
------------------------------------
The conversion function to_bitvector is found in the package std_logic_1164
and converts type std_logic_vector and std_ulogic_vector.
Matt