Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- Thats sounds plausible - have a go and come back here when you're having problems with your code. --- Quote End --- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.all; entity barrel_shifter_8bit is Port ( data: in std_logic_vector(7 downto 0); data_out: out std_logic_vector(7 downto 0); ctrl: in std_logic_vector(2 downto 0) ); end barrel_shifter_8bit; architecture Behavioral of barrel_shifter_8bit is begin with ctrl select data_out<= data(0)& data(7 downto 1) when "001", data(1 downto 0)& data(7 downto 2) when "010", data(2 downto 0)& data(7 downto 3) when "011", data(3 downto 0)& data(7 downto 4) when "100", data(4 downto 0)& data(7 downto 5) when "101", data(5 downto 0)& data(7 downto 6) when "110", data(6 downto 0)& data(7) when "111", data when others; end architecture Behavioral; -----This is what I have so far I'm stuck on transfering the output to the next column of the barrel shifter.