Advertisement
Guest User

test

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