Tengo multiples Warnings Xst:737 - Found 1-bit latch for signal

291 views
Skip to first unread message

López Partida Gerardo Antonio

unread,
Sep 28, 2021, 12:20:33 PM9/28/21
to Embebidos32
Este es mi código:

entity TableroDeCambiosFutbol is
    Port ( Inicio : in  STD_LOGIC;
           Reset : in  STD_LOGIC;
  D1 : in  STD_LOGIC;
  U1 : in  STD_LOGIC;
  D2 : in  STD_LOGIC;
  U2 : in  STD_LOGIC;
           Switches : in  STD_LOGIC_VECTOR (3 downto 0);   
  HabilitadorDisp : out STD_LOGIC_VECTOR (7 downto 0);
  Display : out STD_LOGIC_VECTOR (7 downto 0);
           LedsBinario : out  STD_LOGIC_VECTOR (4 downto 0);   
           LedEntra : out  STD_LOGIC;
           LedSale : out  STD_LOGIC;
           Encencido : out  STD_LOGIC);
end TableroDeCambiosFutbol;

architecture Behavioral of TableroDeCambiosFutbol is

type MaquinaCeleste is (Unidades1,Decenas1,Unidades2,Decenas2,Mostrando);
signal Edo_P, Edo_F : MaquinaCeleste := Decenas1;
signal Ls, Le, Dec1, Dec2, Un1, Un2 : std_logic := '0';
signal Numero1 : std_logic_vector (3 downto 0) := "0000";
begin
Botones : process(D1,U1,D2,U2)
begin
if D1 = '1' then
Dec1 <= '1';
Un1 <= '0';
Dec2 <= '0';
Un2 <= '0';
elsif U1 = '1' then
Un1 <= '1';
Dec1 <= '0';
Dec2 <= '0';
Un2 <= '0';
elsif D2 = '1' then
Dec2 <= '1';
Un1 <= '0';
Dec1 <= '0';
Un2 <= '0';
elsif U2 = '1' then
Un2 <= '1';
Un1 <= '0';
Dec2 <= '0';
Dec1 <= '0';
else 
null;
end if;
if Reset = '1' then
Le <= '0';
Numero1 <= "0000";
Dec1 <= '0';
Un1 <= '0';
Dec2 <= '0';
Un2 <= '0';
Edo_P <= Mostrando;
elsif Inicio = '1' then
Le <= '1';
if Dec1 = '1' then
Edo_P <= Edo_F;
Numero1 <= Switches;
elsif Un1 = '1' then
Edo_P <= Edo_F;
Numero1 <= Switches;
elsif Dec2 = '1' then
Edo_P <= Edo_F;
Numero1 <= Switches;
elsif Un2 = '1' then
Numero1 <= Switches;
Edo_P <= Edo_F;
else 
Numero1 <= "0000";
end if;
end if;
end process;
DisplayTrans : process (Edo_P)
begin
case Edo_P is
when Decenas1 =>
Edo_F <= Unidades1;
HabilitadorDisp <= "11110111";
when Unidades1 =>
Edo_F <= Decenas2;
HabilitadorDisp <= "11111011";
when Decenas2 =>
Edo_F <= Unidades2;
HabilitadorDisp <= "11111101";
when Unidades2 =>
Edo_F <= Mostrando;
HabilitadorDisp <= "11111110";
when Mostrando =>
Edo_F <= Decenas1;
HabilitadorDisp <= "11111111";
when others => null;
end case;
end process;
Display <= "11000000" when Numero1 = "0000" else--0
"11111001" when Numero1 = "0001" else--1
"10100100" when Numero1 = "0010" else--2
"10110000" when Numero1 = "0011" else--3
"10011001" when Numero1 = "0100" else--4
"10010010" when Numero1 = "0101" else--5
"10000010" when Numero1 = "0110" else--6
"11111000" when Numero1 = "0111" else--7
"10000000" when Numero1 = "1000" else--8
"10011000" when Numero1 = "1001" else--9
"01111111";
LedEntra <= Le;
end Behavioral;





Y estos son los warnings

WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 84: reset should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 92: inicio should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 94: dec1 should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 95: edo_f should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 96: switches should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 97: un1 should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 98: edo_f should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 99: switches should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 100: dec2 should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 101: edo_f should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 102: switches should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 103: un2 should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 104: switches should be on the sensitivity list of the process
WARNING:HDLCompiler:92 - "C:\Users\hpX\Documents\6to semestre\vhdl\TableroDeCambiosFutbol\TableroDeCambiosFutbol.vhd" Line 105: edo_f should be on the sensitivity list of the process
WARNING:Xst:737 - Found 1-bit latch for signal <Numero1<3>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Numero1<2>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Numero1<1>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Numero1<0>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Edo_P<1>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Edo_P<0>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Dec1>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Un1>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Dec2>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Un2>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Le>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <Edo_P<2>>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:1293 - FF/Latch <Edo_P_1> has a constant value of 0 in block <TableroDeCambiosFutbol>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1293 - FF/Latch <Edo_P_1> has a constant value of 0 in block <TableroDeCambiosFutbol>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:3002 - This design contains one or more registers/latches that are directly
   incompatible with the Spartan6 architecture. The two primary causes of this is
   either a register or latch described with both an asynchronous set and
   asynchronous reset, or a register or latch described with an asynchronous
   set or reset which however has an initialization value of the opposite 
   polarity (i.e. asynchronous reset with an initialization value of 1).

Carlos Pantelides

unread,
Sep 28, 2021, 6:24:14 PM9/28/21
to Embebidos32
Hola,

me voy a tomar el atrevimiento de intentar unas preguntas que quizás te lleven a la respuesta por lo poco que sé de hdl de en general y vhdl en particular. Voy a asumir que el código que pusiste empieza en la línea 33.

¿Qué es? un bcd to 7 segments decoder con barrido o cómo se llame?

Lo que va en la sensitivity list es lo que hace que se active lo que hay dentro del proceso y si no me equivoco, lo normal es que sólo vaya el clock, quizás el reset. ¿Algún motivo para no usar clock?

¿Por qué hacés Numero1 <= "0000";  si Numero depende de los switches?

¿Por qué tenés Dec1, Dec2, Un1, Un2 si dependen de D1,U1,D2,U2?

¿Qué onda ese if Inicio que adentro para toda condición siempre dice lo mismo y no tiene un else?

Ayudaría mucho que pusieras nombres de variables/cables más explicativo, si no tenés control sobre los nombres de los pines (D1, U1, D2, U2) les ponés unos assign con nombres, no consume nada

sigamos...

Facundo Aguilera

unread,
Sep 29, 2021, 8:51:37 AM9/29/21
to Embebidos32
Hola,

Los WARNING que dicen "xxx should be on the sensitivity list" quieren decir que la lista sensitiva está incompleta. En la lista sensitiva van todas las señales que se usan "leen" dentro del proceso. La regla general es poner todas las señales que están en las sentencias condicionales (if y case) y las que están a la derecha de las asignaciones.

Los WARNING "Latches may be generated from incomplete case or if statements" quieren decir que se generan latches indeseados en un circuito que se asume que debería combinacional. Esto pasa porque no se definen los estados de las salidas para todos los casos posibles, entonces por defecto genera un latch para mantener el valor previo. La forma más facil de evitar esto es dar un valor por defecto a las salidas al inicio del proyecto.

Ahora, hay varios otros problemas en la descripción, por ejemplo, hay un reset pero no hay un clock, entonces es complejo comprender qué es lo que se pretende hacer. Deberías hacer un diagrama antes de iniciar con el código. También recomiendo practicar con cosas más simples antes, probar y comprender la síntesis de flip-flops y compuertas básicas antes de avanzar con esto.

Saludos

Guillermo Guichal

unread,
Sep 30, 2021, 10:20:04 AM9/30/21
to Embebidos32
Hola Gerardo.

Creo que lo importante aqui es aprender a pensar "diseño digital sincronico". Pensar que es una cadena de circuitos combinacionales y Registros. Y tipicamente usas registros D activados por flanco. La manera inciial mas simple es separar esos bloques en diferentes procesos si usas VHDL.

Los procesos sincronicos (registros) tienen clock y posiblemente reset (que puede ser sync o async). Segun como uses el reset en la lista de sensitividad esta el clock y el reset - nada mas.
Los procesos combinacionales deben tener TODAS las entradas en la lista de sensitividad (aunque la verdad es que los tools hoy ignoran muchas veces si te faltan). Y lo importante es que las salidas esten definidas para TODOAS las combinaciones de entradas. Sino se te "infiere un latch"... cosa que es mala, porque te joroba el timing y la operacion del circuito sincronico.

Si podrian usarse latches u otras estructuras queda fuera del scope de este e-mail... si arrancas con FPGAs pensa diseño sincronico de esa manera. 

Te paso una imagen de lo que me refiero con diseño sincronico ... hay etapas de regisros y luego Logica Combinacional (LC)
sync_design.JPG

Adjunto un apunte con alguos ejemplos que pueden ayudar a entender estas cosas. Criticas bienvenidas para mejorarlo!

Saludos, Willy

  

On Tuesday, September 28, 2021 at 1:20:33 PM UTC-3 gerardol...@gmail.com wrote:
5_VHDL Sintesis.pdf
Reply all
Reply to author
Forward
0 new messages