title: Creating a vector with other vector`s index as elements in VHDL
body: <p>I have a std_logic_vector like this one as input: v1 = "10001010" and I want to create another vector like this one: v2 = X"00000731", where X"7", X"3", and X"1" represent the index of the first vector (v1) where the value is '1'.</p>
  
  <p>v1(1) = '1', v1(2) = '0', v1(3) = '1', etc.</p>
  
  <p>Please help me with some coding examples that can create v2.</p>