apanimesh061
Newbie level 3
- Joined
- Mar 19, 2011
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,299
Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.NUMERIC_STD.ALL;
entity SU_4bit is
port( s : in std_logic_vector(3 downto 0);
a : inout std_logic_vector(3 downto 0):= "0000"
--o : inout std_logic_vector(3 downto 0):= "0000"
);
end SU_4bit;
architecture Behavioral of SU_4bit is
begin
-- signal
process(a,s)
begin
case s is
when "1000" =>
a<= a srl 1;
when "1001" =>
a<= a ror 1;
when "1011" =>
a<= a sra 1;
when others =>
a<= "0000" ;
end case;
end process;
end Behavioral;
Help me debug the errors ...... I wish to use the Shift operators !!!! ????