summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/packages
diff options
context:
space:
mode:
authorgalmes2004-02-29 16:16:56 +0000
committergalmes2004-02-29 16:16:56 +0000
commita5650896d8e038c2938175c9ea92d7a9554f7f02 (patch)
tree1993529b09fe217b8b9ca8e81368905922b8213f /2004/n/fpga/src/packages
parent74113ba7738606383d83e44d8ab75d85d8fe1166 (diff)
Déplacement de fichiers.
Diffstat (limited to '2004/n/fpga/src/packages')
-rw-r--r--2004/n/fpga/src/packages/isa_const.vhd33
-rw-r--r--2004/n/fpga/src/packages/nono_const.vhd63
2 files changed, 96 insertions, 0 deletions
diff --git a/2004/n/fpga/src/packages/isa_const.vhd b/2004/n/fpga/src/packages/isa_const.vhd
new file mode 100644
index 0000000..5f5d1d4
--- /dev/null
+++ b/2004/n/fpga/src/packages/isa_const.vhd
@@ -0,0 +1,33 @@
+-- isa_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;
+use ieee.std_logic_arith.all;
+use ieee.std_logic_unsigned.all;
+
+
+-- Constantes relatives au bus ISA
+package isa_const is
+
+ -- Temps d'une période d'horloge sur le bus ISA
+ constant ISA_CK_PERIOD : time := 50 ns;
+
+ -- Ligne RW : lecture et écriture
+ constant ISA_READ : std_logic := '0';
+ constant ISA_WRITE : std_logic := '1';
+
+ -- Nombre de bits du bus d'adresse
+ constant NB_BIT_ADDRESS_ISA : integer := 20;
+ subtype T_ADDRESS_ISA is std_logic_vector((NB_BIT_ADDRESS_ISA - 1) downto 0);
+
+end isa_const;
+
+
diff --git a/2004/n/fpga/src/packages/nono_const.vhd b/2004/n/fpga/src/packages/nono_const.vhd
new file mode 100644
index 0000000..e7b0454
--- /dev/null
+++ b/2004/n/fpga/src/packages/nono_const.vhd
@@ -0,0 +1,63 @@
+-- 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;
+use ieee.std_logic_arith.all;
+use ieee.std_logic_unsigned.all;
+
+
+-- Constantes relatives
+package nono_const is
+
+ -- Temps d'une période d'horloge sur la carte
+ constant CK_PERIOD : time := 10 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 de nouveaux types : T_ADDRESS et T_DATA
+ --subtype T_ADDRESS is unsigned ((NB_BIT_ADDRESS - 1) downto 0);
+ --subtype T_DATA is unsigned ((NB_BIT_DATA - 1) downto 0);
+ subtype T_ADDRESS is std_logic_vector ((NB_BIT_ADDRESS - 1) downto 0);
+ subtype T_DATA is std_logic_vector ((NB_BIT_DATA - 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'IO1
+ constant A_IO1_REG_DATA : T_ADDRESS := START_ADDR_B0 + x"01";
+ constant A_IO1_REG_DIRECTION : T_ADDRESS := START_ADDR_B0 + x"02";
+ constant A_IO1_REG_INTERRUPT_MASK : T_ADDRESS := START_ADDR_B0 + x"03";
+ constant A_IO1_READ_OUTPUT : T_ADDRESS := START_ADDR_B0 + x"04";
+ -- Bloc d'IO2
+ constant A_IO2_REG_DATA : T_ADDRESS := START_ADDR_B0 + x"05";
+ constant A_IO2_REG_DIRECTION : T_ADDRESS := START_ADDR_B0 + x"06";
+ constant A_IO2_REG_INTERRUPT_MASK : T_ADDRESS := START_ADDR_B0 + x"07";
+ constant A_IO2_READ_OUTPUT : T_ADDRESS := START_ADDR_B0 + x"08";
+ -- Bloc port série
+ -- Bloc caméra
+ -- Bloc PWM
+ -- Bloc I²C
+ -- Bloc servo-moteurs
+end nono_const;