0

What does the "SHR" stand for, am i right to assume that in "VHDL" it means shift to the right by 16 bits? My second question is how would i shift this to the right by 10 bits or to be honest by any btis

CoolDude
  • 131
  • 1
  • 2
  • 10
  • Check out [this](http://stackoverflow.com/questions/9018087/shift-a-std-logic-vector-of-n-bit-to-right-or-left) question – MTCoster Apr 13 '15 at 21:15

1 Answers1

1

It stands for shift right/left. It shifts for the specified amount of bits, not a constant 16 as you assumed.

These functions are defined for signed and unsigned. The problem is, it is defined in the library IEEE.std_logic_arith, which is not part of the VHDL standard. The equivalent standard library is IEEE.numeric_std, which defines shift_left and shift_right.

As MTCoster suggested, you can look up this question.

Community
  • 1
  • 1
Jonathan Drolet
  • 3,318
  • 1
  • 12
  • 23
  • The code that is in question is printed at the bottom; CURRENT_OUTPUT <= SHR(("100101001110" * CURRENT_INPUT + "100101001110" * LAST_INPUT1 + "1110110101100011" * LAST_OUTPUT1), "10000"); – CoolDude Apr 14 '15 at 16:13
  • @bahjat I am sorry, what is this comment for? – Jonathan Drolet Apr 14 '15 at 16:16