title: How can I index into a vhdl std_logic_vector?
body: <p>I have the following declarations:</p>
  
  <pre><code>signal count:STD_LOGIC_VECTOR (3 downto 0);
  signal txbuff:STD_LOGIC_VECTOR (7 downto 0);
  </code></pre>
  
  <ol>
  <li>dout is a <code>std_logic</code> output</li>
  <li>I am using <code>IEEE.NUMERIC_STD.ALL</code>;</li>
  </ol>
  
  <p>I want to use the vector count as an index into txbuff.  Among the many things I've tried is the following:</p>
  
  <pre><code>count&lt;=std_logic_vector(unsigned(count)-1);
  dout&lt;=txbuff(unsigned(count));
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <blockquote>
    <p>Line 99. Wrong index type for txbuff.</p>
  </blockquote>