oui oui merci bien, je suis en train de programmer mon modulo de 3.
voici mon code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| entity E_mod is
Port ( data_in : inout integer;
resultat : inout boolean
);
end E_mod;
architecture codMod of E_mod is
begin
process
variable val : boolean := false;
while (val = false) loop
if ((data_in - 3) = 0) then
val := true; ---exit;
else
data_in:=data_in-3;
end if;
end loop;
resultat := val;
end process;
end codMod; |
mais y a une erreur :
near "while": syntax error (line 18)
S'il vous plait, pouvez vous m'aider ?
Partager