+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Advanced Member level 5
    Points: 12,407, Level: 26

    Join Date
    Aug 2011
    Posts
    2,505
    Helped
    288 / 288
    Points
    12,407
    Level
    26

    VHDL Barrel Shifter using SLL and SRL

    Hello,

    In VHDL - is it allowed for the argument to the right of the SLL and SRL operators to be a signal (and not a constant) ?

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 5
    Points: 36,169, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,614
    Helped
    1927 / 1927
    Points
    36,169
    Level
    46

    Re: VHDL Barrel Shifter using SLL and SRL

    The quick answer is "Yes" (wondering why you didnt just try it!)
    SLL and SRL are functions, so all function parameters are constants. Constant function paramters can be connected to objects of any class (signal/variable/constant). Their values are copied into the function when it is called.

    Dont expect good synth results if you try and do variable shifting though.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 5
    Points: 12,407, Level: 26

    Join Date
    Aug 2011
    Posts
    2,505
    Helped
    288 / 288
    Points
    12,407
    Level
    26

    Re: VHDL Barrel Shifter using SLL and SRL

    (wondering why you didnt just try it!)
    Oh sorry,
    Forgot to mention - I did simulate it before posting...and it worked
    What I really wanted to ask is about the synthesis support of tools - which you also answered...



--[[ ]]--