summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/gpio/gpio_it_detect.vhd
diff options
context:
space:
mode:
Diffstat (limited to '2004/n/fpga/src/gpio/gpio_it_detect.vhd')
-rw-r--r--2004/n/fpga/src/gpio/gpio_it_detect.vhd11
1 files changed, 8 insertions, 3 deletions
diff --git a/2004/n/fpga/src/gpio/gpio_it_detect.vhd b/2004/n/fpga/src/gpio/gpio_it_detect.vhd
index 3511c63..2e21970 100644
--- a/2004/n/fpga/src/gpio/gpio_it_detect.vhd
+++ b/2004/n/fpga/src/gpio/gpio_it_detect.vhd
@@ -3,6 +3,10 @@
-- Auteur : Pierre-André Galmes
-- detecteur d'interruption avec masque.
+-- Remarque :
+-- masque : si bit à 1 => on détecte l'interruption.
+-- si bit à 0 => on détecte pas l'interruption.
+
library ieee;
use ieee.std_logic_1164.all;
@@ -34,7 +38,8 @@ begin
process (rst, clk)
begin
if (rst = '1') then
- state_p <= (others => '0');
+ -- ne pas déclencher d'it après rst.
+ state_p <= data_in;
it_detected <= '0';
elsif (clk'event and clk = '1') then
-- TODO : Ajouter la synchronisation ??????? Pas besoin, non ?????
@@ -45,10 +50,10 @@ begin
-- on émet le signal d'interruption.
it_detected <= '1';
end if;
- else
+ else
it_detected <= '0';
- state_p <= data_in;
end if;
+ state_p <= data_in;
end if;
end process;