Aucune des réponses sur internet n'a fonctionné pour moi car je suis un débutant en VHDL.Avertissement VHDL Xst: 1293 FF/Latch a une valeur constante de 0
Je crée une interface de mot de passe en vhdl avec des boutons-poussoirs et des voyants. Mon programme simule correctement comme prévu. Fondamentalement, je veux que les LED clignotent lors de la saisie du mauvais mot de passe mais luisent continuellement en entrant le mot de passe correct. Vous pouvez voir, cela fonctionne en simulation.
SIMULATION IMAGE (Dans la simulation premier mot de passe erroné est entré et le mot de passe correct)
Bien que la synthèse, après avertissement principal se produit:
Optimizing unit <safehouse> ...
WARNING:Xst:1293 - FF/Latch <entry_pass.ncount_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
.
.
.
Le code VHDL est:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity safehouse is
Port (keyled : out STD_LOGIC_VECTOR(0 TO 4);
keypad : in STD_LOGIC_VECTOR(0 to 7);
clk : in STD_LOGIC);
end safehouse;
architecture safehouse of safehouse is
signal temp : std_logic_vector(0 to 7) := "00000000";
begin
entry_pass: process(clk,keypad,temp)
type integer_vector is array (0 to 3) of integer;
variable i : integer := 0;
constant passoriginal : integer_vector := (2,5,2,6);
variable passcode : integer_vector := (0,0,0,0);
variable dcount : integer := 0;
variable ncount : integer := 0;
begin
if (rising_edge(clk)) then
keyled(4) <= '1';
if i < 4 then
keyled(0) <= '1';
if (temp /= keypad) then
case keypad is
when "10001000" =>
passcode(i) := 1;
keyled(i+1) <= '1';
i := i + 1;
when "10000100" =>
passcode(i) := 2;
keyled(i+1) <= '1';
i := i + 1;
when "10000010" =>
passcode(i) := 3;
keyled(i+1) <= '1';
i := i + 1;
when "10000001" =>
passcode(i) := 10;
keyled(i+1) <= '1';
i := i + 1;
when "01001000" =>
passcode(i) := 4;
keyled(i+1) <= '1';
i := i + 1;
when "01000100" =>
passcode(i) := 5;
keyled(i+1) <= '1';
i := i + 1;
when "01000010" =>
passcode(i) := 6;
keyled(i+1) <= '1';
i := i + 1;
when "01000001" =>
passcode(i) := 11;
keyled(i+1) <= '1';
i := i + 1;
when "00101000" =>
passcode(i) := 7;
keyled(i+1) <= '1';
i := i + 1;
when "00100100" =>
passcode(i) := 8;
keyled(i+1) <= '1';
i := i + 1;
when "00100010" =>
passcode(i) := 9;
keyled(i+1) <= '1';
i := i + 1;
when "00100001" =>
passcode(i) := 12;
keyled(i+1) <= '1';
i := i + 1;
when "00011000" =>
passcode(i) := 14;
keyled(i+1) <= '1';
i := i + 1;
when "00010100" =>
passcode(i) := 0;
keyled(i+1) <= '1';
i := i + 1;
when "00010010" =>
passcode(i) := 15;
keyled(i+1) <= '1';
i := i + 1;
when "00010001" =>
passcode(i) := 13;
keyled(i+1) <= '1';
i := i + 1;
when others =>
keyled(4) <= '1';
end case;
temp <= keypad;
end if;
else
if passcode = passoriginal then
dcount := dcount + 1;
if dcount >= 50000000 then
keyled <= ('1','1','1','1','1');
dcount := 1;
ncount := ncount + 1;
if ncount >= 8 then
i := 0;
passcode := (0,0,0,0);
keyled <= ('0','0','0','0','1');
ncount := 1;
end if;
end if;
else
dcount := dcount + 1;
if dcount >= 50000000 then
if (ncount rem 2) = 0 then
keyled <= ('1','1','1','1','1');
else
keyled <= ('0','0','0','0','1');
end if;
dcount := 1;
ncount := ncount + 1;
if ncount >= 8 then
i := 0;
keyled <= ('1','0','0','0','1');
ncount := 1;
end if;
end if;
end if;
end if;
end if;
end process;
end safehouse;
Je comprends que la variable ncount est en train d'être rognée mais je l'exige. La variable ncount est utilisée pour créer un délai de 4 secondes à l'aide de la variable dcount qui est utilisée pour créer un délai de 0,5 seconde. Sans variable ncount Je ne peux pas créer de délai pendant 4 secondes.
Les avertissements complets sont:
WARNING:Xst:1710 - FF/Latch <keyled_4> (without init value) has a constant value of 1 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
Optimizing unit <safehouse> ...
WARNING:Xst:1293 - FF/Latch <entry_pass.ncount_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_8> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_11> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_9> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_10> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_14> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_12> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_13> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_17> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_15> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_16> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_20> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_18> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_19> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_23> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_21> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_22> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_24> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_25> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.dcount_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_3> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_4> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_5> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_6> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_7> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_8> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_9> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_10> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_11> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_12> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_13> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_14> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_15> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_16> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_17> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_18> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_19> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_20> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_21> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_22> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_23> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_24> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_25> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_26> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_27> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_28> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_29> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_30> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.i_31> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_4> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_3> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <entry_pass.ncount_5> has a constant value of 0 in block <safehouse>. This FF/Latch will be trimmed during the optimization process.
La carte de développement FPGA J'utilise est: Spartan Xilinx 6 XC6SLX9 TQG144. S'il vous plaît, Aidez-moi.
Le premier slug de ceux-ci est de déclarer quelque chose comme un entier au lieu d'un entier contraint. entry_pass.ncount a seulement une gamme de 1 à 8. Vous n'avez apparemment pas besoin du reste dans votre code. Pensez logique binaire/numérique et ce que les chiffres signifient.Un entier non contraint est élaboré en synthèse en tant que binaire de 32 bits et représente la valeur du complément à deux bits. Si vous n'utilisez que quatre bits, vous verrez le reste coupé. – user1155120
Copie possible de [Synthèse VHDL - FF/Latch Constant Value] (https://stackoverflow.com/questions/16087307/vhdl-synthesis-ff-latch-constant-value) – user1155120
Merci, @ user1155120 pour votre commentaire, le code dans la réponse que j'ai posté a résolu mon problème. Cependant, vous pouvez nous éclairer avec la raison derrière le code. –