---
+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Full Member level 1
    Points: 1,550, Level: 8

    Join Date
    Jul 2007
    Posts
    95
    Helped
    7 / 7
    Points
    1,550
    Level
    8

    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

    •   Alt29th September 2007, 07:35

      advertising

        
       

  2. #2
    2M
    2M is offline
    Newbie level 6
    Points: 1,001, Level: 7

    Join Date
    Aug 2007
    Posts
    11
    Helped
    0 / 0
    Points
    1,001
    Level
    7

    rol can not have such operands in this context.

    How did you define the ror & rol functions ?



    •   Alt29th September 2007, 09:40

      advertising

        
       

  3. #3
    Banned
    Points: 4,650, Level: 16

    Join Date
    Nov 2005
    Location
    Fleet, UK
    Posts
    413
    Helped
    89 / 89
    Points
    4,650
    Level
    16

    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:
    http://www.vlsiip.com/vhdlf.html
    Kr,
    Avi
    http://www.vlsiip.com



    •   Alt1st October 2007, 10:59

      advertising

        
       

  4. #4
    Banned
    Points: 5,691, Level: 17

    Join Date
    Sep 2007
    Posts
    855
    Helped
    74 / 74
    Points
    5,691
    Level
    17

    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



  5. #5
    Full Member level 3
    Points: 1,772, Level: 9

    Join Date
    Aug 2007
    Posts
    157
    Helped
    8 / 8
    Points
    1,772
    Level
    9

    Rotate_operator in VHDL

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



+ Post New Thread
Please login