swapnil_vlsi
Full Member level 1

rol can not have such operands in this context
in my code i have to rotates the data left/right by a variable amount k.
but it shows me Error ...The error is ror and rol can not have such operands in this context............
Can any one do tell me how can i remove this error........
my code is..........
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.NUMERIC_BIT.ALL;
entity rotate_operator is
generic(w: integer :=8; size: integer :=3);
port(A : in std_logic_vecor(w-1 downto 0);
k : in std_logic_vecor(size-1 downto 0);
o : out std_logic_vecor(w-1 downto 0));
end rotate_operator;
architecture arch_rotate_operator of rotate_operator is
begin
process(A , k)
begin
o <= ((A ror k) or (A rol k));
end arch_rotate_operator
in my code i have to rotates the data left/right by a variable amount k.
but it shows me Error ...The error is ror and rol can not have such operands in this context............
Can any one do tell me how can i remove this error........
my code is..........
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.NUMERIC_BIT.ALL;
entity rotate_operator is
generic(w: integer :=8; size: integer :=3);
port(A : in std_logic_vecor(w-1 downto 0);
k : in std_logic_vecor(size-1 downto 0);
o : out std_logic_vecor(w-1 downto 0));
end rotate_operator;
architecture arch_rotate_operator of rotate_operator is
begin
process(A , k)
begin
o <= ((A ror k) or (A rol k));
end arch_rotate_operator