source: PROJECT_CORE_MPI/CORE_MPI/BRANCHES/v1.00/Packet_type.vhd @ 71

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