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/PE.vhd

    r72 r74  
    107107        signal Lib_instr_ack : std_logic; -- l'instruction est copiée dans le tampon FIFO
    108108        signal Lib_Init : std_logic; -- l'initialisation est terminée
    109         signal Lib_Enable : std_logic;
     109        signal Lib_Enable : std_logic:='0';
     110        signal Ex1_run,Ex4_run : std_logic:='0'; --indique que ces modules sont en fin d'exécution
    110111        signal Hold_Ack : std_logic;
    111112        signal en_task : std_logic;
     113        signal ht_reset :std_logic;
    112114 --signaux pour la gestion de la MAE
    113115 type typ_mae is (start,Fillmem,NextFill,InitApp,GetRank,WInCreate,WinStart, putdata,getdata,WinCompleted,finalize,st_timeout);
    114116        type typ_Hld is (Ht_Lock,Core_Lock,Ht_free);
    115 signal dcount : natural range 0 to 255:=0; --permet de compter le packet de données envoyées
     117signal dcount : natural range 0 to 255:=0;
    116118signal count,count_i : natural range 0 to 15:=0;
    117119
     
    136138        port map (
    137139        clk=>clk,
    138         reset=>reset,
     140        reset=>ht_reset,
    139141        en=>en_task,
    140142   Interf_i =>Libr.i,
     
    159161                ram_we<= Core_ram_we;
    160162                ram_din <= Core_ram_data_in;
    161                 pe_ram_do<=(others=>'0');
     163                pe_ram_do<=(others=>'U');
    162164                Core_ram_data_out<=ram_do;
    163165               
     
    169171                ram_we<= pe_ram_we;
    170172                ram_din <=pe_ram_din;
    171                 Core_ram_data_out<=(others=>'0');
     173                Core_ram_data_out<=(others=>'U');
    172174                pe_ram_do<=ram_do;
    173175end case ;
     
    186188Lib_init<=Core_Pushout(4); -- Initialized
    187189Lib_Enable<=Core_Pushout(6);-- HT activée par la Librairie.
    188 
    189 horloge_ht:process (reset,ce,lib_enable,clk)
     190Ex1_Run<=Core_Pushout(5);  -- fin de l'exécution de Ex1
     191Ex4_Run<=Core_pushout(7); -- fin de l'exécution de Ex4 pour Spawn
     192horloge_ht:process (reset,en_task,clk)
    190193begin
    191194if reset='1' then
    192195clk_ht<='0';
     196count<=0;
     197Ht_reset<='1';
    193198else
    194 if ce='1' then
    195 clk_ht<=clk;
    196 elsif lib_enable='1' then
    197 clk_ht<=clk;
     199if en_task='1' then
     200  clk_ht<=clk;
     201  if count=10 then --circuit de reset pour la  HT
     202    ht_reset<='0';
     203  else
     204  if rising_edge(clk) then
     205  count<=count+1;
     206  end if;
     207  ht_reset<='1';
     208  end if;
    198209else
    199 clk_ht<='0';
     210  count<=0;
     211  clk_ht<='0';
     212  Ht_reset<='1';
    200213end if;
    201214end if;
     
    205218clk=>clk ,
    206219reset =>reset,
    207 Ram_Busy=>Libr.O.membusy,
     220Ram_Busy=>Ram_busy,
    208221Hold_Ack=>Hold_Ack,
    209222Hold_req =>Core_Hold_Req,
     
    221234--==========MPI HCL signals ============================
    222235
    223 affect:process (clk,Core_hold_req,RamSel_i,Core_pushout,Libr)
     236affect:process (clk,en_task,Lib_enable,Core_hold_req,RamSel_i,Core_pushout,Libr.O)
    224237begin
    225238        --if (clk'event and clk='1') then
     239if en_task='1' then
    226240Instruction<=Libr.O.Instruction;                       
    227241        Ram_busy<=Libr.O.membusy;
    228242PE_Instr_EN<=Libr.O.instr_en;
     243else --si le HT n'est pas activé ces valeurs sont à 0 !
     244 Instruction<=(others=>'0');                   
     245        Ram_busy<='0';
     246  PE_Instr_EN<='0';
     247end if;
    229248Libr.I.Instr_ack<=Core_pushout(0);
    230249Libr.I.InitOk<=Core_pushout(4);
    231 Libr.I.Spawned<=Core_pushout(6);
     250if Lib_enable='1' then
     251Libr.I.Spawned<='1';
     252else
     253  Libr.I.Spawned<='0';
     254end if;
    232255Libr.I.Hold_Req<=Core_Hold_req;
    233256--Libr.I.Hold_Ack<=Hold_Ack;
    234257Libr.I.RamSel<=RamSel_i;               
    235258--end if;
     259assert Lib_enable/='1'
     260report "Spawn Activé"
     261severity WARNING ;
     262
    236263end process affect;
    237264--=======================================================================
Note: See TracChangeset for help on using the changeset viewer.