Junus2012
Advanced Member level 5
- Joined
- Jan 9, 2012
- Messages
- 1,552
- Helped
- 47
- Reputation
- 98
- Reaction score
- 53
- Trophy points
- 1,328
- Location
- Italy
- Activity points
- 15,235
Dear friends
I am trying to use the shift operation to implement ring counter in vhdl, but always the simulator showing me error about using the ror
this is my code and I look for your help
I am trying to use the shift operation to implement ring counter in vhdl, but always the simulator showing me error about using the ror
this is my code and I look for your help
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;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity roror is
Port ( clk : in STD_LOGIC;
rst : in STD_LOGIC;
q : out STD_LOGIC_VECTOR (3 downto 0));
end roror;
architecture Behavioral of roror is
signal a : std_logic_vector (3 downto 0);
signal b : std_logic_vector (3 downto 0);
begin
a<= "1000";
process (clk, rst)
begin
if (clk' event and clk = '1')then
b <= a ror 3;
end if;
end process;
q <= b;
end Behavioral;