title: Add a clear/reset input to a when select statement in VHDL
body: <p>I am hoping to get some help on how to add a clear or reset input to this code so at any time when the clr input is a <code>1</code> then the_output_S resets to <code>0000</code>. This code works great to run through the truth table I need it to but I can't seem to figure out any kind of clear input that works properly. I tried to add a with clr_S select <code>the_output_S &lt;= "0000"</code> when <code>1</code>, <code>the_output_S</code> when <code>0</code>, <code>XXXX</code> when others; I'm just not sure how to point to my truth table when clr is '0'. Any suggestions on how to add this would be appreciated. Thank you</p>
  
  <pre><code>library IEEE;
  
      use IEEE.std_logic_1164.all;
      use IEEE.std_logic_arith.all;
      use IEEE.std_logic_unsigned.all;
  
  Entity Design_Proj_8K is
  port(
      --clr : in std_logic;
  
      INA : in std_logic;
      INB : in std_logic;
      INC : in std_logic;
      IND : in std_logic;
      INE : in std_logic);
  
  end Design_Proj_8K;
  
   architecture Behaviroal of Design_Proj_8K is
  
   signal the_input_S: std_logic_vector (4 downto 0);
   signal the_output_S: std_logic_vector (3 downto 0);
   --signal clr_S: std_logic;
  
  begin
  
  --clr_S &lt;= clr;
  
  the_input_S &lt;= INA &amp; INB &amp; INC &amp; IND &amp; INE;
  
  with the_input_S select
                      the_output_S &lt;= 
                      "0000" when "00000",
                      "0000" when "00001",
                      "0000" when "00010",
                      "0001" when "00011",
                      "0001" when "00100",
                      "0001" when "00101",
                      "0010" when "00110",
                      "0010" when "00111",
                      "0010" when "01000",
                      "0011" when "01001",
                      "0011" when "01010",
                      "0011" when "01011",
                      "0100" when "01100",
                      "0100" when "01101",
                      "0100" when "01110",
                      "0101" when "01111",
                      "0101" when "10000",
                      "0101" when "10001",
                      "0110" when "10010",
                      "0110" when "10011",
                      "0110" when "10100",
                      "0111" when "10101",
                      "0111" when "10110",
                      "0111" when "10111",
                      "1000" when "11000",
                      "1000" when "11001",
                      "1000" when "11010",
                      "1001" when "11011",
                      "XXXX" when others;
  
  
  end Behaviroal; 
  </code></pre>