Professional Documents
Culture Documents
Ex 6 PDF
Ex 6 PDF
--
-- PROBLEMA 6
-----------------------------------------------------
library ieee ;
use ieee.std_logic_1164.all;
-----------------------------------------------------
entity vehicles is
port(
A, B: in std_logic;
clock: in std_logic;
reset: in std_logic;
);
end vehicles;
-----------------------------------------------------
begin
process(clock, reset)
begin
if (reset='1') then
end if;
end process;
process(estat_present, A, B)
begin
case estat_present is
when NV =>
if (A='1')and(B='0') then
else
end if;
when VC =>
if (A='0')and(B='0') then
estat_seguent <= NV;
else
end if;
when VL =>
if (A='0')and(B='0') then
else
end if;
when LV =>
if (A='1')and(B='1') then
else
end if;
if (A='0')and(B='0') then
estat_seguent<=VC;
estat_seguent<=ESA;
else
estat_seguent<=VC;
end if;
if (A='0')and(B='0') then
end if;
end case;
end process;
end FSM;
-----------------------------------------------------