summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/gpio/bch_gpio_direction.vhd
diff options
context:
space:
mode:
Diffstat (limited to '2004/n/fpga/src/gpio/bch_gpio_direction.vhd')
-rw-r--r--2004/n/fpga/src/gpio/bch_gpio_direction.vhd52
1 files changed, 52 insertions, 0 deletions
diff --git a/2004/n/fpga/src/gpio/bch_gpio_direction.vhd b/2004/n/fpga/src/gpio/bch_gpio_direction.vhd
new file mode 100644
index 0000000..1b6f792
--- /dev/null
+++ b/2004/n/fpga/src/gpio/bch_gpio_direction.vhd
@@ -0,0 +1,52 @@
+-- bch_gpio_direction.vhd
+-- Eurobot 2004 : APB Team
+-- Auteur : Pierre-André Galmes
+-- Test de gpio_direction.
+
+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_direction is
+end bch_gpio_direction;
+
+architecture sim1 of bch_gpio_direction is
+
+ component gpio_direction
+ port (
+ direction_mask : in T_DATA;
+ data_in : in T_DATA;
+ data_out : out T_DATA
+ );
+ end component;
+
+ -- définiton des signaux
+ signal direction_mask : T_DATA;
+ signal data_in : T_DATA;
+ signal data_out : T_DATA;
+
+begin
+ U1 : gpio_direction port map (
+ direction_mask => direction_mask,
+ data_in => data_in,
+ data_out => data_out
+ );
+
+ direction_mask <= x"04";
+ data_in <= x"01",
+ x"02" after 3*CK_PERIOD,
+ x"07" after 5*CK_PERIOD;
+ --x"03" after 5*CK_PERIOD;
+end sim1;
+
+configuration cf1_bch_gpio_direction of bch_gpio_direction is
+ for sim1
+ for all : gpio_direction use entity work.gpio_direction(RTL); end for;
+ end for;
+end cf1_bch_gpio_direction;
+