Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Rotate_operator in VHDL

Status
Not open for further replies.

swapnil_vlsi

Full Member level 1
Joined
Jul 18, 2007
Messages
95
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,288
Activity points
1,900
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
 

rol can not have such operands in this context.

How did you define the ror & rol functions ?
 

ror en vhdl

Hi,
- Check if you included the library wich contain the function rors and rols.
- How did you the rotating fucntions. Perhaps errors are there
 

ROtate separately ,assign to signal temp and then perform oring not simulatnously. plz try this.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top