summaryrefslogtreecommitdiff
path: root/2004
diff options
context:
space:
mode:
authorgalmes2004-02-26 17:33:21 +0000
committergalmes2004-02-26 17:33:21 +0000
commitdcc10693309c53b204189aadf7163718fc1695f6 (patch)
tree2484ccdcda549cacf4c580ec8887acd93394caa5 /2004
parent87b82909048734b06777a486cece1320ed6b6a0d (diff)
Modification + test du module it detector
Diffstat (limited to '2004')
-rw-r--r--2004/n/fpga/src/gpio/bch_gpio.vhd5
-rw-r--r--2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd6
-rw-r--r--2004/n/fpga/src/gpio/gpio_it_detect.vhd11
3 files changed, 14 insertions, 8 deletions
diff --git a/2004/n/fpga/src/gpio/bch_gpio.vhd b/2004/n/fpga/src/gpio/bch_gpio.vhd
index d785248..cd89ac4 100644
--- a/2004/n/fpga/src/gpio/bch_gpio.vhd
+++ b/2004/n/fpga/src/gpio/bch_gpio.vhd
@@ -110,7 +110,8 @@ begin
wait for (3*CK_PERIOD);
do_write (A_IO1_REG_DATA, x"01");
wait for (3*CK_PERIOD);
- do_write (A_IO1_REG_INTERRUPT_MASK, x"04");
+ -- interruption sur les 3 bits de poid faible.
+ do_write (A_IO1_REG_INTERRUPT_MASK, x"07");
-- Lecture dans les trois registres.
wait for (3*CK_PERIOD);
@@ -124,7 +125,7 @@ begin
wait for (3*CK_PERIOD);
do_read (A_IO1_READ_OUTPUT);
- -- test du signal d'interruption
+ -- Test du signal d'interruption.
wait for (3*CK_PERIOD);
do_write (A_IO1_REG_DATA, x"02");
wait for (3*CK_PERIOD);
diff --git a/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd b/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
index 2e7162c..80ebd45 100644
--- a/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
+++ b/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
@@ -5,8 +5,8 @@
library ieee;
use ieee.std_logic_1164.all;
-use ieee.std_logic_arith.all;
-use ieee.std_logic_unsigned.all;
+--use ieee.std_logic_arith.all;
+--use ieee.std_logic_unsigned.all;
use work.isa_const.all;
use work.nono_const.all;
@@ -55,7 +55,7 @@ end sim1;
configuration cf1_bch_gpio_it_detect of bch_gpio_it_detect is
for sim1
- for all : gpio_it_detect use entity work.gpio_it_detect(BEHAV); end for;
+ for all : gpio_it_detect use entity work.gpio_it_detect(RTL); end for;
end for;
end cf1_bch_gpio_it_detect;
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;