Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- debug : process(clk,rst, start_stop, debug_state, rot_frequency)
- begin
- if(rising_edge(clk)) then
- -------------------------------------------------------------------------------------------------
- if(rst = '1') then
- report "Fase di reset" severity note;
- elsif(debug_state = "000") then
- if(anomaly = '1') then
- report "Ci sono problemi, la macchina non si pu accendere" severity warning;
- elsif(rot_frequency = '0') then
- assert(start_stop /= '1') report "Inizio irrigazione con frequenza bassa" severity note;
- elsif(rot_frequency = '1') then
- assert(start_stop /= '1') report "Inizio irrigazione con frequenza alta" severity note;
- end if;
- end if;
- -------------------------------------------------------------------------------------------------------
- end if;
- end process;
- debug_second : process(clk,rst, start_stop, debug_state, rot_frequency, rotation, water)
- begin
- if rising_edge(clk) then
- -------------------------------------------------------------------------------------------------------
- if(debug_state = "001") then
- if(anomaly = '1') then
- report "Ci sono problemi, la macchina non si pu accendere" severity warning;
- elsif(start_stop = '1') then
- assert(water /= '0')report "Sospensione bassa(Attenzione possibile anche che non vada in sospensione avendo utilizzato Mealy)" severity note;
- elsif(rot_frequency = '1') then
- report "La macchina passa in frequenza alta" severity note;
- elsif(rot_frequency = '0') then
- assert(rotation /= '1') report "Sta ruotando" severity note;
- assert(water /= '0') report "Fine irrigazione(Attenzione possibile anche che non termini l'irrigazione avendo utilizzato Mealy)" severity note;
- end if;
- end if;
- -----------------------------------------------------------------------------------------------------------------------------------
- if(debug_state = "010") then
- if(anomaly = '1') then
- report "Ci sono problemi, la macchina non si pu accendere" severity warning;
- elsif(start_stop = '1') then
- assert(water /= '0') report "Sospensione alta(Attenzione possibile anche che non vada in sospensione avendo utilizzato Mealy)" severity note;
- elsif(rot_frequency = '0') then
- report "La macchina passa in frequenza bassa" severity note;
- elsif(rot_frequency = '1') then
- assert(rotation /= '1') report "Sta ruotando" severity note;
- assert(water /= '0') report "Fine irrigazione(Attenzione possibile anche che non termini l'irrigazione avendo utilizzato Mealy)" severity note;
- end if;
- end if;
- ---------------------------------------------------------------------------------------------------------------------------------------
- if(debug_state = "011") then
- if(anomaly = '1') then
- report "Ci sono problemi, la macchina non si pu riaccendere" severity warning;
- elsif(start_stop = '1') then
- assert(water /= '1' ) report "La macchina riprende ad irrigare con frequenza bassa(Attenzione possibile anche che non riprenda l'irrigazione avendo utilizzato Mealy)" severity note;
- end if;
- end if;
- ------------------------------------------------------------------------------------------------------------------------
- if(debug_state = "100") then
- if(anomaly = '1') then
- report "Ci sono problemi, la macchina non si pu riaccendere" severity warning;
- elsif(start_stop = '1') then
- assert(water /= '1' ) report "La macchina riprende ad irrigare con frequenza alta(Attenzione possibile anche che non riprenda l'irrigazione avendo utilizzato Mealy)" severity note;
- end if;
- end if;
- end if;
- end process;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement