B
Brad Smallridge
Guest
Hello,
For a while I have been using this verbose
conversion code with numeric_std:
my_std_logic_vector <= std_logic_vector(to_unsigned (
my_natural_constant,my_std_logic_vector'length));
Recently, I discovered that Xilinx ISE and ModelSim will
accept this with std_logic_unsigned:
my_std_logic_vector <= "00000000" + my_natural_constant;
which I think is a lot easier to look at.
My question is which method, if either, is best?
Also can I have both numeric_std and std_logic_unsigned
in a module without any issues?
Brad Smallridge
AiVision
For a while I have been using this verbose
conversion code with numeric_std:
my_std_logic_vector <= std_logic_vector(to_unsigned (
my_natural_constant,my_std_logic_vector'length));
Recently, I discovered that Xilinx ISE and ModelSim will
accept this with std_logic_unsigned:
my_std_logic_vector <= "00000000" + my_natural_constant;
which I think is a lot easier to look at.
My question is which method, if either, is best?
Also can I have both numeric_std and std_logic_unsigned
in a module without any issues?
Brad Smallridge
AiVision