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

Last change on this file since 29 was 15, checked in by rolagamo, 12 years ago
File size: 3.5 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 MPI_COMM_WORLD                                                        :natural:=1;
14 constant MPI_DEFAULT                                                           :natural:=0;
15 constant MPI_INT                                                                               :natural:=1;
16 constant MPI_INFO_NULL                                                         :natural:=0;
17 constant Default_Win                                                           :natural:=1;
18 constant MPI_GET_RANK                                                          : std_logic_vector(3 downto 0) := "0000";
19 constant MPI_GET_SIZE                                                          : std_logic_vector(3 downto 0) := "0001";
20 constant MPI_BARRIER                                                           : std_logic_vector(3 downto 0) := "0010";
21 constant MPI_BARRIER_REACHED                                           : std_logic_vector(3 downto 0) := "0011";
22 constant MPI_BARRIER_COMPLETED                                 : std_logic_vector(3 downto 0) := "0100";
23 constant MPI_PUT                                                                       : std_logic_vector(3 downto 0) := "0101";
24 constant MPI_GET                                                                       : std_logic_vector(3 downto 0) := "0110";
25 constant MPI_BROADCAST                                                         : std_logic_vector(3 downto 0) := "0111";
26 constant MPI_INIT                                                              : std_logic_vector(3 downto 0) := "1000";
27 constant MPI_SPWAN                                                                     : std_logic_vector(3 downto 0) := "1001";
28 
29 constant MPI_WINCREATE                                                         : std_logic_vector(3 downto 0) := "1010";
30 constant MPI_WINCOMPLETE                                                       : std_logic_vector(3 downto 0) := "1011";
31 constant MPI_WINPOST                                                           : std_logic_vector(3 downto 0) := "1100";
32 constant MPI_WINWAIT                                                           : std_logic_vector(3 downto 0) := "1101";
33 
34 
35 
36 constant MPI_WTIME
37 constantMPI_WTICK
38 constant MPI_CONFIG                                                               : std_logic_vector(3 downto 0) := "1101";
39 --paramètres des commandes
40 Constant INIT_SEEKMAIN                                                         : std_logic_vector(3 downto 0) := "0001";
41 Constant INIT_SETRANK                                                          : std_logic_vector(3 downto 0) := "0010";
42 Constant INIT_REGISTER                                                         : std_logic_vector(3 downto 0) := "0011";
43-- constantes pour le NoC                                                               
44 Constant NOC_GETPORTID                                                         : std_logic_vector(7 downto 0) := "00000001";
45
46
47Type MPI_Datatype is (MPI_BYTE,MPI_INTEGER,MPI_REAL,MPI_PACKET, MPI_pointer);
48SUBType MPI_COMM is  natural range 0 to 2**ADRLEN-1 ; --pointeur sur la structure du communicateur
49subType Mpi_AInt is natural range 0 to 2**ADRLEN-1 ;
50
51Type MPI_COMM_struc is record
52   id : natural range 0 to 3; -- id du communicateur
53        grp : std_logic_vector(15 downto 0);     --groupe associé au communicateur
54        nproc : natural range 0 to 15;   -- nombre de membres du groupe de ce communicateur
55        AddrLib : std_logic_vector(15 downto 0); -- adresse dans la mémoire de la Lib
56                                                                                                                  -- des registres GStart et GPost
57        C_open,C_close : std_logic;  -- état du communciateur (Inistialisé ou finalisé)
58end record;
59
60Type Mpi_Win is record 
61        status : std_logic_vector(7 downto 0); --état de la fenêtre (create,Start,Complete,Post,WaitSync, etc.)
62        id : natural range 0 to 15 ; -- numéro de la fenêtre
63       
64        Addr : std_logic_vector(15 downto 0); -- adresse dans la mémoire locale du PE
65        Size : natural range 0 to 65535; -- taille de la fenêtre en octets
66       
67        comm : MPI_COMM; -- communicateur associé à la fenêtre
68end record;
69Type Mpi_group is record
70        grp : std_logic_vector(15 downto 0); --( vecteur de la liste des processus du groupe)
71        nb : natural range 0 to 15; -- nombre de membres(processus du groupe)
72        comm_id : natural range 0 to 3; -- reférence du communicateur
73end record;
74end Packet_type; 
75
76package body Packet_type is
77
78
79end Packet_type;
Note: See TracBrowser for help on using the repository browser.