Ignore:
Timestamp:
Jan 15, 2014, 2:40:01 AM (10 years ago)
Author:
rolagamo
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • PROJECT_CORE_MPI/CORE_MPI/BRANCHES/v1.00/EX4_FSM.vhd

    r72 r74  
    5555                Rec_Data : IN Typ_PortIO(0 to 3);
    5656                Snd_data : OUT Typ_PortIO(0 to 3);
    57                 Snd_Start : OUT std_logic;
     57                Snd_Start : buffer std_logic;
    5858                Rec_Ack : OUT std_logic;       
    5959                                   dma_wr_grant : in  STD_LOGIC;
     
    111111        type typ_receiv is (r_wait,r_dlen,r_drop,r_glen,r_data,r_pulse,r_end);
    112112        type typ_cmd is (cmdstart,cmdpost,cmdpostidle,cmdread,cmdlen,cmdglen,cmddata,cmdend,cmdtimeout);
    113 
     113  type typ_mem16 is array(natural range <>) of std_logic_vector(15 downto 0);--
    114114                signal etsnd : typ_send;
    115115                signal etrec:typ_receiv;   --pour la machine à état de réception
     
    126126        signal tosend,tosend4 :std_logic_vector(Word-1 downto 0);
    127127        signal PeerStat : std_logic_vector(15 downto 0):=(others=>'0'); --état des autres Lib initialisées
     128  signal SpawnReq,SpawnReq_Q : std_logic_vector(15 downto 0):=(others=>'0'); --état des autres HT qui ont appelés le Spawn     
     129        signal Spawn_grp,Spawn_grp_Q :typ_mem16(0 to 3):=((others=>'0'),(others=>'0'),(others=>'0'),(others=>'0')); --un max de quatre groupes de fils est prévu
     130        signal Grp_id,grp_id_i :natural range 0 to 3:=0; --id du groupe des HT fils
    128131        signal selector : std_logic_vector (2 downto 0); -- pour le MUX des signaux vers le port
    129132        --signaux pour les états des MAE
     
    136139        signal SpawnOn,SpawnInit :std_logic:='0'; --indique que le Spawn est activé
    137140        signal SpawnNbReq,SpawnNbAck,SpawnNBAck_i : natural range 0 to 15 :=0; --compte le nombre de requêtes et le nombre d'acquitement
    138         signal SpawnCmd  :std_logic_vector(Word-1 downto 0);
     141        signal SpawnNbReq_Q : natural range 0 to 15 :=0; --compte le nombre de requêtes et le nombre d'acquitement
     142        signal SpawnCmd0,SpawnCmd1, SpawnCmd2 :std_logic_vector(Word-1 downto 0):=(others=>'0');
     143        signal SpawnCmd0_Q,SpawnCmd1_Q, SpawnCmd2_Q :std_logic_vector(Word-1 downto 0):=(others=>'0');
    139144        signal SpawnDest :std_logic_vector(3 downto 0);
     145        Signal Ht_Start,Ht_Start_i : natural range 0 to 15:=0;
     146        Signal vPeerStat,vPeerStat_i : std_logic_vector(15 downto 0):=(others=>'0');
    140147        signal IsMain_i,Initialized_i,HCL_init: std_logic:='0';
    141148        signal DS_RDY ,BCast_Rdy,Send_RDY,CM_RDY:std_logic:='0';
     
    150157        --Signaux des résultats et de l'état
    151158  signal PortNum_i,MyPort : std_logic_vector(3 downto 0);  --
    152         signal NocMax : std_logic_vector(3 downto 0); -- Nombre de ports du réseau -1 ?
     159        signal NocMax : std_logic_vector(3 downto 0):=(others=>'0'); -- Nombre de ports du réseau -1 ?
    153160        signal MyRank : std_logic_vector(3 downto 0) ; --rang du PE
    154161        signal AppSize_i:std_logic_vector(3 downto 0) ;--taille de l'application
     
    162169        signal Datalen : natural range 0 to 7:=0; --indique la longueur des données
    163170        --other outputs
    164         signal StatAsked_i,RankAsked_i,EquFlag_i,MainResp_i,RankSent_i,Result_i:std_logic;
    165         signal snd_start_i:std_logic;--version interne des signaux de sortie
     171        signal StatAsked_i,RankAsked_i,EquFlag_i,MainResp_i,RankSent_i,Result_i:std_logic:='0';
     172        signal snd_start_i:std_logic:='0';--version interne des signaux de sortie
    166173   --signal BCast_Rdy_i : std_logic;
    167174        signal cdlen,dcount : natural range 0 to 255:=0; --longueur du paquet reçu par le process pcmd
    168         signal timeout,timeout_i : natural range 0 to 1023:=0;
     175        signal timeout,timeout_i : natural range 0 to 4095:=0;
    169176        signal PortStat : std_logic_vector(3 downto 0):=(others=>'0');
    170177        signal PeerPort : natural range 0 to 15:=0; -- désigne le port qui emet une requête
     
    219226                StatAsked<=StatAsked_i;
    220227                n<=n_i;
     228                Ht_Start<=Ht_Start_i;
     229                Grp_Id<=Grp_Id_i;
     230                vPeerStat<=vPeerStat_i;
    221231                SpawnNbAck<=SpawnNbAck_i;
    222232                AppSize<=AppSize_i;
    223233                Ready<=Rdy;
    224234                snd_start<=snd_start_i;
     235                SpawnNbReq_q<=SpawnNbReq;
     236                SpawnReq_Q<=SpawnReq;
     237                SpawnCmd0_Q<=SpawnCmd0;
     238                SpawnCmd1_Q<=SpawnCmd1;
     239                SpawnCmd2_Q<=SpawnCmd2;
     240                Spawn_grp_q<=Spawn_grp;
    225241        end if;
    226242end process;
    227243
    228   Init2_DECODE: process (stinit2, CmdReceived, EquFlag, MyPort, DS_RDY, MainResp, DataReceived,
    229   SpawnOn,Ram_NextAdress,PeerRTS,PortSTAT,dma_rd,dma_wr,Send_rdy,I_Send_rdy,rd_ok,wr_ok,Instruction)
     244  Init2_DECODE: process (stinit2,n, CmdReceived, EquFlag, MyPort, DS_RDY, MainResp, DataReceived,
     245  SpawnOn,Ram_NextAdress,PeerRTS,PortSTAT,dma_rd,dma_wr,Send_rdy,I_Send_rdy,rd_ok,wr_ok,Instruction,
     246  MainPort,PeerStat,SpawnCmd0,SpawnCmd1,SpawnCmd2,SpawnInit,BCast_rdy)
    230247   variable nextr,nextadr : natural :=0;--to_integer(unsigned(Ram_NextAdress));
    231248        variable nport : natural range 0 to 15:=0;
     
    466483                                RTS_cmd<='0';
    467484                                RTS_I<='0';
    468                                 CTR<='1';
     485                                CTR<=not MainResp;
    469486                                ResultOut<=(others=>'0');
    470487                                PortNum_i<=DataReceived(0)(3 downto 0); --adresse du Main Port
     
    609626                                DS_ACK<=DS_RDY;
    610627                                BCAST<='0';
    611                                 CTR<='1';  --cette mise à 1 permet de ctrler la fin de réception
     628                                CTR<='0';  --cette mise à 1 permet de ctrler la fin de réception
    612629                                rdy<='0';
    613630                                ram_wr<=wr_ok;
     
    620637                                dma_wr_request <=dma_wr;
    621638                                RankAsked_i<='0';
    622                                 if SpawnInit='1' then
    623                                         ResultOut<=("01000000");--spawn completed
     639                                if n>=3 then
     640                                        ResultOut<=("00000010");--spawn completed
    624641                                else
    625                                         ResultOut<=("00000010");--spawn message received
     642                                        ResultOut<=("00000000");--spawn message received
    626643                                end if;
    627644                               
     
    629646                    RTS_cmd<='0';
    630647                                --RTS_DAT<='1'; --à tester
    631                                 RTS_I<='1'; -- pour le timing
     648                                RTS_I<=PeerRTS; -- pour le timing
    632649                                Result_En<='0';
    633650                                DS_ACK<='0';
     
    637654                                ram_wr<=wr_ok;
    638655                                ram_rd<=rd_ok;
    639                       DataToSend(0)<=MPI_SPAWN & SpawnDest;
     656                      DataToSend(0)<=SpawnCmd0;
    640657          DataToSend(1)<="00000100";
    641           DataToSend(2)<=PeerStat(7 downto 0);
    642           DataToSend(3)<=SpawnCmd; -- SPAWN_LOAD & MyPort ;
     658          DataToSend(2)<=SpawnCmd1;
     659          DataToSend(3)<=SpawnCmd2; -- SPAWN_LOAD & MyPort ;
    643660          Send_Ack<=Send_Rdy;
    644661                                I_Send_Ack<=I_Send_rdy;
    645662          RankAsked_i<='0';
    646663                                if SpawnInit='1' then
    647                                         ResultOut<=("01000000"); --spawn completed
     664                                        ResultOut<=("10000000"); --spawn completed
    648665                                else
    649                                         ResultOut<=("00000010");--spawn message received
     666                                        ResultOut<=("01000000");--spawn in progress
    650667                                end if;
    651668                When ErrSpawn =>
     
    705722 --==================
    706723   NEXT_STInit2_DECODE: process (stInit2,AppReq,Instruction_en, AppAck,PortNumFlag,EquFlag,MainResp,StatAsked,RankAsked,RankSent,CM_RDY, CmdReceived,
    707         BCast_Rdy, DS_RDY, DataReceived, Send_RDY,      I_Send_RDY,TimeOut,Dma_rd_grant,Dma_wr_grant,cpt,n,clk_cyl,IsMain_i,SpawnOn)
     724        BCast_Rdy, DS_RDY, DataReceived,Ht_Start,vPeerStat, Send_RDY,   I_Send_RDY,TimeOut,Dma_rd_grant,Dma_wr_grant,cpt,n,clk_cyl,IsMain_i,SpawnOn,
     725        Instruction,Hcl_Init,Spawn_done,mainport,PeerStat,PeerRTS,Rec_Data,SpawnInit,grp_id,SpawnNbReq,Ram_data_out,Spawn_grp,MyPort)
    708726   variable InitTimeOut :natural:=0;
    709727        variable LastPort,Ht_hole : std_logic:='0';
    710         variable i,htloc,ht_Start : natural range 0 to 15:=0;
    711         variable vPeerStat : std_logic_vector(15 downto 0);
     728        variable i,nbSpawn,htloc,Ht_Id : natural range 0 to 15:=0;
     729        --variable vPeerStat : std_logic_vector(15 downto 0);
    712730   variable vPortStat,nulvect : std_logic_vector(3 downto 0):="0000";   
    713731        variable tempval : std_logic_vector(Word-1 downto 0);
     
    717735      --insert statements to decode next_state
    718736      --below is a simple example
     737                vPeerStat_i<=vPeerStat;
     738                SpawnNbReq<=SpawnNbReq_q;
     739                SpawnReq<=SpawnReq_q;
     740                Ht_Start_i<=Ht_Start;
     741                SpawnCmd0<=SpawnCmd0_Q;
     742                SpawnCmd1<=SpawnCmd1_Q;
     743                SpawnCmd2<=SpawnCmd2_Q;
     744                for i in 0 to 3 loop
     745                Spawn_grp(i)<=Spawn_grp_q(i);
     746                end loop;
    719747      case (stInit2) is
    720748         
     
    736764                                                        Next_stInit2 <=SendApp;
    737765                                                end if;
    738                                          elsif portNumFlag='1' and IsMain_i='0' then
    739                                                 Next_stInit2 <=AskPeerStat; --recevoir les nouvelles données sur l'état d'initialisation
     766                                         elsif HCL_Init='1' and IsMain_i='0' then
     767                                                Next_stInit2 <=SendApp; --ignorer ce message simplement
    740768                                        else
    741769                                                Next_stInit2 <=GetPortNum; -- initialiser la bibliothèque normalement
     
    841869                                                                        Next_stInit2<=GetPeerStat;
    842870                                                                        StatAsked_i<='1';
     871                                                                        MainResp<='0';
    843872                                                           n_i<=0;
    844873                                                        End if;         
     
    857886                                                                         end if;       
    858887                                                                               
    859                                                         elsif TimeOut=800 then
     888                                                        elsif TimeOut=1800 then
    860889                                                                                                --essayer de redemander les statistiques
    861890                                                                        Timeout_i<=0;   
     
    927956                                                TimeOut_i<=0;   -- prépare le traitement de la prochaine requête
    928957                                                                                                -- d'attente des ports
     958                                  elsif Timeout=800 then
     959                                    assert true report "Impossible d'envoyer le rang"
     960                                    severity failure;
     961                                    timeout_i<=0;
     962                                  else
     963                                    TimeOut_i<=TimeOut+1;
    929964                                        end if;
    930965                When RegRank =>
     
    10051040                                                        if statAsked='1' then
    10061041                                                         -- Next_stInit2<=ReadNoc;
    1007                                                         --  else
     1042                                                       
    10081043                                                        Next_stInit2<=SendApp; --terminer l'application
    10091044                                                  end if;
    10101045                                               
    1011                                                 elsif TimeOut_i=100 then
     1046                                                elsif TimeOut=100 then
    10121047                                                        Next_stInit2 <=EndInit;
    10131048                                                else
    1014                                                         TimeOut_i<=TimeOut_i+1;
     1049                                                        TimeOut_i<=TimeOut+1;
    10151050                                                end if;
    10161051                                        else
     
    10261061               
    10271062                                if n=0 then
    1028                                         SpawnNbReq<=to_integer(unsigned(Instruction(3 downto 0))); -- sauver le nombre de HT à créer
     1063                                        ht_id:=to_integer(unsigned(rec_data(0)(3 downto 0)));
     1064                                        vPeerStat_i<=PeerStat; --récupérer la situation actuelle des tâches créées
    10291065                                        if IsMain_i='1' and SpawnInit='0' then
    1030                                                         n_i<=1;
     1066                                         SpawnNbReq<=to_integer(unsigned(Instruction(3 downto 0))); -- sauver le nombre de HT à créer
     1067 
     1068                                        n_i<=1;
     1069                                        SpawnReq(ht_id)<='1'; --Note l'id de HT qui a appelé le Spawn
    10311070                                        elsif IsMain_i='1' and SpawnInit='1'  then -- il faut envoyer les acquittements
    1032                                         vPeerStat:=PeerStat; --récupérer la situation actuelle des tâches créées
    1033                                         Ht_start:=0; --compte le nombre de tâches chargées
     1071                                        ht_id:=to_integer(unsigned(rec_data(0)(3 downto 0)));
     1072                                        Spawn_grp(grp_id)(ht_id)<='1'; --noter le port du Fils Spawné dans ce groupe
     1073                                        Ht_start_i<=0; --compte le nombre de tâches chargées
    10341074                                                        n_i<=6;
     1075                                       
    10351076                                        else
    10361077                                           if SpawnOn='1' then --if IsMain_i='0' then  -- il faut juste charger puis activer la tâche
    10371078                                             n_i<=7;
    1038                                            end if;
     1079                                            end if;
     1080                                            assert true
     1081                                           Report "SpawnLoad : Cas non prévu !"
     1082                                          severity failure;
    10391083                                        end if;
    10401084                                elsif n=1 then
    1041                                 ht_hole:='0';
    1042         L1:                     for i in 0 to 7 loop
     1085                                if PeerStat=SpawnReq then --tous les Hts ont appelés Spawn ?
     1086                                ht_hole:='0';           
     1087        L1:                     for i in 0 to 15 loop
    10431088                                                if vPeerStat(i)='0' then
    10441089                                                        SpawnDest<=std_logic_vector(to_unsigned(i,4)); -- le port à activer
    1045                                                         vPeerStat(i):='1';
    1046                                                         Ht_Start:=Ht_Start+1;
     1090                                                        SpawnCmd0<=MPI_SPAWN & std_logic_vector(to_unsigned(i,4));
     1091                                                        vPeerStat_i(i)<='1';
     1092                                                        Ht_Start_i<=Ht_Start+1;
    10471093                                                        Ht_Hole:='1'; -- une place a été trouvé
    10481094                                                else
     
    10531099                                        if Ht_hole='0' then -- toutes les tâches n'ont pas été créés
    10541100                                                -- aller à la fin ! en signalant une erreur!
    1055                                                 SpawnCMd<=Spawn_Err & "0001"; --erreur pas assez de ports sur le NoC
    1056                                                 n_i<=7;
     1101                                                SpawnCMd2<=Spawn_Err & "0001"; --erreur pas assez de ports sur le NoC
     1102                                                n_i<=9;
    10571103                                        else
    10581104                                                n_i<=n+1;
    1059                                                 SpawnCmd<=SPAWN_START & MyPort;
     1105                                                SpawnCmd1<=PeerStat(7 downto 0);
     1106                                                SpawnCmd2<=SPAWN_START & MyPort;
     1107                                        end if;
     1108                                        else --Tous les Hts n'ont pas appelé Spawn encore
     1109                                          Next_stInit2<=SendApp; --on termine normalement
     1110                                          n_i<=0;
    10601111                                        end if;
    10611112                                elsif n=2 then
     
    10691120                                elsif n=4 then
    10701121                                        if SpawnInit='0' then
    1071                                         if Ht_Start=SpawnNbReq then
     1122                                        if Ht_Start>=SpawnNbReq then
    10721123                                                n_i<=n+1;
    10731124                                        else
     
    10751126                                        end if;
    10761127                                        else
    1077                                                 n_i<=6; -- passer au contact du HT suivant
     1128                                                n_i<=7; -- passer au contact du HT suivant
    10781129                                        end if;
    10791130                                elsif n=5 then
    1080                                                                 -- donner le résultat du Spawn
    1081                                 Next_stinit2<=SendApp;
    1082                                 n_i<=0;
     1131                                                                -- Aller à la fin le résultat du Spawn
     1132                               
     1133                                n_i<=10;
    10831134                                elsif n=6 then
     1135                                  nbSpawn:=0;
     1136                                  for i in 0 to 15 loop
     1137                                      if Spawn_grp(grp_id)(i)='1' then
     1138                                         nbSpawn:=nbSpawn+1;
     1139                                       end if;
     1140                                   end loop;
     1141                                  if nbSpawn=SpawnNbReq then
     1142                                  n_i<=n+1; --aller renvoyer les réponses
     1143                                  else
     1144                                    n_i<=10; --fin du Spawn
     1145                                   
     1146                                   end if;
     1147                                elsif n=7 then
    10841148                                Ht_hole:='0';
    1085 L2:                     for i in 0 to 7 loop
    1086                                                 if PeerStat(i)='1' then
     1149L2:                     for i in 0 to 7 loop --for i in Ht_start to 7 loop
     1150                                                if i>=Ht_start then
     1151                                                if vPeerStat(i)='1' and Spawn_grp(grp_id)(i)='0' then  --on avertit les membres du groupe parent
     1152                                                  --mais pas ceux du groupe Fils !
    10871153                                                        SpawnDest<=std_logic_vector(to_unsigned(i,4)); -- le port à avertir
    1088                                                         vPeerStat(i):='1';
    1089                                                         Ht_Start:=Ht_Start+1;
     1154                                                        SpawnCmd0<=MPI_ACK & std_logic_vector(to_unsigned(i,4));
     1155                                                        vPeerStat_i(i)<='0';
     1156                                                        Ht_Start_i<=i+1; -- le prochain Ht à prévenir
    10901157                                                        Ht_Hole:='1'; -- Une tâche doit être avertie
    1091                                                         n_i<=n+1;
    10921158                                                else
    10931159                                                        Ht_hole:='0'; --
    10941160                                                end if;
     1161                                                end if;
    10951162                                                exit L2 when ht_hole='1';
    10961163                                        end loop L2;
     1164                                        n_i<=n+1;
     1165                        elsif n=8 then
    10971166                                 if Ht_hole='1' then --
    1098                                                 -- aller à la fin ! en signalant une erreur!
    1099                                                 SpawnCMd<=Spawn_COMP & "0001"; -- fin du Spawn
    1100                                                 n_i<=2; --envoyer la la donnée sur le réseau
     1167                                                -- un HT existant à prévenir !
     1168                                                SpawnCmd1<=Spawn_grp(grp_id)(7 downto 0);
     1169                                                SpawnCMd2<=MPI_SPAWN & MyRank; -- fin du Spawn
     1170                                                n_i<=2; --envoyer la  donnée sur le réseau
     1171                                        elsif vpeerstat /=spawn_grp(grp_id) then --il ne reste plus de membres à prévenir ?
     1172              n_i<=7; --on est sorti mais ce n'est pas la fin
     1173
    11011174                                        else -- fin du Spawn car tous ont été averti
    1102                                                 n_i<=8;
    1103                                                
    1104                                         end if;
    1105                                
    1106                                
    1107                 elsif Ismain_i='1' and SpawnInit='1' then
    1108                         if SpawnNbAck+1=SpawnNbReq then
    1109                                         -- il faut envoyer un message à tous les noeuds pour avertir de la fin du Spawn
    1110                                        
    1111                         else
    1112                                         SpawnNbAck_i<=SpawnNbAck+1;
    1113                                         Next_stInit2<=SendApp; --on attend le suivant
    1114                         end if;
    1115                 end if;
     1175                                                n_i<=10;
     1176                                                SpawnNbReq<=0;
     1177                                                SpawnReq<=(others=>'0');
     1178                                                vPeerStat_i<=(others=>'0');
     1179                                                grp_id_i<=grp_id+1; --incrementer le compteur de groupes************
     1180                                        end if;
     1181                                elsif n=9 then
     1182                                  assert true report "error in Spawn command"
     1183                                   severity failure;
     1184                                elsif n=10 then
     1185                                  n_i<=0;
     1186                                  Next_stInit2<=SendApp;
     1187                                 end if;
    11161188               
    11171189        When SpawnApp=>
    11181190                --Mise à jour du bit 6 du registre status du COre.
    1119                 if n <3 then     
     1191                if n>=0 and n <4 then     
    11201192                       
    11211193                        dma_wr<='1';  --demander un accès exclusif au bus
     
    11291201                  if DS_RDY='1' then ---
    11301202                      if Datareceived(3)(7 downto 4)=SPAWN_START then
     1203                        n_i<=n+1;
    11311204                       else
    1132                          n_i<=6; --erreur instruction incorrecte
     1205                         Next_stInit2<=ErrSpawn;
     1206                         n_i<=0; --erreur instruction incorrecte
    11331207                        end if;
    1134                            if dma_rd_grant='1' then
    1135                                n_i<=n+1;
    1136                            end if;
     1208                           
    11371209                           rd_ok<='1';
    11381210                           wr_ok<='0';
    11391211                        end if;
    1140                 elsif n=1 then
     1212                elsif n=1 or n=2 then
    11411213                        if dma_rd_grant='1' then
    11421214                                n_i<=n+1;
    1143                                
     1215                                tempval:=Ram_data_out;
    11441216                        end if;
    11451217                                rd_ok<='1';
    11461218                                wr_ok<='0';
    1147                        
    1148                 elsif n=2 then
     1219                         
     1220                elsif n=3 then
    11491221                                if dma_rd_grant='1' and dma_wr_grant='1' then
    11501222                                        n_i<=n+1;
     
    11591231                                        wr_ok<='0';
    11601232                                end if;
    1161                 elsif n=3 then
     1233                elsif n=4 then
    11621234                if spawninit='0' then
    11631235                  Spawn_done<='1';
    11641236                end if;
     1237                rd_ok<='0';
     1238                wr_ok<='0';
     1239                n_i<=0;
    11651240                Next_stInit2<=EndInit;
    11661241                end if;
    11671242                       
    11681243                When ErrSpawn =>
     1244                  assert true
     1245                  report "Ex4/stInit2/SpawnApp:Erreur lors de Spawn"
     1246                  severity failure;
    11691247                        Next_stInit2<=Init;
    11701248                When EndInit=>
    11711249                 
    1172                        
     1250                        StatAsked_i<='0'; --reset de ces variables
    11731251                        Next_stInit2<=Init;
    11741252      end case;     
     
    12321310        begin
    12331311--                             
    1234         if  rising_edge(clk) then
     1312       
    12351313        if reset='1' then
    12361314                etrec<=r_wait;
     
    12391317                bad_paquet:='0';
    12401318        else
     1319        if  rising_edge(clk) then
    12411320                        case  etrec is
    12421321                        when r_wait =>
     
    12541333                                                bad_paquet:='0';
    12551334                                                SpawnOn<='1'; --le spawn est actif
     1335                                elsif Instruction_en='0' and CTR='0' and Hcl_init= '0' then
     1336                                  --il faut éliminer ce paquet qui est inoportun !
     1337                                  Bad_paquet:='1';
     1338                                  etrec<=r_dlen; --il faut ignorer cette donnée et quitter
     1339                                        dcount:=1;
    12561340                                elsif CTR='1' then
    12571341                                if ptype=MPI_INIT or ptype=INIT_SETRANK or ptype=INIT_SEEKMAIN or ptype=INIT_REGISTER then
     
    13561440                                               
    13571441                        --rPort_out_rd_en <='0';
    1358                         SpawnOn<='0'; -- annuler le signal de Spawn
    1359                         if DS_ACK='1' or rtimeout> 30 or CTR='0' or bad_paquet='1' then
     1442                       
     1443                        if DS_ACK='1' or rtimeout> 30 or (CTR='0' and SpawnOn='0') or bad_paquet='1' then
    13601444                                DS_RDY<='0';
     1445                                SpawnOn<='0';
    13611446                                etrec<=r_wait;
    13621447                        else
    13631448                                DS_RDY<=DS_RDY;
    1364                         end if;
    1365                        
    1366                        
    1367                        
     1449                        end if;                 
    13681450                        end case;
    13691451                 end if;--reset='1'
     
    15481630        begin
    15491631       
    1550         if  rising_edge(clk) then
     1632       
    15511633                if reset='1' then
    15521634                        etcmd<=cmdstart;
     
    15541636        --              sorigport<=origport;
    15551637                else
     1638                if  rising_edge(clk) then
    15561639                                        case  etcmd is
    15571640                                        when cmdstart =>
     
    17231806i_send_val:process(HCL_Init,Send_RDY,RTS_I,Snd_Ack,I_send_ack,DataToSend,Bcast_rdy,Bcast)
    17241807begin
     1808snd_start_i<=snd_start;
    17251809if HCL_Init='1' then
    1726  if RTS_I='1' and i_send_ack='0' then
     1810 if RTS_I='1' and snd_ack='0' then
    17271811  snd_start_i<='1';
    17281812 elsif i_send_ack='1' then
     
    17411825 end if;
    17421826 i_send_rdy<=send_rdy;
     1827 for i in 0 to 3 loop
     1828 Snd_data(i)<=(others=>'0');
     1829 end loop;
    17431830end if;
    17441831end process;
Note: See TracChangeset for help on using the changeset viewer.