summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/gpio/bch_gpio_direction.vhd
blob: 1b6f7926b3b86278dc9f835e9505b48efb26c6f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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;