title: VHDL coding error “Else clause after check for clock not supported”
body: <p>The function of the code is given an opcode, it will perform a task at the rising edge of the clock. I'm a second year undergrad student, so any help/input will be appreciated</p>
  
  <pre><code>library IEEE; 
  use IEEE.STD_LOGIC_1164.ALL;
  use IEEE.NUMERIC_STD.ALL;
  use IEEE.STD_LOGIC_UNSIGNED.ALL;
  entity ALU is   Port (
     X,Y     :IN BIT_VECTOR(2 downto 0);
     OPcode  :IN BIT_VECTOR(2 downto 0);
     Z       :OUT BIT_VECTOR(5 downto 0);
     CLK     :IN BIT;
     TempValX:INOUT BIT_VECTOR(5 downto 0)); 
  end ALU;
  architecture Circuit of ALU is signal g: BIT_VECTOR(3 downto 0);
  signal C: BIT_VECTOR(3 downto 0);
  signal p, u, r : bit_vector(2 downto 0);
  signal s: Bit_vector(5 downto 0);
  Component ThreeBitFA is
         PORT (X,Y   :IN BIT_VECTOR(2 downto 0);
                 C   :INOUT BIT_VECTOR(3 downto 0));
     end component; begin adder:ThreeBitFA port map(
             X =&gt; X,
             Y =&gt; Y,
             C =&gt; C);
  Process(X,Y,CLK,OPcode)
  begin
       IF OPcode = "000" THEN ----------------ADD OPcode
         IF (CLK'EVENT AND CLK = '1') THEN
             tempvalx &lt;= "00" &amp; C;
                       Z &lt;= tempvalx;
         end if;
       ELSIF OPcode = "001" THEN ----------------MULT OPcode
         IF (CLK'EVENT AND CLK = '1') THEN
            IF Y(0) = '1' THEN P &lt;= X; ELSE P &lt;= "000"; END IF;
            IF Y(1) = '1' THEN u &lt;= X; ELSE u &lt;= "000"; END IF;
            IF Y(2) = '1' THEN R &lt;= X; ELSE R &lt;= "000"; END IF;
         z(0) &lt;= P(0); 
         z(1) &lt;= P(1) XOR u(0); s(0) &lt;= P(1) AND u(0);
         z(2) &lt;= P(2) XOR u(1) XOR R(0) XOR s(0); s(1) &lt;= s(0) AND P(2); s(2) &lt;= u(1) AND R(0);
         z(3) &lt;= u(2) XOR R(1) XOR s(1) XOR s(2); s(3) &lt;= s(2) AND s(1); s(4) &lt;= u(2) AND R(1);
         z(4) &lt;= R(2) XOR s(3) XOR s(4); s(5) &lt;= s(3) AND s(4); 
         z(5) &lt;= s(5);
         end if;
  
       ELSIF (OPcode = "010") THEN ------------AND OPcode
         IF (CLK'EVENT AND CLK = '1') THEN
             Z &lt;= "000" &amp; (X AND Y);
         end IF;
       ELSIF (OPcode = "011") THEN ------------OR  Opcode
         IF (CLK'EVENT AND CLK = '1') THEN
             Z &lt;= "000" &amp; (X OR Y);
         end IF;
       ELSIF (OPcode = "100") THEN ------------XOR Opcode
         IF (CLK'EVENT AND CLK = '1') THEN
             Z &lt;= "000" &amp; (X XOR Y);
         end IF;
       ELSIF (OPcode = "101") THEN ------------NOT Opcode
         IF (CLK'EVENT AND CLK = '1') THEN
             Z &lt;= "000" &amp; (NOT X);
         end IF;
       ELSIF (OPcode = "110") THEN -----------Rshift OPcode
         IF (CLK'EVENT AND CLK = '1') THEN
             TempValX &lt;= "000" &amp; X;
             Z &lt;= '0' &amp; TempValX(5 downto 1);
       ELSIF (OPcode = "111") THEN -----------Lshift OPcode
         IF (CLK'EVENT AND CLK = '1') THEN
              TempValX &lt;= "000" &amp; X;
             Z &lt;= TempValX(4 downto 0) &amp; '0';
         end IF;   
       ELSE
            Null;
       END IF;  
     END IF; END Process; end Circuit;
  </code></pre>