29th September 2007, 08:35 #1
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..........
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));
architecture arch_rotate_operator of rotate_operator is
process(A , k)
o <= ((A ror k) or (A rol k));
29th September 2007, 08:35
29th September 2007, 10:40 #2
Newbie level 6
rol can not have such operands in this context.
How did you define the ror & rol functions ?
29th September 2007, 10:40
1st October 2007, 11:59 #3
ror can not have such operands in this context
Mate, I cannot help you with your code, nevertheless, I have written two functions i.e 'crr' and 'crl' which will do what you want. If you like, feel free to use them
And here they are:
1st October 2007, 11:59
1st October 2007, 12:19 #4
ror en vhdl
- Check if you included the library wich contain the function rors and rols.
- How did you the rotating fucntions. Perhaps errors are there
4th October 2007, 13:03 #5
Full Member level 3
Rotate_operator in VHDL
ROtate separately ,assign to signal temp and then perform oring not simulatnously. plz try this.