VHDL-Forum - Anfänger

Ampelschaltung

Ampelschaltung

hi, ich wollte folgende aufgabe lösen:
https://wwwhni.uni-paderborn.de/fileadmin/hni_eps/GTI_GRA_Klausuren/GTI_Klausur_010308.pdf
(augabe 2)

könntet ihr bitte meine lösung kommentieren, also sagen, obs richtig oder falsch ist.
und wenns falsch ist was daran falsch ist?

in den mooreautomaten hät ich folgendes erweitert:
IDLE hat die ausgabe "01" ,
der pfeil der wieder auf IDEL zeigt bekommt button = 0,
der pfeil der auf WATING zeigt bekommt button = 1

WAITING hat die ausgabe "11",
der pfeil der wieder auf WAITING zeigt bekommt counter = 0,
der pfeil der auf WALK zeigt bekomm counter = 1

WALK hat die ausgabe "00",
der pfeil der wieder auf WALK zeigt bekommt counter = 0,
der pfeil der auf IDLE zeigt bekommt counter = 1




entity FSM is
--port( clk, reset, button : in STD_LOGIC;
--------color : out bit_vector(0 to 1));
end entity FSM;


architecture behavioral of FSM is
----type t_state is(IDLE, WAITING, WALK);
----signal current_state : t_state;
----signal counter : STD_LOGIC;

--begin
------fsm_proc : process(clk, reset, button)
------begin
--------if reset = '1' then
----------current_state <= 'IDLE';
--------elsif clk'event and clk = '1' then
-----------case current_state is
-------------when IDLE =>
--------------------if button = '1' then
-----------------------current_state <= 'WAITING';
--------------------else current_state <= 'IDLE';
--------------------end if;

-------------when WAITING =>
--------------------counter <= '1' after 200ns;
--------------------if counter = '1' then
----------------------current_state <= 'WALK';
----------------------counter <= '0';
--------------------else current_state <= 'WAITING';
--------------------end if;

-------------when WALK =>
--------------------counter <= '1' after 400 ns;
--------------------if counter = '1' then
----------------------current_state <= 'IDLE';
----------------------counter <= '0';
--------------------else current_state <= 'WALK';
--------------------end if;
-----------end case;
--------end if;
-----end process;

----------color <= "01" when current_state = 'IDLE' else
---------------------"11" when current_state = 'WAITING' else
---------------------"00";
end architecture behavioral;