Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- the only answer that i want (if is possible) is that: i can insert into a vector an integer number in two different position? for example number 31 ---> 1 into index 0 and 3 into index 1 --- Quote End --- Try this:
signal bcd : std_logic_vector(7 downto 0) := X"31";
signal hex_a_data : std_logic_vector(3 downto 0);
signal hex_b_data : std_logic_vector(3 downto 0);
-- Split the BCD value into two 4-bit values
hex_a_data <= bcd(3 downto 0);
hex_b_data <= bcd(7 downto 4);
Cheers, Dave