source: PROJECT_CORE_MPI/CORE_MPI/BRANCHES/v0.01/Packet_type.vhd @ 35

Last change on this file since 35 was 35, checked in by rolagamo, 12 years ago

Version stable pour les tests

File size: 3.6 KB
Line 
1--      Package File Template
2--
3--      Purpose: This package defines supplemental types, subtypes,
4--               constants, and functions
5-- package definissant le codage des fonctions MPI
6-- dans le champs packet type des instructions MPI
7
8-- Ce fichier définit les trames des instruction MPI qui sont utilisables
9library IEEE;
10use IEEE.STD_LOGIC_1164.all;
11
12package Packet_type is
13        constant ADRLEN1                                                                        :natural:=16;
14 constant MPI_COMM_WORLD                                                        :natural:=1;
15 constant MPI_DEFAULT                                                           :natural:=0;
16 constant MPI_INT                                                                               :natural:=1;
17 constant MPI_INFO_NULL                                                         :natural:=0;
18 constant Default_Win                                                           :natural:=1;
19 constant MPI_GET_RANK                                                          : std_logic_vector(3 downto 0) := "0000";
20 constant MPI_GET_SIZE                                                          : std_logic_vector(3 downto 0) := "0001";
21 constant MPI_BARRIER                                                           : std_logic_vector(3 downto 0) := "0010";
22 constant MPI_BARRIER_REACHED                                           : std_logic_vector(3 downto 0) := "0011";
23 constant MPI_BARRIER_COMPLETED                                 : std_logic_vector(3 downto 0) := "0100";
24 constant MPI_PUT                                                                       : std_logic_vector(3 downto 0) := "0101";
25 constant MPI_GET                                                                       : std_logic_vector(3 downto 0) := "0110";
26 constant MPI_BROADCAST                                                         : std_logic_vector(3 downto 0) := "0111";
27 constant MPI_INIT                                                              : std_logic_vector(3 downto 0) := "1000";
28 constant MPI_SPWAN                                                                     : std_logic_vector(3 downto 0) := "1001";
29 
30 constant MPI_WINCREATE                                                         : std_logic_vector(3 downto 0) := "1010";
31 constant MPI_WINCOMPLETE                                                       : std_logic_vector(3 downto 0) := "1011";
32 constant MPI_WINPOST                                                           : std_logic_vector(3 downto 0) := "1100";
33 constant MPI_WINWAIT                                                           : std_logic_vector(3 downto 0) := "1101";
34 
35 
36 
37 constant MPI_WTIME                                                                     : std_logic_vector(3 downto 0) := "1110";
38 constant MPI_WTICK                                                                     : std_logic_vector(3 downto 0) := "1111";
39 constant MPI_CONFIG                                                               : std_logic_vector(3 downto 0) := "1101";
40 --paramètres des commandes
41 Constant INIT_SEEKMAIN                                                         : std_logic_vector(3 downto 0) := "0001";
42 Constant INIT_SETRANK                                                          : std_logic_vector(3 downto 0) := "0010";
43 Constant INIT_REGISTER                                                         : std_logic_vector(3 downto 0) := "0011";
44-- constantes pour le NoC                                                               
45 Constant NOC_GETPORTID                                                         : std_logic_vector(7 downto 0) := "00000001";
46
47
48Type MPI_Datatype is (MPI_BYTE,MPI_INTEGER,MPI_REAL,MPI_PACKET, MPI_pointer);
49SUBType MPI_COMM is  natural range 0 to 2**ADRLEN1-1 ; --pointeur sur la structure du communicateur
50subType Mpi_AInt is natural range 0 to 2**ADRLEN1-1 ;
51
52Type MPI_COMM_struc is record
53   id : natural range 0 to 3; -- id du communicateur
54        grp : std_logic_vector(15 downto 0);     --groupe associé au communicateur
55        nproc : natural range 0 to 15;   -- nombre de membres du groupe de ce communicateur
56        AddrLib : std_logic_vector(15 downto 0); -- adresse dans la mémoire de la Lib
57                                                                                                                  -- des registres GStart et GPost
58        C_open,C_close : std_logic;  -- état du communciateur (Inistialisé ou finalisé)
59end record;
60
61Type Mpi_Win is record 
62        status : std_logic_vector(7 downto 0); --état de la fenêtre (create,Start,Complete,Post,WaitSync, etc.)
63        id : natural range 0 to 15 ; -- numéro de la fenêtre
64       
65        Addr : std_logic_vector(15 downto 0); -- adresse dans la mémoire locale du PE
66        Size : natural range 0 to 65535; -- taille de la fenêtre en octets
67       
68        comm : MPI_COMM; -- communicateur associé à la fenêtre
69end record;
70Type Mpi_group is record
71        grp : std_logic_vector(15 downto 0); --( vecteur de la liste des processus du groupe)
72        nb : natural range 0 to 15; -- nombre de membres(processus du groupe)
73        comm_id : natural range 0 to 3; -- reférence du communicateur
74end record;
75end Packet_type; 
76
77package body Packet_type is
78
79
80end Packet_type;
Note: See TracBrowser for help on using the repository browser.