-- nono_const.vhd -- Eurobot 2004 : APB Team -- Auteur : Pierre-André Galmes -- Fichier de déclaration de constantes. -- RQ : pour une indentation bien sous vim : -- 1 - ":set shiftwidth=4" -- 2 - se placer sous "package nono_const is" -- 3 - tapez : = puis shift+G library ieee; use ieee.std_logic_1164.all; package nono_const is -- Temps d'une période d'horloge constant CK_PERIOD : time := 20 ns; -- Taille d'une addresse sur la carte -- RQ : 10 = nb suffisant -- 12 = 3 digit en héxa constant NB_BIT_ADDRESS : integer := 10; -- Taille des données sur la carte constant NB_BIT_DATA : integer := 8; -- Définition d'un nouveau type : ADDRESS subtype T_ADDRESS is std_logic_vector ((NB_BIT_ADDRESS - 1) downto 0); -- Les différentes banques d'adresses (4 x 256) -- Rq pour Pierre : ça va influer sur le bloc de gestion du bus constant START_ADDR_B0 : T_ADDRESS := "0000000000"; constant START_ADDR_B1 : T_ADDRESS := "0100000000"; constant START_ADDR_B2 : T_ADDRESS := "1000000000"; constant START_ADDR_B3 : T_ADDRESS := "1100000000"; -- Les addresses des différents registres. -- gestion des interruptions constant A_INTERRUPT_MANAGER : T_ADDRESS := START_ADDR_B0 + x"00"; -- Bloc d'IO constant A_REG_IO_DIRECTION : T_ADDRESS := START_ADDR_B0 + x"01"; constant A_REG_IO_DATA : T_ADDRESS := START_ADDR_B0 + x"02"; constant A_REG_IO_INTERRUPT_MASK : T_ADDRESS := START_ADDR_B0 + x"03"; -- Bloc port série -- Bloc caméra -- Bloc PWM -- Bloc I²C -- Bloc servo-moteurs end nono_const;