title: Found 1-bit latch for signal and constant value warnings
body: <p>I've been trying to debug this VHDL code for two days now, but I just don't see where's the error. Here is the code:</p>
  
  <pre><code>library IEEE;
  use IEEE.STD_LOGIC_1164.ALL;
  use IEEE.STD_LOGIC_ARITH.ALL;
  use IEEE.STD_LOGIC_UNSIGNED.ALL;
  
  
  entity SSDDriver is
      Port ( cp : in std_logic;
                iin : in std_logic;
                an : buffer std_logic_vector (3 downto 0);
                --7=a, 6=b ...
                segments: out std_logic_vector (7 downto 0));
  end SSDDriver;
  
  architecture Behavioral of SSDDriver is
      signal cpo : std_logic;
      --broj BCD znamenki
      constant BCD_NUMBERS : integer := 4;
      --broj bitova ulaznog broja
      constant BITS : integer := 14;
      --broj kodiran BCD-om
      signal BCDNumber : std_logic_vector (BCD_NUMBERS*4-1 downto 0) := (others =&gt; '0');
      signal BCDForDecoder: std_logic_vector (3 downto 0);
      signal number: integer range  0 to 9999;
  begin
      decoder: entity BCDToSSD port map (bcd =&gt; BCDForDecoder, segm =&gt; segments (7 downto 1));
      counter: entity djelitelj generic map (COUNTTO =&gt; 25000) port map (cpIn =&gt; cp, CpOut=&gt; cpo);
      --tocka je uvijek ugasena
      segments(0) &lt;= '1';
  
      process (iin)
      begin
          if iin='1' then
              number&lt;=3245;
          else
              number&lt;=1111;
          end if;
      end process;
  
      SwitchDisplay: process (cpo)
      begin
          if rising_edge(cpo) then
              if an="0111" then
                  an&lt;="1011";
                  BCDForDecoder&lt;=BCDNumber(11 downto 8);
              elsif an="1011" then
                  an&lt;="1101";
                  BCDForDecoder&lt;=BCDNumber(7 downto 4);
              elsif an="1101" then
                  an&lt;="1110";
                  BCDForDecoder&lt;=BCDNumber(3 downto 0);
              else
                  an&lt;="0111";
                  BCDForDecoder&lt;=BCDNumber(15 downto 12);
              end if;
          end if;
      end process SwitchDisplay;
  
      DoubleDabble: process (number)
          variable num : std_logic_vector (BITS-1 downto 0);
          variable bcd : std_logic_vector (BCD_NUMBERS*4-1 downto 0) := (others =&gt; '0');
          variable old_number: integer range 0 to 9999;
      begin
          if number/= old_number then
              num := conv_std_logic_vector(number, BITS);
  
              for i in 0 to BITS-1 loop
                  bcd(BCD_NUMBERS*4-1 downto 1) := bcd(BCD_NUMBERS*4-2 downto 0);  
                  bcd(0) := num(BITS-1);
                  num(BITS-1 downto 1) := num(BITS-2 downto 0);
                  num(0) :='0';
  
                  if(i &lt; BITS-1  and bcd(3 downto 0) &gt; "0100") then 
                      bcd(3 downto 0) := bcd(3 downto 0) + "0011";
                  end if;
  
                  if(i &lt; BITS-1 and bcd(7 downto 4) &gt; "0100") then 
                      bcd(7 downto 4) := bcd(7 downto 4) + "0011";
                  end if;
  
                  if(i &lt; BITS-1 and bcd(11 downto 8) &gt; "0100") then 
                      bcd(11 downto 8) := bcd(11 downto 8) + "0011";
                  end if;
  
                  if(i &lt; BITS-1 and bcd(15 downto 12) &gt; "0100") then 
                      bcd(15 downto 12) := bcd(15 downto 12) + "0011";
                  end if;
              end loop;
              BCDNumber &lt;= bcd;
          else
  
          end if;
  
          old_number := number;
      end process DoubleDabble;
  end Behavioral;
  </code></pre>
  
  <p>And here are generated warnings:</p>
  
  <blockquote>
    <p>WARNING:Xst:2734 - Property "use_dsp48" is not applicable for this
    technology. WARNING:Xst:1780 - Signal > is never used or
    assigned. WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 16-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:737 - Found 1-bit latch for signal .
    WARNING:Xst:2734 - Property "use_dsp48" is not applicable for this
    technology. WARNING:Xst:1426 - The value init of the FF/Latch bcd_0
    hinder the constant cleaning in the block SSDDriver. WARNING:Xst:1293
    - FF/Latch   has a constant value of 0 in block . WARNING:Xst:1293 - FF/Latch   has a constant value
    of 0 in block . WARNING:Xst:1293 - FF/Latch   has a
    constant value of 0 in block . WARNING:Xst:1293 - FF/Latch 
     has a constant value of 0 in block .
    WARNING:Xst:1293 - FF/Latch   has a constant value of 0 in
    block . WARNING:Xst:1293 - FF/Latch   has a constant
    value of 0 in block . WARNING:Xst:1293 - FF/Latch  
    has a constant value of 0 in block . WARNING:Xst:1293 -
    FF/Latch   has a constant value of 0 in block .
    WARNING:Xst:1293 - FF/Latch   has a constant value of 0 in
    block . WARNING:Xst:1293 - FF/Latch   has a constant
    value of 0 in block . WARNING:Xst:1293 - FF/Latch  
    has a constant value of 0 in block . WARNING:Xst:1293 -
    FF/Latch   has a constant value of 0 in block .
    WARNING:Xst:1293 - FF/Latch   has a constant value of 0 in
    block . WARNING:Xst:1293 - FF/Latch   has a
    constant value of 0 in block . WARNING:Xst:1293 - FF/Latch 
     has a constant value of 0 in block .
    WARNING:Xst:1293 - FF/Latch   has a constant value of 0 in
    block . WARNING:Xst:1710 - FF/Latch  </p>
    
    <p>and so on ... </p>
  </blockquote>
  
  <p>As result of these warnings, when I implement that module, I get only 0000 displayed on 4 7-segment displays.</p>
  
  <p>This VHDL code should take integer variable (range from 0 to 9999) and display that number using 4 7-segment displays ...</p>