Advertisement
Guest User

test_all_combination

a guest
Jan 6th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 4.15 KB | None | 0 0
  1. debug : process(clk,rst, start_stop, debug_state, rot_frequency)  
  2.         begin
  3.          if(rising_edge(clk)) then
  4.         -------------------------------------------------------------------------------------------------
  5.                 if(rst = '1') then
  6.                 report "Fase di reset" severity note;
  7.             elsif(debug_state = "000") then
  8.                 if(anomaly = '1') then
  9.                         report "Ci sono problemi, la macchina non si pu accendere" severity warning;
  10.                 elsif(rot_frequency = '0') then
  11.                     assert(start_stop /= '1') report "Inizio irrigazione con frequenza bassa" severity note;
  12.                 elsif(rot_frequency = '1') then
  13.                     assert(start_stop /= '1') report "Inizio irrigazione con frequenza alta" severity note;
  14.                 end if;
  15.             end if;
  16.     -------------------------------------------------------------------------------------------------------
  17.           end if;
  18.          end process;  
  19.  
  20.  
  21.     debug_second : process(clk,rst, start_stop, debug_state, rot_frequency, rotation, water)  
  22.         begin
  23.             if rising_edge(clk) then
  24.     -------------------------------------------------------------------------------------------------------
  25.             if(debug_state = "001") then
  26.                 if(anomaly = '1') then
  27.                 report "Ci sono problemi, la macchina non si pu accendere" severity warning;
  28.                 elsif(start_stop = '1') then
  29.                    assert(water /= '0')report "Sospensione bassa(Attenzione  possibile anche che non vada in sospensione avendo utilizzato Mealy)" severity note;
  30.                 elsif(rot_frequency = '1') then
  31.                     report "La macchina passa in frequenza alta" severity note;
  32.               elsif(rot_frequency = '0') then
  33.                    assert(rotation /= '1') report "Sta ruotando" severity note;
  34.                     assert(water /= '0') report "Fine irrigazione(Attenzione  possibile anche che non termini l'irrigazione avendo utilizzato Mealy)" severity note;
  35.                 end if;
  36.             end if;
  37.     -----------------------------------------------------------------------------------------------------------------------------------            
  38.             if(debug_state = "010") then
  39.                 if(anomaly = '1') then
  40.                 report "Ci sono problemi, la macchina non si pu accendere" severity warning;
  41.                 elsif(start_stop = '1') then
  42.                     assert(water /= '0') report "Sospensione alta(Attenzione  possibile anche che non vada in sospensione avendo utilizzato Mealy)" severity note;
  43.                 elsif(rot_frequency = '0') then
  44.                     report "La macchina passa in frequenza bassa" severity note;
  45.               elsif(rot_frequency = '1') then
  46.                    assert(rotation /= '1') report "Sta ruotando" severity note;
  47.                     assert(water /= '0') report "Fine irrigazione(Attenzione  possibile anche che non termini l'irrigazione avendo utilizzato Mealy)" severity note;
  48.                 end if;
  49.             end if;
  50.     ---------------------------------------------------------------------------------------------------------------------------------------
  51.                 if(debug_state = "011") then
  52.                     if(anomaly = '1') then
  53.                         report "Ci sono problemi, la macchina non si pu riaccendere" severity warning;
  54.                     elsif(start_stop = '1') then
  55.                         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;
  56.                    end if;
  57.                 end if;
  58.     ------------------------------------------------------------------------------------------------------------------------
  59.                 if(debug_state = "100") then
  60.                     if(anomaly = '1') then
  61.                         report "Ci sono problemi, la macchina non si pu riaccendere" severity warning;
  62.                     elsif(start_stop = '1') then
  63.                         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;
  64.                    end if;
  65.                 end if;
  66.                 end if;
  67.         end process;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement