summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
diff options
context:
space:
mode:
authorgalmes2004-02-24 21:30:40 +0000
committergalmes2004-02-24 21:30:40 +0000
commit3a46e687fadd28f93b3a67063e535615770a966d (patch)
tree34754ade1fc5c013c08c3701fbdcbca1382f44c4 /2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
parentf8ee5b24be92c6709781e17c6f8ff358f5986558 (diff)
Ajout de plein de fichier pour faire les gpio
Diffstat (limited to '2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd')
-rw-r--r--2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd61
1 files changed, 61 insertions, 0 deletions
diff --git a/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd b/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
new file mode 100644
index 0000000..2e7162c
--- /dev/null
+++ b/2004/n/fpga/src/gpio/bch_gpio_it_detect.vhd
@@ -0,0 +1,61 @@
+-- bch_gpio_it_detect.vhd
+-- Eurobot 2004 : APB Team
+-- Auteur : Pierre-André Galmes
+-- Test de gpio_it_detect.
+
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.std_logic_arith.all;
+use ieee.std_logic_unsigned.all;
+
+use work.isa_const.all;
+use work.nono_const.all;
+
+
+entity bch_gpio_it_detect is
+end bch_gpio_it_detect;
+
+architecture sim1 of bch_gpio_it_detect is
+
+ component gpio_it_detect
+ port (
+ clk : in std_logic;
+ rst : in std_logic;
+ data_in : in T_DATA;
+ it_mask : in T_DATA;
+ it_detected : out std_logic
+ );
+ end component;
+
+ -- définiton des signaux
+ signal clk : std_logic := '0';
+ signal rst : std_logic;
+ signal data_in : T_DATA;
+ signal it_mask : T_DATA;
+ signal it_detected : std_logic;
+
+begin
+ U1 : gpio_it_detect port map (
+ clk => clk,
+ rst => rst,
+ data_in => data_in,
+ it_mask => it_mask,
+ it_detected => it_detected
+ );
+
+ clk <= not clk after CK_PERIOD/2;
+ rst <= '1', '0' after CK_PERIOD;
+ data_in <= x"02",
+ x"08" after 3*CK_PERIOD,
+ x"01" after 5*CK_PERIOD;
+ --x"03" after 5*CK_PERIOD;
+ it_mask <= x"02",
+ x"01" after 3*CK_PERIOD;
+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;
+ end for;
+end cf1_bch_gpio_it_detect;
+