+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Advanced Member level 5
    Points: 12,725, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,562
    Helped
    300 / 300
    Points
    12,725
    Level
    27

    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,712, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,704
    Helped
    1954 / 1954
    Points
    36,712
    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,725, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,562
    Helped
    300 / 300
    Points
    12,725
    Level
    27

    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...



--[[ ]]--